@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
@@ -0,0 +1,67 @@
1
+ import type { ZoraComponentMeta } from '../../metadata';
2
+
3
+ export const signUpFormMeta = {
4
+ name: 'SignUpForm',
5
+ category: 'pattern',
6
+ description: 'Collects configurable account fields for sign-up.',
7
+ directManifestNode: true,
8
+ allowedChildren: [],
9
+ blueprint: {
10
+ label: 'Sign-up form',
11
+ defaultProps: {
12
+ signInLabel: 'Sign in',
13
+ submitLabel: 'Sign up',
14
+ loading: false,
15
+ disabled: false,
16
+ },
17
+ },
18
+ events: {
19
+ submit: {
20
+ label: 'Submit',
21
+ eventType: 'signUpForm.submit',
22
+ payloadFields: [{ path: 'values', type: 'record', label: 'Values' }],
23
+ },
24
+ signIn: {
25
+ label: 'Sign in',
26
+ eventType: 'signUpForm.signIn',
27
+ payloadFields: [],
28
+ },
29
+ },
30
+ props: {
31
+ fields: {
32
+ type: 'array',
33
+ category: 'Authentication',
34
+ label: 'Fields',
35
+ itemSchema: [
36
+ { key: 'name', schema: { type: 'string', category: 'Identity', label: 'Name' } },
37
+ { key: 'label', schema: { type: 'string', category: 'Content', label: 'Label' } },
38
+ {
39
+ key: 'type',
40
+ schema: {
41
+ type: 'enum',
42
+ category: 'Authentication',
43
+ label: 'Type',
44
+ enum: ['email', 'number', 'otp', 'password', 'tel', 'text', 'url'],
45
+ },
46
+ },
47
+ {
48
+ key: 'placeholder',
49
+ schema: { type: 'string', category: 'Content', label: 'Placeholder' },
50
+ },
51
+ {
52
+ key: 'required',
53
+ schema: { type: 'boolean', category: 'Validation', label: 'Required' },
54
+ },
55
+ {
56
+ key: 'disabled',
57
+ schema: { type: 'boolean', category: 'State', label: 'Disabled' },
58
+ },
59
+ ],
60
+ },
61
+ signInLabel: { type: 'string', category: 'Content', label: 'Sign-in label' },
62
+ submitLabel: { type: 'string', category: 'Content', label: 'Submit label' },
63
+ error: { type: 'string', category: 'State', label: 'Error' },
64
+ loading: { type: 'boolean', category: 'State', label: 'Loading', default: false },
65
+ disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },
66
+ },
67
+ } as const satisfies ZoraComponentMeta;
@@ -1,5 +1,5 @@
1
- import type { FormFieldConfig, ValidationRule } from '../../types/form';
2
- import type { AuthIdentifierKind } from './types';
1
+ import type { AuthIdentifierKind } from '../../../types/auth';
2
+ import type { FormFieldConfig, ValidationRule } from '../../../types/form';
3
3
 
4
4
  export const defaultIdentifiers = ['email'] as const satisfies readonly AuthIdentifierKind[];
5
5
 
@@ -6,7 +6,7 @@ import {
6
6
  resolveOAuthProviderLabel,
7
7
  } from './oauthProviders';
8
8
 
9
- describe('OAuth provider UI helpers', () => {
9
+ describe('Auth OAuth provider helpers', () => {
10
10
  it('resolves known provider labels', () => {
11
11
  expect(resolveOAuthProviderLabel('google')).toBe('Google');
12
12
  expect(resolveOAuthProviderLabel('github')).toBe('GitHub');
@@ -1,4 +1,4 @@
1
- import type { OAuthProviderIconSpec } from './types';
1
+ import type { OAuthProviderIconSpec } from '../../../types/auth';
2
2
 
3
3
  export const DEFAULT_OAUTH_PROVIDER_ICONS = {
4
4
  apple: { provider: 'FontAwesome', name: 'apple' },
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
 
3
- import { Box } from '../../features/layout/public';
4
- import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
3
+ import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
4
+ import type { GradientProps } from '../../../../types/gradient';
5
+ import { Box } from '../../../layout/public';
5
6
  import { useGradientRenderer } from './GradientRendererContext';
6
- import type { GradientProps } from './types';
7
7
 
8
8
  function GradientInner({
9
9
  themeId: _themeId,
@@ -1,10 +1,10 @@
1
1
  import React, { createContext, use } from 'react';
2
2
 
3
- import type { GradientRenderer, GradientRendererProviderProps } from './types';
3
+ import type { GradientRenderer, GradientRendererProviderProps } from '../../../../types/gradient';
4
4
 
5
5
  const GradientRendererContext = createContext<GradientRenderer | null>(null);
6
6
 
7
- /**
7
+ /***
8
8
  * Supplies the host-owned renderer used by `Gradient`.
9
9
  *
10
10
  * Expo apps can adapt `expo-linear-gradient` here, while standalone React
@@ -14,6 +14,7 @@ export function GradientRendererProvider({ children, renderer }: GradientRendere
14
14
  return <GradientRendererContext value={renderer}>{children}</GradientRendererContext>;
15
15
  }
16
16
 
17
+ /*** Resolves the host-owned gradient renderer for a Gradient instance. */
17
18
  export function useGradientRenderer(): GradientRenderer {
18
19
  const renderer = use(GradientRendererContext);
19
20
 
@@ -0,0 +1,26 @@
1
+ import type { ZoraComponentMeta } from '../../metadata';
2
+ import { CONTAINER_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';
3
+
4
+ export const gradientMeta = {
5
+ name: 'Gradient',
6
+ category: 'component',
7
+ description: 'Renders a host-backed gradient container for nested manifest content.',
8
+ directManifestNode: true,
9
+ allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],
10
+ blueprint: {
11
+ label: 'Gradient',
12
+ },
13
+ props: {
14
+ colors: {
15
+ type: 'array',
16
+ category: 'Style',
17
+ label: 'Colors',
18
+ },
19
+ locations: { type: 'array', category: 'Style', label: 'Locations' },
20
+ width: { type: 'number', category: 'Layout', label: 'Width' },
21
+ height: { type: 'number', category: 'Layout', label: 'Height' },
22
+ minHeight: { type: 'number', category: 'Layout', label: 'Minimum height' },
23
+ radius: { type: 'radius', category: 'Style', label: 'Corner radius' },
24
+ p: { type: 'spacing', category: 'Layout', label: 'Padding' },
25
+ },
26
+ } as const satisfies ZoraComponentMeta;
@@ -0,0 +1,15 @@
1
+ import { expect, test } from 'bun:test';
2
+
3
+ import { ZORA_COMPONENT_META } from '../../metadata/componentMeta';
4
+
5
+ test('Gradient is a direct manifest container with serializable colors', () => {
6
+ const meta = ZORA_COMPONENT_META.Gradient;
7
+
8
+ expect(meta?.directManifestNode).toBe(true);
9
+ expect(meta?.allowedChildren.length).toBeGreaterThan(0);
10
+ expect(meta?.props.colors).toEqual({
11
+ type: 'array',
12
+ category: 'Style',
13
+ label: 'Colors',
14
+ });
15
+ });
@@ -1,5 +1,3 @@
1
- export { Gradient } from './Gradient';
2
- export { GradientRendererProvider } from './GradientRendererContext';
3
1
  export type {
4
2
  GradientColor,
5
3
  GradientColors,
@@ -9,4 +7,6 @@ export type {
9
7
  GradientRenderer,
10
8
  GradientRendererProps,
11
9
  GradientRendererProviderProps,
12
- } from './types';
10
+ } from '../../types/gradient';
11
+ export { Gradient } from './adapters/inbound/Gradient';
12
+ export { GradientRendererProvider } from './adapters/inbound/GradientRendererContext';
package/src/index.ts CHANGED
@@ -2,17 +2,6 @@ export type { AppBarMode, AppBarOverflowAction, AppBarProps } from './components
2
2
  export { AppBar } from './components/app-bar';
3
3
  export type { BreadcrumbItem, BreadcrumbsProps } from './components/breadcrumbs';
4
4
  export { Breadcrumbs } from './components/breadcrumbs';
5
- export type {
6
- GradientColor,
7
- GradientColors,
8
- GradientLocations,
9
- GradientPoint,
10
- GradientProps,
11
- GradientRenderer,
12
- GradientRendererProps,
13
- GradientRendererProviderProps,
14
- } from './components/gradient';
15
- export { Gradient, GradientRendererProvider } from './components/gradient';
16
5
  export type { DropdownMenuProps, MenuAction, MenuActionIntent, MenuProps } from './components/menu';
17
6
  export { DropdownMenu, Menu } from './components/menu';
18
7
  export type { ModalProps } from './components/modal';
@@ -33,10 +22,48 @@ export type { ToolbarActionProps, ToolbarPosition, ToolbarProps } from './compon
33
22
  export { Toolbar, ToolbarAction } from './components/toolbar';
34
23
  export { ZORA_CORE_PLUGIN } from './corePlugin';
35
24
  export { ZORA_CORE_PLUGIN_METADATA } from './corePluginMetadata';
25
+ export {
26
+ Accordion,
27
+ AccordionItem,
28
+ type AccordionItemProps,
29
+ type AccordionMode,
30
+ type AccordionMultipleProps,
31
+ type AccordionProps,
32
+ type AccordionSingleProps,
33
+ } from './features/accordion/public';
36
34
  export {
37
35
  ActivityIndicator,
38
36
  type ActivityIndicatorProps,
39
37
  } from './features/activity-indicator/public';
38
+ export type {
39
+ AuthFormBaseProps,
40
+ AuthIdentifierKind,
41
+ ForgotPasswordFormProps,
42
+ ForgotPasswordFormValues,
43
+ OAuthProviderButtonProps,
44
+ OAuthProviderIconSpec,
45
+ OAuthProviderItem,
46
+ OAuthProviderListLayout,
47
+ OAuthProviderListProps,
48
+ OtpFormProps,
49
+ OtpFormValues,
50
+ SignInFormProps,
51
+ SignInFormValues,
52
+ SignUpFormField,
53
+ SignUpFormProps,
54
+ SignUpFormValues,
55
+ } from './features/auth/public';
56
+ export {
57
+ DEFAULT_OAUTH_PROVIDER_ICONS,
58
+ ForgotPasswordForm,
59
+ OAuthProviderButton,
60
+ OAuthProviderList,
61
+ OtpForm,
62
+ resolveOAuthProviderIcon,
63
+ resolveOAuthProviderLabel,
64
+ SignInForm,
65
+ SignUpForm,
66
+ } from './features/auth/public';
40
67
  export type { AvatarProps, AvatarShape, AvatarSize } from './features/avatar/public';
41
68
  export type { AvatarGroupItem, AvatarGroupProps } from './features/avatar/public';
42
69
  export { Avatar, resolveAvatarInitials } from './features/avatar/public';
@@ -141,6 +168,17 @@ export {
141
168
  type TextInputProps,
142
169
  type TextInputTrailingAction,
143
170
  } from './features/form/text-input/public';
171
+ export type {
172
+ GradientColor,
173
+ GradientColors,
174
+ GradientLocations,
175
+ GradientPoint,
176
+ GradientProps,
177
+ GradientRenderer,
178
+ GradientRendererProps,
179
+ GradientRendererProviderProps,
180
+ } from './features/gradient/public';
181
+ export { Gradient, GradientRendererProvider } from './features/gradient/public';
144
182
  export {
145
183
  Hero,
146
184
  type HeroAction,
@@ -296,35 +334,6 @@ export {
296
334
  ZORA_THEME_RECIPE_META,
297
335
  ZORA_THEME_TOKEN_FAMILIES,
298
336
  } from './metadata';
299
- export type {
300
- AuthFormBaseProps,
301
- AuthIdentifierKind,
302
- ForgotPasswordFormProps,
303
- ForgotPasswordFormValues,
304
- OAuthProviderButtonProps,
305
- OAuthProviderIconSpec,
306
- OAuthProviderItem,
307
- OAuthProviderListLayout,
308
- OAuthProviderListProps,
309
- OtpFormProps,
310
- OtpFormValues,
311
- SignInFormProps,
312
- SignInFormValues,
313
- SignUpFormField,
314
- SignUpFormProps,
315
- SignUpFormValues,
316
- } from './patterns/auth';
317
- export {
318
- DEFAULT_OAUTH_PROVIDER_ICONS,
319
- ForgotPasswordForm,
320
- OAuthProviderButton,
321
- OAuthProviderList,
322
- OtpForm,
323
- resolveOAuthProviderIcon,
324
- resolveOAuthProviderLabel,
325
- SignInForm,
326
- SignUpForm,
327
- } from './patterns/auth';
328
337
  export type { ChatListAvatar, ChatListItemProps } from './patterns/chat-list-item';
329
338
  export { ChatListItem } from './patterns/chat-list-item';
330
339
  export type {
@@ -334,8 +343,6 @@ export type {
334
343
  export { CollectionEditor } from './patterns/collection-editor';
335
344
  export type { ConfirmDialogProps } from './patterns/confirm-dialog';
336
345
  export { ConfirmDialog } from './patterns/confirm-dialog';
337
- export type { DisclosureSectionProps } from './patterns/disclosure-section';
338
- export { DisclosureSection } from './patterns/disclosure-section';
339
346
  export type { FilterBarProps } from './patterns/filter-bar';
340
347
  export { FilterBar } from './patterns/filter-bar';
341
348
  export type { InspectorFieldProps } from './patterns/inspector-field';
@@ -1,5 +1,12 @@
1
1
  export const CONTAINER_ALLOWED_CHILDREN = [
2
2
  'ActivityIndicator',
3
+ 'ForgotPasswordForm',
4
+ 'OAuthProviderButton',
5
+ 'OAuthProviderList',
6
+ 'OtpForm',
7
+ 'SignInForm',
8
+ 'SignUpForm',
9
+ 'Accordion',
3
10
  'Surface',
4
11
  'Avatar',
5
12
  'AvatarGroup',
@@ -23,6 +30,7 @@ export const CONTAINER_ALLOWED_CHILDREN = [
23
30
  'Box',
24
31
  'Stack',
25
32
  'Grid',
33
+ 'Gradient',
26
34
  'Container',
27
35
  'Divider',
28
36
  'Text',
@@ -137,6 +137,12 @@ describe('ZORA_COMPONENT_META invariants', () => {
137
137
  test('direct manifest node leaf/container rules', () => {
138
138
  const expectedLeafNodes = new Set([
139
139
  'ActivityIndicator',
140
+ 'ForgotPasswordForm',
141
+ 'OAuthProviderButton',
142
+ 'OAuthProviderList',
143
+ 'OtpForm',
144
+ 'SignInForm',
145
+ 'SignUpForm',
140
146
  'Avatar',
141
147
  'AvatarGroup',
142
148
  'Badge',
@@ -180,7 +186,10 @@ describe('ZORA_COMPONENT_META invariants', () => {
180
186
  ]);
181
187
 
182
188
  const expectedContainerNodes = new Set([
189
+ 'Accordion',
190
+ 'AccordionItem',
183
191
  'Form',
192
+ 'Gradient',
184
193
  'Surface',
185
194
  'MediaCard',
186
195
  'FlatList',
@@ -227,6 +236,13 @@ describe('ZORA_COMPONENT_META invariants', () => {
227
236
  }
228
237
  });
229
238
 
239
+ test('Accordion constrains authored items to its canonical hierarchy', () => {
240
+ expect(ZORA_COMPONENT_META.Accordion.directManifestNode).toBe(true);
241
+ expect(ZORA_COMPONENT_META.Accordion.allowedChildren).toEqual(['AccordionItem']);
242
+ expect(ZORA_COMPONENT_META.AccordionItem.directManifestNode).toBe(true);
243
+ expect(ZORA_COMPONENT_META.AccordionItem.allowedChildren).not.toContain('AccordionItem');
244
+ });
245
+
230
246
  test('Image is a direct manifest leaf with canonical media authoring metadata', () => {
231
247
  expect(ZORA_COMPONENT_META.Image.directManifestNode).toBe(true);
232
248
  expect(ZORA_COMPONENT_META.Image.allowedChildren).toEqual([]);
@@ -1,6 +1,5 @@
1
1
  import { appBarMeta } from '../components/app-bar/meta';
2
2
  import { breadcrumbsMeta } from '../components/breadcrumbs/meta';
3
- import { gradientMeta } from '../components/gradient/meta';
4
3
  import { dropdownMenuMeta, menuMeta } from '../components/menu/meta';
5
4
  import { modalMeta } from '../components/modal/meta';
6
5
  import { paginationMeta } from '../components/pagination/meta';
@@ -10,7 +9,15 @@ import { selectMeta } from '../components/select/meta';
10
9
  import { tabsMeta } from '../components/tabs/meta';
11
10
  import { toastMeta, toastProviderMeta } from '../components/toast/meta';
12
11
  import { toolbarActionMeta, toolbarMeta } from '../components/toolbar/meta';
12
+ import { accordionItemMeta } from '../features/accordion/accordionItemMeta';
13
+ import { accordionMeta } from '../features/accordion/accordionMeta';
13
14
  import { activityIndicatorMeta } from '../features/activity-indicator/activityIndicatorMeta';
15
+ import { forgotPasswordFormMeta } from '../features/auth/forgotPasswordFormMeta';
16
+ import { oauthProviderButtonMeta } from '../features/auth/oauthProviderButtonMeta';
17
+ import { oauthProviderListMeta } from '../features/auth/oauthProviderListMeta';
18
+ import { otpFormMeta } from '../features/auth/otpFormMeta';
19
+ import { signInFormMeta } from '../features/auth/signInFormMeta';
20
+ import { signUpFormMeta } from '../features/auth/signUpFormMeta';
14
21
  import { avatarGroupMeta } from '../features/avatar/avatarGroupMeta';
15
22
  import { avatarMeta } from '../features/avatar/avatarMeta';
16
23
  import { badgeMeta } from '../features/badge/badgeMeta';
@@ -35,6 +42,7 @@ import { formFieldMeta } from '../features/form/formFieldMeta';
35
42
  import { formMeta } from '../features/form/formMeta';
36
43
  import { radioGroupMeta, radioMeta } from '../features/form/radio/radioMeta';
37
44
  import { textInputMeta } from '../features/form/text-input/textInputMeta';
45
+ import { gradientMeta } from '../features/gradient/gradientMeta';
38
46
  import { heroMeta } from '../features/hero/heroMeta';
39
47
  import { iconMeta } from '../features/icon/iconMeta';
40
48
  import { imageMeta } from '../features/image/imageMeta';
@@ -67,18 +75,9 @@ import { screenSectionMeta } from '../layout/screen-section/meta';
67
75
  import { settingsLayoutMeta } from '../layout/settings-layout/meta';
68
76
  import { sidebarLayoutMeta } from '../layout/sidebar-layout/meta';
69
77
  import { topbarLayoutMeta } from '../layout/topbar-layout/meta';
70
- import {
71
- forgotPasswordFormMeta,
72
- oauthProviderButtonMeta,
73
- oauthProviderListMeta,
74
- otpFormMeta,
75
- signInFormMeta,
76
- signUpFormMeta,
77
- } from '../patterns/auth/meta';
78
78
  import { chatListItemMeta } from '../patterns/chat-list-item/meta';
79
79
  import { collectionEditorMeta } from '../patterns/collection-editor/meta';
80
80
  import { confirmDialogMeta } from '../patterns/confirm-dialog/meta';
81
- import { disclosureSectionMeta } from '../patterns/disclosure-section/meta';
82
81
  import { filterBarMeta } from '../patterns/filter-bar/meta';
83
82
  import { inspectorFieldMeta } from '../patterns/inspector-field/meta';
84
83
  import { listMeta, listRowMeta, listSectionMeta } from '../patterns/list/meta';
@@ -105,6 +104,8 @@ import type { ZoraComponentMetaRegistry } from './types';
105
104
 
106
105
  export const ZORA_COMPONENT_META: ZoraComponentMetaRegistry = finalizeFeatureMetadata({
107
106
  ...foundationMetas,
107
+ Accordion: accordionMeta,
108
+ AccordionItem: accordionItemMeta,
108
109
  ActivityIndicator: activityIndicatorMeta,
109
110
  Box: boxMeta,
110
111
  Container: containerMeta,
@@ -182,7 +183,6 @@ export const ZORA_COMPONENT_META: ZoraComponentMetaRegistry = finalizeFeatureMet
182
183
  CollectionEditor: collectionEditorMeta,
183
184
  ConfirmDialog: confirmDialogMeta,
184
185
  ContentRail: contentRailMeta,
185
- DisclosureSection: disclosureSectionMeta,
186
186
  EmptyState: emptyStateMeta,
187
187
  FilterBar: filterBarMeta,
188
188
  Hero: heroMeta,
package/src/registry.ts CHANGED
@@ -3,7 +3,6 @@ import type React from 'react';
3
3
 
4
4
  import { AppBar } from './components/app-bar';
5
5
  import { Breadcrumbs } from './components/breadcrumbs';
6
- import { Gradient } from './components/gradient';
7
6
  import { DropdownMenu, Menu } from './components/menu';
8
7
  import { Modal } from './components/modal';
9
8
  import { Pagination } from './components/pagination';
@@ -13,7 +12,16 @@ import { Select } from './components/select';
13
12
  import { Tabs } from './components/tabs';
14
13
  import { Toast } from './components/toast';
15
14
  import { Toolbar, ToolbarAction } from './components/toolbar';
15
+ import { Accordion, AccordionItem } from './features/accordion/public';
16
16
  import { ActivityIndicator } from './features/activity-indicator/public';
17
+ import {
18
+ ForgotPasswordForm,
19
+ OAuthProviderButton,
20
+ OAuthProviderList,
21
+ OtpForm,
22
+ SignInForm,
23
+ SignUpForm,
24
+ } from './features/auth/public';
17
25
  import { Avatar } from './features/avatar/public';
18
26
  import { AvatarGroup } from './features/avatar/public';
19
27
  import { Badge } from './features/badge/public';
@@ -35,6 +43,7 @@ import { Checkbox, CheckboxGroup } from './features/form/checkbox/public';
35
43
  import { Form, FormActions, FormError, FormField } from './features/form/public';
36
44
  import { Radio, RadioGroup } from './features/form/radio/public';
37
45
  import { TextInput } from './features/form/text-input/public';
46
+ import { Gradient } from './features/gradient/public';
38
47
  import { Hero } from './features/hero/public';
39
48
  import { Icon } from './features/icon/public';
40
49
  import { Image } from './features/image/public';
@@ -57,18 +66,9 @@ import { ScreenSection } from './layout/screen-section';
57
66
  import { SettingsLayout } from './layout/settings-layout';
58
67
  import { SidebarLayout } from './layout/sidebar-layout';
59
68
  import { TopbarLayout } from './layout/topbar-layout';
60
- import {
61
- ForgotPasswordForm,
62
- OAuthProviderButton,
63
- OAuthProviderList,
64
- OtpForm,
65
- SignInForm,
66
- SignUpForm,
67
- } from './patterns/auth';
68
69
  import { ChatListItem } from './patterns/chat-list-item';
69
70
  import { CollectionEditor } from './patterns/collection-editor';
70
71
  import { ConfirmDialog } from './patterns/confirm-dialog';
71
- import { DisclosureSection } from './patterns/disclosure-section';
72
72
  import { FilterBar } from './patterns/filter-bar';
73
73
  import { InspectorField } from './patterns/inspector-field';
74
74
  import { List, ListRow, ListSection } from './patterns/list';
@@ -113,6 +113,8 @@ type _RegistryInteractionPolicyCheck = _AssertTrue<
113
113
  >;
114
114
 
115
115
  const _ZORA_COMPONENT_REGISTRY = {
116
+ Accordion,
117
+ AccordionItem,
116
118
  ActivityIndicator,
117
119
  AppBar,
118
120
  Avatar,
@@ -193,7 +195,6 @@ const _ZORA_COMPONENT_REGISTRY = {
193
195
  CollectionEditor,
194
196
  ConfirmDialog,
195
197
  ContentRail,
196
- DisclosureSection,
197
198
  EmptyState,
198
199
  FilterBar,
199
200
  Hero,
@@ -17,6 +17,8 @@ const IGNORED_DIRECTORY_NAMES = new Set([
17
17
 
18
18
  const REQUIRED_SHOWCASE_COVERAGE = {
19
19
  components: [
20
+ 'Accordion',
21
+ 'AccordionItem',
20
22
  'AppBar',
21
23
  'Avatar',
22
24
  'AvatarGroup',
@@ -81,7 +83,6 @@ const REQUIRED_SHOWCASE_COVERAGE = {
81
83
  'SignUpForm',
82
84
  'CollectionEditor',
83
85
  'ConfirmDialog',
84
- 'DisclosureSection',
85
86
  'EmptyState',
86
87
  'FilterBar',
87
88
  'SelectableItem',
@@ -57,6 +57,8 @@ const scopedComponentFiles = [
57
57
  join(srcDir, 'features', 'list', 'adapters', 'inbound', 'SectionList.tsx'),
58
58
  join(srcDir, 'features', 'bottom-sheet', 'adapters', 'inbound', 'BottomSheet.tsx'),
59
59
  join(srcDir, 'components', 'app-bar', 'AppBar.tsx'),
60
+ join(srcDir, 'features', 'accordion', 'adapters', 'inbound', 'Accordion.tsx'),
61
+ join(srcDir, 'features', 'accordion', 'adapters', 'inbound', 'AccordionItem.tsx'),
60
62
  join(srcDir, 'features', 'badge', 'adapters', 'inbound', 'Badge.tsx'),
61
63
  join(srcDir, 'features', 'button', 'adapters', 'inbound', 'Button.tsx'),
62
64
  join(srcDir, 'features', 'button', 'adapters', 'inbound', 'ButtonGroup.tsx'),
@@ -91,13 +93,13 @@ const scopedComponentFiles = [
91
93
  join(srcDir, 'layout', 'sidebar-layout', 'SidebarLayout.tsx'),
92
94
  join(srcDir, 'layout', 'topbar-layout', 'TopbarLayout.tsx'),
93
95
 
94
- join(srcDir, 'patterns', 'auth', 'ForgotPasswordForm.tsx'),
95
- join(srcDir, 'patterns', 'auth', 'OtpForm.tsx'),
96
- join(srcDir, 'patterns', 'auth', 'SignInForm.tsx'),
97
- join(srcDir, 'patterns', 'auth', 'SignUpForm.tsx'),
96
+ join(srcDir, 'features', 'auth', 'adapters', 'inbound', 'ForgotPasswordForm.tsx'),
97
+ join(srcDir, 'features', 'auth', 'adapters', 'inbound', 'OtpForm.tsx'),
98
+ join(srcDir, 'features', 'auth', 'adapters', 'inbound', 'SignInForm.tsx'),
99
+ join(srcDir, 'features', 'auth', 'adapters', 'inbound', 'SignUpForm.tsx'),
100
+ join(srcDir, 'features', 'gradient', 'adapters', 'inbound', 'Gradient.tsx'),
98
101
  join(srcDir, 'patterns', 'collection-editor', 'CollectionEditor.tsx'),
99
102
  join(srcDir, 'patterns', 'confirm-dialog', 'ConfirmDialog.tsx'),
100
- join(srcDir, 'patterns', 'disclosure-section', 'DisclosureSection.tsx'),
101
103
  join(srcDir, 'features', 'empty-state', 'adapters', 'inbound', 'EmptyState.tsx'),
102
104
  join(srcDir, 'patterns', 'inspector-field', 'InspectorField.tsx'),
103
105
  join(srcDir, 'patterns', 'list', 'List.tsx'),
@@ -128,6 +130,7 @@ const scopedComponentFiles = [
128
130
 
129
131
  const scopedPropTypeFiles = [
130
132
  join(srcDir, 'components', 'app-bar', 'types.ts'),
133
+ join(srcDir, 'types', 'accordion.ts'),
131
134
  join(srcDir, 'types', 'badge.ts'),
132
135
  join(srcDir, 'types', 'button.ts'),
133
136
  join(srcDir, 'types', 'button-group.ts'),
@@ -156,10 +159,10 @@ const scopedPropTypeFiles = [
156
159
  join(srcDir, 'layout', 'sidebar-layout', 'types.ts'),
157
160
  join(srcDir, 'layout', 'topbar-layout', 'types.ts'),
158
161
 
159
- join(srcDir, 'patterns', 'auth', 'types.ts'),
162
+ join(srcDir, 'types', 'auth.ts'),
163
+ join(srcDir, 'types', 'gradient.ts'),
160
164
  join(srcDir, 'patterns', 'collection-editor', 'types.ts'),
161
165
  join(srcDir, 'patterns', 'confirm-dialog', 'types.ts'),
162
- join(srcDir, 'patterns', 'disclosure-section', 'types.ts'),
163
166
  join(srcDir, 'types', 'empty-state.ts'),
164
167
  join(srcDir, 'patterns', 'inspector-field', 'types.ts'),
165
168
  join(srcDir, 'patterns', 'list', 'types.ts'),
@@ -0,0 +1,38 @@
1
+ import type {
2
+ AccordionItemProps as SurfaceAccordionItemProps,
3
+ AccordionMode,
4
+ AccordionMultipleProps as SurfaceAccordionMultipleProps,
5
+ AccordionSingleProps as SurfaceAccordionSingleProps,
6
+ ButtonIconSpec,
7
+ } from '@ankhorage/surface';
8
+ import type React from 'react';
9
+
10
+ import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
11
+
12
+ export type { AccordionMode } from '@ankhorage/surface';
13
+
14
+ export type AccordionSingleProps = ZoraBaseProps &
15
+ Omit<SurfaceAccordionSingleProps, 'children'> & {
16
+ children?: React.ReactNode;
17
+ };
18
+
19
+ export type AccordionMultipleProps = ZoraBaseProps &
20
+ Omit<SurfaceAccordionMultipleProps, 'children'> & {
21
+ children?: React.ReactNode;
22
+ };
23
+
24
+ export type AccordionProps = AccordionSingleProps | AccordionMultipleProps;
25
+
26
+ export type AccordionItemProps = ZoraBaseProps &
27
+ Omit<SurfaceAccordionItemProps, 'children'> & {
28
+ title: React.ReactNode;
29
+ description?: React.ReactNode;
30
+ icon?: ButtonIconSpec;
31
+ actions?: React.ReactNode;
32
+ children?: React.ReactNode;
33
+ };
34
+
35
+ export interface AccordionPresentationContextValue {
36
+ mode: AccordionMode;
37
+ openValues: readonly string[];
38
+ }
@@ -1,9 +1,9 @@
1
1
  import type { ButtonIconSpec } from '@ankhorage/surface';
2
2
  import type React from 'react';
3
3
 
4
- import type { ButtonProps } from '../../features/button/public';
5
- import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
6
- import type { FormFieldConfig, FormValues } from '../../types/form';
4
+ import type { ButtonProps } from '../features/button/public';
5
+ import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
6
+ import type { FormFieldConfig, FormValues } from './form';
7
7
 
8
8
  export type AuthIdentifierKind = 'email' | 'phone' | 'username';
9
9
 
@@ -26,7 +26,7 @@ export interface SignInFormProps extends AuthFormBaseProps {
26
26
  secretLabel?: React.ReactNode;
27
27
  forgotPasswordLabel?: React.ReactNode;
28
28
  signUpLabel?: React.ReactNode;
29
- onSubmit: (values: SignInFormValues) => void | Promise<void>;
29
+ onSubmit?: (values: SignInFormValues) => void | Promise<void>;
30
30
  onForgotPassword?: () => void | Promise<void>;
31
31
  onSignUp?: () => void | Promise<void>;
32
32
  }
@@ -37,7 +37,7 @@ export type SignUpFormField = FormFieldConfig;
37
37
  export interface SignUpFormProps extends AuthFormBaseProps {
38
38
  fields?: readonly SignUpFormField[];
39
39
  signInLabel?: React.ReactNode;
40
- onSubmit: (values: SignUpFormValues) => void | Promise<void>;
40
+ onSubmit?: (values: SignUpFormValues) => void | Promise<void>;
41
41
  onSignIn?: () => void | Promise<void>;
42
42
  }
43
43
 
@@ -50,7 +50,7 @@ export interface ForgotPasswordFormProps extends AuthFormBaseProps {
50
50
  identifiers?: readonly AuthIdentifierKind[];
51
51
  identifierLabel?: React.ReactNode;
52
52
  signInLabel?: React.ReactNode;
53
- onSubmit: (values: ForgotPasswordFormValues) => void | Promise<void>;
53
+ onSubmit?: (values: ForgotPasswordFormValues) => void | Promise<void>;
54
54
  onSignIn?: () => void | Promise<void>;
55
55
  }
56
56
 
@@ -64,7 +64,7 @@ export interface OtpFormProps extends AuthFormBaseProps {
64
64
  resendLabel?: React.ReactNode;
65
65
  resendDisabled?: boolean;
66
66
  resendLoading?: boolean;
67
- onSubmit: (values: OtpFormValues) => void | Promise<void>;
67
+ onSubmit?: (values: OtpFormValues) => void | Promise<void>;
68
68
  onResend?: () => void | Promise<void>;
69
69
  }
70
70