@ankhorage/zora 0.9.0 → 0.11.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 (516) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +80 -34
  3. package/dist/components/badge/Badge.d.ts +1 -1
  4. package/dist/components/badge/Badge.d.ts.map +1 -1
  5. package/dist/components/badge/Badge.js +3 -1
  6. package/dist/components/badge/Badge.js.map +1 -1
  7. package/dist/components/badge/types.d.ts +2 -1
  8. package/dist/components/badge/types.d.ts.map +1 -1
  9. package/dist/components/badge/types.js.map +1 -1
  10. package/dist/components/button/Button.d.ts +1 -1
  11. package/dist/components/button/Button.d.ts.map +1 -1
  12. package/dist/components/button/Button.js +3 -1
  13. package/dist/components/button/Button.js.map +1 -1
  14. package/dist/components/button/types.d.ts +2 -1
  15. package/dist/components/button/types.d.ts.map +1 -1
  16. package/dist/components/button/types.js.map +1 -1
  17. package/dist/components/card/Card.d.ts +1 -1
  18. package/dist/components/card/Card.d.ts.map +1 -1
  19. package/dist/components/card/Card.js +3 -1
  20. package/dist/components/card/Card.js.map +1 -1
  21. package/dist/components/card/types.d.ts +2 -1
  22. package/dist/components/card/types.d.ts.map +1 -1
  23. package/dist/components/card/types.js.map +1 -1
  24. package/dist/components/checkbox/Checkbox.d.ts +4 -0
  25. package/dist/components/checkbox/Checkbox.d.ts.map +1 -0
  26. package/dist/components/checkbox/Checkbox.js +8 -0
  27. package/dist/components/checkbox/Checkbox.js.map +1 -0
  28. package/dist/components/checkbox/CheckboxGroup.d.ts +1 -1
  29. package/dist/components/checkbox/CheckboxGroup.d.ts.map +1 -1
  30. package/dist/components/checkbox/CheckboxGroup.js +3 -1
  31. package/dist/components/checkbox/CheckboxGroup.js.map +1 -1
  32. package/dist/components/checkbox/index.d.ts +2 -3
  33. package/dist/components/checkbox/index.d.ts.map +1 -1
  34. package/dist/components/checkbox/index.js +1 -1
  35. package/dist/components/checkbox/index.js.map +1 -1
  36. package/dist/components/checkbox/types.d.ts +5 -2
  37. package/dist/components/checkbox/types.d.ts.map +1 -1
  38. package/dist/components/checkbox/types.js.map +1 -1
  39. package/dist/components/drawer/Drawer.d.ts +1 -1
  40. package/dist/components/drawer/Drawer.d.ts.map +1 -1
  41. package/dist/components/drawer/Drawer.js +3 -1
  42. package/dist/components/drawer/Drawer.js.map +1 -1
  43. package/dist/components/drawer/types.d.ts +2 -1
  44. package/dist/components/drawer/types.d.ts.map +1 -1
  45. package/dist/components/drawer/types.js.map +1 -1
  46. package/dist/components/form/Form.d.ts +1 -1
  47. package/dist/components/form/Form.d.ts.map +1 -1
  48. package/dist/components/form/Form.js +3 -1
  49. package/dist/components/form/Form.js.map +1 -1
  50. package/dist/components/form/FormActions.d.ts +1 -1
  51. package/dist/components/form/FormActions.d.ts.map +1 -1
  52. package/dist/components/form/FormActions.js +3 -1
  53. package/dist/components/form/FormActions.js.map +1 -1
  54. package/dist/components/form/FormError.d.ts +1 -1
  55. package/dist/components/form/FormError.d.ts.map +1 -1
  56. package/dist/components/form/FormError.js +6 -3
  57. package/dist/components/form/FormError.js.map +1 -1
  58. package/dist/components/form/FormField.d.ts +1 -1
  59. package/dist/components/form/FormField.d.ts.map +1 -1
  60. package/dist/components/form/FormField.js +5 -3
  61. package/dist/components/form/FormField.js.map +1 -1
  62. package/dist/components/form/types.d.ts +6 -9
  63. package/dist/components/form/types.d.ts.map +1 -1
  64. package/dist/components/form/types.js.map +1 -1
  65. package/dist/components/heading/Heading.d.ts +1 -1
  66. package/dist/components/heading/Heading.d.ts.map +1 -1
  67. package/dist/components/heading/Heading.js +3 -1
  68. package/dist/components/heading/Heading.js.map +1 -1
  69. package/dist/components/heading/types.d.ts +2 -2
  70. package/dist/components/heading/types.d.ts.map +1 -1
  71. package/dist/components/heading/types.js.map +1 -1
  72. package/dist/components/icon/Icon.d.ts +4 -2
  73. package/dist/components/icon/Icon.d.ts.map +1 -1
  74. package/dist/components/icon/Icon.js +3 -1
  75. package/dist/components/icon/Icon.js.map +1 -1
  76. package/dist/components/icon-button/IconButton.d.ts +1 -1
  77. package/dist/components/icon-button/IconButton.d.ts.map +1 -1
  78. package/dist/components/icon-button/IconButton.js +3 -1
  79. package/dist/components/icon-button/IconButton.js.map +1 -1
  80. package/dist/components/icon-button/types.d.ts +2 -1
  81. package/dist/components/icon-button/types.d.ts.map +1 -1
  82. package/dist/components/icon-button/types.js.map +1 -1
  83. package/dist/components/input/Input.d.ts +1 -1
  84. package/dist/components/input/Input.d.ts.map +1 -1
  85. package/dist/components/input/Input.js +5 -2
  86. package/dist/components/input/Input.js.map +1 -1
  87. package/dist/components/input/types.d.ts +2 -1
  88. package/dist/components/input/types.d.ts.map +1 -1
  89. package/dist/components/input/types.js.map +1 -1
  90. package/dist/components/modal/Modal.d.ts +1 -1
  91. package/dist/components/modal/Modal.d.ts.map +1 -1
  92. package/dist/components/modal/Modal.js +3 -1
  93. package/dist/components/modal/Modal.js.map +1 -1
  94. package/dist/components/modal/types.d.ts +2 -1
  95. package/dist/components/modal/types.d.ts.map +1 -1
  96. package/dist/components/modal/types.js.map +1 -1
  97. package/dist/components/radio/Radio.d.ts +4 -0
  98. package/dist/components/radio/Radio.d.ts.map +1 -0
  99. package/dist/components/radio/Radio.js +8 -0
  100. package/dist/components/radio/Radio.js.map +1 -0
  101. package/dist/components/radio/RadioGroup.d.ts +1 -1
  102. package/dist/components/radio/RadioGroup.d.ts.map +1 -1
  103. package/dist/components/radio/RadioGroup.js +3 -1
  104. package/dist/components/radio/RadioGroup.js.map +1 -1
  105. package/dist/components/radio/index.d.ts +2 -3
  106. package/dist/components/radio/index.d.ts.map +1 -1
  107. package/dist/components/radio/index.js +1 -1
  108. package/dist/components/radio/index.js.map +1 -1
  109. package/dist/components/radio/types.d.ts +5 -2
  110. package/dist/components/radio/types.d.ts.map +1 -1
  111. package/dist/components/radio/types.js.map +1 -1
  112. package/dist/components/select/Select.d.ts +1 -1
  113. package/dist/components/select/Select.d.ts.map +1 -1
  114. package/dist/components/select/Select.js +6 -3
  115. package/dist/components/select/Select.js.map +1 -1
  116. package/dist/components/select/types.d.ts +2 -2
  117. package/dist/components/select/types.d.ts.map +1 -1
  118. package/dist/components/select/types.js.map +1 -1
  119. package/dist/components/tabs/Tabs.d.ts +1 -1
  120. package/dist/components/tabs/Tabs.d.ts.map +1 -1
  121. package/dist/components/tabs/Tabs.js +6 -3
  122. package/dist/components/tabs/Tabs.js.map +1 -1
  123. package/dist/components/tabs/types.d.ts +2 -2
  124. package/dist/components/tabs/types.d.ts.map +1 -1
  125. package/dist/components/tabs/types.js.map +1 -1
  126. package/dist/components/text/Text.d.ts +1 -1
  127. package/dist/components/text/Text.d.ts.map +1 -1
  128. package/dist/components/text/Text.js +3 -1
  129. package/dist/components/text/Text.js.map +1 -1
  130. package/dist/components/text/types.d.ts +2 -2
  131. package/dist/components/text/types.d.ts.map +1 -1
  132. package/dist/components/text/types.js.map +1 -1
  133. package/dist/components/textarea/Textarea.d.ts +1 -1
  134. package/dist/components/textarea/Textarea.d.ts.map +1 -1
  135. package/dist/components/textarea/Textarea.js +5 -2
  136. package/dist/components/textarea/Textarea.js.map +1 -1
  137. package/dist/components/textarea/types.d.ts +2 -1
  138. package/dist/components/textarea/types.d.ts.map +1 -1
  139. package/dist/components/textarea/types.js.map +1 -1
  140. package/dist/components/toolbar/Toolbar.d.ts +1 -1
  141. package/dist/components/toolbar/Toolbar.d.ts.map +1 -1
  142. package/dist/components/toolbar/Toolbar.js +3 -1
  143. package/dist/components/toolbar/Toolbar.js.map +1 -1
  144. package/dist/components/toolbar/ToolbarAction.d.ts +1 -1
  145. package/dist/components/toolbar/ToolbarAction.d.ts.map +1 -1
  146. package/dist/components/toolbar/ToolbarAction.js +3 -1
  147. package/dist/components/toolbar/ToolbarAction.js.map +1 -1
  148. package/dist/components/toolbar/types.d.ts +3 -4
  149. package/dist/components/toolbar/types.d.ts.map +1 -1
  150. package/dist/components/toolbar/types.js.map +1 -1
  151. package/dist/foundation/Box.d.ts +7 -0
  152. package/dist/foundation/Box.d.ts.map +1 -0
  153. package/dist/foundation/Box.js +8 -0
  154. package/dist/foundation/Box.js.map +1 -0
  155. package/dist/foundation/Center.d.ts +7 -0
  156. package/dist/foundation/Center.d.ts.map +1 -0
  157. package/dist/foundation/Center.js +8 -0
  158. package/dist/foundation/Center.js.map +1 -0
  159. package/dist/foundation/Container.d.ts +7 -0
  160. package/dist/foundation/Container.d.ts.map +1 -0
  161. package/dist/foundation/Container.js +8 -0
  162. package/dist/foundation/Container.js.map +1 -0
  163. package/dist/foundation/Divider.d.ts +7 -0
  164. package/dist/foundation/Divider.d.ts.map +1 -0
  165. package/dist/foundation/Divider.js +8 -0
  166. package/dist/foundation/Divider.js.map +1 -0
  167. package/dist/foundation/Grid.d.ts +7 -0
  168. package/dist/foundation/Grid.d.ts.map +1 -0
  169. package/dist/foundation/Grid.js +8 -0
  170. package/dist/foundation/Grid.js.map +1 -0
  171. package/dist/foundation/Inline.d.ts +7 -0
  172. package/dist/foundation/Inline.d.ts.map +1 -0
  173. package/dist/foundation/Inline.js +8 -0
  174. package/dist/foundation/Inline.js.map +1 -0
  175. package/dist/foundation/Show.d.ts +7 -0
  176. package/dist/foundation/Show.d.ts.map +1 -0
  177. package/dist/foundation/Show.js +8 -0
  178. package/dist/foundation/Show.js.map +1 -0
  179. package/dist/foundation/Spacer.d.ts +7 -0
  180. package/dist/foundation/Spacer.d.ts.map +1 -0
  181. package/dist/foundation/Spacer.js +8 -0
  182. package/dist/foundation/Spacer.js.map +1 -0
  183. package/dist/foundation/Stack.d.ts +7 -0
  184. package/dist/foundation/Stack.d.ts.map +1 -0
  185. package/dist/foundation/Stack.js +8 -0
  186. package/dist/foundation/Stack.js.map +1 -0
  187. package/dist/foundation/Surface.d.ts +8 -0
  188. package/dist/foundation/Surface.d.ts.map +1 -0
  189. package/dist/foundation/Surface.js +8 -0
  190. package/dist/foundation/Surface.js.map +1 -0
  191. package/dist/foundation/index.d.ts +20 -2
  192. package/dist/foundation/index.d.ts.map +1 -1
  193. package/dist/foundation/index.js +10 -1
  194. package/dist/foundation/index.js.map +1 -1
  195. package/dist/layout/app-shell/AppShell.d.ts +1 -1
  196. package/dist/layout/app-shell/AppShell.d.ts.map +1 -1
  197. package/dist/layout/app-shell/AppShell.js +3 -1
  198. package/dist/layout/app-shell/AppShell.js.map +1 -1
  199. package/dist/layout/app-shell/types.d.ts +2 -2
  200. package/dist/layout/app-shell/types.d.ts.map +1 -1
  201. package/dist/layout/app-shell/types.js.map +1 -1
  202. package/dist/layout/auth-layout/AuthLayout.d.ts +1 -1
  203. package/dist/layout/auth-layout/AuthLayout.d.ts.map +1 -1
  204. package/dist/layout/auth-layout/AuthLayout.js +3 -1
  205. package/dist/layout/auth-layout/AuthLayout.js.map +1 -1
  206. package/dist/layout/auth-layout/types.d.ts +2 -2
  207. package/dist/layout/auth-layout/types.d.ts.map +1 -1
  208. package/dist/layout/auth-layout/types.js.map +1 -1
  209. package/dist/layout/page/Page.d.ts +1 -1
  210. package/dist/layout/page/Page.d.ts.map +1 -1
  211. package/dist/layout/page/Page.js +3 -1
  212. package/dist/layout/page/Page.js.map +1 -1
  213. package/dist/layout/page/types.d.ts +2 -2
  214. package/dist/layout/page/types.d.ts.map +1 -1
  215. package/dist/layout/page/types.js.map +1 -1
  216. package/dist/layout/page-header/PageHeader.d.ts +1 -1
  217. package/dist/layout/page-header/PageHeader.d.ts.map +1 -1
  218. package/dist/layout/page-header/PageHeader.js +3 -1
  219. package/dist/layout/page-header/PageHeader.js.map +1 -1
  220. package/dist/layout/page-header/types.d.ts +2 -2
  221. package/dist/layout/page-header/types.d.ts.map +1 -1
  222. package/dist/layout/page-header/types.js.map +1 -1
  223. package/dist/layout/page-section/PageSection.d.ts +1 -1
  224. package/dist/layout/page-section/PageSection.d.ts.map +1 -1
  225. package/dist/layout/page-section/PageSection.js +3 -1
  226. package/dist/layout/page-section/PageSection.js.map +1 -1
  227. package/dist/layout/page-section/types.d.ts +2 -2
  228. package/dist/layout/page-section/types.d.ts.map +1 -1
  229. package/dist/layout/page-section/types.js.map +1 -1
  230. package/dist/layout/settings-layout/SettingsLayout.d.ts +1 -1
  231. package/dist/layout/settings-layout/SettingsLayout.d.ts.map +1 -1
  232. package/dist/layout/settings-layout/SettingsLayout.js +3 -1
  233. package/dist/layout/settings-layout/SettingsLayout.js.map +1 -1
  234. package/dist/layout/settings-layout/types.d.ts +2 -2
  235. package/dist/layout/settings-layout/types.d.ts.map +1 -1
  236. package/dist/layout/settings-layout/types.js.map +1 -1
  237. package/dist/layout/sidebar-layout/SidebarLayout.d.ts +1 -1
  238. package/dist/layout/sidebar-layout/SidebarLayout.d.ts.map +1 -1
  239. package/dist/layout/sidebar-layout/SidebarLayout.js +3 -1
  240. package/dist/layout/sidebar-layout/SidebarLayout.js.map +1 -1
  241. package/dist/layout/sidebar-layout/types.d.ts +2 -2
  242. package/dist/layout/sidebar-layout/types.d.ts.map +1 -1
  243. package/dist/layout/sidebar-layout/types.js.map +1 -1
  244. package/dist/layout/topbar-layout/TopbarLayout.d.ts +1 -1
  245. package/dist/layout/topbar-layout/TopbarLayout.d.ts.map +1 -1
  246. package/dist/layout/topbar-layout/TopbarLayout.js +3 -1
  247. package/dist/layout/topbar-layout/TopbarLayout.js.map +1 -1
  248. package/dist/layout/topbar-layout/types.d.ts +2 -2
  249. package/dist/layout/topbar-layout/types.d.ts.map +1 -1
  250. package/dist/layout/topbar-layout/types.js.map +1 -1
  251. package/dist/patterns/auth/ForgotPasswordForm.d.ts +1 -1
  252. package/dist/patterns/auth/ForgotPasswordForm.d.ts.map +1 -1
  253. package/dist/patterns/auth/ForgotPasswordForm.js +3 -1
  254. package/dist/patterns/auth/ForgotPasswordForm.js.map +1 -1
  255. package/dist/patterns/auth/OtpForm.d.ts +1 -1
  256. package/dist/patterns/auth/OtpForm.d.ts.map +1 -1
  257. package/dist/patterns/auth/OtpForm.js +3 -1
  258. package/dist/patterns/auth/OtpForm.js.map +1 -1
  259. package/dist/patterns/auth/SignInForm.d.ts +1 -1
  260. package/dist/patterns/auth/SignInForm.d.ts.map +1 -1
  261. package/dist/patterns/auth/SignInForm.js +3 -1
  262. package/dist/patterns/auth/SignInForm.js.map +1 -1
  263. package/dist/patterns/auth/SignUpForm.d.ts +1 -1
  264. package/dist/patterns/auth/SignUpForm.d.ts.map +1 -1
  265. package/dist/patterns/auth/SignUpForm.js +3 -1
  266. package/dist/patterns/auth/SignUpForm.js.map +1 -1
  267. package/dist/patterns/auth/types.d.ts +2 -2
  268. package/dist/patterns/auth/types.d.ts.map +1 -1
  269. package/dist/patterns/auth/types.js.map +1 -1
  270. package/dist/patterns/collection-editor/CollectionEditor.d.ts +1 -1
  271. package/dist/patterns/collection-editor/CollectionEditor.d.ts.map +1 -1
  272. package/dist/patterns/collection-editor/CollectionEditor.js +3 -1
  273. package/dist/patterns/collection-editor/CollectionEditor.js.map +1 -1
  274. package/dist/patterns/collection-editor/types.d.ts +2 -2
  275. package/dist/patterns/collection-editor/types.d.ts.map +1 -1
  276. package/dist/patterns/collection-editor/types.js.map +1 -1
  277. package/dist/patterns/confirm-dialog/ConfirmDialog.d.ts +1 -1
  278. package/dist/patterns/confirm-dialog/ConfirmDialog.d.ts.map +1 -1
  279. package/dist/patterns/confirm-dialog/ConfirmDialog.js +3 -1
  280. package/dist/patterns/confirm-dialog/ConfirmDialog.js.map +1 -1
  281. package/dist/patterns/confirm-dialog/types.d.ts +2 -2
  282. package/dist/patterns/confirm-dialog/types.d.ts.map +1 -1
  283. package/dist/patterns/confirm-dialog/types.js.map +1 -1
  284. package/dist/patterns/disclosure-section/DisclosureSection.d.ts +1 -1
  285. package/dist/patterns/disclosure-section/DisclosureSection.d.ts.map +1 -1
  286. package/dist/patterns/disclosure-section/DisclosureSection.js +3 -1
  287. package/dist/patterns/disclosure-section/DisclosureSection.js.map +1 -1
  288. package/dist/patterns/disclosure-section/types.d.ts +2 -2
  289. package/dist/patterns/disclosure-section/types.d.ts.map +1 -1
  290. package/dist/patterns/disclosure-section/types.js.map +1 -1
  291. package/dist/patterns/empty-state/EmptyState.d.ts +1 -1
  292. package/dist/patterns/empty-state/EmptyState.d.ts.map +1 -1
  293. package/dist/patterns/empty-state/EmptyState.js +3 -1
  294. package/dist/patterns/empty-state/EmptyState.js.map +1 -1
  295. package/dist/patterns/empty-state/types.d.ts +2 -2
  296. package/dist/patterns/empty-state/types.d.ts.map +1 -1
  297. package/dist/patterns/empty-state/types.js.map +1 -1
  298. package/dist/patterns/form-field/FormField.d.ts +1 -1
  299. package/dist/patterns/form-field/FormField.d.ts.map +1 -1
  300. package/dist/patterns/form-field/FormField.js +3 -1
  301. package/dist/patterns/form-field/FormField.js.map +1 -1
  302. package/dist/patterns/form-field/types.d.ts +2 -1
  303. package/dist/patterns/form-field/types.d.ts.map +1 -1
  304. package/dist/patterns/form-field/types.js.map +1 -1
  305. package/dist/patterns/inspector-field/InspectorField.d.ts +1 -1
  306. package/dist/patterns/inspector-field/InspectorField.d.ts.map +1 -1
  307. package/dist/patterns/inspector-field/InspectorField.js +3 -1
  308. package/dist/patterns/inspector-field/InspectorField.js.map +1 -1
  309. package/dist/patterns/inspector-field/types.d.ts +2 -2
  310. package/dist/patterns/inspector-field/types.d.ts.map +1 -1
  311. package/dist/patterns/inspector-field/types.js.map +1 -1
  312. package/dist/patterns/notice/Notice.d.ts +1 -1
  313. package/dist/patterns/notice/Notice.d.ts.map +1 -1
  314. package/dist/patterns/notice/Notice.js +3 -1
  315. package/dist/patterns/notice/Notice.js.map +1 -1
  316. package/dist/patterns/notice/types.d.ts +2 -2
  317. package/dist/patterns/notice/types.d.ts.map +1 -1
  318. package/dist/patterns/notice/types.js.map +1 -1
  319. package/dist/patterns/panel/Panel.d.ts +1 -1
  320. package/dist/patterns/panel/Panel.d.ts.map +1 -1
  321. package/dist/patterns/panel/Panel.js +3 -1
  322. package/dist/patterns/panel/Panel.js.map +1 -1
  323. package/dist/patterns/panel/types.d.ts +2 -2
  324. package/dist/patterns/panel/types.d.ts.map +1 -1
  325. package/dist/patterns/panel/types.js.map +1 -1
  326. package/dist/patterns/responsive-panel/ResponsivePanel.d.ts +1 -1
  327. package/dist/patterns/responsive-panel/ResponsivePanel.d.ts.map +1 -1
  328. package/dist/patterns/responsive-panel/ResponsivePanel.js +3 -1
  329. package/dist/patterns/responsive-panel/ResponsivePanel.js.map +1 -1
  330. package/dist/patterns/responsive-panel/types.d.ts +2 -2
  331. package/dist/patterns/responsive-panel/types.d.ts.map +1 -1
  332. package/dist/patterns/responsive-panel/types.js.map +1 -1
  333. package/dist/patterns/section-header/SectionHeader.d.ts +1 -1
  334. package/dist/patterns/section-header/SectionHeader.d.ts.map +1 -1
  335. package/dist/patterns/section-header/SectionHeader.js +3 -1
  336. package/dist/patterns/section-header/SectionHeader.js.map +1 -1
  337. package/dist/patterns/section-header/types.d.ts +2 -2
  338. package/dist/patterns/section-header/types.d.ts.map +1 -1
  339. package/dist/patterns/section-header/types.js.map +1 -1
  340. package/dist/patterns/settings-row/SettingsRow.d.ts +1 -1
  341. package/dist/patterns/settings-row/SettingsRow.d.ts.map +1 -1
  342. package/dist/patterns/settings-row/SettingsRow.js +3 -1
  343. package/dist/patterns/settings-row/SettingsRow.js.map +1 -1
  344. package/dist/patterns/settings-row/types.d.ts +2 -2
  345. package/dist/patterns/settings-row/types.d.ts.map +1 -1
  346. package/dist/patterns/settings-row/types.js.map +1 -1
  347. package/dist/patterns/switch-field/SwitchField.d.ts +1 -1
  348. package/dist/patterns/switch-field/SwitchField.d.ts.map +1 -1
  349. package/dist/patterns/switch-field/SwitchField.js +3 -1
  350. package/dist/patterns/switch-field/SwitchField.js.map +1 -1
  351. package/dist/patterns/switch-field/types.d.ts +2 -2
  352. package/dist/patterns/switch-field/types.d.ts.map +1 -1
  353. package/dist/patterns/switch-field/types.js.map +1 -1
  354. package/dist/patterns/tile-grid/PaletteItem.d.ts +1 -1
  355. package/dist/patterns/tile-grid/PaletteItem.d.ts.map +1 -1
  356. package/dist/patterns/tile-grid/PaletteItem.js +6 -3
  357. package/dist/patterns/tile-grid/PaletteItem.js.map +1 -1
  358. package/dist/patterns/tile-grid/TileGrid.d.ts +1 -1
  359. package/dist/patterns/tile-grid/TileGrid.d.ts.map +1 -1
  360. package/dist/patterns/tile-grid/TileGrid.js +3 -1
  361. package/dist/patterns/tile-grid/TileGrid.js.map +1 -1
  362. package/dist/patterns/tile-grid/types.d.ts +3 -4
  363. package/dist/patterns/tile-grid/types.d.ts.map +1 -1
  364. package/dist/patterns/tile-grid/types.js.map +1 -1
  365. package/dist/patterns/tree-view/TreeItem.d.ts +3 -2
  366. package/dist/patterns/tree-view/TreeItem.d.ts.map +1 -1
  367. package/dist/patterns/tree-view/TreeItem.js +4 -2
  368. package/dist/patterns/tree-view/TreeItem.js.map +1 -1
  369. package/dist/patterns/tree-view/TreeView.d.ts +1 -1
  370. package/dist/patterns/tree-view/TreeView.d.ts.map +1 -1
  371. package/dist/patterns/tree-view/TreeView.js +3 -1
  372. package/dist/patterns/tree-view/TreeView.js.map +1 -1
  373. package/dist/patterns/tree-view/types.d.ts +2 -2
  374. package/dist/patterns/tree-view/types.d.ts.map +1 -1
  375. package/dist/patterns/tree-view/types.js.map +1 -1
  376. package/dist/theme/ZoraBaseProps.d.ts +18 -0
  377. package/dist/theme/ZoraBaseProps.d.ts.map +1 -0
  378. package/dist/theme/ZoraBaseProps.js +2 -0
  379. package/dist/theme/ZoraBaseProps.js.map +1 -0
  380. package/dist/theme/ZoraProvider.d.ts.map +1 -1
  381. package/dist/theme/ZoraProvider.js +8 -4
  382. package/dist/theme/ZoraProvider.js.map +1 -1
  383. package/dist/theme/ZoraThemeRuntimeContext.d.ts +9 -0
  384. package/dist/theme/ZoraThemeRuntimeContext.d.ts.map +1 -0
  385. package/dist/theme/ZoraThemeRuntimeContext.js +10 -0
  386. package/dist/theme/ZoraThemeRuntimeContext.js.map +1 -0
  387. package/dist/theme/ZoraThemeScope.d.ts +9 -0
  388. package/dist/theme/ZoraThemeScope.d.ts.map +1 -0
  389. package/dist/theme/ZoraThemeScope.js +41 -0
  390. package/dist/theme/ZoraThemeScope.js.map +1 -0
  391. package/dist/theme/index.d.ts +4 -0
  392. package/dist/theme/index.d.ts.map +1 -1
  393. package/dist/theme/index.js +2 -0
  394. package/dist/theme/index.js.map +1 -1
  395. package/dist/theme/resolveZoraScopedThemeId.d.ts +6 -0
  396. package/dist/theme/resolveZoraScopedThemeId.d.ts.map +1 -0
  397. package/dist/theme/resolveZoraScopedThemeId.js +15 -0
  398. package/dist/theme/resolveZoraScopedThemeId.js.map +1 -0
  399. package/dist/theme/withZoraThemeScope.d.ts +4 -0
  400. package/dist/theme/withZoraThemeScope.d.ts.map +1 -0
  401. package/dist/theme/withZoraThemeScope.js +16 -0
  402. package/dist/theme/withZoraThemeScope.js.map +1 -0
  403. package/package.json +1 -1
  404. package/src/components/badge/Badge.tsx +12 -1
  405. package/src/components/badge/types.ts +5 -4
  406. package/src/components/button/Button.tsx +11 -1
  407. package/src/components/button/types.ts +3 -4
  408. package/src/components/card/Card.tsx +6 -1
  409. package/src/components/card/types.ts +3 -1
  410. package/src/components/checkbox/Checkbox.tsx +11 -0
  411. package/src/components/checkbox/CheckboxGroup.tsx +6 -1
  412. package/src/components/checkbox/index.ts +2 -3
  413. package/src/components/checkbox/types.ts +13 -5
  414. package/src/components/drawer/Drawer.tsx +13 -1
  415. package/src/components/drawer/types.ts +9 -4
  416. package/src/components/form/Form.tsx +6 -1
  417. package/src/components/form/FormActions.tsx +6 -1
  418. package/src/components/form/FormError.tsx +7 -3
  419. package/src/components/form/FormField.tsx +24 -3
  420. package/src/components/form/types.ts +12 -12
  421. package/src/components/heading/Heading.tsx +6 -1
  422. package/src/components/heading/types.ts +3 -2
  423. package/src/components/icon/Icon.tsx +7 -2
  424. package/src/components/icon-button/IconButton.tsx +6 -1
  425. package/src/components/icon-button/types.ts +2 -1
  426. package/src/components/input/Input.tsx +13 -2
  427. package/src/components/input/types.ts +8 -4
  428. package/src/components/modal/Modal.tsx +6 -1
  429. package/src/components/modal/types.ts +5 -4
  430. package/src/components/radio/Radio.tsx +11 -0
  431. package/src/components/radio/RadioGroup.tsx +6 -1
  432. package/src/components/radio/index.ts +2 -3
  433. package/src/components/radio/types.ts +12 -5
  434. package/src/components/select/Select.tsx +9 -3
  435. package/src/components/select/types.ts +3 -2
  436. package/src/components/tabs/Tabs.tsx +9 -3
  437. package/src/components/tabs/types.ts +2 -2
  438. package/src/components/text/Text.tsx +6 -1
  439. package/src/components/text/types.ts +3 -2
  440. package/src/components/textarea/Textarea.tsx +13 -2
  441. package/src/components/textarea/types.ts +8 -4
  442. package/src/components/toolbar/Toolbar.tsx +6 -1
  443. package/src/components/toolbar/ToolbarAction.tsx +9 -1
  444. package/src/components/toolbar/types.ts +4 -4
  445. package/src/foundation/Box.tsx +13 -0
  446. package/src/foundation/Center.tsx +16 -0
  447. package/src/foundation/Container.tsx +17 -0
  448. package/src/foundation/Divider.tsx +17 -0
  449. package/src/foundation/Grid.tsx +13 -0
  450. package/src/foundation/Inline.tsx +16 -0
  451. package/src/foundation/Show.tsx +13 -0
  452. package/src/foundation/Spacer.tsx +16 -0
  453. package/src/foundation/Stack.tsx +13 -0
  454. package/src/foundation/Surface.tsx +20 -0
  455. package/src/foundation/index.test.ts +2 -2
  456. package/src/foundation/index.ts +20 -25
  457. package/src/layout/app-shell/AppShell.tsx +6 -1
  458. package/src/layout/app-shell/types.ts +3 -2
  459. package/src/layout/auth-layout/AuthLayout.tsx +6 -1
  460. package/src/layout/auth-layout/types.ts +3 -2
  461. package/src/layout/page/Page.tsx +12 -1
  462. package/src/layout/page/types.ts +2 -2
  463. package/src/layout/page-header/PageHeader.tsx +6 -1
  464. package/src/layout/page-header/types.ts +3 -2
  465. package/src/layout/page-section/PageSection.tsx +12 -1
  466. package/src/layout/page-section/types.ts +3 -2
  467. package/src/layout/settings-layout/SettingsLayout.tsx +6 -1
  468. package/src/layout/settings-layout/types.ts +3 -2
  469. package/src/layout/sidebar-layout/SidebarLayout.tsx +6 -1
  470. package/src/layout/sidebar-layout/types.ts +3 -2
  471. package/src/layout/topbar-layout/TopbarLayout.tsx +11 -1
  472. package/src/layout/topbar-layout/types.ts +3 -2
  473. package/src/patterns/auth/ForgotPasswordForm.tsx +6 -1
  474. package/src/patterns/auth/OtpForm.tsx +6 -1
  475. package/src/patterns/auth/SignInForm.tsx +6 -1
  476. package/src/patterns/auth/SignUpForm.tsx +6 -1
  477. package/src/patterns/auth/types.ts +2 -2
  478. package/src/patterns/collection-editor/CollectionEditor.tsx +6 -1
  479. package/src/patterns/collection-editor/types.ts +3 -2
  480. package/src/patterns/confirm-dialog/ConfirmDialog.tsx +6 -1
  481. package/src/patterns/confirm-dialog/types.ts +2 -2
  482. package/src/patterns/disclosure-section/DisclosureSection.tsx +6 -1
  483. package/src/patterns/disclosure-section/types.ts +3 -2
  484. package/src/patterns/empty-state/EmptyState.tsx +6 -1
  485. package/src/patterns/empty-state/types.ts +2 -2
  486. package/src/patterns/form-field/FormField.tsx +12 -1
  487. package/src/patterns/form-field/types.ts +9 -4
  488. package/src/patterns/inspector-field/InspectorField.tsx +11 -1
  489. package/src/patterns/inspector-field/types.ts +3 -2
  490. package/src/patterns/notice/Notice.tsx +6 -1
  491. package/src/patterns/notice/types.ts +2 -2
  492. package/src/patterns/panel/Panel.tsx +4 -1
  493. package/src/patterns/panel/types.ts +2 -2
  494. package/src/patterns/responsive-panel/ResponsivePanel.tsx +6 -1
  495. package/src/patterns/responsive-panel/types.ts +3 -2
  496. package/src/patterns/section-header/SectionHeader.tsx +6 -1
  497. package/src/patterns/section-header/types.ts +3 -2
  498. package/src/patterns/settings-row/SettingsRow.tsx +6 -1
  499. package/src/patterns/settings-row/types.ts +3 -2
  500. package/src/patterns/switch-field/SwitchField.tsx +6 -1
  501. package/src/patterns/switch-field/types.ts +3 -2
  502. package/src/patterns/tile-grid/PaletteItem.tsx +9 -3
  503. package/src/patterns/tile-grid/TileGrid.tsx +6 -1
  504. package/src/patterns/tile-grid/types.ts +4 -4
  505. package/src/patterns/tree-view/TreeItem.tsx +10 -3
  506. package/src/patterns/tree-view/TreeView.tsx +6 -1
  507. package/src/patterns/tree-view/types.ts +3 -2
  508. package/src/theme/ZoraBaseProps.ts +20 -0
  509. package/src/theme/ZoraProvider.tsx +9 -4
  510. package/src/theme/ZoraThemeRuntimeContext.tsx +18 -0
  511. package/src/theme/ZoraThemeScope.tsx +74 -0
  512. package/src/theme/index.ts +4 -0
  513. package/src/theme/resolveZoraScopedThemeId.test.ts +47 -0
  514. package/src/theme/resolveZoraScopedThemeId.ts +25 -0
  515. package/src/theme/themeScopeStructure.test.ts +220 -0
  516. package/src/theme/withZoraThemeScope.tsx +26 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ForgotPasswordForm.js","sourceRoot":"","sources":["../../../src/patterns/auth/ForgotPasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAyC,MAAM,uBAAuB,CAAC;AAEpF,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AAIjB,MAAM,UAAU,kBAAkB,CAAC,EACjC,WAAW,GAAG,kBAAkB,EAChC,eAAe,EACf,WAAW,GAAG,SAAS,EACvB,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,EAChB,KAAK,EACL,WAAW,GAAG,WAAW,EACzB,QAAQ,EACR,QAAQ,EACR,MAAM,GACkB;IACxB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAsC;QAC9E,UAAU,EAAE,EAAE;KACf,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAC1B,GAAG,E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C,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","sourcesContent":["import { Stack } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Button } from '../../components/button';\nimport { Form, type FormFieldConfig, type FormValues } from '../../components/form';\nimport type { ForgotPasswordFormProps } from './types';\nimport {\n defaultIdentifiers,\n normalizeIdentifierKind,\n resolveIdentifierLabel,\n resolveIdentifierRules,\n resolveIdentifierType,\n} from './utils';\n\ntype ForgotPasswordFieldName = 'identifier';\n\nexport function ForgotPasswordForm({\n identifiers = defaultIdentifiers,\n identifierLabel,\n signInLabel = 'Sign in',\n loading = false,\n disabled = false,\n error,\n submitLabel = 'Send code',\n onSubmit,\n onSignIn,\n testID,\n}: ForgotPasswordFormProps) {\n const [values, setValues] = React.useState<FormValues<ForgotPasswordFieldName>>({\n identifier: '',\n });\n const fields = React.useMemo<readonly FormFieldConfig<ForgotPasswordFieldName>[]>(\n () => [\n {\n name: 'identifier',\n label: identifierLabel ?? resolveIdentifierLabel(identifiers),\n type: resolveIdentifierType(identifiers),\n autoCapitalize: 'none',\n rules: resolveIdentifierRules(identifiers),\n },\n ],\n [identifierLabel, identifiers],\n );\n\n const handleSubmit = React.useCallback(\n (formValues: FormValues<ForgotPasswordFieldName>) =>\n onSubmit({\n identifier: formValues.identifier.trim(),\n identifierKind: normalizeIdentifierKind(formValues.identifier, identifiers),\n }),\n [identifiers, onSubmit],\n );\n\n return (\n <Form\n actions={\n onSignIn ? (\n <Stack direction=\"row\" gap=\"s\" wrap=\"wrap\">\n <Button\n disabled={disabled || loading}\n emphasis=\"ghost\"\n onPress={() => {\n void onSignIn();\n }}\n size=\"s\"\n tone=\"neutral\"\n >\n {signInLabel}\n </Button>\n </Stack>\n ) : undefined\n }\n disabled={disabled}\n error={error}\n fields={fields}\n loading={loading}\n onChange={setValues}\n onSubmit={handleSubmit}\n submitLabel={submitLabel}\n testID={testID}\n values={values}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"ForgotPasswordForm.js","sourceRoot":"","sources":["../../../src/patterns/auth/ForgotPasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAyC,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AAIjB,SAAS,uBAAuB,CAAC,EAC/B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,WAAW,GAAG,kBAAkB,EAChC,eAAe,EACf,WAAW,GAAG,SAAS,EACvB,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,EAChB,KAAK,EACL,WAAW,GAAG,WAAW,EACzB,QAAQ,EACR,QAAQ,EACR,MAAM,GACkB;IACxB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAsC;QAC9E,UAAU,EAAE,EAAE;KACf,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAC1B,GAAG,EAAE,CAAC;QACJ;YACE,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,eAAe,IAAI,sBAAsB,CAAC,WAAW,CAAC;YAC7D,IAAI,EAAE,qBAAqB,CAAC,WAAW,CAAC;YACxC,cAAc,EAAE,MAAM;YACtB,KAAK,EAAE,sBAAsB,CAAC,WAAW,CAAC;SAC3C;KACF,EACD,CAAC,eAAe,EAAE,WAAW,CAAC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import { Stack } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Button } from '../../components/button';\nimport { Form, type FormFieldConfig, type FormValues } from '../../components/form';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ForgotPasswordFormProps } from './types';\nimport {\n defaultIdentifiers,\n normalizeIdentifierKind,\n resolveIdentifierLabel,\n resolveIdentifierRules,\n resolveIdentifierType,\n} from './utils';\n\ntype ForgotPasswordFieldName = 'identifier';\n\nfunction ForgotPasswordFormInner({\n themeId: _themeId,\n mode: _mode,\n identifiers = defaultIdentifiers,\n identifierLabel,\n signInLabel = 'Sign in',\n loading = false,\n disabled = false,\n error,\n submitLabel = 'Send code',\n onSubmit,\n onSignIn,\n testID,\n}: ForgotPasswordFormProps) {\n const [values, setValues] = React.useState<FormValues<ForgotPasswordFieldName>>({\n identifier: '',\n });\n const fields = React.useMemo<readonly FormFieldConfig<ForgotPasswordFieldName>[]>(\n () => [\n {\n name: 'identifier',\n label: identifierLabel ?? resolveIdentifierLabel(identifiers),\n type: resolveIdentifierType(identifiers),\n autoCapitalize: 'none',\n rules: resolveIdentifierRules(identifiers),\n },\n ],\n [identifierLabel, identifiers],\n );\n\n const handleSubmit = React.useCallback(\n (formValues: FormValues<ForgotPasswordFieldName>) =>\n onSubmit({\n identifier: formValues.identifier.trim(),\n identifierKind: normalizeIdentifierKind(formValues.identifier, identifiers),\n }),\n [identifiers, onSubmit],\n );\n\n return (\n <Form\n actions={\n onSignIn ? (\n <Stack direction=\"row\" gap=\"s\" wrap=\"wrap\">\n <Button\n disabled={disabled || loading}\n emphasis=\"ghost\"\n onPress={() => {\n void onSignIn();\n }}\n size=\"s\"\n tone=\"neutral\"\n >\n {signInLabel}\n </Button>\n </Stack>\n ) : undefined\n }\n disabled={disabled}\n error={error}\n fields={fields}\n loading={loading}\n onChange={setValues}\n onSubmit={handleSubmit}\n submitLabel={submitLabel}\n testID={testID}\n values={values}\n />\n );\n}\n\nexport const ForgotPasswordForm = withZoraThemeScope(ForgotPasswordFormInner);\n"]}
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import type { OtpFormProps } from './types';
3
- export declare function OtpForm({ length, otpLabel, resendLabel, resendDisabled, resendLoading, loading, disabled, error, submitLabel, onSubmit, onResend, testID, }: OtpFormProps): React.JSX.Element;
3
+ export declare const OtpForm: (props: OtpFormProps) => React.ReactElement | null;
4
4
  //# sourceMappingURL=OtpForm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OtpForm.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/OtpForm.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,wBAAgB,OAAO,CAAC,EACtB,MAAU,EACV,QAAiB,EACjB,WAA2B,EAC3B,cAAsB,EACtB,aAAqB,EACrB,OAAe,EACf,QAAgB,EAChB,KAAK,EACL,WAA2B,EAC3B,QAAQ,EACR,QAAQ,EACR,MAAM,GACP,EAAE,YAAY,qBAyDd"}
1
+ {"version":3,"file":"OtpForm.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/OtpForm.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AA8E5C,eAAO,MAAM,OAAO,oDAAmC,CAAC"}
@@ -2,7 +2,8 @@ import { Stack } from '@ankhorage/surface';
2
2
  import React from 'react';
3
3
  import { Button } from '../../components/button';
4
4
  import { Form } from '../../components/form';
5
- export function OtpForm({ length = 6, otpLabel = 'Code', resendLabel = 'Resend code', resendDisabled = false, resendLoading = false, loading = false, disabled = false, error, submitLabel = 'Verify code', onSubmit, onResend, testID, }) {
5
+ import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
6
+ function OtpFormInner({ themeId: _themeId, mode: _mode, length = 6, otpLabel = 'Code', resendLabel = 'Resend code', resendDisabled = false, resendLoading = false, loading = false, disabled = false, error, submitLabel = 'Verify code', onSubmit, onResend, testID, }) {
6
7
  const resolvedLength = Math.max(1, length);
7
8
  const [values, setValues] = React.useState({
8
9
  otp: '',
@@ -27,4 +28,5 @@ export function OtpForm({ length = 6, otpLabel = 'Code', resendLabel = 'Resend c
27
28
  </Button>
28
29
  </Stack>) : undefined} disabled={disabled} error={error} fields={fields} loading={loading} onChange={setValues} onSubmit={handleSubmit} submitLabel={submitLabel} testID={testID} values={values}/>);
29
30
  }
31
+ export const OtpForm = withZoraThemeScope(OtpFormInner);
30
32
  //# sourceMappingURL=OtpForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OtpForm.js","sourceRoot":"","sources":["../../../src/patterns/auth/OtpForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAyC,MAAM,uBAAuB,CAAC;AAKpF,MAAM,UAAU,OAAO,CAAC,EACtB,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,EAA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WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { Stack } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Button } from '../../components/button';\nimport { Form, type FormFieldConfig, type FormValues } from '../../components/form';\nimport type { OtpFormProps } from './types';\n\ntype OtpFieldName = 'otp';\n\nexport function OtpForm({\n length = 6,\n otpLabel = 'Code',\n resendLabel = 'Resend code',\n resendDisabled = false,\n resendLoading = false,\n loading = false,\n disabled = false,\n error,\n submitLabel = 'Verify code',\n onSubmit,\n onResend,\n testID,\n}: OtpFormProps) {\n const resolvedLength = Math.max(1, length);\n const [values, setValues] = React.useState<FormValues<OtpFieldName>>({\n otp: '',\n });\n const fields = React.useMemo<readonly FormFieldConfig<OtpFieldName>[]>(\n () => [\n {\n name: 'otp',\n label: otpLabel,\n type: 'otp',\n maxLength: resolvedLength,\n rules: [{ kind: 'required' }, { kind: 'minLength', value: resolvedLength }],\n },\n ],\n [otpLabel, resolvedLength],\n );\n\n const handleSubmit = React.useCallback(\n (formValues: FormValues<OtpFieldName>) =>\n onSubmit({\n otp: formValues.otp.trim(),\n }),\n [onSubmit],\n );\n\n return (\n <Form\n actions={\n onResend ? (\n <Stack direction=\"row\" gap=\"s\" wrap=\"wrap\">\n <Button\n disabled={disabled || loading || resendDisabled}\n emphasis=\"ghost\"\n loading={resendLoading}\n onPress={() => {\n void onResend();\n }}\n size=\"s\"\n tone=\"neutral\"\n >\n {resendLabel}\n </Button>\n </Stack>\n ) : undefined\n }\n disabled={disabled}\n error={error}\n fields={fields}\n loading={loading}\n onChange={setValues}\n onSubmit={handleSubmit}\n submitLabel={submitLabel}\n testID={testID}\n values={values}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"OtpForm.js","sourceRoot":"","sources":["../../../src/patterns/auth/OtpForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE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;KAC3B,CAAC,EACJ,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,CACL,CAAC,IAAI,CACH,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,IAAI,cAAc,CAAC,CAChD,QAAQ,CAAC,OAAO,CAChB,OAAO,CAAC,CAAC,aAAa,CAAC,CACvB,OAAO,CAAC,CAAC,GAAG,EAAE;gBACZ,KAAK,QAAQ,EAAE,CAAC;YAClB,CAAC,CAAC,CACF,IAAI,CAAC,GAAG,CACR,IAAI,CAAC,SAAS,CAEd;cAAA,CAAC,WAAW,CACd;YAAA,EAAE,MAAM,CACV;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,SACN,CAAC,CACD,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,SAAS,CAAC,CACpB,QAAQ,CAAC,CAAC,YAAY,CAAC,CACvB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import { Stack } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Button } from '../../components/button';\nimport { Form, type FormFieldConfig, type FormValues } from '../../components/form';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { OtpFormProps } from './types';\n\ntype OtpFieldName = 'otp';\n\nfunction OtpFormInner({\n themeId: _themeId,\n mode: _mode,\n length = 6,\n otpLabel = 'Code',\n resendLabel = 'Resend code',\n resendDisabled = false,\n resendLoading = false,\n loading = false,\n disabled = false,\n error,\n submitLabel = 'Verify code',\n onSubmit,\n onResend,\n testID,\n}: OtpFormProps) {\n const resolvedLength = Math.max(1, length);\n const [values, setValues] = React.useState<FormValues<OtpFieldName>>({\n otp: '',\n });\n const fields = React.useMemo<readonly FormFieldConfig<OtpFieldName>[]>(\n () => [\n {\n name: 'otp',\n label: otpLabel,\n type: 'otp',\n maxLength: resolvedLength,\n rules: [{ kind: 'required' }, { kind: 'minLength', value: resolvedLength }],\n },\n ],\n [otpLabel, resolvedLength],\n );\n\n const handleSubmit = React.useCallback(\n (formValues: FormValues<OtpFieldName>) =>\n onSubmit({\n otp: formValues.otp.trim(),\n }),\n [onSubmit],\n );\n\n return (\n <Form\n actions={\n onResend ? (\n <Stack direction=\"row\" gap=\"s\" wrap=\"wrap\">\n <Button\n disabled={disabled || loading || resendDisabled}\n emphasis=\"ghost\"\n loading={resendLoading}\n onPress={() => {\n void onResend();\n }}\n size=\"s\"\n tone=\"neutral\"\n >\n {resendLabel}\n </Button>\n </Stack>\n ) : undefined\n }\n disabled={disabled}\n error={error}\n fields={fields}\n loading={loading}\n onChange={setValues}\n onSubmit={handleSubmit}\n submitLabel={submitLabel}\n testID={testID}\n values={values}\n />\n );\n}\n\nexport const OtpForm = withZoraThemeScope(OtpFormInner);\n"]}
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import type { SignInFormProps } from './types';
3
- export declare function SignInForm({ identifiers, identifierLabel, secretLabel, forgotPasswordLabel, signUpLabel, loading, disabled, error, submitLabel, onSubmit, onForgotPassword, onSignUp, testID, }: SignInFormProps): React.JSX.Element;
3
+ export declare const SignInForm: (props: SignInFormProps) => React.ReactElement | null;
4
4
  //# sourceMappingURL=SignInForm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignInForm.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/SignInForm.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAW/C,wBAAgB,UAAU,CAAC,EACzB,WAAgC,EAChC,eAAe,EACf,WAAwB,EACxB,mBAAuC,EACvC,WAAuB,EACvB,OAAe,EACf,QAAgB,EAChB,KAAK,EACL,WAAuB,EACvB,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,MAAM,GACP,EAAE,eAAe,qBAgFjB"}
1
+ {"version":3,"file":"SignInForm.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/SignInForm.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA6G/C,eAAO,MAAM,UAAU,uDAAsC,CAAC"}
@@ -2,8 +2,9 @@ import { Stack } from '@ankhorage/surface';
2
2
  import React from 'react';
3
3
  import { Button } from '../../components/button';
4
4
  import { Form } from '../../components/form';
5
+ import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
5
6
  import { defaultIdentifiers, normalizeIdentifierKind, resolveIdentifierLabel, resolveIdentifierRules, resolveIdentifierType, } from './utils';
6
- export function SignInForm({ identifiers = defaultIdentifiers, identifierLabel, secretLabel = 'Password', forgotPasswordLabel = 'Forgot password', signUpLabel = 'Sign up', loading = false, disabled = false, error, submitLabel = 'Sign in', onSubmit, onForgotPassword, onSignUp, testID, }) {
7
+ function SignInFormInner({ themeId: _themeId, 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, }) {
7
8
  const [values, setValues] = React.useState({
8
9
  identifier: '',
9
10
  secret: '',
@@ -42,4 +43,5 @@ export function SignInForm({ identifiers = defaultIdentifiers, identifierLabel,
42
43
  </Button>) : null}
43
44
  </Stack>) : undefined} disabled={disabled} error={error} fields={fields} loading={loading} onChange={setValues} onSubmit={handleSubmit} submitLabel={submitLabel} testID={testID} values={values}/>);
44
45
  }
46
+ export const SignInForm = withZoraThemeScope(SignInFormInner);
45
47
  //# sourceMappingURL=SignInForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignInForm.js","sourceRoot":"","sources":["../../../src/patterns/auth/SignInForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAyC,MAAM,uBAAuB,CAAC;AAEpF,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AAIjB,MAAM,UAAU,UAAU,CAAC,EACzB,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,GAAG,OAAO,CAAC,gBAAgB,IAAI,QAAQ,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAC1B,GAAG,EAAE,CAAC;QACJ;YACE,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,eAAe,IAAI,sBAAsB,CAAC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AC,MAAM,CACL,QAAQ,CAAC,CAAC,QAAQ,IAAI,OAAO,CAAC,CAC9B,QAAQ,CAAC,OAAO,CAChB,OAAO,CAAC,CAAC,GAAG,EAAE;oBACZ,KAAK,QAAQ,EAAE,CAAC;gBAClB,CAAC,CAAC,CACF,IAAI,CAAC,GAAG,CACR,IAAI,CAAC,SAAS,CAEd;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,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","sourcesContent":["import { Stack } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Button } from '../../components/button';\nimport { Form, type FormFieldConfig, type FormValues } from '../../components/form';\nimport type { SignInFormProps } from './types';\nimport {\n defaultIdentifiers,\n normalizeIdentifierKind,\n resolveIdentifierLabel,\n resolveIdentifierRules,\n resolveIdentifierType,\n} from './utils';\n\ntype SignInFieldName = 'identifier' | 'secret';\n\nexport function SignInForm({\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 <Form\n actions={\n hasActions ? (\n <Stack direction=\"row\" gap=\"s\" wrap=\"wrap\">\n {onForgotPassword ? (\n <Button\n disabled={disabled || loading}\n emphasis=\"ghost\"\n onPress={() => {\n void onForgotPassword();\n }}\n size=\"s\"\n tone=\"neutral\"\n >\n {forgotPasswordLabel}\n </Button>\n ) : null}\n {onSignUp ? (\n <Button\n disabled={disabled || loading}\n emphasis=\"ghost\"\n onPress={() => {\n void onSignUp();\n }}\n size=\"s\"\n tone=\"neutral\"\n >\n {signUpLabel}\n </Button>\n ) : null}\n </Stack>\n ) : undefined\n }\n disabled={disabled}\n error={error}\n fields={fields}\n loading={loading}\n onChange={setValues}\n onSubmit={handleSubmit}\n submitLabel={submitLabel}\n testID={testID}\n values={values}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"SignInForm.js","sourceRoot":"","sources":["../../../src/patterns/auth/SignInForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAyC,MAAM,uBAAuB,CAAC;AACpF,OAAO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AAK,CAAC,CAAC,KAAK,CAAC,CACb,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,SAAS,CAAC,CACpB,QAAQ,CAAC,CAAC,YAAY,CAAC,CACvB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,MAAM,CAAC,CAAC,MAAM,CAAC,EACf,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC","sourcesContent":["import { Stack } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Button } from '../../components/button';\nimport { Form, type FormFieldConfig, type FormValues } from '../../components/form';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { SignInFormProps } from './types';\nimport {\n defaultIdentifiers,\n normalizeIdentifierKind,\n resolveIdentifierLabel,\n resolveIdentifierRules,\n resolveIdentifierType,\n} from './utils';\n\ntype SignInFieldName = 'identifier' | 'secret';\n\nfunction SignInFormInner({\n themeId: _themeId,\n 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 <Form\n actions={\n hasActions ? (\n <Stack direction=\"row\" gap=\"s\" wrap=\"wrap\">\n {onForgotPassword ? (\n <Button\n disabled={disabled || loading}\n emphasis=\"ghost\"\n onPress={() => {\n void onForgotPassword();\n }}\n size=\"s\"\n tone=\"neutral\"\n >\n {forgotPasswordLabel}\n </Button>\n ) : null}\n {onSignUp ? (\n <Button\n disabled={disabled || loading}\n emphasis=\"ghost\"\n onPress={() => {\n void onSignUp();\n }}\n size=\"s\"\n tone=\"neutral\"\n >\n {signUpLabel}\n </Button>\n ) : null}\n </Stack>\n ) : undefined\n }\n disabled={disabled}\n error={error}\n fields={fields}\n loading={loading}\n onChange={setValues}\n onSubmit={handleSubmit}\n submitLabel={submitLabel}\n testID={testID}\n values={values}\n />\n );\n}\n\nexport const SignInForm = withZoraThemeScope(SignInFormInner);\n"]}
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import type { SignUpFormProps } from './types';
3
- export declare function SignUpForm({ fields, signInLabel, loading, disabled, error, submitLabel, onSubmit, onSignIn, testID, }: SignUpFormProps): React.JSX.Element;
3
+ export declare const SignUpForm: (props: SignUpFormProps) => React.ReactElement | null;
4
4
  //# sourceMappingURL=SignUpForm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignUpForm.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/SignUpForm.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA2B/C,wBAAgB,UAAU,CAAC,EACzB,MAA4B,EAC5B,WAAuB,EACvB,OAAe,EACf,QAAgB,EAChB,KAAK,EACL,WAAuB,EACvB,QAAQ,EACR,QAAQ,EACR,MAAM,GACP,EAAE,eAAe,qBAiCjB"}
1
+ {"version":3,"file":"SignUpForm.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/SignUpForm.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA0E/C,eAAO,MAAM,UAAU,uDAAsC,CAAC"}
@@ -2,6 +2,7 @@ import { Stack } from '@ankhorage/surface';
2
2
  import React from 'react';
3
3
  import { Button } from '../../components/button';
4
4
  import { Form } from '../../components/form';
5
+ import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
5
6
  const defaultSignUpFields = [
6
7
  {
7
8
  name: 'email',
@@ -24,7 +25,7 @@ function createValues(fields) {
24
25
  }, {});
25
26
  return values;
26
27
  }
27
- export function SignUpForm({ fields = defaultSignUpFields, signInLabel = 'Sign in', loading = false, disabled = false, error, submitLabel = 'Sign up', onSubmit, onSignIn, testID, }) {
28
+ function SignUpFormInner({ themeId: _themeId, mode: _mode, fields = defaultSignUpFields, signInLabel = 'Sign in', loading = false, disabled = false, error, submitLabel = 'Sign up', onSubmit, onSignIn, testID, }) {
28
29
  const [values, setValues] = React.useState(() => createValues(fields));
29
30
  return (<Form actions={onSignIn ? (<Stack direction="row" gap="s" wrap="wrap">
30
31
  <Button disabled={disabled || loading} emphasis="ghost" onPress={() => {
@@ -34,4 +35,5 @@ export function SignUpForm({ fields = defaultSignUpFields, signInLabel = 'Sign i
34
35
  </Button>
35
36
  </Stack>) : undefined} disabled={disabled} error={error} fields={fields} loading={loading} onChange={setValues} onSubmit={onSubmit} submitLabel={submitLabel} testID={testID} values={values}/>);
36
37
  }
38
+ export const SignUpForm = withZoraThemeScope(SignUpFormInner);
37
39
  //# sourceMappingURL=SignUpForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignUpForm.js","sourceRoot":"","sources":["../../../src/patterns/auth/S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C,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IAEnF,OAAO,CACL,CAAC,IAAI,CACH,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,QAAQ,CAAC,OAAO,CAChB,OAAO,CAAC,CAAC,GAAG,EAAE;gBACZ,KAAK,QAAQ,EAAE,CAAC;YAClB,CAAC,CAAC,CACF,IAAI,CAAC,GAAG,CACR,IAAI,CAAC,SAAS,CAEd;cAAA,CAAC,WAAW,CACd;YAAA,EAAE,MAAM,CACV;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,SACN,CAAC,CACD,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,SAAS,CAAC,CACpB,QAAQ,CAAC,CAAC,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","sourcesContent":["import { Stack } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Button } from '../../components/button';\nimport { Form, type FormFieldConfig, type FormValues } from '../../components/form';\nimport type { SignUpFormProps } from './types';\n\nconst defaultSignUpFields = [\n {\n name: 'email',\n label: 'Email',\n type: 'email',\n autoCapitalize: 'none',\n rules: [{ kind: 'required' }, { kind: 'email' }],\n },\n {\n name: 'password',\n label: 'Password',\n type: 'password',\n rules: [{ kind: 'required' }, { kind: 'minLength', value: 8 }],\n },\n] as const satisfies readonly FormFieldConfig[];\n\nfunction createValues(fields: readonly FormFieldConfig[]): FormValues {\n const values = fields.reduce<Record<string, string>>((nextValues, field) => {\n nextValues[field.name] = '';\n return nextValues;\n }, {});\n\n return values;\n}\n\nexport function SignUpForm({\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 <Form\n actions={\n onSignIn ? (\n <Stack direction=\"row\" gap=\"s\" wrap=\"wrap\">\n <Button\n disabled={disabled || loading}\n emphasis=\"ghost\"\n onPress={() => {\n void onSignIn();\n }}\n size=\"s\"\n tone=\"neutral\"\n >\n {signInLabel}\n </Button>\n </Stack>\n ) : undefined\n }\n disabled={disabled}\n error={error}\n fields={fields}\n loading={loading}\n onChange={setValues}\n onSubmit={onSubmit}\n submitLabel={submitLabel}\n testID={testID}\n values={values}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"SignUpForm.js","sourceRoot":"","sources":["../../../src/patterns/auth/SignUpForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAyC,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,MAAM,mBAAmB,GAAG;IAC1B;QACE,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,OAAO;QACb,cAAc,EAAE,MAAM;QACtB,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;KACjD;IACD;QACE,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,UAA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,WAAW,CACd;YAAA,EAAE,MAAM,CACV;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,SACN,CAAC,CACD,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,SAAS,CAAC,CACpB,QAAQ,CAAC,CAAC,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,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC","sourcesContent":["import { Stack } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Button } from '../../components/button';\nimport { Form, type FormFieldConfig, type FormValues } from '../../components/form';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { SignUpFormProps } from './types';\n\nconst defaultSignUpFields = [\n {\n name: 'email',\n label: 'Email',\n type: 'email',\n autoCapitalize: 'none',\n rules: [{ kind: 'required' }, { kind: 'email' }],\n },\n {\n name: 'password',\n label: 'Password',\n type: 'password',\n rules: [{ kind: 'required' }, { kind: 'minLength', value: 8 }],\n },\n] as const satisfies readonly FormFieldConfig[];\n\nfunction createValues(fields: readonly FormFieldConfig[]): FormValues {\n const values = fields.reduce<Record<string, string>>((nextValues, field) => {\n nextValues[field.name] = '';\n return nextValues;\n }, {});\n\n return values;\n}\n\nfunction SignUpFormInner({\n themeId: _themeId,\n 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 <Form\n actions={\n onSignIn ? (\n <Stack direction=\"row\" gap=\"s\" wrap=\"wrap\">\n <Button\n disabled={disabled || loading}\n emphasis=\"ghost\"\n onPress={() => {\n void onSignIn();\n }}\n size=\"s\"\n tone=\"neutral\"\n >\n {signInLabel}\n </Button>\n </Stack>\n ) : undefined\n }\n disabled={disabled}\n error={error}\n fields={fields}\n loading={loading}\n onChange={setValues}\n onSubmit={onSubmit}\n submitLabel={submitLabel}\n testID={testID}\n values={values}\n />\n );\n}\n\nexport const SignUpForm = withZoraThemeScope(SignUpFormInner);\n"]}
@@ -1,12 +1,12 @@
1
1
  import type React from 'react';
2
2
  import type { FormFieldConfig, FormValues } from '../../components/form';
3
+ import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
3
4
  export type AuthIdentifierKind = 'email' | 'phone' | 'username';
4
- export interface AuthFormBaseProps {
5
+ export interface AuthFormBaseProps extends ZoraBaseProps {
5
6
  loading?: boolean;
6
7
  disabled?: boolean;
7
8
  error?: React.ReactNode;
8
9
  submitLabel?: React.ReactNode;
9
- testID?: string;
10
10
  }
11
11
  export interface SignInFormValues {
12
12
  identifier: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/auth/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEzE,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC;AAEhE,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IA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,iBAAiB;IAChE,WAAW,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAC5C,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,QAAQ,EAAE,CAAC,MAAM,EAAE,wBAAwB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,YAAa,SAAQ,iBAAiB;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/auth/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { FormFieldConfig, FormValues } from '../../components/form';\n\nexport type AuthIdentifierKind = 'email' | 'phone' | 'username';\n\nexport interface AuthFormBaseProps {\n loading?: boolean;\n disabled?: boolean;\n error?: React.ReactNode;\n submitLabel?: React.ReactNode;\n testID?: string;\n}\n\nexport interface SignInFormValues {\n identifier: string;\n identifierKind: AuthIdentifierKind;\n secret: string;\n}\n\nexport interface SignInFormProps extends AuthFormBaseProps {\n identifiers?: readonly AuthIdentifierKind[];\n identifierLabel?: React.ReactNode;\n secretLabel?: React.ReactNode;\n forgotPasswordLabel?: React.ReactNode;\n signUpLabel?: React.ReactNode;\n onSubmit: (values: SignInFormValues) => void | Promise<void>;\n onForgotPassword?: () => void | Promise<void>;\n onSignUp?: () => void | Promise<void>;\n}\n\nexport type SignUpFormValues = FormValues;\nexport type SignUpFormField = FormFieldConfig;\n\nexport interface SignUpFormProps extends AuthFormBaseProps {\n fields?: readonly SignUpFormField[];\n signInLabel?: React.ReactNode;\n onSubmit: (values: SignUpFormValues) => void | Promise<void>;\n onSignIn?: () => void | Promise<void>;\n}\n\nexport interface ForgotPasswordFormValues {\n identifier: string;\n identifierKind: AuthIdentifierKind;\n}\n\nexport interface ForgotPasswordFormProps extends AuthFormBaseProps {\n identifiers?: readonly AuthIdentifierKind[];\n identifierLabel?: React.ReactNode;\n signInLabel?: React.ReactNode;\n onSubmit: (values: ForgotPasswordFormValues) => void | Promise<void>;\n onSignIn?: () => void | Promise<void>;\n}\n\nexport interface OtpFormValues {\n otp: string;\n}\n\nexport interface OtpFormProps extends AuthFormBaseProps {\n length?: number;\n otpLabel?: React.ReactNode;\n resendLabel?: React.ReactNode;\n resendDisabled?: boolean;\n resendLoading?: boolean;\n onSubmit: (values: OtpFormValues) => void | Promise<void>;\n onResend?: () => void | Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/auth/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { FormFieldConfig, FormValues } from '../../components/form';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport type AuthIdentifierKind = 'email' | 'phone' | 'username';\n\nexport interface AuthFormBaseProps extends ZoraBaseProps {\n loading?: boolean;\n disabled?: boolean;\n error?: React.ReactNode;\n submitLabel?: React.ReactNode;\n}\n\nexport interface SignInFormValues {\n identifier: string;\n identifierKind: AuthIdentifierKind;\n secret: string;\n}\n\nexport interface SignInFormProps extends AuthFormBaseProps {\n identifiers?: readonly AuthIdentifierKind[];\n identifierLabel?: React.ReactNode;\n secretLabel?: React.ReactNode;\n forgotPasswordLabel?: React.ReactNode;\n signUpLabel?: React.ReactNode;\n onSubmit: (values: SignInFormValues) => void | Promise<void>;\n onForgotPassword?: () => void | Promise<void>;\n onSignUp?: () => void | Promise<void>;\n}\n\nexport type SignUpFormValues = FormValues;\nexport type SignUpFormField = FormFieldConfig;\n\nexport interface SignUpFormProps extends AuthFormBaseProps {\n fields?: readonly SignUpFormField[];\n signInLabel?: React.ReactNode;\n onSubmit: (values: SignUpFormValues) => void | Promise<void>;\n onSignIn?: () => void | Promise<void>;\n}\n\nexport interface ForgotPasswordFormValues {\n identifier: string;\n identifierKind: AuthIdentifierKind;\n}\n\nexport interface ForgotPasswordFormProps extends AuthFormBaseProps {\n identifiers?: readonly AuthIdentifierKind[];\n identifierLabel?: React.ReactNode;\n signInLabel?: React.ReactNode;\n onSubmit: (values: ForgotPasswordFormValues) => void | Promise<void>;\n onSignIn?: () => void | Promise<void>;\n}\n\nexport interface OtpFormValues {\n otp: string;\n}\n\nexport interface OtpFormProps extends AuthFormBaseProps {\n length?: number;\n otpLabel?: React.ReactNode;\n resendLabel?: React.ReactNode;\n resendDisabled?: boolean;\n resendLoading?: boolean;\n onSubmit: (values: OtpFormValues) => void | Promise<void>;\n onResend?: () => void | Promise<void>;\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import type { CollectionEditorProps } from './types';
3
- export declare function CollectionEditor<TItem>({ title, description, items, renderItem, onAdd, onRemove, onMove, addLabel, emptyLabel, disabled, testID, }: CollectionEditorProps<TItem>): React.JSX.Element;
3
+ export declare const CollectionEditor: <TItem>(props: CollectionEditorProps<TItem>) => React.ReactElement | null;
4
4
  //# sourceMappingURL=CollectionEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CollectionEditor.d.ts","sourceRoot":"","sources":["../../../src/patterns/collection-editor/CollectionEditor.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,EACtC,KAAK,EACL,WAAW,EACX,KAAK,EACL,UAAU,EACV,KAAK,EACL,QAAQ,EACR,MAAM,EACN,QAAqB,EACrB,UAA4B,EAC5B,QAAQ,EACR,MAAM,GACP,EAAE,qBAAqB,CAAC,KAAK,CAAC,qBA+E9B"}
1
+ {"version":3,"file":"CollectionEditor.d.ts","sourceRoot":"","sources":["../../../src/patterns/collection-editor/CollectionEditor.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAiGrD,eAAO,MAAM,gBAAgB,GA/FE,KAAK,mEA+FqC,CAAC"}
@@ -3,8 +3,9 @@ import React from 'react';
3
3
  import { Button } from '../../components/button';
4
4
  import { IconButton } from '../../components/icon-button';
5
5
  import { Text } from '../../components/text';
6
+ import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
6
7
  import { Panel } from '../panel';
7
- export function CollectionEditor({ title, description, items, renderItem, onAdd, onRemove, onMove, addLabel = 'Add Item', emptyLabel = 'No items yet.', disabled, testID, }) {
8
+ function CollectionEditorInner({ themeId: _themeId, mode: _mode, title, description, items, renderItem, onAdd, onRemove, onMove, addLabel = 'Add Item', emptyLabel = 'No items yet.', disabled, testID, }) {
8
9
  const isEmpty = items.length === 0;
9
10
  return (<Panel compact description={description} testID={testID} title={title} actions={onAdd ? (<Button emphasis="soft" size="s" disabled={disabled} onPress={onAdd}>
10
11
  {addLabel}
@@ -39,4 +40,5 @@ export function CollectionEditor({ title, description, items, renderItem, onAdd,
39
40
  </Stack>
40
41
  </Panel>);
41
42
  }
43
+ export const CollectionEditor = withZoraThemeScope(CollectionEditorInner);
42
44
  //# sourceMappingURL=CollectionEditor.js.map
@@ -1 +1 @@
1
- {"version":3,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Q,CAAC,CAAC,QAAQ,IAAI,KAAK,KAAK,CAAC,CAAC,CAClC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CACxC,IAAI,CAAC,GAAG,CACR,QAAQ,CAAC,OAAO,EAElB;sBAAA,CAAC,UAAU,CACT,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC,CACrC,KAAK,CAAC,WAAW,CACjB,QAAQ,CAAC,CAAC,QAAQ,IAAI,KAAK,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CACjD,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CACxC,IAAI,CAAC,GAAG,CACR,QAAQ,CAAC,OAAO,EAEpB;oBAAA,GAAG,CACJ,CAAC,CAAC,CAAC,IAAI,CACR;kBAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,CACV,CAAC,UAAU,CACT,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CAChC,KAAK,CAAC,QAAQ,CACd,IAAI,CAAC,QAAQ,CACb,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAC/B,IAAI,CAAC,GAAG,CACR,QAAQ,CAAC,OAAO,EAChB,CACH,CAAC,CAAC,CAAC,IAAI,CACV;gBAAA,EAAE,KAAK,CACT;cAAA,EAAE,KAAK,CACT;YAAA,EAAE,GAAG,CAAC,CACP,CAAC,CACH,CACH;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC","sourcesContent":["import { Box, Stack } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Button } from '../../components/button';\nimport { IconButton } from '../../components/icon-button';\nimport { Text } from '../../components/text';\nimport { Panel } from '../panel';\nimport type { CollectionEditorProps } from './types';\n\nexport function CollectionEditor<TItem>({\n title,\n description,\n items,\n renderItem,\n onAdd,\n onRemove,\n onMove,\n addLabel = 'Add Item',\n emptyLabel = 'No items yet.',\n disabled,\n testID,\n}: CollectionEditorProps<TItem>) {\n const isEmpty = items.length === 0;\n\n return (\n <Panel\n compact\n description={description}\n testID={testID}\n title={title}\n actions={\n onAdd ? (\n <Button emphasis=\"soft\" size=\"s\" disabled={disabled} onPress={onAdd}>\n {addLabel}\n </Button>\n ) : null\n }\n >\n <Stack gap=\"s\">\n {isEmpty ? (\n <Box py=\"m\">\n <Text align=\"center\" tone=\"muted\">\n {emptyLabel}\n </Text>\n </Box>\n ) : (\n items.map((item, index) => (\n <Box key={index} bg=\"subtle\" p=\"s\" radius=\"m\" borderColor=\"border\" borderWidth={1}>\n <Stack direction=\"row\" gap=\"m\" align=\"center\">\n <Box flex={1}>\n {renderItem({\n item,\n index,\n remove: () => onRemove?.(index),\n moveUp: () => onMove?.(index, index - 1),\n moveDown: () => onMove?.(index, index + 1),\n canMoveUp: index > 0,\n canMoveDown: index < items.length - 1,\n })}\n </Box>\n <Stack direction=\"row\" gap=\"xs\">\n {onMove ? (\n <>\n <IconButton\n icon={{ name: 'arrow-up-outline' }}\n label=\"Move Up\"\n disabled={disabled ?? index === 0}\n onPress={() => onMove(index, index - 1)}\n size=\"s\"\n emphasis=\"ghost\"\n />\n <IconButton\n icon={{ name: 'arrow-down-outline' }}\n label=\"Move Down\"\n disabled={disabled ?? index === items.length - 1}\n onPress={() => onMove(index, index + 1)}\n size=\"s\"\n emphasis=\"ghost\"\n />\n </>\n ) : null}\n {onRemove ? (\n <IconButton\n icon={{ name: 'trash-outline' }}\n label=\"Remove\"\n tone=\"danger\"\n disabled={disabled}\n onPress={() => onRemove(index)}\n size=\"s\"\n emphasis=\"ghost\"\n />\n ) : null}\n </Stack>\n </Stack>\n </Box>\n ))\n )}\n </Stack>\n </Panel>\n );\n}\n"]}
1
+ {"version":3,"file":"CollectionEditor.js","sourceRoot":"","sources":["../../../src/patterns/collection-editor/CollectionEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGjC,SAAS,qBAAqB,CAAQ,EACpC,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,KAAK,EACL,WAAW,EACX,KAAK,EACL,UAAU,EACV,KAAK,EACL,QAAQ,EACR,MAAM,EACN,QAAQ,GAAG,UAAU,EACrB,UAAU,GAAG,eAAe,EAC5B,QAAQ,EACR,MAAM,GACuB;IAC7B,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;IAEnC,OAAO,CACL,CAAC,KAAK,CACJ,OAAO,CACP,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,OAAO,CAAC,CACN,KAAK,CAAC,CAAC,CAAC,CACN,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAClE;YAAA,CAAC,QAAQ,CACX;UAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IACN,CAAC,CAED;MAAA,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CACZ;QAAA,CAA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AED,MAAM,CAAC,MAAM,gBAAgB,GAAG,kBAAkB,CAAC,qBAAqB,CAAC,CAAC","sourcesContent":["import { Box, Stack } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Button } from '../../components/button';\nimport { IconButton } from '../../components/icon-button';\nimport { Text } from '../../components/text';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Panel } from '../panel';\nimport type { CollectionEditorProps } from './types';\n\nfunction CollectionEditorInner<TItem>({\n themeId: _themeId,\n mode: _mode,\n title,\n description,\n items,\n renderItem,\n onAdd,\n onRemove,\n onMove,\n addLabel = 'Add Item',\n emptyLabel = 'No items yet.',\n disabled,\n testID,\n}: CollectionEditorProps<TItem>) {\n const isEmpty = items.length === 0;\n\n return (\n <Panel\n compact\n description={description}\n testID={testID}\n title={title}\n actions={\n onAdd ? (\n <Button emphasis=\"soft\" size=\"s\" disabled={disabled} onPress={onAdd}>\n {addLabel}\n </Button>\n ) : null\n }\n >\n <Stack gap=\"s\">\n {isEmpty ? (\n <Box py=\"m\">\n <Text align=\"center\" tone=\"muted\">\n {emptyLabel}\n </Text>\n </Box>\n ) : (\n items.map((item, index) => (\n <Box key={index} bg=\"subtle\" p=\"s\" radius=\"m\" borderColor=\"border\" borderWidth={1}>\n <Stack direction=\"row\" gap=\"m\" align=\"center\">\n <Box flex={1}>\n {renderItem({\n item,\n index,\n remove: () => onRemove?.(index),\n moveUp: () => onMove?.(index, index - 1),\n moveDown: () => onMove?.(index, index + 1),\n canMoveUp: index > 0,\n canMoveDown: index < items.length - 1,\n })}\n </Box>\n <Stack direction=\"row\" gap=\"xs\">\n {onMove ? (\n <>\n <IconButton\n icon={{ name: 'arrow-up-outline' }}\n label=\"Move Up\"\n disabled={disabled ?? index === 0}\n onPress={() => onMove(index, index - 1)}\n size=\"s\"\n emphasis=\"ghost\"\n />\n <IconButton\n icon={{ name: 'arrow-down-outline' }}\n label=\"Move Down\"\n disabled={disabled ?? index === items.length - 1}\n onPress={() => onMove(index, index + 1)}\n size=\"s\"\n emphasis=\"ghost\"\n />\n </>\n ) : null}\n {onRemove ? (\n <IconButton\n icon={{ name: 'trash-outline' }}\n label=\"Remove\"\n tone=\"danger\"\n disabled={disabled}\n onPress={() => onRemove(index)}\n size=\"s\"\n emphasis=\"ghost\"\n />\n ) : null}\n </Stack>\n </Stack>\n </Box>\n ))\n )}\n </Stack>\n </Panel>\n );\n}\n\nexport const CollectionEditor = withZoraThemeScope(CollectionEditorInner);\n"]}
@@ -8,7 +8,8 @@ export interface CollectionEditorRenderItemProps<TItem> {
8
8
  canMoveUp: boolean;
9
9
  canMoveDown: boolean;
10
10
  }
11
- export interface CollectionEditorProps<TItem> {
11
+ import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
12
+ export interface CollectionEditorProps<TItem> extends ZoraBaseProps {
12
13
  title?: React.ReactNode;
13
14
  description?: React.ReactNode;
14
15
  items: readonly TItem[];
@@ -19,6 +20,5 @@ export interface CollectionEditorProps<TItem> {
19
20
  addLabel?: React.ReactNode;
20
21
  emptyLabel?: React.ReactNode;
21
22
  disabled?: boolean;
22
- testID?: string;
23
23
  }
24
24
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/collection-editor/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,+BAA+B,CAAC,KAAK;IACpD,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB,CAAC,KAAK;IAC1C,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,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AK,EAAE,+BAA+B,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAC/E,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/collection-editor/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nexport interface CollectionEditorRenderItemProps<TItem> {\n item: TItem;\n index: number;\n remove: () => void;\n moveUp: () => void;\n moveDown: () => void;\n canMoveUp: boolean;\n canMoveDown: boolean;\n}\n\nexport interface CollectionEditorProps<TItem> {\n title?: React.ReactNode;\n description?: React.ReactNode;\n items: readonly TItem[];\n renderItem: (props: CollectionEditorRenderItemProps<TItem>) => React.ReactNode;\n onAdd?: () => void;\n onRemove?: (index: number) => void;\n onMove?: (from: number, to: number) => void;\n addLabel?: React.ReactNode;\n emptyLabel?: React.ReactNode;\n disabled?: boolean;\n testID?: string;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/collection-editor/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nexport interface CollectionEditorRenderItemProps<TItem> {\n item: TItem;\n index: number;\n remove: () => void;\n moveUp: () => void;\n moveDown: () => void;\n canMoveUp: boolean;\n canMoveDown: boolean;\n}\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface CollectionEditorProps<TItem> extends ZoraBaseProps {\n title?: React.ReactNode;\n description?: React.ReactNode;\n items: readonly TItem[];\n renderItem: (props: CollectionEditorRenderItemProps<TItem>) => React.ReactNode;\n onAdd?: () => void;\n onRemove?: (index: number) => void;\n onMove?: (from: number, to: number) => void;\n addLabel?: React.ReactNode;\n emptyLabel?: React.ReactNode;\n disabled?: boolean;\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import type { ConfirmDialogProps } from './types';
3
- export declare function ConfirmDialog({ visible, title, description, children, confirmLabel, cancelLabel, confirmTone, confirmEmphasis, busy, closeOnBackdrop, onConfirm, onCancel, testID, }: ConfirmDialogProps): React.JSX.Element;
3
+ export declare const ConfirmDialog: (props: ConfirmDialogProps) => React.ReactElement | null;
4
4
  //# sourceMappingURL=ConfirmDialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../../src/patterns/confirm-dialog/ConfirmDialog.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,KAAK,EACL,WAAW,EACX,QAAQ,EACR,YAAwB,EACxB,WAAsB,EACtB,WAAsB,EACtB,eAAyB,EACzB,IAAY,EACZ,eAAsB,EACtB,SAAS,EACT,QAAQ,EACR,MAAM,GACP,EAAE,kBAAkB,qBAwBpB"}
1
+ {"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../../src/patterns/confirm-dialog/ConfirmDialog.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA4ClD,eAAO,MAAM,aAAa,0DAAyC,CAAC"}
@@ -2,7 +2,8 @@ import { Stack } from '@ankhorage/surface';
2
2
  import React from 'react';
3
3
  import { Button } from '../../components/button';
4
4
  import { Modal } from '../../components/modal';
5
- export function ConfirmDialog({ visible, title, description, children, confirmLabel = 'Confirm', cancelLabel = 'Cancel', confirmTone = 'danger', confirmEmphasis = 'solid', busy = false, closeOnBackdrop = true, onConfirm, onCancel, testID, }) {
5
+ import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
6
+ function ConfirmDialogInner({ themeId: _themeId, mode: _mode, visible, title, description, children, confirmLabel = 'Confirm', cancelLabel = 'Cancel', confirmTone = 'danger', confirmEmphasis = 'solid', busy = false, closeOnBackdrop = true, onConfirm, onCancel, testID, }) {
6
7
  return (<Modal closeOnBackdrop={closeOnBackdrop} description={description} footer={<Stack direction={{ base: 'column', md: 'row' }} gap="s" justify="flex-end">
7
8
  <Button emphasis="soft" onPress={onCancel} tone="neutral">
8
9
  {cancelLabel}
@@ -14,4 +15,5 @@ export function ConfirmDialog({ visible, title, description, children, confirmLa
14
15
  {children}
15
16
  </Modal>);
16
17
  }
18
+ export const ConfirmDialog = withZoraThemeScope(ConfirmDialogInner);
17
19
  //# sourceMappingURL=ConfirmDialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmDialog.js","sourceRoot":"","sources":["../../../src/patterns/confirm-dialog/ConfirmDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAG/C,MAAM,UAAU,aAAa,CAAC,EAC5B,OAAO,EACP,KAAK,EACL,WAAW,EACX,QAAQ,EACR,YAAY,GAAG,SAAS,EACxB,WAAW,GAAG,QAAQ,EACtB,WAAW,GAAG,QAAQ,EACtB,eAAe,GAAG,OAAO,EACzB,IAAI,GAAG,KAAK,EACZ,eAAe,GAAG,IAAI,EACtB,SAAS,EACT,QAAQ,EACR,MAAM,GACa;IACnB,OAAO,CACL,CAAC,KAAK,CACJ,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,MAAM,CAAC,CACL,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CACzE;UAAA,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,CACvD;YAAA,CAAC,WAAW,CACd;UAAA,EAAE,MAAM,CACR;UAAA,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,CACtF;YAAA,CAAC,YAAY,CACf;UAAA,EAAE,MAAM,CACV;QAAA,EAAE,KAAK,CACT,CAAC,CACD,SAAS,CAAC,CAAC,QAAQ,CAAC,CACpB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,KAAK,CAAC,QAAQ,CAEd;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC","sourcesContent":["import { Stack } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Button } from '../../components/button';\nimport { Modal } from '../../components/modal';\nimport type { ConfirmDialogProps } from './types';\n\nexport function ConfirmDialog({\n visible,\n title,\n description,\n children,\n confirmLabel = 'Confirm',\n cancelLabel = 'Cancel',\n confirmTone = 'danger',\n confirmEmphasis = 'solid',\n busy = false,\n closeOnBackdrop = true,\n onConfirm,\n onCancel,\n testID,\n}: ConfirmDialogProps) {\n return (\n <Modal\n closeOnBackdrop={closeOnBackdrop}\n description={description}\n footer={\n <Stack direction={{ base: 'column', md: 'row' }} gap=\"s\" justify=\"flex-end\">\n <Button emphasis=\"soft\" onPress={onCancel} tone=\"neutral\">\n {cancelLabel}\n </Button>\n <Button emphasis={confirmEmphasis} loading={busy} onPress={onConfirm} tone={confirmTone}>\n {confirmLabel}\n </Button>\n </Stack>\n }\n onDismiss={onCancel}\n testID={testID}\n title={title}\n visible={visible}\n width=\"narrow\"\n >\n {children}\n </Modal>\n );\n}\n"]}
1
+ {"version":3,"file":"ConfirmDialog.js","sourceRoot":"","sources":["../../../src/patterns/confirm-dialog/ConfirmDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,kBAAkB,CAAC,EAC1B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,OAAO,EACP,KAAK,EACL,WAAW,EACX,QAAQ,EACR,YAAY,GAAG,SAAS,EACxB,WAAW,GAAG,QAAQ,EACtB,WAAW,GAAG,QAAQ,EACtB,eAAe,GAAG,OAAO,EACzB,IAAI,GAAG,KAAK,EACZ,eAAe,GAAG,IAAI,EACtB,SAAS,EACT,QAAQ,EACR,MAAM,GACa;IACnB,OAAO,CACL,CAAC,KAAK,CACJ,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,MAAM,CAAC,CACL,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CACzE;UAAA,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,CACvD;YAAA,CAAC,WAAW,CACd;UAAA,EAAE,MAAM,CACR;UAAA,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,CACtF;YAAA,CAAC,YAAY,CACf;UAAA,EAAE,MAAM,CACV;QAAA,EAAE,KAAK,CACT,CAAC,CACD,SAAS,CAAC,CAAC,QAAQ,CAAC,CACpB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,KAAK,CAAC,QAAQ,CAEd;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import { Stack } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Button } from '../../components/button';\nimport { Modal } from '../../components/modal';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { ConfirmDialogProps } from './types';\n\nfunction ConfirmDialogInner({\n themeId: _themeId,\n mode: _mode,\n visible,\n title,\n description,\n children,\n confirmLabel = 'Confirm',\n cancelLabel = 'Cancel',\n confirmTone = 'danger',\n confirmEmphasis = 'solid',\n busy = false,\n closeOnBackdrop = true,\n onConfirm,\n onCancel,\n testID,\n}: ConfirmDialogProps) {\n return (\n <Modal\n closeOnBackdrop={closeOnBackdrop}\n description={description}\n footer={\n <Stack direction={{ base: 'column', md: 'row' }} gap=\"s\" justify=\"flex-end\">\n <Button emphasis=\"soft\" onPress={onCancel} tone=\"neutral\">\n {cancelLabel}\n </Button>\n <Button emphasis={confirmEmphasis} loading={busy} onPress={onConfirm} tone={confirmTone}>\n {confirmLabel}\n </Button>\n </Stack>\n }\n onDismiss={onCancel}\n testID={testID}\n title={title}\n visible={visible}\n width=\"narrow\"\n >\n {children}\n </Modal>\n );\n}\n\nexport const ConfirmDialog = withZoraThemeScope(ConfirmDialogInner);\n"]}
@@ -1,6 +1,7 @@
1
1
  import type React from 'react';
2
2
  import type { ZoraEmphasis, ZoraTone } from '../../internal/recipes';
3
- export interface ConfirmDialogProps {
3
+ import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
4
+ export interface ConfirmDialogProps extends ZoraBaseProps {
4
5
  visible: boolean;
5
6
  title: React.ReactNode;
6
7
  description?: React.ReactNode;
@@ -13,6 +14,5 @@ export interface ConfirmDialogProps {
13
14
  closeOnBackdrop?: boolean;
14
15
  onConfirm?: () => void;
15
16
  onCancel?: () => void;
16
- testID?: string;
17
17
  }
18
18
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/confirm-dialog/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAErE,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,eAAe,CAAC,EAAE,YAAY,CAAC;IAC/B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/confirm-dialog/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,kBAAmB,SAAQ,aAAa;IACvD,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,eAAe,CAAC,EAAE,YAAY,CAAC;IAC/B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/confirm-dialog/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { ZoraEmphasis, ZoraTone } from '../../internal/recipes';\n\nexport interface ConfirmDialogProps {\n visible: boolean;\n title: React.ReactNode;\n description?: React.ReactNode;\n children?: React.ReactNode;\n confirmLabel?: React.ReactNode;\n cancelLabel?: React.ReactNode;\n confirmTone?: ZoraTone;\n confirmEmphasis?: ZoraEmphasis;\n busy?: boolean;\n closeOnBackdrop?: boolean;\n onConfirm?: () => void;\n onCancel?: () => void;\n testID?: string;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/confirm-dialog/types.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { ZoraEmphasis, ZoraTone } from '../../internal/recipes';\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface ConfirmDialogProps extends ZoraBaseProps {\n visible: boolean;\n title: React.ReactNode;\n description?: React.ReactNode;\n children?: React.ReactNode;\n confirmLabel?: React.ReactNode;\n cancelLabel?: React.ReactNode;\n confirmTone?: ZoraTone;\n confirmEmphasis?: ZoraEmphasis;\n busy?: boolean;\n closeOnBackdrop?: boolean;\n onConfirm?: () => void;\n onCancel?: () => void;\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import type { DisclosureSectionProps } from './types';
3
- export declare function DisclosureSection({ title, description, icon, defaultOpen, open: controlledOpen, onOpenChange, actions, children, disabled, testID, }: DisclosureSectionProps): React.JSX.Element;
3
+ export declare const DisclosureSection: (props: DisclosureSectionProps) => React.ReactElement | null;
4
4
  //# sourceMappingURL=DisclosureSection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DisclosureSection.d.ts","sourceRoot":"","sources":["../../../src/patterns/disclosure-section/DisclosureSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,WAAW,EACX,IAAI,EACJ,WAAkB,EAClB,IAAI,EAAE,cAAc,EACpB,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,MAAM,GACP,EAAE,sBAAsB,qBA0CxB"}
1
+ {"version":3,"file":"DisclosureSection.d.ts","sourceRoot":"","sources":["../../../src/patterns/disclosure-section/DisclosureSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AA2DtD,eAAO,MAAM,iBAAiB,8DAA6C,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import { Box, Stack } from '@ankhorage/surface';
2
2
  import React from 'react';
3
3
  import { IconButton } from '../../components/icon-button';
4
+ import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
4
5
  import { Panel } from '../panel';
5
- export function DisclosureSection({ title, description, icon, defaultOpen = true, open: controlledOpen, onOpenChange, actions, children, disabled, testID, }) {
6
+ function DisclosureSectionInner({ themeId: _themeId, mode: _mode, title, description, icon, defaultOpen = true, open: controlledOpen, onOpenChange, actions, children, disabled, testID, }) {
6
7
  const [internalOpen, setInternalOpen] = React.useState(defaultOpen);
7
8
  const isControlled = controlledOpen !== undefined;
8
9
  const isOpen = isControlled ? controlledOpen : internalOpen;
@@ -24,4 +25,5 @@ export function DisclosureSection({ title, description, icon, defaultOpen = true
24
25
  {isOpen ? <Box pt="m">{children}</Box> : null}
25
26
  </Panel>);
26
27
  }
28
+ export const DisclosureSection = withZoraThemeScope(DisclosureSectionInner);
27
29
  //# sourceMappingURL=DisclosureSection.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DisclosureSection.js","sourceRoot":"","sources":["../../../src/patterns/disclosure-section/DisclosureSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGjC,MAAM,UAAU,iBAAiB,CAAC,EAChC,KAAK,EACL,WAAW,EACX,IAAI,EACJ,WAAW,GAAG,IAAI,E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AC,CAAC,CAAC,QAAQ,CAAC,CACtC,QAAQ,CAAC,OAAO,CAChB,IAAI,CAAC,SAAS,CACd,IAAI,CAAC,GAAG,CACR,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,OAAO,CAAC,CAAC,UAAU,CAAC,EAExB;QAAA,EAAE,KAAK,CACT,CAAC,CAED;MAAA,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAC/C;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC","sourcesContent":["import { Box, Stack } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { IconButton } from '../../components/icon-button';\nimport { Panel } from '../panel';\nimport type { DisclosureSectionProps } from './types';\n\nexport function DisclosureSection({\n title,\n description,\n icon,\n defaultOpen = true,\n open: controlledOpen,\n onOpenChange,\n actions,\n children,\n disabled,\n testID,\n}: DisclosureSectionProps) {\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen);\n\n const isControlled = controlledOpen !== undefined;\n const isOpen = isControlled ? controlledOpen : internalOpen;\n\n const toggleOpen = () => {\n if (disabled) return;\n\n if (isControlled) {\n onOpenChange?.(!controlledOpen);\n } else {\n setInternalOpen(!internalOpen);\n onOpenChange?.(!internalOpen);\n }\n };\n\n return (\n <Panel\n compact\n description={description}\n testID={testID}\n title={title}\n eyebrow={icon ? <Box pb=\"xs\">{/* Surface icon spec would go here */}</Box> : null}\n actions={\n <Stack direction=\"row\" gap=\"xs\" align=\"center\">\n {actions}\n <IconButton\n icon={{ name: isOpen ? 'chevron-up-outline' : 'chevron-down-outline' }}\n label={isOpen ? 'Collapse' : 'Expand'}\n emphasis=\"ghost\"\n tone=\"neutral\"\n size=\"s\"\n disabled={disabled}\n onPress={toggleOpen}\n />\n </Stack>\n }\n >\n {isOpen ? <Box pt=\"m\">{children}</Box> : null}\n </Panel>\n );\n}\n"]}
1
+ {"version":3,"file":"DisclosureSection.js","sourceRoot":"","sources":["../../../src/patterns/disclosure-section/DisclosureSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGjC,SAAS,sBAAsB,CAAC,EAC9B,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,KAAK,EACL,WAAW,EACX,IAAI,EACJ,WAAW,GAAG,IAAI,EAClB,IAAI,EAAE,cAAc,EACpB,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,MAAM,GACiB;IACvB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAEpE,MAAM,YAAY,GAAG,cAAc,KAAK,SAAS,CAAC;IAClD,MAAM,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC;IAE5D,MAAM,UAAU,GAAG,GAAG,EAAE;QACtB,IAAI,QAAQ;YAAE,OAAO;QAErB,IAAI,YAAY,EAAE,CAAC;YACjB,YAAY,EAAE,CAAC,CAAC,cAAc,CAAC,CAAC;QAClC,CAAC;aAAM,CAAC;YACN,eAAe,CAAC,CAAC,YAAY,CAAC,CAAC;YAC/B,YAAY,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC;QAChC,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,KAAK,CACJ,OAAO,CACP,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,qCAAqC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAClF,OAAO,CAAC,CACN,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAC5C;UAAA,CAAC,OAAO,CACR;UAAA,CAAC,UAAU,CACT,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,sBAAsB,EAAE,CAAC,CACvE,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CACtC,QAAQ,CAAC,OAAO,CAChB,IAAI,CAAC,SAAS,CACd,IAAI,CAAC,GAAG,CACR,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,OAAO,CAAC,CAAC,UAAU,CAAC,EAExB;QAAA,EAAE,KAAK,CACT,CAAC,CAED;MAAA,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAC/C;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,sBAAsB,CAAC,CAAC","sourcesContent":["import { Box, Stack } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { IconButton } from '../../components/icon-button';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport { Panel } from '../panel';\nimport type { DisclosureSectionProps } from './types';\n\nfunction DisclosureSectionInner({\n themeId: _themeId,\n mode: _mode,\n title,\n description,\n icon,\n defaultOpen = true,\n open: controlledOpen,\n onOpenChange,\n actions,\n children,\n disabled,\n testID,\n}: DisclosureSectionProps) {\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen);\n\n const isControlled = controlledOpen !== undefined;\n const isOpen = isControlled ? controlledOpen : internalOpen;\n\n const toggleOpen = () => {\n if (disabled) return;\n\n if (isControlled) {\n onOpenChange?.(!controlledOpen);\n } else {\n setInternalOpen(!internalOpen);\n onOpenChange?.(!internalOpen);\n }\n };\n\n return (\n <Panel\n compact\n description={description}\n testID={testID}\n title={title}\n eyebrow={icon ? <Box pb=\"xs\">{/* Surface icon spec would go here */}</Box> : null}\n actions={\n <Stack direction=\"row\" gap=\"xs\" align=\"center\">\n {actions}\n <IconButton\n icon={{ name: isOpen ? 'chevron-up-outline' : 'chevron-down-outline' }}\n label={isOpen ? 'Collapse' : 'Expand'}\n emphasis=\"ghost\"\n tone=\"neutral\"\n size=\"s\"\n disabled={disabled}\n onPress={toggleOpen}\n />\n </Stack>\n }\n >\n {isOpen ? <Box pt=\"m\">{children}</Box> : null}\n </Panel>\n );\n}\n\nexport const DisclosureSection = withZoraThemeScope(DisclosureSectionInner);\n"]}
@@ -1,6 +1,7 @@
1
1
  import type { ButtonIconSpec } from '@ankhorage/surface';
2
2
  import type { ReactNode } from 'react';
3
- export interface DisclosureSectionProps {
3
+ import type { ZoraBaseProps } from '../../theme/ZoraBaseProps';
4
+ export interface DisclosureSectionProps extends ZoraBaseProps {
4
5
  title: ReactNode;
5
6
  description?: ReactNode;
6
7
  icon?: ButtonIconSpec;
@@ -10,6 +11,5 @@ export interface DisclosureSectionProps {
10
11
  actions?: ReactNode;
11
12
  children?: ReactNode;
12
13
  disabled?: boolean;
13
- testID?: string;
14
14
  }
15
15
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/disclosure-section/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/patterns/disclosure-section/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,sBAAuB,SAAQ,aAAa;IAC3D,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/disclosure-section/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonIconSpec } from '@ankhorage/surface';\nimport type { ReactNode } from 'react';\n\nexport interface DisclosureSectionProps {\n title: ReactNode;\n description?: ReactNode;\n icon?: ButtonIconSpec;\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n actions?: ReactNode;\n children?: ReactNode;\n disabled?: boolean;\n testID?: string;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/patterns/disclosure-section/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonIconSpec } from '@ankhorage/surface';\nimport type { ReactNode } from 'react';\n\nimport type { ZoraBaseProps } from '../../theme/ZoraBaseProps';\n\nexport interface DisclosureSectionProps extends ZoraBaseProps {\n title: ReactNode;\n description?: ReactNode;\n icon?: ButtonIconSpec;\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n actions?: ReactNode;\n children?: ReactNode;\n disabled?: boolean;\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import type { EmptyStateProps } from './types';
3
- export declare function EmptyState({ title, description, eyebrow, primaryAction, secondaryAction, footer, testID, }: EmptyStateProps): React.JSX.Element;
3
+ export declare const EmptyState: (props: EmptyStateProps) => React.ReactElement | null;
4
4
  //# sourceMappingURL=EmptyState.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/patterns/empty-state/EmptyState.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,OAAO,EACP,aAAa,EACb,eAAe,EACf,MAAM,EACN,MAAM,GACP,EAAE,eAAe,qBAqCjB"}
1
+ {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/patterns/empty-state/EmptyState.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAmD/C,eAAO,MAAM,UAAU,uDAAsC,CAAC"}
@@ -2,7 +2,8 @@ import { Stack } from '@ankhorage/surface';
2
2
  import React from 'react';
3
3
  import { Button } from '../../components/button';
4
4
  import { Card } from '../../components/card';
5
- export function EmptyState({ title, description, eyebrow, primaryAction, secondaryAction, footer, testID, }) {
5
+ import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
6
+ function EmptyStateInner({ themeId: _themeId, mode: _mode, title, description, eyebrow, primaryAction, secondaryAction, footer, testID, }) {
6
7
  return (<Card compact description={description} eyebrow={eyebrow} testID={testID} title={title} tone="subtle">
7
8
  <Stack gap="m">
8
9
  {primaryAction || secondaryAction ? (<Stack direction={{ base: 'column', md: 'row' }} gap="s">
@@ -17,4 +18,5 @@ export function EmptyState({ title, description, eyebrow, primaryAction, seconda
17
18
  </Stack>
18
19
  </Card>);
19
20
  }
21
+ export const EmptyState = withZoraThemeScope(EmptyStateInner);
20
22
  //# sourceMappingURL=EmptyState.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyState.js","sourceRoot":"","sources":["../../../src/patterns/empty-state/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAG7C,MAAM,UAAU,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,OAAO,EACP,aAAa,EACb,eAAe,EACf,MAAM,EACN,MAAM,GACU;IAChB,OAAO,CACL,CAAC,IAAI,CACH,OAAO,CACP,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,IAAI,CAAC,QAAQ,CAEb;MAAA,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CACZ;QAAA,CAAC,aAAa,IAAI,eAAe,CAAC,CAAC,CAAC,CAClC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CACtD;YAAA,CAAC,aAAa,CAAC,CAAC,CAAC,CACf,CAAC,MAAM,CACL,QAAQ,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CACjC,OAAO,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAC/B,IAAI,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAEzB;gBAAA,CAAC,aAAa,CAAC,KAAK,CACtB;cAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACR;YAAA,CAAC,eAAe,CAAC,CAAC,CAAC,CACjB,CAAC,MAAM,CACL,QAAQ,CAAC,CAAC,eAAe,CAAC,QAAQ,IAAI,MAAM,CAAC,CAC7C,OAAO,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,CACjC,IAAI,CAAC,CAAC,eAAe,CAAC,IAAI,IAAI,SAAS,CAAC,CAExC;gBAAA,CAAC,eAAe,CAAC,KAAK,CACxB;cAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,IAAI,CACR;QAAA,CAAC,MAAM,CACT;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC","sourcesContent":["import { Stack } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Button } from '../../components/button';\nimport { Card } from '../../components/card';\nimport type { EmptyStateProps } from './types';\n\nexport function EmptyState({\n title,\n description,\n eyebrow,\n primaryAction,\n secondaryAction,\n footer,\n testID,\n}: EmptyStateProps) {\n return (\n <Card\n compact\n description={description}\n eyebrow={eyebrow}\n testID={testID}\n title={title}\n tone=\"subtle\"\n >\n <Stack gap=\"m\">\n {primaryAction || secondaryAction ? (\n <Stack direction={{ base: 'column', md: 'row' }} gap=\"s\">\n {primaryAction ? (\n <Button\n emphasis={primaryAction.emphasis}\n onPress={primaryAction.onPress}\n tone={primaryAction.tone}\n >\n {primaryAction.label}\n </Button>\n ) : null}\n {secondaryAction ? (\n <Button\n emphasis={secondaryAction.emphasis ?? 'soft'}\n onPress={secondaryAction.onPress}\n tone={secondaryAction.tone ?? 'neutral'}\n >\n {secondaryAction.label}\n </Button>\n ) : null}\n </Stack>\n ) : null}\n {footer}\n </Stack>\n </Card>\n );\n}\n"]}
1
+ {"version":3,"file":"EmptyState.js","sourceRoot":"","sources":["../../../src/patterns/empty-state/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,SAAS,eAAe,CAAC,EACvB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,KAAK,EACL,WAAW,EACX,OAAO,EACP,aAAa,EACb,eAAe,EACf,MAAM,EACN,MAAM,GACU;IAChB,OAAO,CACL,CAAC,IAAI,CACH,OAAO,CACP,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,IAAI,CAAC,QAAQ,CAEb;MAAA,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CACZ;QAAA,CAAC,aAAa,IAAI,eAAe,CAAC,CAAC,CAAC,CAClC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CACtD;YAAA,CAAC,aAAa,CAAC,CAAC,CAAC,CACf,CAAC,MAAM,CACL,QAAQ,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CACjC,OAAO,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAC/B,IAAI,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAEzB;gBAAA,CAAC,aAAa,CAAC,KAAK,CACtB;cAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACR;YAAA,CAAC,eAAe,CAAC,CAAC,CAAC,CACjB,CAAC,MAAM,CACL,QAAQ,CAAC,CAAC,eAAe,CAAC,QAAQ,IAAI,MAAM,CAAC,CAC7C,OAAO,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,CACjC,IAAI,CAAC,CAAC,eAAe,CAAC,IAAI,IAAI,SAAS,CAAC,CAExC;gBAAA,CAAC,eAAe,CAAC,KAAK,CACxB;cAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;UAAA,EAAE,KAAK,CAAC,CACT,CAAC,CAAC,CAAC,IAAI,CACR;QAAA,CAAC,MAAM,CACT;MAAA,EAAE,KAAK,CACT;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC","sourcesContent":["import { Stack } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { Button } from '../../components/button';\nimport { Card } from '../../components/card';\nimport { withZoraThemeScope } from '../../theme/withZoraThemeScope';\nimport type { EmptyStateProps } from './types';\n\nfunction EmptyStateInner({\n themeId: _themeId,\n mode: _mode,\n title,\n description,\n eyebrow,\n primaryAction,\n secondaryAction,\n footer,\n testID,\n}: EmptyStateProps) {\n return (\n <Card\n compact\n description={description}\n eyebrow={eyebrow}\n testID={testID}\n title={title}\n tone=\"subtle\"\n >\n <Stack gap=\"m\">\n {primaryAction || secondaryAction ? (\n <Stack direction={{ base: 'column', md: 'row' }} gap=\"s\">\n {primaryAction ? (\n <Button\n emphasis={primaryAction.emphasis}\n onPress={primaryAction.onPress}\n tone={primaryAction.tone}\n >\n {primaryAction.label}\n </Button>\n ) : null}\n {secondaryAction ? (\n <Button\n emphasis={secondaryAction.emphasis ?? 'soft'}\n onPress={secondaryAction.onPress}\n tone={secondaryAction.tone ?? 'neutral'}\n >\n {secondaryAction.label}\n </Button>\n ) : null}\n </Stack>\n ) : null}\n {footer}\n </Stack>\n </Card>\n );\n}\n\nexport const EmptyState = withZoraThemeScope(EmptyStateInner);\n"]}