@ankhorage/zora 1.5.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +125 -123
  3. package/dist/components/app-bar/AppBar.js +4 -4
  4. package/dist/components/app-bar/AppBar.js.map +1 -1
  5. package/dist/components/avatar/Avatar.d.ts.map +1 -1
  6. package/dist/components/avatar/Avatar.js +19 -9
  7. package/dist/components/avatar/Avatar.js.map +1 -1
  8. package/dist/components/avatar/types.d.ts +2 -2
  9. package/dist/components/avatar/types.d.ts.map +1 -1
  10. package/dist/components/avatar/types.js.map +1 -1
  11. package/dist/components/avatar-group/AvatarGroup.js +2 -2
  12. package/dist/components/avatar-group/AvatarGroup.js.map +1 -1
  13. package/dist/components/avatar-group/types.d.ts +2 -2
  14. package/dist/components/avatar-group/types.d.ts.map +1 -1
  15. package/dist/components/avatar-group/types.js.map +1 -1
  16. package/dist/components/badge/Badge.js +3 -3
  17. package/dist/components/badge/Badge.js.map +1 -1
  18. package/dist/components/badge/types.d.ts +4 -4
  19. package/dist/components/badge/types.d.ts.map +1 -1
  20. package/dist/components/badge/types.js.map +1 -1
  21. package/dist/components/button/Button.js +3 -3
  22. package/dist/components/button/Button.js.map +1 -1
  23. package/dist/components/button/meta.d.ts +15 -7
  24. package/dist/components/button/meta.d.ts.map +1 -1
  25. package/dist/components/button/meta.js +16 -7
  26. package/dist/components/button/meta.js.map +1 -1
  27. package/dist/components/button/types.d.ts +4 -4
  28. package/dist/components/button/types.d.ts.map +1 -1
  29. package/dist/components/button/types.js.map +1 -1
  30. package/dist/components/card/Card.js +2 -2
  31. package/dist/components/card/Card.js.map +1 -1
  32. package/dist/components/checkbox/CheckboxGroup.js +5 -5
  33. package/dist/components/checkbox/CheckboxGroup.js.map +1 -1
  34. package/dist/components/checkbox/types.d.ts +1 -1
  35. package/dist/components/checkbox/types.d.ts.map +1 -1
  36. package/dist/components/checkbox/types.js.map +1 -1
  37. package/dist/components/chip/Chip.d.ts.map +1 -1
  38. package/dist/components/chip/Chip.js +9 -10
  39. package/dist/components/chip/Chip.js.map +1 -1
  40. package/dist/components/chip/resolveChipColors.d.ts +3 -3
  41. package/dist/components/chip/resolveChipColors.d.ts.map +1 -1
  42. package/dist/components/chip/resolveChipColors.js +14 -4
  43. package/dist/components/chip/resolveChipColors.js.map +1 -1
  44. package/dist/components/chip/types.d.ts +2 -2
  45. package/dist/components/chip/types.d.ts.map +1 -1
  46. package/dist/components/chip/types.js.map +1 -1
  47. package/dist/components/chip-group/ChipGroup.js +2 -2
  48. package/dist/components/chip-group/ChipGroup.js.map +1 -1
  49. package/dist/components/chip-group/types.d.ts +2 -2
  50. package/dist/components/chip-group/types.d.ts.map +1 -1
  51. package/dist/components/chip-group/types.js.map +1 -1
  52. package/dist/components/drawer/Drawer.js +1 -1
  53. package/dist/components/drawer/Drawer.js.map +1 -1
  54. package/dist/components/form/FormError.js +1 -1
  55. package/dist/components/form/FormError.js.map +1 -1
  56. package/dist/components/form/FormField.js +1 -1
  57. package/dist/components/form/FormField.js.map +1 -1
  58. package/dist/components/form/meta.d.ts +13 -0
  59. package/dist/components/form/meta.d.ts.map +1 -1
  60. package/dist/components/form/meta.js +15 -0
  61. package/dist/components/form/meta.js.map +1 -1
  62. package/dist/components/heading/Heading.d.ts.map +1 -1
  63. package/dist/components/heading/Heading.js +5 -3
  64. package/dist/components/heading/Heading.js.map +1 -1
  65. package/dist/components/heading/index.d.ts +1 -1
  66. package/dist/components/heading/index.d.ts.map +1 -1
  67. package/dist/components/heading/index.js.map +1 -1
  68. package/dist/components/heading/meta.d.ts +9 -3
  69. package/dist/components/heading/meta.d.ts.map +1 -1
  70. package/dist/components/heading/meta.js +10 -3
  71. package/dist/components/heading/meta.js.map +1 -1
  72. package/dist/components/heading/resolveHeadingRecipe.d.ts +4 -3
  73. package/dist/components/heading/resolveHeadingRecipe.d.ts.map +1 -1
  74. package/dist/components/heading/resolveHeadingRecipe.js +33 -12
  75. package/dist/components/heading/resolveHeadingRecipe.js.map +1 -1
  76. package/dist/components/heading/types.d.ts +5 -2
  77. package/dist/components/heading/types.d.ts.map +1 -1
  78. package/dist/components/heading/types.js.map +1 -1
  79. package/dist/components/icon-button/IconButton.js +3 -3
  80. package/dist/components/icon-button/IconButton.js.map +1 -1
  81. package/dist/components/icon-button/types.d.ts +3 -3
  82. package/dist/components/icon-button/types.d.ts.map +1 -1
  83. package/dist/components/icon-button/types.js.map +1 -1
  84. package/dist/components/input/Input.js +1 -1
  85. package/dist/components/input/Input.js.map +1 -1
  86. package/dist/components/media-card/MediaCard.js +2 -2
  87. package/dist/components/media-card/MediaCard.js.map +1 -1
  88. package/dist/components/metric-card/MetricCard.js +5 -5
  89. package/dist/components/metric-card/MetricCard.js.map +1 -1
  90. package/dist/components/metric-card/types.d.ts +2 -2
  91. package/dist/components/metric-card/types.d.ts.map +1 -1
  92. package/dist/components/metric-card/types.js.map +1 -1
  93. package/dist/components/modal/Modal.js +1 -1
  94. package/dist/components/modal/Modal.js.map +1 -1
  95. package/dist/components/progress/Progress.js +2 -2
  96. package/dist/components/progress/Progress.js.map +1 -1
  97. package/dist/components/progress/types.d.ts +3 -3
  98. package/dist/components/progress/types.d.ts.map +1 -1
  99. package/dist/components/progress/types.js +12 -2
  100. package/dist/components/progress/types.js.map +1 -1
  101. package/dist/components/radio/RadioGroup.js +5 -5
  102. package/dist/components/radio/RadioGroup.js.map +1 -1
  103. package/dist/components/radio/types.d.ts +1 -1
  104. package/dist/components/radio/types.d.ts.map +1 -1
  105. package/dist/components/radio/types.js.map +1 -1
  106. package/dist/components/rating/Rating.js +2 -2
  107. package/dist/components/rating/Rating.js.map +1 -1
  108. package/dist/components/rating/types.d.ts +3 -3
  109. package/dist/components/rating/types.d.ts.map +1 -1
  110. package/dist/components/rating/types.js +12 -2
  111. package/dist/components/rating/types.js.map +1 -1
  112. package/dist/components/tabs/Tabs.d.ts.map +1 -1
  113. package/dist/components/tabs/Tabs.js +4 -4
  114. package/dist/components/tabs/Tabs.js.map +1 -1
  115. package/dist/components/text/Text.d.ts.map +1 -1
  116. package/dist/components/text/Text.js +3 -2
  117. package/dist/components/text/Text.js.map +1 -1
  118. package/dist/components/text/index.d.ts +1 -1
  119. package/dist/components/text/index.d.ts.map +1 -1
  120. package/dist/components/text/index.js.map +1 -1
  121. package/dist/components/text/meta.d.ts +10 -4
  122. package/dist/components/text/meta.d.ts.map +1 -1
  123. package/dist/components/text/meta.js +11 -4
  124. package/dist/components/text/meta.js.map +1 -1
  125. package/dist/components/text/resolveTextRecipe.d.ts +4 -3
  126. package/dist/components/text/resolveTextRecipe.d.ts.map +1 -1
  127. package/dist/components/text/resolveTextRecipe.js +35 -13
  128. package/dist/components/text/resolveTextRecipe.js.map +1 -1
  129. package/dist/components/text/types.d.ts +5 -2
  130. package/dist/components/text/types.d.ts.map +1 -1
  131. package/dist/components/text/types.js.map +1 -1
  132. package/dist/components/toolbar/ToolbarAction.js +1 -1
  133. package/dist/components/toolbar/ToolbarAction.js.map +1 -1
  134. package/dist/index.d.ts +5 -3
  135. package/dist/index.d.ts.map +1 -1
  136. package/dist/index.js +1 -0
  137. package/dist/index.js.map +1 -1
  138. package/dist/internal/colorModel.d.ts +10 -0
  139. package/dist/internal/colorModel.d.ts.map +1 -0
  140. package/dist/internal/colorModel.js +25 -0
  141. package/dist/internal/colorModel.js.map +1 -0
  142. package/dist/internal/recipes.d.ts +12 -11
  143. package/dist/internal/recipes.d.ts.map +1 -1
  144. package/dist/internal/recipes.js +6 -6
  145. package/dist/internal/recipes.js.map +1 -1
  146. package/dist/metadata/index.d.ts +1 -1
  147. package/dist/metadata/index.d.ts.map +1 -1
  148. package/dist/metadata/index.js.map +1 -1
  149. package/dist/metadata/types.d.ts +16 -0
  150. package/dist/metadata/types.d.ts.map +1 -1
  151. package/dist/metadata/types.js.map +1 -1
  152. package/dist/patterns/auth/ForgotPasswordForm.js +2 -2
  153. package/dist/patterns/auth/ForgotPasswordForm.js.map +1 -1
  154. package/dist/patterns/auth/OtpForm.js +2 -2
  155. package/dist/patterns/auth/OtpForm.js.map +1 -1
  156. package/dist/patterns/auth/SignInForm.js +4 -4
  157. package/dist/patterns/auth/SignInForm.js.map +1 -1
  158. package/dist/patterns/auth/SignUpForm.js +2 -2
  159. package/dist/patterns/auth/SignUpForm.js.map +1 -1
  160. package/dist/patterns/chat-list-item/ChatListItem.d.ts.map +1 -1
  161. package/dist/patterns/chat-list-item/ChatListItem.js +6 -6
  162. package/dist/patterns/chat-list-item/ChatListItem.js.map +1 -1
  163. package/dist/patterns/chat-list-item/types.d.ts +2 -2
  164. package/dist/patterns/chat-list-item/types.d.ts.map +1 -1
  165. package/dist/patterns/chat-list-item/types.js.map +1 -1
  166. package/dist/patterns/collection-editor/CollectionEditor.js +5 -5
  167. package/dist/patterns/collection-editor/CollectionEditor.js.map +1 -1
  168. package/dist/patterns/confirm-dialog/ConfirmDialog.js +3 -3
  169. package/dist/patterns/confirm-dialog/ConfirmDialog.js.map +1 -1
  170. package/dist/patterns/confirm-dialog/types.d.ts +3 -3
  171. package/dist/patterns/confirm-dialog/types.d.ts.map +1 -1
  172. package/dist/patterns/confirm-dialog/types.js.map +1 -1
  173. package/dist/patterns/disclosure-section/DisclosureSection.js +1 -1
  174. package/dist/patterns/disclosure-section/DisclosureSection.js.map +1 -1
  175. package/dist/patterns/empty-state/EmptyState.js +2 -2
  176. package/dist/patterns/empty-state/EmptyState.js.map +1 -1
  177. package/dist/patterns/empty-state/types.d.ts +3 -3
  178. package/dist/patterns/empty-state/types.d.ts.map +1 -1
  179. package/dist/patterns/empty-state/types.js.map +1 -1
  180. package/dist/patterns/form-field/FormField.js +1 -1
  181. package/dist/patterns/form-field/FormField.js.map +1 -1
  182. package/dist/patterns/hero/Hero.js +3 -3
  183. package/dist/patterns/hero/Hero.js.map +1 -1
  184. package/dist/patterns/hero/types.d.ts +3 -3
  185. package/dist/patterns/hero/types.d.ts.map +1 -1
  186. package/dist/patterns/hero/types.js.map +1 -1
  187. package/dist/patterns/image-preview/ImagePreview.js +1 -1
  188. package/dist/patterns/image-preview/ImagePreview.js.map +1 -1
  189. package/dist/patterns/image-upload-field/ImageUploadField.js +7 -7
  190. package/dist/patterns/image-upload-field/ImageUploadField.js.map +1 -1
  191. package/dist/patterns/list/ListRow.js +2 -2
  192. package/dist/patterns/list/ListRow.js.map +1 -1
  193. package/dist/patterns/list/meta.d.ts +16 -0
  194. package/dist/patterns/list/meta.d.ts.map +1 -1
  195. package/dist/patterns/list/meta.js +19 -0
  196. package/dist/patterns/list/meta.js.map +1 -1
  197. package/dist/patterns/message-bubble/MessageBubble.d.ts.map +1 -1
  198. package/dist/patterns/message-bubble/MessageBubble.js +6 -6
  199. package/dist/patterns/message-bubble/MessageBubble.js.map +1 -1
  200. package/dist/patterns/message-bubble/types.d.ts +2 -2
  201. package/dist/patterns/message-bubble/types.d.ts.map +1 -1
  202. package/dist/patterns/message-bubble/types.js.map +1 -1
  203. package/dist/patterns/notice/Notice.js +2 -2
  204. package/dist/patterns/notice/Notice.js.map +1 -1
  205. package/dist/patterns/notice/types.d.ts +2 -2
  206. package/dist/patterns/notice/types.d.ts.map +1 -1
  207. package/dist/patterns/notice/types.js.map +1 -1
  208. package/dist/patterns/post-card/PostCard.js +4 -4
  209. package/dist/patterns/post-card/PostCard.js.map +1 -1
  210. package/dist/patterns/post-card/types.d.ts +2 -2
  211. package/dist/patterns/post-card/types.d.ts.map +1 -1
  212. package/dist/patterns/post-card/types.js.map +1 -1
  213. package/dist/patterns/section-header/SectionHeader.js +2 -2
  214. package/dist/patterns/section-header/SectionHeader.js.map +1 -1
  215. package/dist/patterns/settings-row/SettingsRow.js +1 -1
  216. package/dist/patterns/settings-row/SettingsRow.js.map +1 -1
  217. package/dist/patterns/theme-composer/ThemeComposer.js +14 -14
  218. package/dist/patterns/theme-composer/ThemeComposer.js.map +1 -1
  219. package/dist/patterns/tile-grid/PaletteItem.js +1 -1
  220. package/dist/patterns/tile-grid/PaletteItem.js.map +1 -1
  221. package/dist/patterns/timeline/Timeline.d.ts.map +1 -1
  222. package/dist/patterns/timeline/Timeline.js +14 -4
  223. package/dist/patterns/timeline/Timeline.js.map +1 -1
  224. package/dist/patterns/timeline/types.d.ts +2 -2
  225. package/dist/patterns/timeline/types.d.ts.map +1 -1
  226. package/dist/patterns/timeline/types.js.map +1 -1
  227. package/dist/patterns/tree-view/TreeItem.js +1 -1
  228. package/dist/patterns/tree-view/TreeItem.js.map +1 -1
  229. package/dist/theme/useZoraTheme.d.ts +1 -1
  230. package/package.json +3 -3
  231. package/src/components/app-bar/AppBar.tsx +6 -6
  232. package/src/components/avatar/Avatar.tsx +21 -11
  233. package/src/components/avatar/types.ts +2 -2
  234. package/src/components/avatar-group/AvatarGroup.tsx +2 -2
  235. package/src/components/avatar-group/types.ts +2 -2
  236. package/src/components/badge/Badge.tsx +4 -4
  237. package/src/components/badge/types.ts +4 -4
  238. package/src/components/button/Button.tsx +4 -4
  239. package/src/components/button/meta.ts +16 -7
  240. package/src/components/button/types.ts +4 -4
  241. package/src/components/card/Card.tsx +2 -2
  242. package/src/components/checkbox/CheckboxGroup.tsx +6 -6
  243. package/src/components/checkbox/types.ts +1 -1
  244. package/src/components/chip/Chip.tsx +9 -10
  245. package/src/components/chip/resolveChipColors.ts +16 -6
  246. package/src/components/chip/types.ts +2 -2
  247. package/src/components/chip-group/ChipGroup.tsx +2 -2
  248. package/src/components/chip-group/types.ts +2 -2
  249. package/src/components/drawer/Drawer.tsx +1 -1
  250. package/src/components/form/FormError.tsx +1 -1
  251. package/src/components/form/FormField.tsx +1 -1
  252. package/src/components/form/meta.ts +15 -0
  253. package/src/components/heading/Heading.tsx +6 -3
  254. package/src/components/heading/index.ts +2 -1
  255. package/src/components/heading/meta.ts +10 -3
  256. package/src/components/heading/resolveHeadingRecipe.test.ts +13 -10
  257. package/src/components/heading/resolveHeadingRecipe.ts +58 -15
  258. package/src/components/heading/types.ts +5 -10
  259. package/src/components/icon-button/IconButton.tsx +4 -4
  260. package/src/components/icon-button/types.ts +3 -3
  261. package/src/components/input/Input.tsx +2 -2
  262. package/src/components/media-card/MediaCard.tsx +2 -2
  263. package/src/components/metric-card/MetricCard.tsx +6 -6
  264. package/src/components/metric-card/types.ts +2 -2
  265. package/src/components/modal/Modal.tsx +1 -1
  266. package/src/components/progress/Progress.tsx +2 -2
  267. package/src/components/progress/types.ts +14 -4
  268. package/src/components/radio/RadioGroup.tsx +6 -6
  269. package/src/components/radio/types.ts +1 -1
  270. package/src/components/rating/Rating.tsx +2 -2
  271. package/src/components/rating/types.ts +14 -4
  272. package/src/components/tabs/Tabs.tsx +11 -7
  273. package/src/components/text/Text.tsx +4 -2
  274. package/src/components/text/index.ts +8 -1
  275. package/src/components/text/meta.ts +11 -4
  276. package/src/components/text/resolveTextRecipe.test.ts +18 -14
  277. package/src/components/text/resolveTextRecipe.ts +42 -15
  278. package/src/components/text/types.ts +5 -10
  279. package/src/components/toolbar/ToolbarAction.tsx +2 -2
  280. package/src/index.ts +26 -2
  281. package/src/internal/colorModel.ts +39 -0
  282. package/src/internal/recipes.test.ts +2 -2
  283. package/src/internal/recipes.ts +18 -18
  284. package/src/metadata/componentMeta.test.ts +36 -0
  285. package/src/metadata/index.ts +4 -0
  286. package/src/metadata/types.ts +27 -0
  287. package/src/patterns/auth/ForgotPasswordForm.tsx +2 -2
  288. package/src/patterns/auth/OtpForm.tsx +2 -2
  289. package/src/patterns/auth/SignInForm.tsx +4 -4
  290. package/src/patterns/auth/SignUpForm.tsx +2 -2
  291. package/src/patterns/chat-list-item/ChatListItem.tsx +7 -6
  292. package/src/patterns/chat-list-item/types.ts +2 -2
  293. package/src/patterns/collection-editor/CollectionEditor.tsx +6 -6
  294. package/src/patterns/confirm-dialog/ConfirmDialog.tsx +4 -4
  295. package/src/patterns/confirm-dialog/types.ts +3 -3
  296. package/src/patterns/disclosure-section/DisclosureSection.tsx +2 -2
  297. package/src/patterns/empty-state/EmptyState.tsx +4 -4
  298. package/src/patterns/empty-state/types.ts +3 -3
  299. package/src/patterns/form-field/FormField.tsx +1 -1
  300. package/src/patterns/hero/Hero.tsx +4 -4
  301. package/src/patterns/hero/types.ts +3 -3
  302. package/src/patterns/image-preview/ImagePreview.tsx +1 -1
  303. package/src/patterns/image-upload-field/ImageUploadField.tsx +8 -8
  304. package/src/patterns/list/ListRow.tsx +2 -2
  305. package/src/patterns/list/meta.ts +19 -0
  306. package/src/patterns/message-bubble/MessageBubble.tsx +10 -6
  307. package/src/patterns/message-bubble/types.ts +2 -2
  308. package/src/patterns/notice/Notice.tsx +2 -2
  309. package/src/patterns/notice/types.ts +2 -2
  310. package/src/patterns/post-card/PostCard.tsx +5 -5
  311. package/src/patterns/post-card/types.ts +2 -2
  312. package/src/patterns/section-header/SectionHeader.tsx +2 -2
  313. package/src/patterns/settings-row/SettingsRow.tsx +1 -1
  314. package/src/patterns/theme-composer/ThemeComposer.tsx +15 -15
  315. package/src/patterns/tile-grid/PaletteItem.tsx +1 -1
  316. package/src/patterns/timeline/Timeline.tsx +15 -5
  317. package/src/patterns/timeline/types.ts +2 -2
  318. package/src/patterns/tree-view/TreeItem.tsx +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"resolveTextRecipe.js","sourceRoot":"","sources":["../../../src/components/text/resolveTextRecipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,GAGlB,MAAM,oBAAoB,CAAC;AAuB5B,SAAS,0BAA0B,CAAC,UAAsB;IACxD,OAAO,UAAU,KAAK,IAAI,IAAI,UAAU,KAAK,IAAI,IAAI,UAAU,KAAK,IAAI,CAAC;AAC3E,CAAC;AAED,SAAS,aAAa,CAAC,KAAmB,EAAE,MAAkB;IAC5D,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,iBAAiB,CAAC,EACzB,KAAK,EACL,OAAO,EACP,MAAM,EACN,MAAM,GAMP;IACC,IA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ACN,KAAK,EACL,MAAM,GAAG,KAAK,GACU;IACxB,MAAM,eAAe,GAAG,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC;IACzE,MAAM,YAAY,GAAG,iBAAiB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,SAAS,CAAC;IACtE,MAAM,aAAa,GAAG,iBAAiB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAC3D,MAAM,MAAM,GAAG,oBAAoB,CAAC,KAAK,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC;IACxE,MAAM,cAAc,GAAG,aAAa,CAClC,KAAK,EACL,iBAAiB,CAAC,MAAM,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,MAAM,CACvD,CAAC;IAEF,OAAO;QACL,KAAK,EAAE,gBAAgB,CAAC,KAAK,EAAE,YAAY,CAAC;QAC5C,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,iBAAiB,CAAC;YAC5B,KAAK;YACL,OAAO,EAAE,eAAe;YACxB,MAAM,EAAE,cAAc;YACtB,MAAM;SACP,CAAC;QACF,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;QACvC,UAAU,EAAE,cAAc;QAC1B,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,SAAS,EAAE,aAAa;QACxB,aAAa,EAAE,MAAM,CAAC,aAAa;KACpC,CAAC;AACJ,CAAC","sourcesContent":["import {\n type Breakpoint,\n type FontWeight,\n resolveResponsive,\n type Responsive,\n type SurfaceTheme,\n} from '@ankhorage/surface';\nimport type { TextStyle } from 'react-native';\n\nimport type { TextAlign, TextTone, TextVariant, TextWeight } from './types';\n\ninterface VariantRecipe {\n fontSize: number;\n lineHeight: number;\n weight: TextWeight;\n textTransform?: TextStyle['textTransform'];\n letterSpacing?: number;\n}\n\ninterface ResolveTextStyleOptions {\n theme: SurfaceTheme;\n breakpoint: Breakpoint;\n variant?: Responsive<TextVariant>;\n tone?: Responsive<TextTone>;\n weight?: Responsive<TextWeight>;\n align?: Responsive<TextAlign>;\n italic?: boolean;\n}\n\nfunction isMediumBreakpointOrLarger(breakpoint: Breakpoint): boolean {\n return breakpoint === 'md' || breakpoint === 'lg' || breakpoint === 'xl';\n}\n\nfunction resolveWeight(theme: SurfaceTheme, weight: TextWeight): FontWeight {\n return theme.typography.weights[weight];\n}\n\nfunction resolveFontFamily({\n theme,\n variant,\n weight,\n italic,\n}: {\n theme: SurfaceTheme;\n variant: TextVariant;\n weight: FontWeight;\n italic: boolean;\n}): string | undefined {\n if (variant === 'code') {\n return 'monospace';\n }\n\n return theme.typography.fonts[italic ? 'italic' : 'normal'][weight];\n}\n\nfunction resolveVariantRecipe(\n theme: SurfaceTheme,\n variant: TextVariant,\n breakpoint: Breakpoint,\n): VariantRecipe {\n switch (variant) {\n case 'lead':\n return {\n fontSize: isMediumBreakpointOrLarger(breakpoint)\n ? theme.typography.sizes.l\n : theme.typography.sizes.m,\n lineHeight: isMediumBreakpointOrLarger(breakpoint) ? 28 : 24,\n weight: 'regular',\n };\n case 'bodySmall':\n return {\n fontSize: theme.typography.sizes.s,\n lineHeight: 20,\n weight: 'regular',\n };\n case 'caption':\n return {\n fontSize: theme.typography.sizes.xs,\n lineHeight: 16,\n weight: 'regular',\n };\n case 'label':\n return {\n fontSize: theme.typography.sizes.s,\n lineHeight: 18,\n weight: 'medium',\n };\n case 'eyebrow':\n return {\n fontSize: theme.typography.sizes.xs,\n lineHeight: 16,\n weight: 'semiBold',\n textTransform: 'uppercase',\n letterSpacing: 0.8,\n };\n case 'code':\n return {\n fontSize: theme.typography.sizes.s,\n lineHeight: 20,\n weight: 'regular',\n };\n case 'body':\n default:\n return {\n fontSize: theme.typography.sizes.m,\n lineHeight: 24,\n weight: 'regular',\n };\n }\n}\n\nfunction resolveToneColor(theme: SurfaceTheme, tone: TextTone): string {\n switch (tone) {\n case 'muted':\n return theme.semantics.content.muted;\n case 'subtle':\n return theme.semantics.content.subtle;\n case 'inverse':\n return theme.semantics.content.inverse;\n case 'primary':\n return theme.semantics.brand.base;\n case 'danger':\n return theme.semantics.danger.base;\n case 'success':\n return theme.semantics.success.base;\n case 'warning':\n return theme.semantics.warning.base;\n case 'default':\n default:\n return theme.semantics.content.default;\n }\n}\n\nexport function resolveTextStyle({\n theme,\n breakpoint,\n variant,\n tone,\n weight,\n align,\n italic = false,\n}: ResolveTextStyleOptions): TextStyle {\n const resolvedVariant = resolveResponsive(variant, breakpoint) ?? 'body';\n const resolvedTone = resolveResponsive(tone, breakpoint) ?? 'default';\n const resolvedAlign = resolveResponsive(align, breakpoint);\n const recipe = resolveVariantRecipe(theme, resolvedVariant, breakpoint);\n const resolvedWeight = resolveWeight(\n theme,\n resolveResponsive(weight, breakpoint) ?? recipe.weight,\n );\n\n return {\n color: resolveToneColor(theme, resolvedTone),\n elevation: 0,\n fontFamily: resolveFontFamily({\n theme,\n variant: resolvedVariant,\n weight: resolvedWeight,\n italic,\n }),\n fontSize: recipe.fontSize,\n fontStyle: italic ? 'italic' : 'normal',\n fontWeight: resolvedWeight,\n letterSpacing: recipe.letterSpacing,\n lineHeight: recipe.lineHeight,\n textAlign: resolvedAlign,\n textTransform: recipe.textTransform,\n };\n}\n"]}
1
+ {"version":3,"file":"resolveTextRecipe.js","sourceRoot":"","sources":["../../../src/components/text/resolveTextRecipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,GAIlB,MAAM,oBAAoB,CAAC;AAwB5B,SAAS,0BAA0B,CAAC,UAAsB;IACxD,OAAO,UAAU,KAAK,IAAI,IAAI,UAAU,KAAK,IAAI,IAAI,UAAU,KAAK,IAAI,CAAC;AAC3E,CAAC;AAED,SAAS,aAAa,CAAC,KAAmB,EAAE,MAAkB;IAC5D,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC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,EAAE,UAAU,CAAC,CAAC;IACxE,MAAM,cAAc,GAAG,aAAa,CAClC,KAAK,EACL,iBAAiB,CAAC,MAAM,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,MAAM,CACvD,CAAC;IAEF,OAAO;QACL,KAAK,EAAE,gBAAgB,CAAC,KAAK,EAAE,gBAAgB,EAAE,aAAa,CAAC;QAC/D,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,iBAAiB,CAAC;YAC5B,KAAK;YACL,OAAO,EAAE,eAAe;YACxB,MAAM,EAAE,cAAc;YACtB,MAAM;SACP,CAAC;QACF,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;QACvC,UAAU,EAAE,cAAc;QAC1B,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,SAAS,EAAE,aAAa;QACxB,aAAa,EAAE,MAAM,CAAC,aAAa;KACpC,CAAC;AACJ,CAAC","sourcesContent":["import {\n type Breakpoint,\n type FontWeight,\n resolveResponsive,\n type Responsive,\n type RoleSemantics,\n type SurfaceTheme,\n} from '@ankhorage/surface';\nimport type { TextStyle } from 'react-native';\n\nimport type { TextAlign, TextColor, TextEmphasis, TextVariant, TextWeight } from './types';\n\ninterface VariantRecipe {\n fontSize: number;\n lineHeight: number;\n weight: TextWeight;\n textTransform?: TextStyle['textTransform'];\n letterSpacing?: number;\n}\n\ninterface ResolveTextStyleOptions {\n theme: SurfaceTheme;\n breakpoint: Breakpoint;\n variant?: Responsive<TextVariant>;\n color?: Responsive<TextColor>;\n emphasis?: Responsive<TextEmphasis>;\n weight?: Responsive<TextWeight>;\n align?: Responsive<TextAlign>;\n italic?: boolean;\n}\n\nfunction isMediumBreakpointOrLarger(breakpoint: Breakpoint): boolean {\n return breakpoint === 'md' || breakpoint === 'lg' || breakpoint === 'xl';\n}\n\nfunction resolveWeight(theme: SurfaceTheme, weight: TextWeight): FontWeight {\n return theme.typography.weights[weight];\n}\n\nfunction resolveFontFamily({\n theme,\n variant,\n weight,\n italic,\n}: {\n theme: SurfaceTheme;\n variant: TextVariant;\n weight: FontWeight;\n italic: boolean;\n}): string | undefined {\n if (variant === 'code') {\n return 'monospace';\n }\n\n return theme.typography.fonts[italic ? 'italic' : 'normal'][weight];\n}\n\nfunction resolveVariantRecipe(\n theme: SurfaceTheme,\n variant: TextVariant,\n breakpoint: Breakpoint,\n): VariantRecipe {\n switch (variant) {\n case 'lead':\n return {\n fontSize: isMediumBreakpointOrLarger(breakpoint)\n ? theme.typography.sizes.l\n : theme.typography.sizes.m,\n lineHeight: isMediumBreakpointOrLarger(breakpoint) ? 28 : 24,\n weight: 'regular',\n };\n case 'bodySmall':\n return {\n fontSize: theme.typography.sizes.s,\n lineHeight: 20,\n weight: 'regular',\n };\n case 'caption':\n return {\n fontSize: theme.typography.sizes.xs,\n lineHeight: 16,\n weight: 'regular',\n };\n case 'label':\n return {\n fontSize: theme.typography.sizes.s,\n lineHeight: 18,\n weight: 'medium',\n };\n case 'eyebrow':\n return {\n fontSize: theme.typography.sizes.xs,\n lineHeight: 16,\n weight: 'semiBold',\n textTransform: 'uppercase',\n letterSpacing: 0.8,\n };\n case 'code':\n return {\n fontSize: theme.typography.sizes.s,\n lineHeight: 20,\n weight: 'regular',\n };\n case 'body':\n default:\n return {\n fontSize: theme.typography.sizes.m,\n lineHeight: 24,\n weight: 'regular',\n };\n }\n}\n\nfunction resolveRoleSemantics(theme: SurfaceTheme, color: TextColor): RoleSemantics {\n switch (color) {\n case 'secondary':\n return theme.semantics.secondary;\n case 'tertiary':\n return theme.semantics.accent;\n case 'quaternary':\n return theme.semantics.highlight;\n case 'neutral':\n return theme.semantics.action.neutral;\n case 'error':\n return theme.semantics.error;\n case 'info':\n return theme.semantics.info;\n case 'danger':\n return theme.semantics.action.danger;\n case 'success':\n return theme.semantics.success;\n case 'warning':\n return theme.semantics.warning;\n case 'primary':\n default:\n return theme.semantics.action.primary;\n }\n}\n\nfunction resolveTextColor(theme: SurfaceTheme, emphasis: TextEmphasis, color?: TextColor): string {\n if (color) {\n const role = resolveRoleSemantics(theme, color);\n return emphasis === 'inverse' ? role.onSolidText : role.base;\n }\n\n switch (emphasis) {\n case 'muted':\n return theme.semantics.content.muted;\n case 'subtle':\n return theme.semantics.content.subtle;\n case 'inverse':\n return theme.semantics.content.inverse;\n case 'default':\n default:\n return theme.semantics.content.default;\n }\n}\n\nexport function resolveTextStyle({\n theme,\n breakpoint,\n variant,\n color,\n emphasis,\n weight,\n align,\n italic = false,\n}: ResolveTextStyleOptions): TextStyle {\n const resolvedVariant = resolveResponsive(variant, breakpoint) ?? 'body';\n const resolvedEmphasis = resolveResponsive(emphasis, breakpoint) ?? 'default';\n const resolvedColor = resolveResponsive(color, breakpoint);\n const resolvedAlign = resolveResponsive(align, breakpoint);\n const recipe = resolveVariantRecipe(theme, resolvedVariant, breakpoint);\n const resolvedWeight = resolveWeight(\n theme,\n resolveResponsive(weight, breakpoint) ?? recipe.weight,\n );\n\n return {\n color: resolveTextColor(theme, resolvedEmphasis, resolvedColor),\n elevation: 0,\n fontFamily: resolveFontFamily({\n theme,\n variant: resolvedVariant,\n weight: resolvedWeight,\n italic,\n }),\n fontSize: recipe.fontSize,\n fontStyle: italic ? 'italic' : 'normal',\n fontWeight: resolvedWeight,\n letterSpacing: recipe.letterSpacing,\n lineHeight: recipe.lineHeight,\n textAlign: resolvedAlign,\n textTransform: recipe.textTransform,\n };\n}\n"]}
@@ -1,9 +1,11 @@
1
1
  import type { Responsive } from '@ankhorage/surface';
2
2
  import type React from 'react';
3
3
  import type { AccessibilityRole, TextStyle } from 'react-native';
4
+ import type { ZoraColor, ZoraEmphasis } from '../../internal/recipes';
4
5
  import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
5
6
  export type TextVariant = 'body' | 'lead' | 'bodySmall' | 'caption' | 'label' | 'eyebrow' | 'code';
6
- export type TextTone = 'default' | 'muted' | 'subtle' | 'inverse' | 'primary' | 'danger' | 'success' | 'warning';
7
+ export type TextColor = ZoraColor;
8
+ export type TextEmphasis = ZoraEmphasis;
7
9
  export type TextWeight = 'regular' | 'medium' | 'semiBold' | 'bold';
8
10
  export type TextAlign = NonNullable<TextStyle['textAlign']>;
9
11
  export interface TextProps extends ZoraBaseProps {
@@ -11,7 +13,8 @@ export interface TextProps extends ZoraBaseProps {
11
13
  text?: string;
12
14
  i18nKey?: string;
13
15
  variant?: Responsive<TextVariant>;
14
- tone?: Responsive<TextTone>;
16
+ color?: Responsive<TextColor>;
17
+ emphasis?: Responsive<TextEmphasis>;
15
18
  align?: Responsive<TextAlign>;
16
19
  weight?: Responsive<TextWeight>;
17
20
  italic?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/text/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEnG,MAAM,MAAM,QAAQ,GAChB,SAAS,GACT,OAAO,GACP,QAAQ,GACR,SAAS,GACT,SAAS,GACT,QAAQ,GACR,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AAEpE,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;AAE5D,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC9C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Y,GAAG,YAAY,CAAC;AAExC,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AAEpE,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;AAE5D,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC9C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;IACpC,KAAK,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAC9B,MAAM,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;IACpD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/text/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Responsive } from '@ankhorage/surface';\nimport type React from 'react';\nimport type { AccessibilityRole, TextStyle } from 'react-native';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport type TextVariant = 'body' | 'lead' | 'bodySmall' | 'caption' | 'label' | 'eyebrow' | 'code';\n\nexport type TextTone =\n | 'default'\n | 'muted'\n | 'subtle'\n | 'inverse'\n | 'primary'\n | 'danger'\n | 'success'\n | 'warning';\n\nexport type TextWeight = 'regular' | 'medium' | 'semiBold' | 'bold';\n\nexport type TextAlign = NonNullable<TextStyle['textAlign']>;\n\nexport interface TextProps extends ZoraBaseProps {\n children?: React.ReactNode;\n text?: string;\n i18nKey?: string;\n variant?: Responsive<TextVariant>;\n tone?: Responsive<TextTone>;\n align?: Responsive<TextAlign>;\n weight?: Responsive<TextWeight>;\n italic?: boolean;\n numberOfLines?: number;\n ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip';\n selectable?: boolean;\n accessibilityLabel?: string;\n accessibilityHint?: string;\n accessibilityRole?: AccessibilityRole;\n nativeID?: string;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/text/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Responsive } from '@ankhorage/surface';\nimport type React from 'react';\nimport type { AccessibilityRole, TextStyle } from 'react-native';\n\nimport type { ZoraColor, ZoraEmphasis } from '../../internal/recipes';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport type TextVariant = 'body' | 'lead' | 'bodySmall' | 'caption' | 'label' | 'eyebrow' | 'code';\n\nexport type TextColor = ZoraColor;\nexport type TextEmphasis = ZoraEmphasis;\n\nexport type TextWeight = 'regular' | 'medium' | 'semiBold' | 'bold';\n\nexport type TextAlign = NonNullable<TextStyle['textAlign']>;\n\nexport interface TextProps extends ZoraBaseProps {\n children?: React.ReactNode;\n text?: string;\n i18nKey?: string;\n variant?: Responsive<TextVariant>;\n color?: Responsive<TextColor>;\n emphasis?: Responsive<TextEmphasis>;\n align?: Responsive<TextAlign>;\n weight?: Responsive<TextWeight>;\n italic?: boolean;\n numberOfLines?: number;\n ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip';\n selectable?: boolean;\n accessibilityLabel?: string;\n accessibilityHint?: string;\n accessibilityRole?: AccessibilityRole;\n nativeID?: string;\n}\n"]}
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
3
3
  import { IconButton } from '../icon-button';
4
4
  function ToolbarActionInner({ themeId: _themeId, mode: _mode, active, ...props }) {
5
- return (<IconButton {...props} emphasis={active ? 'soft' : 'ghost'} tone={active ? 'primary' : 'neutral'} size="m"/>);
5
+ return (<IconButton {...props} variant={active ? 'soft' : 'ghost'} color={active ? 'primary' : 'neutral'} size="m"/>);
6
6
  }
7
7
  export const ToolbarAction = withZoraThemeScope(ToolbarActionInner);
8
8
  //# sourceMappingURL=ToolbarAction.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToolbarAction.js","sourceRoot":"","sources":["../../../src/components/toolbar/ToolbarAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5C,SAAS,kBAAkB,CAAC,EAC1B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,MAAM,EACN,GAAG,KAAK,EACW;IACnB,OAAO,CACL,CAAC,UAAU,CACT,IAAI,KAAK,CAAC,CACV,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CACpC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CACrC,IAAI,CAAC,GAAG,EACR,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { IconButton } from '../icon-button';\nimport type { ToolbarActionProps } from './types';\n\nfunction ToolbarActionInner({\n themeId: _themeId,\n mode: _mode,\n active,\n ...props\n}: ToolbarActionProps) {\n return (\n <IconButton\n {...props}\n emphasis={active ? 'soft' : 'ghost'}\n tone={active ? 'primary' : 'neutral'}\n size=\"m\"\n />\n );\n}\n\nexport const ToolbarAction = withZoraThemeScope(ToolbarActionInner);\n"]}
1
+ {"version":3,"file":"ToolbarAction.js","sourceRoot":"","sources":["../../../src/components/toolbar/ToolbarAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5C,SAAS,kBAAkB,CAAC,EAC1B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,MAAM,EACN,GAAG,KAAK,EACW;IACnB,OAAO,CACL,CAAC,UAAU,CACT,IAAI,KAAK,CAAC,CACV,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CACnC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CACtC,IAAI,CAAC,GAAG,EACR,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { IconButton } from '../icon-button';\nimport type { ToolbarActionProps } from './types';\n\nfunction ToolbarActionInner({\n themeId: _themeId,\n mode: _mode,\n active,\n ...props\n}: ToolbarActionProps) {\n return (\n <IconButton\n {...props}\n variant={active ? 'soft' : 'ghost'}\n color={active ? 'primary' : 'neutral'}\n size=\"m\"\n />\n );\n}\n\nexport const ToolbarAction = withZoraThemeScope(ToolbarActionInner);\n"]}
package/dist/index.d.ts CHANGED
@@ -20,7 +20,7 @@ export type { DrawerProps } from './components/drawer';
20
20
  export { Drawer } from './components/drawer';
21
21
  export type { FormActionsProps, FormErrorProps, FormErrors, FormFieldConfig, FormFieldControlProps, FormFieldInputType, FormFieldProps, FormFieldValue, FormProps, FormValidationErrors, FormValidationResult, FormValues, UseFormControllerOptions, UseFormControllerResult, ValidationRule, } from './components/form';
22
22
  export { Form, FormActions, FormError, FormField, hasRequiredRule, useFormController, validateField, validateFields, validateValue, } from './components/form';
23
- export type { HeadingAlign, HeadingLevel, HeadingProps, HeadingSize, HeadingTone, HeadingWeight, } from './components/heading';
23
+ export type { HeadingAlign, HeadingColor, HeadingEmphasis, HeadingLevel, HeadingProps, HeadingSize, HeadingWeight, } from './components/heading';
24
24
  export { Heading } from './components/heading';
25
25
  export type { IconProps } from './components/icon';
26
26
  export { Icon } from './components/icon';
@@ -52,7 +52,7 @@ export type { SelectOption, SelectProps } from './components/select';
52
52
  export { Select } from './components/select';
53
53
  export type { TabItem, TabsProps, TabsVariant } from './components/tabs';
54
54
  export { Tabs } from './components/tabs';
55
- export type { TextAlign, TextProps, TextTone, TextVariant, TextWeight } from './components/text';
55
+ export type { TextAlign, TextColor, TextEmphasis, TextProps, TextVariant, TextWeight, } from './components/text';
56
56
  export { Text } from './components/text';
57
57
  export type { TextareaProps } from './components/textarea';
58
58
  export { Textarea } from './components/textarea';
@@ -60,6 +60,8 @@ export type { ToolbarActionProps, ToolbarPosition, ToolbarProps } from './compon
60
60
  export { Toolbar, ToolbarAction } from './components/toolbar';
61
61
  export type { BoxProps, CenterProps, ContainerProps, DividerProps, GridProps, InlineProps, ShowProps, SpacerProps, StackProps, SurfaceProps, SurfaceVariant, } from './foundation';
62
62
  export { Box, Center, Container, Divider, Grid, Inline, Show, Spacer, Stack, Surface, } from './foundation';
63
+ export type { ZoraColor, ZoraEmphasis, ZoraPaletteColor, ZoraStatusColor, } from './internal/colorModel';
64
+ export { ZORA_COLORS, ZORA_EMPHASES, ZORA_PALETTE_COLORS, ZORA_STATUS_COLORS, } from './internal/colorModel';
63
65
  export type { AppShellProps } from './layout/app-shell';
64
66
  export { AppShell } from './layout/app-shell';
65
67
  export type { AuthLayoutProps } from './layout/auth-layout';
@@ -74,7 +76,7 @@ export type { SidebarLayoutProps } from './layout/sidebar-layout';
74
76
  export { SidebarLayout } from './layout/sidebar-layout';
75
77
  export type { TopbarLayoutProps } from './layout/topbar-layout';
76
78
  export { TopbarLayout } from './layout/topbar-layout';
77
- export type { ZoraComponentBlueprint, ZoraComponentCategory, ZoraComponentI18nMeta, ZoraComponentMeta, ZoraComponentMetaRegistry, ZoraComponentPropArrayItemSchema, ZoraComponentPropSchema, ZoraComponentPropType, ZoraComponentPropValue, ZoraComponentSlotMeta, } from './metadata';
79
+ export type { ZoraComponentBlueprint, ZoraComponentCategory, ZoraComponentEventMeta, ZoraComponentEventPayloadFieldMeta, ZoraComponentEventPayloadFieldType, ZoraComponentEventPayloadKind, ZoraComponentI18nMeta, ZoraComponentMeta, ZoraComponentMetaRegistry, ZoraComponentPropArrayItemSchema, ZoraComponentPropSchema, ZoraComponentPropType, ZoraComponentPropValue, ZoraComponentSlotMeta, } from './metadata';
78
80
  export { ZORA_COMPONENT_META } from './metadata';
79
81
  export type { AuthFormBaseProps, AuthIdentifierKind, ForgotPasswordFormProps, ForgotPasswordFormValues, OtpFormProps, OtpFormValues, SignInFormProps, SignInFormValues, SignUpFormField, SignUpFormProps, SignUpFormValues, } from './patterns/auth';
80
82
  export { ForgotPasswordForm, OtpForm, SignInForm, SignUpForm } from './patterns/auth';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;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yBAAyB,CAAC;AACrD,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -29,6 +29,7 @@ export { Text } from './components/text';
29
29
  export { Textarea } from './components/textarea';
30
30
  export { Toolbar, ToolbarAction } from './components/toolbar';
31
31
  export { Box, Center, Container, Divider, Grid, Inline, Show, Spacer, Stack, Surface, } from './foundation';
32
+ export { ZORA_COLORS, ZORA_EMPHASES, ZORA_PALETTE_COLORS, ZORA_STATUS_COLORS, } from './internal/colorModel';
32
33
  export { AppShell } from './layout/app-shell';
33
34
  export { AuthLayout } from './layout/auth-layout';
34
35
  export { Screen } from './layout/screen';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAkB7C,OAAO,EACL,IAAI,EACJ,WAAW,EACX,SAAS,EACT,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,aAAa,GACd,MAAM,mBAAmB,CAAC;AAS3B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE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aAAa,EAAE,MAAM,2BAA2B,CAAC;AAS1D,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEvF,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,cAAc,SAAS,CAAC","sourcesContent":["export type { AppBarMode, AppBarOverflowAction, AppBarProps } from './components/app-bar';\nexport { AppBar } from './components/app-bar';\nexport type { AvatarProps, AvatarShape, AvatarSize } from './components/avatar';\nexport { Avatar, resolveAvatarInitials } from './components/avatar';\nexport type { AvatarGroupItem, AvatarGroupProps } from './components/avatar-group';\nexport { AvatarGroup } from './components/avatar-group';\nexport type { BadgeProps } from './components/badge';\nexport { Badge } from './components/badge';\nexport type { ButtonProps } from './components/button';\nexport { Button } from './components/button';\nexport type { CardProps } from './components/card';\nexport { Card } from './components/card';\nexport type { CheckboxGroupOption, CheckboxGroupProps, CheckboxProps } from './components/checkbox';\nexport { Checkbox, CheckboxGroup } from './components/checkbox';\nexport type { ChipProps } from './components/chip';\nexport { Chip } from './components/chip';\nexport type { ChipGroupItem, ChipGroupProps } from './components/chip-group';\nexport { ChipGroup } from './components/chip-group';\nexport type { DrawerProps } from './components/drawer';\nexport { Drawer } from './components/drawer';\nexport type {\n FormActionsProps,\n FormErrorProps,\n FormErrors,\n FormFieldConfig,\n FormFieldControlProps,\n FormFieldInputType,\n FormFieldProps,\n FormFieldValue,\n FormProps,\n FormValidationErrors,\n FormValidationResult,\n FormValues,\n UseFormControllerOptions,\n UseFormControllerResult,\n ValidationRule,\n} from './components/form';\nexport {\n Form,\n FormActions,\n FormError,\n FormField,\n hasRequiredRule,\n useFormController,\n validateField,\n validateFields,\n validateValue,\n} from './components/form';\nexport type {\n HeadingAlign,\n HeadingLevel,\n HeadingProps,\n HeadingSize,\n HeadingTone,\n HeadingWeight,\n} from './components/heading';\nexport { Heading } from './components/heading';\nexport type { IconProps } from './components/icon';\nexport { Icon } from './components/icon';\nexport type { IconButtonProps } from './components/icon-button';\nexport { IconButton } from './components/icon-button';\nexport type { ImageFit, ImageProps, SurfaceImageSource } from './components/image';\nexport { Image } from './components/image';\nexport type { InputProps, InputTrailingAction } from './components/input';\nexport { Input } from './components/input';\nexport type { MediaCardImageProps, MediaCardProps } from './components/media-card';\nexport { MediaCard } from './components/media-card';\nexport type { MetricCardProps } from './components/metric-card';\nexport { MetricCard } from './components/metric-card';\nexport type { ModalProps } from './components/modal';\nexport { Modal } from './components/modal';\nexport type {\n NavigationItemProps,\n ZoraNavigationRouteMetadata,\n ZoraNavigationRouteState,\n} from './components/navigation-item';\nexport { NavigationItem } from './components/navigation-item';\nexport type { NavigationListProps, ZoraNavigationRouteMap } from './components/navigation-list';\nexport { NavigationList } from './components/navigation-list';\nexport type { ProgressProps } from './components/progress';\nexport { Progress } from './components/progress';\nexport type { RadioGroupOption, RadioGroupProps, RadioProps } from './components/radio';\nexport { Radio, RadioGroup } from './components/radio';\nexport type { RatingProps } from './components/rating';\nexport { Rating } from './components/rating';\nexport type { SearchBarProps } from './components/search-bar';\nexport { SearchBar } from './components/search-bar';\nexport type { SelectOption, SelectProps } from './components/select';\nexport { Select } from './components/select';\nexport type { TabItem, TabsProps, TabsVariant } from './components/tabs';\nexport { Tabs } from './components/tabs';\nexport type { TextAlign, TextProps, TextTone, TextVariant, TextWeight } from './components/text';\nexport { Text } from './components/text';\nexport type { TextareaProps } from './components/textarea';\nexport { Textarea } from './components/textarea';\nexport type { ToolbarActionProps, ToolbarPosition, ToolbarProps } from './components/toolbar';\nexport { Toolbar, ToolbarAction } from './components/toolbar';\nexport type {\n BoxProps,\n CenterProps,\n ContainerProps,\n DividerProps,\n GridProps,\n InlineProps,\n ShowProps,\n SpacerProps,\n StackProps,\n SurfaceProps,\n SurfaceVariant,\n} from './foundation';\nexport {\n Box,\n Center,\n Container,\n Divider,\n Grid,\n Inline,\n Show,\n Spacer,\n Stack,\n Surface,\n} from './foundation';\nexport type { AppShellProps } from './layout/app-shell';\nexport { AppShell } from './layout/app-shell';\nexport type { AuthLayoutProps } from './layout/auth-layout';\nexport { AuthLayout } from './layout/auth-layout';\nexport type { ScreenProps } from './layout/screen';\nexport { Screen } from './layout/screen';\nexport type { ScreenSectionProps } from './layout/screen-section';\nexport { ScreenSection } from './layout/screen-section';\nexport type { SettingsLayoutProps } from './layout/settings-layout';\nexport { SettingsLayout } from './layout/settings-layout';\nexport type { SidebarLayoutProps } from './layout/sidebar-layout';\nexport { SidebarLayout } from './layout/sidebar-layout';\nexport type { TopbarLayoutProps } from './layout/topbar-layout';\nexport { TopbarLayout } from './layout/topbar-layout';\nexport type {\n ZoraComponentBlueprint,\n ZoraComponentCategory,\n ZoraComponentI18nMeta,\n ZoraComponentMeta,\n ZoraComponentMetaRegistry,\n ZoraComponentPropArrayItemSchema,\n ZoraComponentPropSchema,\n ZoraComponentPropType,\n ZoraComponentPropValue,\n ZoraComponentSlotMeta,\n} from './metadata';\nexport { ZORA_COMPONENT_META } from './metadata';\nexport type {\n AuthFormBaseProps,\n AuthIdentifierKind,\n ForgotPasswordFormProps,\n ForgotPasswordFormValues,\n OtpFormProps,\n OtpFormValues,\n SignInFormProps,\n SignInFormValues,\n SignUpFormField,\n SignUpFormProps,\n SignUpFormValues,\n} from './patterns/auth';\nexport { ForgotPasswordForm, OtpForm, SignInForm, SignUpForm } from './patterns/auth';\nexport type { ChatListAvatar, ChatListItemProps } from './patterns/chat-list-item';\nexport { ChatListItem } from './patterns/chat-list-item';\nexport type {\n CollectionEditorProps,\n CollectionEditorRenderItemProps,\n} from './patterns/collection-editor';\nexport { CollectionEditor } from './patterns/collection-editor';\nexport type { ConfirmDialogProps } from './patterns/confirm-dialog';\nexport { ConfirmDialog } from './patterns/confirm-dialog';\nexport type { DisclosureSectionProps } from './patterns/disclosure-section';\nexport { DisclosureSection } from './patterns/disclosure-section';\nexport type { EmptyStateAction, EmptyStateProps } from './patterns/empty-state';\nexport { EmptyState } from './patterns/empty-state';\nexport type { FilterBarProps } from './patterns/filter-bar';\nexport { FilterBar } from './patterns/filter-bar';\nexport type { HeroAction, HeroAlign, HeroLayout, HeroProps, HeroTone } from './patterns/hero';\nexport { Hero } from './patterns/hero';\nexport type {\n ImagePreviewProps,\n ZoraImageAsset,\n ZoraImageMetadata,\n} from './patterns/image-preview';\nexport { ImagePreview } from './patterns/image-preview';\nexport type {\n ImageUploadFieldProps,\n ImageUploadProgressContext,\n ZoraPickedImage,\n} from './patterns/image-upload-field';\nexport { ImageUploadField } from './patterns/image-upload-field';\nexport type { InspectorFieldProps } from './patterns/inspector-field';\nexport { InspectorField } from './patterns/inspector-field';\nexport type {\n ListChildrenProps,\n ListItemsProps,\n ListProps,\n ListRowProps,\n ListRowVariant,\n ListSectionProps,\n} from './patterns/list';\nexport { List, ListRow, ListSection } from './patterns/list';\nexport type {\n MessageBubbleAuthor,\n MessageBubbleAvatar,\n MessageBubbleDirection,\n MessageBubbleProps,\n MessageBubbleStatus,\n} from './patterns/message-bubble';\nexport { MessageBubble } from './patterns/message-bubble';\nexport type { NoticeProps } from './patterns/notice';\nexport { Notice } from './patterns/notice';\nexport type { PanelProps } from './patterns/panel';\nexport { Panel } from './patterns/panel';\nexport type {\n PostAction,\n PostAuthor,\n PostAuthorAvatar,\n PostCardMedia,\n PostCardProps,\n PostCommentPreview,\n} from './patterns/post-card';\nexport { PostCard } from './patterns/post-card';\nexport type {\n ResponsivePanelDesktopMode,\n ResponsivePanelMobileMode,\n ResponsivePanelProps,\n ResponsivePanelSide,\n} from './patterns/responsive-panel';\nexport { ResponsivePanel } from './patterns/responsive-panel';\nexport type { SectionHeaderProps } from './patterns/section-header';\nexport { SectionHeader } from './patterns/section-header';\nexport type {\n SelectableItemProps,\n SelectableItemState,\n SelectionMode,\n SelectionProviderProps,\n SelectionTrigger,\n UseSelectionResult,\n} from './patterns/selection';\nexport { SelectableItem, SelectionProvider, useSelection } from './patterns/selection';\nexport type { SettingsRowProps } from './patterns/settings-row';\nexport { SettingsRow } from './patterns/settings-row';\nexport type { SwitchFieldProps } from './patterns/switch-field';\nexport { SwitchField } from './patterns/switch-field';\nexport type { ThemeComposerProps } from './patterns/theme-composer';\nexport { ThemeComposer } from './patterns/theme-composer';\nexport type { PaletteItemProps, TileGridProps } from './patterns/tile-grid';\nexport { PaletteItem, TileGrid } from './patterns/tile-grid';\nexport type { TimelineItem, TimelineProps } from './patterns/timeline';\nexport { Timeline } from './patterns/timeline';\nexport type { TreeItemNode, TreeItemRenderProps, TreeViewProps } from './patterns/tree-view';\nexport { TreeItem, TreeView } from './patterns/tree-view';\nexport type { ZoraDrawerContentProps } from './patterns/zora-drawer-content';\nexport { ZoraDrawerContent } from './patterns/zora-drawer-content';\nexport type { ZoraTabBarProps } from './patterns/zora-tab-bar';\nexport { ZoraTabBar } from './patterns/zora-tab-bar';\nexport * from './theme';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;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nexport type { AvatarProps, AvatarShape, AvatarSize } from './components/avatar';\nexport { Avatar, resolveAvatarInitials } from './components/avatar';\nexport type { AvatarGroupItem, AvatarGroupProps } from './components/avatar-group';\nexport { AvatarGroup } from './components/avatar-group';\nexport type { BadgeProps } from './components/badge';\nexport { Badge } from './components/badge';\nexport type { ButtonProps } from './components/button';\nexport { Button } from './components/button';\nexport type { CardProps } from './components/card';\nexport { Card } from './components/card';\nexport type { CheckboxGroupOption, CheckboxGroupProps, CheckboxProps } from './components/checkbox';\nexport { Checkbox, CheckboxGroup } from './components/checkbox';\nexport type { ChipProps } from './components/chip';\nexport { Chip } from './components/chip';\nexport type { ChipGroupItem, ChipGroupProps } from './components/chip-group';\nexport { ChipGroup } from './components/chip-group';\nexport type { DrawerProps } from './components/drawer';\nexport { Drawer } from './components/drawer';\nexport type {\n FormActionsProps,\n FormErrorProps,\n FormErrors,\n FormFieldConfig,\n FormFieldControlProps,\n FormFieldInputType,\n FormFieldProps,\n FormFieldValue,\n FormProps,\n FormValidationErrors,\n FormValidationResult,\n FormValues,\n UseFormControllerOptions,\n UseFormControllerResult,\n ValidationRule,\n} from './components/form';\nexport {\n Form,\n FormActions,\n FormError,\n FormField,\n hasRequiredRule,\n useFormController,\n validateField,\n validateFields,\n validateValue,\n} from './components/form';\nexport type {\n HeadingAlign,\n HeadingColor,\n HeadingEmphasis,\n HeadingLevel,\n HeadingProps,\n HeadingSize,\n HeadingWeight,\n} from './components/heading';\nexport { Heading } from './components/heading';\nexport type { IconProps } from './components/icon';\nexport { Icon } from './components/icon';\nexport type { IconButtonProps } from './components/icon-button';\nexport { IconButton } from './components/icon-button';\nexport type { ImageFit, ImageProps, SurfaceImageSource } from './components/image';\nexport { Image } from './components/image';\nexport type { InputProps, InputTrailingAction } from './components/input';\nexport { Input } from './components/input';\nexport type { MediaCardImageProps, MediaCardProps } from './components/media-card';\nexport { MediaCard } from './components/media-card';\nexport type { MetricCardProps } from './components/metric-card';\nexport { MetricCard } from './components/metric-card';\nexport type { ModalProps } from './components/modal';\nexport { Modal } from './components/modal';\nexport type {\n NavigationItemProps,\n ZoraNavigationRouteMetadata,\n ZoraNavigationRouteState,\n} from './components/navigation-item';\nexport { NavigationItem } from './components/navigation-item';\nexport type { NavigationListProps, ZoraNavigationRouteMap } from './components/navigation-list';\nexport { NavigationList } from './components/navigation-list';\nexport type { ProgressProps } from './components/progress';\nexport { Progress } from './components/progress';\nexport type { RadioGroupOption, RadioGroupProps, RadioProps } from './components/radio';\nexport { Radio, RadioGroup } from './components/radio';\nexport type { RatingProps } from './components/rating';\nexport { Rating } from './components/rating';\nexport type { SearchBarProps } from './components/search-bar';\nexport { SearchBar } from './components/search-bar';\nexport type { SelectOption, SelectProps } from './components/select';\nexport { Select } from './components/select';\nexport type { TabItem, TabsProps, TabsVariant } from './components/tabs';\nexport { Tabs } from './components/tabs';\nexport type {\n TextAlign,\n TextColor,\n TextEmphasis,\n TextProps,\n TextVariant,\n TextWeight,\n} from './components/text';\nexport { Text } from './components/text';\nexport type { TextareaProps } from './components/textarea';\nexport { Textarea } from './components/textarea';\nexport type { ToolbarActionProps, ToolbarPosition, ToolbarProps } from './components/toolbar';\nexport { Toolbar, ToolbarAction } from './components/toolbar';\nexport type {\n BoxProps,\n CenterProps,\n ContainerProps,\n DividerProps,\n GridProps,\n InlineProps,\n ShowProps,\n SpacerProps,\n StackProps,\n SurfaceProps,\n SurfaceVariant,\n} from './foundation';\nexport {\n Box,\n Center,\n Container,\n Divider,\n Grid,\n Inline,\n Show,\n Spacer,\n Stack,\n Surface,\n} from './foundation';\nexport type {\n ZoraColor,\n ZoraEmphasis,\n ZoraPaletteColor,\n ZoraStatusColor,\n} from './internal/colorModel';\nexport {\n ZORA_COLORS,\n ZORA_EMPHASES,\n ZORA_PALETTE_COLORS,\n ZORA_STATUS_COLORS,\n} from './internal/colorModel';\nexport type { AppShellProps } from './layout/app-shell';\nexport { AppShell } from './layout/app-shell';\nexport type { AuthLayoutProps } from './layout/auth-layout';\nexport { AuthLayout } from './layout/auth-layout';\nexport type { ScreenProps } from './layout/screen';\nexport { Screen } from './layout/screen';\nexport type { ScreenSectionProps } from './layout/screen-section';\nexport { ScreenSection } from './layout/screen-section';\nexport type { SettingsLayoutProps } from './layout/settings-layout';\nexport { SettingsLayout } from './layout/settings-layout';\nexport type { SidebarLayoutProps } from './layout/sidebar-layout';\nexport { SidebarLayout } from './layout/sidebar-layout';\nexport type { TopbarLayoutProps } from './layout/topbar-layout';\nexport { TopbarLayout } from './layout/topbar-layout';\nexport type {\n ZoraComponentBlueprint,\n ZoraComponentCategory,\n ZoraComponentEventMeta,\n ZoraComponentEventPayloadFieldMeta,\n ZoraComponentEventPayloadFieldType,\n ZoraComponentEventPayloadKind,\n ZoraComponentI18nMeta,\n ZoraComponentMeta,\n ZoraComponentMetaRegistry,\n ZoraComponentPropArrayItemSchema,\n ZoraComponentPropSchema,\n ZoraComponentPropType,\n ZoraComponentPropValue,\n ZoraComponentSlotMeta,\n} from './metadata';\nexport { ZORA_COMPONENT_META } from './metadata';\nexport type {\n AuthFormBaseProps,\n AuthIdentifierKind,\n ForgotPasswordFormProps,\n ForgotPasswordFormValues,\n OtpFormProps,\n OtpFormValues,\n SignInFormProps,\n SignInFormValues,\n SignUpFormField,\n SignUpFormProps,\n SignUpFormValues,\n} from './patterns/auth';\nexport { ForgotPasswordForm, OtpForm, SignInForm, SignUpForm } from './patterns/auth';\nexport type { ChatListAvatar, ChatListItemProps } from './patterns/chat-list-item';\nexport { ChatListItem } from './patterns/chat-list-item';\nexport type {\n CollectionEditorProps,\n CollectionEditorRenderItemProps,\n} from './patterns/collection-editor';\nexport { CollectionEditor } from './patterns/collection-editor';\nexport type { ConfirmDialogProps } from './patterns/confirm-dialog';\nexport { ConfirmDialog } from './patterns/confirm-dialog';\nexport type { DisclosureSectionProps } from './patterns/disclosure-section';\nexport { DisclosureSection } from './patterns/disclosure-section';\nexport type { EmptyStateAction, EmptyStateProps } from './patterns/empty-state';\nexport { EmptyState } from './patterns/empty-state';\nexport type { FilterBarProps } from './patterns/filter-bar';\nexport { FilterBar } from './patterns/filter-bar';\nexport type { HeroAction, HeroAlign, HeroLayout, HeroProps, HeroTone } from './patterns/hero';\nexport { Hero } from './patterns/hero';\nexport type {\n ImagePreviewProps,\n ZoraImageAsset,\n ZoraImageMetadata,\n} from './patterns/image-preview';\nexport { ImagePreview } from './patterns/image-preview';\nexport type {\n ImageUploadFieldProps,\n ImageUploadProgressContext,\n ZoraPickedImage,\n} from './patterns/image-upload-field';\nexport { ImageUploadField } from './patterns/image-upload-field';\nexport type { InspectorFieldProps } from './patterns/inspector-field';\nexport { InspectorField } from './patterns/inspector-field';\nexport type {\n ListChildrenProps,\n ListItemsProps,\n ListProps,\n ListRowProps,\n ListRowVariant,\n ListSectionProps,\n} from './patterns/list';\nexport { List, ListRow, ListSection } from './patterns/list';\nexport type {\n MessageBubbleAuthor,\n MessageBubbleAvatar,\n MessageBubbleDirection,\n MessageBubbleProps,\n MessageBubbleStatus,\n} from './patterns/message-bubble';\nexport { MessageBubble } from './patterns/message-bubble';\nexport type { NoticeProps } from './patterns/notice';\nexport { Notice } from './patterns/notice';\nexport type { PanelProps } from './patterns/panel';\nexport { Panel } from './patterns/panel';\nexport type {\n PostAction,\n PostAuthor,\n PostAuthorAvatar,\n PostCardMedia,\n PostCardProps,\n PostCommentPreview,\n} from './patterns/post-card';\nexport { PostCard } from './patterns/post-card';\nexport type {\n ResponsivePanelDesktopMode,\n ResponsivePanelMobileMode,\n ResponsivePanelProps,\n ResponsivePanelSide,\n} from './patterns/responsive-panel';\nexport { ResponsivePanel } from './patterns/responsive-panel';\nexport type { SectionHeaderProps } from './patterns/section-header';\nexport { SectionHeader } from './patterns/section-header';\nexport type {\n SelectableItemProps,\n SelectableItemState,\n SelectionMode,\n SelectionProviderProps,\n SelectionTrigger,\n UseSelectionResult,\n} from './patterns/selection';\nexport { SelectableItem, SelectionProvider, useSelection } from './patterns/selection';\nexport type { SettingsRowProps } from './patterns/settings-row';\nexport { SettingsRow } from './patterns/settings-row';\nexport type { SwitchFieldProps } from './patterns/switch-field';\nexport { SwitchField } from './patterns/switch-field';\nexport type { ThemeComposerProps } from './patterns/theme-composer';\nexport { ThemeComposer } from './patterns/theme-composer';\nexport type { PaletteItemProps, TileGridProps } from './patterns/tile-grid';\nexport { PaletteItem, TileGrid } from './patterns/tile-grid';\nexport type { TimelineItem, TimelineProps } from './patterns/timeline';\nexport { Timeline } from './patterns/timeline';\nexport type { TreeItemNode, TreeItemRenderProps, TreeViewProps } from './patterns/tree-view';\nexport { TreeItem, TreeView } from './patterns/tree-view';\nexport type { ZoraDrawerContentProps } from './patterns/zora-drawer-content';\nexport { ZoraDrawerContent } from './patterns/zora-drawer-content';\nexport type { ZoraTabBarProps } from './patterns/zora-tab-bar';\nexport { ZoraTabBar } from './patterns/zora-tab-bar';\nexport * from './theme';\n"]}
@@ -0,0 +1,10 @@
1
+ import type { SurfaceColor, SurfaceEmphasis, SurfacePaletteColor, SurfaceStatusColor } from '@ankhorage/surface';
2
+ export type ZoraPaletteColor = SurfacePaletteColor;
3
+ export type ZoraStatusColor = SurfaceStatusColor;
4
+ export type ZoraColor = SurfaceColor;
5
+ export type ZoraEmphasis = SurfaceEmphasis;
6
+ export declare const ZORA_PALETTE_COLORS: readonly ["primary", "secondary", "tertiary", "quaternary", "neutral"];
7
+ export declare const ZORA_STATUS_COLORS: readonly ["success", "warning", "error", "info"];
8
+ export declare const ZORA_COLORS: readonly ["primary", "secondary", "tertiary", "quaternary", "neutral", "success", "warning", "error", "info", "danger"];
9
+ export declare const ZORA_EMPHASES: readonly ["default", "muted", "subtle", "inverse"];
10
+ //# sourceMappingURL=colorModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colorModel.d.ts","sourceRoot":"","sources":["../../src/internal/colorModel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AACnD,MAAM,MAAM,eAAe,GAAG,kBAAkB,CAAC;AACjD,MAAM,MAAM,SAAS,GAAG,YAAY,CAAC;AACrC,MAAM,MAAM,YAAY,GAAG,eAAe,CAAC;AAE3C,eAAO,MAAM,mBAAmB,wEAMmB,CAAC;AAEpD,eAAO,MAAM,kBAAkB,kDAKmB,CAAC;AAEnD,eAAO,MAAM,WAAW,yHAIoB,CAAC;AAE7C,eAAO,MAAM,aAAa,oDAKqB,CAAC"}
@@ -0,0 +1,25 @@
1
+ export const ZORA_PALETTE_COLORS = [
2
+ 'primary',
3
+ 'secondary',
4
+ 'tertiary',
5
+ 'quaternary',
6
+ 'neutral',
7
+ ];
8
+ export const ZORA_STATUS_COLORS = [
9
+ 'success',
10
+ 'warning',
11
+ 'error',
12
+ 'info',
13
+ ];
14
+ export const ZORA_COLORS = [
15
+ ...ZORA_PALETTE_COLORS,
16
+ ...ZORA_STATUS_COLORS,
17
+ 'danger',
18
+ ];
19
+ export const ZORA_EMPHASES = [
20
+ 'default',
21
+ 'muted',
22
+ 'subtle',
23
+ 'inverse',
24
+ ];
25
+ //# sourceMappingURL=colorModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colorModel.js","sourceRoot":"","sources":["../../src/internal/colorModel.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,SAAS;IACT,WAAW;IACX,UAAU;IACV,YAAY;IACZ,SAAS;CACwC,CAAC;AAEpD,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,SAAS;IACT,SAAS;IACT,OAAO;IACP,MAAM;CAC0C,CAAC;AAEnD,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,GAAG,mBAAmB;IACtB,GAAG,kBAAkB;IACrB,QAAQ;CACkC,CAAC;AAE7C,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,SAAS;IACT,OAAO;IACP,QAAQ;IACR,SAAS;CACoC,CAAC","sourcesContent":["import type {\n SurfaceColor,\n SurfaceEmphasis,\n SurfacePaletteColor,\n SurfaceStatusColor,\n} from '@ankhorage/surface';\n\nexport type ZoraPaletteColor = SurfacePaletteColor;\nexport type ZoraStatusColor = SurfaceStatusColor;\nexport type ZoraColor = SurfaceColor;\nexport type ZoraEmphasis = SurfaceEmphasis;\n\nexport const ZORA_PALETTE_COLORS = [\n 'primary',\n 'secondary',\n 'tertiary',\n 'quaternary',\n 'neutral',\n] as const satisfies readonly SurfacePaletteColor[];\n\nexport const ZORA_STATUS_COLORS = [\n 'success',\n 'warning',\n 'error',\n 'info',\n] as const satisfies readonly SurfaceStatusColor[];\n\nexport const ZORA_COLORS = [\n ...ZORA_PALETTE_COLORS,\n ...ZORA_STATUS_COLORS,\n 'danger',\n] as const satisfies readonly SurfaceColor[];\n\nexport const ZORA_EMPHASES = [\n 'default',\n 'muted',\n 'subtle',\n 'inverse',\n] as const satisfies readonly SurfaceEmphasis[];\n"]}
@@ -1,20 +1,21 @@
1
1
  import type { BadgeProps as SurfaceBadgeProps, ButtonProps as SurfaceButtonProps, CardProps as SurfaceCardProps } from '@ankhorage/surface';
2
- export type ZoraTone = NonNullable<SurfaceButtonProps['tone']>;
3
- export type ZoraEmphasis = NonNullable<SurfaceButtonProps['variant']>;
2
+ export type { ZoraColor, ZoraEmphasis } from './colorModel';
3
+ import type { ZoraColor } from './colorModel';
4
+ export type ZoraButtonVariant = NonNullable<SurfaceButtonProps['variant']>;
4
5
  export type ZoraControlSize = NonNullable<SurfaceButtonProps['size']>;
5
- export type ZoraBadgeEmphasis = NonNullable<SurfaceBadgeProps['variant']>;
6
+ export type ZoraBadgeVariant = NonNullable<SurfaceBadgeProps['variant']>;
6
7
  export type ZoraCardTone = 'default' | 'subtle' | 'outline';
7
8
  export type ZoraContentWidth = 'narrow' | 'default' | 'wide';
8
- export declare function resolveButtonRecipe({ tone, emphasis, size, }: {
9
- tone?: ZoraTone;
10
- emphasis?: ZoraEmphasis;
9
+ export declare function resolveButtonRecipe({ color, variant, size, }: {
10
+ color?: ZoraColor;
11
+ variant?: ZoraButtonVariant;
11
12
  size?: ZoraControlSize;
12
- }): Pick<SurfaceButtonProps, 'size' | 'tone' | 'variant'>;
13
- export declare function resolveBadgeRecipe({ tone, emphasis, size, }: {
14
- tone?: ZoraTone;
15
- emphasis?: ZoraBadgeEmphasis;
13
+ }): Pick<SurfaceButtonProps, 'size' | 'color' | 'variant'>;
14
+ export declare function resolveBadgeRecipe({ color, variant, size, }: {
15
+ color?: ZoraColor;
16
+ variant?: ZoraBadgeVariant;
16
17
  size?: ZoraControlSize;
17
- }): Pick<SurfaceBadgeProps, 'size' | 'tone' | 'variant'>;
18
+ }): Pick<SurfaceBadgeProps, 'size' | 'color' | 'variant'>;
18
19
  export declare function resolveCardVariant(tone?: ZoraCardTone): SurfaceCardProps['variant'];
19
20
  export declare function resolveDialogWidth(width?: ZoraContentWidth): number;
20
21
  export declare function resolvePageMaxWidth(width?: ZoraContentWidth): number;
@@ -1 +1 @@
1
- {"version":3,"file":"recipes.d.ts","sourceRoot":"","sources":["../../src/internal/recipes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,IAAI,iBAAiB,EAC/B,WAAW,IAAI,kBAAkB,EACjC,SAAS,IAAI,gBAAgB,EAC9B,MAAM,oBAAoB,CAAC;AAE5B,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/D,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC,CAAC;AACtE,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;AACtE,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;AAC1E,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,QAAQ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+1,15 @@
1
- export function resolveButtonRecipe({ tone = 'primary', emphasis = 'solid', size = 'l', }) {
1
+ export function resolveButtonRecipe({ color = 'primary', variant = 'solid', size = 'l', }) {
2
2
  return {
3
3
  size,
4
- tone,
5
- variant: emphasis,
4
+ color,
5
+ variant,
6
6
  };
7
7
  }
8
- export function resolveBadgeRecipe({ tone = 'primary', emphasis = 'soft', size = 'm', }) {
8
+ export function resolveBadgeRecipe({ color = 'primary', variant = 'soft', size = 'm', }) {
9
9
  return {
10
10
  size,
11
- tone,
12
- variant: emphasis,
11
+ color,
12
+ variant,
13
13
  };
14
14
  }
15
15
  export function resolveCardVariant(tone = 'default') {
@@ -1 +1 @@
1
- {"version":3,"file":"recipes.js","sourceRoot":"","sources":["../../src/internal/recipes.ts"],"names":[],"mappings":"AAaA,MAAM,UAAU,mBAAmB,CAAC,EAClC,IAAI,GAAG,SAAS,EAChB,QAAQ,GAAG,OAAO,EAClB,IAAI,GAAG,GAAG,GAKX;IACC,OAAO;QACL,IAAI;QACJ,IAAI;QACJ,OAAO,EAAE,QAAQ;KAClB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,EACjC,IAAI,GAAG,SAAS,EAChB,QAAQ,GAAG,MAAM,EACjB,IAAI,GAAG,GAAG,GAKX;IACC,OAAO;QACL,IAAI;QACJ,IAAI;QACJ,OAAO,EAAE,QAAQ;KAClB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,OAAqB,SAAS;IAC/D,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB,KAAK,QAAQ;YACX,OAAO,QAAQ,CAAC;QAClB,KAAK,SAAS,CAAC;QACf;YACE,OAAO,QAAQ,CAAC;IACpB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,QAA0B,SAAS;IACpE,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,QAAQ;YACX,OAAO,GAAG,CAAC;QACb,KAAK,MAAM;YACT,OAAO,GAAG,CAAC;QACb,KAAK,SAAS,CAAC;QACf;YACE,OAAO,GAAG,CAAC;IACf,CAAC;AACH,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,QAA0B,SAAS;IACrE,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,QAAQ;YACX,OAAO,GAAG,CAAC;QACb,KAAK,MAAM;YACT,OAAO,IAAI,CAAC;QACd,KAAK,SAAS,CAAC;QACf;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAAwB,GAAG;IACzD,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,GAAG;YACN,OAAO,EAAE,CAAC;QACZ,KAAK,GAAG;YACN,OAAO,EAAE,CAAC;QACZ,KAAK,GAAG,CAAC;QACT;YACE,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC","sourcesContent":["import type {\n BadgeProps as SurfaceBadgeProps,\n ButtonProps as SurfaceButtonProps,\n CardProps as SurfaceCardProps,\n} from '@ankhorage/surface';\n\nexport type ZoraTone = NonNullable<SurfaceButtonProps['tone']>;\nexport type ZoraEmphasis = NonNullable<SurfaceButtonProps['variant']>;\nexport type ZoraControlSize = NonNullable<SurfaceButtonProps['size']>;\nexport type ZoraBadgeEmphasis = NonNullable<SurfaceBadgeProps['variant']>;\nexport type ZoraCardTone = 'default' | 'subtle' | 'outline';\nexport type ZoraContentWidth = 'narrow' | 'default' | 'wide';\n\nexport function resolveButtonRecipe({\n tone = 'primary',\n emphasis = 'solid',\n size = 'l',\n}: {\n tone?: ZoraTone;\n emphasis?: ZoraEmphasis;\n size?: ZoraControlSize;\n}): Pick<SurfaceButtonProps, 'size' | 'tone' | 'variant'> {\n return {\n size,\n tone,\n variant: emphasis,\n };\n}\n\nexport function resolveBadgeRecipe({\n tone = 'primary',\n emphasis = 'soft',\n size = 'm',\n}: {\n tone?: ZoraTone;\n emphasis?: ZoraBadgeEmphasis;\n size?: ZoraControlSize;\n}): Pick<SurfaceBadgeProps, 'size' | 'tone' | 'variant'> {\n return {\n size,\n tone,\n variant: emphasis,\n };\n}\n\nexport function resolveCardVariant(tone: ZoraCardTone = 'default'): SurfaceCardProps['variant'] {\n switch (tone) {\n case 'outline':\n return 'outline';\n case 'subtle':\n return 'subtle';\n case 'default':\n default:\n return 'raised';\n }\n}\n\nexport function resolveDialogWidth(width: ZoraContentWidth = 'default'): number {\n switch (width) {\n case 'narrow':\n return 420;\n case 'wide':\n return 560;\n case 'default':\n default:\n return 520;\n }\n}\n\nexport function resolvePageMaxWidth(width: ZoraContentWidth = 'default'): number {\n switch (width) {\n case 'narrow':\n return 760;\n case 'wide':\n return 1280;\n case 'default':\n default:\n return 1040;\n }\n}\n\nexport function resolveIconSize(size: ZoraControlSize = 'l'): number {\n switch (size) {\n case 's':\n return 16;\n case 'm':\n return 18;\n case 'l':\n default:\n return 20;\n }\n}\n"]}
1
+ {"version":3,"file":"recipes.js","sourceRoot":"","sources":["../../src/internal/recipes.ts"],"names":[],"mappings":"AAaA,MAAM,UAAU,mBAAmB,CAAC,EAClC,KAAK,GAAG,SAAS,EACjB,OAAO,GAAG,OAAO,EACjB,IAAI,GAAG,GAAG,GAKX;IACC,OAAO;QACL,IAAI;QACJ,KAAK;QACL,OAAO;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,EACjC,KAAK,GAAG,SAAS,EACjB,OAAO,GAAG,MAAM,EAChB,IAAI,GAAG,GAAG,GAKX;IACC,OAAO;QACL,IAAI;QACJ,KAAK;QACL,OAAO;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,OAAqB,SAAS;IAC/D,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC;QACnB,KAAK,QAAQ;YACX,OAAO,QAAQ,CAAC;QAClB,KAAK,SAAS,CAAC;QACf;YACE,OAAO,QAAQ,CAAC;IACpB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,QAA0B,SAAS;IACpE,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,QAAQ;YACX,OAAO,GAAG,CAAC;QACb,KAAK,MAAM;YACT,OAAO,GAAG,CAAC;QACb,KAAK,SAAS,CAAC;QACf;YACE,OAAO,GAAG,CAAC;IACf,CAAC;AACH,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,QAA0B,SAAS;IACrE,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,QAAQ;YACX,OAAO,GAAG,CAAC;QACb,KAAK,MAAM;YACT,OAAO,IAAI,CAAC;QACd,KAAK,SAAS,CAAC;QACf;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAAwB,GAAG;IACzD,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,GAAG;YACN,OAAO,EAAE,CAAC;QACZ,KAAK,GAAG;YACN,OAAO,EAAE,CAAC;QACZ,KAAK,GAAG,CAAC;QACT;YACE,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC","sourcesContent":["import type {\n BadgeProps as SurfaceBadgeProps,\n ButtonProps as SurfaceButtonProps,\n CardProps as SurfaceCardProps,\n} from '@ankhorage/surface';\nexport type { ZoraColor, ZoraEmphasis } from './colorModel';\nimport type { ZoraColor } from './colorModel';\nexport type ZoraButtonVariant = NonNullable<SurfaceButtonProps['variant']>;\nexport type ZoraControlSize = NonNullable<SurfaceButtonProps['size']>;\nexport type ZoraBadgeVariant = NonNullable<SurfaceBadgeProps['variant']>;\nexport type ZoraCardTone = 'default' | 'subtle' | 'outline';\nexport type ZoraContentWidth = 'narrow' | 'default' | 'wide';\n\nexport function resolveButtonRecipe({\n color = 'primary',\n variant = 'solid',\n size = 'l',\n}: {\n color?: ZoraColor;\n variant?: ZoraButtonVariant;\n size?: ZoraControlSize;\n}): Pick<SurfaceButtonProps, 'size' | 'color' | 'variant'> {\n return {\n size,\n color,\n variant,\n };\n}\n\nexport function resolveBadgeRecipe({\n color = 'primary',\n variant = 'soft',\n size = 'm',\n}: {\n color?: ZoraColor;\n variant?: ZoraBadgeVariant;\n size?: ZoraControlSize;\n}): Pick<SurfaceBadgeProps, 'size' | 'color' | 'variant'> {\n return {\n size,\n color,\n variant,\n };\n}\n\nexport function resolveCardVariant(tone: ZoraCardTone = 'default'): SurfaceCardProps['variant'] {\n switch (tone) {\n case 'outline':\n return 'outline';\n case 'subtle':\n return 'subtle';\n case 'default':\n default:\n return 'raised';\n }\n}\n\nexport function resolveDialogWidth(width: ZoraContentWidth = 'default'): number {\n switch (width) {\n case 'narrow':\n return 420;\n case 'wide':\n return 560;\n case 'default':\n default:\n return 520;\n }\n}\n\nexport function resolvePageMaxWidth(width: ZoraContentWidth = 'default'): number {\n switch (width) {\n case 'narrow':\n return 760;\n case 'wide':\n return 1280;\n case 'default':\n default:\n return 1040;\n }\n}\n\nexport function resolveIconSize(size: ZoraControlSize = 'l'): number {\n switch (size) {\n case 's':\n return 16;\n case 'm':\n return 18;\n case 'l':\n default:\n return 20;\n }\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  export { ZORA_COMPONENT_META } from './componentMeta';
2
- export type { ZoraComponentBlueprint, ZoraComponentCategory, ZoraComponentI18nMeta, ZoraComponentMeta, ZoraComponentMetaRegistry, ZoraComponentPropArrayItemSchema, ZoraComponentPropSchema, ZoraComponentPropType, ZoraComponentPropValue, ZoraComponentSlotMeta, } from './types';
2
+ export type { ZoraComponentBlueprint, ZoraComponentCategory, ZoraComponentEventMeta, ZoraComponentEventPayloadFieldMeta, ZoraComponentEventPayloadFieldType, ZoraComponentEventPayloadKind, ZoraComponentI18nMeta, ZoraComponentMeta, ZoraComponentMetaRegistry, ZoraComponentPropArrayItemSchema, ZoraComponentPropSchema, ZoraComponentPropType, ZoraComponentPropValue, ZoraComponentSlotMeta, } from './types';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/metadata/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,YAAY,EACV,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EACzB,gCAAgC,EAChC,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/metadata/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,YAAY,EACV,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,kCAAkC,EAClC,kCAAkC,EAClC,6BAA6B,EAC7B,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EACzB,gCAAgC,EAChC,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/metadata/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["export { ZORA_COMPONENT_META } from './componentMeta';\nexport type {\n ZoraComponentBlueprint,\n ZoraComponentCategory,\n ZoraComponentI18nMeta,\n ZoraComponentMeta,\n ZoraComponentMetaRegistry,\n ZoraComponentPropArrayItemSchema,\n ZoraComponentPropSchema,\n ZoraComponentPropType,\n ZoraComponentPropValue,\n ZoraComponentSlotMeta,\n} from './types';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/metadata/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["export { ZORA_COMPONENT_META } from './componentMeta';\nexport type {\n ZoraComponentBlueprint,\n ZoraComponentCategory,\n ZoraComponentEventMeta,\n ZoraComponentEventPayloadFieldMeta,\n ZoraComponentEventPayloadFieldType,\n ZoraComponentEventPayloadKind,\n ZoraComponentI18nMeta,\n ZoraComponentMeta,\n ZoraComponentMetaRegistry,\n ZoraComponentPropArrayItemSchema,\n ZoraComponentPropSchema,\n ZoraComponentPropType,\n ZoraComponentPropValue,\n ZoraComponentSlotMeta,\n} from './types';\n"]}
@@ -1,3 +1,4 @@
1
+ import type { ComponentEventDtoKind } from '@ankhorage/contracts';
1
2
  export type ZoraComponentCategory = 'foundation' | 'component' | 'pattern' | 'layout';
2
3
  export type ZoraComponentPropType = 'string' | 'number' | 'boolean' | 'enum' | 'color' | 'spacing' | 'radius' | 'shadow' | 'typographySize' | 'typographyWeight' | 'action' | 'imageAsset' | 'array';
3
4
  export type ZoraComponentPropValue = string | number | boolean | null | readonly ZoraComponentPropValue[] | {
@@ -29,6 +30,20 @@ export interface ZoraComponentI18nMeta {
29
30
  defaultTextProp: string;
30
31
  }[];
31
32
  }
33
+ export type ZoraComponentEventPayloadKind = ComponentEventDtoKind | (string & {});
34
+ export type ZoraComponentEventPayloadFieldType = 'boolean' | 'number' | 'object' | 'record' | 'string' | 'unknown';
35
+ export interface ZoraComponentEventPayloadFieldMeta {
36
+ readonly path: string;
37
+ readonly type: ZoraComponentEventPayloadFieldType;
38
+ readonly label?: string;
39
+ readonly description?: string;
40
+ }
41
+ export interface ZoraComponentEventMeta {
42
+ readonly label: string;
43
+ readonly eventType: ZoraComponentEventPayloadKind;
44
+ readonly description?: string;
45
+ readonly payloadFields?: readonly ZoraComponentEventPayloadFieldMeta[];
46
+ }
32
47
  export interface ZoraComponentSlotMeta {
33
48
  label?: string;
34
49
  allowedChildren?: readonly string[];
@@ -40,6 +55,7 @@ export interface ZoraComponentMeta {
40
55
  directManifestNode: boolean;
41
56
  allowedChildren: readonly string[];
42
57
  blueprint?: ZoraComponentBlueprint;
58
+ events?: Readonly<Record<string, ZoraComponentEventMeta>>;
43
59
  i18n?: ZoraComponentI18nMeta;
44
60
  slots?: Readonly<Record<string, ZoraComponentSlotMeta>>;
45
61
  note?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/metadata/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEtF,MAAM,MAAM,qBAAqB,GAC7B,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,MAAM,GACN,OAAO,GACP,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,gBAAgB,GAChB,kBAAkB,GAClB,QAAQ,GACR,YAAY,GACZ,OAAO,CAAC;AAEZ,MAAM,MAAM,sBAAsB,GAC9B,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,sBAAsB,EAAE,GACjC;IAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,sBAAsB,CAAA;CAAE,CAAC;AAEvD,MAAM,WAAW,gCAAgC;IAC/C,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,uBAAuB,CAAC;CACjC;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACpC,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,UAAU,CAAC,EAAE,SAAS,gCAAgC,EAAE,CAAC;CAC1D;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE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":["../../src/metadata/types.ts"],"names":[],"mappings":"","sourcesContent":["export type ZoraComponentCategory = 'foundation' | 'component' | 'pattern' | 'layout';\n\nexport type ZoraComponentPropType =\n | 'string'\n | 'number'\n | 'boolean'\n | 'enum'\n | 'color'\n | 'spacing'\n | 'radius'\n | 'shadow'\n | 'typographySize'\n | 'typographyWeight'\n | 'action'\n | 'imageAsset'\n | 'array';\n\nexport type ZoraComponentPropValue =\n | string\n | number\n | boolean\n | null\n | readonly ZoraComponentPropValue[]\n | { readonly [key: string]: ZoraComponentPropValue };\n\nexport interface ZoraComponentPropArrayItemSchema {\n key: string;\n schema: ZoraComponentPropSchema;\n}\n\nexport interface ZoraComponentPropSchema {\n type: ZoraComponentPropType;\n category: string;\n label?: string;\n enum?: readonly (string | number)[];\n default?: ZoraComponentPropValue;\n itemSchema?: readonly ZoraComponentPropArrayItemSchema[];\n}\n\nexport interface ZoraComponentBlueprint {\n label: string;\n icon?: {\n name: string;\n provider?: string;\n };\n defaultProps?: Readonly<Record<string, ZoraComponentPropValue>>;\n}\n\nexport interface ZoraComponentI18nMeta {\n fields: readonly {\n keyProp: string;\n defaultTextProp: string;\n }[];\n}\n\nexport interface ZoraComponentSlotMeta {\n label?: string;\n allowedChildren?: readonly string[];\n}\n\nexport interface ZoraComponentMeta {\n name: string;\n category: ZoraComponentCategory;\n description?: string;\n directManifestNode: boolean;\n allowedChildren: readonly string[];\n blueprint?: ZoraComponentBlueprint;\n i18n?: ZoraComponentI18nMeta;\n slots?: Readonly<Record<string, ZoraComponentSlotMeta>>;\n note?: string;\n props: Readonly<Record<string, ZoraComponentPropSchema>>;\n}\n\nexport type ZoraComponentMetaRegistry = Readonly<Record<string, ZoraComponentMeta>>;\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/metadata/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentEventDtoKind } from '@ankhorage/contracts';\n\nexport type ZoraComponentCategory = 'foundation' | 'component' | 'pattern' | 'layout';\n\nexport type ZoraComponentPropType =\n | 'string'\n | 'number'\n | 'boolean'\n | 'enum'\n | 'color'\n | 'spacing'\n | 'radius'\n | 'shadow'\n | 'typographySize'\n | 'typographyWeight'\n | 'action'\n | 'imageAsset'\n | 'array';\n\nexport type ZoraComponentPropValue =\n | string\n | number\n | boolean\n | null\n | readonly ZoraComponentPropValue[]\n | { readonly [key: string]: ZoraComponentPropValue };\n\nexport interface ZoraComponentPropArrayItemSchema {\n key: string;\n schema: ZoraComponentPropSchema;\n}\n\nexport interface ZoraComponentPropSchema {\n type: ZoraComponentPropType;\n category: string;\n label?: string;\n enum?: readonly (string | number)[];\n default?: ZoraComponentPropValue;\n itemSchema?: readonly ZoraComponentPropArrayItemSchema[];\n}\n\nexport interface ZoraComponentBlueprint {\n label: string;\n icon?: {\n name: string;\n provider?: string;\n };\n defaultProps?: Readonly<Record<string, ZoraComponentPropValue>>;\n}\n\nexport interface ZoraComponentI18nMeta {\n fields: readonly {\n keyProp: string;\n defaultTextProp: string;\n }[];\n}\n\nexport type ZoraComponentEventPayloadKind = ComponentEventDtoKind | (string & {});\n\nexport type ZoraComponentEventPayloadFieldType =\n | 'boolean'\n | 'number'\n | 'object'\n | 'record'\n | 'string'\n | 'unknown';\n\nexport interface ZoraComponentEventPayloadFieldMeta {\n readonly path: string;\n readonly type: ZoraComponentEventPayloadFieldType;\n readonly label?: string;\n readonly description?: string;\n}\n\nexport interface ZoraComponentEventMeta {\n readonly label: string;\n readonly eventType: ZoraComponentEventPayloadKind;\n readonly description?: string;\n readonly payloadFields?: readonly ZoraComponentEventPayloadFieldMeta[];\n}\n\nexport interface ZoraComponentSlotMeta {\n label?: string;\n allowedChildren?: readonly string[];\n}\n\nexport interface ZoraComponentMeta {\n name: string;\n category: ZoraComponentCategory;\n description?: string;\n directManifestNode: boolean;\n allowedChildren: readonly string[];\n blueprint?: ZoraComponentBlueprint;\n events?: Readonly<Record<string, ZoraComponentEventMeta>>;\n i18n?: ZoraComponentI18nMeta;\n slots?: Readonly<Record<string, ZoraComponentSlotMeta>>;\n note?: string;\n props: Readonly<Record<string, ZoraComponentPropSchema>>;\n}\n\nexport type ZoraComponentMetaRegistry = Readonly<Record<string, ZoraComponentMeta>>;\n"]}
@@ -22,9 +22,9 @@ function ForgotPasswordFormInner({ themeId: _themeId, mode: _mode, identifiers =
22
22
  identifierKind: normalizeIdentifierKind(formValues.identifier, identifiers),
23
23
  }), [identifiers, onSubmit]);
24
24
  return (<Form actions={onSignIn ? (<Stack direction="row" gap="s" wrap="wrap">
25
- <Button disabled={disabled || loading} emphasis="ghost" onPress={() => {
25
+ <Button disabled={disabled || loading} variant="ghost" onPress={() => {
26
26
  void onSignIn();
27
- }} size="s" tone="neutral">
27
+ }} size="s" color="neutral">
28
28
  {signInLabel}
29
29
  </Button>
30
30
  </Stack>) : undefined} disabled={disabled} error={error} fields={fields} loading={loading} onChange={setValues} onSubmit={handleSubmit} submitLabel={submitLabel} testID={testID} values={values}/>);
@@ -1 +1 @@
1
- {"version":3,"file":"ForgotPasswordForm.js","sourceRoot":"","sources":["../../../src/patterns/auth/ForgotPasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAyC,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AAIjB,SAAS,uBAAuB,CAAC,EAC/B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,WAAW,GAAG,kBAAkB,EAChC,eAAe,EACf,WAAW,GAAG,SAAS,EACvB,OAAO,GAAG,KAAK,EACf,QAAQ,GA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YAAA,EAAE,MAAM,CACV;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,SACN,CAAC,CACD,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,SAAS,CAAC,CACpB,QAAQ,CAAC,CAAC,YAAY,CAAC,CACvB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,uBAAuB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Button } from '../../components/button';\nimport { Form, type FormFieldConfig, type FormValues } from '../../components/form';\nimport { Stack } from '../../foundation';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ForgotPasswordFormProps } from './types';\nimport {\n defaultIdentifiers,\n normalizeIdentifierKind,\n resolveIdentifierLabel,\n resolveIdentifierRules,\n resolveIdentifierType,\n} from './utils';\n\ntype ForgotPasswordFieldName = 'identifier';\n\nfunction ForgotPasswordFormInner({\n themeId: _themeId,\n mode: _mode,\n identifiers = defaultIdentifiers,\n identifierLabel,\n signInLabel = 'Sign in',\n loading = false,\n disabled = false,\n error,\n submitLabel = 'Send code',\n onSubmit,\n onSignIn,\n testID,\n}: ForgotPasswordFormProps) {\n const [values, setValues] = React.useState<FormValues<ForgotPasswordFieldName>>({\n identifier: '',\n });\n const fields = React.useMemo<readonly FormFieldConfig<ForgotPasswordFieldName>[]>(\n () => [\n {\n name: 'identifier',\n label: identifierLabel ?? resolveIdentifierLabel(identifiers),\n type: resolveIdentifierType(identifiers),\n autoCapitalize: 'none',\n rules: resolveIdentifierRules(identifiers),\n },\n ],\n [identifierLabel, identifiers],\n );\n\n const handleSubmit = React.useCallback(\n (formValues: FormValues<ForgotPasswordFieldName>) =>\n onSubmit({\n identifier: formValues.identifier.trim(),\n identifierKind: normalizeIdentifierKind(formValues.identifier, identifiers),\n }),\n [identifiers, onSubmit],\n );\n\n return (\n <Form\n actions={\n onSignIn ? (\n <Stack direction=\"row\" gap=\"s\" wrap=\"wrap\">\n <Button\n disabled={disabled || loading}\n emphasis=\"ghost\"\n onPress={() => {\n void onSignIn();\n }}\n size=\"s\"\n tone=\"neutral\"\n >\n {signInLabel}\n </Button>\n </Stack>\n ) : undefined\n }\n disabled={disabled}\n error={error}\n fields={fields}\n loading={loading}\n onChange={setValues}\n onSubmit={handleSubmit}\n submitLabel={submitLabel}\n testID={testID}\n values={values}\n />\n );\n}\n\nexport const ForgotPasswordForm = withZoraThemeScope(ForgotPasswordFormInner);\n"]}
1
+ {"version":3,"file":"ForgotPasswordForm.js","sourceRoot":"","sources":["../../../src/patterns/auth/ForgotPasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAyC,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AAIjB,SAAS,uBAAuB,CAAC,EAC/B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,WAAW,GAAG,kBAAkB,EAChC,eAAe,EACf,WAAW,GAAG,SAAS,EACvB,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,EAChB,KAAK,EACL,WAAW,GAAG,WAAW,EACzB,QAAQ,EACR,QAAQ,EACR,M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C,CACD,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,SAAS,CAAC,CACpB,QAAQ,CAAC,CAAC,YAAY,CAAC,CACvB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,uBAAuB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Button } from '../../components/button';\nimport { Form, type FormFieldConfig, type FormValues } from '../../components/form';\nimport { Stack } from '../../foundation';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ForgotPasswordFormProps } from './types';\nimport {\n defaultIdentifiers,\n normalizeIdentifierKind,\n resolveIdentifierLabel,\n resolveIdentifierRules,\n resolveIdentifierType,\n} from './utils';\n\ntype ForgotPasswordFieldName = 'identifier';\n\nfunction ForgotPasswordFormInner({\n themeId: _themeId,\n mode: _mode,\n identifiers = defaultIdentifiers,\n identifierLabel,\n signInLabel = 'Sign in',\n loading = false,\n disabled = false,\n error,\n submitLabel = 'Send code',\n onSubmit,\n onSignIn,\n testID,\n}: ForgotPasswordFormProps) {\n const [values, setValues] = React.useState<FormValues<ForgotPasswordFieldName>>({\n identifier: '',\n });\n const fields = React.useMemo<readonly FormFieldConfig<ForgotPasswordFieldName>[]>(\n () => [\n {\n name: 'identifier',\n label: identifierLabel ?? resolveIdentifierLabel(identifiers),\n type: resolveIdentifierType(identifiers),\n autoCapitalize: 'none',\n rules: resolveIdentifierRules(identifiers),\n },\n ],\n [identifierLabel, identifiers],\n );\n\n const handleSubmit = React.useCallback(\n (formValues: FormValues<ForgotPasswordFieldName>) =>\n onSubmit({\n identifier: formValues.identifier.trim(),\n identifierKind: normalizeIdentifierKind(formValues.identifier, identifiers),\n }),\n [identifiers, onSubmit],\n );\n\n return (\n <Form\n actions={\n onSignIn ? (\n <Stack direction=\"row\" gap=\"s\" wrap=\"wrap\">\n <Button\n disabled={disabled || loading}\n variant=\"ghost\"\n onPress={() => {\n void onSignIn();\n }}\n size=\"s\"\n color=\"neutral\"\n >\n {signInLabel}\n </Button>\n </Stack>\n ) : undefined\n }\n disabled={disabled}\n error={error}\n fields={fields}\n loading={loading}\n onChange={setValues}\n onSubmit={handleSubmit}\n submitLabel={submitLabel}\n testID={testID}\n values={values}\n />\n );\n}\n\nexport const ForgotPasswordForm = withZoraThemeScope(ForgotPasswordFormInner);\n"]}
@@ -21,9 +21,9 @@ function OtpFormInner({ themeId: _themeId, mode: _mode, length = 6, otpLabel = '
21
21
  otp: formValues.otp.trim(),
22
22
  }), [onSubmit]);
23
23
  return (<Form actions={onResend ? (<Stack direction="row" gap="s" wrap="wrap">
24
- <Button disabled={disabled || loading || resendDisabled} emphasis="ghost" loading={resendLoading} onPress={() => {
24
+ <Button disabled={disabled || loading || resendDisabled} variant="ghost" loading={resendLoading} onPress={() => {
25
25
  void onResend();
26
- }} size="s" tone="neutral">
26
+ }} size="s" color="neutral">
27
27
  {resendLabel}
28
28
  </Button>
29
29
  </Stack>) : undefined} disabled={disabled} error={error} fields={fields} loading={loading} onChange={setValues} onSubmit={handleSubmit} submitLabel={submitLabel} testID={testID} values={values}/>);
@@ -1 +1 @@
1
- {"version":3,"file":"OtpForm.js","sourceRoot":"","sources":["../../../src/patterns/auth/OtpForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAyC,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,kBAAkB,EA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CAAC,MAAM,CACxC;YAAA,CAAC,MAAM,CACL,QAAQ,CAAC,CAAC,QAAQ,IAAI,OAAO,IAAI,cAAc,CAAC,CAChD,QAAQ,CAAC,OAAO,CAChB,OAAO,CAAC,CAAC,aAAa,CAAC,CACvB,OAAO,CAAC,CAAC,GAAG,EAAE;gBACZ,KAAK,QAAQ,EAAE,CAAC;YAClB,CAAC,CAAC,CACF,IAAI,CAAC,GAAG,CACR,IAAI,CAAC,SAAS,CAEd;cAAA,CAAC,WAAW,CACd;YAAA,EAAE,MAAM,CACV;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,SACN,CAAC,CACD,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,SAAS,CAAC,CACpB,QAAQ,CAAC,CAAC,YAAY,CAAC,CACvB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Button } from '../../components/button';\nimport { Form, type FormFieldConfig, type FormValues } from '../../components/form';\nimport { Stack } from '../../foundation';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { OtpFormProps } from './types';\n\ntype OtpFieldName = 'otp';\n\nfunction OtpFormInner({\n themeId: _themeId,\n mode: _mode,\n length = 6,\n otpLabel = 'Code',\n resendLabel = 'Resend code',\n resendDisabled = false,\n resendLoading = false,\n loading = false,\n disabled = false,\n error,\n submitLabel = 'Verify code',\n onSubmit,\n onResend,\n testID,\n}: OtpFormProps) {\n const resolvedLength = Math.max(1, length);\n const [values, setValues] = React.useState<FormValues<OtpFieldName>>({\n otp: '',\n });\n const fields = React.useMemo<readonly FormFieldConfig<OtpFieldName>[]>(\n () => [\n {\n name: 'otp',\n label: otpLabel,\n type: 'otp',\n maxLength: resolvedLength,\n rules: [{ kind: 'required' }, { kind: 'minLength', value: resolvedLength }],\n },\n ],\n [otpLabel, resolvedLength],\n );\n\n const handleSubmit = React.useCallback(\n (formValues: FormValues<OtpFieldName>) =>\n onSubmit({\n otp: formValues.otp.trim(),\n }),\n [onSubmit],\n );\n\n return (\n <Form\n actions={\n onResend ? (\n <Stack direction=\"row\" gap=\"s\" wrap=\"wrap\">\n <Button\n disabled={disabled || loading || resendDisabled}\n emphasis=\"ghost\"\n loading={resendLoading}\n onPress={() => {\n void onResend();\n }}\n size=\"s\"\n tone=\"neutral\"\n >\n {resendLabel}\n </Button>\n </Stack>\n ) : undefined\n }\n disabled={disabled}\n error={error}\n fields={fields}\n loading={loading}\n onChange={setValues}\n onSubmit={handleSubmit}\n submitLabel={submitLabel}\n testID={testID}\n values={values}\n />\n );\n}\n\nexport const OtpForm = withZoraThemeScope(OtpFormInner);\n"]}
1
+ {"version":3,"file":"OtpForm.js","sourceRoot":"","sources":["../../../src/patterns/auth/OtpForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAyC,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAKpE,SAAS,YAAY,CAAC,EACpB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,MAAM,GAAG,CAAC,EACV,QAAQ,GAAG,MAAM,EACjB,WAAW,GAAG,aAAa,EAC3B,cAAc,GAAG,KAAK,EACtB,aAAa,GAAG,KAAK,EACrB,OAAO,GAAG,KAA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C,CACF,IAAI,CAAC,GAAG,CACR,KAAK,CAAC,SAAS,CAEf;cAAA,CAAC,WAAW,CACd;YAAA,EAAE,MAAM,CACV;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,SACN,CAAC,CACD,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,SAAS,CAAC,CACpB,QAAQ,CAAC,CAAC,YAAY,CAAC,CACvB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Button } from '../../components/button';\nimport { Form, type FormFieldConfig, type FormValues } from '../../components/form';\nimport { Stack } from '../../foundation';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { OtpFormProps } from './types';\n\ntype OtpFieldName = 'otp';\n\nfunction OtpFormInner({\n themeId: _themeId,\n mode: _mode,\n length = 6,\n otpLabel = 'Code',\n resendLabel = 'Resend code',\n resendDisabled = false,\n resendLoading = false,\n loading = false,\n disabled = false,\n error,\n submitLabel = 'Verify code',\n onSubmit,\n onResend,\n testID,\n}: OtpFormProps) {\n const resolvedLength = Math.max(1, length);\n const [values, setValues] = React.useState<FormValues<OtpFieldName>>({\n otp: '',\n });\n const fields = React.useMemo<readonly FormFieldConfig<OtpFieldName>[]>(\n () => [\n {\n name: 'otp',\n label: otpLabel,\n type: 'otp',\n maxLength: resolvedLength,\n rules: [{ kind: 'required' }, { kind: 'minLength', value: resolvedLength }],\n },\n ],\n [otpLabel, resolvedLength],\n );\n\n const handleSubmit = React.useCallback(\n (formValues: FormValues<OtpFieldName>) =>\n onSubmit({\n otp: formValues.otp.trim(),\n }),\n [onSubmit],\n );\n\n return (\n <Form\n actions={\n onResend ? (\n <Stack direction=\"row\" gap=\"s\" wrap=\"wrap\">\n <Button\n disabled={disabled || loading || resendDisabled}\n variant=\"ghost\"\n loading={resendLoading}\n onPress={() => {\n void onResend();\n }}\n size=\"s\"\n color=\"neutral\"\n >\n {resendLabel}\n </Button>\n </Stack>\n ) : undefined\n }\n disabled={disabled}\n error={error}\n fields={fields}\n loading={loading}\n onChange={setValues}\n onSubmit={handleSubmit}\n submitLabel={submitLabel}\n testID={testID}\n values={values}\n />\n );\n}\n\nexport const OtpForm = withZoraThemeScope(OtpFormInner);\n"]}