@ankhorage/zora 12.0.0 → 12.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 (215) hide show
  1. package/CHANGELOG.md +8 -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/{patterns/auth → features/auth/adapters/inbound}/AuthForm.d.ts +3 -3
  8. package/dist/features/auth/adapters/inbound/AuthForm.d.ts.map +1 -0
  9. package/dist/{patterns/auth → features/auth/adapters/inbound}/AuthForm.js +2 -2
  10. package/dist/features/auth/adapters/inbound/AuthForm.js.map +1 -0
  11. package/dist/{patterns/auth → features/auth/adapters/inbound}/AuthFormField.d.ts +2 -2
  12. package/dist/features/auth/adapters/inbound/AuthFormField.d.ts.map +1 -0
  13. package/dist/{patterns/auth → features/auth/adapters/inbound}/AuthFormField.js +2 -2
  14. package/dist/features/auth/adapters/inbound/AuthFormField.js.map +1 -0
  15. package/dist/{patterns/auth → features/auth/adapters/inbound}/ForgotPasswordForm.d.ts +1 -1
  16. package/dist/features/auth/adapters/inbound/ForgotPasswordForm.d.ts.map +1 -0
  17. package/dist/{patterns/auth → features/auth/adapters/inbound}/ForgotPasswordForm.js +5 -5
  18. package/dist/features/auth/adapters/inbound/ForgotPasswordForm.js.map +1 -0
  19. package/dist/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderButton.d.ts +1 -1
  20. package/dist/features/auth/adapters/inbound/OAuthProviderButton.d.ts.map +1 -0
  21. package/dist/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderButton.js +3 -3
  22. package/dist/features/auth/adapters/inbound/OAuthProviderButton.js.map +1 -0
  23. package/dist/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderList.d.ts +1 -1
  24. package/dist/features/auth/adapters/inbound/OAuthProviderList.d.ts.map +1 -0
  25. package/dist/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderList.js +2 -2
  26. package/dist/features/auth/adapters/inbound/OAuthProviderList.js.map +1 -0
  27. package/dist/{patterns/auth → features/auth/adapters/inbound}/OtpForm.d.ts +1 -1
  28. package/dist/features/auth/adapters/inbound/OtpForm.d.ts.map +1 -0
  29. package/dist/{patterns/auth → features/auth/adapters/inbound}/OtpForm.js +4 -4
  30. package/dist/features/auth/adapters/inbound/OtpForm.js.map +1 -0
  31. package/dist/{patterns/auth → features/auth/adapters/inbound}/SignInForm.d.ts +1 -1
  32. package/dist/features/auth/adapters/inbound/SignInForm.d.ts.map +1 -0
  33. package/dist/{patterns/auth → features/auth/adapters/inbound}/SignInForm.js +5 -5
  34. package/dist/features/auth/adapters/inbound/SignInForm.js.map +1 -0
  35. package/dist/{patterns/auth → features/auth/adapters/inbound}/SignUpForm.d.ts +1 -1
  36. package/dist/features/auth/adapters/inbound/SignUpForm.d.ts.map +1 -0
  37. package/dist/{patterns/auth → features/auth/adapters/inbound}/SignUpForm.js +3 -3
  38. package/dist/features/auth/adapters/inbound/SignUpForm.js.map +1 -0
  39. package/dist/features/auth/forgotPasswordFormMeta.d.ts +79 -0
  40. package/dist/features/auth/forgotPasswordFormMeta.d.ts.map +1 -0
  41. package/dist/features/auth/forgotPasswordFormMeta.js +48 -0
  42. package/dist/features/auth/forgotPasswordFormMeta.js.map +1 -0
  43. package/dist/features/auth/oauthProviderButtonMeta.d.ts +83 -0
  44. package/dist/features/auth/oauthProviderButtonMeta.d.ts.map +1 -0
  45. package/dist/features/auth/oauthProviderButtonMeta.js +61 -0
  46. package/dist/features/auth/oauthProviderButtonMeta.js.map +1 -0
  47. package/dist/features/auth/oauthProviderListMeta.d.ts +109 -0
  48. package/dist/features/auth/oauthProviderListMeta.d.ts.map +1 -0
  49. package/dist/features/auth/oauthProviderListMeta.js +66 -0
  50. package/dist/features/auth/oauthProviderListMeta.js.map +1 -0
  51. package/dist/features/auth/otpFormMeta.d.ts +89 -0
  52. package/dist/features/auth/otpFormMeta.d.ts.map +1 -0
  53. package/dist/features/auth/otpFormMeta.js +54 -0
  54. package/dist/features/auth/otpFormMeta.js.map +1 -0
  55. package/dist/features/auth/public.d.ts +9 -0
  56. package/dist/features/auth/public.d.ts.map +1 -0
  57. package/dist/features/auth/public.js +8 -0
  58. package/dist/features/auth/public.js.map +1 -0
  59. package/dist/features/auth/signInFormMeta.d.ts +100 -0
  60. package/dist/features/auth/signInFormMeta.d.ts.map +1 -0
  61. package/dist/features/auth/signInFormMeta.js +62 -0
  62. package/dist/features/auth/signInFormMeta.js.map +1 -0
  63. package/dist/features/auth/signUpFormMeta.d.ts +111 -0
  64. package/dist/features/auth/signUpFormMeta.d.ts.map +1 -0
  65. package/dist/features/auth/signUpFormMeta.js +66 -0
  66. package/dist/features/auth/signUpFormMeta.js.map +1 -0
  67. package/dist/{patterns/auth/utils.d.ts → features/auth/utils/authForm.d.ts} +3 -3
  68. package/dist/features/auth/utils/authForm.d.ts.map +1 -0
  69. package/dist/{patterns/auth/utils.js → features/auth/utils/authForm.js} +1 -1
  70. package/dist/features/auth/utils/authForm.js.map +1 -0
  71. package/dist/{patterns/auth → features/auth/utils}/oauthProviders.d.ts +1 -1
  72. package/dist/features/auth/utils/oauthProviders.d.ts.map +1 -0
  73. package/dist/features/auth/utils/oauthProviders.js.map +1 -0
  74. package/dist/features/bottom-sheet/bottomSheetMeta.d.ts +1 -1
  75. package/dist/features/card/cardMeta.d.ts +1 -1
  76. package/dist/features/card/mediaCardMeta.d.ts +1 -1
  77. package/dist/features/card/postCardMeta.d.ts +1 -1
  78. package/dist/{components/gradient → features/gradient/adapters/inbound}/Gradient.d.ts +1 -1
  79. package/dist/features/gradient/adapters/inbound/Gradient.d.ts.map +1 -0
  80. package/dist/{components/gradient → features/gradient/adapters/inbound}/Gradient.js +2 -2
  81. package/dist/features/gradient/adapters/inbound/Gradient.js.map +1 -0
  82. package/dist/{components/gradient → features/gradient/adapters/inbound}/GradientRendererContext.d.ts +3 -2
  83. package/dist/features/gradient/adapters/inbound/GradientRendererContext.d.ts.map +1 -0
  84. package/dist/{components/gradient → features/gradient/adapters/inbound}/GradientRendererContext.js +2 -1
  85. package/dist/features/gradient/adapters/inbound/GradientRendererContext.js.map +1 -0
  86. package/dist/features/gradient/gradientMeta.d.ts +48 -0
  87. package/dist/features/gradient/gradientMeta.d.ts.map +1 -0
  88. package/dist/features/gradient/gradientMeta.js +25 -0
  89. package/dist/features/gradient/gradientMeta.js.map +1 -0
  90. package/dist/features/gradient/public.d.ts +4 -0
  91. package/dist/features/gradient/public.d.ts.map +1 -0
  92. package/dist/features/gradient/public.js +3 -0
  93. package/dist/features/gradient/public.js.map +1 -0
  94. package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.d.ts +1 -1
  95. package/dist/features/layout/boxMeta.d.ts +1 -1
  96. package/dist/features/layout/containerMeta.d.ts +1 -1
  97. package/dist/features/layout/gridMeta.d.ts +1 -1
  98. package/dist/features/layout/stackMeta.d.ts +1 -1
  99. package/dist/features/list/flatListMeta.d.ts +1 -1
  100. package/dist/features/list/sectionListMeta.d.ts +1 -1
  101. package/dist/features/surface/surfaceMeta.d.ts +1 -1
  102. package/dist/index.d.ts +4 -4
  103. package/dist/index.d.ts.map +1 -1
  104. package/dist/index.js +2 -2
  105. package/dist/index.js.map +1 -1
  106. package/dist/layout/screen/meta.d.ts +1 -1
  107. package/dist/layout/screen-section/meta.d.ts +1 -1
  108. package/dist/metadata/allowedChildren.d.ts +3 -3
  109. package/dist/metadata/allowedChildren.d.ts.map +1 -1
  110. package/dist/metadata/allowedChildren.js +7 -0
  111. package/dist/metadata/allowedChildren.js.map +1 -1
  112. package/dist/metadata/bindableComponentMeta.d.ts +2 -2
  113. package/dist/metadata/componentMeta.d.ts.map +1 -1
  114. package/dist/metadata/componentMeta.js +7 -2
  115. package/dist/metadata/componentMeta.js.map +1 -1
  116. package/dist/patterns/message-bubble/meta.d.ts +1 -1
  117. package/dist/patterns/notice/meta.d.ts +1 -1
  118. package/dist/patterns/panel/meta.d.ts +1 -1
  119. package/dist/patterns/reader/meta.d.ts +2 -2
  120. package/dist/patterns/scanner/meta.d.ts +2 -2
  121. package/dist/registry.js +2 -2
  122. package/dist/registry.js.map +1 -1
  123. package/dist/{patterns/auth/types.d.ts → types/auth.d.ts} +8 -8
  124. package/dist/types/auth.d.ts.map +1 -0
  125. package/dist/types/auth.js +2 -0
  126. package/dist/types/auth.js.map +1 -0
  127. package/dist/{components/gradient/types.d.ts → types/gradient.d.ts} +3 -3
  128. package/dist/types/gradient.d.ts.map +1 -0
  129. package/dist/types/gradient.js +2 -0
  130. package/dist/types/gradient.js.map +1 -0
  131. package/package.json +1 -1
  132. package/src/constants.ts +9 -0
  133. package/src/expo57Migration.test.ts +1 -1
  134. package/src/featureManifest.test.ts +2 -0
  135. package/src/{patterns/auth → features/auth/adapters/inbound}/AuthForm.tsx +5 -5
  136. package/src/{patterns/auth → features/auth/adapters/inbound}/AuthFormField.tsx +4 -4
  137. package/src/{patterns/auth → features/auth/adapters/inbound}/ForgotPasswordForm.tsx +8 -8
  138. package/src/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderButton.tsx +4 -4
  139. package/src/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderList.tsx +3 -3
  140. package/src/{patterns/auth → features/auth/adapters/inbound}/OtpForm.tsx +6 -6
  141. package/src/{patterns/auth → features/auth/adapters/inbound}/SignInForm.tsx +8 -8
  142. package/src/{patterns/auth → features/auth/adapters/inbound}/SignUpForm.tsx +5 -5
  143. package/src/features/auth/forgotPasswordFormMeta.ts +49 -0
  144. package/src/features/auth/oauthProviderButtonMeta.ts +62 -0
  145. package/src/features/auth/oauthProviderListMeta.ts +67 -0
  146. package/src/features/auth/otpFormMeta.ts +55 -0
  147. package/src/features/auth/public.test.ts +34 -0
  148. package/src/{patterns/auth/index.ts → features/auth/public.ts} +12 -12
  149. package/src/features/auth/signInFormMeta.ts +63 -0
  150. package/src/features/auth/signUpFormMeta.ts +67 -0
  151. package/src/{patterns/auth/utils.ts → features/auth/utils/authForm.ts} +2 -2
  152. package/src/{patterns/auth → features/auth/utils}/oauthProviders.test.ts +1 -1
  153. package/src/{patterns/auth → features/auth/utils}/oauthProviders.ts +1 -1
  154. package/src/{components/gradient → features/gradient/adapters/inbound}/Gradient.tsx +3 -3
  155. package/src/{components/gradient → features/gradient/adapters/inbound}/GradientRendererContext.tsx +3 -2
  156. package/src/features/gradient/gradientMeta.ts +26 -0
  157. package/src/features/gradient/public.test.ts +15 -0
  158. package/src/{components/gradient/index.ts → features/gradient/public.ts} +3 -3
  159. package/src/index.ts +40 -40
  160. package/src/metadata/allowedChildren.ts +7 -0
  161. package/src/metadata/componentMeta.test.ts +7 -0
  162. package/src/metadata/componentMeta.ts +7 -9
  163. package/src/registry.ts +9 -9
  164. package/src/theme/themeScopeStructure.test.ts +7 -5
  165. package/src/{patterns/auth/types.ts → types/auth.ts} +7 -7
  166. package/src/{components/gradient/types.ts → types/gradient.ts} +2 -2
  167. package/dist/components/gradient/Gradient.d.ts.map +0 -1
  168. package/dist/components/gradient/Gradient.js.map +0 -1
  169. package/dist/components/gradient/GradientRendererContext.d.ts.map +0 -1
  170. package/dist/components/gradient/GradientRendererContext.js.map +0 -1
  171. package/dist/components/gradient/index.d.ts +0 -4
  172. package/dist/components/gradient/index.d.ts.map +0 -1
  173. package/dist/components/gradient/index.js +0 -3
  174. package/dist/components/gradient/index.js.map +0 -1
  175. package/dist/components/gradient/meta.d.ts +0 -9
  176. package/dist/components/gradient/meta.d.ts.map +0 -1
  177. package/dist/components/gradient/meta.js +0 -9
  178. package/dist/components/gradient/meta.js.map +0 -1
  179. package/dist/components/gradient/types.d.ts.map +0 -1
  180. package/dist/components/gradient/types.js +0 -2
  181. package/dist/components/gradient/types.js.map +0 -1
  182. package/dist/patterns/auth/AuthForm.d.ts.map +0 -1
  183. package/dist/patterns/auth/AuthForm.js.map +0 -1
  184. package/dist/patterns/auth/AuthFormField.d.ts.map +0 -1
  185. package/dist/patterns/auth/AuthFormField.js.map +0 -1
  186. package/dist/patterns/auth/ForgotPasswordForm.d.ts.map +0 -1
  187. package/dist/patterns/auth/ForgotPasswordForm.js.map +0 -1
  188. package/dist/patterns/auth/OAuthProviderButton.d.ts.map +0 -1
  189. package/dist/patterns/auth/OAuthProviderButton.js.map +0 -1
  190. package/dist/patterns/auth/OAuthProviderList.d.ts.map +0 -1
  191. package/dist/patterns/auth/OAuthProviderList.js.map +0 -1
  192. package/dist/patterns/auth/OtpForm.d.ts.map +0 -1
  193. package/dist/patterns/auth/OtpForm.js.map +0 -1
  194. package/dist/patterns/auth/SignInForm.d.ts.map +0 -1
  195. package/dist/patterns/auth/SignInForm.js.map +0 -1
  196. package/dist/patterns/auth/SignUpForm.d.ts.map +0 -1
  197. package/dist/patterns/auth/SignUpForm.js.map +0 -1
  198. package/dist/patterns/auth/index.d.ts +0 -9
  199. package/dist/patterns/auth/index.d.ts.map +0 -1
  200. package/dist/patterns/auth/index.js +0 -8
  201. package/dist/patterns/auth/index.js.map +0 -1
  202. package/dist/patterns/auth/meta.d.ts +0 -49
  203. package/dist/patterns/auth/meta.d.ts.map +0 -1
  204. package/dist/patterns/auth/meta.js +0 -50
  205. package/dist/patterns/auth/meta.js.map +0 -1
  206. package/dist/patterns/auth/oauthProviders.d.ts.map +0 -1
  207. package/dist/patterns/auth/oauthProviders.js.map +0 -1
  208. package/dist/patterns/auth/types.d.ts.map +0 -1
  209. package/dist/patterns/auth/types.js +0 -2
  210. package/dist/patterns/auth/types.js.map +0 -1
  211. package/dist/patterns/auth/utils.d.ts.map +0 -1
  212. package/dist/patterns/auth/utils.js.map +0 -1
  213. package/src/components/gradient/meta.ts +0 -10
  214. package/src/patterns/auth/meta.ts +0 -57
  215. /package/dist/{patterns/auth → features/auth/utils}/oauthProviders.js +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 12.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - ca23e34: Move the complete Auth solution and Gradient to canonical feature ownership.
8
+
9
+ ForgotPasswordForm, OtpForm, SignInForm, SignUpForm, OAuthProviderButton, OAuthProviderList, and Gradient are now direct manifest nodes with serializable authoring metadata. Gradient remains renderer-agnostic through GradientRendererProvider.
10
+
3
11
  ## 12.0.0
4
12
 
5
13
  ### Major Changes
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # @ankhorage/zora
5
5
 
6
- ![license: MIT](././paradox/badges/license.svg) ![npm: v11.0.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
6
+ ![license: MIT](././paradox/badges/license.svg) ![npm: v12.0.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
7
7
 
8
8
  Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.
9
9
 
@@ -4,6 +4,7 @@ export declare const COMPONENT_THEME_AUTHORING: {
4
4
  readonly allowInstanceOverride: true;
5
5
  };
6
6
  export declare const FEATURE_MANIFEST_ELEMENTS: {
7
+ readonly auth: readonly ["ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm"];
7
8
  readonly surface: readonly ["Surface"];
8
9
  readonly avatar: readonly ["Avatar", "AvatarGroup"];
9
10
  readonly badge: readonly ["Badge"];
@@ -12,6 +13,7 @@ export declare const FEATURE_MANIFEST_ELEMENTS: {
12
13
  readonly 'data-table': readonly ["DataTable"];
13
14
  readonly 'date-picker': readonly ["DatePicker"];
14
15
  readonly form: readonly ["Form", "FormError", "FormField"];
16
+ readonly gradient: readonly ["Gradient"];
15
17
  readonly button: readonly ["Button", "IconButton", "ButtonGroup"];
16
18
  readonly icon: readonly ["Icon"];
17
19
  readonly image: readonly ["Image"];
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB;;;;CAI5B,CAAC;AAEX,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;CAoB5B,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB;;;;CAI5B,CAAC;AAEX,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;CA6B5B,CAAC"}
package/dist/constants.js CHANGED
@@ -4,6 +4,14 @@ export const COMPONENT_THEME_AUTHORING = {
4
4
  allowInstanceOverride: true,
5
5
  };
6
6
  export const FEATURE_MANIFEST_ELEMENTS = {
7
+ auth: [
8
+ 'ForgotPasswordForm',
9
+ 'OAuthProviderButton',
10
+ 'OAuthProviderList',
11
+ 'OtpForm',
12
+ 'SignInForm',
13
+ 'SignUpForm',
14
+ ],
7
15
  surface: ['Surface'],
8
16
  avatar: ['Avatar', 'AvatarGroup'],
9
17
  badge: ['Badge'],
@@ -12,6 +20,7 @@ export const FEATURE_MANIFEST_ELEMENTS = {
12
20
  'data-table': ['DataTable'],
13
21
  'date-picker': ['DatePicker'],
14
22
  form: ['Form', 'FormError', 'FormField'],
23
+ gradient: ['Gradient'],
15
24
  button: ['Button', 'IconButton', 'ButtonGroup'],
16
25
  icon: ['Icon'],
17
26
  image: ['Image'],
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,SAAS,EAAE,OAAO;IAClB,KAAK,EAAE,WAAW;IAClB,qBAAqB,EAAE,IAAI;CACnB,CAAC;AAEX,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,OAAO,EAAE,CAAC,SAAS,CAAC;IACpB,MAAM,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC;IACjC,KAAK,EAAE,CAAC,OAAO,CAAC;IAChB,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,CAAC;IACpE,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC;IAC3B,YAAY,EAAE,CAAC,WAAW,CAAC;IAC3B,aAAa,EAAE,CAAC,YAAY,CAAC;IAC7B,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,CAAC;IACxC,MAAM,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,aAAa,CAAC;IAC/C,IAAI,EAAE,CAAC,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,OAAO,CAAC;IAChB,wBAAwB,EAAE,CAAC,sBAAsB,CAAC;IAClD,MAAM,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC;IACvE,IAAI,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC;IACjC,QAAQ,EAAE,CAAC,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,CAAC;IACtE,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC;IAC/B,aAAa,EAAE,CAAC,YAAY,CAAC;IAC7B,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,cAAc,EAAE,CAAC,aAAa,CAAC;CACvB,CAAC","sourcesContent":["export const COMPONENT_THEME_AUTHORING = {\n authority: 'theme',\n scope: 'component',\n allowInstanceOverride: true,\n} as const;\n\nexport const FEATURE_MANIFEST_ELEMENTS = {\n surface: ['Surface'],\n avatar: ['Avatar', 'AvatarGroup'],\n badge: ['Badge'],\n card: ['Card', 'MediaCard', 'MetricCard', 'PostCard', 'ProductCard'],\n chip: ['Chip', 'ChipGroup'],\n 'data-table': ['DataTable'],\n 'date-picker': ['DatePicker'],\n form: ['Form', 'FormError', 'FormField'],\n button: ['Button', 'IconButton', 'ButtonGroup'],\n icon: ['Icon'],\n image: ['Image'],\n 'keyboard-avoiding-view': ['KeyboardAvoidingView'],\n layout: ['Box', 'Container', 'ContentRail', 'Divider', 'Grid', 'Stack'],\n list: ['FlatList', 'SectionList'],\n skeleton: ['Skeleton', 'SkeletonCard', 'SkeletonList', 'SkeletonText'],\n typography: ['Heading', 'Text'],\n 'time-picker': ['TimePicker'],\n uploader: ['Uploader'],\n 'bottom-sheet': ['BottomSheet'],\n} as const;\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,SAAS,EAAE,OAAO;IAClB,KAAK,EAAE,WAAW;IAClB,qBAAqB,EAAE,IAAI;CACnB,CAAC;AAEX,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,IAAI,EAAE;QACJ,oBAAoB;QACpB,qBAAqB;QACrB,mBAAmB;QACnB,SAAS;QACT,YAAY;QACZ,YAAY;KACb;IACD,OAAO,EAAE,CAAC,SAAS,CAAC;IACpB,MAAM,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC;IACjC,KAAK,EAAE,CAAC,OAAO,CAAC;IAChB,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,CAAC;IACpE,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC;IAC3B,YAAY,EAAE,CAAC,WAAW,CAAC;IAC3B,aAAa,EAAE,CAAC,YAAY,CAAC;IAC7B,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,CAAC;IACxC,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,MAAM,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,aAAa,CAAC;IAC/C,IAAI,EAAE,CAAC,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,OAAO,CAAC;IAChB,wBAAwB,EAAE,CAAC,sBAAsB,CAAC;IAClD,MAAM,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC;IACvE,IAAI,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC;IACjC,QAAQ,EAAE,CAAC,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,CAAC;IACtE,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC;IAC/B,aAAa,EAAE,CAAC,YAAY,CAAC;IAC7B,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,cAAc,EAAE,CAAC,aAAa,CAAC;CACvB,CAAC","sourcesContent":["export const COMPONENT_THEME_AUTHORING = {\n authority: 'theme',\n scope: 'component',\n allowInstanceOverride: true,\n} as const;\n\nexport const FEATURE_MANIFEST_ELEMENTS = {\n auth: [\n 'ForgotPasswordForm',\n 'OAuthProviderButton',\n 'OAuthProviderList',\n 'OtpForm',\n 'SignInForm',\n 'SignUpForm',\n ],\n surface: ['Surface'],\n avatar: ['Avatar', 'AvatarGroup'],\n badge: ['Badge'],\n card: ['Card', 'MediaCard', 'MetricCard', 'PostCard', 'ProductCard'],\n chip: ['Chip', 'ChipGroup'],\n 'data-table': ['DataTable'],\n 'date-picker': ['DatePicker'],\n form: ['Form', 'FormError', 'FormField'],\n gradient: ['Gradient'],\n button: ['Button', 'IconButton', 'ButtonGroup'],\n icon: ['Icon'],\n image: ['Image'],\n 'keyboard-avoiding-view': ['KeyboardAvoidingView'],\n layout: ['Box', 'Container', 'ContentRail', 'Divider', 'Grid', 'Stack'],\n list: ['FlatList', 'SectionList'],\n skeleton: ['Skeleton', 'SkeletonCard', 'SkeletonList', 'SkeletonText'],\n typography: ['Heading', 'Text'],\n 'time-picker': ['TimePicker'],\n uploader: ['Uploader'],\n 'bottom-sheet': ['BottomSheet'],\n} as const;\n"]}
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
- import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
3
- import type { FormErrors, FormFieldConfig, FormValues } from '../../types/form';
2
+ import type { ZoraBaseProps } from '../../../../theme/ZoraBaseProps';
3
+ import type { FormErrors, FormFieldConfig, FormValues } from '../../../../types/form';
4
4
  interface AuthFormProps<TName extends string> {
5
5
  fields: readonly FormFieldConfig<TName>[];
6
6
  values: FormValues<TName>;
7
7
  onChange: (values: FormValues<TName>) => void;
8
- onSubmit: (values: FormValues<TName>) => void | Promise<void>;
8
+ onSubmit?: (values: FormValues<TName>) => void | Promise<void>;
9
9
  errors?: FormErrors<TName>;
10
10
  error?: React.ReactNode;
11
11
  loading?: boolean;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthForm.d.ts","sourceRoot":"","sources":["../../../../../src/features/auth/adapters/inbound/AuthForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAKtF,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,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/D,MAAM,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IAC3B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;CACxD;AAED,yFAAyF;AACzF,wBAAgB,QAAQ,CAAC,KAAK,SAAS,MAAM,EAAE,EAC7C,MAAM,EACN,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,KAAK,EACL,OAAe,EACf,QAAgB,EAChB,WAAsB,EACtB,OAAO,EACP,MAAM,EACN,iBAAiB,GAClB,EAAE,aAAa,CAAC,KAAK,CAAC,qBA8BtB"}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { FormActions, FormError, useFormController } from '../../features/form/public';
3
- import { Stack } from '../../features/layout/public';
2
+ import { FormActions, FormError, useFormController } from '../../../form/public';
3
+ import { Stack } from '../../../layout/public';
4
4
  import { AuthFormField } from './AuthFormField';
5
5
  /*** Keeps config-driven field orchestration private to the auth patterns that own it. */
6
6
  export function AuthForm({ fields, values, onChange, onSubmit, errors, error, loading = false, disabled = false, submitLabel = 'Submit', actions, testID, interactionPolicy, }) {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthForm.js","sourceRoot":"","sources":["../../../../../src/features/auth/adapters/inbound/AuthForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CA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AAC,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 type { ZoraBaseProps } from '../../../../theme/ZoraBaseProps';\nimport type { FormErrors, FormFieldConfig, FormValues } from '../../../../types/form';\nimport { FormActions, FormError, useFormController } from '../../../form/public';\nimport { Stack } from '../../../layout/public';\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,6 +1,6 @@
1
1
  import React from 'react';
2
- import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
3
- import type { FormFieldConfig, FormFieldValue } from '../../types/form';
2
+ import type { ZoraBaseProps } from '../../../../theme/ZoraBaseProps';
3
+ import type { FormFieldConfig, FormFieldValue } from '../../../../types/form';
4
4
  interface AuthFormFieldProps<TName extends string> {
5
5
  field: FormFieldConfig<TName>;
6
6
  value: FormFieldValue;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthFormField.d.ts","sourceRoot":"","sources":["../../../../../src/features/auth/adapters/inbound/AuthFormField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAI9E,UAAU,kBAAkB,CAAC,KAAK,SAAS,MAAM;IAC/C,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC;IAC9B,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACvD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iBAAiB,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;CACxD;AAED,uFAAuF;AACvF,wBAAgB,aAAa,CAAC,KAAK,SAAS,MAAM,EAAE,EAClD,KAAK,EACL,KAAK,EACL,QAAQ,EACR,KAAK,EACL,QAAgB,EAChB,OAAe,EACf,iBAAiB,GAClB,EAAE,kBAAkB,CAAC,KAAK,CAAC,qBAmC3B"}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { FormField, hasRequiredRule } from '../../features/form/public';
3
- import { TextInput } from '../../features/form/text-input/public';
2
+ import { FormField, hasRequiredRule } from '../../../form/public';
3
+ import { TextInput } from '../../../form/text-input/public';
4
4
  /*** Adapts an auth field configuration to the public compositional form primitives. */
5
5
  export function AuthFormField({ field, value, onChange, error, disabled = false, loading = false, interactionPolicy, }) {
6
6
  const fieldDisabled = disabled || loading || field.disabled;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthFormField.js","sourceRoot":"","sources":["../../../../../src/features/auth/adapters/inbound/AuthFormField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAY5D,uFAAuF;AACvF,MAAM,UAAU,aAAa,CAAuB,EAClD,KAAK,EACL,KAAK,EACL,QAAQ,EACR,KAAK,EACL,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,KAAK,EACf,iBAAiB,GACS;IAC1B,MAAM,aAAa,GAAG,QAAQ,IAAI,OAAO,IAAI,KAAK,CAAC,QAAQ,CAAC;IAC5D,OAAO,CACL,CAAC,SAAS,CACR,WAAW,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAC/B,QAAQ,CAAC,CAAC,aAAa,CAAC,CACxB,SAAS,CAAC,CAAC,KAAK,CAAC,CACjB,UAAU,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAC7B,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CACxB,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CACnB,QAAQ,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CACzB,QAAQ,CAAC,CAAC,KAAK,CAAC,QAAQ,IAAI,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CACzD,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAErB;MAAA,CAAC,SAAS,CACR,kBAAkB,CAAC,CAAC,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I,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 type { ZoraBaseProps } from '../../../../theme/ZoraBaseProps';\nimport type { FormFieldConfig, FormFieldValue } from '../../../../types/form';\nimport { FormField, hasRequiredRule } from '../../../form/public';\nimport { TextInput } from '../../../form/text-input/public';\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,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { ForgotPasswordFormProps } from './types';
2
+ import type { ForgotPasswordFormProps } from '../../../../types/auth';
3
3
  /***
4
4
  * Password reset form pattern with validation and submit actions.
5
5
  *
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ForgotPasswordForm.d.ts","sourceRoot":"","sources":["../../../../../src/features/auth/adapters/inbound/ForgotPasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAyFtE;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,+DAA8C,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { Button } from '../../features/button/public';
3
- import { Stack } from '../../features/layout/public';
4
- import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
2
+ import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
3
+ import { Button } from '../../../button/public';
4
+ import { Stack } from '../../../layout/public';
5
+ import { defaultIdentifiers, normalizeIdentifierKind, resolveIdentifierLabel, resolveIdentifierRules, resolveIdentifierType, } from '../../utils/authForm';
5
6
  import { AuthForm } from './AuthForm';
6
- import { defaultIdentifiers, normalizeIdentifierKind, resolveIdentifierLabel, resolveIdentifierRules, resolveIdentifierType, } from './utils';
7
7
  function ForgotPasswordFormInner({ themeId: _themeId, mode: _mode, interactionPolicy, identifiers = defaultIdentifiers, identifierLabel, signInLabel = 'Sign in', loading = false, disabled = false, error, submitLabel = 'Send code', onSubmit, onSignIn, testID, }) {
8
8
  const [values, setValues] = React.useState({
9
9
  identifier: '',
@@ -17,7 +17,7 @@ function ForgotPasswordFormInner({ themeId: _themeId, mode: _mode, interactionPo
17
17
  rules: resolveIdentifierRules(identifiers),
18
18
  },
19
19
  ], [identifierLabel, identifiers]);
20
- const handleSubmit = React.useCallback((formValues) => onSubmit({
20
+ const handleSubmit = React.useCallback((formValues) => onSubmit?.({
21
21
  identifier: formValues.identifier.trim(),
22
22
  identifierKind: normalizeIdentifierKind(formValues.identifier, identifiers),
23
23
  }), [identifiers, onSubmit]);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ForgotPasswordForm.js","sourceRoot":"","sources":["../../../../../src/features/auth/adapters/inbound/ForgotPasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG1E,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;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C,CAAC,CACT,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CACxC;YAAA,CAAC,MAAM,CACL,QAAQ,CAAC,CAAC,QAAQ,IAAI,OAAO,CAAC,CAC9B,OAAO,CAAC,OAAO,CACf,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,kBAAkB,GAAG,kBAAkB,CAAC,uBAAuB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type { ForgotPasswordFormProps } from '../../../../types/auth';\nimport type { FormFieldConfig, FormValues } from '../../../../types/form';\nimport { Button } from '../../../button/public';\nimport { Stack } from '../../../layout/public';\nimport {\n defaultIdentifiers,\n normalizeIdentifierKind,\n resolveIdentifierLabel,\n resolveIdentifierRules,\n resolveIdentifierType,\n} from '../../utils/authForm';\nimport { AuthForm } from './AuthForm';\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,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { OAuthProviderButtonProps } from './types';
2
+ import type { OAuthProviderButtonProps } from '../../../../types/auth';
3
3
  /***
4
4
  * Renders a provider-branded OAuth action button without owning auth behavior.
5
5
  *
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OAuthProviderButton.d.ts","sourceRoot":"","sources":["../../../../../src/features/auth/adapters/inbound/OAuthProviderButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AA2CvE;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,gEAA+C,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { Button } from '../../features/button/public';
3
- import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
4
- import { resolveOAuthProviderIcon, resolveOAuthProviderLabel } from './oauthProviders';
2
+ import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
3
+ import { Button } from '../../../button/public';
4
+ import { resolveOAuthProviderIcon, resolveOAuthProviderLabel } from '../../utils/oauthProviders';
5
5
  function OAuthProviderButtonInner({ themeId: _themeId, mode: _mode, interactionPolicy, providerId, label, icon, disabled = false, loading = false, fullWidth = true, size = 'l', variant = 'outline', color = 'neutral', onPress, testID, }) {
6
6
  const resolvedIcon = icon ?? resolveOAuthProviderIcon(providerId);
7
7
  const resolvedLabel = label ?? `Continue with ${resolveOAuthProviderLabel(providerId)}`;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OAuthProviderButton.js","sourceRoot":"","sources":["../../../../../src/features/auth/adapters/inbound/OAuthProviderButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEjG,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 { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type { OAuthProviderButtonProps } from '../../../../types/auth';\nimport { Button } from '../../../button/public';\nimport { resolveOAuthProviderIcon, resolveOAuthProviderLabel } from '../../utils/oauthProviders';\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,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { OAuthProviderListProps } from './types';
2
+ import type { OAuthProviderListProps } from '../../../../types/auth';
3
3
  /***
4
4
  * Renders a group of OAuth provider buttons for sign-in and auth settings flows.
5
5
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OAuthProviderList.d.ts","sourceRoot":"","sources":["../../../../../src/features/auth/adapters/inbound/OAuthProviderList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAiDrE;;GAEG;AACH,eAAO,MAAM,iBAAiB,8DAA6C,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { Stack } from '../../features/layout/public';
3
- import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
2
+ import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
3
+ import { Stack } from '../../../layout/public';
4
4
  import { OAuthProviderButton } from './OAuthProviderButton';
5
5
  function OAuthProviderListInner({ themeId: _themeId, mode: _mode, interactionPolicy, providers, disabled = false, loading = false, fullWidth, layout = 'stack', size, variant, color, onProviderPress, testID, }) {
6
6
  const direction = layout === 'inline' ? 'row' : 'column';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OAuthProviderList.js","sourceRoot":"","sources":["../../../../../src/features/auth/adapters/inbound/OAuthProviderList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,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,MAAM,SAAS,GAAG,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC;IACzD,MAAM,iBAAiB,GAAG,SAAS,IAAI,MAAM,KAAK,OAAO,CAAC;IAE1D,OAAO,CACL,CAAC,KAAK,CACJ,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,GAAG,CAAC,GAAG,CACP,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,IAAI,CAAC,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAE/C;MAAA,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAC3B,CAAC,mBAAmB,CAClB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,QAAQ,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,CACxC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAC7B,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CACpB,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CACjB,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CACtB,OAAO,CAAC,CAAC,OAAO,IAAI,QAAQ,CAAC,OAAO,CAAC,CACrC,OAAO,CAAC,CAAC,eAAe,CAAC,CACzB,UAAU,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CACxB,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,EACrC,CACH,CAAC,CACJ;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,sBAAsB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type { OAuthProviderListProps } from '../../../../types/auth';\nimport { Stack } from '../../../layout/public';\nimport { OAuthProviderButton } from './OAuthProviderButton';\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,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { OtpFormProps } from './types';
2
+ import type { OtpFormProps } from '../../../../types/auth';
3
3
  /***
4
4
  * One-time passcode form pattern with digit input and submit actions.
5
5
  *
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OtpForm.d.ts","sourceRoot":"","sources":["../../../../../src/features/auth/adapters/inbound/OtpForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAqF3D;;;;GAIG;AACH,eAAO,MAAM,OAAO,oDAAmC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { Button } from '../../features/button/public';
3
- import { Stack } from '../../features/layout/public';
4
- import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
2
+ import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
3
+ import { Button } from '../../../button/public';
4
+ import { Stack } from '../../../layout/public';
5
5
  import { AuthForm } from './AuthForm';
6
6
  function OtpFormInner({ themeId: _themeId, mode: _mode, interactionPolicy, length = 6, otpLabel = 'Code', resendLabel = 'Resend code', resendDisabled = false, resendLoading = false, loading = false, disabled = false, error, submitLabel = 'Verify code', onSubmit, onResend, testID, }) {
7
7
  const resolvedLength = Math.max(1, length);
@@ -17,7 +17,7 @@ function OtpFormInner({ themeId: _themeId, mode: _mode, interactionPolicy, lengt
17
17
  rules: [{ kind: 'required' }, { kind: 'minLength', value: resolvedLength }],
18
18
  },
19
19
  ], [otpLabel, resolvedLength]);
20
- const handleSubmit = React.useCallback((formValues) => onSubmit({
20
+ const handleSubmit = React.useCallback((formValues) => onSubmit?.({
21
21
  otp: formValues.otp.trim(),
22
22
  }), [onSubmit]);
23
23
  return (<AuthForm actions={onResend ? (<Stack direction="row" gap="s" wrap="wrap">
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OtpForm.js","sourceRoot":"","sources":["../../../../../src/features/auth/adapters/inbound/OtpForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG1E,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAItC,SAAS,YAAY,CAAC,EACpB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EACjB,MAAM,GAAG,CAAC,EACV,QAAQ,GAAG,MAAM,EACjB,WAAW,GAAG,aAAa,EAC3B,cAAc,GAAG,KAAK,EACtB,aAAa,GAAG,KAAK,EACrB,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,EAChB,KAAK,EACL,WAAW,GAAG,aAAa,EAC3B,QAAQ,EACR,QAAQ,EACR,MAAM,GACO;IACb,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAC3C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAA2B;QACnE,GAAG,EAAE,EAAE;KACR,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAC1B,GAAG,EAAE,CAAC;QACJ;YACE,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,QAAQ;YACf,IAAI,EAAE,KAAK;YACX,SAAS,EAAE,cAAc;YACzB,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,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,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 { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type { OtpFormProps } from '../../../../types/auth';\nimport type { FormFieldConfig, FormValues } from '../../../../types/form';\nimport { Button } from '../../../button/public';\nimport { Stack } from '../../../layout/public';\nimport { AuthForm } from './AuthForm';\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,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { SignInFormProps } from './types';
2
+ import type { SignInFormProps } from '../../../../types/auth';
3
3
  /***
4
4
  * Sign-in form pattern with identifier and password fields.
5
5
  *
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignInForm.d.ts","sourceRoot":"","sources":["../../../../../src/features/auth/adapters/inbound/SignInForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAqH9D;;;;GAIG;AACH,eAAO,MAAM,UAAU,uDAAsC,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { Button } from '../../features/button/public';
3
- import { Stack } from '../../features/layout/public';
4
- import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
2
+ import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
3
+ import { Button } from '../../../button/public';
4
+ import { Stack } from '../../../layout/public';
5
+ import { defaultIdentifiers, normalizeIdentifierKind, resolveIdentifierLabel, resolveIdentifierRules, resolveIdentifierType, } from '../../utils/authForm';
5
6
  import { AuthForm } from './AuthForm';
6
- import { defaultIdentifiers, normalizeIdentifierKind, resolveIdentifierLabel, resolveIdentifierRules, resolveIdentifierType, } from './utils';
7
7
  function SignInFormInner({ themeId: _themeId, interactionPolicy, mode: _mode, identifiers = defaultIdentifiers, identifierLabel, secretLabel = 'Password', forgotPasswordLabel = 'Forgot password', signUpLabel = 'Sign up', loading = false, disabled = false, error, submitLabel = 'Sign in', onSubmit, onForgotPassword, onSignUp, testID, }) {
8
8
  const [values, setValues] = React.useState({
9
9
  identifier: '',
@@ -25,7 +25,7 @@ function SignInFormInner({ themeId: _themeId, interactionPolicy, mode: _mode, id
25
25
  rules: [{ kind: 'required' }],
26
26
  },
27
27
  ], [identifierLabel, identifiers, secretLabel]);
28
- const handleSubmit = React.useCallback((formValues) => onSubmit({
28
+ const handleSubmit = React.useCallback((formValues) => onSubmit?.({
29
29
  identifier: formValues.identifier.trim(),
30
30
  identifierKind: normalizeIdentifierKind(formValues.identifier, identifiers),
31
31
  secret: formValues.secret,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignInForm.js","sourceRoot":"","sources":["../../../../../src/features/auth/adapters/inbound/SignInForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG1E,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAItC,SAAS,eAAe,CAAC,EACvB,OAAO,EAAE,QAAQ,EACjB,iBAAiB,EACjB,IAAI,EAAE,KAAK,EACX,WAAW,GAAG,kBAAkB,EAChC,eAAe,EACf,WAAW,GAAG,UAAU,EACxB,mBAAmB,GAAG,iBAAiB,EACvC,WAAW,GAAG,SAAS,EACvB,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,EAChB,KAAK,EACL,WAAW,GAAG,SAAS,EACvB,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,MAAM,GACU;IAChB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAA8B;QACtE,UAAU,EAAE,EAAE;QACd,MAAM,EAAE,EAAE;KACX,CAAC,CAAC;IACH,MAAM,UAAU,G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,CAAC,CAAC,CACF,IAAI,CAAC,GAAG,CACR,KAAK,CAAC,SAAS,CACf,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CAErC;gBAAA,CAAC,mBAAmB,CACtB;cAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACR;YAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,CACV,CAAC,MAAM,CACL,QAAQ,CAAC,CAAC,QAAQ,IAAI,OAAO,CAAC,CAC9B,OAAO,CAAC,OAAO,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 { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type { SignInFormProps } from '../../../../types/auth';\nimport type { FormFieldConfig, FormValues } from '../../../../types/form';\nimport { Button } from '../../../button/public';\nimport { Stack } from '../../../layout/public';\nimport {\n defaultIdentifiers,\n normalizeIdentifierKind,\n resolveIdentifierLabel,\n resolveIdentifierRules,\n resolveIdentifierType,\n} from '../../utils/authForm';\nimport { AuthForm } from './AuthForm';\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,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { SignUpFormProps } from './types';
2
+ import type { SignUpFormProps } from '../../../../types/auth';
3
3
  /***
4
4
  * Sign-up form pattern with structured fields and validation.
5
5
  *
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignUpForm.d.ts","sourceRoot":"","sources":["../../../../../src/features/auth/adapters/inbound/SignUpForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAiF9D;;;;GAIG;AACH,eAAO,MAAM,UAAU,uDAAsC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { Button } from '../../features/button/public';
3
- import { Stack } from '../../features/layout/public';
4
- import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
2
+ import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
3
+ import { Button } from '../../../button/public';
4
+ import { Stack } from '../../../layout/public';
5
5
  import { AuthForm } from './AuthForm';
6
6
  const defaultSignUpFields = [
7
7
  {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignUpForm.js","sourceRoot":"","sources":["../../../../../src/features/auth/adapters/inbound/SignUpForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,s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,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IAEnF,OAAO,CACL,CAAC,QAAQ,CACP,OAAO,CAAC,CACN,QAAQ,CAAC,CAAC,CAAC,CACT,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CACxC;YAAA,CAAC,MAAM,CACL,QAAQ,CAAC,CAAC,QAAQ,IAAI,OAAO,CAAC,CAC9B,OAAO,CAAC,OAAO,CACf,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,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 { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type { SignUpFormProps } from '../../../../types/auth';\nimport type { FormFieldConfig, FormValues } from '../../../../types/form';\nimport { Button } from '../../../button/public';\nimport { Stack } from '../../../layout/public';\nimport { AuthForm } from './AuthForm';\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"]}
@@ -0,0 +1,79 @@
1
+ export declare const forgotPasswordFormMeta: {
2
+ readonly name: "ForgotPasswordForm";
3
+ readonly category: "pattern";
4
+ readonly description: "Collects an account identifier to start password recovery.";
5
+ readonly directManifestNode: true;
6
+ readonly allowedChildren: readonly [];
7
+ readonly blueprint: {
8
+ readonly label: "Forgot password form";
9
+ readonly defaultProps: {
10
+ readonly identifiers: readonly ["email"];
11
+ readonly identifierLabel: "Email";
12
+ readonly signInLabel: "Sign in";
13
+ readonly submitLabel: "Send code";
14
+ readonly loading: false;
15
+ readonly disabled: false;
16
+ };
17
+ };
18
+ readonly events: {
19
+ readonly submit: {
20
+ readonly label: "Submit";
21
+ readonly eventType: "forgotPasswordForm.submit";
22
+ readonly payloadFields: readonly [{
23
+ readonly path: "identifier";
24
+ readonly type: "string";
25
+ readonly label: "Identifier";
26
+ }, {
27
+ readonly path: "identifierKind";
28
+ readonly type: "string";
29
+ readonly label: "Identifier kind";
30
+ }];
31
+ };
32
+ readonly signIn: {
33
+ readonly label: "Sign in";
34
+ readonly eventType: "forgotPasswordForm.signIn";
35
+ readonly payloadFields: readonly [];
36
+ };
37
+ };
38
+ readonly props: {
39
+ readonly identifiers: {
40
+ readonly type: "array";
41
+ readonly category: "Authentication";
42
+ readonly label: "Identifiers";
43
+ readonly default: readonly ["email"];
44
+ };
45
+ readonly identifierLabel: {
46
+ readonly type: "string";
47
+ readonly category: "Content";
48
+ readonly label: "Identifier label";
49
+ };
50
+ readonly signInLabel: {
51
+ readonly type: "string";
52
+ readonly category: "Content";
53
+ readonly label: "Sign-in label";
54
+ };
55
+ readonly submitLabel: {
56
+ readonly type: "string";
57
+ readonly category: "Content";
58
+ readonly label: "Submit label";
59
+ };
60
+ readonly error: {
61
+ readonly type: "string";
62
+ readonly category: "State";
63
+ readonly label: "Error";
64
+ };
65
+ readonly loading: {
66
+ readonly type: "boolean";
67
+ readonly category: "State";
68
+ readonly label: "Loading";
69
+ readonly default: false;
70
+ };
71
+ readonly disabled: {
72
+ readonly type: "boolean";
73
+ readonly category: "State";
74
+ readonly label: "Disabled";
75
+ readonly default: false;
76
+ };
77
+ };
78
+ };
79
+ //# sourceMappingURL=forgotPasswordFormMeta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forgotPasswordFormMeta.d.ts","sourceRoot":"","sources":["../../../src/features/auth/forgotPasswordFormMeta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CG,CAAC"}
@@ -0,0 +1,48 @@
1
+ export const forgotPasswordFormMeta = {
2
+ name: 'ForgotPasswordForm',
3
+ category: 'pattern',
4
+ description: 'Collects an account identifier to start password recovery.',
5
+ directManifestNode: true,
6
+ allowedChildren: [],
7
+ blueprint: {
8
+ label: 'Forgot password form',
9
+ defaultProps: {
10
+ identifiers: ['email'],
11
+ identifierLabel: 'Email',
12
+ signInLabel: 'Sign in',
13
+ submitLabel: 'Send code',
14
+ loading: false,
15
+ disabled: false,
16
+ },
17
+ },
18
+ events: {
19
+ submit: {
20
+ label: 'Submit',
21
+ eventType: 'forgotPasswordForm.submit',
22
+ payloadFields: [
23
+ { path: 'identifier', type: 'string', label: 'Identifier' },
24
+ { path: 'identifierKind', type: 'string', label: 'Identifier kind' },
25
+ ],
26
+ },
27
+ signIn: {
28
+ label: 'Sign in',
29
+ eventType: 'forgotPasswordForm.signIn',
30
+ payloadFields: [],
31
+ },
32
+ },
33
+ props: {
34
+ identifiers: {
35
+ type: 'array',
36
+ category: 'Authentication',
37
+ label: 'Identifiers',
38
+ default: ['email'],
39
+ },
40
+ identifierLabel: { type: 'string', category: 'Content', label: 'Identifier label' },
41
+ signInLabel: { type: 'string', category: 'Content', label: 'Sign-in label' },
42
+ submitLabel: { type: 'string', category: 'Content', label: 'Submit label' },
43
+ error: { type: 'string', category: 'State', label: 'Error' },
44
+ loading: { type: 'boolean', category: 'State', label: 'Loading', default: false },
45
+ disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },
46
+ },
47
+ };
48
+ //# sourceMappingURL=forgotPasswordFormMeta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forgotPasswordFormMeta.js","sourceRoot":"","sources":["../../../src/features/auth/forgotPasswordFormM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AE,KAAK,EAAE,cAAc,EAAE;QAC3E,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;QAC5D,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE;QACjF,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE;KACpF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\n\nexport const forgotPasswordFormMeta = {\n name: 'ForgotPasswordForm',\n category: 'pattern',\n description: 'Collects an account identifier to start password recovery.',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Forgot password form',\n defaultProps: {\n identifiers: ['email'],\n identifierLabel: 'Email',\n signInLabel: 'Sign in',\n submitLabel: 'Send code',\n loading: false,\n disabled: false,\n },\n },\n events: {\n submit: {\n label: 'Submit',\n eventType: 'forgotPasswordForm.submit',\n payloadFields: [\n { path: 'identifier', type: 'string', label: 'Identifier' },\n { path: 'identifierKind', type: 'string', label: 'Identifier kind' },\n ],\n },\n signIn: {\n label: 'Sign in',\n eventType: 'forgotPasswordForm.signIn',\n payloadFields: [],\n },\n },\n props: {\n identifiers: {\n type: 'array',\n category: 'Authentication',\n label: 'Identifiers',\n default: ['email'],\n },\n identifierLabel: { type: 'string', category: 'Content', label: 'Identifier label' },\n signInLabel: { type: 'string', category: 'Content', label: 'Sign-in label' },\n submitLabel: { type: 'string', category: 'Content', label: 'Submit label' },\n error: { type: 'string', category: 'State', label: 'Error' },\n loading: { type: 'boolean', category: 'State', label: 'Loading', default: false },\n disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },\n },\n} as const satisfies ZoraComponentMeta;\n"]}