@ankhorage/zora 12.0.0 → 13.0.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 (272) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +1 -1
  3. package/dist/constants.d.ts +2 -0
  4. package/dist/constants.d.ts.map +1 -1
  5. package/dist/constants.js +9 -0
  6. package/dist/constants.js.map +1 -1
  7. package/dist/features/accordion/accordionItemMeta.d.ts +53 -0
  8. package/dist/features/accordion/accordionItemMeta.d.ts.map +1 -0
  9. package/dist/features/accordion/accordionItemMeta.js +45 -0
  10. package/dist/features/accordion/accordionItemMeta.js.map +1 -0
  11. package/dist/features/accordion/accordionMeta.d.ts +36 -0
  12. package/dist/features/accordion/accordionMeta.d.ts.map +1 -0
  13. package/dist/features/accordion/accordionMeta.js +33 -0
  14. package/dist/features/accordion/accordionMeta.js.map +1 -0
  15. package/dist/features/accordion/adapters/inbound/Accordion.d.ts +5 -0
  16. package/dist/features/accordion/adapters/inbound/Accordion.d.ts.map +1 -0
  17. package/dist/features/accordion/adapters/inbound/Accordion.js +41 -0
  18. package/dist/features/accordion/adapters/inbound/Accordion.js.map +1 -0
  19. package/dist/features/accordion/adapters/inbound/AccordionItem.d.ts +5 -0
  20. package/dist/features/accordion/adapters/inbound/AccordionItem.d.ts.map +1 -0
  21. package/dist/features/accordion/adapters/inbound/AccordionItem.js +52 -0
  22. package/dist/features/accordion/adapters/inbound/AccordionItem.js.map +1 -0
  23. package/dist/features/accordion/composition/AccordionPresentationContext.d.ts +4 -0
  24. package/dist/features/accordion/composition/AccordionPresentationContext.d.ts.map +1 -0
  25. package/dist/features/accordion/composition/AccordionPresentationContext.js +3 -0
  26. package/dist/features/accordion/composition/AccordionPresentationContext.js.map +1 -0
  27. package/dist/features/accordion/public.d.ts +4 -0
  28. package/dist/features/accordion/public.d.ts.map +1 -0
  29. package/dist/features/accordion/public.js +3 -0
  30. package/dist/features/accordion/public.js.map +1 -0
  31. package/dist/{patterns/auth → features/auth/adapters/inbound}/AuthForm.d.ts +3 -3
  32. package/dist/features/auth/adapters/inbound/AuthForm.d.ts.map +1 -0
  33. package/dist/{patterns/auth → features/auth/adapters/inbound}/AuthForm.js +2 -2
  34. package/dist/features/auth/adapters/inbound/AuthForm.js.map +1 -0
  35. package/dist/{patterns/auth → features/auth/adapters/inbound}/AuthFormField.d.ts +2 -2
  36. package/dist/features/auth/adapters/inbound/AuthFormField.d.ts.map +1 -0
  37. package/dist/{patterns/auth → features/auth/adapters/inbound}/AuthFormField.js +2 -2
  38. package/dist/features/auth/adapters/inbound/AuthFormField.js.map +1 -0
  39. package/dist/{patterns/auth → features/auth/adapters/inbound}/ForgotPasswordForm.d.ts +1 -1
  40. package/dist/features/auth/adapters/inbound/ForgotPasswordForm.d.ts.map +1 -0
  41. package/dist/{patterns/auth → features/auth/adapters/inbound}/ForgotPasswordForm.js +5 -5
  42. package/dist/features/auth/adapters/inbound/ForgotPasswordForm.js.map +1 -0
  43. package/dist/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderButton.d.ts +1 -1
  44. package/dist/features/auth/adapters/inbound/OAuthProviderButton.d.ts.map +1 -0
  45. package/dist/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderButton.js +3 -3
  46. package/dist/features/auth/adapters/inbound/OAuthProviderButton.js.map +1 -0
  47. package/dist/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderList.d.ts +1 -1
  48. package/dist/features/auth/adapters/inbound/OAuthProviderList.d.ts.map +1 -0
  49. package/dist/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderList.js +2 -2
  50. package/dist/features/auth/adapters/inbound/OAuthProviderList.js.map +1 -0
  51. package/dist/{patterns/auth → features/auth/adapters/inbound}/OtpForm.d.ts +1 -1
  52. package/dist/features/auth/adapters/inbound/OtpForm.d.ts.map +1 -0
  53. package/dist/{patterns/auth → features/auth/adapters/inbound}/OtpForm.js +4 -4
  54. package/dist/features/auth/adapters/inbound/OtpForm.js.map +1 -0
  55. package/dist/{patterns/auth → features/auth/adapters/inbound}/SignInForm.d.ts +1 -1
  56. package/dist/features/auth/adapters/inbound/SignInForm.d.ts.map +1 -0
  57. package/dist/{patterns/auth → features/auth/adapters/inbound}/SignInForm.js +5 -5
  58. package/dist/features/auth/adapters/inbound/SignInForm.js.map +1 -0
  59. package/dist/{patterns/auth → features/auth/adapters/inbound}/SignUpForm.d.ts +1 -1
  60. package/dist/features/auth/adapters/inbound/SignUpForm.d.ts.map +1 -0
  61. package/dist/{patterns/auth → features/auth/adapters/inbound}/SignUpForm.js +3 -3
  62. package/dist/features/auth/adapters/inbound/SignUpForm.js.map +1 -0
  63. package/dist/features/auth/forgotPasswordFormMeta.d.ts +79 -0
  64. package/dist/features/auth/forgotPasswordFormMeta.d.ts.map +1 -0
  65. package/dist/features/auth/forgotPasswordFormMeta.js +48 -0
  66. package/dist/features/auth/forgotPasswordFormMeta.js.map +1 -0
  67. package/dist/features/auth/oauthProviderButtonMeta.d.ts +83 -0
  68. package/dist/features/auth/oauthProviderButtonMeta.d.ts.map +1 -0
  69. package/dist/features/auth/oauthProviderButtonMeta.js +61 -0
  70. package/dist/features/auth/oauthProviderButtonMeta.js.map +1 -0
  71. package/dist/features/auth/oauthProviderListMeta.d.ts +109 -0
  72. package/dist/features/auth/oauthProviderListMeta.d.ts.map +1 -0
  73. package/dist/features/auth/oauthProviderListMeta.js +66 -0
  74. package/dist/features/auth/oauthProviderListMeta.js.map +1 -0
  75. package/dist/features/auth/otpFormMeta.d.ts +89 -0
  76. package/dist/features/auth/otpFormMeta.d.ts.map +1 -0
  77. package/dist/features/auth/otpFormMeta.js +54 -0
  78. package/dist/features/auth/otpFormMeta.js.map +1 -0
  79. package/dist/features/auth/public.d.ts +9 -0
  80. package/dist/features/auth/public.d.ts.map +1 -0
  81. package/dist/features/auth/public.js +8 -0
  82. package/dist/features/auth/public.js.map +1 -0
  83. package/dist/features/auth/signInFormMeta.d.ts +100 -0
  84. package/dist/features/auth/signInFormMeta.d.ts.map +1 -0
  85. package/dist/features/auth/signInFormMeta.js +62 -0
  86. package/dist/features/auth/signInFormMeta.js.map +1 -0
  87. package/dist/features/auth/signUpFormMeta.d.ts +111 -0
  88. package/dist/features/auth/signUpFormMeta.d.ts.map +1 -0
  89. package/dist/features/auth/signUpFormMeta.js +66 -0
  90. package/dist/features/auth/signUpFormMeta.js.map +1 -0
  91. package/dist/{patterns/auth/utils.d.ts → features/auth/utils/authForm.d.ts} +3 -3
  92. package/dist/features/auth/utils/authForm.d.ts.map +1 -0
  93. package/dist/{patterns/auth/utils.js → features/auth/utils/authForm.js} +1 -1
  94. package/dist/features/auth/utils/authForm.js.map +1 -0
  95. package/dist/{patterns/auth → features/auth/utils}/oauthProviders.d.ts +1 -1
  96. package/dist/features/auth/utils/oauthProviders.d.ts.map +1 -0
  97. package/dist/features/auth/utils/oauthProviders.js.map +1 -0
  98. package/dist/features/bottom-sheet/bottomSheetMeta.d.ts +1 -1
  99. package/dist/features/card/cardMeta.d.ts +1 -1
  100. package/dist/features/card/mediaCardMeta.d.ts +1 -1
  101. package/dist/features/card/postCardMeta.d.ts +1 -1
  102. package/dist/{components/gradient → features/gradient/adapters/inbound}/Gradient.d.ts +1 -1
  103. package/dist/features/gradient/adapters/inbound/Gradient.d.ts.map +1 -0
  104. package/dist/{components/gradient → features/gradient/adapters/inbound}/Gradient.js +2 -2
  105. package/dist/features/gradient/adapters/inbound/Gradient.js.map +1 -0
  106. package/dist/{components/gradient → features/gradient/adapters/inbound}/GradientRendererContext.d.ts +3 -2
  107. package/dist/features/gradient/adapters/inbound/GradientRendererContext.d.ts.map +1 -0
  108. package/dist/{components/gradient → features/gradient/adapters/inbound}/GradientRendererContext.js +2 -1
  109. package/dist/features/gradient/adapters/inbound/GradientRendererContext.js.map +1 -0
  110. package/dist/features/gradient/gradientMeta.d.ts +48 -0
  111. package/dist/features/gradient/gradientMeta.d.ts.map +1 -0
  112. package/dist/features/gradient/gradientMeta.js +25 -0
  113. package/dist/features/gradient/gradientMeta.js.map +1 -0
  114. package/dist/features/gradient/public.d.ts +4 -0
  115. package/dist/features/gradient/public.d.ts.map +1 -0
  116. package/dist/features/gradient/public.js +3 -0
  117. package/dist/features/gradient/public.js.map +1 -0
  118. package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.d.ts +1 -1
  119. package/dist/features/layout/boxMeta.d.ts +1 -1
  120. package/dist/features/layout/containerMeta.d.ts +1 -1
  121. package/dist/features/layout/gridMeta.d.ts +1 -1
  122. package/dist/features/layout/stackMeta.d.ts +1 -1
  123. package/dist/features/list/flatListMeta.d.ts +1 -1
  124. package/dist/features/list/sectionListMeta.d.ts +1 -1
  125. package/dist/features/surface/surfaceMeta.d.ts +1 -1
  126. package/dist/index.d.ts +5 -6
  127. package/dist/index.d.ts.map +1 -1
  128. package/dist/index.js +3 -3
  129. package/dist/index.js.map +1 -1
  130. package/dist/layout/screen/meta.d.ts +1 -1
  131. package/dist/layout/screen-section/meta.d.ts +1 -1
  132. package/dist/metadata/allowedChildren.d.ts +3 -3
  133. package/dist/metadata/allowedChildren.d.ts.map +1 -1
  134. package/dist/metadata/allowedChildren.js +8 -0
  135. package/dist/metadata/allowedChildren.js.map +1 -1
  136. package/dist/metadata/bindableComponentMeta.d.ts +2 -2
  137. package/dist/metadata/componentMeta.d.ts.map +1 -1
  138. package/dist/metadata/componentMeta.js +11 -4
  139. package/dist/metadata/componentMeta.js.map +1 -1
  140. package/dist/patterns/message-bubble/meta.d.ts +1 -1
  141. package/dist/patterns/notice/meta.d.ts +1 -1
  142. package/dist/patterns/panel/meta.d.ts +1 -1
  143. package/dist/patterns/reader/meta.d.ts +2 -2
  144. package/dist/patterns/scanner/meta.d.ts +2 -2
  145. package/dist/registry.d.ts.map +1 -1
  146. package/dist/registry.js +5 -4
  147. package/dist/registry.js.map +1 -1
  148. package/dist/types/accordion.d.ts +23 -0
  149. package/dist/types/accordion.d.ts.map +1 -0
  150. package/dist/types/accordion.js +2 -0
  151. package/dist/types/accordion.js.map +1 -0
  152. package/dist/{patterns/auth/types.d.ts → types/auth.d.ts} +8 -8
  153. package/dist/types/auth.d.ts.map +1 -0
  154. package/dist/types/auth.js +2 -0
  155. package/dist/types/auth.js.map +1 -0
  156. package/dist/{components/gradient/types.d.ts → types/gradient.d.ts} +3 -3
  157. package/dist/types/gradient.d.ts.map +1 -0
  158. package/dist/types/gradient.js +2 -0
  159. package/dist/types/gradient.js.map +1 -0
  160. package/package.json +2 -2
  161. package/src/constants.ts +9 -0
  162. package/src/expo57Migration.test.ts +1 -1
  163. package/src/featureManifest.test.ts +2 -0
  164. package/src/features/accordion/accordionItemMeta.ts +46 -0
  165. package/src/features/accordion/accordionMeta.ts +34 -0
  166. package/src/features/accordion/adapters/inbound/Accordion.tsx +94 -0
  167. package/src/features/accordion/adapters/inbound/AccordionItem.tsx +86 -0
  168. package/src/features/accordion/composition/AccordionPresentationContext.ts +6 -0
  169. package/src/features/accordion/public.ts +9 -0
  170. package/src/{patterns/auth → features/auth/adapters/inbound}/AuthForm.tsx +5 -5
  171. package/src/{patterns/auth → features/auth/adapters/inbound}/AuthFormField.tsx +4 -4
  172. package/src/{patterns/auth → features/auth/adapters/inbound}/ForgotPasswordForm.tsx +8 -8
  173. package/src/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderButton.tsx +4 -4
  174. package/src/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderList.tsx +3 -3
  175. package/src/{patterns/auth → features/auth/adapters/inbound}/OtpForm.tsx +6 -6
  176. package/src/{patterns/auth → features/auth/adapters/inbound}/SignInForm.tsx +8 -8
  177. package/src/{patterns/auth → features/auth/adapters/inbound}/SignUpForm.tsx +5 -5
  178. package/src/features/auth/forgotPasswordFormMeta.ts +49 -0
  179. package/src/features/auth/oauthProviderButtonMeta.ts +62 -0
  180. package/src/features/auth/oauthProviderListMeta.ts +67 -0
  181. package/src/features/auth/otpFormMeta.ts +55 -0
  182. package/src/features/auth/public.test.ts +34 -0
  183. package/src/{patterns/auth/index.ts → features/auth/public.ts} +12 -12
  184. package/src/features/auth/signInFormMeta.ts +63 -0
  185. package/src/features/auth/signUpFormMeta.ts +67 -0
  186. package/src/{patterns/auth/utils.ts → features/auth/utils/authForm.ts} +2 -2
  187. package/src/{patterns/auth → features/auth/utils}/oauthProviders.test.ts +1 -1
  188. package/src/{patterns/auth → features/auth/utils}/oauthProviders.ts +1 -1
  189. package/src/{components/gradient → features/gradient/adapters/inbound}/Gradient.tsx +3 -3
  190. package/src/{components/gradient → features/gradient/adapters/inbound}/GradientRendererContext.tsx +3 -2
  191. package/src/features/gradient/gradientMeta.ts +26 -0
  192. package/src/features/gradient/public.test.ts +15 -0
  193. package/src/{components/gradient/index.ts → features/gradient/public.ts} +3 -3
  194. package/src/index.ts +49 -42
  195. package/src/metadata/allowedChildren.ts +8 -0
  196. package/src/metadata/componentMeta.test.ts +16 -0
  197. package/src/metadata/componentMeta.ts +11 -11
  198. package/src/registry.ts +12 -11
  199. package/src/showcaseCoverage.test.ts +2 -1
  200. package/src/theme/themeScopeStructure.test.ts +10 -7
  201. package/src/types/accordion.ts +38 -0
  202. package/src/{patterns/auth/types.ts → types/auth.ts} +7 -7
  203. package/src/{components/gradient/types.ts → types/gradient.ts} +2 -2
  204. package/dist/components/gradient/Gradient.d.ts.map +0 -1
  205. package/dist/components/gradient/Gradient.js.map +0 -1
  206. package/dist/components/gradient/GradientRendererContext.d.ts.map +0 -1
  207. package/dist/components/gradient/GradientRendererContext.js.map +0 -1
  208. package/dist/components/gradient/index.d.ts +0 -4
  209. package/dist/components/gradient/index.d.ts.map +0 -1
  210. package/dist/components/gradient/index.js +0 -3
  211. package/dist/components/gradient/index.js.map +0 -1
  212. package/dist/components/gradient/meta.d.ts +0 -9
  213. package/dist/components/gradient/meta.d.ts.map +0 -1
  214. package/dist/components/gradient/meta.js +0 -9
  215. package/dist/components/gradient/meta.js.map +0 -1
  216. package/dist/components/gradient/types.d.ts.map +0 -1
  217. package/dist/components/gradient/types.js +0 -2
  218. package/dist/components/gradient/types.js.map +0 -1
  219. package/dist/patterns/auth/AuthForm.d.ts.map +0 -1
  220. package/dist/patterns/auth/AuthForm.js.map +0 -1
  221. package/dist/patterns/auth/AuthFormField.d.ts.map +0 -1
  222. package/dist/patterns/auth/AuthFormField.js.map +0 -1
  223. package/dist/patterns/auth/ForgotPasswordForm.d.ts.map +0 -1
  224. package/dist/patterns/auth/ForgotPasswordForm.js.map +0 -1
  225. package/dist/patterns/auth/OAuthProviderButton.d.ts.map +0 -1
  226. package/dist/patterns/auth/OAuthProviderButton.js.map +0 -1
  227. package/dist/patterns/auth/OAuthProviderList.d.ts.map +0 -1
  228. package/dist/patterns/auth/OAuthProviderList.js.map +0 -1
  229. package/dist/patterns/auth/OtpForm.d.ts.map +0 -1
  230. package/dist/patterns/auth/OtpForm.js.map +0 -1
  231. package/dist/patterns/auth/SignInForm.d.ts.map +0 -1
  232. package/dist/patterns/auth/SignInForm.js.map +0 -1
  233. package/dist/patterns/auth/SignUpForm.d.ts.map +0 -1
  234. package/dist/patterns/auth/SignUpForm.js.map +0 -1
  235. package/dist/patterns/auth/index.d.ts +0 -9
  236. package/dist/patterns/auth/index.d.ts.map +0 -1
  237. package/dist/patterns/auth/index.js +0 -8
  238. package/dist/patterns/auth/index.js.map +0 -1
  239. package/dist/patterns/auth/meta.d.ts +0 -49
  240. package/dist/patterns/auth/meta.d.ts.map +0 -1
  241. package/dist/patterns/auth/meta.js +0 -50
  242. package/dist/patterns/auth/meta.js.map +0 -1
  243. package/dist/patterns/auth/oauthProviders.d.ts.map +0 -1
  244. package/dist/patterns/auth/oauthProviders.js.map +0 -1
  245. package/dist/patterns/auth/types.d.ts.map +0 -1
  246. package/dist/patterns/auth/types.js +0 -2
  247. package/dist/patterns/auth/types.js.map +0 -1
  248. package/dist/patterns/auth/utils.d.ts.map +0 -1
  249. package/dist/patterns/auth/utils.js.map +0 -1
  250. package/dist/patterns/disclosure-section/DisclosureSection.d.ts +0 -9
  251. package/dist/patterns/disclosure-section/DisclosureSection.d.ts.map +0 -1
  252. package/dist/patterns/disclosure-section/DisclosureSection.js +0 -86
  253. package/dist/patterns/disclosure-section/DisclosureSection.js.map +0 -1
  254. package/dist/patterns/disclosure-section/index.d.ts +0 -3
  255. package/dist/patterns/disclosure-section/index.d.ts.map +0 -1
  256. package/dist/patterns/disclosure-section/index.js +0 -3
  257. package/dist/patterns/disclosure-section/index.js.map +0 -1
  258. package/dist/patterns/disclosure-section/meta.d.ts +0 -9
  259. package/dist/patterns/disclosure-section/meta.d.ts.map +0 -1
  260. package/dist/patterns/disclosure-section/meta.js +0 -9
  261. package/dist/patterns/disclosure-section/meta.js.map +0 -1
  262. package/dist/patterns/disclosure-section/types.d.ts +0 -15
  263. package/dist/patterns/disclosure-section/types.d.ts.map +0 -1
  264. package/dist/patterns/disclosure-section/types.js +0 -2
  265. package/dist/patterns/disclosure-section/types.js.map +0 -1
  266. package/src/components/gradient/meta.ts +0 -10
  267. package/src/patterns/auth/meta.ts +0 -57
  268. package/src/patterns/disclosure-section/DisclosureSection.tsx +0 -130
  269. package/src/patterns/disclosure-section/index.ts +0 -2
  270. package/src/patterns/disclosure-section/meta.ts +0 -10
  271. package/src/patterns/disclosure-section/types.ts +0 -16
  272. /package/dist/{patterns/auth → features/auth/utils}/oauthProviders.js +0 -0
@@ -1,8 +1,8 @@
1
1
  import type React from 'react';
2
2
  import type { StyleProp, ViewStyle } from 'react-native';
3
3
 
4
- import type { BoxProps } from '../../features/layout/public';
5
- import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
4
+ import type { BoxProps } from '../features/layout/public';
5
+ import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
6
6
 
7
7
  export type GradientColor = string;
8
8
  export type GradientColors = readonly [GradientColor, GradientColor, ...GradientColor[]];
@@ -1 +0,0 @@
1
- {"version":3,"file":"Gradient.d.ts","sourceRoot":"","sources":["../../../src/components/gradient/Gradient.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM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,CAAC,CAC5B;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,GAAG,CAAC,CACP,CACH;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Box } from '../../features/layout/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { useGradientRenderer } from './GradientRendererContext';\nimport type { GradientProps } from './types';\n\nfunction GradientInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy: _interactionPolicy,\n children,\n colors,\n locations,\n start,\n end,\n width = '100%',\n height,\n minHeight,\n radius,\n p,\n testID,\n}: GradientProps) {\n const gradientRenderer = useGradientRenderer();\n\n return (\n <Box\n height={height}\n minHeight={minHeight}\n radius={radius}\n testID={testID}\n width={width}\n style={{ overflow: 'hidden' }}\n >\n {React.createElement(\n gradientRenderer,\n {\n colors,\n end,\n locations,\n start,\n style: { flex: 1 },\n },\n <Box p={p} style={{ flex: 1 }}>\n {children}\n </Box>,\n )}\n </Box>\n );\n}\n\n/***\n * Gradient background container for branded loading surfaces, hero blocks, and previews.\n *\n * The host supplies a platform-compatible renderer through\n * `GradientRendererProvider`; ZORA does not require an Expo runtime.\n */\nexport const Gradient = withZoraThemeScope(GradientInner);\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"GradientRendererContext.d.ts","sourceRoot":"","sources":["../../../src/components/gradient/GradientRendererContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAElD,OAAO,KAAK,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAI/E;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,6BAA6B,qBAE7F;AAED,wBAAgB,mBAAmB,IAAI,gBAAgB,CAUtD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"GradientRendererContext.js","sourceRoot":"","sources":["../../../src/components/gradient/GradientRendererContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAIlD,MAAM,uBAAuB,GAAG,aAAa,CAA0B,IAAI,CAAC,CAAC;AAE7E;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAiC;IAC5F,OAAO,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,uBAAuB,CAAC,CAAC;AACxF,CAAC;AAED,MAAM,UAAU,mBAAmB;IACjC,MAAM,QAAQ,GAAG,GAAG,CAAC,uBAAuB,CAAC,CAAC;IAE9C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CACb,4HAA4H,CAC7H,CAAC;IACJ,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["import React, { createContext, use } from 'react';\n\nimport type { GradientRenderer, GradientRendererProviderProps } from './types';\n\nconst GradientRendererContext = createContext<GradientRenderer | null>(null);\n\n/**\n * Supplies the host-owned renderer used by `Gradient`.\n *\n * Expo apps can adapt `expo-linear-gradient` here, while standalone React\n * Native hosts can inject another compatible implementation.\n */\nexport function GradientRendererProvider({ children, renderer }: GradientRendererProviderProps) {\n return <GradientRendererContext value={renderer}>{children}</GradientRendererContext>;\n}\n\nexport function useGradientRenderer(): GradientRenderer {\n const renderer = use(GradientRendererContext);\n\n if (!renderer) {\n throw new Error(\n 'Gradient requires a renderer. Wrap the app in GradientRendererProvider with a platform-compatible gradient implementation.',\n );\n }\n\n return renderer;\n}\n"]}
@@ -1,4 +0,0 @@
1
- export { Gradient } from './Gradient';
2
- export { GradientRendererProvider } from './GradientRendererContext';
3
- export type { GradientColor, GradientColors, GradientLocations, GradientPoint, GradientProps, GradientRenderer, GradientRendererProps, GradientRendererProviderProps, } from './types';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/gradient/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,YAAY,EACV,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,SAAS,CAAC"}
@@ -1,3 +0,0 @@
1
- export { Gradient } from './Gradient';
2
- export { GradientRendererProvider } from './GradientRendererContext';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/gradient/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["export { Gradient } from './Gradient';\nexport { GradientRendererProvider } from './GradientRendererContext';\nexport type {\n GradientColor,\n GradientColors,\n GradientLocations,\n GradientPoint,\n GradientProps,\n GradientRenderer,\n GradientRendererProps,\n GradientRendererProviderProps,\n} from './types';\n"]}
@@ -1,9 +0,0 @@
1
- export declare const gradientMeta: {
2
- readonly name: "Gradient";
3
- readonly category: "component";
4
- readonly directManifestNode: false;
5
- readonly allowedChildren: readonly [];
6
- readonly note: "Gradient background container; not represented as a manifest node in v1.";
7
- readonly props: {};
8
- };
9
- //# sourceMappingURL=meta.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/components/gradient/meta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;;;;CAOa,CAAC"}
@@ -1,9 +0,0 @@
1
- export const gradientMeta = {
2
- name: 'Gradient',
3
- category: 'component',
4
- directManifestNode: false,
5
- allowedChildren: [],
6
- note: 'Gradient background container; not represented as a manifest node in v1.',
7
- props: {},
8
- };
9
- //# sourceMappingURL=meta.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/gradient/meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,0EAA0E;IAChF,KAAK,EAAE,EAAE;CAC2B,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nexport const gradientMeta = {\n name: 'Gradient',\n category: 'component',\n directManifestNode: false,\n allowedChildren: [],\n note: 'Gradient background container; not represented as a manifest node in v1.',\n props: {},\n} as const satisfies ZoraComponentMeta;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/gradient/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AACnC,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC,aAAa,EAAE,aAAa,EAAE,GAAG,aAAa,EAAE,CAAC,CAAC;AACzF,MAAM,MAAM,iBAAiB,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;AAEvE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,EAAE,cAAc,CAAC;IACvB,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;AAE1E,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;CAC5B;AAED,MAAM,WAAW,aAAc,SAAQ,aAAa;IAClD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,EAAE,cAAc,CAAC;IACvB,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,KAAK,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC1B,MAAM,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5B,SAAS,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5B,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;CACnB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/gradient/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\nimport type { StyleProp, ViewStyle } from 'react-native';\n\nimport type { BoxProps } from '../../features/layout/public';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport type GradientColor = string;\nexport type GradientColors = readonly [GradientColor, GradientColor, ...GradientColor[]];\nexport type GradientLocations = readonly [number, number, ...number[]];\n\nexport interface GradientPoint {\n readonly x: number;\n readonly y: number;\n}\n\nexport interface GradientRendererProps {\n children?: React.ReactNode;\n colors: GradientColors;\n locations?: GradientLocations;\n start?: GradientPoint;\n end?: GradientPoint;\n style?: StyleProp<ViewStyle>;\n}\n\nexport type GradientRenderer = React.ComponentType<GradientRendererProps>;\n\nexport interface GradientRendererProviderProps {\n children?: React.ReactNode;\n renderer: GradientRenderer;\n}\n\nexport interface GradientProps extends ZoraBaseProps {\n children?: React.ReactNode;\n colors: GradientColors;\n locations?: GradientLocations;\n start?: GradientPoint;\n end?: GradientPoint;\n width?: BoxProps['width'];\n height?: BoxProps['height'];\n minHeight?: BoxProps['minHeight'];\n radius?: BoxProps['radius'];\n p?: BoxProps['p'];\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"AuthForm.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/AuthForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGhF,UAAU,aAAa,CAAC,KAAK,SAAS,MAAM;IAC1C,MAAM,EAAE,SAAS,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;IAC1C,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IAC1B,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IAC9C,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,KAAK,IAAI,GAAG,OAAO,C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iB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;IACrF,OAAO,CACL,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAC5B;MAAA,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,EACxB;MAAA,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACrB,CAAC,aAAa,CACZ,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAChB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,KAAK,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CACrC,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CACnC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAC1B,CACH,CAAC,CACF;MAAA,CAAC,WAAW,CACV,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,GAAG,EAAE;YACb,IAAI,iBAAiB,KAAK,SAAS;gBAAE,KAAK,UAAU,CAAC,YAAY,EAAE,CAAC;QACtE,CAAC,CAAC,CACF,WAAW,CAAC,CAAC,WAAW,CAAC,CAEzB;QAAA,CAAC,OAAO,CACV;MAAA,EAAE,WAAW,CACf;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport { FormActions, FormError, useFormController } from '../../features/form/public';\nimport { Stack } from '../../features/layout/public';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\nimport type { FormErrors, FormFieldConfig, FormValues } from '../../types/form';\nimport { AuthFormField } from './AuthFormField';\n\ninterface AuthFormProps<TName extends string> {\n fields: readonly FormFieldConfig<TName>[];\n values: FormValues<TName>;\n onChange: (values: FormValues<TName>) => void;\n onSubmit: (values: FormValues<TName>) => void | Promise<void>;\n errors?: FormErrors<TName>;\n error?: React.ReactNode;\n loading?: boolean;\n disabled?: boolean;\n submitLabel?: React.ReactNode;\n actions?: React.ReactNode;\n testID?: string;\n interactionPolicy?: ZoraBaseProps['interactionPolicy'];\n}\n\n/*** Keeps config-driven field orchestration private to the auth patterns that own it. */\nexport function AuthForm<TName extends string>({\n fields,\n values,\n onChange,\n onSubmit,\n errors,\n error,\n loading = false,\n disabled = false,\n submitLabel = 'Submit',\n actions,\n testID,\n interactionPolicy,\n}: AuthFormProps<TName>) {\n const controller = useFormController({ fields, values, errors, onChange, onSubmit });\n return (\n <Stack gap=\"m\" testID={testID}>\n <FormError error={error} />\n {fields.map((field) => (\n <AuthFormField\n key={field.name}\n disabled={disabled}\n error={controller.errors[field.name]}\n field={field}\n interactionPolicy={interactionPolicy}\n loading={loading}\n onChange={controller.setFieldValue}\n value={values[field.name]}\n />\n ))}\n <FormActions\n disabled={disabled}\n interactionPolicy={interactionPolicy}\n loading={loading}\n onSubmit={() => {\n if (interactionPolicy !== 'passive') void controller.handleSubmit();\n }}\n submitLabel={submitLabel}\n >\n {actions}\n </FormActions>\n </Stack>\n );\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"AuthFormField.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/AuthFormField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExE,UAAU,kBAAkB,C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K,CAAC,IAAI,KAAK,UAAU,CAAC,CACpE,eAAe,CAAC,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAC/C,KAAK,CAAC,CAAC,KAAK,CAAC,EAEjB;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC;AAED,qEAAqE;AACrE,SAAS,mBAAmB,CAAC,KAAsB;IACjD,IAAI,KAAK,CAAC,YAAY;QAAE,OAAO,KAAK,CAAC,YAAY,CAAC;IAClD,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO;QAAE,OAAO,eAAe,CAAC;IACnD,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK;QAAE,OAAO,YAAY,CAAC;IACzE,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK;QAAE,OAAO,WAAW,CAAC;IAC7C,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IACvC,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,6EAA6E;AAC7E,SAAS,sBAAsB,CAAC,KAAsB;IACpD,IAAI,KAAK,CAAC,eAAe;QAAE,OAAO,KAAK,CAAC,eAAe,CAAC;IACxD,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO;QAAE,OAAO,cAAc,CAAC;IAClD,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU;QAAE,OAAO,UAAU,CAAC;IACjD,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK;QAAE,OAAO,aAAa,CAAC;IAC/C,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import React from 'react';\n\nimport { FormField, hasRequiredRule } from '../../features/form/public';\nimport { TextInput } from '../../features/form/text-input/public';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\nimport type { FormFieldConfig, FormFieldValue } from '../../types/form';\n\ninterface AuthFormFieldProps<TName extends string> {\n field: FormFieldConfig<TName>;\n value: FormFieldValue;\n onChange: (name: TName, value: FormFieldValue) => void;\n error?: React.ReactNode;\n disabled?: boolean;\n loading?: boolean;\n interactionPolicy?: ZoraBaseProps['interactionPolicy'];\n}\n\n/*** Adapts an auth field configuration to the public compositional form primitives. */\nexport function AuthFormField<TName extends string>({\n field,\n value,\n onChange,\n error,\n disabled = false,\n loading = false,\n interactionPolicy,\n}: AuthFormFieldProps<TName>) {\n const fieldDisabled = disabled || loading || field.disabled;\n return (\n <FormField\n description={field.description}\n disabled={fieldDisabled}\n errorText={error}\n helperText={field.helperText}\n invalid={Boolean(error)}\n label={field.label}\n readOnly={field.readOnly}\n required={field.required ?? hasRequiredRule(field.rules)}\n testID={field.testID}\n >\n <TextInput\n accessibilityLabel={typeof field.label === 'string' ? field.label : undefined}\n autoCapitalize={\n field.autoCapitalize ??\n (['email', 'password', 'url'].includes(field.type ?? 'text') ? 'none' : undefined)\n }\n autoComplete={field.autoComplete}\n disabled={fieldDisabled}\n interactionPolicy={interactionPolicy}\n invalid={Boolean(error)}\n keyboardType={resolveKeyboardType(field)}\n maxLength={field.maxLength}\n onChangeText={(nextValue) => onChange(field.name, nextValue)}\n placeholder={field.placeholder}\n readOnly={field.readOnly}\n secureTextEntry={field.secureTextEntry ?? field.type === 'password'}\n textContentType={resolveTextContentType(field)}\n value={value}\n />\n </FormField>\n );\n}\n\n/*** Resolves the native keyboard for an auth field configuration. */\nfunction resolveKeyboardType(field: FormFieldConfig) {\n if (field.keyboardType) return field.keyboardType;\n if (field.type === 'email') return 'email-address';\n if (field.type === 'number' || field.type === 'otp') return 'number-pad';\n if (field.type === 'tel') return 'phone-pad';\n if (field.type === 'url') return 'url';\n return undefined;\n}\n\n/*** Resolves platform text-content hints for an auth field configuration. */\nfunction resolveTextContentType(field: FormFieldConfig) {\n if (field.textContentType) return field.textContentType;\n if (field.type === 'email') return 'emailAddress';\n if (field.type === 'password') return 'password';\n if (field.type === 'otp') return 'oneTimeCode';\n return undefined;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ForgotPasswordForm.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/ForgotPasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAqFvD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,+DAA8C,CAAC"}
@@ -1 +0,0 @@
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,8BAA8B,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,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,iBAAiB,EACjB,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,MAAM,GACkB;IACxB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAsC;QAC9E,UAAU,EAAE,EAAE;KACf,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAC1B,GAAG,EAAE,CAAC;QACJ;YACE,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,eAAe,IAAI,sBAAsB,CAAC,WAAW,CAAC;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AAC,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;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,uBAAuB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Button } from '../../features/button/public';\nimport { Stack } from '../../features/layout/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { FormFieldConfig, FormValues } from '../../types/form';\nimport { AuthForm } from './AuthForm';\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 interactionPolicy,\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 <AuthForm\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 interactionPolicy={interactionPolicy}\n >\n {signInLabel}\n </Button>\n </Stack>\n ) : undefined\n }\n disabled={disabled}\n error={error}\n fields={fields}\n interactionPolicy={interactionPolicy}\n loading={loading}\n onChange={setValues}\n onSubmit={handleSubmit}\n submitLabel={submitLabel}\n testID={testID}\n values={values}\n />\n );\n}\n\n/***\n * Password reset form pattern with validation and submit actions.\n *\n \n */\nexport const ForgotPasswordForm = withZoraThemeScope(ForgotPasswordFormInner);\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"OAuthProviderButton.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/OAuthProviderButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAyCxD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,gEAA+C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"OAuthProviderButton.js","sourceRoot":"","sources":["../../../src/patterns/auth/OAuthProviderButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAGvF,SAAS,wBAAwB,CAAC,EAChC,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EACjB,UAAU,EACV,KAAK,EACL,IAAI,EACJ,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,KAAK,EACf,SAAS,GAAG,IAAI,EAChB,IAAI,GAAG,GAAG,EACV,OAAO,GAAG,SAAS,EACnB,KAAK,GAAG,SAAS,EACjB,OAAO,EACP,MAAM,GACmB;IACzB,MAAM,YAAY,GAAG,IAAI,IAAI,wBAAwB,CAAC,UAAU,CAAC,CAAC;IAClE,MAAM,aAAa,GAAG,KAAK,IAAI,iBAAiB,yBAAyB,CAAC,UAAU,CAAC,EAAE,CAAC;IAExF,OAAO,CACL,CAAC,MAAM,CACL,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,QAAQ,CAAC,CAAC,QAAQ,IAAI,OAAO,IAAI,OAAO,KAAK,SAAS,CAAC,CACvD,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,WAAW,CAAC,CAAC,YAAY,CAAC,CAC1B,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,OAAO,CAAC,CAAC,GAAG,EAAE;YACZ,KAAK,OAAO,EAAE,CAAC,UAAU,CAAC,CAAC;QAC7B,CAAC,CAAC,CACF,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,OAAO,CAAC,CAAC,OAAO,CAAC,CAEjB;MAAA,CAAC,aAAa,CAChB;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,wBAAwB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Button } from '../../features/button/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { resolveOAuthProviderIcon, resolveOAuthProviderLabel } from './oauthProviders';\nimport type { OAuthProviderButtonProps } from './types';\n\nfunction OAuthProviderButtonInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy,\n providerId,\n label,\n icon,\n disabled = false,\n loading = false,\n fullWidth = true,\n size = 'l',\n variant = 'outline',\n color = 'neutral',\n onPress,\n testID,\n}: OAuthProviderButtonProps) {\n const resolvedIcon = icon ?? resolveOAuthProviderIcon(providerId);\n const resolvedLabel = label ?? `Continue with ${resolveOAuthProviderLabel(providerId)}`;\n\n return (\n <Button\n color={color}\n disabled={disabled || loading || onPress === undefined}\n fullWidth={fullWidth}\n interactionPolicy={interactionPolicy}\n leadingIcon={resolvedIcon}\n loading={loading}\n onPress={() => {\n void onPress?.(providerId);\n }}\n size={size}\n testID={testID}\n variant={variant}\n >\n {resolvedLabel}\n </Button>\n );\n}\n\n/***\n * Renders a provider-branded OAuth action button without owning auth behavior.\n *\n * The component only renders UI and forwards the provider id through `onPress`.\n * Adapters, redirects, and callback handling belong to app/runtime layers.\n */\nexport const OAuthProviderButton = withZoraThemeScope(OAuthProviderButtonInner);\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"OAuthProviderList.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/OAuthProviderList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AA+CtD;;GAEG;AACH,eAAO,MAAM,iBAAiB,8DAA6C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"OAuthProviderList.js","sourceRoot":"","sources":["../../../src/patterns/auth/OAuthProviderList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,SAAS,sBAAsB,CAAC,EAC9B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EACjB,SAAS,EACT,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,KAAK,EACf,SAAS,EACT,MAAM,GAAG,OAAO,EAChB,IAAI,EACJ,OAAO,EACP,KAAK,EACL,eAAe,EACf,MAAM,GACiB;IACvB,MAA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from '../../theme/withZoraThemeScope';\nimport { OAuthProviderButton } from './OAuthProviderButton';\nimport type { OAuthProviderListProps } from './types';\n\nfunction OAuthProviderListInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy,\n providers,\n disabled = false,\n loading = false,\n fullWidth,\n layout = 'stack',\n size,\n variant,\n color,\n onProviderPress,\n testID,\n}: OAuthProviderListProps) {\n const direction = layout === 'inline' ? 'row' : 'column';\n const resolvedFullWidth = fullWidth ?? layout === 'stack';\n\n return (\n <Stack\n direction={direction}\n gap=\"s\"\n testID={testID}\n wrap={layout === 'inline' ? 'wrap' : undefined}\n >\n {providers.map((provider) => (\n <OAuthProviderButton\n color={color}\n disabled={disabled || provider.disabled}\n fullWidth={resolvedFullWidth}\n icon={provider.icon}\n key={provider.id}\n label={provider.label}\n loading={loading || provider.loading}\n onPress={onProviderPress}\n providerId={provider.id}\n size={size}\n variant={variant}\n interactionPolicy={interactionPolicy}\n />\n ))}\n </Stack>\n );\n}\n\n/***\n * Renders a group of OAuth provider buttons for sign-in and auth settings flows.\n */\nexport const OAuthProviderList = withZoraThemeScope(OAuthProviderListInner);\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"OtpForm.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/OtpForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAiF5C;;;;GAIG;AACH,eAAO,MAAM,OAAO,oDAAmC,CAAC"}
@@ -1 +0,0 @@
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,8BAA8B,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCA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AAS,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CACxC;YAAA,CAAC,MAAM,CACL,QAAQ,CAAC,CAAC,QAAQ,IAAI,OAAO,IAAI,cAAc,CAAC,CAChD,OAAO,CAAC,OAAO,CACf,OAAO,CAAC,CAAC,aAAa,CAAC,CACvB,OAAO,CAAC,CAAC,GAAG,EAAE;gBACZ,KAAK,QAAQ,EAAE,CAAC;YAClB,CAAC,CAAC,CACF,IAAI,CAAC,GAAG,CACR,KAAK,CAAC,SAAS,CACf,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CAErC;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,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,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;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Button } from '../../features/button/public';\nimport { Stack } from '../../features/layout/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { FormFieldConfig, FormValues } from '../../types/form';\nimport { AuthForm } from './AuthForm';\nimport type { OtpFormProps } from './types';\n\ntype OtpFieldName = 'otp';\n\nfunction OtpFormInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy,\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 <AuthForm\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 interactionPolicy={interactionPolicy}\n >\n {resendLabel}\n </Button>\n </Stack>\n ) : undefined\n }\n disabled={disabled}\n error={error}\n fields={fields}\n interactionPolicy={interactionPolicy}\n loading={loading}\n onChange={setValues}\n onSubmit={handleSubmit}\n submitLabel={submitLabel}\n testID={testID}\n values={values}\n />\n );\n}\n\n/***\n * One-time passcode form pattern with digit input and submit actions.\n *\n \n */\nexport const OtpForm = withZoraThemeScope(OtpFormInner);\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SignInForm.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/SignInForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAiH/C;;;;GAIG;AACH,eAAO,MAAM,UAAU,uDAAsC,CAAC"}
@@ -1 +0,0 @@
1
- {"version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O,CACf,OAAO,CAAC,CAAC,GAAG,EAAE;oBACZ,KAAK,QAAQ,EAAE,CAAC;gBAClB,CAAC,CAAC,CACF,IAAI,CAAC,GAAG,CACR,KAAK,CAAC,SAAS,CACf,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CAErC;gBAAA,CAAC,WAAW,CACd;cAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,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,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,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;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Button } from '../../features/button/public';\nimport { Stack } from '../../features/layout/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { FormFieldConfig, FormValues } from '../../types/form';\nimport { AuthForm } from './AuthForm';\nimport type { SignInFormProps } from './types';\nimport {\n defaultIdentifiers,\n normalizeIdentifierKind,\n resolveIdentifierLabel,\n resolveIdentifierRules,\n resolveIdentifierType,\n} from './utils';\n\ntype SignInFieldName = 'identifier' | 'secret';\n\nfunction SignInFormInner({\n themeId: _themeId,\n interactionPolicy,\n mode: _mode,\n identifiers = defaultIdentifiers,\n identifierLabel,\n secretLabel = 'Password',\n forgotPasswordLabel = 'Forgot password',\n signUpLabel = 'Sign up',\n loading = false,\n disabled = false,\n error,\n submitLabel = 'Sign in',\n onSubmit,\n onForgotPassword,\n onSignUp,\n testID,\n}: SignInFormProps) {\n const [values, setValues] = React.useState<FormValues<SignInFieldName>>({\n identifier: '',\n secret: '',\n });\n const hasActions = Boolean(onForgotPassword ?? onSignUp);\n const fields = React.useMemo<readonly FormFieldConfig<SignInFieldName>[]>(\n () => [\n {\n name: 'identifier',\n label: identifierLabel ?? resolveIdentifierLabel(identifiers),\n type: resolveIdentifierType(identifiers),\n autoCapitalize: 'none',\n rules: resolveIdentifierRules(identifiers),\n },\n {\n name: 'secret',\n label: secretLabel,\n type: 'password',\n rules: [{ kind: 'required' }],\n },\n ],\n [identifierLabel, identifiers, secretLabel],\n );\n\n const handleSubmit = React.useCallback(\n (formValues: FormValues<SignInFieldName>) =>\n onSubmit({\n identifier: formValues.identifier.trim(),\n identifierKind: normalizeIdentifierKind(formValues.identifier, identifiers),\n secret: formValues.secret,\n }),\n [identifiers, onSubmit],\n );\n\n return (\n <AuthForm\n actions={\n hasActions ? (\n <Stack direction=\"row\" gap=\"s\" wrap=\"wrap\">\n {onForgotPassword ? (\n <Button\n disabled={disabled || loading}\n variant=\"ghost\"\n onPress={() => {\n void onForgotPassword();\n }}\n size=\"s\"\n color=\"neutral\"\n interactionPolicy={interactionPolicy}\n >\n {forgotPasswordLabel}\n </Button>\n ) : null}\n {onSignUp ? (\n <Button\n disabled={disabled || loading}\n variant=\"ghost\"\n onPress={() => {\n void onSignUp();\n }}\n size=\"s\"\n color=\"neutral\"\n interactionPolicy={interactionPolicy}\n >\n {signUpLabel}\n </Button>\n ) : null}\n </Stack>\n ) : undefined\n }\n disabled={disabled}\n error={error}\n fields={fields}\n interactionPolicy={interactionPolicy}\n loading={loading}\n onChange={setValues}\n onSubmit={handleSubmit}\n submitLabel={submitLabel}\n testID={testID}\n values={values}\n />\n );\n}\n\n/***\n * Sign-in form pattern with identifier and password fields.\n *\n \n */\nexport const SignInForm = withZoraThemeScope(SignInFormInner);\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SignUpForm.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/SignUpForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA6E/C;;;;GAIG;AACH,eAAO,MAAM,UAAU,uDAAsC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SignUpForm.js","sourceRoot":"","sources":["../../../src/patterns/auth/SignUpForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,MAAM,mBAAmB,GAAG;IAC1B;QACE,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,OAAO;QACb,cAAc,EAAE,MAAM;QACtB,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;KACjD;IACD;QACE,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,UAAU;QACjB,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;KAC/D;CAC4C,CAAC;AAEhD,SAAS,YAAY,CAAC,MAAkC;IACtD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAyB,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE;QACzE,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,GA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CACjB,QAAQ,CAAC,CAAC,SAAS,CAAC,CACpB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Button } from '../../features/button/public';\nimport { Stack } from '../../features/layout/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { FormFieldConfig, FormValues } from '../../types/form';\nimport { AuthForm } from './AuthForm';\nimport type { SignUpFormProps } from './types';\n\nconst defaultSignUpFields = [\n {\n name: 'email',\n label: 'Email',\n type: 'email',\n autoCapitalize: 'none',\n rules: [{ kind: 'required' }, { kind: 'email' }],\n },\n {\n name: 'password',\n label: 'Password',\n type: 'password',\n rules: [{ kind: 'required' }, { kind: 'minLength', value: 8 }],\n },\n] as const satisfies readonly FormFieldConfig[];\n\nfunction createValues(fields: readonly FormFieldConfig[]): FormValues {\n const values = fields.reduce<Record<string, string>>((nextValues, field) => {\n nextValues[field.name] = '';\n return nextValues;\n }, {});\n\n return values;\n}\n\nfunction SignUpFormInner({\n themeId: _themeId,\n interactionPolicy,\n mode: _mode,\n fields = defaultSignUpFields,\n signInLabel = 'Sign in',\n loading = false,\n disabled = false,\n error,\n submitLabel = 'Sign up',\n onSubmit,\n onSignIn,\n testID,\n}: SignUpFormProps) {\n const [values, setValues] = React.useState<FormValues>(() => createValues(fields));\n\n return (\n <AuthForm\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 interactionPolicy={interactionPolicy}\n >\n {signInLabel}\n </Button>\n </Stack>\n ) : undefined\n }\n disabled={disabled}\n error={error}\n fields={fields}\n interactionPolicy={interactionPolicy}\n loading={loading}\n onChange={setValues}\n onSubmit={onSubmit}\n submitLabel={submitLabel}\n testID={testID}\n values={values}\n />\n );\n}\n\n/***\n * Sign-up form pattern with structured fields and validation.\n *\n \n */\nexport const SignUpForm = withZoraThemeScope(SignUpFormInner);\n"]}
@@ -1,9 +0,0 @@
1
- export { ForgotPasswordForm } from './ForgotPasswordForm';
2
- export { OAuthProviderButton } from './OAuthProviderButton';
3
- export { OAuthProviderList } from './OAuthProviderList';
4
- export { DEFAULT_OAUTH_PROVIDER_ICONS, resolveOAuthProviderIcon, resolveOAuthProviderLabel, } from './oauthProviders';
5
- export { OtpForm } from './OtpForm';
6
- export { SignInForm } from './SignInForm';
7
- export { SignUpForm } from './SignUpForm';
8
- export type { AuthFormBaseProps, AuthIdentifierKind, ForgotPasswordFormProps, ForgotPasswordFormValues, OAuthProviderButtonProps, OAuthProviderIconSpec, OAuthProviderItem, OAuthProviderListLayout, OAuthProviderListProps, OtpFormProps, OtpFormValues, SignInFormProps, SignInFormValues, SignUpFormField, SignUpFormProps, SignUpFormValues, } from './types';
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EACV,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,sBAAsB,EACtB,YAAY,EACZ,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,gBAAgB,GACjB,MAAM,SAAS,CAAC"}
@@ -1,8 +0,0 @@
1
- export { ForgotPasswordForm } from './ForgotPasswordForm';
2
- export { OAuthProviderButton } from './OAuthProviderButton';
3
- export { OAuthProviderList } from './OAuthProviderList';
4
- export { DEFAULT_OAUTH_PROVIDER_ICONS, resolveOAuthProviderIcon, resolveOAuthProviderLabel, } from './oauthProviders';
5
- export { OtpForm } from './OtpForm';
6
- export { SignInForm } from './SignInForm';
7
- export { SignUpForm } from './SignUpForm';
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/patterns/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export { ForgotPasswordForm } from './ForgotPasswordForm';\nexport { OAuthProviderButton } from './OAuthProviderButton';\nexport { OAuthProviderList } from './OAuthProviderList';\nexport {\n DEFAULT_OAUTH_PROVIDER_ICONS,\n resolveOAuthProviderIcon,\n resolveOAuthProviderLabel,\n} from './oauthProviders';\nexport { OtpForm } from './OtpForm';\nexport { SignInForm } from './SignInForm';\nexport { SignUpForm } from './SignUpForm';\nexport type {\n AuthFormBaseProps,\n AuthIdentifierKind,\n ForgotPasswordFormProps,\n ForgotPasswordFormValues,\n OAuthProviderButtonProps,\n OAuthProviderIconSpec,\n OAuthProviderItem,\n OAuthProviderListLayout,\n OAuthProviderListProps,\n OtpFormProps,\n OtpFormValues,\n SignInFormProps,\n SignInFormValues,\n SignUpFormField,\n SignUpFormProps,\n SignUpFormValues,\n} from './types';\n"]}
@@ -1,49 +0,0 @@
1
- export declare const forgotPasswordFormMeta: {
2
- readonly name: "ForgotPasswordForm";
3
- readonly category: "pattern";
4
- readonly directManifestNode: false;
5
- readonly allowedChildren: readonly [];
6
- readonly note: "Auth pattern component; not represented as a manifest node in v1.";
7
- readonly props: {};
8
- };
9
- export declare const oauthProviderButtonMeta: {
10
- readonly name: "OAuthProviderButton";
11
- readonly category: "pattern";
12
- readonly directManifestNode: false;
13
- readonly allowedChildren: readonly [];
14
- readonly note: "Auth pattern component; not represented as a manifest node in v1.";
15
- readonly props: {};
16
- };
17
- export declare const oauthProviderListMeta: {
18
- readonly name: "OAuthProviderList";
19
- readonly category: "pattern";
20
- readonly directManifestNode: false;
21
- readonly allowedChildren: readonly [];
22
- readonly note: "Auth pattern component; not represented as a manifest node in v1.";
23
- readonly props: {};
24
- };
25
- export declare const otpFormMeta: {
26
- readonly name: "OtpForm";
27
- readonly category: "pattern";
28
- readonly directManifestNode: false;
29
- readonly allowedChildren: readonly [];
30
- readonly note: "Auth pattern component; not represented as a manifest node in v1.";
31
- readonly props: {};
32
- };
33
- export declare const signInFormMeta: {
34
- readonly name: "SignInForm";
35
- readonly category: "pattern";
36
- readonly directManifestNode: false;
37
- readonly allowedChildren: readonly [];
38
- readonly note: "Auth pattern component; not represented as a manifest node in v1.";
39
- readonly props: {};
40
- };
41
- export declare const signUpFormMeta: {
42
- readonly name: "SignUpForm";
43
- readonly category: "pattern";
44
- readonly directManifestNode: false;
45
- readonly allowedChildren: readonly [];
46
- readonly note: "Auth pattern component; not represented as a manifest node in v1.";
47
- readonly props: {};
48
- };
49
- //# sourceMappingURL=meta.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/meta.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB;;;;;;;CAOG,CAAC;AAEvC,eAAO,MAAM,uBAAuB;;;;;;;CAOE,CAAC;AAEvC,eAAO,MAAM,qBAAqB;;;;;;;CAOI,CAAC;AAEvC,eAAO,MAAM,WAAW;;;;;;;CAOc,CAAC;AAEvC,eAAO,MAAM,cAAc;;;;;;;CAOW,CAAC;AAEvC,eAAO,MAAM,cAAc;;;;;;;CAOW,CAAC"}
@@ -1,50 +0,0 @@
1
- const AUTH_NOTE = 'Auth pattern component; not represented as a manifest node in v1.';
2
- export const forgotPasswordFormMeta = {
3
- name: 'ForgotPasswordForm',
4
- category: 'pattern',
5
- directManifestNode: false,
6
- allowedChildren: [],
7
- note: AUTH_NOTE,
8
- props: {},
9
- };
10
- export const oauthProviderButtonMeta = {
11
- name: 'OAuthProviderButton',
12
- category: 'pattern',
13
- directManifestNode: false,
14
- allowedChildren: [],
15
- note: AUTH_NOTE,
16
- props: {},
17
- };
18
- export const oauthProviderListMeta = {
19
- name: 'OAuthProviderList',
20
- category: 'pattern',
21
- directManifestNode: false,
22
- allowedChildren: [],
23
- note: AUTH_NOTE,
24
- props: {},
25
- };
26
- export const otpFormMeta = {
27
- name: 'OtpForm',
28
- category: 'pattern',
29
- directManifestNode: false,
30
- allowedChildren: [],
31
- note: AUTH_NOTE,
32
- props: {},
33
- };
34
- export const signInFormMeta = {
35
- name: 'SignInForm',
36
- category: 'pattern',
37
- directManifestNode: false,
38
- allowedChildren: [],
39
- note: AUTH_NOTE,
40
- props: {},
41
- };
42
- export const signUpFormMeta = {
43
- name: 'SignUpForm',
44
- category: 'pattern',
45
- directManifestNode: false,
46
- allowedChildren: [],
47
- note: AUTH_NOTE,
48
- props: {},
49
- };
50
- //# sourceMappingURL=meta.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/patterns/auth/meta.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAG,mEAAmE,CAAC;AAEtF,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,oBAAoB;IAC1B,QAAQ,EAAE,SAAS;IACnB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,EAAE;CAC2B,CAAC;AAEvC,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,IAAI,EAAE,qBAAqB;IAC3B,QAAQ,EAAE,SAAS;IACnB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,EAAE;CAC2B,CAAC;AAEvC,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,IAAI,EAAE,mBAAmB;IACzB,QAAQ,EAAE,SAAS;IACnB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,EAAE;CAC2B,CAAC;AAEvC,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,SAAS;IACnB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,EAAE;CAC2B,CAAC;AAEvC,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,SAAS;IACnB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,EAAE;CAC2B,CAAC;AAEvC,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,SAAS;IACnB,kBAAkB,EAAE,KAAK;IACzB,eAAe,EAAE,EAAE;IACnB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,EAAE;CAC2B,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nconst AUTH_NOTE = 'Auth pattern component; not represented as a manifest node in v1.';\n\nexport const forgotPasswordFormMeta = {\n name: 'ForgotPasswordForm',\n category: 'pattern',\n directManifestNode: false,\n allowedChildren: [],\n note: AUTH_NOTE,\n props: {},\n} as const satisfies ZoraComponentMeta;\n\nexport const oauthProviderButtonMeta = {\n name: 'OAuthProviderButton',\n category: 'pattern',\n directManifestNode: false,\n allowedChildren: [],\n note: AUTH_NOTE,\n props: {},\n} as const satisfies ZoraComponentMeta;\n\nexport const oauthProviderListMeta = {\n name: 'OAuthProviderList',\n category: 'pattern',\n directManifestNode: false,\n allowedChildren: [],\n note: AUTH_NOTE,\n props: {},\n} as const satisfies ZoraComponentMeta;\n\nexport const otpFormMeta = {\n name: 'OtpForm',\n category: 'pattern',\n directManifestNode: false,\n allowedChildren: [],\n note: AUTH_NOTE,\n props: {},\n} as const satisfies ZoraComponentMeta;\n\nexport const signInFormMeta = {\n name: 'SignInForm',\n category: 'pattern',\n directManifestNode: false,\n allowedChildren: [],\n note: AUTH_NOTE,\n props: {},\n} as const satisfies ZoraComponentMeta;\n\nexport const signUpFormMeta = {\n name: 'SignUpForm',\n category: 'pattern',\n directManifestNode: false,\n allowedChildren: [],\n note: AUTH_NOTE,\n props: {},\n} as const satisfies ZoraComponentMeta;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"oauthProviders.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/oauthProviders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;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const DEFAULT_OAUTH_PROVIDER_ICONS = {\n apple: { provider: 'FontAwesome', name: 'apple' },\n azure: { provider: 'FontAwesome5', name: 'microsoft', variant: 'brand' },\n bitbucket: { provider: 'FontAwesome', name: 'bitbucket' },\n discord: { provider: 'FontAwesome5', name: 'discord', variant: 'brand' },\n facebook: { provider: 'FontAwesome', name: 'facebook' },\n figma: { provider: 'FontAwesome5', name: 'figma', variant: 'brand' },\n github: { provider: 'FontAwesome', name: 'github' },\n gitlab: { provider: 'FontAwesome5', name: 'gitlab', variant: 'brand' },\n google: { provider: 'FontAwesome', name: 'google' },\n linkedin: { provider: 'FontAwesome', name: 'linkedin' },\n microsoft: { provider: 'FontAwesome5', name: 'microsoft', variant: 'brand' },\n slack: { provider: 'FontAwesome5', name: 'slack', variant: 'brand' },\n spotify: { provider: 'FontAwesome', name: 'spotify' },\n twitch: { provider: 'FontAwesome5', name: 'twitch', variant: 'brand' },\n twitter: { provider: 'FontAwesome', name: 'twitter' },\n x: { provider: 'FontAwesome6', name: 'x-twitter', variant: 'brand' },\n zoom: { provider: 'FontAwesome5', name: 'video', variant: 'solid' },\n} as const satisfies Record<string, OAuthProviderIconSpec>;\n\nconst DEFAULT_OAUTH_PROVIDER_LABELS = {\n apple: 'Apple',\n azure: 'Microsoft',\n bitbucket: 'Bitbucket',\n discord: 'Discord',\n facebook: 'Facebook',\n figma: 'Figma',\n github: 'GitHub',\n gitlab: 'GitLab',\n google: 'Google',\n kakao: 'Kakao',\n keycloak: 'Keycloak',\n linkedin: 'LinkedIn',\n microsoft: 'Microsoft',\n notion: 'Notion',\n slack: 'Slack',\n spotify: 'Spotify',\n twitch: 'Twitch',\n twitter: 'Twitter',\n workos: 'WorkOS',\n x: 'X',\n zoom: 'Zoom',\n} as const satisfies Record<string, string>;\n\nconst oauthProviderIcons = new Map<string, OAuthProviderIconSpec>(\n Object.entries(DEFAULT_OAUTH_PROVIDER_ICONS),\n);\nconst oauthProviderLabels = new Map<string, string>(Object.entries(DEFAULT_OAUTH_PROVIDER_LABELS));\n\nexport function resolveOAuthProviderIcon(providerId: string): OAuthProviderIconSpec | undefined {\n return oauthProviderIcons.get(normalizeOAuthProviderId(providerId));\n}\n\nexport function resolveOAuthProviderLabel(providerId: string): string {\n const normalizedProviderId = normalizeOAuthProviderId(providerId);\n const knownLabel = oauthProviderLabels.get(normalizedProviderId);\n\n return knownLabel ?? titleCaseProviderId(normalizedProviderId);\n}\n\nfunction normalizeOAuthProviderId(providerId: string): string {\n return providerId.trim().toLowerCase();\n}\n\nfunction titleCaseProviderId(providerId: string): string {\n const words = providerId\n .split(/[-_\\s]+/u)\n .map((word) => word.trim())\n .filter((word) => word.length > 0);\n\n if (words.length === 0) {\n return 'Provider';\n }\n\n return words.map((word) => `${word.charAt(0).toUpperCase()}${word.slice(1)}`).join(' ');\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEpE,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC;AAEhE,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAA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AE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACjC,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,OAAO,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxD;AAED,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEzD,MAAM,WAAW,sBAAuB,SAAQ,aAAa;IAC3D,SAAS,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACjC,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/auth/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonIconSpec } from '@ankhorage/surface';\nimport type React from 'react';\n\nimport type { ButtonProps } from '../../features/button/public';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\nimport type { FormFieldConfig, FormValues } from '../../types/form';\n\nexport type AuthIdentifierKind = 'email' | 'phone' | 'username';\n\nexport interface AuthFormBaseProps extends ZoraBaseProps {\n loading?: boolean;\n disabled?: boolean;\n error?: React.ReactNode;\n submitLabel?: React.ReactNode;\n}\n\nexport interface SignInFormValues {\n identifier: string;\n identifierKind: AuthIdentifierKind;\n secret: string;\n}\n\nexport interface SignInFormProps extends AuthFormBaseProps {\n identifiers?: readonly AuthIdentifierKind[];\n identifierLabel?: React.ReactNode;\n secretLabel?: React.ReactNode;\n forgotPasswordLabel?: React.ReactNode;\n signUpLabel?: React.ReactNode;\n onSubmit: (values: SignInFormValues) => void | Promise<void>;\n onForgotPassword?: () => void | Promise<void>;\n onSignUp?: () => void | Promise<void>;\n}\n\nexport type SignUpFormValues = FormValues;\nexport type SignUpFormField = FormFieldConfig;\n\nexport interface SignUpFormProps extends AuthFormBaseProps {\n fields?: readonly SignUpFormField[];\n signInLabel?: React.ReactNode;\n onSubmit: (values: SignUpFormValues) => void | Promise<void>;\n onSignIn?: () => void | Promise<void>;\n}\n\nexport interface ForgotPasswordFormValues {\n identifier: string;\n identifierKind: AuthIdentifierKind;\n}\n\nexport interface ForgotPasswordFormProps extends AuthFormBaseProps {\n identifiers?: readonly AuthIdentifierKind[];\n identifierLabel?: React.ReactNode;\n signInLabel?: React.ReactNode;\n onSubmit: (values: ForgotPasswordFormValues) => void | Promise<void>;\n onSignIn?: () => void | Promise<void>;\n}\n\nexport interface OtpFormValues {\n otp: string;\n}\n\nexport interface OtpFormProps extends AuthFormBaseProps {\n length?: number;\n otpLabel?: React.ReactNode;\n resendLabel?: React.ReactNode;\n resendDisabled?: boolean;\n resendLoading?: boolean;\n onSubmit: (values: OtpFormValues) => void | Promise<void>;\n onResend?: () => void | Promise<void>;\n}\n\nexport type OAuthProviderIconSpec = ButtonIconSpec;\n\nexport interface OAuthProviderItem {\n id: string;\n label?: React.ReactNode;\n icon?: OAuthProviderIconSpec;\n disabled?: boolean;\n loading?: boolean;\n}\n\nexport interface OAuthProviderButtonProps extends ZoraBaseProps {\n providerId: string;\n label?: React.ReactNode;\n icon?: OAuthProviderIconSpec;\n disabled?: boolean;\n loading?: boolean;\n fullWidth?: boolean;\n size?: ButtonProps['size'];\n variant?: ButtonProps['variant'];\n color?: ButtonProps['color'];\n onPress?: (providerId: string) => void | Promise<void>;\n}\n\nexport type OAuthProviderListLayout = 'stack' | 'inline';\n\nexport interface OAuthProviderListProps extends ZoraBaseProps {\n providers: readonly OAuthProviderItem[];\n disabled?: boolean;\n loading?: boolean;\n fullWidth?: boolean;\n layout?: OAuthProviderListLayout;\n size?: ButtonProps['size'];\n variant?: ButtonProps['variant'];\n color?: ButtonProps['color'];\n onProviderPress?: (providerId: string) => void | Promise<void>;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,eAAO,MAAM,kBAAkB,oBAA6D,CAAC;AAqB7F,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,SAAS,kBAAkB,EAAE,GAAG,MAAM,CAMzF;AAED,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,SAAS,kBAAkB,EAAE,GACzC,eAAe,CAAC,MAAM,CAAC,CAgBzB;AAED,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,SAAS,kBAAkB,EAAE,GACzC,SAAS,cAAc,EAAE,CAM3B;AAED,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,SAAS,kBAAkB,EAAE,GACzC,kBAAkB,CAoBpB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/patterns/auth/utils.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAO,CAAkD,CAAC;AAE7F,SAAS,0BAA0B,CAAC,UAA8B;IAChE,QAAQ,UAAU,EAAE,CAAC;QAC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CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,UAAkB,EAClB,WAA0C;IAE1C,MAAM,oBAAoB,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;IAE/C,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO,WAAW,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC;IACnC,CAAC;IAED,IAAI,kBAAkB,CAAC,WAAW,EAAE,OAAO,CAAC,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACnF,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,IAAI,kBAAkB,CAAC,WAAW,EAAE,OAAO,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,oBAAoB,CAAC,EAAE,CAAC;QAC5F,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,IAAI,kBAAkB,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE,CAAC;QAChD,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,OAAO,WAAW,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC;AACnC,CAAC","sourcesContent":["import type { FormFieldConfig, ValidationRule } from '../../types/form';\nimport type { AuthIdentifierKind } from './types';\n\nexport const defaultIdentifiers = ['email'] as const satisfies readonly AuthIdentifierKind[];\n\nfunction resolveIdentifierKindLabel(identifier: AuthIdentifierKind): string {\n switch (identifier) {\n case 'phone':\n return 'Phone';\n case 'username':\n return 'Username';\n case 'email':\n default:\n return 'Email';\n }\n}\n\nfunction includesIdentifier(\n identifiers: readonly AuthIdentifierKind[],\n identifier: AuthIdentifierKind,\n): boolean {\n return identifiers.includes(identifier);\n}\n\nexport function resolveIdentifierLabel(identifiers: readonly AuthIdentifierKind[]): string {\n if (identifiers.length === 1) {\n return resolveIdentifierKindLabel(identifiers[0] ?? 'email');\n }\n\n return identifiers.map(resolveIdentifierKindLabel).join(', or ');\n}\n\nexport function resolveIdentifierType(\n identifiers: readonly AuthIdentifierKind[],\n): FormFieldConfig['type'] {\n if (identifiers.length !== 1) {\n return 'text';\n }\n\n const [identifier] = identifiers;\n\n if (identifier === 'email') {\n return 'email';\n }\n\n if (identifier === 'phone') {\n return 'tel';\n }\n\n return 'text';\n}\n\nexport function resolveIdentifierRules(\n identifiers: readonly AuthIdentifierKind[],\n): readonly ValidationRule[] {\n if (identifiers.length === 1 && identifiers[0] === 'email') {\n return [{ kind: 'required' }, { kind: 'email' }];\n }\n\n return [{ kind: 'required' }];\n}\n\nexport function normalizeIdentifierKind(\n identifier: string,\n identifiers: readonly AuthIdentifierKind[],\n): AuthIdentifierKind {\n const normalizedIdentifier = identifier.trim();\n\n if (identifiers.length === 1) {\n return identifiers[0] ?? 'email';\n }\n\n if (includesIdentifier(identifiers, 'email') && normalizedIdentifier.includes('@')) {\n return 'email';\n }\n\n if (includesIdentifier(identifiers, 'phone') && /^[+()\\d\\s.-]+$/.test(normalizedIdentifier)) {\n return 'phone';\n }\n\n if (includesIdentifier(identifiers, 'username')) {\n return 'username';\n }\n\n return identifiers[0] ?? 'email';\n}\n"]}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { DisclosureSectionProps } from './types';
3
- /***
4
- * Expandable section pattern with a summary header and collapsible content.
5
- *
6
-
7
- */
8
- export declare const DisclosureSection: (props: DisclosureSectionProps) => React.ReactElement | null;
9
- //# sourceMappingURL=DisclosureSection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DisclosureSection.d.ts","sourceRoot":"","sources":["../../../src/patterns/disclosure-section/DisclosureSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAmHtD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,8DAA6C,CAAC"}
@@ -1,86 +0,0 @@
1
- import React from 'react';
2
- import { Platform, Pressable } from 'react-native';
3
- import { IconButton } from '../../features/button/public';
4
- import { Box, Stack } from '../../features/layout/public';
5
- import { Heading } from '../../features/typography/public';
6
- import { Text } from '../../features/typography/public';
7
- import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
8
- import { Panel } from '../panel';
9
- const triggerTextStyle = {
10
- flex: 1,
11
- flexBasis: 0,
12
- minWidth: 0,
13
- };
14
- const triggerCopyStyle = {
15
- flexShrink: 1,
16
- maxWidth: '100%',
17
- minWidth: 0,
18
- };
19
- const trailingStyle = {
20
- flexShrink: 0,
21
- };
22
- const getTriggerStyle = (disabled) => ({
23
- alignSelf: 'stretch',
24
- flex: 1,
25
- flexBasis: 0,
26
- justifyContent: 'center',
27
- minWidth: 0,
28
- ...(Platform.OS === 'web'
29
- ? {
30
- cursor: disabled ? 'default' : 'pointer',
31
- }
32
- : null),
33
- });
34
- function DisclosureSectionInner({ themeId: _themeId, mode: _mode, title, description, icon, defaultOpen = true, open: controlledOpen, onOpenChange, actions, children, disabled, testID, interactionPolicy, }) {
35
- const [internalOpen, setInternalOpen] = React.useState(defaultOpen);
36
- const isControlled = controlledOpen !== undefined;
37
- const isOpen = isControlled ? controlledOpen : internalOpen;
38
- const passive = interactionPolicy === 'passive';
39
- const titleLabel = typeof title === 'string' || typeof title === 'number' ? `: ${title}` : '';
40
- const toggleLabel = `${isOpen ? 'Collapse' : 'Expand'} section${titleLabel}`;
41
- const toggleOpen = () => {
42
- if (disabled || passive)
43
- return;
44
- if (isControlled) {
45
- onOpenChange?.(!controlledOpen);
46
- }
47
- else {
48
- setInternalOpen(!internalOpen);
49
- onOpenChange?.(!internalOpen);
50
- }
51
- };
52
- return (<Panel compact testID={testID}>
53
- <Stack gap="s">
54
- <Stack direction="row" gap="m" align="center">
55
- <Pressable accessibilityLabel={toggleLabel} accessibilityRole="button" accessibilityState={{ disabled, expanded: isOpen }} disabled={disabled} onPress={toggleOpen} style={getTriggerStyle(disabled)}>
56
- <Box style={triggerTextStyle}>
57
- <Stack gap="xs">
58
- {icon ? <Box pb="xs">{/* Surface icon spec would go here */}</Box> : null}
59
- <Heading level={4} style={triggerCopyStyle}>
60
- {title}
61
- </Heading>
62
- {description ? (<Text emphasis="muted" variant="bodySmall" style={triggerCopyStyle}>
63
- {description}
64
- </Text>) : null}
65
- </Stack>
66
- </Box>
67
- </Pressable>
68
-
69
- {actions ? <Box style={trailingStyle}>{actions}</Box> : null}
70
-
71
- <Box style={trailingStyle}>
72
- <IconButton icon={{ name: isOpen ? 'chevron-up-outline' : 'chevron-down-outline' }} label={isOpen ? 'Collapse' : 'Expand'} variant="ghost" color="neutral" size="s" disabled={disabled} interactionPolicy={interactionPolicy} onPress={toggleOpen}/>
73
- </Box>
74
- </Stack>
75
-
76
- {isOpen ? <Box pt="m">{children}</Box> : null}
77
- </Stack>
78
- </Panel>);
79
- }
80
- /***
81
- * Expandable section pattern with a summary header and collapsible content.
82
- *
83
-
84
- */
85
- export const DisclosureSection = withZoraThemeScope(DisclosureSectionInner);
86
- //# sourceMappingURL=DisclosureSection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DisclosureSection.js","sourceRoot":"","sources":["../../../src/patterns/disclosure-section/DisclosureSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAkC,MAAM,cAAc,CAAC;AAEnF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGjC,MAAM,gBAAgB,GAAc;IAClC,IAAI,EAAE,CAAC;IACP,SAAS,EAAE,CAAC;IACZ,QAAQ,EAAE,CAAC;CACZ,CAAC;A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AAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,sBAAsB,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { Platform, Pressable, type TextStyle, type ViewStyle } from 'react-native';\n\nimport { IconButton } from '../../features/button/public';\nimport { Box, Stack } from '../../features/layout/public';\nimport { Heading } from '../../features/typography/public';\nimport { Text } from '../../features/typography/public';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Panel } from '../panel';\nimport type { DisclosureSectionProps } from './types';\n\nconst triggerTextStyle: ViewStyle = {\n flex: 1,\n flexBasis: 0,\n minWidth: 0,\n};\n\nconst triggerCopyStyle: TextStyle = {\n flexShrink: 1,\n maxWidth: '100%',\n minWidth: 0,\n};\n\nconst trailingStyle: ViewStyle = {\n flexShrink: 0,\n};\n\nconst getTriggerStyle = (disabled?: boolean): ViewStyle =>\n ({\n alignSelf: 'stretch',\n flex: 1,\n flexBasis: 0,\n justifyContent: 'center',\n minWidth: 0,\n ...(Platform.OS === 'web'\n ? {\n cursor: disabled ? 'default' : 'pointer',\n }\n : null),\n }) as ViewStyle;\n\nfunction DisclosureSectionInner({\n themeId: _themeId,\n mode: _mode,\n title,\n description,\n icon,\n defaultOpen = true,\n open: controlledOpen,\n onOpenChange,\n actions,\n children,\n disabled,\n testID,\n interactionPolicy,\n}: DisclosureSectionProps) {\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen);\n\n const isControlled = controlledOpen !== undefined;\n const isOpen = isControlled ? controlledOpen : internalOpen;\n const passive = interactionPolicy === 'passive';\n const titleLabel = typeof title === 'string' || typeof title === 'number' ? `: ${title}` : '';\n const toggleLabel = `${isOpen ? 'Collapse' : 'Expand'} section${titleLabel}`;\n\n const toggleOpen = () => {\n if (disabled || passive) return;\n\n if (isControlled) {\n onOpenChange?.(!controlledOpen);\n } else {\n setInternalOpen(!internalOpen);\n onOpenChange?.(!internalOpen);\n }\n };\n\n return (\n <Panel compact testID={testID}>\n <Stack gap=\"s\">\n <Stack direction=\"row\" gap=\"m\" align=\"center\">\n <Pressable\n accessibilityLabel={toggleLabel}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled, expanded: isOpen }}\n disabled={disabled}\n onPress={toggleOpen}\n style={getTriggerStyle(disabled)}\n >\n <Box style={triggerTextStyle}>\n <Stack gap=\"xs\">\n {icon ? <Box pb=\"xs\">{/* Surface icon spec would go here */}</Box> : null}\n <Heading level={4} style={triggerCopyStyle}>\n {title}\n </Heading>\n {description ? (\n <Text emphasis=\"muted\" variant=\"bodySmall\" style={triggerCopyStyle}>\n {description}\n </Text>\n ) : null}\n </Stack>\n </Box>\n </Pressable>\n\n {actions ? <Box style={trailingStyle}>{actions}</Box> : null}\n\n <Box style={trailingStyle}>\n <IconButton\n icon={{ name: isOpen ? 'chevron-up-outline' : 'chevron-down-outline' }}\n label={isOpen ? 'Collapse' : 'Expand'}\n variant=\"ghost\"\n color=\"neutral\"\n size=\"s\"\n disabled={disabled}\n interactionPolicy={interactionPolicy}\n onPress={toggleOpen}\n />\n </Box>\n </Stack>\n\n {isOpen ? <Box pt=\"m\">{children}</Box> : null}\n </Stack>\n </Panel>\n );\n}\n\n/***\n * Expandable section pattern with a summary header and collapsible content.\n *\n\n */\nexport const DisclosureSection = withZoraThemeScope(DisclosureSectionInner);\n"]}
@@ -1,3 +0,0 @@
1
- export * from './DisclosureSection';
2
- export * from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/disclosure-section/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from './DisclosureSection';
2
- export * from './types';
3
- //# sourceMappingURL=index.js.map