@ankhorage/zora 28.0.0 → 28.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +1 -1
  3. package/dist/features/bottom-sheet/adapters/inbound/BottomSheet.js.map +1 -1
  4. package/dist/features/color/ColorHexField.d.ts +1 -1
  5. package/dist/features/color/ColorHexField.d.ts.map +1 -1
  6. package/dist/features/color/ColorHexField.js +30 -3
  7. package/dist/features/color/ColorHexField.js.map +1 -1
  8. package/dist/features/color/ColorPicker.d.ts.map +1 -1
  9. package/dist/features/color/ColorPicker.js +124 -63
  10. package/dist/features/color/ColorPicker.js.map +1 -1
  11. package/dist/features/color/ColorWheel.d.ts.map +1 -1
  12. package/dist/features/color/ColorWheel.js +33 -22
  13. package/dist/features/color/ColorWheel.js.map +1 -1
  14. package/dist/features/color/ColorWheelKeyboardProxy.d.ts +1 -0
  15. package/dist/features/color/ColorWheelKeyboardProxy.d.ts.map +1 -1
  16. package/dist/features/color/ColorWheelKeyboardProxy.js.map +1 -1
  17. package/dist/features/color/ColorWheelKeyboardProxy.web.d.ts +1 -1
  18. package/dist/features/color/ColorWheelKeyboardProxy.web.d.ts.map +1 -1
  19. package/dist/features/color/ColorWheelKeyboardProxy.web.js +4 -4
  20. package/dist/features/color/ColorWheelKeyboardProxy.web.js.map +1 -1
  21. package/dist/features/color/ColorWheelPointerProxy.d.ts +1 -0
  22. package/dist/features/color/ColorWheelPointerProxy.d.ts.map +1 -1
  23. package/dist/features/color/ColorWheelPointerProxy.js.map +1 -1
  24. package/dist/features/color/ColorWheelPointerProxy.native.d.ts +3 -2
  25. package/dist/features/color/ColorWheelPointerProxy.native.d.ts.map +1 -1
  26. package/dist/features/color/ColorWheelPointerProxy.native.js +12 -3
  27. package/dist/features/color/ColorWheelPointerProxy.native.js.map +1 -1
  28. package/dist/features/color/ColorWheelPointerProxy.web.d.ts +1 -1
  29. package/dist/features/color/ColorWheelPointerProxy.web.d.ts.map +1 -1
  30. package/dist/features/color/ColorWheelPointerProxy.web.js +1 -1
  31. package/dist/features/color/ColorWheelPointerProxy.web.js.map +1 -1
  32. package/dist/features/color/resolveColorPickerGeometry.d.ts +31 -0
  33. package/dist/features/color/resolveColorPickerGeometry.d.ts.map +1 -0
  34. package/dist/features/color/resolveColorPickerGeometry.js +94 -0
  35. package/dist/features/color/resolveColorPickerGeometry.js.map +1 -0
  36. package/dist/features/color/utils/resolveWheelColor.d.ts +2 -2
  37. package/dist/features/color/utils/resolveWheelColor.d.ts.map +1 -1
  38. package/dist/features/color/utils/resolveWheelColor.js +2 -3
  39. package/dist/features/color/utils/resolveWheelColor.js.map +1 -1
  40. package/dist/features/form/select/adapters/inbound/Select.native.js.map +1 -1
  41. package/dist/features/form/select/composition/SelectTrigger.d.ts.map +1 -1
  42. package/dist/features/form/select/composition/SelectTrigger.js +2 -2
  43. package/dist/features/form/select/composition/SelectTrigger.js.map +1 -1
  44. package/dist/index.d.ts +2 -0
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +1 -0
  47. package/dist/index.js.map +1 -1
  48. package/dist/types/color.d.ts +9 -1
  49. package/dist/types/color.d.ts.map +1 -1
  50. package/dist/types/color.js.map +1 -1
  51. package/dist/types/select.d.ts +2 -0
  52. package/dist/types/select.d.ts.map +1 -1
  53. package/dist/types/select.js.map +1 -1
  54. package/package.json +5 -5
  55. package/src/features/bottom-sheet/adapters/inbound/BottomSheet.tsx +1 -1
  56. package/src/features/color/ColorHexField.tsx +67 -21
  57. package/src/features/color/ColorPicker.layout.test.tsx +19 -10
  58. package/src/features/color/ColorPicker.tsx +319 -115
  59. package/src/features/color/ColorWheel.tsx +53 -51
  60. package/src/features/color/ColorWheelKeyboardProxy.tsx +1 -0
  61. package/src/features/color/ColorWheelKeyboardProxy.web.tsx +4 -3
  62. package/src/features/color/ColorWheelPointerProxy.native.tsx +25 -3
  63. package/src/features/color/ColorWheelPointerProxy.tsx +1 -0
  64. package/src/features/color/ColorWheelPointerProxy.web.tsx +1 -0
  65. package/src/features/color/resolveColorPickerGeometry.test.ts +43 -0
  66. package/src/features/color/resolveColorPickerGeometry.ts +116 -0
  67. package/src/features/color/utils/resolveWheelColor.ts +2 -3
  68. package/src/features/form/select/adapters/inbound/Select.native.tsx +1 -1
  69. package/src/features/form/select/composition/SelectTrigger.tsx +2 -1
  70. package/src/index.ts +6 -0
  71. package/src/types/color.ts +9 -1
  72. package/src/types/select.ts +2 -0
  73. package/web-dist/chunks/{Accordion-sn241nek.js → Accordion-01bsg7zt.js} +5 -5
  74. package/web-dist/chunks/{Accordion-jara9sqj.js → Accordion-01zvarrn.js} +8 -9
  75. package/web-dist/chunks/{Accordion-dxh9yn4f.js → Accordion-0dj1r7w3.js} +1 -1
  76. package/web-dist/chunks/{Accordion-nkppqfz4.js → Accordion-0xaq2k2h.js} +8 -8
  77. package/web-dist/chunks/{Accordion-3t2936t6.js → Accordion-15sxxjym.js} +4 -5
  78. package/web-dist/chunks/{Accordion-eq27a9ms.js → Accordion-1fz55hk4.js} +1 -1
  79. package/web-dist/chunks/{Accordion-q697hacs.js → Accordion-22cda3h5.js} +7 -8
  80. package/web-dist/chunks/{Accordion-3ar6p84m.js → Accordion-27yg9ktv.js} +3 -3
  81. package/web-dist/chunks/{Accordion-94vndckf.js → Accordion-34b3rwbc.js} +6 -8
  82. package/web-dist/chunks/{Accordion-8wm25z0h.js → Accordion-3zzzw7a8.js} +2 -2
  83. package/web-dist/chunks/{Accordion-00h253nv.js → Accordion-46n609yq.js} +13 -12
  84. package/web-dist/chunks/{Accordion-0t53jhx1.js → Accordion-4zb6dcys.js} +4 -7
  85. package/web-dist/chunks/{Accordion-dfv6p6gt.js → Accordion-5cjhz94e.js} +5 -5
  86. package/web-dist/chunks/{Accordion-5wx67nhg.js → Accordion-5mga7hty.js} +2 -2
  87. package/web-dist/chunks/{Accordion-kcx57mk5.js → Accordion-76b0qz8y.js} +24 -22
  88. package/web-dist/chunks/{Accordion-5adv6dv1.js → Accordion-78tknqmc.js} +4 -4
  89. package/web-dist/chunks/{Accordion-81rx3bh0.js → Accordion-7bd6zq4s.js} +9 -9
  90. package/web-dist/chunks/{Accordion-7ppf31tg.js → Accordion-8c4w7366.js} +5 -5
  91. package/web-dist/chunks/{Accordion-1b2t4k36.js → Accordion-8t6vh482.js} +3 -4
  92. package/web-dist/chunks/{Accordion-7d0e5vhe.js → Accordion-9d38cgqj.js} +87 -91
  93. package/web-dist/chunks/{Accordion-6wcbzxzb.js → Accordion-9k7ktksc.js} +212 -215
  94. package/web-dist/chunks/{Accordion-1dv8wytq.js → Accordion-afpjg1d6.js} +3 -4
  95. package/web-dist/chunks/{Accordion-j6hgazmz.js → Accordion-b1y5mjac.js} +1 -1
  96. package/web-dist/chunks/{Accordion-re4r47xn.js → Accordion-b8w0f8s0.js} +6 -7
  97. package/web-dist/chunks/{Accordion-9fhsfynt.js → Accordion-bexwrnfh.js} +3 -4
  98. package/web-dist/chunks/Accordion-chdbfcm6.js +93 -0
  99. package/web-dist/chunks/{Accordion-wbmzvfaw.js → Accordion-d405whfb.js} +2 -2
  100. package/web-dist/chunks/{Accordion-z9yw0xy9.js → Accordion-de8srt4x.js} +8 -8
  101. package/web-dist/chunks/{Accordion-dpkp0y4p.js → Accordion-epv5yhch.js} +3 -3
  102. package/web-dist/chunks/{Accordion-d4dp5ryp.js → Accordion-f4919ghm.js} +4 -4
  103. package/web-dist/chunks/{Accordion-0gae3kzr.js → Accordion-f8a49gy8.js} +19 -22
  104. package/web-dist/chunks/{Accordion-3s7zeagv.js → Accordion-fdzyyqe9.js} +1 -1
  105. package/web-dist/chunks/{Accordion-rev9ssd4.js → Accordion-gnxmybxx.js} +490 -205
  106. package/web-dist/chunks/{Accordion-36674tfw.js → Accordion-h1q243zq.js} +13 -11
  107. package/web-dist/chunks/{Accordion-dtt4qkrb.js → Accordion-h63c9k9k.js} +1 -1
  108. package/web-dist/chunks/{Accordion-43gp801f.js → Accordion-hdyzyw8q.js} +3 -3
  109. package/web-dist/chunks/{Accordion-phcp8d5v.js → Accordion-htvmkx8s.js} +118 -118
  110. package/web-dist/chunks/{Accordion-b41rev86.js → Accordion-jmxe6kw0.js} +9 -11
  111. package/web-dist/chunks/{Accordion-wpj8pd40.js → Accordion-kcm6jcpp.js} +2 -3
  112. package/web-dist/chunks/{Accordion-fcczvwgg.js → Accordion-mrstcjcm.js} +1 -0
  113. package/web-dist/chunks/{Accordion-6225tr9r.js → Accordion-mx7nkg85.js} +1 -1
  114. package/web-dist/chunks/{Accordion-pm2f2j32.js → Accordion-pdjhezmz.js} +2 -2
  115. package/web-dist/chunks/{Accordion-hbkzy0bg.js → Accordion-q046ws5p.js} +6 -6
  116. package/web-dist/chunks/{Accordion-tppk4vwt.js → Accordion-q11svb96.js} +19 -19
  117. package/web-dist/chunks/{Accordion-36j1fw8r.js → Accordion-qkkeyr18.js} +6 -8
  118. package/web-dist/chunks/{Accordion-c8mmgjtj.js → Accordion-qrt9xz0h.js} +7 -8
  119. package/web-dist/chunks/{Accordion-z1cq2mnx.js → Accordion-qsppnx7g.js} +10 -11
  120. package/web-dist/chunks/{Accordion-neg1cgeh.js → Accordion-rhjddvkh.js} +1 -2
  121. package/web-dist/chunks/{Accordion-238zba4h.js → Accordion-rtamzg9j.js} +47 -28
  122. package/web-dist/chunks/{Accordion-zzymcpty.js → Accordion-sfvqf4fz.js} +134 -132
  123. package/web-dist/chunks/{Accordion-ah1d9b6z.js → Accordion-sh79sr5g.js} +5 -5
  124. package/web-dist/chunks/{Accordion-wcw153f0.js → Accordion-t9n4ey2r.js} +5 -3
  125. package/web-dist/chunks/{Accordion-zte416jw.js → Accordion-tk8zf9ff.js} +3 -3
  126. package/web-dist/chunks/{Accordion-zypyr9xw.js → Accordion-tnyqv1xv.js} +296 -305
  127. package/web-dist/chunks/{Accordion-52s4t1aq.js → Accordion-v6vhyv31.js} +95 -165
  128. package/web-dist/chunks/{Accordion-m5baah44.js → Accordion-vkqqktc5.js} +3 -3
  129. package/web-dist/chunks/{Accordion-ytxgphds.js → Accordion-vzq344av.js} +2 -3
  130. package/web-dist/chunks/{Accordion-d2kg4729.js → Accordion-wb9pmykz.js} +5 -6
  131. package/web-dist/chunks/{Accordion-6r1e7k5r.js → Accordion-ww4f12ty.js} +1 -1
  132. package/web-dist/chunks/{Accordion-ec1tt3be.js → Accordion-xb9zhdhp.js} +42 -45
  133. package/web-dist/chunks/{Accordion-knb3e18b.js → Accordion-xfkg7dcw.js} +4 -5
  134. package/web-dist/chunks/{Accordion-6ec4gxv2.js → Accordion-xzaa9s7f.js} +12 -23
  135. package/web-dist/chunks/{Accordion-epwpdegg.js → Accordion-yrac5a7m.js} +1 -1
  136. package/web-dist/chunks/{zip-reader-f0yphjb9.js → zip-reader-5xrcmjr8.js} +1 -1
  137. package/web-dist/components/accordion/Accordion.js +11 -11
  138. package/web-dist/components/accordion-item/AccordionItem.js +11 -11
  139. package/web-dist/components/activity-indicator/ActivityIndicator.js +4 -4
  140. package/web-dist/components/app-bar/AppBar.js +18 -18
  141. package/web-dist/components/app-header/AppHeader.js +18 -18
  142. package/web-dist/components/app-shell/AppShell.js +5 -5
  143. package/web-dist/components/auth-screen/AuthScreen.js +21 -21
  144. package/web-dist/components/avatar/Avatar.js +11 -11
  145. package/web-dist/components/avatar-group/AvatarGroup.js +11 -11
  146. package/web-dist/components/badge/Badge.js +6 -6
  147. package/web-dist/components/barcode-scanner-view/BarcodeScannerView.js +19 -19
  148. package/web-dist/components/bottom-sheet/BottomSheet.js +10 -7
  149. package/web-dist/components/bottom-sheet-flat-list/BottomSheetFlatList.js +10 -7
  150. package/web-dist/components/bottom-sheet-scroll-view/BottomSheetScrollView.js +10 -7
  151. package/web-dist/components/bottom-sheet-section-list/BottomSheetSectionList.js +10 -7
  152. package/web-dist/components/bottom-sheet-view/BottomSheetView.js +10 -7
  153. package/web-dist/components/bottom-sheet-virtualized-list/BottomSheetVirtualizedList.js +10 -7
  154. package/web-dist/components/breadcrumbs/Breadcrumbs.js +13 -13
  155. package/web-dist/components/button/Button.js +11 -11
  156. package/web-dist/components/button-group/ButtonGroup.js +11 -11
  157. package/web-dist/components/calendar/Calendar.js +14 -14
  158. package/web-dist/components/camera-permission-view/CameraPermissionView.js +19 -19
  159. package/web-dist/components/card/Card.js +18 -18
  160. package/web-dist/components/card-back/CardBack.js +5 -5
  161. package/web-dist/components/card-hand/CardHand.js +5 -5
  162. package/web-dist/components/carousel/Carousel.js +2 -2
  163. package/web-dist/components/chat-list-item/ChatListItem.js +15 -15
  164. package/web-dist/components/checkbox/Checkbox.js +11 -11
  165. package/web-dist/components/checkbox-group/CheckboxGroup.js +11 -11
  166. package/web-dist/components/chess-board/ChessBoard.js +6 -6
  167. package/web-dist/components/chip/Chip.js +12 -12
  168. package/web-dist/components/chip-group/ChipGroup.js +12 -12
  169. package/web-dist/components/collection-editor/CollectionEditor.js +18 -18
  170. package/web-dist/components/color-hue-scale/ColorHueScale.js +27 -27
  171. package/web-dist/components/color-picker/ColorPicker.js +27 -27
  172. package/web-dist/components/color-picker/ColorPicker.types-0.d.ts +9 -1
  173. package/web-dist/components/color-tone/ColorTone.js +27 -27
  174. package/web-dist/components/color-wheel/ColorWheel.js +27 -27
  175. package/web-dist/components/color-wheel/ColorWheel.types-0.d.ts +8 -0
  176. package/web-dist/components/content-rail/ContentRail.js +12 -12
  177. package/web-dist/components/data-table/DataTable.js +26 -26
  178. package/web-dist/components/date-picker/DatePicker.js +20 -20
  179. package/web-dist/components/dialog/Dialog.js +11 -11
  180. package/web-dist/components/divider/Divider.js +5 -5
  181. package/web-dist/components/empty-state/EmptyState.js +19 -19
  182. package/web-dist/components/explorer/Explorer.js +13 -13
  183. package/web-dist/components/field/Field.js +11 -11
  184. package/web-dist/components/file-explorer/FileExplorer.js +13 -13
  185. package/web-dist/components/flat-list/FlatList.js +12 -12
  186. package/web-dist/components/forgot-password-form/ForgotPasswordForm.js +21 -21
  187. package/web-dist/components/form/Form.js +15 -15
  188. package/web-dist/components/form-actions/FormActions.js +15 -15
  189. package/web-dist/components/form-error/FormError.js +15 -15
  190. package/web-dist/components/game/Game.js +7 -6
  191. package/web-dist/components/game-entity/GameEntity.js +7 -6
  192. package/web-dist/components/game-field/GameField.js +7 -6
  193. package/web-dist/components/game-input-zone/GameInputZone.js +7 -6
  194. package/web-dist/components/game-measurement-probe/GameMeasurementProbe.js +7 -6
  195. package/web-dist/components/game-overlay/GameOverlay.js +7 -6
  196. package/web-dist/components/gradient/Gradient.js +6 -6
  197. package/web-dist/components/gradient-renderer-provider/GradientRendererProvider.js +6 -6
  198. package/web-dist/components/graph-view/GraphView.js +2 -2
  199. package/web-dist/components/grid/Grid.js +5 -5
  200. package/web-dist/components/grid-interactions/GridInteractions.js +1 -1
  201. package/web-dist/components/grid-line-overlay/GridLineOverlay.js +5 -5
  202. package/web-dist/components/grid-ruler/GridRuler.js +5 -5
  203. package/web-dist/components/grid-view/GridView.js +1 -1
  204. package/web-dist/components/heading/Heading.js +6 -6
  205. package/web-dist/components/hero/Hero.js +18 -18
  206. package/web-dist/components/icon/Icon.js +5 -5
  207. package/web-dist/components/icon-button/IconButton.js +11 -11
  208. package/web-dist/components/image/Image.js +9 -9
  209. package/web-dist/components/keyboard-avoiding-view/KeyboardAvoidingView.js +4 -4
  210. package/web-dist/components/list/List.js +12 -12
  211. package/web-dist/components/list-item/ListItem.js +12 -12
  212. package/web-dist/components/list-section/ListSection.js +12 -12
  213. package/web-dist/components/master-detail/MasterDetail.js +5 -5
  214. package/web-dist/components/matrix-grid/MatrixGrid.js +9 -9
  215. package/web-dist/components/media-card/MediaCard.js +18 -18
  216. package/web-dist/components/media-explorer/MediaExplorer.js +13 -13
  217. package/web-dist/components/message-bubble/MessageBubble.js +15 -15
  218. package/web-dist/components/metric-card/MetricCard.js +18 -18
  219. package/web-dist/components/missing-element/MissingElement.js +10 -10
  220. package/web-dist/components/o-auth-provider-button/OAuthProviderButton.js +21 -21
  221. package/web-dist/components/o-auth-provider-list/OAuthProviderList.js +21 -21
  222. package/web-dist/components/opening-book/OpeningBook.js +6 -6
  223. package/web-dist/components/otp-form/OtpForm.js +21 -21
  224. package/web-dist/components/pagination/Pagination.js +12 -12
  225. package/web-dist/components/palette-item/PaletteItem.js +18 -18
  226. package/web-dist/components/playing-card/PlayingCard.js +5 -5
  227. package/web-dist/components/poker-training-table/PokerTrainingTable.js +5 -5
  228. package/web-dist/components/popover-menu/PopoverMenu.js +13 -13
  229. package/web-dist/components/post-card/PostCard.js +18 -18
  230. package/web-dist/components/product-card/ProductCard.js +18 -18
  231. package/web-dist/components/progress/Progress.js +9 -9
  232. package/web-dist/components/progress-ring/ProgressRing.js +9 -9
  233. package/web-dist/components/radio/Radio.js +13 -13
  234. package/web-dist/components/radio-group/RadioGroup.js +13 -13
  235. package/web-dist/components/rating/Rating.js +8 -8
  236. package/web-dist/components/reader/Reader.js +34 -34
  237. package/web-dist/components/scan-overlay/ScanOverlay.js +19 -19
  238. package/web-dist/components/screen/Screen.js +5 -5
  239. package/web-dist/components/screen-section/ScreenSection.js +9 -9
  240. package/web-dist/components/scroll-view/ScrollView.js +5 -5
  241. package/web-dist/components/search-input/SearchInput.js +13 -13
  242. package/web-dist/components/section-header/SectionHeader.js +9 -9
  243. package/web-dist/components/section-list/SectionList.js +12 -12
  244. package/web-dist/components/select/Select.js +20 -20
  245. package/web-dist/components/select/Select.types-0.d.ts +2 -0
  246. package/web-dist/components/selectable-item/SelectableItem.js +4 -4
  247. package/web-dist/components/selection-provider/SelectionProvider.js +4 -4
  248. package/web-dist/components/sign-in-form/SignInForm.js +21 -21
  249. package/web-dist/components/sign-up-form/SignUpForm.js +21 -21
  250. package/web-dist/components/skeleton/Skeleton.js +21 -21
  251. package/web-dist/components/skeleton-card/SkeletonCard.js +21 -21
  252. package/web-dist/components/skeleton-list/SkeletonList.js +21 -21
  253. package/web-dist/components/skeleton-text/SkeletonText.js +21 -21
  254. package/web-dist/components/spatial-grid/SpatialGrid.js +1 -1
  255. package/web-dist/components/surface/Surface.js +6 -6
  256. package/web-dist/components/switch/Switch.js +8 -8
  257. package/web-dist/components/tab/Tab.js +6 -6
  258. package/web-dist/components/tab-list/TabList.js +6 -6
  259. package/web-dist/components/tab-panel/TabPanel.js +6 -6
  260. package/web-dist/components/tabletop-table/TabletopTable.js +5 -5
  261. package/web-dist/components/tabs/Tabs.js +6 -6
  262. package/web-dist/components/text/Text.js +6 -6
  263. package/web-dist/components/text-input/TextInput.js +13 -13
  264. package/web-dist/components/theme-mode-toggle/ThemeModeToggle.js +11 -11
  265. package/web-dist/components/tile-grid/TileGrid.js +1 -1
  266. package/web-dist/components/time-grid/TimeGrid.js +2 -2
  267. package/web-dist/components/time-picker/TimePicker.js +18 -18
  268. package/web-dist/components/timeline/Timeline.js +11 -11
  269. package/web-dist/components/toast/Toast.js +9 -9
  270. package/web-dist/components/toast-provider/ToastProvider.js +9 -9
  271. package/web-dist/components/toolbar/Toolbar.js +18 -18
  272. package/web-dist/components/tree-item/TreeItem.js +17 -17
  273. package/web-dist/components/tree-view/TreeView.js +1 -1
  274. package/web-dist/components/uploader/Uploader.js +23 -23
  275. package/web-dist/components/view/View.js +5 -5
  276. package/web-dist/manifest.json +1897 -1873
  277. package/web-dist/runtime/ZoraProvider.js +9 -9
  278. package/web-dist/chunks/{Accordion-vgkvvdvg.js → Accordion-ykk40jz9.js} +36 -36
@@ -12,7 +12,7 @@ export function SelectTrigger({ displayLabel, leadingMedia, onPress, props, }) {
12
12
  const media = leadingMedia ?? props.leadingMedia;
13
13
  if (media) {
14
14
  return (<Pressable accessibilityLabel={displayLabel ?? props.placeholder ?? 'Select'} disabled={props.disabled} interactionPolicy={props.interactionPolicy} onPress={props.readOnly ? undefined : onPress} style={{ alignSelf: 'stretch' }} testID={props.testID ? `${props.testID}-trigger` : undefined}>
15
- <View align="center" bg={props.invalid ? theme.semantics.error.softBg : theme.semantics.neutral.surface} borderColor={props.invalid ? theme.semantics.error.base : theme.semantics.neutral.divider} borderWidth={1} direction="row" gap="s" minHeight={44} px="m" radius="m">
15
+ <View align="center" bg={props.invalid ? theme.semantics.error.softBg : theme.semantics.neutral.surface} borderColor={props.invalid ? theme.semantics.error.base : theme.semantics.neutral.divider} borderWidth={1} direction="row" gap="s" minHeight={props.compact ? 36 : 44} px="m" radius="m">
16
16
  <Image alt="" height={28} radius="s" source={media} width={28}/>
17
17
  <View flex={1}>
18
18
  <Text emphasis={displayLabel ? 'default' : 'muted'} numberOfLines={1} variant="label" weight={props.labelWeight ?? 'semiBold'}>
@@ -23,7 +23,7 @@ export function SelectTrigger({ displayLabel, leadingMedia, onPress, props, }) {
23
23
  </View>
24
24
  </Pressable>);
25
25
  }
26
- return (<Button color={props.invalid ? 'danger' : 'neutral'} disabled={props.disabled} fullWidth interactionPolicy={props.interactionPolicy} leadingIcon={props.leadingIcon} labelWeight={props.labelWeight ?? 'semiBold'} onPress={props.readOnly ? undefined : onPress} testID={props.testID ? `${props.testID}-trigger` : undefined} trailingIcon={SELECT_CHEVRON_ICON} variant="outline">
26
+ return (<Button color={props.invalid ? 'danger' : 'neutral'} disabled={props.disabled} fullWidth interactionPolicy={props.interactionPolicy} leadingIcon={props.leadingIcon} labelWeight={props.labelWeight ?? 'semiBold'} onPress={props.readOnly ? undefined : onPress} size={props.compact ? 's' : undefined} testID={props.testID ? `${props.testID}-trigger` : undefined} trailingIcon={SELECT_CHEVRON_ICON} variant="outline">
27
27
  {displayLabel ?? props.placeholder ?? 'Select'}
28
28
  </Button>);
29
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SelectTrigger.js","sourceRoot":"","sources":["../../../../../src/features/form/select/composition/SelectTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,uBA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,CAAC,iBAAiB,CAAC,CAC3C,WAAW,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAC/B,WAAW,CAAC,CAAC,KAAK,CAAC,WAAW,IAAI,UAAU,CAAC,CAC7C,OAAO,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAC9C,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAC7D,YAAY,CAAC,CAAC,mBAAmB,CAAC,CAClC,OAAO,CAAC,SAAS,CAEjB;MAAA,CAAC,YAAY,IAAI,KAAK,CAAC,WAAW,IAAI,QAAQ,CAChD;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC","sourcesContent":["import { Pressable } from '@ankhorage/surface';\n\nimport type { SelectProps } from '../../../../types/select';\nimport { Button } from '../../../button/public';\nimport { Icon } from '../../../icon/public';\nimport { Image } from '../../../image/public';\nimport { View } from '../../../layout/public';\nimport { useZoraTheme } from '../../../theme/composition/useZoraTheme';\nimport { Text } from '../../../typography/public';\n\nconst SELECT_CHEVRON_ICON = { name: 'chevron-down' } as const;\n\n/*** Renders the shared Select trigger with the resolved option label or placeholder. */\nexport function SelectTrigger<TValue extends string>({\n displayLabel,\n leadingMedia,\n onPress,\n props,\n}: SelectTriggerProps<TValue>) {\n const { theme } = useZoraTheme();\n const media = leadingMedia ?? props.leadingMedia;\n\n if (media) {\n return (\n <Pressable\n accessibilityLabel={displayLabel ?? props.placeholder ?? 'Select'}\n disabled={props.disabled}\n interactionPolicy={props.interactionPolicy}\n onPress={props.readOnly ? undefined : onPress}\n style={{ alignSelf: 'stretch' }}\n testID={props.testID ? `${props.testID}-trigger` : undefined}\n >\n <View\n align=\"center\"\n bg={props.invalid ? theme.semantics.error.softBg : theme.semantics.neutral.surface}\n borderColor={props.invalid ? theme.semantics.error.base : theme.semantics.neutral.divider}\n borderWidth={1}\n direction=\"row\"\n gap=\"s\"\n minHeight={44}\n px=\"m\"\n radius=\"m\"\n >\n <Image alt=\"\" height={28} radius=\"s\" source={media} width={28} />\n <View flex={1}>\n <Text\n emphasis={displayLabel ? 'default' : 'muted'}\n numberOfLines={1}\n variant=\"label\"\n weight={props.labelWeight ?? 'semiBold'}\n >\n {displayLabel ?? props.placeholder ?? 'Select'}\n </Text>\n </View>\n <Icon name=\"chevron-down\" size={18} />\n </View>\n </Pressable>\n );\n }\n\n return (\n <Button\n color={props.invalid ? 'danger' : 'neutral'}\n disabled={props.disabled}\n fullWidth\n interactionPolicy={props.interactionPolicy}\n leadingIcon={props.leadingIcon}\n labelWeight={props.labelWeight ?? 'semiBold'}\n onPress={props.readOnly ? undefined : onPress}\n testID={props.testID ? `${props.testID}-trigger` : undefined}\n trailingIcon={SELECT_CHEVRON_ICON}\n variant=\"outline\"\n >\n {displayLabel ?? props.placeholder ?? 'Select'}\n </Button>\n );\n}\n\ninterface SelectTriggerProps<TValue extends string> {\n displayLabel: string | undefined;\n leadingMedia: SelectProps<TValue>['leadingMedia'];\n onPress: () => void;\n props: SelectProps<TValue>;\n}\n"]}
1
+ {"version":3,"file":"SelectTrigger.js","sourceRoot":"","sources":["../../../../../src/features/form/select/composition/SelectTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD,MAAM,mBAAmB,GAAG,EAAE,IA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,OAAO,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAC9C,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CACtC,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAC7D,YAAY,CAAC,CAAC,mBAAmB,CAAC,CAClC,OAAO,CAAC,SAAS,CAEjB;MAAA,CAAC,YAAY,IAAI,KAAK,CAAC,WAAW,IAAI,QAAQ,CAChD;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC","sourcesContent":["import { Pressable } from '@ankhorage/surface';\n\nimport type { SelectProps } from '../../../../types/select';\nimport { Button } from '../../../button/public';\nimport { Icon } from '../../../icon/public';\nimport { Image } from '../../../image/public';\nimport { View } from '../../../layout/public';\nimport { useZoraTheme } from '../../../theme/composition/useZoraTheme';\nimport { Text } from '../../../typography/public';\n\nconst SELECT_CHEVRON_ICON = { name: 'chevron-down' } as const;\n\n/*** Renders the shared Select trigger with the resolved option label or placeholder. */\nexport function SelectTrigger<TValue extends string>({\n displayLabel,\n leadingMedia,\n onPress,\n props,\n}: SelectTriggerProps<TValue>) {\n const { theme } = useZoraTheme();\n const media = leadingMedia ?? props.leadingMedia;\n\n if (media) {\n return (\n <Pressable\n accessibilityLabel={displayLabel ?? props.placeholder ?? 'Select'}\n disabled={props.disabled}\n interactionPolicy={props.interactionPolicy}\n onPress={props.readOnly ? undefined : onPress}\n style={{ alignSelf: 'stretch' }}\n testID={props.testID ? `${props.testID}-trigger` : undefined}\n >\n <View\n align=\"center\"\n bg={props.invalid ? theme.semantics.error.softBg : theme.semantics.neutral.surface}\n borderColor={props.invalid ? theme.semantics.error.base : theme.semantics.neutral.divider}\n borderWidth={1}\n direction=\"row\"\n gap=\"s\"\n minHeight={props.compact ? 36 : 44}\n px=\"m\"\n radius=\"m\"\n >\n <Image alt=\"\" height={28} radius=\"s\" source={media} width={28} />\n <View flex={1}>\n <Text\n emphasis={displayLabel ? 'default' : 'muted'}\n numberOfLines={1}\n variant=\"label\"\n weight={props.labelWeight ?? 'semiBold'}\n >\n {displayLabel ?? props.placeholder ?? 'Select'}\n </Text>\n </View>\n <Icon name=\"chevron-down\" size={18} />\n </View>\n </Pressable>\n );\n }\n\n return (\n <Button\n color={props.invalid ? 'danger' : 'neutral'}\n disabled={props.disabled}\n fullWidth\n interactionPolicy={props.interactionPolicy}\n leadingIcon={props.leadingIcon}\n labelWeight={props.labelWeight ?? 'semiBold'}\n onPress={props.readOnly ? undefined : onPress}\n size={props.compact ? 's' : undefined}\n testID={props.testID ? `${props.testID}-trigger` : undefined}\n trailingIcon={SELECT_CHEVRON_ICON}\n variant=\"outline\"\n >\n {displayLabel ?? props.placeholder ?? 'Select'}\n </Button>\n );\n}\n\ninterface SelectTriggerProps<TValue extends string> {\n displayLabel: string | undefined;\n leadingMedia: SelectProps<TValue>['leadingMedia'];\n onPress: () => void;\n props: SelectProps<TValue>;\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -4,6 +4,8 @@ export type { CarouselProps, CarouselSlide, CarouselTransition } from './feature
4
4
  export { Carousel } from './features/carousel/public';
5
5
  export type { ColorHueScaleProps, ColorPickerProps, ColorPickerTab, ColorToneDefinition, ColorToneProps, ColorToneSelection, ColorToneTarget, ColorWheelProps, ColorWheelSelection, } from './features/color/public';
6
6
  export { ColorHueScale, ColorPicker, ColorTone, ColorWheel } from './features/color/public';
7
+ export type { GradientRenderer, GradientRendererProps, GradientRendererProviderProps, } from './features/gradient/public';
8
+ export { GradientRendererProvider } from './features/gradient/public';
7
9
  export type { MasterDetailActivePane, MasterDetailDesktopMode, MasterDetailMasterWidth, MasterDetailProps, } from './features/master-detail/public';
8
10
  export { MasterDetail } from './features/master-detail/public';
9
11
  export type { ReaderColorScheme, ReaderDocumentFormat, ReaderErrorCode, ReaderErrorEvent, ReaderExternalLinkEvent, ReaderLineHeight, ReaderLocationChangeEvent, ReaderNavigationTrigger, ReaderProps, ReaderResolvedSource, ReaderStatus, } from './features/reader/public';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,4BAA4B,EAC5B,kCAAkC,EAClC,6BAA6B,EAC7B,sCAAsC,EACtC,8BAA8B,EAC9B,2BAA2B,EAC3B,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,6BAA6B,EAC7B,iCAAiC,EACjC,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACnG,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC5F,YAAY,EACV,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,YAAY,EACV,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACvB,gBAAgB,EAChB,yBAAyB,EACzB,uBAAuB,EACvB,WAAW,EACX,oBAAoB,EACpB,YAAY,GACb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,M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,uBAAuB,EACvB,WAAW,EACX,oBAAoB,EACpB,YAAY,GACb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,cAAc,cAAc,CAAC;AAC7B,YAAY,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export { AuthoringBindingEditorAdapter, AuthoringPropertyInspectorAdapter, AuthoringSelectionAdapter, ThemeEditorAdapter, } from './authoring';
2
2
  export { Carousel } from './features/carousel/public';
3
3
  export { ColorHueScale, ColorPicker, ColorTone, ColorWheel } from './features/color/public';
4
+ export { GradientRendererProvider } from './features/gradient/public';
4
5
  export { MasterDetail } from './features/master-detail/public';
5
6
  export { Reader, resolveReaderProgress } from './features/reader/public';
6
7
  export { ZORA_COMPONENT_REGISTRY } from './features/registry/public';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,6BAA6B,EAC7B,iCAAiC,EACjC,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAYtD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAO5F,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAc/D,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,cAAc,cAAc,CAAC","sourcesContent":["export type {\n AuthoringBindingControlState,\n AuthoringBindingEditorAdapterProps,\n AuthoringPropertyControlState,\n AuthoringPropertyInspectorAdapterProps,\n AuthoringSelectionAdapterProps,\n AuthoringSelectionItemState,\n ThemeEditorAdapterProps,\n ThemeRecipeFieldControlState,\n} from './authoring';\nexport {\n AuthoringBindingEditorAdapter,\n AuthoringPropertyInspectorAdapter,\n AuthoringSelectionAdapter,\n ThemeEditorAdapter,\n} from './authoring';\nexport type { CarouselProps, CarouselSlide, CarouselTransition } from './features/carousel/public';\nexport { Carousel } from './features/carousel/public';\nexport type {\n ColorHueScaleProps,\n ColorPickerProps,\n ColorPickerTab,\n ColorToneDefinition,\n ColorToneProps,\n ColorToneSelection,\n ColorToneTarget,\n ColorWheelProps,\n ColorWheelSelection,\n} from './features/color/public';\nexport { ColorHueScale, ColorPicker, ColorTone, ColorWheel } from './features/color/public';\nexport type {\n MasterDetailActivePane,\n MasterDetailDesktopMode,\n MasterDetailMasterWidth,\n MasterDetailProps,\n} from './features/master-detail/public';\nexport { MasterDetail } from './features/master-detail/public';\nexport type {\n ReaderColorScheme,\n ReaderDocumentFormat,\n ReaderErrorCode,\n ReaderErrorEvent,\n ReaderExternalLinkEvent,\n ReaderLineHeight,\n ReaderLocationChangeEvent,\n ReaderNavigationTrigger,\n ReaderProps,\n ReaderResolvedSource,\n ReaderStatus,\n} from './features/reader/public';\nexport { Reader, resolveReaderProgress } from './features/reader/public';\nexport { ZORA_COMPONENT_REGISTRY } from './features/registry/public';\nexport * from './readerFree';\nexport type { ZoraComponentRegistry } from './types/registry';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,6BAA6B,EAC7B,iCAAiC,EACjC,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAYtD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAM5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAOtE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAc/D,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,cAAc,cAAc,CAAC","sourcesContent":["export type {\n AuthoringBindingControlState,\n AuthoringBindingEditorAdapterProps,\n AuthoringPropertyControlState,\n AuthoringPropertyInspectorAdapterProps,\n AuthoringSelectionAdapterProps,\n AuthoringSelectionItemState,\n ThemeEditorAdapterProps,\n ThemeRecipeFieldControlState,\n} from './authoring';\nexport {\n AuthoringBindingEditorAdapter,\n AuthoringPropertyInspectorAdapter,\n AuthoringSelectionAdapter,\n ThemeEditorAdapter,\n} from './authoring';\nexport type { CarouselProps, CarouselSlide, CarouselTransition } from './features/carousel/public';\nexport { Carousel } from './features/carousel/public';\nexport type {\n ColorHueScaleProps,\n ColorPickerProps,\n ColorPickerTab,\n ColorToneDefinition,\n ColorToneProps,\n ColorToneSelection,\n ColorToneTarget,\n ColorWheelProps,\n ColorWheelSelection,\n} from './features/color/public';\nexport { ColorHueScale, ColorPicker, ColorTone, ColorWheel } from './features/color/public';\nexport type {\n GradientRenderer,\n GradientRendererProps,\n GradientRendererProviderProps,\n} from './features/gradient/public';\nexport { GradientRendererProvider } from './features/gradient/public';\nexport type {\n MasterDetailActivePane,\n MasterDetailDesktopMode,\n MasterDetailMasterWidth,\n MasterDetailProps,\n} from './features/master-detail/public';\nexport { MasterDetail } from './features/master-detail/public';\nexport type {\n ReaderColorScheme,\n ReaderDocumentFormat,\n ReaderErrorCode,\n ReaderErrorEvent,\n ReaderExternalLinkEvent,\n ReaderLineHeight,\n ReaderLocationChangeEvent,\n ReaderNavigationTrigger,\n ReaderProps,\n ReaderResolvedSource,\n ReaderStatus,\n} from './features/reader/public';\nexport { Reader, resolveReaderProgress } from './features/reader/public';\nexport { ZORA_COMPONENT_REGISTRY } from './features/registry/public';\nexport * from './readerFree';\nexport type { ZoraComponentRegistry } from './types/registry';\n"]}
@@ -28,6 +28,8 @@ export interface ColorWheelProps extends ZoraBaseProps {
28
28
  /** Square stage side derived by the owning ColorPicker geometry. */
29
29
  readonly size?: number;
30
30
  readonly harmony?: ColorHarmony | null;
31
+ /** Optional consumer-provided target applied consistently to wheel rendering and selection. */
32
+ readonly toneTarget?: ColorToneTarget;
31
33
  readonly harmonies?: readonly ColorHarmony[];
32
34
  readonly onChange: (selection: ColorWheelSelection) => void;
33
35
  }
@@ -52,8 +54,14 @@ export interface ColorPickerProps extends ZoraBaseProps {
52
54
  readonly tone?: string;
53
55
  /** Consumer-owned tone catalogue; ZORA deliberately does not copy it. */
54
56
  readonly tones?: readonly ColorToneDefinition[];
55
- /** Requested outer logical width; hosts must provide at least 360 logical pixels. */
57
+ /** Requested outer logical width; it is clamped to the measured host width. */
56
58
  readonly width?: number;
59
+ /** Requested outer logical height; it is clamped to the measured host height. */
60
+ readonly height?: number;
61
+ /** Receives whether the host must provide a larger or full-screen presentation. */
62
+ readonly onInsufficientSpaceChange?: (insufficient: boolean) => void;
63
+ /** Optional one-line contextual information rendered above the footer. */
64
+ readonly infoLine?: string;
57
65
  /** Controlled active presentation. */
58
66
  readonly activeTab?: ColorPickerTab;
59
67
  /** Emits one canonical controlled selection payload. */
@@ -1 +1 @@
1
- {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/types/color.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE5C,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,CAAC;AAE9C,+EAA+E;AAC/E,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;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Y,CAAC;QAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;KACxB,KAAK,IAAI,CAAC;IACX,6EAA6E;IAC7E,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,IAAI,CAAC;IAC3D,8EAA8E;IAC9E,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IACzC,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;CAC1E"}
@@ -1 +1 @@
1
- {"version":3,"file":"color.js","sourceRoot":"","sources":["../../src/types/color.ts"],"names":[],"mappings":"","sourcesContent":["import type { ColorHarmony, HexColor } from '@ankhorage/color-theory';\n\nimport type { ZoraBaseProps } from './base';\n\nexport type ColorPickerTab = 'grid' | 'wheel';\n\n/** A consumer-owned OKLCH target from the published Templates tone catalog. */\nexport interface ColorToneTarget {\n readonly lightness: number;\n readonly chroma: number;\n}\n\n/**\n * Structural boundary for a Templates tone-pair entry. ZORA intentionally owns\n * neither the catalog nor its classifications.\n */\nexport interface ColorToneDefinition {\n readonly id: string;\n readonly accent: string;\n readonly accentTarget: ColorToneTarget;\n}\n\nexport interface ColorWheelSelection {\n readonly color: HexColor;\n readonly harmony: ColorHarmony | null;\n}\n\nexport interface ColorToneSelection {\n readonly toneId: string;\n readonly colors: readonly HexColor[];\n}\n\nexport interface ColorWheelProps extends ZoraBaseProps {\n readonly value: HexColor;\n /** Square stage side derived by the owning ColorPicker geometry. */\n readonly size?: number;\n readonly harmony?: ColorHarmony | null;\n readonly harmonies?: readonly ColorHarmony[];\n readonly onChange: (selection: ColorWheelSelection) => void;\n}\n\nexport interface ColorToneProps extends ZoraBaseProps {\n readonly tones: readonly ColorToneDefinition[];\n readonly selectionMode?: 'single' | 'multiple';\n readonly value: ColorToneSelection | null;\n readonly onChange: (selection: ColorToneSelection) => void;\n}\n\nexport interface ColorHueScaleProps extends ZoraBaseProps {\n readonly value: HexColor;\n readonly onChange: (color: HexColor) => void;\n}\n\nexport interface ColorPickerProps extends ZoraBaseProps {\n /** Enabled presentations, in Grid then Wheel order by default. */\n readonly tabs?: readonly ColorPickerTab[];\n /** The one authoritative selected colour. */\n readonly primaryColor: HexColor;\n /** Optional owner-provided harmony applied to both presentations. */\n readonly harmony?: ColorHarmony;\n /** Optional consumer-owned tone-family id. */\n readonly tone?: string;\n /** Consumer-owned tone catalogue; ZORA deliberately does not copy it. */\n readonly tones?: readonly ColorToneDefinition[];\n /** Requested outer logical width; hosts must provide at least 360 logical pixels. */\n readonly width?: number;\n /** Controlled active presentation. */\n readonly activeTab?: ColorPickerTab;\n /** Emits one canonical controlled selection payload. */\n readonly onValueChange: (value: {\n readonly primaryColor: HexColor;\n readonly harmony?: ColorHarmony;\n readonly tone?: string;\n }) => void;\n /** Notifies a consumer that a controlled active presentation must change. */\n readonly onActiveTabChange?: (tab: ColorPickerTab) => void;\n /** Requests dismissal from the owning Popover or BottomSheet presentation. */\n readonly onDismiss?: () => void;\n readonly hideTabListWhenSingle?: boolean;\n readonly wheel?: Omit<ColorWheelProps, 'onChange' | 'value' | 'harmony'>;\n}\n"]}
1
+ {"version":3,"file":"color.js","sourceRoot":"","sources":["../../src/types/color.ts"],"names":[],"mappings":"","sourcesContent":["import type { ColorHarmony, HexColor } from '@ankhorage/color-theory';\n\nimport type { ZoraBaseProps } from './base';\n\nexport type ColorPickerTab = 'grid' | 'wheel';\n\n/** A consumer-owned OKLCH target from the published Templates tone catalog. */\nexport interface ColorToneTarget {\n readonly lightness: number;\n readonly chroma: number;\n}\n\n/**\n * Structural boundary for a Templates tone-pair entry. ZORA intentionally owns\n * neither the catalog nor its classifications.\n */\nexport interface ColorToneDefinition {\n readonly id: string;\n readonly accent: string;\n readonly accentTarget: ColorToneTarget;\n}\n\nexport interface ColorWheelSelection {\n readonly color: HexColor;\n readonly harmony: ColorHarmony | null;\n}\n\nexport interface ColorToneSelection {\n readonly toneId: string;\n readonly colors: readonly HexColor[];\n}\n\nexport interface ColorWheelProps extends ZoraBaseProps {\n readonly value: HexColor;\n /** Square stage side derived by the owning ColorPicker geometry. */\n readonly size?: number;\n readonly harmony?: ColorHarmony | null;\n /** Optional consumer-provided target applied consistently to wheel rendering and selection. */\n readonly toneTarget?: ColorToneTarget;\n readonly harmonies?: readonly ColorHarmony[];\n readonly onChange: (selection: ColorWheelSelection) => void;\n}\n\nexport interface ColorToneProps extends ZoraBaseProps {\n readonly tones: readonly ColorToneDefinition[];\n readonly selectionMode?: 'single' | 'multiple';\n readonly value: ColorToneSelection | null;\n readonly onChange: (selection: ColorToneSelection) => void;\n}\n\nexport interface ColorHueScaleProps extends ZoraBaseProps {\n readonly value: HexColor;\n readonly onChange: (color: HexColor) => void;\n}\n\nexport interface ColorPickerProps extends ZoraBaseProps {\n /** Enabled presentations, in Grid then Wheel order by default. */\n readonly tabs?: readonly ColorPickerTab[];\n /** The one authoritative selected colour. */\n readonly primaryColor: HexColor;\n /** Optional owner-provided harmony applied to both presentations. */\n readonly harmony?: ColorHarmony;\n /** Optional consumer-owned tone-family id. */\n readonly tone?: string;\n /** Consumer-owned tone catalogue; ZORA deliberately does not copy it. */\n readonly tones?: readonly ColorToneDefinition[];\n /** Requested outer logical width; it is clamped to the measured host width. */\n readonly width?: number;\n /** Requested outer logical height; it is clamped to the measured host height. */\n readonly height?: number;\n /** Receives whether the host must provide a larger or full-screen presentation. */\n readonly onInsufficientSpaceChange?: (insufficient: boolean) => void;\n /** Optional one-line contextual information rendered above the footer. */\n readonly infoLine?: string;\n /** Controlled active presentation. */\n readonly activeTab?: ColorPickerTab;\n /** Emits one canonical controlled selection payload. */\n readonly onValueChange: (value: {\n readonly primaryColor: HexColor;\n readonly harmony?: ColorHarmony;\n readonly tone?: string;\n }) => void;\n /** Notifies a consumer that a controlled active presentation must change. */\n readonly onActiveTabChange?: (tab: ColorPickerTab) => void;\n /** Requests dismissal from the owning Popover or BottomSheet presentation. */\n readonly onDismiss?: () => void;\n readonly hideTabListWhenSingle?: boolean;\n readonly wheel?: Omit<ColorWheelProps, 'onChange' | 'value' | 'harmony'>;\n}\n"]}
@@ -26,6 +26,8 @@ export interface SelectProps<TValue extends string = string> extends ZoraBasePro
26
26
  leadingMedia?: ImageProps['source'];
27
27
  /** Optional Surface Button label emphasis; defaults to semiBold. */
28
28
  labelWeight?: ButtonLabelWeight;
29
+ /** Uses the compact control height for dense settings surfaces. */
30
+ compact?: boolean;
29
31
  required?: boolean;
30
32
  disabled?: boolean;
31
33
  readOnly?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/types/select.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,YAAY,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,yFAAyF;IACzF,YAAY,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,WAAW,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,aAAa;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,SAAS,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;IACzC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU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AK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sEAAsE;IACtE,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B;;;OAGG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IACpC,oEAAoE;IACpE,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,mEAAmE;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/types/select.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonIconSpec, ButtonLabelWeight } from '@ankhorage/surface';\n\nimport type { ZoraBaseProps } from './base';\nimport type { ImageProps } from './image';\n\nexport interface SelectOption<TValue extends string = string> {\n value: TValue;\n label: string;\n /** Optional image rendered before this option label and in the trigger when selected. */\n leadingMedia?: ImageProps['source'];\n disabled?: boolean;\n}\n\nexport interface SelectProps<TValue extends string = string> extends ZoraBaseProps {\n value?: TValue;\n defaultValue?: TValue;\n options: readonly SelectOption<TValue>[];\n onValueChange?: (value: TValue) => void;\n label?: string;\n helperText?: string;\n errorText?: string;\n placeholder?: string;\n /** Optional Surface icon source rendered before the trigger label. */\n leadingIcon?: ButtonIconSpec;\n /**\n * Optional image rendered before the trigger label. A selected option's leadingMedia takes\n * precedence. When present, media takes precedence over leadingIcon.\n */\n leadingMedia?: ImageProps['source'];\n /** Optional Surface Button label emphasis; defaults to semiBold. */\n labelWeight?: ButtonLabelWeight;\n required?: boolean;\n disabled?: boolean;\n readOnly?: boolean;\n invalid?: boolean;\n testID?: string;\n}\n"]}
1
+ {"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/types/select.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonIconSpec, ButtonLabelWeight } from '@ankhorage/surface';\n\nimport type { ZoraBaseProps } from './base';\nimport type { ImageProps } from './image';\n\nexport interface SelectOption<TValue extends string = string> {\n value: TValue;\n label: string;\n /** Optional image rendered before this option label and in the trigger when selected. */\n leadingMedia?: ImageProps['source'];\n disabled?: boolean;\n}\n\nexport interface SelectProps<TValue extends string = string> extends ZoraBaseProps {\n value?: TValue;\n defaultValue?: TValue;\n options: readonly SelectOption<TValue>[];\n onValueChange?: (value: TValue) => void;\n label?: string;\n helperText?: string;\n errorText?: string;\n placeholder?: string;\n /** Optional Surface icon source rendered before the trigger label. */\n leadingIcon?: ButtonIconSpec;\n /**\n * Optional image rendered before the trigger label. A selected option's leadingMedia takes\n * precedence. When present, media takes precedence over leadingIcon.\n */\n leadingMedia?: ImageProps['source'];\n /** Optional Surface Button label emphasis; defaults to semiBold. */\n labelWeight?: ButtonLabelWeight;\n /** Uses the compact control height for dense settings surfaces. */\n compact?: boolean;\n required?: boolean;\n disabled?: boolean;\n readOnly?: boolean;\n invalid?: boolean;\n testID?: string;\n}\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ankhorage/zora",
3
3
  "type": "module",
4
- "version": "28.0.0",
4
+ "version": "28.1.0",
5
5
  "description": "Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.",
6
6
  "homepage": "https://github.com/ankhorage/zora#readme",
7
7
  "bugs": {
@@ -48,7 +48,7 @@
48
48
  "@ankhorage/graph": "^0.4.0",
49
49
  "@ankhorage/grid-view": "^0.5.0",
50
50
  "@ankhorage/reader": "^0.1.3",
51
- "@ankhorage/runtime": "^5.6.4",
51
+ "@ankhorage/runtime": "^5.7.1",
52
52
  "@ankhorage/surface": "^9.7.2",
53
53
  "@ankhorage/utility": "^1.11.0",
54
54
  "expo-document-picker": "~57.0.3",
@@ -187,14 +187,14 @@
187
187
  "version-packages": "ankhorage-changeset version"
188
188
  },
189
189
  "devDependencies": {
190
- "@ankhorage/devtools": "^2.11.1",
190
+ "@ankhorage/devtools": "^2.12.5",
191
191
  "@ankhorage/paradox": "^0.6.1",
192
192
  "@react-native-vector-icons/fontawesome": "^14.0.0",
193
193
  "@react-native-vector-icons/fontawesome5": "^14.0.0",
194
194
  "@react-native-vector-icons/fontawesome6": "^14.0.0",
195
195
  "@react-native-vector-icons/ionicons": "^14.0.0",
196
196
  "@react-native-vector-icons/material-design-icons": "^14.0.0",
197
- "@types/bun": "^1.4.2",
197
+ "@types/bun": "^1.4.5",
198
198
  "@types/culori": "^4.0.1",
199
199
  "@types/node": "^26.6.11",
200
200
  "@types/react": "^19.3.3",
@@ -214,7 +214,7 @@
214
214
  "react-native-worklets": "0.10.1",
215
215
  "typescript": "~6.0.3"
216
216
  },
217
- "packageManager": "bun@1.4.2",
217
+ "packageManager": "bun@1.4.5",
218
218
  "ankh": {
219
219
  "category": "zora",
220
220
  "capabilities": [
@@ -61,7 +61,7 @@ function BottomSheetInner({
61
61
  dismissed.current = true;
62
62
  onDismiss?.();
63
63
  },
64
- onIndexChange: (index) => onIndexChange?.({ index }),
64
+ onIndexChange: (index: number) => onIndexChange?.({ index }),
65
65
  });
66
66
  }, [
67
67
  active,
@@ -1,11 +1,14 @@
1
1
  import { type HexColor, isHexColor } from '@ankhorage/color-theory';
2
+ import { useClipboardWriter, writeClipboardTextAsync } from '@ankhorage/runtime';
2
3
  import { TextInput } from '@ankhorage/surface';
3
4
  import React from 'react';
4
5
 
6
+ import { IconButton } from '../button/public';
5
7
  import { View } from '../layout/public';
6
8
  import { useZoraTheme } from '../theme/composition/useZoraTheme';
9
+ import { Text } from '../typography/public';
7
10
 
8
- /*** Edits one controlled HEX color until the host-backed clipboard capability is available. */
11
+ /*** Edits one controlled HEX color and delegates copying to the host-owned clipboard capability. */
9
12
  export function ColorHexField({
10
13
  disabled,
11
14
  onChange,
@@ -16,28 +19,71 @@ export function ColorHexField({
16
19
  readonly value: HexColor;
17
20
  }) {
18
21
  const [input, setInput] = React.useState<string>(value);
22
+ const [previousValue, setPreviousValue] = React.useState(value);
23
+ const [copyFeedback, setCopyFeedback] = React.useState<string>();
24
+ const clipboardWriter = useClipboardWriter();
19
25
  const { theme } = useZoraTheme();
26
+ if (value !== previousValue) {
27
+ setPreviousValue(value);
28
+ setInput(value);
29
+ }
20
30
 
21
31
  return (
22
- <TextInput
23
- accessibilityLabel="Color hex value"
24
- disabled={disabled}
25
- key={value}
26
- leadingAccessory={
27
- <View
28
- bg={value}
29
- borderColor={theme.semantics.border.default}
30
- borderWidth={1}
31
- height={30}
32
- radius="s"
33
- width={30}
34
- />
35
- }
36
- onChangeText={(nextValue) => {
37
- setInput(nextValue);
38
- if (isHexColor(nextValue)) onChange(nextValue);
39
- }}
40
- value={input}
41
- />
32
+ <View>
33
+ <TextInput
34
+ accessibilityLabel="Color hex value"
35
+ disabled={disabled}
36
+ leadingAccessory={
37
+ <View
38
+ bg={value}
39
+ borderColor={theme.semantics.border.default}
40
+ borderWidth={1}
41
+ height={30}
42
+ radius="s"
43
+ width={30}
44
+ />
45
+ }
46
+ onChangeText={(nextValue) => {
47
+ setInput(nextValue);
48
+ if (isHexColor(nextValue)) onChange(nextValue);
49
+ }}
50
+ trailingAccessory={
51
+ <IconButton
52
+ iconName={
53
+ copyFeedback === 'Color hex copied.'
54
+ ? 'checkmark'
55
+ : copyFeedback
56
+ ? 'warning'
57
+ : 'copy-outline'
58
+ }
59
+ label={copyFeedback ?? 'Copy color hex value'}
60
+ disabled={disabled}
61
+ onPress={() => {
62
+ void writeClipboardTextAsync(clipboardWriter, value).then((result) => {
63
+ setCopyFeedback(
64
+ result === 'written'
65
+ ? 'Color hex copied.'
66
+ : result === 'denied'
67
+ ? 'Clipboard access was denied.'
68
+ : 'Clipboard is unavailable.',
69
+ );
70
+ });
71
+ }}
72
+ variant="ghost"
73
+ />
74
+ }
75
+ value={input}
76
+ />
77
+ {copyFeedback ? (
78
+ <Text
79
+ accessibilityLiveRegion="polite"
80
+ emphasis="muted"
81
+ style={{ position: 'absolute', opacity: 0 }}
82
+ variant="caption"
83
+ >
84
+ {copyFeedback}
85
+ </Text>
86
+ ) : null}
87
+ </View>
42
88
  );
43
89
  }
@@ -16,11 +16,18 @@ function load(path: string) {
16
16
  }
17
17
 
18
18
  test('renders the same 8-by-8 Grid geometry in both inherited theme modes', async () => {
19
- const [{ ColorPicker }, { ZoraProvider }] = (await Promise.all([
19
+ const [{ ColorPicker }, { GradientRendererProvider }, { ZoraProvider }] = (await Promise.all([
20
20
  load('components/color-picker/index.js'),
21
+ load('components/gradient-renderer-provider/index.js'),
21
22
  load('runtime/ZoraProvider.js'),
22
23
  ])) as [
23
24
  { ColorPicker: typeof ColorPickerComponent },
25
+ {
26
+ GradientRendererProvider: React.ComponentType<{
27
+ readonly children?: React.ReactNode;
28
+ readonly renderer: React.ComponentType<{ readonly children?: React.ReactNode }>;
29
+ }>;
30
+ },
24
31
  {
25
32
  ZoraProvider: React.ComponentType<{
26
33
  readonly children?: React.ReactNode;
@@ -31,15 +38,17 @@ test('renders the same 8-by-8 Grid geometry in both inherited theme modes', asyn
31
38
 
32
39
  const markupFor = (mode: 'dark' | 'light') =>
33
40
  renderToStaticMarkup(
34
- <ZoraProvider mode={mode}>
35
- <ColorPicker
36
- onDismiss={() => undefined}
37
- onValueChange={() => undefined}
38
- primaryColor="#2563eb"
39
- testID={`picker-${mode}`}
40
- width={560}
41
- />
42
- </ZoraProvider>,
41
+ <GradientRendererProvider renderer={({ children }) => <div>{children}</div>}>
42
+ <ZoraProvider mode={mode}>
43
+ <ColorPicker
44
+ onDismiss={() => undefined}
45
+ onValueChange={() => undefined}
46
+ primaryColor="#2563eb"
47
+ testID={`picker-${mode}`}
48
+ width={560}
49
+ />
50
+ </ZoraProvider>
51
+ </GradientRendererProvider>,
43
52
  );
44
53
 
45
54
  for (const mode of ['dark', 'light'] as const) {