@duro-app/ui 5.11.0 → 5.13.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 (331) hide show
  1. package/dist/Table-Bms2ftt3.js +1694 -0
  2. package/dist/Table-Bms2ftt3.js.map +1 -0
  3. package/dist/compiler-runtime-BuugS4D0.js.map +1 -1
  4. package/dist/components/Alert/Alert.d.ts.map +1 -1
  5. package/dist/components/AppShell/native.css.d.ts +53 -0
  6. package/dist/components/AppShell/native.css.d.ts.map +1 -0
  7. package/dist/components/Button/Button.d.ts +2 -1
  8. package/dist/components/Button/Button.d.ts.map +1 -1
  9. package/dist/components/Button/styles.css.d.ts +1 -0
  10. package/dist/components/Button/styles.css.d.ts.map +1 -1
  11. package/dist/components/Callout/Callout.d.ts.map +1 -1
  12. package/dist/components/Callout/styles.css.d.ts +3 -0
  13. package/dist/components/Callout/styles.css.d.ts.map +1 -1
  14. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  15. package/dist/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -1
  16. package/dist/components/DetailPanel/DetailPanel.d.ts.map +1 -1
  17. package/dist/components/Dialog/Dialog.d.ts +2 -17
  18. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  19. package/dist/components/Dialog/Dialog.stories.d.ts +4 -0
  20. package/dist/components/Dialog/Dialog.stories.d.ts.map +1 -1
  21. package/dist/components/Dialog/native.css.d.ts +82 -0
  22. package/dist/components/Dialog/native.css.d.ts.map +1 -0
  23. package/dist/components/Dialog/parts.css.d.ts +82 -0
  24. package/dist/components/Dialog/parts.css.d.ts.map +1 -0
  25. package/dist/components/Dialog/parts.d.ts +35 -0
  26. package/dist/components/Dialog/parts.d.ts.map +1 -0
  27. package/dist/components/Dialog/styles.css.d.ts +1 -74
  28. package/dist/components/Dialog/styles.css.d.ts.map +1 -1
  29. package/dist/components/Drawer/Drawer.d.ts +7 -35
  30. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  31. package/dist/components/Drawer/Drawer.meta.d.ts.map +1 -1
  32. package/dist/components/Drawer/DrawerScroll.stories.d.ts.map +1 -1
  33. package/dist/components/Drawer/DrawerSnap.stories.d.ts +20 -0
  34. package/dist/components/Drawer/DrawerSnap.stories.d.ts.map +1 -0
  35. package/dist/components/Drawer/native.css.d.ts +55 -0
  36. package/dist/components/Drawer/native.css.d.ts.map +1 -0
  37. package/dist/components/Drawer/parts.css.d.ts +96 -0
  38. package/dist/components/Drawer/parts.css.d.ts.map +1 -0
  39. package/dist/components/Drawer/parts.d.ts +56 -0
  40. package/dist/components/Drawer/parts.d.ts.map +1 -0
  41. package/dist/components/Drawer/sheetPhysics.d.ts +56 -0
  42. package/dist/components/Drawer/sheetPhysics.d.ts.map +1 -0
  43. package/dist/components/Drawer/styles.css.d.ts +15 -58
  44. package/dist/components/Drawer/styles.css.d.ts.map +1 -1
  45. package/dist/components/Drawer/touchInput.d.ts +35 -0
  46. package/dist/components/Drawer/touchInput.d.ts.map +1 -0
  47. package/dist/components/Drawer/useDrawerRoot.d.ts +33 -0
  48. package/dist/components/Drawer/useDrawerRoot.d.ts.map +1 -0
  49. package/dist/components/Drawer/useSheetHeights.d.ts +7 -0
  50. package/dist/components/Drawer/useSheetHeights.d.ts.map +1 -0
  51. package/dist/components/Drawer/useSwipeDismiss.d.ts +13 -2
  52. package/dist/components/Drawer/useSwipeDismiss.d.ts.map +1 -1
  53. package/dist/components/Grid/styles.css.d.ts +1 -0
  54. package/dist/components/Grid/styles.css.d.ts.map +1 -1
  55. package/dist/components/Icon/Icon.d.ts +3 -9
  56. package/dist/components/Icon/Icon.d.ts.map +1 -1
  57. package/dist/components/Icon/geometry.d.ts +60 -0
  58. package/dist/components/Icon/geometry.d.ts.map +1 -0
  59. package/dist/components/Icon/types.d.ts +15 -0
  60. package/dist/components/Icon/types.d.ts.map +1 -0
  61. package/dist/components/Input/Input.d.ts +5 -1
  62. package/dist/components/Input/Input.d.ts.map +1 -1
  63. package/dist/components/Input/styles.css.d.ts +1 -0
  64. package/dist/components/Input/styles.css.d.ts.map +1 -1
  65. package/dist/components/LinkButton/styles.css.d.ts +1 -0
  66. package/dist/components/LinkButton/styles.css.d.ts.map +1 -1
  67. package/dist/components/Menu/Menu.d.ts +7 -1
  68. package/dist/components/Menu/Menu.d.ts.map +1 -1
  69. package/dist/components/Menu/native.css.d.ts +14 -0
  70. package/dist/components/Menu/native.css.d.ts.map +1 -0
  71. package/dist/components/Menu/useMenuOpen.d.ts +16 -0
  72. package/dist/components/Menu/useMenuOpen.d.ts.map +1 -0
  73. package/dist/components/Menu/useMenuRoot.d.ts +3 -6
  74. package/dist/components/Menu/useMenuRoot.d.ts.map +1 -1
  75. package/dist/components/Meter/styles.css.d.ts +1 -0
  76. package/dist/components/Meter/styles.css.d.ts.map +1 -1
  77. package/dist/components/PageShell/styles.css.d.ts +2 -0
  78. package/dist/components/PageShell/styles.css.d.ts.map +1 -1
  79. package/dist/components/Popover/native.css.d.ts +11 -0
  80. package/dist/components/Popover/native.css.d.ts.map +1 -0
  81. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -17
  82. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  83. package/dist/components/RadioGroup/RadioGroup.stories.d.ts +3 -0
  84. package/dist/components/RadioGroup/RadioGroup.stories.d.ts.map +1 -1
  85. package/dist/components/RadioGroup/group.d.ts +31 -0
  86. package/dist/components/RadioGroup/group.d.ts.map +1 -0
  87. package/dist/components/RadioGroup/styles.css.d.ts +10 -0
  88. package/dist/components/RadioGroup/styles.css.d.ts.map +1 -1
  89. package/dist/components/ScrollArea/styles.css.d.ts +1 -0
  90. package/dist/components/ScrollArea/styles.css.d.ts.map +1 -1
  91. package/dist/components/SideNav/Chevron.d.ts +4 -0
  92. package/dist/components/SideNav/Chevron.d.ts.map +1 -0
  93. package/dist/components/SideNav/SideNav.d.ts.map +1 -1
  94. package/dist/components/SideNav/styles.css.d.ts +6 -0
  95. package/dist/components/SideNav/styles.css.d.ts.map +1 -1
  96. package/dist/components/SideNav/types.d.ts +6 -0
  97. package/dist/components/SideNav/types.d.ts.map +1 -0
  98. package/dist/components/Spinner/Spinner.d.ts +2 -6
  99. package/dist/components/Spinner/Spinner.d.ts.map +1 -1
  100. package/dist/components/Spinner/Spinner.types.d.ts +6 -0
  101. package/dist/components/Spinner/Spinner.types.d.ts.map +1 -0
  102. package/dist/components/Spinner/ring.css.d.ts +39 -0
  103. package/dist/components/Spinner/ring.css.d.ts.map +1 -0
  104. package/dist/components/Spinner/styles.css.d.ts +1 -28
  105. package/dist/components/Spinner/styles.css.d.ts.map +1 -1
  106. package/dist/components/SplitPane/SplitPane.d.ts +38 -0
  107. package/dist/components/SplitPane/SplitPane.d.ts.map +1 -0
  108. package/dist/components/SplitPane/SplitPane.meta.d.ts +3 -0
  109. package/dist/components/SplitPane/SplitPane.meta.d.ts.map +1 -0
  110. package/dist/components/SplitPane/SplitPane.stories.d.ts +17 -0
  111. package/dist/components/SplitPane/SplitPane.stories.d.ts.map +1 -0
  112. package/dist/components/SplitPane/styles.css.d.ts +78 -0
  113. package/dist/components/SplitPane/styles.css.d.ts.map +1 -0
  114. package/dist/components/StatusIcon/StatusIcon.d.ts.map +1 -1
  115. package/dist/components/StatusIcon/styles.css.d.ts +3 -0
  116. package/dist/components/StatusIcon/styles.css.d.ts.map +1 -1
  117. package/dist/components/Switch/Switch.d.ts +2 -18
  118. package/dist/components/Switch/Switch.d.ts.map +1 -1
  119. package/dist/components/Switch/Switch.types.d.ts +18 -0
  120. package/dist/components/Switch/Switch.types.d.ts.map +1 -0
  121. package/dist/components/TableOfContents/styles.css.d.ts +1 -0
  122. package/dist/components/TableOfContents/styles.css.d.ts.map +1 -1
  123. package/dist/components/Tabs/TabLayout.d.ts +7 -0
  124. package/dist/components/Tabs/TabLayout.d.ts.map +1 -0
  125. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  126. package/dist/components/Tabs/indicator.d.ts +28 -0
  127. package/dist/components/Tabs/indicator.d.ts.map +1 -0
  128. package/dist/components/Tabs/styles.css.d.ts +4 -0
  129. package/dist/components/Tabs/styles.css.d.ts.map +1 -1
  130. package/dist/components/Tabs/useTabIndicator.d.ts +4 -0
  131. package/dist/components/Tabs/useTabIndicator.d.ts.map +1 -0
  132. package/dist/components/Tabs/useTabKeys.d.ts +13 -0
  133. package/dist/components/Tabs/useTabKeys.d.ts.map +1 -0
  134. package/dist/components/Tag/RemoveGlyph.d.ts +4 -0
  135. package/dist/components/Tag/RemoveGlyph.d.ts.map +1 -0
  136. package/dist/components/Tag/Tag.d.ts +2 -24
  137. package/dist/components/Tag/Tag.d.ts.map +1 -1
  138. package/dist/components/Tag/styles.css.d.ts +8 -0
  139. package/dist/components/Tag/styles.css.d.ts.map +1 -1
  140. package/dist/components/Tag/types.d.ts +39 -0
  141. package/dist/components/Tag/types.d.ts.map +1 -0
  142. package/dist/components/Textarea/styles.css.d.ts +1 -0
  143. package/dist/components/Textarea/styles.css.d.ts.map +1 -1
  144. package/dist/components/Toast/ToastProvider.d.ts +2 -21
  145. package/dist/components/Toast/ToastProvider.d.ts.map +1 -1
  146. package/dist/components/Toast/native.css.d.ts +81 -0
  147. package/dist/components/Toast/native.css.d.ts.map +1 -0
  148. package/dist/components/Toast/store.d.ts +47 -0
  149. package/dist/components/Toast/store.d.ts.map +1 -0
  150. package/dist/components/Toggle/Toggle.d.ts.map +1 -1
  151. package/dist/components/Toggle/styles.css.d.ts +11 -2
  152. package/dist/components/Toggle/styles.css.d.ts.map +1 -1
  153. package/dist/components/Tooltip/TooltipHint.d.ts +9 -0
  154. package/dist/components/Tooltip/TooltipHint.d.ts.map +1 -0
  155. package/dist/components/Tree/Tree.d.ts.map +1 -1
  156. package/dist/components/Tree/styles.css.d.ts +6 -0
  157. package/dist/components/Tree/styles.css.d.ts.map +1 -1
  158. package/dist/components/Tree/useTreeKeyboard.d.ts +19 -0
  159. package/dist/components/Tree/useTreeKeyboard.d.ts.map +1 -0
  160. package/dist/components/VirtualList/VirtualList.d.ts +33 -0
  161. package/dist/components/VirtualList/VirtualList.d.ts.map +1 -0
  162. package/dist/components/VirtualList/VirtualList.meta.d.ts +3 -0
  163. package/dist/components/VirtualList/VirtualList.meta.d.ts.map +1 -0
  164. package/dist/components/VirtualList/VirtualList.stories.d.ts +15 -0
  165. package/dist/components/VirtualList/VirtualList.stories.d.ts.map +1 -0
  166. package/dist/components/VirtualList/styles.css.d.ts +28 -0
  167. package/dist/components/VirtualList/styles.css.d.ts.map +1 -0
  168. package/dist/components/VirtualTable/styles.css.d.ts +6 -0
  169. package/dist/components/VirtualTable/styles.css.d.ts.map +1 -1
  170. package/dist/index.css +1 -1
  171. package/dist/index.d.ts +3 -1
  172. package/dist/index.d.ts.map +1 -1
  173. package/dist/index.js +6202 -4794
  174. package/dist/index.js.map +1 -1
  175. package/dist/shared/ButtonHost.d.ts +11 -0
  176. package/dist/shared/ButtonHost.d.ts.map +1 -0
  177. package/dist/shared/portal/hostRegistry.d.ts +33 -0
  178. package/dist/shared/portal/hostRegistry.d.ts.map +1 -0
  179. package/dist/shared/pressableChild.d.ts +14 -0
  180. package/dist/shared/pressableChild.d.ts.map +1 -0
  181. package/dist/shared/useOverlayOpenState.d.ts +40 -0
  182. package/dist/shared/useOverlayOpenState.d.ts.map +1 -0
  183. package/dist/table.js +141 -135
  184. package/dist/table.js.map +1 -1
  185. package/package.json +34 -4
  186. package/src/components/Alert/Alert.tsx +14 -2
  187. package/src/components/AppShell/AppShell.meta.ts +1 -1
  188. package/src/components/AppShell/AppShell.native.tsx +174 -0
  189. package/src/components/AppShell/native.css.ts +56 -0
  190. package/src/components/Button/Button.tsx +6 -5
  191. package/src/components/Button/styles.css.ts +2 -0
  192. package/src/components/Callout/Callout.tsx +17 -3
  193. package/src/components/Callout/styles.css.ts +5 -0
  194. package/src/components/Checkbox/Checkbox.native.tsx +67 -0
  195. package/src/components/Checkbox/Checkbox.tsx +1 -50
  196. package/src/components/ConfirmDialog/ConfirmDialog.tsx +3 -0
  197. package/src/components/DetailPanel/DetailPanel.tsx +9 -45
  198. package/src/components/Dialog/Dialog.native.tsx +296 -0
  199. package/src/components/Dialog/Dialog.stories.tsx +71 -0
  200. package/src/components/Dialog/Dialog.tsx +41 -130
  201. package/src/components/Dialog/native.css.ts +78 -0
  202. package/src/components/Dialog/parts.css.ts +101 -0
  203. package/src/components/Dialog/parts.tsx +61 -0
  204. package/src/components/Dialog/styles.css.ts +2 -89
  205. package/src/components/Drawer/Drawer.meta.ts +2 -1
  206. package/src/components/Drawer/Drawer.native.tsx +469 -0
  207. package/src/components/Drawer/Drawer.tsx +63 -179
  208. package/src/components/Drawer/DrawerScroll.stories.tsx +4 -54
  209. package/src/components/Drawer/DrawerSnap.stories.tsx +205 -0
  210. package/src/components/Drawer/native.css.ts +58 -0
  211. package/src/components/Drawer/parts.css.ts +125 -0
  212. package/src/components/Drawer/parts.tsx +110 -0
  213. package/src/components/Drawer/sheetPhysics.ts +103 -0
  214. package/src/components/Drawer/styles.css.ts +19 -74
  215. package/src/components/Drawer/touchInput.ts +81 -0
  216. package/src/components/Drawer/useDrawerRoot.ts +90 -0
  217. package/src/components/Drawer/useSheetHeights.ts +42 -0
  218. package/src/components/Drawer/useSwipeDismiss.ts +146 -23
  219. package/src/components/Grid/styles.css.ts +2 -0
  220. package/src/components/Icon/Icon.native.tsx +54 -0
  221. package/src/components/Icon/Icon.tsx +19 -430
  222. package/src/components/Icon/geometry.ts +456 -0
  223. package/src/components/Icon/types.ts +74 -0
  224. package/src/components/Input/Input.tsx +8 -0
  225. package/src/components/Input/styles.css.ts +2 -0
  226. package/src/components/LinkButton/styles.css.ts +2 -0
  227. package/src/components/Menu/Menu.meta.ts +1 -1
  228. package/src/components/Menu/Menu.native.tsx +268 -0
  229. package/src/components/Menu/Menu.tsx +11 -2
  230. package/src/components/Menu/native.css.ts +18 -0
  231. package/src/components/Menu/useMenuOpen.ts +33 -0
  232. package/src/components/Menu/useMenuRoot.ts +7 -26
  233. package/src/components/Meter/styles.css.ts +2 -0
  234. package/src/components/PageShell/styles.css.ts +4 -0
  235. package/src/components/Popover/Popover.meta.ts +1 -1
  236. package/src/components/Popover/Popover.native.tsx +205 -0
  237. package/src/components/Popover/native.css.ts +13 -0
  238. package/src/components/RadioGroup/RadioGroup.meta.ts +1 -1
  239. package/src/components/RadioGroup/RadioGroup.native.tsx +48 -0
  240. package/src/components/RadioGroup/RadioGroup.stories.tsx +64 -1
  241. package/src/components/RadioGroup/RadioGroup.tsx +8 -83
  242. package/src/components/RadioGroup/group.tsx +85 -0
  243. package/src/components/RadioGroup/styles.css.ts +13 -0
  244. package/src/components/ScrollArea/styles.css.ts +2 -0
  245. package/src/components/SideNav/Chevron.native.tsx +20 -0
  246. package/src/components/SideNav/Chevron.tsx +20 -0
  247. package/src/components/SideNav/SideNav.meta.ts +1 -1
  248. package/src/components/SideNav/SideNav.tsx +57 -41
  249. package/src/components/SideNav/styles.css.ts +8 -0
  250. package/src/components/SideNav/types.ts +6 -0
  251. package/src/components/Spinner/Spinner.native.tsx +37 -0
  252. package/src/components/Spinner/Spinner.tsx +6 -15
  253. package/src/components/Spinner/Spinner.types.ts +6 -0
  254. package/src/components/Spinner/ring.css.ts +45 -0
  255. package/src/components/Spinner/styles.css.ts +2 -32
  256. package/src/components/SplitPane/SplitPane.meta.ts +40 -0
  257. package/src/components/SplitPane/SplitPane.native.tsx +47 -0
  258. package/src/components/SplitPane/SplitPane.stories.tsx +148 -0
  259. package/src/components/SplitPane/SplitPane.tsx +218 -0
  260. package/src/components/SplitPane/styles.css.ts +81 -0
  261. package/src/components/StatusIcon/StatusIcon.tsx +13 -2
  262. package/src/components/StatusIcon/styles.css.ts +5 -0
  263. package/src/components/Switch/Switch.native.tsx +45 -0
  264. package/src/components/Switch/Switch.tsx +22 -44
  265. package/src/components/Switch/Switch.types.ts +18 -0
  266. package/src/components/TableOfContents/styles.css.ts +2 -0
  267. package/src/components/Tabs/TabLayout.native.tsx +9 -0
  268. package/src/components/Tabs/TabLayout.tsx +6 -0
  269. package/src/components/Tabs/Tabs.meta.ts +1 -1
  270. package/src/components/Tabs/Tabs.tsx +38 -136
  271. package/src/components/Tabs/indicator.ts +36 -0
  272. package/src/components/Tabs/styles.css.ts +7 -0
  273. package/src/components/Tabs/useTabIndicator.native.ts +35 -0
  274. package/src/components/Tabs/useTabIndicator.ts +49 -0
  275. package/src/components/Tabs/useTabKeys.native.ts +2 -0
  276. package/src/components/Tabs/useTabKeys.ts +99 -0
  277. package/src/components/Tag/RemoveGlyph.native.tsx +17 -0
  278. package/src/components/Tag/RemoveGlyph.tsx +10 -0
  279. package/src/components/Tag/Tag.meta.ts +1 -1
  280. package/src/components/Tag/Tag.native.tsx +70 -0
  281. package/src/components/Tag/Tag.tsx +9 -37
  282. package/src/components/Tag/styles.css.ts +9 -0
  283. package/src/components/Tag/types.ts +43 -0
  284. package/src/components/Textarea/styles.css.ts +2 -0
  285. package/src/components/ThemeProvider/ThemeProvider.native.tsx +70 -10
  286. package/src/components/Toast/Toast.meta.ts +1 -1
  287. package/src/components/Toast/ToastProvider.native.tsx +226 -0
  288. package/src/components/Toast/ToastProvider.tsx +22 -84
  289. package/src/components/Toast/native.css.ts +78 -0
  290. package/src/components/Toast/store.ts +96 -0
  291. package/src/components/Toggle/Toggle.tsx +5 -3
  292. package/src/components/Toggle/styles.css.ts +14 -2
  293. package/src/components/Tooltip/Tooltip.meta.ts +1 -1
  294. package/src/components/Tooltip/Tooltip.native.tsx +36 -0
  295. package/src/components/Tooltip/TooltipHint.ts +13 -0
  296. package/src/components/Tree/Tree.meta.ts +1 -1
  297. package/src/components/Tree/Tree.tsx +23 -135
  298. package/src/components/Tree/styles.css.ts +6 -0
  299. package/src/components/Tree/useTreeKeyboard.native.ts +5 -0
  300. package/src/components/Tree/useTreeKeyboard.ts +152 -0
  301. package/src/components/VirtualList/VirtualList.meta.ts +39 -0
  302. package/src/components/VirtualList/VirtualList.stories.tsx +95 -0
  303. package/src/components/VirtualList/VirtualList.tsx +103 -0
  304. package/src/components/VirtualList/styles.css.ts +31 -0
  305. package/src/components/VirtualTable/styles.css.ts +12 -0
  306. package/src/hooks/useContainerBelow.native.ts +30 -0
  307. package/src/index.native.ts +61 -1
  308. package/src/index.ts +8 -1
  309. package/src/native-guard/globals.d.ts +10 -0
  310. package/src/native-guard/react-dom.d.ts +3 -0
  311. package/src/shared/ButtonHost.native.tsx +70 -0
  312. package/src/shared/ButtonHost.tsx +12 -0
  313. package/src/shared/accessibilityFocus.native.ts +23 -0
  314. package/src/shared/portal/AnchoredOverlay.native.tsx +117 -0
  315. package/src/shared/portal/OverlayModal.native.tsx +51 -0
  316. package/src/shared/portal/PortalHost.native.tsx +102 -0
  317. package/src/shared/portal/hostRegistry.ts +76 -0
  318. package/src/shared/portal/themeScope.native.ts +18 -0
  319. package/src/shared/pressableChild.ts +33 -0
  320. package/src/shared/safeArea.native.ts +22 -0
  321. package/src/shared/useKeyboardHeight.native.ts +18 -0
  322. package/src/shared/useOverlayOpenState.ts +128 -0
  323. package/src/shared/useScreenReaderEnabled.native.ts +19 -0
  324. package/dist/Table-ColfpgKV.js +0 -1552
  325. package/dist/Table-ColfpgKV.js.map +0 -1
  326. package/dist/components/ThemeProvider/ThemeProvider.native.d.ts +0 -10
  327. package/dist/components/ThemeProvider/ThemeProvider.native.d.ts.map +0 -1
  328. package/dist/index.native.d.ts +0 -33
  329. package/dist/index.native.d.ts.map +0 -1
  330. package/dist/platform.native.d.ts +0 -2
  331. package/dist/platform.native.d.ts.map +0 -1
@@ -0,0 +1,456 @@
1
+ import type {IconName} from './types'
2
+
3
+ /**
4
+ * Icon glyphs as renderer-independent geometry on a 24-unit grid (plan N0,
5
+ * Decision 9): the web draws them as SVG elements, native with the renderer
6
+ * the icon benchmark picks. Generated once from the JSX tables Icon.tsx held
7
+ * through 5.11; edit the data here.
8
+ *
9
+ * A `stroke` glyph is drawn with a 2-unit stroke, round caps and joins, and no
10
+ * fill. A `fill` glyph is filled, with even-odd cutouts where `fillRule` says;
11
+ * a shape inside it may carry its own stroke (`lock-filled`'s shackle).
12
+ */
13
+ /** `currentColor` is the icon's colour (the text colour on the web, `color` on native). */
14
+ export type Paint = 'currentColor' | 'none'
15
+
16
+ export type Shape =
17
+ | {
18
+ tag: 'path'
19
+ d: string
20
+ fillRule?: 'evenodd'
21
+ /** Paint override for this shape: the icon's colour, or none. */
22
+ fill?: Paint
23
+ stroke?: Paint
24
+ strokeWidth?: number
25
+ strokeLinecap?: 'round'
26
+ }
27
+ | {tag: 'circle'; cx: number; cy: number; r: number}
28
+ | {tag: 'ellipse'; cx: number; cy: number; rx: number; ry: number}
29
+ | {tag: 'line'; x1: number; y1: number; x2: number; y2: number}
30
+ | {tag: 'rect'; x: number; y: number; width: number; height: number; rx?: number; ry?: number}
31
+ | {tag: 'polyline'; points: string}
32
+ | {tag: 'polygon'; points: string}
33
+
34
+ export interface Glyph {
35
+ readonly style: 'stroke' | 'fill'
36
+ readonly shapes: readonly Shape[]
37
+ }
38
+
39
+ export const GLYPHS: Record<IconName, Glyph> = {
40
+ 'x-circle': {
41
+ style: 'stroke',
42
+ shapes: [
43
+ {tag: 'circle', cx: 12, cy: 12, r: 10},
44
+ {tag: 'line', x1: 15, y1: 9, x2: 9, y2: 15},
45
+ {tag: 'line', x1: 9, y1: 9, x2: 15, y2: 15},
46
+ ],
47
+ },
48
+ 'check-circle': {
49
+ style: 'stroke',
50
+ shapes: [
51
+ {tag: 'circle', cx: 12, cy: 12, r: 10},
52
+ {tag: 'polyline', points: '16 10 11 15 8 12'},
53
+ ],
54
+ },
55
+ 'check-done': {
56
+ style: 'stroke',
57
+ shapes: [
58
+ {tag: 'path', d: 'M22 11.08V12a10 10 0 1 1-5.93-9.14'},
59
+ {tag: 'polyline', points: '22 4 12 14.01 9 11.01'},
60
+ ],
61
+ },
62
+ clock: {
63
+ style: 'stroke',
64
+ shapes: [
65
+ {tag: 'circle', cx: 12, cy: 12, r: 10},
66
+ {tag: 'polyline', points: '12 6 12 12 16 14'},
67
+ ],
68
+ },
69
+ forbidden: {
70
+ style: 'stroke',
71
+ shapes: [
72
+ {tag: 'circle', cx: 12, cy: 12, r: 10},
73
+ {tag: 'line', x1: 4.93, y1: 4.93, x2: 19.07, y2: 19.07},
74
+ ],
75
+ },
76
+ 'info-circle': {
77
+ style: 'stroke',
78
+ shapes: [
79
+ {tag: 'circle', cx: 12, cy: 12, r: 10},
80
+ {tag: 'line', x1: 12, y1: 16, x2: 12, y2: 12},
81
+ {tag: 'line', x1: 12, y1: 8, x2: 12.01, y2: 8},
82
+ ],
83
+ },
84
+ 'alert-triangle': {
85
+ style: 'stroke',
86
+ shapes: [
87
+ {
88
+ tag: 'path',
89
+ d: 'M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z',
90
+ },
91
+ {tag: 'line', x1: 12, y1: 9, x2: 12, y2: 13},
92
+ {tag: 'line', x1: 12, y1: 17, x2: 12.01, y2: 17},
93
+ ],
94
+ },
95
+ shield: {
96
+ style: 'stroke',
97
+ shapes: [{tag: 'path', d: 'M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'}],
98
+ },
99
+ lock: {
100
+ style: 'stroke',
101
+ shapes: [
102
+ {tag: 'rect', x: 3, y: 11, width: 18, height: 11, rx: 2, ry: 2},
103
+ {tag: 'path', d: 'M7 11V7a5 5 0 0 1 10 0v4'},
104
+ ],
105
+ },
106
+ key: {
107
+ style: 'stroke',
108
+ shapes: [
109
+ {
110
+ tag: 'path',
111
+ d: 'M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.78 7.78 5.5 5.5 0 0 1 7.78-7.78zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4',
112
+ },
113
+ ],
114
+ },
115
+ map: {
116
+ style: 'stroke',
117
+ shapes: [
118
+ {tag: 'polygon', points: '1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6'},
119
+ {tag: 'line', x1: 8, y1: 2, x2: 8, y2: 18},
120
+ {tag: 'line', x1: 16, y1: 6, x2: 16, y2: 22},
121
+ ],
122
+ },
123
+ layers: {
124
+ style: 'stroke',
125
+ shapes: [
126
+ {tag: 'polygon', points: '12 2 2 7 12 12 22 7 12 2'},
127
+ {tag: 'polyline', points: '2 17 12 22 22 17'},
128
+ {tag: 'polyline', points: '2 12 12 17 22 12'},
129
+ ],
130
+ },
131
+ repeat: {
132
+ style: 'stroke',
133
+ shapes: [
134
+ {tag: 'polyline', points: '17 1 21 5 17 9'},
135
+ {tag: 'path', d: 'M3 11V9a4 4 0 0 1 4-4h14'},
136
+ {tag: 'polyline', points: '7 23 3 19 7 15'},
137
+ {tag: 'path', d: 'M21 13v2a4 4 0 0 1-4 4H3'},
138
+ ],
139
+ },
140
+ database: {
141
+ style: 'stroke',
142
+ shapes: [
143
+ {tag: 'ellipse', cx: 12, cy: 5, rx: 9, ry: 3},
144
+ {tag: 'path', d: 'M21 12c0 1.66-4 3-9 3s-9-1.34-9-3'},
145
+ {tag: 'path', d: 'M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5'},
146
+ ],
147
+ },
148
+ 'shield-check': {
149
+ style: 'stroke',
150
+ shapes: [
151
+ {tag: 'path', d: 'M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'},
152
+ {tag: 'polyline', points: '9 12 11 14 15 10'},
153
+ ],
154
+ },
155
+ route: {
156
+ style: 'stroke',
157
+ shapes: [
158
+ {tag: 'circle', cx: 6, cy: 19, r: 3},
159
+ {tag: 'path', d: 'M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15'},
160
+ {tag: 'circle', cx: 18, cy: 5, r: 3},
161
+ ],
162
+ },
163
+ 'git-branch': {
164
+ style: 'stroke',
165
+ shapes: [
166
+ {tag: 'line', x1: 6, y1: 3, x2: 6, y2: 15},
167
+ {tag: 'circle', cx: 18, cy: 6, r: 3},
168
+ {tag: 'circle', cx: 6, cy: 18, r: 3},
169
+ {tag: 'path', d: 'M18 9a9 9 0 0 1-9 9'},
170
+ ],
171
+ },
172
+ menu: {
173
+ style: 'stroke',
174
+ shapes: [
175
+ {tag: 'line', x1: 3, y1: 6, x2: 21, y2: 6},
176
+ {tag: 'line', x1: 3, y1: 12, x2: 21, y2: 12},
177
+ {tag: 'line', x1: 3, y1: 18, x2: 21, y2: 18},
178
+ ],
179
+ },
180
+ server: {
181
+ style: 'stroke',
182
+ shapes: [
183
+ {tag: 'rect', x: 2, y: 2, width: 20, height: 8, rx: 2, ry: 2},
184
+ {tag: 'rect', x: 2, y: 14, width: 20, height: 8, rx: 2, ry: 2},
185
+ {tag: 'line', x1: 6, y1: 6, x2: 6.01, y2: 6},
186
+ {tag: 'line', x1: 6, y1: 18, x2: 6.01, y2: 18},
187
+ ],
188
+ },
189
+ 'hard-drive': {
190
+ style: 'stroke',
191
+ shapes: [
192
+ {tag: 'line', x1: 22, y1: 12, x2: 2, y2: 12},
193
+ {
194
+ tag: 'path',
195
+ d: 'M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z',
196
+ },
197
+ {tag: 'line', x1: 6, y1: 16, x2: 6.01, y2: 16},
198
+ {tag: 'line', x1: 10, y1: 16, x2: 10.01, y2: 16},
199
+ ],
200
+ },
201
+ box: {
202
+ style: 'stroke',
203
+ shapes: [
204
+ {
205
+ tag: 'path',
206
+ d: 'M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z',
207
+ },
208
+ {tag: 'polyline', points: '3.27 6.96 12 12.01 20.73 6.96'},
209
+ {tag: 'line', x1: 12, y1: 22.08, x2: 12, y2: 12},
210
+ ],
211
+ },
212
+ image: {
213
+ style: 'stroke',
214
+ shapes: [
215
+ {tag: 'rect', x: 3, y: 3, width: 18, height: 18, rx: 2, ry: 2},
216
+ {tag: 'circle', cx: 8.5, cy: 8.5, r: 1.5},
217
+ {tag: 'polyline', points: '21 15 16 10 5 21'},
218
+ ],
219
+ },
220
+ tag: {
221
+ style: 'stroke',
222
+ shapes: [
223
+ {
224
+ tag: 'path',
225
+ d: 'M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z',
226
+ },
227
+ {tag: 'line', x1: 7, y1: 7, x2: 7.01, y2: 7},
228
+ ],
229
+ },
230
+ 'pie-chart': {
231
+ style: 'stroke',
232
+ shapes: [
233
+ {tag: 'path', d: 'M21.21 15.89A10 10 0 1 1 8 2.83'},
234
+ {tag: 'path', d: 'M22 12A10 10 0 0 0 12 2v10z'},
235
+ ],
236
+ },
237
+ users: {
238
+ style: 'stroke',
239
+ shapes: [
240
+ {tag: 'path', d: 'M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'},
241
+ {tag: 'circle', cx: 9, cy: 7, r: 4},
242
+ {tag: 'path', d: 'M23 21v-2a4 4 0 0 0-3-3.87'},
243
+ {tag: 'path', d: 'M16 3.13a4 4 0 0 1 0 7.75'},
244
+ ],
245
+ },
246
+ 'user-plus': {
247
+ style: 'stroke',
248
+ shapes: [
249
+ {tag: 'path', d: 'M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'},
250
+ {tag: 'circle', cx: 8.5, cy: 7, r: 4},
251
+ {tag: 'line', x1: 20, y1: 8, x2: 20, y2: 14},
252
+ {tag: 'line', x1: 23, y1: 11, x2: 17, y2: 11},
253
+ ],
254
+ },
255
+ mail: {
256
+ style: 'stroke',
257
+ shapes: [
258
+ {
259
+ tag: 'path',
260
+ d: 'M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z',
261
+ },
262
+ {tag: 'polyline', points: '22,6 12,13 2,6'},
263
+ ],
264
+ },
265
+ 'file-text': {
266
+ style: 'stroke',
267
+ shapes: [
268
+ {tag: 'path', d: 'M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'},
269
+ {tag: 'polyline', points: '14 2 14 8 20 8'},
270
+ {tag: 'line', x1: 16, y1: 13, x2: 8, y2: 13},
271
+ {tag: 'line', x1: 16, y1: 17, x2: 8, y2: 17},
272
+ {tag: 'polyline', points: '10 9 9 9 8 9'},
273
+ ],
274
+ },
275
+ plug: {
276
+ style: 'stroke',
277
+ shapes: [
278
+ {tag: 'path', d: 'M12 22v-5'},
279
+ {tag: 'path', d: 'M9 8V2'},
280
+ {tag: 'path', d: 'M15 8V2'},
281
+ {tag: 'path', d: 'M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z'},
282
+ ],
283
+ },
284
+ pin: {
285
+ style: 'stroke',
286
+ shapes: [
287
+ {tag: 'line', x1: 12, y1: 17, x2: 12, y2: 22},
288
+ {
289
+ tag: 'path',
290
+ d: 'M9 10.76V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v6.76a2 2 0 0 0 .55 1.38l1.68 1.78A1 1 0 0 1 16.5 16h-9a1 1 0 0 1-.73-1.68l1.68-1.78A2 2 0 0 0 9 10.76z',
291
+ },
292
+ ],
293
+ },
294
+ search: {
295
+ style: 'stroke',
296
+ shapes: [
297
+ {tag: 'circle', cx: 11, cy: 11, r: 8},
298
+ {tag: 'line', x1: 21, y1: 21, x2: 16.65, y2: 16.65},
299
+ ],
300
+ },
301
+ x: {
302
+ style: 'stroke',
303
+ shapes: [
304
+ {tag: 'line', x1: 18, y1: 6, x2: 6, y2: 18},
305
+ {tag: 'line', x1: 6, y1: 6, x2: 18, y2: 18},
306
+ ],
307
+ },
308
+ mic: {
309
+ style: 'stroke',
310
+ shapes: [
311
+ {tag: 'path', d: 'M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z'},
312
+ {tag: 'path', d: 'M19 10v2a7 7 0 0 1-14 0v-2'},
313
+ {tag: 'line', x1: 12, y1: 19, x2: 12, y2: 23},
314
+ {tag: 'line', x1: 8, y1: 23, x2: 16, y2: 23},
315
+ ],
316
+ },
317
+ sun: {
318
+ style: 'stroke',
319
+ shapes: [
320
+ {tag: 'circle', cx: 12, cy: 12, r: 5},
321
+ {tag: 'line', x1: 12, y1: 1, x2: 12, y2: 3},
322
+ {tag: 'line', x1: 12, y1: 21, x2: 12, y2: 23},
323
+ {tag: 'line', x1: 4.22, y1: 4.22, x2: 5.64, y2: 5.64},
324
+ {tag: 'line', x1: 18.36, y1: 18.36, x2: 19.78, y2: 19.78},
325
+ {tag: 'line', x1: 1, y1: 12, x2: 3, y2: 12},
326
+ {tag: 'line', x1: 21, y1: 12, x2: 23, y2: 12},
327
+ {tag: 'line', x1: 4.22, y1: 19.78, x2: 5.64, y2: 18.36},
328
+ {tag: 'line', x1: 18.36, y1: 5.64, x2: 19.78, y2: 4.22},
329
+ ],
330
+ },
331
+ moon: {
332
+ style: 'stroke',
333
+ shapes: [{tag: 'path', d: 'M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'}],
334
+ },
335
+ monitor: {
336
+ style: 'stroke',
337
+ shapes: [
338
+ {tag: 'rect', x: 2, y: 3, width: 20, height: 14, rx: 2, ry: 2},
339
+ {tag: 'line', x1: 8, y1: 21, x2: 16, y2: 21},
340
+ {tag: 'line', x1: 12, y1: 17, x2: 12, y2: 21},
341
+ ],
342
+ },
343
+ contrast: {
344
+ style: 'stroke',
345
+ shapes: [
346
+ {tag: 'circle', cx: 12, cy: 12, r: 10},
347
+ {tag: 'path', d: 'M12 2a10 10 0 0 1 0 20z', fill: 'currentColor', stroke: 'none'},
348
+ ],
349
+ },
350
+ signal: {
351
+ style: 'stroke',
352
+ shapes: [
353
+ {tag: 'line', x1: 4, y1: 20, x2: 4, y2: 16},
354
+ {tag: 'line', x1: 9, y1: 20, x2: 9, y2: 12},
355
+ {tag: 'line', x1: 14, y1: 20, x2: 14, y2: 8},
356
+ {tag: 'line', x1: 19, y1: 20, x2: 19, y2: 4},
357
+ ],
358
+ },
359
+ battery: {
360
+ style: 'stroke',
361
+ shapes: [
362
+ {tag: 'rect', x: 2, y: 7, width: 17, height: 10, rx: 2},
363
+ {tag: 'line', x1: 22, y1: 11, x2: 22, y2: 13},
364
+ ],
365
+ },
366
+ video: {
367
+ style: 'stroke',
368
+ shapes: [
369
+ {tag: 'rect', x: 2, y: 6, width: 14, height: 12, rx: 2},
370
+ {tag: 'path', d: 'M16 10l6-3v10l-6-3z'},
371
+ ],
372
+ },
373
+ music: {
374
+ style: 'stroke',
375
+ shapes: [
376
+ {tag: 'path', d: 'M9 18V5l12-2v13'},
377
+ {tag: 'circle', cx: 6, cy: 18, r: 3},
378
+ {tag: 'circle', cx: 18, cy: 16, r: 3},
379
+ ],
380
+ },
381
+ play: {
382
+ style: 'stroke',
383
+ shapes: [{tag: 'path', d: 'M6 4l14 8-14 8z'}],
384
+ },
385
+ pause: {
386
+ style: 'stroke',
387
+ shapes: [
388
+ {tag: 'rect', x: 6, y: 4, width: 4, height: 16},
389
+ {tag: 'rect', x: 14, y: 4, width: 4, height: 16},
390
+ ],
391
+ },
392
+ 'info-circle-filled': {
393
+ style: 'fill',
394
+ shapes: [
395
+ {
396
+ tag: 'path',
397
+ fillRule: 'evenodd',
398
+ d: 'M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm-.75 6a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0zM11 11a1 1 0 1 1 2 0v5a1 1 0 1 1-2 0v-5z',
399
+ },
400
+ ],
401
+ },
402
+ 'alert-triangle-filled': {
403
+ style: 'fill',
404
+ shapes: [
405
+ {
406
+ tag: 'path',
407
+ fillRule: 'evenodd',
408
+ d: 'M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0zM11 10a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0v-3zm.25 6a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0z',
409
+ },
410
+ ],
411
+ },
412
+ 'check-circle-filled': {
413
+ style: 'fill',
414
+ shapes: [
415
+ {
416
+ tag: 'path',
417
+ fillRule: 'evenodd',
418
+ d: 'M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm4.707 8.707a1 1 0 0 0-1.414-1.414L11 13.586l-2.293-2.293a1 1 0 0 0-1.414 1.414l3 3a1 1 0 0 0 1.414 0l5-5z',
419
+ },
420
+ ],
421
+ },
422
+ 'x-circle-filled': {
423
+ style: 'fill',
424
+ shapes: [
425
+ {
426
+ tag: 'path',
427
+ fillRule: 'evenodd',
428
+ d: 'M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM9.707 8.293a1 1 0 0 0-1.414 1.414L10.586 12l-2.293 2.293a1 1 0 1 0 1.414 1.414L12 13.414l2.293 2.293a1 1 0 0 0 1.414-1.414L13.414 12l2.293-2.293a1 1 0 0 0-1.414-1.414L12 10.586 9.707 8.293z',
429
+ },
430
+ ],
431
+ },
432
+ 'shield-filled': {
433
+ style: 'fill',
434
+ shapes: [
435
+ {
436
+ tag: 'path',
437
+ fillRule: 'evenodd',
438
+ d: 'M12 1L3 5v7c0 6.5 8.5 10.5 9 10.73.5-.23 9-4.23 9-10.73V5l-9-4zm3.707 8.707a1 1 0 0 0-1.414-1.414L11 11.586l-1.293-1.293a1 1 0 0 0-1.414 1.414l2 2a1 1 0 0 0 1.414 0l4-4z',
439
+ },
440
+ ],
441
+ },
442
+ 'lock-filled': {
443
+ style: 'fill',
444
+ shapes: [
445
+ {
446
+ tag: 'path',
447
+ d: 'M7 11V7a5 5 0 0 1 10 0v4',
448
+ fill: 'none',
449
+ stroke: 'currentColor',
450
+ strokeWidth: 2,
451
+ strokeLinecap: 'round',
452
+ },
453
+ {tag: 'rect', x: 3, y: 11, width: 18, height: 11, rx: 2, ry: 2},
454
+ ],
455
+ },
456
+ }
@@ -0,0 +1,74 @@
1
+ import type {ColorToken, IconSize} from '@duro-app/tokens/keys'
2
+
3
+ export type {IconSize}
4
+
5
+ export type IconName =
6
+ | 'x-circle'
7
+ | 'check-circle'
8
+ | 'check-done'
9
+ | 'clock'
10
+ | 'forbidden'
11
+ | 'info-circle'
12
+ | 'alert-triangle'
13
+ | 'shield'
14
+ | 'lock'
15
+ | 'key'
16
+ // Navigation / wayfinding glyphs
17
+ | 'map'
18
+ | 'layers'
19
+ | 'repeat'
20
+ | 'database'
21
+ | 'shield-check'
22
+ | 'route'
23
+ | 'git-branch'
24
+ | 'menu'
25
+ | 'pin'
26
+ // Infrastructure / inventory glyphs
27
+ | 'server'
28
+ | 'hard-drive'
29
+ | 'box'
30
+ | 'image'
31
+ | 'tag'
32
+ | 'pie-chart'
33
+ // People / access / admin glyphs
34
+ | 'users'
35
+ | 'user-plus'
36
+ | 'mail'
37
+ | 'file-text'
38
+ | 'plug'
39
+ // Input / action glyphs
40
+ | 'search'
41
+ | 'mic'
42
+ | 'x'
43
+ // Color-mode glyphs
44
+ | 'sun'
45
+ | 'moon'
46
+ | 'monitor'
47
+ | 'contrast'
48
+ // Device status glyphs
49
+ | 'signal'
50
+ | 'battery'
51
+ // Media glyphs
52
+ | 'video'
53
+ | 'music'
54
+ | 'play'
55
+ | 'pause'
56
+ // Filled variants (solid shape with cutout symbol)
57
+ | 'info-circle-filled'
58
+ | 'alert-triangle-filled'
59
+ | 'check-circle-filled'
60
+ | 'x-circle-filled'
61
+ | 'shield-filled'
62
+ | 'lock-filled'
63
+
64
+ export interface IconProps {
65
+ name: IconName
66
+ /** Token from the icon size scale: sm 16, md 18, lg 24, xl 36, xxl 48. */
67
+ size?: IconSize
68
+ /**
69
+ * Colour token. Default: the surrounding text colour on the web
70
+ * (`currentColor`), the `text` token on native, where an icon cannot
71
+ * inherit a colour.
72
+ */
73
+ color?: ColorToken
74
+ }
@@ -46,6 +46,10 @@ interface InputProps {
46
46
  | 'name'
47
47
  | 'tel'
48
48
  | 'url'
49
+ /** Phone keyboards: how the typed text is capitalised. */
50
+ autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters'
51
+ /** Whether the platform checks (and on phones, autocorrects) the spelling. */
52
+ spellCheck?: boolean
49
53
  value?: string
50
54
  defaultValue?: string
51
55
  disabled?: boolean
@@ -82,6 +86,8 @@ export function Input({
82
86
  list,
83
87
  pattern,
84
88
  autoComplete,
89
+ autoCapitalize,
90
+ spellCheck,
85
91
  value,
86
92
  defaultValue,
87
93
  disabled,
@@ -137,6 +143,8 @@ export function Input({
137
143
  required={required}
138
144
  minLength={minLength}
139
145
  autoComplete={autoComplete}
146
+ autoCapitalize={autoCapitalize}
147
+ spellCheck={spellCheck}
140
148
  value={effectiveValue}
141
149
  defaultValue={defaultValue}
142
150
  disabled={effectiveDisabled}
@@ -8,6 +8,8 @@ import {borders} from '@duro-app/tokens/tokens/borders.css'
8
8
  export const styles = css.create({
9
9
  base: {
10
10
  width: '100%',
11
+ // Native has no border-box reset (the web's global-reset.css); declare it.
12
+ boxSizing: 'border-box',
11
13
  paddingTop: spacing.sm,
12
14
  paddingBottom: spacing.sm,
13
15
  paddingLeft: spacing.md,
@@ -62,5 +62,7 @@ export const styles = css.create({
62
62
  },
63
63
  fullWidth: {
64
64
  width: '100%',
65
+ // Native has no border-box reset (the web's global-reset.css); declare it.
66
+ boxSizing: 'border-box',
65
67
  },
66
68
  })
@@ -2,7 +2,7 @@ import type {ComponentMeta} from '../component-meta'
2
2
 
3
3
  export const meta: ComponentMeta = {
4
4
  description:
5
- 'Dropdown action menu. Triggers actions (not value selection). Compound component — Root is required (throws without it). Menu.Trigger renders the button itself: give it the label (text, an Icon), never a Button; an icon-only trigger takes aria-label, and variant="ghost" suits toolbars; size="small" matches small Toggles and Buttons (a small ghost trigger is iconButtonSm). The popup is portalled and placed against the trigger (never clipped by a sticky or overflow ancestor), capped at sizes.listMaxH with scrolling, and takes focus on open (WAI-ARIA menu button); Escape closes only the menu, not an enclosing Popover or Dialog.',
5
+ 'Dropdown action menu. Triggers actions (not value selection). Compound component — Root is required (throws without it). Menu.Trigger renders the button itself: give it the label (text, an Icon), never a Button; an icon-only trigger takes aria-label, and variant="ghost" suits toolbars; size="small" matches small Toggles and Buttons (a small ghost trigger is iconButtonSm). The popup is portalled and placed against the trigger (never clipped by a sticky or overflow ancestor), capped at sizes.listMaxH with scrolling, and takes focus on open (WAI-ARIA menu button); Escape closes only the menu, not an enclosing Popover or Dialog. On React Native the popup is placed against the trigger in a modal overlay; a press outside or the Android back button closes it, and an item runs its onClick after the menu has gone (so an item can open a Dialog). Menu.LinkItem takes onNavigate(href, event) on both platforms (ADR-0002); on native, without it or without preventDefault, the link opens with the system. Native has no arrow keys: each item is its own screen-reader stop.',
6
6
  whenToUse: [
7
7
  'Context menu or "more actions" dropdown',
8
8
  'Navigation links in a dropdown',