@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,55 @@
1
+ import { css } from 'react-strict-dom';
2
+ /**
3
+ * Native Drawer surfaces. Motion is Reanimated's (plan N0, Decision 4): these
4
+ * styles draw the panel and backdrop, the animated views around them move them.
5
+ */
6
+ export declare const nativeStyles: Readonly<{
7
+ readonly fill: Readonly<{
8
+ readonly position: css.StyleXClassNameFor<"position", "absolute">;
9
+ readonly top: css.StyleXClassNameFor<"top", 0>;
10
+ readonly left: css.StyleXClassNameFor<"left", 0>;
11
+ readonly right: css.StyleXClassNameFor<"right", 0>;
12
+ readonly bottom: css.StyleXClassNameFor<"bottom", 0>;
13
+ }>;
14
+ readonly scrim: Readonly<{
15
+ readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", string>;
16
+ }>;
17
+ readonly panel: Readonly<{
18
+ readonly flexGrow: css.StyleXClassNameFor<"flexGrow", 1>;
19
+ readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", string>;
20
+ readonly boxShadow: css.StyleXClassNameFor<"boxShadow", string>;
21
+ readonly display: css.StyleXClassNameFor<"display", "flex">;
22
+ readonly flexDirection: css.StyleXClassNameFor<"flexDirection", "column">;
23
+ readonly overflow: css.StyleXClassNameFor<"overflow", "hidden">;
24
+ }>;
25
+ readonly panelBottom: Readonly<{
26
+ readonly borderTopWidth: css.StyleXClassNameFor<"borderTopWidth", string>;
27
+ readonly borderTopStyle: css.StyleXClassNameFor<"borderTopStyle", "solid">;
28
+ readonly borderTopColor: css.StyleXClassNameFor<"borderTopColor", string>;
29
+ readonly borderTopLeftRadius: css.StyleXClassNameFor<"borderTopLeftRadius", string>;
30
+ readonly borderTopRightRadius: css.StyleXClassNameFor<"borderTopRightRadius", string>;
31
+ }>;
32
+ readonly panelRight: Readonly<{
33
+ readonly borderLeftWidth: css.StyleXClassNameFor<"borderLeftWidth", string>;
34
+ readonly borderLeftStyle: css.StyleXClassNameFor<"borderLeftStyle", "solid">;
35
+ readonly borderLeftColor: css.StyleXClassNameFor<"borderLeftColor", string>;
36
+ }>;
37
+ readonly panelLeft: Readonly<{
38
+ readonly borderRightWidth: css.StyleXClassNameFor<"borderRightWidth", string>;
39
+ readonly borderRightStyle: css.StyleXClassNameFor<"borderRightStyle", "solid">;
40
+ readonly borderRightColor: css.StyleXClassNameFor<"borderRightColor", string>;
41
+ }>;
42
+ readonly insets: (top: number, bottom: number) => readonly [Readonly<{
43
+ paddingTop: css.StyleXClassNameFor<"paddingTop", number>;
44
+ paddingBottom: css.StyleXClassNameFor<"paddingBottom", number>;
45
+ }>, css.InlineStyles];
46
+ readonly bodyContent: Readonly<{
47
+ readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
48
+ readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
49
+ readonly paddingBottom: css.StyleXClassNameFor<"paddingBottom", string>;
50
+ }>;
51
+ readonly hiddenBelow: (height: number) => readonly [Readonly<{
52
+ paddingBottom: css.StyleXClassNameFor<"paddingBottom", number>;
53
+ }>, css.InlineStyles];
54
+ }>;
55
+ //# sourceMappingURL=native.css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native.css.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/native.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAMpC;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+CvB,CAAA"}
@@ -0,0 +1,96 @@
1
+ import { css } from 'react-strict-dom';
2
+ /** Styles of the Drawer parts both platforms draw (no animations: native has none). */
3
+ export declare const partStyles: Readonly<{
4
+ readonly grabberHit: Readonly<{
5
+ readonly display: css.StyleXClassNameFor<"display", "flex">;
6
+ readonly alignItems: css.StyleXClassNameFor<"alignItems", "center">;
7
+ readonly justifyContent: css.StyleXClassNameFor<"justifyContent", "center">;
8
+ readonly alignSelf: css.StyleXClassNameFor<"alignSelf", "stretch">;
9
+ readonly flexShrink: css.StyleXClassNameFor<"flexShrink", 0>;
10
+ readonly paddingTop: css.StyleXClassNameFor<"paddingTop", string>;
11
+ readonly paddingBottom: css.StyleXClassNameFor<"paddingBottom", string>;
12
+ readonly borderWidth: css.StyleXClassNameFor<"borderWidth", 0>;
13
+ readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", "transparent">;
14
+ }>;
15
+ readonly grabber: Readonly<{
16
+ readonly display: css.StyleXClassNameFor<"display", "block">;
17
+ readonly width: css.StyleXClassNameFor<"width", string>;
18
+ readonly height: css.StyleXClassNameFor<"height", string>;
19
+ readonly borderRadius: css.StyleXClassNameFor<"borderRadius", string>;
20
+ readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", string>;
21
+ }>;
22
+ readonly header: Readonly<{
23
+ readonly flexShrink: css.StyleXClassNameFor<"flexShrink", 0>;
24
+ readonly display: css.StyleXClassNameFor<"display", "flex">;
25
+ readonly alignItems: css.StyleXClassNameFor<"alignItems", "flex-start">;
26
+ readonly justifyContent: css.StyleXClassNameFor<"justifyContent", "space-between">;
27
+ readonly paddingTop: css.StyleXClassNameFor<"paddingTop", string>;
28
+ readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
29
+ readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
30
+ readonly paddingBottom: css.StyleXClassNameFor<"paddingBottom", string>;
31
+ readonly gap: css.StyleXClassNameFor<"gap", string>;
32
+ }>;
33
+ readonly headerUnderGrabber: Readonly<{
34
+ readonly paddingTop: css.StyleXClassNameFor<"paddingTop", 0>;
35
+ }>;
36
+ readonly headerCentered: Readonly<{
37
+ readonly alignItems: css.StyleXClassNameFor<"alignItems", "center">;
38
+ }>;
39
+ readonly headerSide: Readonly<{
40
+ readonly display: css.StyleXClassNameFor<"display", "flex">;
41
+ readonly flexGrow: css.StyleXClassNameFor<"flexGrow", 1>;
42
+ readonly flexBasis: css.StyleXClassNameFor<"flexBasis", 0>;
43
+ }>;
44
+ readonly headerEnd: Readonly<{
45
+ readonly justifyContent: css.StyleXClassNameFor<"justifyContent", "flex-end">;
46
+ }>;
47
+ readonly title: Readonly<{
48
+ readonly fontSize: css.StyleXClassNameFor<"fontSize", string>;
49
+ readonly fontWeight: css.StyleXClassNameFor<"fontWeight", string>;
50
+ readonly lineHeight: css.StyleXClassNameFor<"lineHeight", string>;
51
+ readonly color: css.StyleXClassNameFor<"color", string>;
52
+ readonly margin: css.StyleXClassNameFor<"margin", 0>;
53
+ }>;
54
+ readonly description: Readonly<{
55
+ readonly fontSize: css.StyleXClassNameFor<"fontSize", string>;
56
+ readonly lineHeight: css.StyleXClassNameFor<"lineHeight", string>;
57
+ readonly color: css.StyleXClassNameFor<"color", string>;
58
+ readonly margin: css.StyleXClassNameFor<"margin", 0>;
59
+ readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
60
+ readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
61
+ readonly paddingBottom: css.StyleXClassNameFor<"paddingBottom", string>;
62
+ }>;
63
+ readonly footer: Readonly<{
64
+ readonly display: css.StyleXClassNameFor<"display", "flex">;
65
+ readonly alignItems: css.StyleXClassNameFor<"alignItems", "center">;
66
+ readonly justifyContent: css.StyleXClassNameFor<"justifyContent", "flex-end">;
67
+ readonly gap: css.StyleXClassNameFor<"gap", string>;
68
+ readonly paddingTop: css.StyleXClassNameFor<"paddingTop", string>;
69
+ readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
70
+ readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
71
+ readonly paddingBottom: css.StyleXClassNameFor<"paddingBottom", string>;
72
+ readonly borderTopWidth: css.StyleXClassNameFor<"borderTopWidth", string>;
73
+ readonly borderTopStyle: css.StyleXClassNameFor<"borderTopStyle", "solid">;
74
+ readonly borderTopColor: css.StyleXClassNameFor<"borderTopColor", string>;
75
+ }>;
76
+ readonly closeButton: Readonly<{
77
+ readonly display: css.StyleXClassNameFor<"display", "flex">;
78
+ readonly alignItems: css.StyleXClassNameFor<"alignItems", "center">;
79
+ readonly justifyContent: css.StyleXClassNameFor<"justifyContent", "center">;
80
+ readonly width: css.StyleXClassNameFor<"width", string>;
81
+ readonly height: css.StyleXClassNameFor<"height", string>;
82
+ readonly borderRadius: css.StyleXClassNameFor<"borderRadius", string>;
83
+ readonly borderWidth: css.StyleXClassNameFor<"borderWidth", 0>;
84
+ readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", string>;
85
+ readonly color: css.StyleXClassNameFor<"color", string>;
86
+ readonly cursor: css.StyleXClassNameFor<"cursor", "pointer">;
87
+ readonly padding: css.StyleXClassNameFor<"padding", 0>;
88
+ readonly flexShrink: css.StyleXClassNameFor<"flexShrink", 0>;
89
+ readonly transitionProperty: css.StyleXClassNameFor<"transitionProperty", "background-color">;
90
+ readonly transitionDuration: css.StyleXClassNameFor<"transitionDuration", string>;
91
+ }>;
92
+ readonly inlineWrapper: Readonly<{
93
+ readonly display: css.StyleXClassNameFor<"display", "inline-flex">;
94
+ }>;
95
+ }>;
96
+ //# sourceMappingURL=parts.css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parts.css.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/parts.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAQpC,uFAAuF;AACvF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmHrB,CAAA"}
@@ -0,0 +1,56 @@
1
+ import { ReactNode, RefObject } from 'react';
2
+ import { DurationToken } from '@duro-app/tokens/keys';
3
+ import { SnapPoint } from './sheetPhysics';
4
+ export type DrawerAnchor = 'right' | 'left' | 'bottom';
5
+ export type DrawerSize = 'sm' | 'md' | 'lg';
6
+ export type { SnapPoint };
7
+ export interface DrawerContextValue {
8
+ /** Rendered: open, or playing the exit animation. */
9
+ open: boolean;
10
+ closing: boolean;
11
+ closeDuration: DurationToken;
12
+ anchor: DrawerAnchor;
13
+ dismissable: boolean;
14
+ swipeDismiss: boolean;
15
+ requestOpen: () => void;
16
+ requestClose: () => void;
17
+ /** Close immediately without the exit animation (a swipe has played its own) */
18
+ requestCloseImmediate: () => void;
19
+ titleId: string;
20
+ descriptionId: string;
21
+ /** The panel's host: a DOM element on the web, a view on native */
22
+ panelRef: RefObject<unknown>;
23
+ /** A bottom sheet's detents, ascending; empty when the drawer has none */
24
+ snapPoints: readonly SnapPoint[];
25
+ /** Index into snapPoints the sheet rests at */
26
+ snapIndex: number;
27
+ setSnapIndex: (index: number) => void;
28
+ }
29
+ export declare const DrawerContext: import('react').Context<DrawerContextValue | null>;
30
+ export declare function useDrawer(): DrawerContextValue;
31
+ export interface GrabberLabels {
32
+ /** The grabber's name when a press grows the sheet */
33
+ expand: string;
34
+ /** The grabber's name when a press shrinks it */
35
+ collapse: string;
36
+ }
37
+ export declare const DEFAULT_GRABBER_LABELS: GrabberLabels;
38
+ interface HeaderProps {
39
+ children: ReactNode;
40
+ /**
41
+ * 'center' puts the Title in the middle and the other children at the end,
42
+ * as a phone sheet does (a text close button on the right). Default: 'start'
43
+ */
44
+ titleAlign?: 'start' | 'center';
45
+ }
46
+ export declare function Header({ children, titleAlign }: HeaderProps): import("react/jsx-runtime").JSX.Element;
47
+ export declare function Title({ children }: {
48
+ children: ReactNode;
49
+ }): import("react/jsx-runtime").JSX.Element;
50
+ export declare function Description({ children }: {
51
+ children: ReactNode;
52
+ }): import("react/jsx-runtime").JSX.Element;
53
+ export declare function Footer({ children }: {
54
+ children: ReactNode;
55
+ }): import("react/jsx-runtime").JSX.Element;
56
+ //# sourceMappingURL=parts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/parts.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EAEf,MAAM,OAAO,CAAA;AAEd,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAA;AAE7C,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAA;AACtD,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAC3C,YAAY,EAAC,SAAS,EAAC,CAAA;AAEvB,MAAM,WAAW,kBAAkB;IACjC,qDAAqD;IACrD,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;IAChB,aAAa,EAAE,aAAa,CAAA;IAC5B,MAAM,EAAE,YAAY,CAAA;IACpB,WAAW,EAAE,OAAO,CAAA;IACpB,YAAY,EAAE,OAAO,CAAA;IACrB,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,gFAAgF;IAChF,qBAAqB,EAAE,MAAM,IAAI,CAAA;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,MAAM,CAAA;IACrB,mEAAmE;IACnE,QAAQ,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;IAC5B,0EAA0E;IAC1E,UAAU,EAAE,SAAS,SAAS,EAAE,CAAA;IAChC,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACtC;AAED,eAAO,MAAM,aAAa,oDAAiD,CAAA;AAE3E,wBAAgB,SAAS,uBAIxB;AAED,MAAM,WAAW,aAAa;IAC5B,sDAAsD;IACtD,MAAM,EAAE,MAAM,CAAA;IACd,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,eAAO,MAAM,sBAAsB,EAAE,aAGpC,CAAA;AAID,UAAU,WAAW;IACnB,QAAQ,EAAE,SAAS,CAAA;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;CAChC;AAED,wBAAgB,MAAM,CAAC,EAAC,QAAQ,EAAE,UAAoB,EAAC,EAAE,WAAW,2CAgBnE;AAED,wBAAgB,KAAK,CAAC,EAAC,QAAQ,EAAC,EAAE;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAC,2CAOtD;AAED,wBAAgB,WAAW,CAAC,EAAC,QAAQ,EAAC,EAAE;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAC,2CAO5D;AAED,wBAAgB,MAAM,CAAC,EAAC,QAAQ,EAAC,EAAE;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAC,2CAEvD"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * The drawer's drag rules, shared by the web (pointer events) and native
3
+ * (Gesture Handler on the UI thread) so both settle a drag the same way.
4
+ * Pure numbers: no DOM, no React Native. The functions the native drag
5
+ * calls on the UI thread are worklets ('worklet'); on the web the directive
6
+ * is an inert string.
7
+ */
8
+ /** A bottom-sheet detent (plan N0, Decision 5). */
9
+ export type SnapPoint = 'medium' | 'large';
10
+ /** Fraction of the panel (or of the lowest detent) a drag must cover to dismiss */
11
+ export declare const DISMISS_THRESHOLD = 0.3;
12
+ /** Release speed (px/ms) that dismisses, or moves one detent, whatever the distance */
13
+ export declare const VELOCITY_THRESHOLD = 0.5;
14
+ /** Duration of the slide-out once a drag dismisses (ms) */
15
+ export declare const DISMISS_DURATION: 160;
16
+ /** Duration of the settle onto a detent, or the snap back (ms) */
17
+ export declare const SNAP_DURATION: 200;
18
+ /** Movement (px) before a press becomes a drag; under it a tap stays a tap */
19
+ export declare const DRAG_SLOP = 8;
20
+ /** Movement (px) across the drag's axis that hands the gesture to a scroll instead */
21
+ export declare const CROSS_SLOP = 16;
22
+ /** 'medium' is half the window */
23
+ export declare const MEDIUM_FRACTION = 0.5;
24
+ /** How far (px) a snap sheet may be pulled past its largest detent: it resists, never further */
25
+ export declare const SNAP_MAX_OVERSHOOT: 24;
26
+ /** Height of one detent: 'medium' half the window, 'large' the window less its top inset. */
27
+ export declare function detentHeight(point: SnapPoint, windowHeight: number, topInset: number): number;
28
+ /** The detents in ascending height, each once. */
29
+ export declare function sortSnapPoints(points: readonly SnapPoint[]): SnapPoint[];
30
+ /**
31
+ * Where a released drag settles: a detent index into `heights` (ascending),
32
+ * or 'dismiss'.
33
+ *
34
+ * - A fling (|velocity| over VELOCITY_THRESHOLD) moves one detent in its
35
+ * direction from the detent it started at; down from the lowest dismisses.
36
+ * - Otherwise the nearest detent wins, unless the sheet is below the lowest
37
+ * by more than DISMISS_THRESHOLD of it, which dismisses.
38
+ *
39
+ * `velocity` is px/ms, positive downward (closing).
40
+ */
41
+ export declare function settleDetent({ heights, from, height, velocity, }: {
42
+ heights: readonly number[];
43
+ from: number;
44
+ height: number;
45
+ velocity: number;
46
+ }): number | 'dismiss';
47
+ /** The grabber's tap: the next detent up, wrapping from the largest to the smallest. */
48
+ export declare function cycleDetent(index: number, count: number): number;
49
+ /**
50
+ * Past the largest detent the sheet resists: the overshoot grows ever more
51
+ * slowly and never exceeds `max`.
52
+ */
53
+ export declare function rubberBand(overshoot: number, max: number): number;
54
+ /** Whether a side drawer's release dismisses it. `movement` is toward its edge. */
55
+ export declare function shouldDismissEdge(movement: number, size: number, velocity: number): boolean;
56
+ //# sourceMappingURL=sheetPhysics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheetPhysics.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/sheetPhysics.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,mDAAmD;AACnD,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE1C,mFAAmF;AACnF,eAAO,MAAM,iBAAiB,MAAM,CAAA;AAEpC,uFAAuF;AACvF,eAAO,MAAM,kBAAkB,MAAM,CAAA;AAErC,2DAA2D;AAC3D,eAAO,MAAM,gBAAgB,KAAoB,CAAA;AAEjD,kEAAkE;AAClE,eAAO,MAAM,aAAa,KAAmB,CAAA;AAE7C,8EAA8E;AAC9E,eAAO,MAAM,SAAS,IAAI,CAAA;AAE1B,sFAAsF;AACtF,eAAO,MAAM,UAAU,KAAK,CAAA;AAE5B,kCAAkC;AAClC,eAAO,MAAM,eAAe,MAAM,CAAA;AAElC,iGAAiG;AACjG,eAAO,MAAM,kBAAkB,IAAgB,CAAA;AAE/C,6FAA6F;AAC7F,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG7F;AAED,kDAAkD;AAClD,wBAAgB,cAAc,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,GAAG,SAAS,EAAE,CAExE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,IAAI,EACJ,MAAM,EACN,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;CACjB,GAAG,MAAM,GAAG,SAAS,CAWrB;AAED,wFAAwF;AACxF,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAGhE;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAIjE;AAED,mFAAmF;AACnF,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAG3F"}
@@ -51,6 +51,7 @@ export declare const styles: Readonly<{
51
51
  }>;
52
52
  readonly panelHorizontal: Readonly<{
53
53
  readonly width: css.StyleXClassNameFor<"width", "100%">;
54
+ readonly boxSizing: css.StyleXClassNameFor<"boxSizing", "border-box">;
54
55
  readonly height: css.StyleXClassNameFor<"height", "100%">;
55
56
  readonly borderLeftWidth: css.StyleXClassNameFor<"borderLeftWidth", string>;
56
57
  readonly borderLeftStyle: css.StyleXClassNameFor<"borderLeftStyle", "solid">;
@@ -58,6 +59,7 @@ export declare const styles: Readonly<{
58
59
  }>;
59
60
  readonly panelVertical: Readonly<{
60
61
  readonly width: css.StyleXClassNameFor<"width", "100%">;
62
+ readonly boxSizing: css.StyleXClassNameFor<"boxSizing", "border-box">;
61
63
  readonly borderTopWidth: css.StyleXClassNameFor<"borderTopWidth", string>;
62
64
  readonly borderTopStyle: css.StyleXClassNameFor<"borderTopStyle", "solid">;
63
65
  readonly borderTopColor: css.StyleXClassNameFor<"borderTopColor", string>;
@@ -65,6 +67,19 @@ export declare const styles: Readonly<{
65
67
  readonly borderTopRightRadius: css.StyleXClassNameFor<"borderTopRightRadius", string>;
66
68
  readonly maxHeight: css.StyleXClassNameFor<"maxHeight", "85vh">;
67
69
  }>;
70
+ readonly panelSnap: Readonly<{
71
+ readonly maxHeight: css.StyleXClassNameFor<"maxHeight", "none">;
72
+ readonly transitionProperty: css.StyleXClassNameFor<"transitionProperty", "height">;
73
+ readonly transitionDuration: css.StyleXClassNameFor<"transitionDuration", string>;
74
+ readonly transitionTimingFunction: css.StyleXClassNameFor<"transitionTimingFunction", string>;
75
+ }>;
76
+ readonly sheetHeight: (height: number) => readonly [Readonly<{
77
+ height: css.StyleXClassNameFor<"height", number>;
78
+ }>, css.InlineStyles];
79
+ readonly grabberHitWeb: Readonly<{
80
+ readonly cursor: css.StyleXClassNameFor<"cursor", "grab">;
81
+ readonly touchAction: css.StyleXClassNameFor<"touchAction", "none">;
82
+ }>;
68
83
  readonly panelLeftBorder: Readonly<{
69
84
  readonly borderLeftWidth: css.StyleXClassNameFor<"borderLeftWidth", 0>;
70
85
  readonly borderRightWidth: css.StyleXClassNameFor<"borderRightWidth", string>;
@@ -137,32 +152,6 @@ export declare const styles: Readonly<{
137
152
  readonly closeDurationSlow: Readonly<{
138
153
  readonly animationDuration: css.StyleXClassNameFor<"animationDuration", string>;
139
154
  }>;
140
- readonly header: Readonly<{
141
- readonly display: css.StyleXClassNameFor<"display", "flex">;
142
- readonly alignItems: css.StyleXClassNameFor<"alignItems", "flex-start">;
143
- readonly justifyContent: css.StyleXClassNameFor<"justifyContent", "space-between">;
144
- readonly paddingTop: css.StyleXClassNameFor<"paddingTop", string>;
145
- readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
146
- readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
147
- readonly paddingBottom: css.StyleXClassNameFor<"paddingBottom", string>;
148
- readonly gap: css.StyleXClassNameFor<"gap", string>;
149
- }>;
150
- readonly title: Readonly<{
151
- readonly fontSize: css.StyleXClassNameFor<"fontSize", string>;
152
- readonly fontWeight: css.StyleXClassNameFor<"fontWeight", string>;
153
- readonly lineHeight: css.StyleXClassNameFor<"lineHeight", string>;
154
- readonly color: css.StyleXClassNameFor<"color", string>;
155
- readonly margin: css.StyleXClassNameFor<"margin", 0>;
156
- }>;
157
- readonly description: Readonly<{
158
- readonly fontSize: css.StyleXClassNameFor<"fontSize", string>;
159
- readonly lineHeight: css.StyleXClassNameFor<"lineHeight", string>;
160
- readonly color: css.StyleXClassNameFor<"color", string>;
161
- readonly margin: css.StyleXClassNameFor<"margin", 0>;
162
- readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
163
- readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
164
- readonly paddingBottom: css.StyleXClassNameFor<"paddingBottom", string>;
165
- }>;
166
155
  readonly body: Readonly<{
167
156
  readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
168
157
  readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
@@ -170,37 +159,5 @@ export declare const styles: Readonly<{
170
159
  readonly overflowY: css.StyleXClassNameFor<"overflowY", "auto">;
171
160
  readonly flex: css.StyleXClassNameFor<"flex", 1>;
172
161
  }>;
173
- readonly footer: Readonly<{
174
- readonly display: css.StyleXClassNameFor<"display", "flex">;
175
- readonly alignItems: css.StyleXClassNameFor<"alignItems", "center">;
176
- readonly justifyContent: css.StyleXClassNameFor<"justifyContent", "flex-end">;
177
- readonly gap: css.StyleXClassNameFor<"gap", string>;
178
- readonly paddingTop: css.StyleXClassNameFor<"paddingTop", string>;
179
- readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
180
- readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
181
- readonly paddingBottom: css.StyleXClassNameFor<"paddingBottom", string>;
182
- readonly borderTopWidth: css.StyleXClassNameFor<"borderTopWidth", string>;
183
- readonly borderTopStyle: css.StyleXClassNameFor<"borderTopStyle", "solid">;
184
- readonly borderTopColor: css.StyleXClassNameFor<"borderTopColor", string>;
185
- }>;
186
- readonly closeButton: Readonly<{
187
- readonly display: css.StyleXClassNameFor<"display", "flex">;
188
- readonly alignItems: css.StyleXClassNameFor<"alignItems", "center">;
189
- readonly justifyContent: css.StyleXClassNameFor<"justifyContent", "center">;
190
- readonly width: css.StyleXClassNameFor<"width", string>;
191
- readonly height: css.StyleXClassNameFor<"height", string>;
192
- readonly borderRadius: css.StyleXClassNameFor<"borderRadius", string>;
193
- readonly borderWidth: css.StyleXClassNameFor<"borderWidth", 0>;
194
- readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", string>;
195
- readonly color: css.StyleXClassNameFor<"color", string>;
196
- readonly cursor: css.StyleXClassNameFor<"cursor", "pointer">;
197
- readonly padding: css.StyleXClassNameFor<"padding", 0>;
198
- readonly flexShrink: css.StyleXClassNameFor<"flexShrink", 0>;
199
- readonly transitionProperty: css.StyleXClassNameFor<"transitionProperty", "background-color">;
200
- readonly transitionDuration: css.StyleXClassNameFor<"transitionDuration", string>;
201
- }>;
202
- readonly inlineWrapper: Readonly<{
203
- readonly display: css.StyleXClassNameFor<"display", "inline-flex">;
204
- }>;
205
162
  }>;
206
163
  //# sourceMappingURL=styles.css.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAUpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyPjB,CAAA"}
1
+ {"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AASpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmMjB,CAAA"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Real touch input and viewport control for Storybook interaction tests
3
+ * (the Drawer's, SplitPane's), through
4
+ * Chrome DevTools Protocol: synthetic pointer events neither scroll nor go
5
+ * through touch adjustment the way a finger does.
6
+ */
7
+ export type Point = {
8
+ x: number;
9
+ y: number;
10
+ };
11
+ /**
12
+ * A CDP command. `vitest/browser` loads only under the test runner, so it is
13
+ * imported here, at call time: a static import breaks the built Storybook.
14
+ * `CDPSession` is empty until the provider's typings load; `send` exists at runtime.
15
+ */
16
+ export declare function cdpSend(method: string, params: object): Promise<unknown>;
17
+ /** Set the page's viewport (test runner only, like `cdpSend`). */
18
+ export declare function setViewport(width: number, height: number): Promise<void>;
19
+ export declare const pause: (ms: number) => Promise<unknown>;
20
+ /**
21
+ * CDP input lands in top-level page coordinates; the story runs in an iframe
22
+ * the test runner offsets and may scale to fit. Map a point up every frame.
23
+ */
24
+ export declare function toPage(p: Point): Point;
25
+ /**
26
+ * A finger drag from one point to another, in `steps` moves 16 ms apart.
27
+ * Each move is a round trip to the browser; few of them keep a test well
28
+ * inside its timeout on a loaded machine.
29
+ */
30
+ export declare function touchDrag(from: Point, to: Point, steps?: number): Promise<void>;
31
+ /** A finger tap. */
32
+ export declare function touchTap(at: Point): Promise<void>;
33
+ /** The centre of an element, in its own document's coordinates. */
34
+ export declare function centre(el: Element): Point;
35
+ //# sourceMappingURL=touchInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"touchInput.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/touchInput.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,KAAK,GAAG;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,CAAA;AAE1C;;;;GAIG;AACH,wBAAsB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,oBAI3D;AAED,kEAAkE;AAClE,wBAAsB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAG9D;AAED,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM,qBAA0C,CAAA;AAE1E;;;GAGG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,GAAG,KAAK,CAWtC;AASD;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,SAAI,iBAWhE;AAED,oBAAoB;AACpB,wBAAsB,QAAQ,CAAC,EAAE,EAAE,KAAK,iBAGvC;AAED,mEAAmE;AACnE,wBAAgB,MAAM,CAAC,EAAE,EAAE,OAAO,GAAG,KAAK,CAGzC"}
@@ -0,0 +1,33 @@
1
+ import { ReactNode } from 'react';
2
+ import { DurationToken } from '@duro-app/tokens/keys';
3
+ import { DrawerAnchor, DrawerContextValue } from './parts';
4
+ import { SnapPoint } from './sheetPhysics';
5
+ export interface DrawerRootProps {
6
+ children: ReactNode;
7
+ /** Controlled open state */
8
+ open?: boolean;
9
+ /** Default open state (uncontrolled) */
10
+ defaultOpen?: boolean;
11
+ /** Called when drawer open state changes */
12
+ onOpenChange?: (open: boolean) => void;
13
+ /** Which edge the drawer slides from. Default: 'right' */
14
+ anchor?: DrawerAnchor;
15
+ /** Whether clicking backdrop or pressing Escape (Android's back button on native) closes the drawer. Default: true */
16
+ dismissable?: boolean;
17
+ /** Whether swipe gesture dismisses the drawer. Default: true */
18
+ swipeDismiss?: boolean;
19
+ /** Motion token for the close animation. Default: 'fast' (150ms) */
20
+ closeAnimationDuration?: DurationToken;
21
+ /**
22
+ * Bottom anchor only: the heights the sheet rests at. 'medium' is half the
23
+ * window, 'large' the window less its top safe-area inset. A drag moves
24
+ * between them and dismisses below the lowest; the grabber steps through
25
+ * them on a tap. Without it, a bottom drawer is as tall as its content.
26
+ */
27
+ snapPoints?: readonly SnapPoint[];
28
+ /** The detent the sheet opens at. Default: the lowest of snapPoints */
29
+ defaultSnapPoint?: SnapPoint;
30
+ }
31
+ /** The state both platforms' Drawer.Root share: open and closing, ids, and the detent. */
32
+ export declare function useDrawerRoot({ open: controlledOpen, defaultOpen, onOpenChange, anchor, dismissable, swipeDismiss, closeAnimationDuration, snapPoints: snapPointsProp, defaultSnapPoint, }: Omit<DrawerRootProps, 'children'>): DrawerContextValue;
33
+ //# sourceMappingURL=useDrawerRoot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDrawerRoot.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/useDrawerRoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,SAAS,EAA8C,MAAM,OAAO,CAAA;AACjF,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAC,YAAY,EAAE,kBAAkB,EAAC,MAAM,SAAS,CAAA;AAC7D,OAAO,EAAiB,KAAK,SAAS,EAAC,MAAM,gBAAgB,CAAA;AAE7D,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,SAAS,CAAA;IACnB,4BAA4B;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,wCAAwC;IACxC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,0DAA0D;IAC1D,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,sHAAsH;IACtH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gEAAgE;IAChE,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,oEAAoE;IACpE,sBAAsB,CAAC,EAAE,aAAa,CAAA;IACtC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,SAAS,SAAS,EAAE,CAAA;IACjC,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,SAAS,CAAA;CAC7B;AAED,0FAA0F;AAC1F,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EAAE,cAAc,EACpB,WAAmB,EACnB,YAAY,EACZ,MAAgB,EAChB,WAAkB,EAClB,YAAmB,EACnB,sBAA+B,EAC/B,UAAU,EAAE,cAAc,EAC1B,gBAAgB,GACjB,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,GAAG,kBAAkB,CA6CxD"}
@@ -0,0 +1,7 @@
1
+ import { SnapPoint } from './sheetPhysics';
2
+ /**
3
+ * Web: each detent's height in px, ascending, following the window as it
4
+ * resizes (a rotated phone, an opened on-screen keyboard).
5
+ */
6
+ export declare function useSheetHeights(points: readonly SnapPoint[], active: boolean): number[];
7
+ //# sourceMappingURL=useSheetHeights.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSheetHeights.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/useSheetHeights.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,KAAK,SAAS,EAAC,MAAM,gBAAgB,CAAA;AAqB3D;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,EAAE,CAevF"}
@@ -1,4 +1,13 @@
1
- import { DrawerAnchor } from './Drawer';
1
+ import { DrawerAnchor } from './parts';
2
+ /** A bottom sheet's detents: the drag moves between them before it dismisses. */
3
+ export interface SwipeSnap {
4
+ /** Each detent's height in px, ascending */
5
+ heights: readonly number[];
6
+ /** The detent the sheet rests at */
7
+ index: number;
8
+ /** A drag settled on another detent */
9
+ onSnap: (index: number) => void;
10
+ }
2
11
  interface UseSwipeDismissOptions {
3
12
  anchor: DrawerAnchor;
4
13
  enabled: boolean;
@@ -9,6 +18,8 @@ interface UseSwipeDismissOptions {
9
18
  * exists, and listeners must follow the element that is actually shown.
10
19
  */
11
20
  panel: HTMLDivElement | null;
21
+ /** Bottom anchor with snapPoints: drag between detents, dismiss below the lowest */
22
+ snap?: SwipeSnap | null;
12
23
  }
13
24
  /**
14
25
  * Hook that adds swipe-to-dismiss gesture to a drawer panel.
@@ -17,6 +28,6 @@ interface UseSwipeDismissOptions {
17
28
  * Opposite direction: iOS-style — panel stays anchored, shows subtle
18
29
  * overscroll feedback (box-shadow intensifies), then snaps back.
19
30
  */
20
- export declare function useSwipeDismiss({ anchor, enabled, onDismiss, panel }: UseSwipeDismissOptions): void;
31
+ export declare function useSwipeDismiss({ anchor, enabled, onDismiss, panel, snap, }: UseSwipeDismissOptions): void;
21
32
  export {};
22
33
  //# sourceMappingURL=useSwipeDismiss.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSwipeDismiss.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/useSwipeDismiss.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,UAAU,CAAA;AAkB1C,UAAU,sBAAsB;IAC9B,MAAM,EAAE,YAAY,CAAA;IACpB,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB;;;;OAIG;IACH,KAAK,EAAE,cAAc,GAAG,IAAI,CAAA;CAC7B;AAeD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAC,EAAE,sBAAsB,QAuS1F"}
1
+ {"version":3,"file":"useSwipeDismiss.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/useSwipeDismiss.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,SAAS,CAAA;AAkBzC,iFAAiF;AACjF,MAAM,WAAW,SAAS;IACxB,4CAA4C;IAC5C,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1B,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,uCAAuC;IACvC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAChC;AAED,UAAU,sBAAsB;IAC9B,MAAM,EAAE,YAAY,CAAA;IACpB,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB;;;;OAIG;IACH,KAAK,EAAE,cAAc,GAAG,IAAI,CAAA;IAC5B,oFAAoF;IACpF,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;CACxB;AAiBD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,OAAO,EACP,SAAS,EACT,KAAK,EACL,IAAW,GACZ,EAAE,sBAAsB,QA0YxB"}
@@ -69,6 +69,7 @@ export declare const styles: Readonly<{
69
69
  readonly flexWrap: css.StyleXClassNameFor<"flexWrap", "wrap">;
70
70
  readonly alignItems: css.StyleXClassNameFor<"alignItems", "stretch">;
71
71
  readonly width: css.StyleXClassNameFor<"width", "100%">;
72
+ readonly boxSizing: css.StyleXClassNameFor<"boxSizing", "border-box">;
72
73
  }>;
73
74
  readonly nativeCell: (basis: string) => readonly [Readonly<{
74
75
  flexBasis: css.StyleXClassNameFor<"flexBasis", string>;
@@ -1 +1 @@
1
- {"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Grid/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAgBpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyGjB,CAAA"}
1
+ {"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Grid/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAgBpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2GjB,CAAA"}
@@ -1,10 +1,4 @@
1
- import { IconSize } from '@duro-app/tokens/keys';
2
- export type { IconSize };
3
- export type IconName = 'x-circle' | 'check-circle' | 'check-done' | 'clock' | 'forbidden' | 'info-circle' | 'alert-triangle' | 'shield' | 'lock' | 'key' | 'map' | 'layers' | 'repeat' | 'database' | 'shield-check' | 'route' | 'git-branch' | 'menu' | 'pin' | 'server' | 'hard-drive' | 'box' | 'image' | 'tag' | 'pie-chart' | 'users' | 'user-plus' | 'mail' | 'file-text' | 'plug' | 'search' | 'mic' | 'sun' | 'moon' | 'monitor' | 'contrast' | 'signal' | 'battery' | 'video' | 'music' | 'play' | 'pause' | 'info-circle-filled' | 'alert-triangle-filled' | 'check-circle-filled' | 'x-circle-filled' | 'shield-filled' | 'lock-filled';
4
- interface IconProps {
5
- name: IconName;
6
- /** Token from the icon size scale: sm 16, md 18, lg 24, xl 36, xxl 48. */
7
- size?: IconSize;
8
- }
9
- export declare function Icon({ name, size: sizeToken }: IconProps): import("react/jsx-runtime").JSX.Element;
1
+ import { IconProps } from './types';
2
+ export type { IconName, IconProps, IconSize } from './types';
3
+ export declare function Icon({ name, size: sizeToken, color }: IconProps): import("react/jsx-runtime").JSX.Element;
10
4
  //# sourceMappingURL=Icon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,QAAQ,EAAC,MAAM,uBAAuB,CAAA;AAE/D,YAAY,EAAC,QAAQ,EAAC,CAAA;AAEtB,MAAM,MAAM,QAAQ,GAChB,UAAU,GACV,cAAc,GACd,YAAY,GACZ,OAAO,GACP,WAAW,GACX,aAAa,GACb,gBAAgB,GAChB,QAAQ,GACR,MAAM,GACN,KAAK,GAEL,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,cAAc,GACd,OAAO,GACP,YAAY,GACZ,MAAM,GACN,KAAK,GAEL,QAAQ,GACR,YAAY,GACZ,KAAK,GACL,OAAO,GACP,KAAK,GACL,WAAW,GAEX,OAAO,GACP,WAAW,GACX,MAAM,GACN,WAAW,GACX,MAAM,GAEN,QAAQ,GACR,KAAK,GAEL,KAAK,GACL,MAAM,GACN,SAAS,GACT,UAAU,GAEV,QAAQ,GACR,SAAS,GAET,OAAO,GACP,OAAO,GACP,MAAM,GACN,OAAO,GAEP,oBAAoB,GACpB,uBAAuB,GACvB,qBAAqB,GACrB,iBAAiB,GACjB,eAAe,GACf,aAAa,CAAA;AA0WjB,UAAU,SAAS;IACjB,IAAI,EAAE,QAAQ,CAAA;IACd,0EAA0E;IAC1E,IAAI,CAAC,EAAE,QAAQ,CAAA;CAChB;AAED,wBAAgB,IAAI,CAAC,EAAC,IAAI,EAAE,IAAI,EAAE,SAAgB,EAAC,EAAE,SAAS,2CAyB7D"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,SAAS,CAAA;AAEtC,YAAY,EAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,SAAS,CAAA;AAQ1D,wBAAgB,IAAI,CAAC,EAAC,IAAI,EAAE,IAAI,EAAE,SAAgB,EAAE,KAAK,EAAC,EAAE,SAAS,2CA4BpE"}
@@ -0,0 +1,60 @@
1
+ import { IconName } from './types';
2
+ /**
3
+ * Icon glyphs as renderer-independent geometry on a 24-unit grid (plan N0,
4
+ * Decision 9): the web draws them as SVG elements, native with the renderer
5
+ * the icon benchmark picks. Generated once from the JSX tables Icon.tsx held
6
+ * through 5.11; edit the data here.
7
+ *
8
+ * A `stroke` glyph is drawn with a 2-unit stroke, round caps and joins, and no
9
+ * fill. A `fill` glyph is filled, with even-odd cutouts where `fillRule` says;
10
+ * a shape inside it may carry its own stroke (`lock-filled`'s shackle).
11
+ */
12
+ /** `currentColor` is the icon's colour (the text colour on the web, `color` on native). */
13
+ export type Paint = 'currentColor' | 'none';
14
+ export type Shape = {
15
+ tag: 'path';
16
+ d: string;
17
+ fillRule?: 'evenodd';
18
+ /** Paint override for this shape: the icon's colour, or none. */
19
+ fill?: Paint;
20
+ stroke?: Paint;
21
+ strokeWidth?: number;
22
+ strokeLinecap?: 'round';
23
+ } | {
24
+ tag: 'circle';
25
+ cx: number;
26
+ cy: number;
27
+ r: number;
28
+ } | {
29
+ tag: 'ellipse';
30
+ cx: number;
31
+ cy: number;
32
+ rx: number;
33
+ ry: number;
34
+ } | {
35
+ tag: 'line';
36
+ x1: number;
37
+ y1: number;
38
+ x2: number;
39
+ y2: number;
40
+ } | {
41
+ tag: 'rect';
42
+ x: number;
43
+ y: number;
44
+ width: number;
45
+ height: number;
46
+ rx?: number;
47
+ ry?: number;
48
+ } | {
49
+ tag: 'polyline';
50
+ points: string;
51
+ } | {
52
+ tag: 'polygon';
53
+ points: string;
54
+ };
55
+ export interface Glyph {
56
+ readonly style: 'stroke' | 'fill';
57
+ readonly shapes: readonly Shape[];
58
+ }
59
+ export declare const GLYPHS: Record<IconName, Glyph>;
60
+ //# sourceMappingURL=geometry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/geometry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAA;AAErC;;;;;;;;;GASG;AACH,2FAA2F;AAC3F,MAAM,MAAM,KAAK,GAAG,cAAc,GAAG,MAAM,CAAA;AAE3C,MAAM,MAAM,KAAK,GACb;IACE,GAAG,EAAE,MAAM,CAAA;IACX,CAAC,EAAE,MAAM,CAAA;IACT,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,iEAAiE;IACjE,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,GACD;IAAC,GAAG,EAAE,QAAQ,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,GAClD;IAAC,GAAG,EAAE,SAAS,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAC,GAChE;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAC,GAC7D;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAC,GAC5F;IAAC,GAAG,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,GACjC;IAAC,GAAG,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,CAAA;AAEpC,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAAA;IACjC,QAAQ,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,CAAA;CAClC;AAED,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,CAia1C,CAAA"}