@ankhorage/zora 14.0.1 → 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (561) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/constants.d.ts +5 -0
  4. package/dist/constants.d.ts.map +1 -1
  5. package/dist/constants.js +5 -0
  6. package/dist/constants.js.map +1 -1
  7. package/dist/features/accordion/accordionItemMeta.d.ts +1 -1
  8. package/dist/features/app-bar/adapters/inbound/AppBar.d.ts.map +1 -1
  9. package/dist/features/app-bar/adapters/inbound/AppBar.js +28 -27
  10. package/dist/features/app-bar/adapters/inbound/AppBar.js.map +1 -1
  11. package/dist/features/app-bar/public.d.ts +1 -1
  12. package/dist/features/app-bar/public.d.ts.map +1 -1
  13. package/dist/features/app-bar/public.js.map +1 -1
  14. package/dist/features/bottom-sheet/bottomSheetMeta.d.ts +1 -1
  15. package/dist/features/bottom-sheet/public.d.ts +2 -2
  16. package/dist/features/bottom-sheet/public.d.ts.map +1 -1
  17. package/dist/features/bottom-sheet/public.js +1 -1
  18. package/dist/features/bottom-sheet/public.js.map +1 -1
  19. package/dist/features/breadcrumbs/adapters/inbound/Breadcrumbs.d.ts +5 -0
  20. package/dist/features/breadcrumbs/adapters/inbound/Breadcrumbs.d.ts.map +1 -0
  21. package/dist/features/breadcrumbs/adapters/inbound/Breadcrumbs.js +81 -0
  22. package/dist/features/breadcrumbs/adapters/inbound/Breadcrumbs.js.map +1 -0
  23. package/dist/features/breadcrumbs/breadcrumbsMeta.d.ts +119 -0
  24. package/dist/features/breadcrumbs/breadcrumbsMeta.d.ts.map +1 -0
  25. package/dist/features/breadcrumbs/breadcrumbsMeta.js +94 -0
  26. package/dist/features/breadcrumbs/breadcrumbsMeta.js.map +1 -0
  27. package/dist/features/breadcrumbs/public.d.ts +3 -0
  28. package/dist/features/breadcrumbs/public.d.ts.map +1 -0
  29. package/dist/features/breadcrumbs/public.js +2 -0
  30. package/dist/features/breadcrumbs/public.js.map +1 -0
  31. package/dist/features/card/cardMeta.d.ts +1 -1
  32. package/dist/features/card/mediaCardMeta.d.ts +1 -1
  33. package/dist/features/card/postCardMeta.d.ts +1 -1
  34. package/dist/features/data-table/adapters/inbound/DataTable.d.ts.map +1 -1
  35. package/dist/features/data-table/adapters/inbound/DataTable.js +4 -2
  36. package/dist/features/data-table/adapters/inbound/DataTable.js.map +1 -1
  37. package/dist/features/dialog/adapters/inbound/Dialog.d.ts +5 -0
  38. package/dist/features/dialog/adapters/inbound/Dialog.d.ts.map +1 -0
  39. package/dist/features/dialog/adapters/inbound/Dialog.js +45 -0
  40. package/dist/features/dialog/adapters/inbound/Dialog.js.map +1 -0
  41. package/dist/features/dialog/dialogMeta.d.ts +87 -0
  42. package/dist/features/dialog/dialogMeta.d.ts.map +1 -0
  43. package/dist/features/dialog/dialogMeta.js +59 -0
  44. package/dist/features/dialog/dialogMeta.js.map +1 -0
  45. package/dist/features/dialog/public.d.ts +3 -0
  46. package/dist/features/dialog/public.d.ts.map +1 -0
  47. package/dist/features/dialog/public.js +2 -0
  48. package/dist/features/dialog/public.js.map +1 -0
  49. package/dist/features/form/formFieldMeta.d.ts +1 -1
  50. package/dist/features/form/formFieldMeta.d.ts.map +1 -1
  51. package/dist/features/form/formFieldMeta.js +8 -1
  52. package/dist/features/form/formFieldMeta.js.map +1 -1
  53. package/dist/features/form/radio/utils/resolveRadioGroupThemeRecipe.d.ts +1 -1
  54. package/dist/features/form/search-input/adapters/inbound/SearchInput.d.ts +4 -0
  55. package/dist/features/form/search-input/adapters/inbound/SearchInput.d.ts.map +1 -0
  56. package/dist/{components/search-bar/SearchBar.js → features/form/search-input/adapters/inbound/SearchInput.js} +8 -10
  57. package/dist/features/form/search-input/adapters/inbound/SearchInput.js.map +1 -0
  58. package/dist/features/form/search-input/public.d.ts +3 -0
  59. package/dist/features/form/search-input/public.d.ts.map +1 -0
  60. package/dist/features/form/search-input/public.js +2 -0
  61. package/dist/features/form/search-input/public.js.map +1 -0
  62. package/dist/features/form/search-input/searchInputMeta.d.ts +126 -0
  63. package/dist/features/form/search-input/searchInputMeta.d.ts.map +1 -0
  64. package/dist/features/form/search-input/searchInputMeta.js +67 -0
  65. package/dist/features/form/search-input/searchInputMeta.js.map +1 -0
  66. package/dist/features/form/select/adapters/inbound/Select.d.ts +2 -0
  67. package/dist/features/form/select/adapters/inbound/Select.d.ts.map +1 -0
  68. package/dist/features/form/select/adapters/inbound/Select.js +2 -0
  69. package/dist/features/form/select/adapters/inbound/Select.js.map +1 -0
  70. package/dist/features/form/select/adapters/inbound/Select.native.d.ts +5 -0
  71. package/dist/features/form/select/adapters/inbound/Select.native.d.ts.map +1 -0
  72. package/dist/features/form/select/adapters/inbound/Select.native.js +42 -0
  73. package/dist/features/form/select/adapters/inbound/Select.native.js.map +1 -0
  74. package/dist/features/form/select/adapters/inbound/Select.web.d.ts +5 -0
  75. package/dist/features/form/select/adapters/inbound/Select.web.d.ts.map +1 -0
  76. package/dist/features/form/select/adapters/inbound/Select.web.js +31 -0
  77. package/dist/features/form/select/adapters/inbound/Select.web.js.map +1 -0
  78. package/dist/features/form/select/composition/SelectField.d.ts +10 -0
  79. package/dist/features/form/select/composition/SelectField.d.ts.map +1 -0
  80. package/dist/features/form/select/composition/SelectField.js +8 -0
  81. package/dist/features/form/select/composition/SelectField.js.map +1 -0
  82. package/dist/features/form/select/composition/SelectOptionRow.d.ts +12 -0
  83. package/dist/features/form/select/composition/SelectOptionRow.d.ts.map +1 -0
  84. package/dist/features/form/select/composition/SelectOptionRow.js +9 -0
  85. package/dist/features/form/select/composition/SelectOptionRow.js.map +1 -0
  86. package/dist/features/form/select/composition/SelectTrigger.d.ts +10 -0
  87. package/dist/features/form/select/composition/SelectTrigger.d.ts.map +1 -0
  88. package/dist/features/form/select/composition/SelectTrigger.js +9 -0
  89. package/dist/features/form/select/composition/SelectTrigger.js.map +1 -0
  90. package/dist/features/form/select/composition/useSelectController.d.ts +8 -0
  91. package/dist/features/form/select/composition/useSelectController.d.ts.map +1 -0
  92. package/dist/features/form/select/composition/useSelectController.js +15 -0
  93. package/dist/features/form/select/composition/useSelectController.js.map +1 -0
  94. package/dist/features/form/select/public.d.ts +3 -0
  95. package/dist/features/form/select/public.d.ts.map +1 -0
  96. package/dist/features/form/select/public.js +2 -0
  97. package/dist/features/form/select/public.js.map +1 -0
  98. package/dist/features/form/select/selectMeta.d.ts +195 -0
  99. package/dist/features/form/select/selectMeta.d.ts.map +1 -0
  100. package/dist/features/form/select/selectMeta.js +152 -0
  101. package/dist/features/form/select/selectMeta.js.map +1 -0
  102. package/dist/features/gradient/gradientMeta.d.ts +1 -1
  103. package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.d.ts +1 -1
  104. package/dist/features/layout/boxMeta.d.ts +1 -1
  105. package/dist/features/layout/containerMeta.d.ts +1 -1
  106. package/dist/features/layout/gridMeta.d.ts +1 -1
  107. package/dist/features/layout/stackMeta.d.ts +1 -1
  108. package/dist/features/list/flatListMeta.d.ts +1 -1
  109. package/dist/features/list/sectionListMeta.d.ts +1 -1
  110. package/dist/features/pagination/adapters/inbound/Pagination.d.ts +5 -0
  111. package/dist/features/pagination/adapters/inbound/Pagination.d.ts.map +1 -0
  112. package/dist/features/pagination/adapters/inbound/Pagination.js +43 -0
  113. package/dist/features/pagination/adapters/inbound/Pagination.js.map +1 -0
  114. package/dist/features/pagination/paginationMeta.d.ts +118 -0
  115. package/dist/features/pagination/paginationMeta.d.ts.map +1 -0
  116. package/dist/features/pagination/paginationMeta.js +53 -0
  117. package/dist/features/pagination/paginationMeta.js.map +1 -0
  118. package/dist/features/pagination/public.d.ts +3 -0
  119. package/dist/features/pagination/public.d.ts.map +1 -0
  120. package/dist/features/pagination/public.js +2 -0
  121. package/dist/features/pagination/public.js.map +1 -0
  122. package/dist/features/pagination/utils/resolvePaginationPage.d.ts +3 -0
  123. package/dist/features/pagination/utils/resolvePaginationPage.d.ts.map +1 -0
  124. package/dist/features/pagination/utils/resolvePaginationPage.js +7 -0
  125. package/dist/features/pagination/utils/resolvePaginationPage.js.map +1 -0
  126. package/dist/features/pagination/utils/resolvePaginationState.d.ts +17 -0
  127. package/dist/features/pagination/utils/resolvePaginationState.d.ts.map +1 -0
  128. package/dist/features/pagination/utils/resolvePaginationState.js +34 -0
  129. package/dist/features/pagination/utils/resolvePaginationState.js.map +1 -0
  130. package/dist/features/popover-menu/adapters/inbound/PopoverMenu.d.ts +5 -0
  131. package/dist/features/popover-menu/adapters/inbound/PopoverMenu.d.ts.map +1 -0
  132. package/dist/features/popover-menu/adapters/inbound/PopoverMenu.js +43 -0
  133. package/dist/features/popover-menu/adapters/inbound/PopoverMenu.js.map +1 -0
  134. package/dist/features/popover-menu/popoverMenuMeta.d.ts +9 -0
  135. package/dist/features/popover-menu/popoverMenuMeta.d.ts.map +1 -0
  136. package/dist/features/popover-menu/popoverMenuMeta.js +9 -0
  137. package/dist/features/popover-menu/popoverMenuMeta.js.map +1 -0
  138. package/dist/features/popover-menu/public.d.ts +3 -0
  139. package/dist/features/popover-menu/public.d.ts.map +1 -0
  140. package/dist/features/popover-menu/public.js +2 -0
  141. package/dist/features/popover-menu/public.js.map +1 -0
  142. package/dist/features/rating/adapters/inbound/Rating.d.ts +4 -0
  143. package/dist/features/rating/adapters/inbound/Rating.d.ts.map +1 -0
  144. package/dist/features/rating/adapters/inbound/Rating.js +49 -0
  145. package/dist/features/rating/adapters/inbound/Rating.js.map +1 -0
  146. package/dist/features/rating/public.d.ts +3 -0
  147. package/dist/features/rating/public.d.ts.map +1 -0
  148. package/dist/features/rating/public.js +2 -0
  149. package/dist/features/rating/public.js.map +1 -0
  150. package/dist/features/rating/ratingMeta.d.ts +57 -0
  151. package/dist/features/rating/ratingMeta.d.ts.map +1 -0
  152. package/dist/features/rating/ratingMeta.js +43 -0
  153. package/dist/features/rating/ratingMeta.js.map +1 -0
  154. package/dist/features/rating/utils/resolveRatingSegments.d.ts +9 -0
  155. package/dist/features/rating/utils/resolveRatingSegments.d.ts.map +1 -0
  156. package/dist/features/rating/utils/resolveRatingSegments.js +14 -0
  157. package/dist/features/rating/utils/resolveRatingSegments.js.map +1 -0
  158. package/dist/features/surface/surfaceMeta.d.ts +1 -1
  159. package/dist/features/tabs/adapters/inbound/Tab.d.ts +5 -0
  160. package/dist/features/tabs/adapters/inbound/Tab.d.ts.map +1 -0
  161. package/dist/features/tabs/adapters/inbound/Tab.js +14 -0
  162. package/dist/features/tabs/adapters/inbound/Tab.js.map +1 -0
  163. package/dist/features/tabs/adapters/inbound/TabList.d.ts +4 -0
  164. package/dist/features/tabs/adapters/inbound/TabList.d.ts.map +1 -0
  165. package/dist/features/tabs/adapters/inbound/TabList.js +9 -0
  166. package/dist/features/tabs/adapters/inbound/TabList.js.map +1 -0
  167. package/dist/features/tabs/adapters/inbound/TabPanel.d.ts +4 -0
  168. package/dist/features/tabs/adapters/inbound/TabPanel.d.ts.map +1 -0
  169. package/dist/features/tabs/adapters/inbound/TabPanel.js +11 -0
  170. package/dist/features/tabs/adapters/inbound/TabPanel.js.map +1 -0
  171. package/dist/features/tabs/adapters/inbound/Tabs.d.ts +4 -0
  172. package/dist/features/tabs/adapters/inbound/Tabs.d.ts.map +1 -0
  173. package/dist/features/tabs/adapters/inbound/Tabs.js +12 -0
  174. package/dist/features/tabs/adapters/inbound/Tabs.js.map +1 -0
  175. package/dist/features/tabs/composition/TabsInteractionPolicyContext.d.ts +3 -0
  176. package/dist/features/tabs/composition/TabsInteractionPolicyContext.d.ts.map +1 -0
  177. package/dist/features/tabs/composition/TabsInteractionPolicyContext.js +3 -0
  178. package/dist/features/tabs/composition/TabsInteractionPolicyContext.js.map +1 -0
  179. package/dist/features/tabs/public.d.ts +6 -0
  180. package/dist/features/tabs/public.d.ts.map +1 -0
  181. package/dist/features/tabs/public.js +5 -0
  182. package/dist/features/tabs/public.js.map +1 -0
  183. package/dist/features/tabs/tabListMeta.d.ts +9 -0
  184. package/dist/features/tabs/tabListMeta.d.ts.map +1 -0
  185. package/dist/features/tabs/tabListMeta.js +9 -0
  186. package/dist/features/tabs/tabListMeta.js.map +1 -0
  187. package/dist/features/tabs/tabMeta.d.ts +32 -0
  188. package/dist/features/tabs/tabMeta.d.ts.map +1 -0
  189. package/dist/features/tabs/tabMeta.js +14 -0
  190. package/dist/features/tabs/tabMeta.js.map +1 -0
  191. package/dist/features/tabs/tabPanelMeta.d.ts +15 -0
  192. package/dist/features/tabs/tabPanelMeta.d.ts.map +1 -0
  193. package/dist/features/tabs/tabPanelMeta.js +12 -0
  194. package/dist/features/tabs/tabPanelMeta.js.map +1 -0
  195. package/dist/features/tabs/tabsMeta.d.ts +58 -0
  196. package/dist/features/tabs/tabsMeta.d.ts.map +1 -0
  197. package/dist/features/tabs/tabsMeta.js +40 -0
  198. package/dist/features/tabs/tabsMeta.js.map +1 -0
  199. package/dist/features/toolbar/adapters/inbound/Toolbar.d.ts +4 -0
  200. package/dist/features/toolbar/adapters/inbound/Toolbar.d.ts.map +1 -0
  201. package/dist/features/toolbar/adapters/inbound/Toolbar.js +14 -0
  202. package/dist/features/toolbar/adapters/inbound/Toolbar.js.map +1 -0
  203. package/dist/features/toolbar/public.d.ts +3 -0
  204. package/dist/features/toolbar/public.d.ts.map +1 -0
  205. package/dist/features/toolbar/public.js +2 -0
  206. package/dist/features/toolbar/public.js.map +1 -0
  207. package/dist/features/toolbar/toolbarMeta.d.ts +29 -0
  208. package/dist/features/toolbar/toolbarMeta.d.ts.map +1 -0
  209. package/dist/features/toolbar/toolbarMeta.js +22 -0
  210. package/dist/features/toolbar/toolbarMeta.js.map +1 -0
  211. package/dist/features/typography/utils/resolveHeadingThemeRecipe.d.ts +1 -1
  212. package/dist/features/typography/utils/resolveTextThemeRecipe.d.ts +1 -1
  213. package/dist/features/uploader/adapters/inbound/Uploader.d.ts.map +1 -1
  214. package/dist/features/uploader/adapters/inbound/Uploader.js +3 -3
  215. package/dist/features/uploader/adapters/inbound/Uploader.js.map +1 -1
  216. package/dist/index.d.ts +10 -19
  217. package/dist/index.d.ts.map +1 -1
  218. package/dist/index.js +9 -9
  219. package/dist/index.js.map +1 -1
  220. package/dist/layout/screen/meta.d.ts +1 -1
  221. package/dist/layout/screen-section/meta.d.ts +1 -1
  222. package/dist/metadata/allowedChildren.d.ts +3 -3
  223. package/dist/metadata/allowedChildren.d.ts.map +1 -1
  224. package/dist/metadata/allowedChildren.js +6 -0
  225. package/dist/metadata/allowedChildren.js.map +1 -1
  226. package/dist/metadata/bindableComponentMeta.d.ts +3 -4
  227. package/dist/metadata/bindableComponentMeta.d.ts.map +1 -1
  228. package/dist/metadata/bindableComponentMeta.js +1 -2
  229. package/dist/metadata/bindableComponentMeta.js.map +1 -1
  230. package/dist/metadata/componentMeta.d.ts.map +1 -1
  231. package/dist/metadata/componentMeta.js +18 -14
  232. package/dist/metadata/componentMeta.js.map +1 -1
  233. package/dist/patterns/confirm-dialog/ConfirmDialog.js +3 -3
  234. package/dist/patterns/confirm-dialog/ConfirmDialog.js.map +1 -1
  235. package/dist/patterns/message-bubble/meta.d.ts +1 -1
  236. package/dist/patterns/notice/meta.d.ts +1 -1
  237. package/dist/patterns/panel/meta.d.ts +1 -1
  238. package/dist/patterns/reader/meta.d.ts +2 -2
  239. package/dist/patterns/scanner/meta.d.ts +2 -2
  240. package/dist/patterns/theme-composer/ThemeComposer.d.ts.map +1 -1
  241. package/dist/patterns/theme-composer/ThemeComposer.js +4 -4
  242. package/dist/patterns/theme-composer/ThemeComposer.js.map +1 -1
  243. package/dist/registry.d.ts.map +1 -1
  244. package/dist/registry.js +15 -14
  245. package/dist/registry.js.map +1 -1
  246. package/dist/types/app-bar.d.ts +6 -3
  247. package/dist/types/app-bar.d.ts.map +1 -1
  248. package/dist/types/app-bar.js.map +1 -1
  249. package/dist/{components/breadcrumbs/types.d.ts → types/breadcrumbs.d.ts} +8 -6
  250. package/dist/types/breadcrumbs.d.ts.map +1 -0
  251. package/dist/types/breadcrumbs.js +2 -0
  252. package/dist/types/breadcrumbs.js.map +1 -0
  253. package/dist/types/data-table.d.ts +2 -2
  254. package/dist/types/data-table.d.ts.map +1 -1
  255. package/dist/types/data-table.js.map +1 -1
  256. package/dist/types/dialog.d.ts +14 -0
  257. package/dist/types/dialog.d.ts.map +1 -0
  258. package/dist/types/dialog.js +2 -0
  259. package/dist/types/dialog.js.map +1 -0
  260. package/dist/types/pagination.d.ts +16 -0
  261. package/dist/types/pagination.d.ts.map +1 -0
  262. package/dist/types/pagination.js +2 -0
  263. package/dist/types/pagination.js.map +1 -0
  264. package/dist/types/popover-menu.d.ts +24 -0
  265. package/dist/types/popover-menu.d.ts.map +1 -0
  266. package/dist/types/popover-menu.js +2 -0
  267. package/dist/types/popover-menu.js.map +1 -0
  268. package/dist/types/rating.d.ts +9 -0
  269. package/dist/types/rating.d.ts.map +1 -0
  270. package/dist/types/rating.js +2 -0
  271. package/dist/types/rating.js.map +1 -0
  272. package/dist/types/search-input.d.ts +14 -0
  273. package/dist/types/search-input.d.ts.map +1 -0
  274. package/dist/types/search-input.js +2 -0
  275. package/dist/types/search-input.js.map +1 -0
  276. package/dist/types/select.d.ts +22 -0
  277. package/dist/types/select.d.ts.map +1 -0
  278. package/dist/types/select.js +2 -0
  279. package/dist/types/select.js.map +1 -0
  280. package/dist/types/tabs.d.ts +21 -0
  281. package/dist/types/tabs.d.ts.map +1 -0
  282. package/dist/types/tabs.js +2 -0
  283. package/dist/types/tabs.js.map +1 -0
  284. package/dist/types/toolbar.d.ts +8 -0
  285. package/dist/types/toolbar.d.ts.map +1 -0
  286. package/dist/types/toolbar.js +2 -0
  287. package/dist/types/toolbar.js.map +1 -0
  288. package/package.json +2 -4
  289. package/src/audit.test.ts +8 -47
  290. package/src/constants.ts +5 -0
  291. package/src/featureManifest.test.ts +31 -2
  292. package/src/features/app-bar/adapters/inbound/AppBar.tsx +50 -42
  293. package/src/features/app-bar/public.ts +1 -1
  294. package/src/features/bottom-sheet/public.test.ts +10 -1
  295. package/src/features/bottom-sheet/public.ts +9 -1
  296. package/src/features/breadcrumbs/adapters/inbound/Breadcrumbs.tsx +179 -0
  297. package/src/features/breadcrumbs/breadcrumbsMeta.ts +95 -0
  298. package/src/features/breadcrumbs/public.test.ts +22 -0
  299. package/src/features/breadcrumbs/public.ts +6 -0
  300. package/src/features/data-table/adapters/inbound/DataTable.tsx +9 -5
  301. package/src/features/dialog/adapters/inbound/Dialog.tsx +70 -0
  302. package/src/features/dialog/dialogMeta.ts +60 -0
  303. package/src/features/dialog/public.ts +2 -0
  304. package/src/features/form/formFieldMeta.ts +8 -1
  305. package/src/{components/search-bar/SearchBar.tsx → features/form/search-input/adapters/inbound/SearchInput.tsx} +10 -15
  306. package/src/features/form/search-input/public.ts +2 -0
  307. package/src/features/form/search-input/searchInputMeta.ts +68 -0
  308. package/src/features/form/select/adapters/inbound/Select.native.tsx +78 -0
  309. package/src/features/form/select/adapters/inbound/Select.tsx +1 -0
  310. package/src/features/form/select/adapters/inbound/Select.web.tsx +63 -0
  311. package/src/features/form/select/composition/SelectField.tsx +27 -0
  312. package/src/features/form/select/composition/SelectOptionRow.tsx +36 -0
  313. package/src/features/form/select/composition/SelectTrigger.tsx +32 -0
  314. package/src/features/form/select/composition/useSelectController.ts +21 -0
  315. package/src/features/form/select/public.test.ts +25 -0
  316. package/src/features/form/select/public.ts +2 -0
  317. package/src/features/form/select/selectMeta.ts +154 -0
  318. package/src/features/pagination/adapters/inbound/Pagination.tsx +116 -0
  319. package/src/features/pagination/paginationMeta.ts +54 -0
  320. package/src/features/pagination/public.ts +2 -0
  321. package/src/features/pagination/utils/resolvePaginationPage.ts +6 -0
  322. package/src/features/pagination/utils/resolvePaginationState.test.ts +29 -0
  323. package/src/features/pagination/utils/resolvePaginationState.ts +70 -0
  324. package/src/features/popover-menu/adapters/inbound/PopoverMenu.tsx +60 -0
  325. package/src/{components/rating/meta.ts → features/popover-menu/popoverMenuMeta.ts} +3 -3
  326. package/src/features/popover-menu/public.test.ts +11 -0
  327. package/src/features/popover-menu/public.ts +6 -0
  328. package/src/features/rating/adapters/inbound/Rating.tsx +70 -0
  329. package/src/features/rating/public.ts +2 -0
  330. package/src/features/rating/ratingMeta.ts +44 -0
  331. package/src/features/rating/utils/resolveRatingSegments.test.ts +20 -0
  332. package/src/features/rating/utils/resolveRatingSegments.ts +19 -0
  333. package/src/features/tabs/adapters/inbound/Tab.tsx +26 -0
  334. package/src/features/tabs/adapters/inbound/TabList.tsx +18 -0
  335. package/src/features/tabs/adapters/inbound/TabPanel.tsx +23 -0
  336. package/src/features/tabs/adapters/inbound/Tabs.tsx +23 -0
  337. package/src/features/tabs/composition/TabsInteractionPolicyContext.ts +4 -0
  338. package/src/features/tabs/public.ts +5 -0
  339. package/src/features/tabs/tabListMeta.ts +10 -0
  340. package/src/features/tabs/tabMeta.ts +15 -0
  341. package/src/features/tabs/tabPanelMeta.ts +13 -0
  342. package/src/features/tabs/tabsMeta.ts +41 -0
  343. package/src/features/toolbar/adapters/inbound/Toolbar.tsx +31 -0
  344. package/src/features/toolbar/public.ts +2 -0
  345. package/src/features/toolbar/toolbarMeta.ts +24 -0
  346. package/src/{components → features/typography}/contentFallback.test.ts +2 -8
  347. package/src/features/uploader/adapters/inbound/Uploader.tsx +3 -3
  348. package/src/index.ts +29 -19
  349. package/src/interactionPolicy.test.ts +19 -21
  350. package/src/metadata/allowedChildren.ts +6 -0
  351. package/src/metadata/bindableComponentMeta.test.ts +8 -0
  352. package/src/metadata/bindableComponentMeta.ts +1 -2
  353. package/src/metadata/componentMeta.test.ts +21 -1
  354. package/src/metadata/componentMeta.ts +18 -14
  355. package/src/nativePeerContract.test.ts +5 -19
  356. package/src/patterns/confirm-dialog/ConfirmDialog.tsx +3 -3
  357. package/src/patterns/theme-composer/ThemeComposer.tsx +7 -8
  358. package/src/platformAcceptance.test.ts +1 -1
  359. package/src/registry.ts +15 -14
  360. package/src/showcaseCoverage.test.ts +6 -3
  361. package/src/theme/themeScopeStructure.test.ts +24 -14
  362. package/src/types/app-bar.ts +6 -3
  363. package/src/{components/breadcrumbs/types.ts → types/breadcrumbs.ts} +8 -5
  364. package/src/types/data-table.ts +2 -2
  365. package/src/types/dialog.ts +15 -0
  366. package/src/{components/pagination/types.ts → types/pagination.ts} +5 -8
  367. package/src/types/popover-menu.ts +31 -0
  368. package/src/types/rating.ts +9 -0
  369. package/src/types/search-input.ts +14 -0
  370. package/src/{components/select/types.ts → types/select.ts} +11 -3
  371. package/src/types/tabs.ts +25 -0
  372. package/src/types/toolbar.ts +9 -0
  373. package/dist/components/breadcrumbs/Breadcrumbs.d.ts +0 -7
  374. package/dist/components/breadcrumbs/Breadcrumbs.d.ts.map +0 -1
  375. package/dist/components/breadcrumbs/Breadcrumbs.js +0 -80
  376. package/dist/components/breadcrumbs/Breadcrumbs.js.map +0 -1
  377. package/dist/components/breadcrumbs/index.d.ts +0 -3
  378. package/dist/components/breadcrumbs/index.d.ts.map +0 -1
  379. package/dist/components/breadcrumbs/index.js +0 -2
  380. package/dist/components/breadcrumbs/index.js.map +0 -1
  381. package/dist/components/breadcrumbs/meta.d.ts +0 -9
  382. package/dist/components/breadcrumbs/meta.d.ts.map +0 -1
  383. package/dist/components/breadcrumbs/meta.js +0 -9
  384. package/dist/components/breadcrumbs/meta.js.map +0 -1
  385. package/dist/components/breadcrumbs/types.d.ts.map +0 -1
  386. package/dist/components/breadcrumbs/types.js +0 -2
  387. package/dist/components/breadcrumbs/types.js.map +0 -1
  388. package/dist/components/menu/DropdownMenu.d.ts +0 -7
  389. package/dist/components/menu/DropdownMenu.d.ts.map +0 -1
  390. package/dist/components/menu/DropdownMenu.js +0 -9
  391. package/dist/components/menu/DropdownMenu.js.map +0 -1
  392. package/dist/components/menu/Menu.d.ts +0 -7
  393. package/dist/components/menu/Menu.d.ts.map +0 -1
  394. package/dist/components/menu/Menu.js +0 -46
  395. package/dist/components/menu/Menu.js.map +0 -1
  396. package/dist/components/menu/index.d.ts +0 -4
  397. package/dist/components/menu/index.d.ts.map +0 -1
  398. package/dist/components/menu/index.js +0 -3
  399. package/dist/components/menu/index.js.map +0 -1
  400. package/dist/components/menu/meta.d.ts +0 -17
  401. package/dist/components/menu/meta.d.ts.map +0 -1
  402. package/dist/components/menu/meta.js +0 -17
  403. package/dist/components/menu/meta.js.map +0 -1
  404. package/dist/components/menu/types.d.ts +0 -22
  405. package/dist/components/menu/types.d.ts.map +0 -1
  406. package/dist/components/menu/types.js +0 -2
  407. package/dist/components/menu/types.js.map +0 -1
  408. package/dist/components/modal/Modal.d.ts +0 -7
  409. package/dist/components/modal/Modal.d.ts.map +0 -1
  410. package/dist/components/modal/Modal.js +0 -39
  411. package/dist/components/modal/Modal.js.map +0 -1
  412. package/dist/components/modal/index.d.ts +0 -3
  413. package/dist/components/modal/index.d.ts.map +0 -1
  414. package/dist/components/modal/index.js +0 -2
  415. package/dist/components/modal/index.js.map +0 -1
  416. package/dist/components/modal/meta.d.ts +0 -9
  417. package/dist/components/modal/meta.d.ts.map +0 -1
  418. package/dist/components/modal/meta.js +0 -9
  419. package/dist/components/modal/meta.js.map +0 -1
  420. package/dist/components/modal/types.d.ts +0 -12
  421. package/dist/components/modal/types.d.ts.map +0 -1
  422. package/dist/components/modal/types.js +0 -2
  423. package/dist/components/modal/types.js.map +0 -1
  424. package/dist/components/pagination/Pagination.d.ts +0 -7
  425. package/dist/components/pagination/Pagination.d.ts.map +0 -1
  426. package/dist/components/pagination/Pagination.js +0 -96
  427. package/dist/components/pagination/Pagination.js.map +0 -1
  428. package/dist/components/pagination/index.d.ts +0 -3
  429. package/dist/components/pagination/index.d.ts.map +0 -1
  430. package/dist/components/pagination/index.js +0 -2
  431. package/dist/components/pagination/index.js.map +0 -1
  432. package/dist/components/pagination/meta.d.ts +0 -9
  433. package/dist/components/pagination/meta.d.ts.map +0 -1
  434. package/dist/components/pagination/meta.js +0 -9
  435. package/dist/components/pagination/meta.js.map +0 -1
  436. package/dist/components/pagination/types.d.ts +0 -18
  437. package/dist/components/pagination/types.d.ts.map +0 -1
  438. package/dist/components/pagination/types.js +0 -2
  439. package/dist/components/pagination/types.js.map +0 -1
  440. package/dist/components/rating/Rating.d.ts +0 -7
  441. package/dist/components/rating/Rating.d.ts.map +0 -1
  442. package/dist/components/rating/Rating.js +0 -26
  443. package/dist/components/rating/Rating.js.map +0 -1
  444. package/dist/components/rating/index.d.ts +0 -3
  445. package/dist/components/rating/index.d.ts.map +0 -1
  446. package/dist/components/rating/index.js +0 -2
  447. package/dist/components/rating/index.js.map +0 -1
  448. package/dist/components/rating/meta.d.ts +0 -9
  449. package/dist/components/rating/meta.d.ts.map +0 -1
  450. package/dist/components/rating/meta.js +0 -9
  451. package/dist/components/rating/meta.js.map +0 -1
  452. package/dist/components/rating/resolveRatingSegments.d.ts +0 -7
  453. package/dist/components/rating/resolveRatingSegments.d.ts.map +0 -1
  454. package/dist/components/rating/resolveRatingSegments.js +0 -22
  455. package/dist/components/rating/resolveRatingSegments.js.map +0 -1
  456. package/dist/components/rating/types.d.ts +0 -11
  457. package/dist/components/rating/types.d.ts.map +0 -1
  458. package/dist/components/rating/types.js +0 -26
  459. package/dist/components/rating/types.js.map +0 -1
  460. package/dist/components/search-bar/SearchBar.d.ts +0 -7
  461. package/dist/components/search-bar/SearchBar.d.ts.map +0 -1
  462. package/dist/components/search-bar/SearchBar.js.map +0 -1
  463. package/dist/components/search-bar/index.d.ts +0 -3
  464. package/dist/components/search-bar/index.d.ts.map +0 -1
  465. package/dist/components/search-bar/index.js +0 -2
  466. package/dist/components/search-bar/index.js.map +0 -1
  467. package/dist/components/search-bar/meta.d.ts +0 -9
  468. package/dist/components/search-bar/meta.d.ts.map +0 -1
  469. package/dist/components/search-bar/meta.js +0 -9
  470. package/dist/components/search-bar/meta.js.map +0 -1
  471. package/dist/components/search-bar/types.d.ts +0 -14
  472. package/dist/components/search-bar/types.d.ts.map +0 -1
  473. package/dist/components/search-bar/types.js +0 -2
  474. package/dist/components/search-bar/types.js.map +0 -1
  475. package/dist/components/select/Select.d.ts +0 -7
  476. package/dist/components/select/Select.d.ts.map +0 -1
  477. package/dist/components/select/Select.js +0 -32
  478. package/dist/components/select/Select.js.map +0 -1
  479. package/dist/components/select/index.d.ts +0 -3
  480. package/dist/components/select/index.d.ts.map +0 -1
  481. package/dist/components/select/index.js +0 -3
  482. package/dist/components/select/index.js.map +0 -1
  483. package/dist/components/select/meta.d.ts +0 -9
  484. package/dist/components/select/meta.d.ts.map +0 -1
  485. package/dist/components/select/meta.js +0 -9
  486. package/dist/components/select/meta.js.map +0 -1
  487. package/dist/components/select/types.d.ts +0 -14
  488. package/dist/components/select/types.d.ts.map +0 -1
  489. package/dist/components/select/types.js +0 -2
  490. package/dist/components/select/types.js.map +0 -1
  491. package/dist/components/tabs/Tabs.d.ts +0 -9
  492. package/dist/components/tabs/Tabs.d.ts.map +0 -1
  493. package/dist/components/tabs/Tabs.js +0 -59
  494. package/dist/components/tabs/Tabs.js.map +0 -1
  495. package/dist/components/tabs/index.d.ts +0 -3
  496. package/dist/components/tabs/index.d.ts.map +0 -1
  497. package/dist/components/tabs/index.js +0 -3
  498. package/dist/components/tabs/index.js.map +0 -1
  499. package/dist/components/tabs/meta.d.ts +0 -9
  500. package/dist/components/tabs/meta.d.ts.map +0 -1
  501. package/dist/components/tabs/meta.js +0 -9
  502. package/dist/components/tabs/meta.js.map +0 -1
  503. package/dist/components/tabs/types.d.ts +0 -22
  504. package/dist/components/tabs/types.d.ts.map +0 -1
  505. package/dist/components/tabs/types.js +0 -2
  506. package/dist/components/tabs/types.js.map +0 -1
  507. package/dist/components/toolbar/Toolbar.d.ts +0 -9
  508. package/dist/components/toolbar/Toolbar.d.ts.map +0 -1
  509. package/dist/components/toolbar/Toolbar.js +0 -26
  510. package/dist/components/toolbar/Toolbar.js.map +0 -1
  511. package/dist/components/toolbar/ToolbarAction.d.ts +0 -9
  512. package/dist/components/toolbar/ToolbarAction.d.ts.map +0 -1
  513. package/dist/components/toolbar/ToolbarAction.js +0 -13
  514. package/dist/components/toolbar/ToolbarAction.js.map +0 -1
  515. package/dist/components/toolbar/index.d.ts +0 -4
  516. package/dist/components/toolbar/index.d.ts.map +0 -1
  517. package/dist/components/toolbar/index.js +0 -4
  518. package/dist/components/toolbar/index.js.map +0 -1
  519. package/dist/components/toolbar/meta.d.ts +0 -17
  520. package/dist/components/toolbar/meta.d.ts.map +0 -1
  521. package/dist/components/toolbar/meta.js +0 -17
  522. package/dist/components/toolbar/meta.js.map +0 -1
  523. package/dist/components/toolbar/types.d.ts +0 -18
  524. package/dist/components/toolbar/types.d.ts.map +0 -1
  525. package/dist/components/toolbar/types.js +0 -2
  526. package/dist/components/toolbar/types.js.map +0 -1
  527. package/src/components/breadcrumbs/Breadcrumbs.tsx +0 -147
  528. package/src/components/breadcrumbs/index.ts +0 -2
  529. package/src/components/breadcrumbs/meta.ts +0 -10
  530. package/src/components/menu/DropdownMenu.tsx +0 -11
  531. package/src/components/menu/Menu.tsx +0 -59
  532. package/src/components/menu/index.ts +0 -3
  533. package/src/components/menu/meta.ts +0 -19
  534. package/src/components/menu/types.ts +0 -31
  535. package/src/components/modal/Modal.tsx +0 -63
  536. package/src/components/modal/index.ts +0 -2
  537. package/src/components/modal/meta.ts +0 -10
  538. package/src/components/modal/types.ts +0 -16
  539. package/src/components/pagination/Pagination.tsx +0 -199
  540. package/src/components/pagination/index.ts +0 -2
  541. package/src/components/pagination/meta.ts +0 -10
  542. package/src/components/rating/Rating.tsx +0 -42
  543. package/src/components/rating/index.ts +0 -2
  544. package/src/components/rating/resolveRatingSegments.test.ts +0 -60
  545. package/src/components/rating/resolveRatingSegments.ts +0 -34
  546. package/src/components/rating/types.ts +0 -37
  547. package/src/components/search-bar/index.ts +0 -2
  548. package/src/components/search-bar/meta.ts +0 -10
  549. package/src/components/search-bar/types.ts +0 -14
  550. package/src/components/select/Select.tsx +0 -67
  551. package/src/components/select/index.ts +0 -2
  552. package/src/components/select/meta.ts +0 -10
  553. package/src/components/tabs/Tabs.tsx +0 -129
  554. package/src/components/tabs/index.ts +0 -2
  555. package/src/components/tabs/meta.ts +0 -10
  556. package/src/components/tabs/types.ts +0 -25
  557. package/src/components/toolbar/Toolbar.tsx +0 -48
  558. package/src/components/toolbar/ToolbarAction.tsx +0 -28
  559. package/src/components/toolbar/index.ts +0 -3
  560. package/src/components/toolbar/meta.ts +0 -19
  561. package/src/components/toolbar/types.ts +0 -21
@@ -0,0 +1,95 @@
1
+ import type { ZoraComponentMeta } from '../../metadata';
2
+
3
+ export const breadcrumbsMeta = {
4
+ name: 'Breadcrumbs',
5
+ category: 'component',
6
+ description: 'Hierarchical route context where the final item represents the current location.',
7
+ directManifestNode: true,
8
+ allowedChildren: [],
9
+ blueprint: {
10
+ label: 'Breadcrumbs',
11
+ defaultProps: {
12
+ items: [
13
+ { id: 'settings', label: 'Settings' },
14
+ { id: 'general', label: 'General' },
15
+ ],
16
+ separator: '/',
17
+ compact: false,
18
+ disabled: false,
19
+ },
20
+ },
21
+ bindings: {
22
+ events: {
23
+ itemPress: {
24
+ label: 'Item press',
25
+ description: 'Runs when a non-current breadcrumb item is pressed.',
26
+ payload: {
27
+ eventType: 'breadcrumbs.itemPress',
28
+ fields: [{ path: 'id', type: 'string', label: 'Item id' }],
29
+ },
30
+ },
31
+ },
32
+ },
33
+ events: {
34
+ itemPress: {
35
+ label: 'Item press',
36
+ eventType: 'breadcrumbs.itemPress',
37
+ description: 'Emitted when a non-current breadcrumb item is pressed.',
38
+ payloadFields: [{ path: 'id', type: 'string', label: 'Item id' }],
39
+ },
40
+ },
41
+ props: {
42
+ items: {
43
+ type: 'array',
44
+ category: 'Content',
45
+ label: 'Items',
46
+ itemSchema: [
47
+ {
48
+ key: 'id',
49
+ schema: { type: 'string', category: 'Content', label: 'Id' },
50
+ },
51
+ {
52
+ key: 'label',
53
+ schema: { type: 'string', category: 'Content', label: 'Label' },
54
+ },
55
+ {
56
+ key: 'disabled',
57
+ schema: {
58
+ type: 'boolean',
59
+ category: 'State',
60
+ label: 'Disabled',
61
+ default: false,
62
+ },
63
+ },
64
+ ],
65
+ authoring: { authority: 'instance' },
66
+ },
67
+ separator: {
68
+ type: 'string',
69
+ category: 'Content',
70
+ label: 'Separator',
71
+ default: '/',
72
+ authoring: { authority: 'instance' },
73
+ },
74
+ maxItems: {
75
+ type: 'number',
76
+ category: 'Layout',
77
+ label: 'Maximum items',
78
+ authoring: { authority: 'instance' },
79
+ },
80
+ compact: {
81
+ type: 'boolean',
82
+ category: 'Layout',
83
+ label: 'Compact',
84
+ default: false,
85
+ authoring: { authority: 'instance' },
86
+ },
87
+ disabled: {
88
+ type: 'boolean',
89
+ category: 'State',
90
+ label: 'Disabled',
91
+ default: false,
92
+ authoring: { authority: 'instance' },
93
+ },
94
+ },
95
+ } as const satisfies ZoraComponentMeta;
@@ -0,0 +1,22 @@
1
+ import { expect, test } from 'bun:test';
2
+
3
+ import { breadcrumbsMeta } from './breadcrumbsMeta';
4
+
5
+ test('Breadcrumbs is a direct manifest node with serializable item press payload', () => {
6
+ expect(breadcrumbsMeta.directManifestNode).toBe(true);
7
+ expect(breadcrumbsMeta.events.itemPress.eventType).toBe('breadcrumbs.itemPress');
8
+ expect(breadcrumbsMeta.events.itemPress.payloadFields).toEqual([
9
+ { path: 'id', type: 'string', label: 'Item id' },
10
+ ]);
11
+ });
12
+
13
+ test('Breadcrumbs keeps current-location derivation and callbacks outside item data', async () => {
14
+ const [source, types] = await Promise.all([
15
+ Bun.file('src/features/breadcrumbs/adapters/inbound/Breadcrumbs.tsx').text(),
16
+ Bun.file('src/types/breadcrumbs.ts').text(),
17
+ ]);
18
+
19
+ expect(source).toContain('const currentItemId = items.at(-1)?.id;');
20
+ expect(source).toContain('onItemPress({ id: item.id })');
21
+ expect(types).not.toContain('onPress?:');
22
+ });
@@ -0,0 +1,6 @@
1
+ export type {
2
+ BreadcrumbItem,
3
+ BreadcrumbPressEvent,
4
+ BreadcrumbsProps,
5
+ } from '../../types/breadcrumbs';
6
+ export { Breadcrumbs } from './adapters/inbound/Breadcrumbs';
@@ -2,7 +2,6 @@ import type { InteractionPolicy } from '@ankhorage/surface';
2
2
  import React from 'react';
3
3
  import { ScrollView, type ViewStyle } from 'react-native';
4
4
 
5
- import { DropdownMenu, type MenuAction } from '../../../../components/menu';
6
5
  import { Show } from '../../../../foundation';
7
6
  import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
8
7
  import type {
@@ -19,6 +18,7 @@ import { IconButton } from '../../../button/public';
19
18
  import { Card } from '../../../card/public';
20
19
  import { EmptyState } from '../../../empty-state/public';
21
20
  import { Box, Stack } from '../../../layout/public';
21
+ import { PopoverMenu, type PopoverMenuAction } from '../../../popover-menu/public';
22
22
  import { SkeletonList } from '../../../skeleton/public';
23
23
  import { Text, type TextAlign } from '../../../typography/public';
24
24
  import { resolveDataTableRowKey } from '../../utils/resolveDataTableRowKey';
@@ -139,10 +139,11 @@ function resolveNextSortDirection(
139
139
  return current === 'asc' ? 'desc' : 'asc';
140
140
  }
141
141
 
142
+ /*** Maps row-scoped DataTable actions into the shared PopoverMenu action contract. */
142
143
  function mapRowActions<TRow extends object>(
143
144
  row: TRow,
144
145
  actions: readonly DataTableRowAction<TRow>[],
145
- ): readonly MenuAction[] {
146
+ ): readonly PopoverMenuAction[] {
146
147
  return actions.map((action) => ({
147
148
  description: action.description,
148
149
  disabled: action.disabled,
@@ -154,6 +155,7 @@ function mapRowActions<TRow extends object>(
154
155
  }));
155
156
  }
156
157
 
158
+ /*** Renders the row action trigger and anchored PopoverMenu when actions exist. */
157
159
  function renderRowActions<TRow extends object>({
158
160
  row,
159
161
  rowIndex,
@@ -174,18 +176,20 @@ function renderRowActions<TRow extends object>({
174
176
  }
175
177
 
176
178
  return (
177
- <DropdownMenu
179
+ <PopoverMenu
178
180
  actions={mapRowActions(row, actions)}
179
181
  interactionPolicy={interactionPolicy}
180
182
  testID={testID ? `${testID}-row-actions-${rowIndex}` : undefined}
181
- trigger={
183
+ trigger={({ toggle }) => (
182
184
  <IconButton
183
185
  icon={{ name: 'ellipsis-horizontal' }}
186
+ interactionPolicy={interactionPolicy}
184
187
  label="Row actions"
188
+ onPress={toggle}
185
189
  size="s"
186
190
  variant="ghost"
187
191
  />
188
- }
192
+ )}
189
193
  />
190
194
  );
191
195
  }
@@ -0,0 +1,70 @@
1
+ import { Modal as SurfaceModal } from '@ankhorage/surface';
2
+ import React from 'react';
3
+ import { StyleSheet } from 'react-native';
4
+
5
+ import { resolveDialogWidth } from '../../../../internal/recipes';
6
+ import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
7
+ import type { DialogProps } from '../../../../types/dialog';
8
+ import { Box, Stack } from '../../../layout/public';
9
+ import { Heading, Text } from '../../../typography/public';
10
+
11
+ /*** Renders the product-level dialog composition on top of the Surface modal primitive. */
12
+ export const Dialog = withZoraThemeScope(DialogInner);
13
+
14
+ /*** Connects dialog chrome and slots to the generic modal overlay. */
15
+ function DialogInner({
16
+ themeId: _themeId,
17
+ mode: _mode,
18
+ children,
19
+ title,
20
+ description,
21
+ footer,
22
+ width = 'default',
23
+ onDismiss,
24
+ interactionPolicy,
25
+ ...props
26
+ }: DialogProps) {
27
+ const hasHeader = title !== undefined || description !== undefined;
28
+ const stableOnDismiss = useStableCallback(onDismiss);
29
+
30
+ return (
31
+ <SurfaceModal {...props} onDismiss={stableOnDismiss} interactionPolicy={interactionPolicy}>
32
+ <Box maxWidth={resolveDialogWidth(width)} style={styles.content}>
33
+ <Stack gap="m">
34
+ {hasHeader ? (
35
+ <Stack gap="xs">
36
+ {title !== undefined ? <Heading level={3}>{title}</Heading> : null}
37
+ {description !== undefined ? (
38
+ <Text emphasis="muted" variant="bodySmall">
39
+ {description}
40
+ </Text>
41
+ ) : null}
42
+ </Stack>
43
+ ) : null}
44
+ {children ? <Box>{children}</Box> : null}
45
+ {footer ? <Box pt="xs">{footer}</Box> : null}
46
+ </Stack>
47
+ </Box>
48
+ </SurfaceModal>
49
+ );
50
+ }
51
+
52
+ /*** Keeps the dismiss callback identity stable while always invoking the latest handler. */
53
+ function useStableCallback(callback: (() => void) | undefined): (() => void) | undefined {
54
+ const callbackRef = React.useRef(callback);
55
+
56
+ React.useEffect(() => {
57
+ callbackRef.current = callback;
58
+ }, [callback]);
59
+
60
+ return React.useCallback(() => {
61
+ callbackRef.current?.();
62
+ }, []);
63
+ }
64
+
65
+ const styles = StyleSheet.create({
66
+ content: {
67
+ alignSelf: 'center',
68
+ width: '100%',
69
+ },
70
+ });
@@ -0,0 +1,60 @@
1
+ import { CONTAINER_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';
2
+ import type { ZoraComponentMeta } from '../../metadata/types';
3
+
4
+ export const dialogMeta = {
5
+ name: 'Dialog',
6
+ category: 'component',
7
+ directManifestNode: true,
8
+ allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],
9
+ description: 'Modal dialog composition with title, description, content, and optional footer.',
10
+ blueprint: {
11
+ label: 'Dialog',
12
+ defaultProps: { closeOnBackdrop: true, visible: false, width: 'default' },
13
+ },
14
+ bindings: {
15
+ props: {
16
+ visible: {
17
+ label: 'Visible',
18
+ description: 'Whether the dialog is currently visible.',
19
+ value: { type: 'boolean' },
20
+ acceptsFallback: true,
21
+ acceptsTransforms: true,
22
+ },
23
+ },
24
+ events: {
25
+ dismiss: {
26
+ label: 'Dismiss',
27
+ description: 'Runs when the dialog requests dismissal.',
28
+ payload: { eventType: 'dialog.dismiss', fields: [] },
29
+ },
30
+ },
31
+ },
32
+ events: {
33
+ dismiss: { label: 'Dismiss', eventType: 'dialog.dismiss', payloadFields: [] },
34
+ },
35
+ slots: {
36
+ children: { label: 'Content', allowedChildren: [...CONTAINER_ALLOWED_CHILDREN] },
37
+ footer: {
38
+ label: 'Footer',
39
+ allowedChildren: ['Button', 'ButtonGroup', 'Stack', 'Toolbar'],
40
+ },
41
+ },
42
+ props: {
43
+ visible: { type: 'boolean', category: 'State', label: 'Visible', default: false },
44
+ title: { type: 'string', category: 'Content', label: 'Title' },
45
+ description: { type: 'string', category: 'Content', label: 'Description' },
46
+ closeOnBackdrop: {
47
+ type: 'boolean',
48
+ category: 'Behavior',
49
+ label: 'Close on backdrop',
50
+ default: true,
51
+ },
52
+ width: {
53
+ type: 'enum',
54
+ category: 'Layout',
55
+ label: 'Width',
56
+ enum: ['narrow', 'default', 'wide'],
57
+ default: 'default',
58
+ },
59
+ },
60
+ } as const satisfies ZoraComponentMeta;
@@ -0,0 +1,2 @@
1
+ export type { DialogProps } from '../../types/dialog';
2
+ export { Dialog } from './adapters/inbound/Dialog';
@@ -3,7 +3,14 @@ export const formFieldMeta = {
3
3
  name: 'FormField',
4
4
  category: 'component',
5
5
  directManifestNode: true,
6
- allowedChildren: ['Checkbox', 'CheckboxGroup', 'RadioGroup', 'TextInput'],
6
+ allowedChildren: [
7
+ 'Checkbox',
8
+ 'CheckboxGroup',
9
+ 'RadioGroup',
10
+ 'SearchInput',
11
+ 'Select',
12
+ 'TextInput',
13
+ ],
7
14
  blueprint: { label: 'Form field', defaultProps: { label: 'Label' } },
8
15
  bindings: {
9
16
  props: {
@@ -1,14 +1,16 @@
1
- import React from 'react';
1
+ import { withZoraThemeScope } from '../../../../../theme/withZoraThemeScope';
2
+ import type { SearchInputProps } from '../../../../../types/search-input';
3
+ import { TextInput, type TextInputTrailingAction } from '../../../text-input/public';
2
4
 
3
- import { TextInput, type TextInputTrailingAction } from '../../features/form/text-input/public';
4
- import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
5
- import type { SearchBarProps } from './types';
5
+ /*** Renders a search-focused text input with clear and submit behavior. */
6
+ export const SearchInput = withZoraThemeScope(SearchInputInner);
6
7
 
7
- function SearchBarInner({
8
+ /*** Connects search semantics to the shared ZORA TextInput control. */
9
+ function SearchInputInner({
8
10
  themeId: _themeId,
9
11
  mode: _mode,
10
12
  testID,
11
- value,
13
+ value = '',
12
14
  onValueChange,
13
15
  placeholder = 'Search',
14
16
  onSubmit,
@@ -18,9 +20,8 @@ function SearchBarInner({
18
20
  disabled,
19
21
  readOnly,
20
22
  interactionPolicy,
21
- }: SearchBarProps) {
23
+ }: SearchInputProps) {
22
24
  const passive = interactionPolicy === 'passive';
23
-
24
25
  const trailingAction: TextInputTrailingAction | undefined =
25
26
  clearable && value.length > 0
26
27
  ? {
@@ -28,8 +29,7 @@ function SearchBarInner({
28
29
  label: 'Clear search',
29
30
  onPress: () => {
30
31
  if (passive) return;
31
-
32
- onValueChange('');
32
+ onValueChange?.('');
33
33
  onClear?.();
34
34
  },
35
35
  }
@@ -52,8 +52,3 @@ function SearchBarInner({
52
52
  />
53
53
  );
54
54
  }
55
-
56
- /***
57
- * Search input with leading icon and optional trailing action.
58
- */
59
- export const SearchBar = withZoraThemeScope(SearchBarInner);
@@ -0,0 +1,2 @@
1
+ export type { SearchInputProps } from '../../../types/search-input';
2
+ export { SearchInput } from './adapters/inbound/SearchInput';
@@ -0,0 +1,68 @@
1
+ import type { ZoraComponentMeta } from '../../../metadata/types';
2
+
3
+ export const searchInputMeta = {
4
+ name: 'SearchInput',
5
+ category: 'component',
6
+ directManifestNode: true,
7
+ allowedChildren: [],
8
+ description: 'Search-focused text input with clear and submit events.',
9
+ blueprint: {
10
+ label: 'Search input',
11
+ defaultProps: { clearable: true, placeholder: 'Search', size: 'l', value: '' },
12
+ },
13
+ bindings: {
14
+ props: {
15
+ value: {
16
+ label: 'Value',
17
+ description: 'Current search query.',
18
+ value: { type: 'string' },
19
+ acceptsFallback: true,
20
+ acceptsTransforms: true,
21
+ },
22
+ },
23
+ events: {
24
+ valueChange: {
25
+ label: 'Value change',
26
+ description: 'Runs whenever the search query changes.',
27
+ payload: {
28
+ eventType: 'searchInput.valueChange',
29
+ fields: [{ path: 'value', type: 'string', label: 'Value' }],
30
+ },
31
+ },
32
+ submit: {
33
+ label: 'Submit',
34
+ description: 'Runs when the user submits the search query.',
35
+ payload: {
36
+ eventType: 'searchInput.submit',
37
+ fields: [{ path: 'value', type: 'string', label: 'Value' }],
38
+ },
39
+ },
40
+ clear: {
41
+ label: 'Clear',
42
+ description: 'Runs when the search query is cleared.',
43
+ payload: { eventType: 'searchInput.clear', fields: [] },
44
+ },
45
+ },
46
+ },
47
+ events: {
48
+ valueChange: {
49
+ label: 'Value change',
50
+ eventType: 'searchInput.valueChange',
51
+ payloadFields: [{ path: 'value', type: 'string', label: 'Value' }],
52
+ },
53
+ submit: {
54
+ label: 'Submit',
55
+ eventType: 'searchInput.submit',
56
+ payloadFields: [{ path: 'value', type: 'string', label: 'Value' }],
57
+ },
58
+ clear: { label: 'Clear', eventType: 'searchInput.clear', payloadFields: [] },
59
+ },
60
+ props: {
61
+ value: { type: 'string', category: 'Content', label: 'Value', default: '' },
62
+ placeholder: { type: 'string', category: 'Content', label: 'Placeholder', default: 'Search' },
63
+ clearable: { type: 'boolean', category: 'Behavior', label: 'Clearable', default: true },
64
+ size: { type: 'enum', category: 'Style', label: 'Size', enum: ['s', 'm', 'l'], default: 'l' },
65
+ disabled: { type: 'boolean', category: 'State', label: 'Disabled' },
66
+ readOnly: { type: 'boolean', category: 'State', label: 'Read only' },
67
+ },
68
+ } as const satisfies ZoraComponentMeta;
@@ -0,0 +1,78 @@
1
+ import React from 'react';
2
+ import { type ListRenderItemInfo, StyleSheet } from 'react-native';
3
+
4
+ import { withZoraThemeScope } from '../../../../../theme/withZoraThemeScope';
5
+ import type { SelectOption, SelectProps } from '../../../../../types/select';
6
+ import { BottomSheetFlatList, useBottomSheet } from '../../../../bottom-sheet/public';
7
+ import { SelectField } from '../../composition/SelectField';
8
+ import { SelectOptionRow } from '../../composition/SelectOptionRow';
9
+ import { SelectTrigger } from '../../composition/SelectTrigger';
10
+ import { useSelectController } from '../../composition/useSelectController';
11
+
12
+ const SELECT_SHEET_MAX_HEIGHT = 480;
13
+
14
+ /*** Renders Select with BottomSheetFlatList presentation on native platforms. */
15
+ export const Select = withZoraThemeScope(SelectInner);
16
+
17
+ /*** Connects shared Select state and controls to the native BottomSheet host. */
18
+ function SelectInner<TValue extends string = string>({
19
+ themeId: _themeId,
20
+ mode: _mode,
21
+ ...props
22
+ }: SelectProps<TValue>) {
23
+ const { dismiss, present } = useBottomSheet();
24
+ const { select, selectedOption, value } = useSelectController(props);
25
+ const passive = props.interactionPolicy === 'passive';
26
+ const { disabled, interactionPolicy, options, readOnly, testID } = props;
27
+ const listData = React.useMemo(() => [...options], [options]);
28
+
29
+ const handleSelect = React.useCallback(
30
+ (nextValue: TValue) => {
31
+ select(nextValue);
32
+ dismiss();
33
+ },
34
+ [dismiss, select],
35
+ );
36
+
37
+ const renderOption = React.useCallback(
38
+ ({ item }: ListRenderItemInfo<SelectOption<TValue>>) => (
39
+ <SelectOptionRow
40
+ interactionPolicy={interactionPolicy}
41
+ onSelect={handleSelect}
42
+ option={item}
43
+ selected={value === item.value}
44
+ testID={testID}
45
+ />
46
+ ),
47
+ [handleSelect, interactionPolicy, testID, value],
48
+ );
49
+
50
+ const openSelect = React.useCallback(() => {
51
+ if (disabled || readOnly || passive) return;
52
+
53
+ present({
54
+ contentMode: 'direct',
55
+ maxDynamicContentSize: SELECT_SHEET_MAX_HEIGHT,
56
+ content: (
57
+ <BottomSheetFlatList
58
+ contentContainerStyle={styles.listContent}
59
+ data={listData}
60
+ keyExtractor={(item) => item.value}
61
+ renderItem={renderOption}
62
+ />
63
+ ),
64
+ });
65
+ }, [disabled, listData, passive, present, readOnly, renderOption]);
66
+
67
+ return (
68
+ <SelectField props={props}>
69
+ <SelectTrigger displayLabel={selectedOption?.label} onPress={openSelect} props={props} />
70
+ </SelectField>
71
+ );
72
+ }
73
+
74
+ const styles = StyleSheet.create({
75
+ listContent: {
76
+ padding: 16,
77
+ },
78
+ });
@@ -0,0 +1 @@
1
+ export { Select } from './Select.web';
@@ -0,0 +1,63 @@
1
+ import { Popover } from '@ankhorage/surface';
2
+ import React from 'react';
3
+
4
+ import { withZoraThemeScope } from '../../../../../theme/withZoraThemeScope';
5
+ import type { SelectProps } from '../../../../../types/select';
6
+ import { Stack } from '../../../../layout/public';
7
+ import { Surface } from '../../../../surface/public';
8
+ import { SelectField } from '../../composition/SelectField';
9
+ import { SelectOptionRow } from '../../composition/SelectOptionRow';
10
+ import { SelectTrigger } from '../../composition/SelectTrigger';
11
+ import { useSelectController } from '../../composition/useSelectController';
12
+
13
+ /*** Renders Select with anchored Popover presentation on web. */
14
+ export const Select = withZoraThemeScope(SelectInner);
15
+
16
+ /*** Connects shared Select state and controls to the web Popover host. */
17
+ function SelectInner<TValue extends string = string>({
18
+ themeId: _themeId,
19
+ mode: _mode,
20
+ ...props
21
+ }: SelectProps<TValue>) {
22
+ const [open, setOpen] = React.useState(false);
23
+ const { select, selectedOption, value } = useSelectController(props);
24
+ const { interactionPolicy, options, testID } = props;
25
+
26
+ const selectAndClose = React.useCallback(
27
+ (nextValue: TValue) => {
28
+ select(nextValue);
29
+ setOpen(false);
30
+ },
31
+ [select],
32
+ );
33
+
34
+ return (
35
+ <SelectField props={props}>
36
+ <Popover
37
+ anchor={({ toggle }) => (
38
+ <SelectTrigger displayLabel={selectedOption?.label} onPress={toggle} props={props} />
39
+ )}
40
+ interactionPolicy={props.interactionPolicy}
41
+ onOpenChange={setOpen}
42
+ open={open}
43
+ placement="bottom-start"
44
+ testID={testID ? `${testID}-popover` : undefined}
45
+ >
46
+ <Surface variant="raised">
47
+ <Stack gap="xs" p="xs">
48
+ {options.map((option) => (
49
+ <SelectOptionRow
50
+ interactionPolicy={interactionPolicy}
51
+ key={option.value}
52
+ onSelect={selectAndClose}
53
+ option={option}
54
+ selected={value === option.value}
55
+ testID={testID}
56
+ />
57
+ ))}
58
+ </Stack>
59
+ </Surface>
60
+ </Popover>
61
+ </SelectField>
62
+ );
63
+ }
@@ -0,0 +1,27 @@
1
+ import { Field } from '@ankhorage/surface';
2
+ import type React from 'react';
3
+
4
+ import type { SelectProps } from '../../../../types/select';
5
+
6
+ /*** Wraps Select presentation in the canonical Surface form-field semantics. */
7
+ export function SelectField<TValue extends string>({ children, props }: SelectFieldProps<TValue>) {
8
+ return (
9
+ <Field
10
+ disabled={props.disabled}
11
+ errorText={props.errorText}
12
+ helperText={props.helperText}
13
+ invalid={props.invalid}
14
+ label={props.label}
15
+ readOnly={props.readOnly}
16
+ required={props.required}
17
+ testID={props.testID ? `${props.testID}-field` : undefined}
18
+ >
19
+ {children}
20
+ </Field>
21
+ );
22
+ }
23
+
24
+ interface SelectFieldProps<TValue extends string> {
25
+ children: React.ReactNode;
26
+ props: SelectProps<TValue>;
27
+ }
@@ -0,0 +1,36 @@
1
+ import type { SelectOption, SelectProps } from '../../../../types/select';
2
+ import { Button } from '../../../button/public';
3
+
4
+ const SELECTED_ICON = { name: 'checkmark' } as const;
5
+
6
+ /*** Renders one Select option with shared web/native selection semantics. */
7
+ export function SelectOptionRow<TValue extends string>({
8
+ interactionPolicy,
9
+ onSelect,
10
+ option,
11
+ selected,
12
+ testID,
13
+ }: SelectOptionRowProps<TValue>) {
14
+ return (
15
+ <Button
16
+ color={selected ? 'primary' : 'neutral'}
17
+ disabled={option.disabled}
18
+ fullWidth
19
+ interactionPolicy={interactionPolicy}
20
+ onPress={() => onSelect(option.value)}
21
+ testID={testID ? `${testID}-option-${option.value}` : undefined}
22
+ trailingIcon={selected ? SELECTED_ICON : undefined}
23
+ variant={selected ? 'soft' : 'ghost'}
24
+ >
25
+ {option.label}
26
+ </Button>
27
+ );
28
+ }
29
+
30
+ interface SelectOptionRowProps<TValue extends string> {
31
+ interactionPolicy: SelectProps<TValue>['interactionPolicy'];
32
+ onSelect: (value: TValue) => void;
33
+ option: SelectOption<TValue>;
34
+ selected: boolean;
35
+ testID: string | undefined;
36
+ }