@fairgarden/design 0.1.0-alpha.1 → 0.1.0-alpha.2

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 (517) hide show
  1. package/LICENSE +21 -0
  2. package/Readme.md +51 -27
  3. package/actions/button/Button.d.ts.map +1 -1
  4. package/actions/button/Button.js +13 -1
  5. package/actions/button/Button.js.map +1 -1
  6. package/actions/button/button.module.css +85 -25
  7. package/actions/chip/Chip.d.ts +2 -2
  8. package/actions/chip/Chip.js +2 -2
  9. package/actions/chip/chip.module.css +12 -18
  10. package/actions/link/Link.d.ts +1 -1
  11. package/actions/link/link.module.css +22 -19
  12. package/actions/toggle/Toggle.js +1 -1
  13. package/actions/toggle/toggle.module.css +27 -23
  14. package/content/card/card.module.css +27 -27
  15. package/content/card-grid/CardGrid.js +1 -1
  16. package/content/card-grid/card-grid.module.css +3 -3
  17. package/content/carousel/Carousel.d.ts.map +1 -1
  18. package/content/carousel/Carousel.js +1 -4
  19. package/content/carousel/Carousel.js.map +1 -1
  20. package/content/carousel/carousel.module.css +19 -9
  21. package/content/code-block/CodeActionsMenu.d.ts +34 -0
  22. package/content/code-block/CodeActionsMenu.d.ts.map +1 -0
  23. package/content/code-block/CodeActionsMenu.js +102 -0
  24. package/content/code-block/CodeActionsMenu.js.map +1 -0
  25. package/content/code-block/CodeBlock.d.ts +37 -0
  26. package/content/code-block/CodeBlock.d.ts.map +1 -0
  27. package/content/code-block/CodeBlock.js +30 -0
  28. package/content/code-block/CodeBlock.js.map +1 -0
  29. package/content/code-block/CodeBlockFrame.d.ts +54 -0
  30. package/content/code-block/CodeBlockFrame.d.ts.map +1 -0
  31. package/content/code-block/CodeBlockFrame.js +80 -0
  32. package/content/code-block/CodeBlockFrame.js.map +1 -0
  33. package/content/code-block/CodeBlockHeader.d.ts +26 -0
  34. package/content/code-block/CodeBlockHeader.d.ts.map +1 -0
  35. package/content/code-block/CodeBlockHeader.js +16 -0
  36. package/content/code-block/CodeBlockHeader.js.map +1 -0
  37. package/content/code-block/CodeBlockLazy.d.ts +11 -0
  38. package/content/code-block/CodeBlockLazy.d.ts.map +1 -0
  39. package/content/code-block/CodeBlockLazy.js +14 -0
  40. package/content/code-block/CodeBlockLazy.js.map +1 -0
  41. package/content/code-block/CodeBlockLoading.d.ts +31 -0
  42. package/content/code-block/CodeBlockLoading.d.ts.map +1 -0
  43. package/content/code-block/CodeBlockLoading.js +90 -0
  44. package/content/code-block/CodeBlockLoading.js.map +1 -0
  45. package/content/code-block/CodeBlockSection.d.ts +40 -0
  46. package/content/code-block/CodeBlockSection.d.ts.map +1 -0
  47. package/content/code-block/CodeBlockSection.js +105 -0
  48. package/content/code-block/CodeBlockSection.js.map +1 -0
  49. package/content/code-block/CodeBlockToasts.d.ts +26 -0
  50. package/content/code-block/CodeBlockToasts.d.ts.map +1 -0
  51. package/content/code-block/CodeBlockToasts.js +88 -0
  52. package/content/code-block/CodeBlockToasts.js.map +1 -0
  53. package/content/code-block/code-block.module.css +949 -0
  54. package/content/code-block/index.d.ts +4 -0
  55. package/content/code-block/index.d.ts.map +1 -0
  56. package/content/code-block/index.js +4 -0
  57. package/content/code-block/index.js.map +1 -0
  58. package/content/demo/DemoContent.d.ts +32 -0
  59. package/content/demo/DemoContent.d.ts.map +1 -0
  60. package/content/demo/DemoContent.js +87 -0
  61. package/content/demo/DemoContent.js.map +1 -0
  62. package/content/demo/DemoFrame.d.ts +6 -0
  63. package/content/demo/DemoFrame.d.ts.map +1 -0
  64. package/content/demo/DemoFrame.js +17 -0
  65. package/content/demo/DemoFrame.js.map +1 -0
  66. package/content/demo/DemoLazy.d.ts +11 -0
  67. package/content/demo/DemoLazy.d.ts.map +1 -0
  68. package/content/demo/DemoLazy.js +14 -0
  69. package/content/demo/DemoLazy.js.map +1 -0
  70. package/content/demo/DemoLoading.d.ts +23 -0
  71. package/content/demo/DemoLoading.d.ts.map +1 -0
  72. package/content/demo/DemoLoading.js +26 -0
  73. package/content/demo/DemoLoading.js.map +1 -0
  74. package/content/demo/demo.module.css +163 -0
  75. package/content/demo/index.d.ts +4 -0
  76. package/content/demo/index.d.ts.map +1 -0
  77. package/content/demo/index.js +4 -0
  78. package/content/demo/index.js.map +1 -0
  79. package/content/empty-state/EmptyState.d.ts +1 -1
  80. package/content/empty-state/EmptyState.js +1 -1
  81. package/content/empty-state/empty-state.module.css +11 -11
  82. package/content/feature-grid/feature-grid.module.css +22 -22
  83. package/content/index-rows/IndexRows.d.ts +2 -2
  84. package/content/index-rows/IndexRows.d.ts.map +1 -1
  85. package/content/index-rows/IndexRows.js +1 -1
  86. package/content/index-rows/index-rows.module.css +29 -29
  87. package/content/pricing/Pricing.d.ts +4 -4
  88. package/content/pricing/Pricing.d.ts.map +1 -1
  89. package/content/pricing/Pricing.js +4 -4
  90. package/content/pricing/Pricing.js.map +1 -1
  91. package/content/pricing/pricing.module.css +22 -22
  92. package/content/profile/Profile.d.ts +1 -1
  93. package/content/profile/Profile.js +2 -2
  94. package/content/profile/profile.module.css +13 -13
  95. package/content/quote/Quote.d.ts +1 -1
  96. package/content/quote/quote.module.css +9 -9
  97. package/content/timeline/Timeline.d.ts +1 -1
  98. package/content/timeline/Timeline.d.ts.map +1 -1
  99. package/content/timeline/Timeline.js +5 -5
  100. package/content/timeline/Timeline.js.map +1 -1
  101. package/content/timeline/timeline.module.css +12 -12
  102. package/content/types-table/TypePre.d.ts +11 -0
  103. package/content/types-table/TypePre.d.ts.map +1 -0
  104. package/content/types-table/TypePre.js +13 -0
  105. package/content/types-table/TypePre.js.map +1 -0
  106. package/content/types-table/TypesTable.d.ts +22 -0
  107. package/content/types-table/TypesTable.d.ts.map +1 -0
  108. package/content/types-table/TypesTable.js +124 -0
  109. package/content/types-table/TypesTable.js.map +1 -0
  110. package/content/types-table/index.d.ts +3 -0
  111. package/content/types-table/index.d.ts.map +1 -0
  112. package/content/types-table/index.js +3 -0
  113. package/content/types-table/index.js.map +1 -0
  114. package/content/types-table/types-table.module.css +160 -0
  115. package/data/chart/Chart.d.ts +8 -1
  116. package/data/chart/Chart.d.ts.map +1 -1
  117. package/data/chart/Chart.js +28 -15
  118. package/data/chart/Chart.js.map +1 -1
  119. package/data/chart/chart.module.css +20 -6
  120. package/data/figure/Figure.d.ts +1 -1
  121. package/data/figure/Figure.js +1 -1
  122. package/data/figure/figure.module.css +7 -7
  123. package/data/map/Map.d.ts +3 -3
  124. package/data/map/Map.d.ts.map +1 -1
  125. package/data/map/Map.js +10 -8
  126. package/data/map/Map.js.map +1 -1
  127. package/data/map/MapCanvas.d.ts.map +1 -1
  128. package/data/map/MapCanvas.js +5 -9
  129. package/data/map/MapCanvas.js.map +1 -1
  130. package/data/map/map.module.css +39 -14
  131. package/data/map/mapStyle.d.ts +2 -2
  132. package/data/map/mapStyle.d.ts.map +1 -1
  133. package/data/map/mapStyle.js +5 -5
  134. package/data/map/mapStyle.js.map +1 -1
  135. package/data/scroll-area/ScrollArea.d.ts.map +1 -1
  136. package/data/scroll-area/ScrollArea.js +8 -4
  137. package/data/scroll-area/ScrollArea.js.map +1 -1
  138. package/data/scroll-area/scroll-area.module.css +28 -9
  139. package/data/spec-grid/spec-grid.module.css +8 -8
  140. package/data/spec-list/spec-list.module.css +3 -3
  141. package/data/spec-sheet/SpecSheet.d.ts +2 -2
  142. package/data/spec-sheet/SpecSheet.js +1 -1
  143. package/data/spec-sheet/spec-sheet.module.css +9 -9
  144. package/data/stat/Stat.d.ts +1 -1
  145. package/data/stat/Stat.d.ts.map +1 -1
  146. package/data/stat/stat.module.css +4 -4
  147. package/data/table/Table.d.ts +6 -5
  148. package/data/table/Table.d.ts.map +1 -1
  149. package/data/table/Table.js.map +1 -1
  150. package/data/table/table.module.css +43 -46
  151. package/disclosure/accordion/Accordion.d.ts +1 -1
  152. package/disclosure/accordion/Accordion.js +1 -1
  153. package/disclosure/accordion/accordion.module.css +12 -12
  154. package/disclosure/collapsible/Collapsible.d.ts +4 -4
  155. package/disclosure/collapsible/Collapsible.js +4 -4
  156. package/disclosure/collapsible/collapsible.module.css +10 -10
  157. package/disclosure/faq/FAQ.d.ts +3 -3
  158. package/disclosure/faq/FAQ.d.ts.map +1 -1
  159. package/disclosure/faq/FAQ.js +3 -3
  160. package/disclosure/faq/FAQ.js.map +1 -1
  161. package/disclosure/faq/faq.module.css +20 -20
  162. package/feedback/alert/alert.module.css +4 -4
  163. package/feedback/avatar/avatar-group.module.css +2 -2
  164. package/feedback/avatar/avatar.module.css +9 -9
  165. package/feedback/badge/Badge.d.ts +1 -1
  166. package/feedback/badge/badge.module.css +7 -7
  167. package/feedback/meter/Meter.d.ts +2 -2
  168. package/feedback/meter/meter.module.css +14 -14
  169. package/feedback/progress/Progress.d.ts +1 -1
  170. package/feedback/progress/progress.module.css +7 -7
  171. package/feedback/tag/tag.module.css +7 -7
  172. package/feedback/toast/Toast.d.ts +3 -3
  173. package/feedback/toast/Toast.d.ts.map +1 -1
  174. package/feedback/toast/Toast.js +17 -7
  175. package/feedback/toast/Toast.js.map +1 -1
  176. package/feedback/toast/toast.module.css +31 -20
  177. package/forms/autocomplete/Autocomplete.d.ts +11 -0
  178. package/forms/autocomplete/Autocomplete.d.ts.map +1 -1
  179. package/forms/autocomplete/Autocomplete.js +27 -6
  180. package/forms/autocomplete/Autocomplete.js.map +1 -1
  181. package/forms/autocomplete/autocomplete.module.css +35 -41
  182. package/forms/checkbox/Checkbox.js +1 -1
  183. package/forms/checkbox/checkbox.module.css +29 -25
  184. package/forms/checkbox-group/checkbox-group.module.css +4 -4
  185. package/forms/combobox/Combobox.d.ts +10 -0
  186. package/forms/combobox/Combobox.d.ts.map +1 -1
  187. package/forms/combobox/Combobox.js +28 -7
  188. package/forms/combobox/Combobox.js.map +1 -1
  189. package/forms/combobox/combobox.module.css +34 -41
  190. package/forms/field/field.module.css +1 -1
  191. package/forms/fieldset/Fieldset.d.ts +1 -1
  192. package/forms/fieldset/Fieldset.js +2 -2
  193. package/forms/fieldset/fieldset.module.css +14 -14
  194. package/forms/form/form.module.css +2 -2
  195. package/forms/input/Input.d.ts +10 -3
  196. package/forms/input/Input.d.ts.map +1 -1
  197. package/forms/input/Input.js +10 -4
  198. package/forms/input/Input.js.map +1 -1
  199. package/forms/input/input.module.css +38 -21
  200. package/forms/number-field/number-field.module.css +24 -23
  201. package/forms/radio/Radio.d.ts +1 -1
  202. package/forms/radio/Radio.d.ts.map +1 -1
  203. package/forms/radio/Radio.js +5 -3
  204. package/forms/radio/Radio.js.map +1 -1
  205. package/forms/radio/radio.module.css +38 -30
  206. package/forms/radio-group/RadioGroup.d.ts +1 -1
  207. package/forms/radio-group/radio-group.module.css +3 -3
  208. package/forms/search/Search.d.ts +10 -0
  209. package/forms/search/Search.d.ts.map +1 -1
  210. package/forms/search/Search.js +25 -6
  211. package/forms/search/Search.js.map +1 -1
  212. package/forms/search/search.module.css +25 -33
  213. package/forms/select/Select.d.ts +10 -2
  214. package/forms/select/Select.d.ts.map +1 -1
  215. package/forms/select/Select.js +27 -12
  216. package/forms/select/Select.js.map +1 -1
  217. package/forms/select/select.module.css +42 -48
  218. package/forms/slider/Slider.js +2 -2
  219. package/forms/slider/slider.module.css +23 -23
  220. package/forms/switch/Switch.js +1 -1
  221. package/forms/switch/switch.module.css +23 -19
  222. package/foundations/expanding-box/ExpandingBox.d.ts +86 -0
  223. package/foundations/expanding-box/ExpandingBox.d.ts.map +1 -0
  224. package/foundations/expanding-box/ExpandingBox.js +179 -0
  225. package/foundations/expanding-box/ExpandingBox.js.map +1 -0
  226. package/foundations/expanding-box/expanding-box.module.css +415 -0
  227. package/foundations/expanding-box/index.d.ts +3 -0
  228. package/foundations/expanding-box/index.d.ts.map +1 -0
  229. package/foundations/expanding-box/index.js +3 -0
  230. package/foundations/expanding-box/index.js.map +1 -0
  231. package/foundations/expanding-box/startExpandingTransition.d.ts +33 -0
  232. package/foundations/expanding-box/startExpandingTransition.d.ts.map +1 -0
  233. package/foundations/expanding-box/startExpandingTransition.js +82 -0
  234. package/foundations/expanding-box/startExpandingTransition.js.map +1 -0
  235. package/foundations/ground/Ground.d.ts +1 -1
  236. package/foundations/ground/ground.module.css +4 -4
  237. package/foundations/icon/Icon.d.ts +1 -1
  238. package/foundations/icon/Icon.js +1 -1
  239. package/foundations/icon/icon.module.css +1 -1
  240. package/foundations/outline-morph/OutlineMorph.d.ts +112 -0
  241. package/foundations/outline-morph/OutlineMorph.d.ts.map +1 -0
  242. package/foundations/outline-morph/OutlineMorph.js +83 -0
  243. package/foundations/outline-morph/OutlineMorph.js.map +1 -0
  244. package/foundations/outline-morph/index.d.ts +3 -0
  245. package/foundations/outline-morph/index.d.ts.map +1 -0
  246. package/foundations/outline-morph/index.js +3 -0
  247. package/foundations/outline-morph/index.js.map +1 -0
  248. package/foundations/outline-morph/morphEngine.d.ts +219 -0
  249. package/foundations/outline-morph/morphEngine.d.ts.map +1 -0
  250. package/foundations/outline-morph/morphEngine.js +1331 -0
  251. package/foundations/outline-morph/morphEngine.js.map +1 -0
  252. package/foundations/outline-morph/outline-morph.module.css +113 -0
  253. package/foundations/outline-morph/useOutlineMorphRoot.d.ts +50 -0
  254. package/foundations/outline-morph/useOutlineMorphRoot.d.ts.map +1 -0
  255. package/foundations/outline-morph/useOutlineMorphRoot.js +55 -0
  256. package/foundations/outline-morph/useOutlineMorphRoot.js.map +1 -0
  257. package/foundations/separator/separator.module.css +10 -10
  258. package/foundations/sticker/Sticker.d.ts +4 -4
  259. package/foundations/sticker/Sticker.d.ts.map +1 -1
  260. package/foundations/sticker/Sticker.js +3 -3
  261. package/foundations/sticker/sticker.module.css +10 -10
  262. package/icons/paths.d.ts +1 -1
  263. package/icons/paths.d.ts.map +1 -1
  264. package/icons/paths.js +50 -0
  265. package/icons/paths.js.map +1 -1
  266. package/navigation/breadcrumb/Breadcrumb.d.ts +7 -1
  267. package/navigation/breadcrumb/Breadcrumb.d.ts.map +1 -1
  268. package/navigation/breadcrumb/Breadcrumb.js +8 -8
  269. package/navigation/breadcrumb/Breadcrumb.js.map +1 -1
  270. package/navigation/breadcrumb/breadcrumb.module.css +14 -14
  271. package/navigation/file-tabs/FileTabs.d.ts +169 -0
  272. package/navigation/file-tabs/FileTabs.d.ts.map +1 -0
  273. package/navigation/file-tabs/FileTabs.js +253 -0
  274. package/navigation/file-tabs/FileTabs.js.map +1 -0
  275. package/navigation/file-tabs/file-tabs.module.css +868 -0
  276. package/navigation/file-tabs/index.d.ts +2 -0
  277. package/navigation/file-tabs/index.d.ts.map +1 -0
  278. package/navigation/file-tabs/index.js +2 -0
  279. package/navigation/file-tabs/index.js.map +1 -0
  280. package/navigation/nav-drawer/NavDrawer.d.ts +32 -6
  281. package/navigation/nav-drawer/NavDrawer.d.ts.map +1 -1
  282. package/navigation/nav-drawer/NavDrawer.js +94 -28
  283. package/navigation/nav-drawer/NavDrawer.js.map +1 -1
  284. package/navigation/nav-drawer/nav-drawer.module.css +78 -55
  285. package/navigation/navigation-bar/NavigationBar.d.ts +31 -11
  286. package/navigation/navigation-bar/NavigationBar.d.ts.map +1 -1
  287. package/navigation/navigation-bar/NavigationBar.js +40 -17
  288. package/navigation/navigation-bar/NavigationBar.js.map +1 -1
  289. package/navigation/navigation-bar/navigation-bar.module.css +58 -27
  290. package/navigation/navigation-menu/NavigationMenu.d.ts +9 -9
  291. package/navigation/navigation-menu/NavigationMenu.d.ts.map +1 -1
  292. package/navigation/navigation-menu/NavigationMenu.js +15 -15
  293. package/navigation/navigation-menu/navigation-menu.module.css +39 -53
  294. package/navigation/pagination/Pagination.js +1 -1
  295. package/navigation/pagination/pagination.module.css +24 -24
  296. package/navigation/sidebar-nav/SidebarNav.d.ts +71 -0
  297. package/navigation/sidebar-nav/SidebarNav.d.ts.map +1 -0
  298. package/navigation/sidebar-nav/SidebarNav.js +169 -0
  299. package/navigation/sidebar-nav/SidebarNav.js.map +1 -0
  300. package/navigation/sidebar-nav/index.d.ts +2 -0
  301. package/navigation/sidebar-nav/index.d.ts.map +1 -0
  302. package/navigation/sidebar-nav/index.js +2 -0
  303. package/navigation/sidebar-nav/index.js.map +1 -0
  304. package/navigation/sidebar-nav/sidebar-nav.module.css +270 -0
  305. package/navigation/table-of-contents/TableOfContents.d.ts +92 -0
  306. package/navigation/table-of-contents/TableOfContents.d.ts.map +1 -0
  307. package/navigation/table-of-contents/TableOfContents.js +211 -0
  308. package/navigation/table-of-contents/TableOfContents.js.map +1 -0
  309. package/navigation/table-of-contents/index.d.ts +3 -0
  310. package/navigation/table-of-contents/index.d.ts.map +1 -0
  311. package/navigation/table-of-contents/index.js +3 -0
  312. package/navigation/table-of-contents/index.js.map +1 -0
  313. package/navigation/table-of-contents/table-of-contents.module.css +322 -0
  314. package/navigation/table-of-contents/useActiveHeading.d.ts +37 -0
  315. package/navigation/table-of-contents/useActiveHeading.d.ts.map +1 -0
  316. package/navigation/table-of-contents/useActiveHeading.js +111 -0
  317. package/navigation/table-of-contents/useActiveHeading.js.map +1 -0
  318. package/navigation/tabs/Tabs.d.ts +2 -2
  319. package/navigation/tabs/Tabs.js +3 -3
  320. package/navigation/tabs/tabs.module.css +22 -19
  321. package/navigation/toolbar/Toolbar.d.ts +7 -1
  322. package/navigation/toolbar/Toolbar.d.ts.map +1 -1
  323. package/navigation/toolbar/Toolbar.js +3 -3
  324. package/navigation/toolbar/Toolbar.js.map +1 -1
  325. package/navigation/toolbar/toolbar.module.css +6 -6
  326. package/overlays/alert-dialog/AlertDialog.d.ts +14 -4
  327. package/overlays/alert-dialog/AlertDialog.d.ts.map +1 -1
  328. package/overlays/alert-dialog/AlertDialog.js +15 -5
  329. package/overlays/alert-dialog/AlertDialog.js.map +1 -1
  330. package/overlays/alert-dialog/alert-dialog.module.css +4 -4
  331. package/overlays/context-menu/ContextMenu.d.ts +1 -1
  332. package/overlays/context-menu/ContextMenu.js +1 -1
  333. package/overlays/dialog/Dialog.d.ts +26 -11
  334. package/overlays/dialog/Dialog.d.ts.map +1 -1
  335. package/overlays/dialog/Dialog.js +36 -17
  336. package/overlays/dialog/Dialog.js.map +1 -1
  337. package/overlays/dialog/dialog.module.css +32 -31
  338. package/overlays/dialog/morph.d.ts +17 -0
  339. package/overlays/dialog/morph.d.ts.map +1 -0
  340. package/overlays/dialog/morph.js +44 -0
  341. package/overlays/dialog/morph.js.map +1 -0
  342. package/overlays/menu/Menu.d.ts +18 -7
  343. package/overlays/menu/Menu.d.ts.map +1 -1
  344. package/overlays/menu/Menu.js +35 -12
  345. package/overlays/menu/Menu.js.map +1 -1
  346. package/overlays/menu/menu.module.css +26 -50
  347. package/overlays/menu/morph.d.ts +16 -0
  348. package/overlays/menu/morph.d.ts.map +1 -0
  349. package/overlays/menu/morph.js +36 -0
  350. package/overlays/menu/morph.js.map +1 -0
  351. package/overlays/menu/popup.d.ts +2 -0
  352. package/overlays/menu/popup.d.ts.map +1 -1
  353. package/overlays/menu/popup.js +11 -3
  354. package/overlays/menu/popup.js.map +1 -1
  355. package/overlays/menubar/Menubar.d.ts +10 -1
  356. package/overlays/menubar/Menubar.d.ts.map +1 -1
  357. package/overlays/menubar/Menubar.js +22 -12
  358. package/overlays/menubar/Menubar.js.map +1 -1
  359. package/overlays/menubar/menubar.module.css +13 -13
  360. package/overlays/popover/Popover.d.ts +22 -8
  361. package/overlays/popover/Popover.d.ts.map +1 -1
  362. package/overlays/popover/Popover.js +51 -16
  363. package/overlays/popover/Popover.js.map +1 -1
  364. package/overlays/popover/popover.module.css +73 -47
  365. package/overlays/preview-card/PreviewCard.d.ts +3 -3
  366. package/overlays/preview-card/PreviewCard.d.ts.map +1 -1
  367. package/overlays/preview-card/PreviewCard.js +5 -6
  368. package/overlays/preview-card/PreviewCard.js.map +1 -1
  369. package/overlays/preview-card/preview-card.module.css +19 -54
  370. package/overlays/search-dialog/SearchDialog.d.ts +89 -0
  371. package/overlays/search-dialog/SearchDialog.d.ts.map +1 -0
  372. package/overlays/search-dialog/SearchDialog.js +220 -0
  373. package/overlays/search-dialog/SearchDialog.js.map +1 -0
  374. package/overlays/search-dialog/SearchDialogPopup.d.ts +39 -0
  375. package/overlays/search-dialog/SearchDialogPopup.d.ts.map +1 -0
  376. package/overlays/search-dialog/SearchDialogPopup.js +80 -0
  377. package/overlays/search-dialog/SearchDialogPopup.js.map +1 -0
  378. package/overlays/search-dialog/SearchDialogTrigger.d.ts +24 -0
  379. package/overlays/search-dialog/SearchDialogTrigger.d.ts.map +1 -0
  380. package/overlays/search-dialog/SearchDialogTrigger.js +32 -0
  381. package/overlays/search-dialog/SearchDialogTrigger.js.map +1 -0
  382. package/overlays/search-dialog/index.d.ts +3 -0
  383. package/overlays/search-dialog/index.d.ts.map +1 -0
  384. package/overlays/search-dialog/index.js +3 -0
  385. package/overlays/search-dialog/index.js.map +1 -0
  386. package/overlays/search-dialog/search-dialog.module.css +492 -0
  387. package/overlays/search-dialog/useShortcutLabel.d.ts +13 -0
  388. package/overlays/search-dialog/useShortcutLabel.d.ts.map +1 -0
  389. package/overlays/search-dialog/useShortcutLabel.js +19 -0
  390. package/overlays/search-dialog/useShortcutLabel.js.map +1 -0
  391. package/overlays/search-dialog/variants.d.ts +25 -0
  392. package/overlays/search-dialog/variants.d.ts.map +1 -0
  393. package/overlays/search-dialog/variants.js +31 -0
  394. package/overlays/search-dialog/variants.js.map +1 -0
  395. package/overlays/tooltip/Tooltip.d.ts +3 -3
  396. package/overlays/tooltip/Tooltip.d.ts.map +1 -1
  397. package/overlays/tooltip/Tooltip.js +3 -3
  398. package/overlays/tooltip/Tooltip.js.map +1 -1
  399. package/overlays/tooltip/tooltip.module.css +2 -2
  400. package/package.json +27 -19
  401. package/page/announcement-bar/AnnouncementBar.d.ts +1 -1
  402. package/page/announcement-bar/AnnouncementBar.js +4 -4
  403. package/page/announcement-bar/AnnouncementBar.js.map +1 -1
  404. package/page/announcement-bar/announcement-bar.module.css +11 -17
  405. package/page/cta-block/CTABlock.d.ts +5 -5
  406. package/page/cta-block/CTABlock.d.ts.map +1 -1
  407. package/page/cta-block/CTABlock.js +2 -2
  408. package/page/cta-block/cta-block.module.css +26 -26
  409. package/page/docs-layout/DocsLayout.d.ts +83 -0
  410. package/page/docs-layout/DocsLayout.d.ts.map +1 -0
  411. package/page/docs-layout/DocsLayout.js +108 -0
  412. package/page/docs-layout/DocsLayout.js.map +1 -0
  413. package/page/docs-layout/docs-layout.module.css +266 -0
  414. package/page/docs-layout/index.d.ts +2 -0
  415. package/page/docs-layout/index.d.ts.map +1 -0
  416. package/page/docs-layout/index.js +2 -0
  417. package/page/docs-layout/index.js.map +1 -0
  418. package/page/footer/Footer.d.ts +1 -1
  419. package/page/footer/Footer.js +1 -1
  420. package/page/footer/footer.module.css +31 -31
  421. package/page/hero/Hero.d.ts +3 -3
  422. package/page/hero/Hero.d.ts.map +1 -1
  423. package/page/hero/Hero.js +1 -1
  424. package/page/hero/hero.module.css +36 -36
  425. package/page/marquee/Marquee.d.ts +2 -2
  426. package/page/marquee/Marquee.js +1 -1
  427. package/page/marquee/marquee.module.css +11 -11
  428. package/page/newsletter/Newsletter.d.ts.map +1 -1
  429. package/page/newsletter/Newsletter.js +4 -59
  430. package/page/newsletter/Newsletter.js.map +1 -1
  431. package/page/newsletter/newsletter.module.css +44 -22
  432. package/page/section-bar/SectionBar.d.ts +10 -3
  433. package/page/section-bar/SectionBar.d.ts.map +1 -1
  434. package/page/section-bar/SectionBar.js +21 -11
  435. package/page/section-bar/SectionBar.js.map +1 -1
  436. package/page/section-bar/section-bar.module.css +43 -46
  437. package/page/section-divider/SectionDivider.d.ts +2 -2
  438. package/page/section-divider/SectionDivider.js +4 -4
  439. package/page/section-divider/SectionDivider.js.map +1 -1
  440. package/page/section-divider/section-divider.module.css +18 -18
  441. package/page/section-header/SectionHeader.d.ts +7 -7
  442. package/page/section-header/SectionHeader.d.ts.map +1 -1
  443. package/page/section-header/SectionHeader.js +3 -3
  444. package/page/section-header/SectionHeader.js.map +1 -1
  445. package/page/section-header/section-header.module.css +16 -16
  446. package/utils/Ornament.d.ts +1 -1
  447. package/utils/Ornament.js +2 -2
  448. package/utils/assignRef.d.ts +7 -1
  449. package/utils/assignRef.d.ts.map +1 -1
  450. package/utils/assignRef.js +18 -0
  451. package/utils/assignRef.js.map +1 -1
  452. package/utils/docs/DemoTitle.d.ts +12 -0
  453. package/utils/docs/DemoTitle.d.ts.map +1 -0
  454. package/utils/docs/DemoTitle.js +11 -0
  455. package/utils/docs/DemoTitle.js.map +1 -0
  456. package/utils/docs/Pre.d.ts +39 -0
  457. package/utils/docs/Pre.d.ts.map +1 -0
  458. package/utils/docs/Pre.js +26 -0
  459. package/utils/docs/Pre.js.map +1 -0
  460. package/utils/docs/createDemo.d.ts +89 -0
  461. package/utils/docs/createDemo.d.ts.map +1 -0
  462. package/utils/docs/createDemo.js +51 -0
  463. package/utils/docs/createDemo.js.map +1 -0
  464. package/utils/docs/createMdxComponents.d.ts +52 -0
  465. package/utils/docs/createMdxComponents.d.ts.map +1 -0
  466. package/utils/docs/createMdxComponents.js +59 -0
  467. package/utils/docs/createMdxComponents.js.map +1 -0
  468. package/utils/docs/createTypes.d.ts +23 -0
  469. package/utils/docs/createTypes.d.ts.map +1 -0
  470. package/utils/docs/createTypes.js +27 -0
  471. package/utils/docs/createTypes.js.map +1 -0
  472. package/utils/docs/index.d.ts +8 -0
  473. package/utils/docs/index.d.ts.map +1 -0
  474. package/utils/docs/index.js +16 -0
  475. package/utils/docs/index.js.map +1 -0
  476. package/utils/docs/mdx.module.css +201 -0
  477. package/utils/docs/serverSourceEnhancers.d.ts +26 -0
  478. package/utils/docs/serverSourceEnhancers.d.ts.map +1 -0
  479. package/utils/docs/serverSourceEnhancers.js +32 -0
  480. package/utils/docs/serverSourceEnhancers.js.map +1 -0
  481. package/utils/docs/toSidebarItems.d.ts +23 -0
  482. package/utils/docs/toSidebarItems.d.ts.map +1 -0
  483. package/utils/docs/toSidebarItems.js +36 -0
  484. package/utils/docs/toSidebarItems.js.map +1 -0
  485. package/utils/font-fallbacks.css +176 -0
  486. package/utils/fonts.d.ts +1 -0
  487. package/utils/fonts.d.ts.map +1 -1
  488. package/utils/fonts.js +12 -0
  489. package/utils/fonts.js.map +1 -1
  490. package/utils/frame.d.ts +4 -0
  491. package/utils/frame.d.ts.map +1 -0
  492. package/utils/frame.js +11 -0
  493. package/utils/frame.js.map +1 -0
  494. package/utils/global.css +480 -266
  495. package/utils/line.module.css +17 -17
  496. package/utils/media.css +1 -1
  497. package/utils/ornament.module.css +19 -19
  498. package/utils/overlay.d.ts +4 -4
  499. package/utils/overlay.js +4 -4
  500. package/utils/pattern.module.css +45 -45
  501. package/utils/print.css +48 -34
  502. package/utils/reset.css +9 -2
  503. package/utils/roles.css +29 -29
  504. package/utils/seriesPatterns.js +3 -3
  505. package/utils/syntax.module.css +92 -0
  506. package/utils/theme.css +6 -6
  507. package/utils/tokens.css +262 -192
  508. package/utils/tokens.d.ts +51 -8
  509. package/utils/tokens.d.ts.map +1 -1
  510. package/utils/tokens.js +46 -9
  511. package/utils/tokens.js.map +1 -1
  512. package/utils/type.module.css +87 -87
  513. package/utils/useReleaseMark.d.ts +13 -0
  514. package/utils/useReleaseMark.d.ts.map +1 -0
  515. package/utils/useReleaseMark.js +44 -0
  516. package/utils/useReleaseMark.js.map +1 -0
  517. package/utils/view-transitions.css +122 -0
@@ -0,0 +1,112 @@
1
+ import * as React from 'react';
2
+ import { type OutlineMorphDuration, type OutlineMorphRing } from './morphEngine';
3
+ /** Options for `useOutlineMorph`. */
4
+ export type UseOutlineMorphOptions = {
5
+ /** The popup's open state, as its root has it after each commit. */
6
+ open: boolean;
7
+ /**
8
+ * Run the morph. Default `true`; `false` leaves the popup's own open and
9
+ * close, and a change of `open` committed with it false happens that way.
10
+ */
11
+ enabled?: boolean;
12
+ /**
13
+ * How the trigger draws its focus ring. Default `focus-visible`: on the
14
+ * trigger while it matches `:focus-visible` (focus moves into the popup).
15
+ * `focus-within`: on a field's box whenever anything in it holds focus,
16
+ * pointer focus included (focus stays in its input).
17
+ */
18
+ ring?: OutlineMorphRing;
19
+ /**
20
+ * Durations in ms, overriding the tokens. Default: the trigger's
21
+ * `--fgd-duration-expand` (333) and `--fgd-duration-collapse` (200), read
22
+ * at each open and close; 0 turns the morph off.
23
+ */
24
+ duration?: OutlineMorphDuration;
25
+ /**
26
+ * A modal surface (a dialog, a sheet), whose frame sits in an
27
+ * `OutlineMorphLayer`: the durations default to the trigger's
28
+ * `--fgd-duration-expand-surface` (400) and
29
+ * `--fgd-duration-collapse-surface` (240). Default `false`.
30
+ */
31
+ surface?: boolean;
32
+ };
33
+ /** The refs `useOutlineMorph` returns: stable callbacks for the three elements. */
34
+ export type OutlineMorphRefs = {
35
+ /** A trigger: its focus ring (or edge) is where the morph starts and lands. */
36
+ sourceRef: (element: HTMLElement | null) => void;
37
+ /** The popup: its border box and radius are the frame the morph grows into. */
38
+ targetRef: (element: HTMLElement | null) => void;
39
+ /** The overlay: pass to `OutlineMorphFrame`. */
40
+ frameRef: (element: HTMLElement | null) => void;
41
+ /** The popup's own tail, if it has one (an arrow): the cap copies it while the morph runs. */
42
+ tailSourceRef: (element: HTMLElement | null) => void;
43
+ /** The tail cap: pass to `OutlineMorphTail`, rendered after the frame. */
44
+ tailRef: (element: HTMLElement | null) => void;
45
+ };
46
+ /**
47
+ * Grows a trigger's focus ring into its popup's frame on open, and back on
48
+ * close. With a ring drawn (keyboard focus, or any focus in a field), the
49
+ * morph starts on it; without one (a pointer press), on the trigger's edge:
50
+ * its boxed edge, else its box in its fill, else (a text button, an
51
+ * underline, a bare glyph) its ring's box in its ink. The close lands on the
52
+ * ring when focus stays or returns with one (the trigger's own ring then
53
+ * shows in the same frame the overlay goes), else on the edge.
54
+ *
55
+ * Wire three refs: `sourceRef` on the trigger (several triggers may share
56
+ * one popup; the one marked open is used), `targetRef` on the popup,
57
+ * and `frameRef` on an `OutlineMorphFrame` rendered as the popup's sibling
58
+ * inside the element that positions it (e.g. Base UI's Positioner), so the
59
+ * frame is out of flow and moves with the popup. The popup's CSS must
60
+ * answer `[data-outline-morph]`: its border takes its face color and its
61
+ * own enter and exit transition is dropped.
62
+ */
63
+ export declare function useOutlineMorph(options: UseOutlineMorphOptions): OutlineMorphRefs;
64
+ /** Props for OutlineMorphFrame. */
65
+ export type OutlineMorphFrameProps = {
66
+ /** `frameRef` from `useOutlineMorph`. */
67
+ ref: (element: HTMLElement | null) => void;
68
+ /** Extra class names, added after the module's own. */
69
+ className?: string;
70
+ };
71
+ /**
72
+ * The overlay the morph animates: an empty 2 px frame (the popup's own
73
+ * weight and color, read at run time), absolutely positioned, hidden
74
+ * unless a morph runs, `aria-hidden` and never hit-tested.
75
+ */
76
+ export declare function OutlineMorphFrame(props: OutlineMorphFrameProps): React.JSX.Element;
77
+ /** Props for OutlineMorphTail. */
78
+ export type OutlineMorphTailProps = {
79
+ /** `tailRef` from `useOutlineMorph`. */
80
+ ref: (element: HTMLElement | null) => void;
81
+ /** The adopter's class: the tail's size, and its rotation per `data-side` as the popup's own tail. */
82
+ className?: string;
83
+ /** The same drawing as the popup's tail (e.g. `OverlayTail`), its fill and stroke answering the cap. */
84
+ children?: React.ReactNode;
85
+ };
86
+ /**
87
+ * The tail cap [§9.17]: the overlay's copy of a popup's tail, rendered
88
+ * after `OutlineMorphFrame` in the same container so it paints above the
89
+ * frame. While the morph runs it sits on the popup's own tail (hidden
90
+ * meanwhile) and shows only on the trigger side of the frame's trigger-
91
+ * facing edge, so the tail grows out of that edge as the frame arrives and
92
+ * is whole as it lands. Its stroke is `currentColor` (the frame's color on
93
+ * the same timing); its face is `--fgd-outline-morph-tail-fill` (the
94
+ * popup's). Hidden unless a morph runs, `aria-hidden`, never hit-tested. A
95
+ * popup without a tail never shows it.
96
+ */
97
+ export declare function OutlineMorphTail(props: OutlineMorphTailProps): React.JSX.Element;
98
+ /** Props for `OutlineMorphLayer`. */
99
+ export type OutlineMorphLayerProps = {
100
+ /** Extra class names, added after the module's own (e.g. a `z-index` other than the modal layer's). */
101
+ className?: string;
102
+ /** The `OutlineMorphFrame`. */
103
+ children?: React.ReactNode;
104
+ };
105
+ /**
106
+ * The container a modal surface's frame sits in, since the surface has no
107
+ * positioner: fixed, the full viewport, above the surface (`--layer-4`, the
108
+ * dialogs' layer, rendered after the popup in its portal) and never hit
109
+ * tested, so the engine measures in viewport coordinates as they are.
110
+ */
111
+ export declare function OutlineMorphLayer(props: OutlineMorphLayerProps): React.JSX.Element;
112
+ //# sourceMappingURL=OutlineMorph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OutlineMorph.d.ts","sourceRoot":"","sources":["../../src/foundations/outline-morph/OutlineMorph.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACtB,MAAM,eAAe,CAAA;AA8CtB,qCAAqC;AACrC,MAAM,MAAM,sBAAsB,GAAG;IACnC,oEAAoE;IACpE,IAAI,EAAE,OAAO,CAAA;IACb;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAA;IACvB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,oBAAoB,CAAA;IAC/B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,mFAAmF;AACnF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,+EAA+E;IAC/E,SAAS,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;IAChD,+EAA+E;IAC/E,SAAS,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;IAChD,gDAAgD;IAChD,QAAQ,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;IAC/C,8FAA8F;IAC9F,aAAa,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;IACpD,0EAA0E;IAC1E,OAAO,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;CAC/C,CAAA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,gBAAgB,CA8BjF;AAED,mCAAmC;AACnC,MAAM,MAAM,sBAAsB,GAAG;IACnC,yCAAyC;IACzC,GAAG,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;IAC1C,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAGlF;AAED,kCAAkC;AAClC,MAAM,MAAM,qBAAqB,GAAG;IAClC,wCAAwC;IACxC,GAAG,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;IAC1C,sGAAsG;IACtG,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,wGAAwG;IACxG,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAOhF;AAED,qCAAqC;AACrC,MAAM,MAAM,sBAAsB,GAAG;IACnC,uGAAuG;IACvG,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAOlF"}
@@ -0,0 +1,83 @@
1
+ 'use client';
2
+ import * as React from 'react';
3
+ import { cx } from '../../utils/className';
4
+ import { EXPAND_DURATION_MS } from '../../utils/tokens';
5
+ import { OutlineMorphController, } from './morphEngine';
6
+ import styles from './outline-morph.module.css';
7
+ /**
8
+ * Grows a trigger's focus ring into its popup's frame on open, and back on
9
+ * close. With a ring drawn (keyboard focus, or any focus in a field), the
10
+ * morph starts on it; without one (a pointer press), on the trigger's edge:
11
+ * its boxed edge, else its box in its fill, else (a text button, an
12
+ * underline, a bare glyph) its ring's box in its ink. The close lands on the
13
+ * ring when focus stays or returns with one (the trigger's own ring then
14
+ * shows in the same frame the overlay goes), else on the edge.
15
+ *
16
+ * Wire three refs: `sourceRef` on the trigger (several triggers may share
17
+ * one popup; the one marked open is used), `targetRef` on the popup,
18
+ * and `frameRef` on an `OutlineMorphFrame` rendered as the popup's sibling
19
+ * inside the element that positions it (e.g. Base UI's Positioner), so the
20
+ * frame is out of flow and moves with the popup. The popup's CSS must
21
+ * answer `[data-outline-morph]`: its border takes its face color and its
22
+ * own enter and exit transition is dropped.
23
+ */
24
+ export function useOutlineMorph(options) {
25
+ const { open, enabled = true, ring = 'focus-visible', duration, surface = false } = options;
26
+ const [controller] = React.useState(() => new OutlineMorphController());
27
+ // Explicit durations only; otherwise the engine reads the tokens at each open and close.
28
+ const openMs = duration?.open;
29
+ const closeMs = duration?.close;
30
+ // A layout effect: both directions start in the commit that changes the popup, before it paints.
31
+ React.useLayoutEffect(() => {
32
+ controller.duration =
33
+ openMs === undefined && closeMs === undefined
34
+ ? undefined
35
+ : { open: openMs ?? EXPAND_DURATION_MS.open, close: closeMs ?? EXPAND_DURATION_MS.close };
36
+ controller.ring = ring;
37
+ controller.surface = surface;
38
+ controller.update(open, enabled);
39
+ }, [controller, open, enabled, ring, surface, openMs, closeMs]);
40
+ React.useEffect(() => () => controller.stop(), [controller]);
41
+ return React.useMemo(() => ({
42
+ sourceRef: controller.sourceRef,
43
+ targetRef: controller.targetRef,
44
+ frameRef: controller.frameRef,
45
+ tailSourceRef: controller.tailSourceRef,
46
+ tailRef: controller.tailRef,
47
+ }), [controller]);
48
+ }
49
+ /**
50
+ * The overlay the morph animates: an empty 2 px frame (the popup's own
51
+ * weight and color, read at run time), absolutely positioned, hidden
52
+ * unless a morph runs, `aria-hidden` and never hit-tested.
53
+ */
54
+ export function OutlineMorphFrame(props) {
55
+ const { ref, className } = props;
56
+ return React.createElement("div", { ref: ref, "aria-hidden": "true", className: cx(styles.frame, className) });
57
+ }
58
+ /**
59
+ * The tail cap [§9.17]: the overlay's copy of a popup's tail, rendered
60
+ * after `OutlineMorphFrame` in the same container so it paints above the
61
+ * frame. While the morph runs it sits on the popup's own tail (hidden
62
+ * meanwhile) and shows only on the trigger side of the frame's trigger-
63
+ * facing edge, so the tail grows out of that edge as the frame arrives and
64
+ * is whole as it lands. Its stroke is `currentColor` (the frame's color on
65
+ * the same timing); its face is `--fgd-outline-morph-tail-fill` (the
66
+ * popup's). Hidden unless a morph runs, `aria-hidden`, never hit-tested. A
67
+ * popup without a tail never shows it.
68
+ */
69
+ export function OutlineMorphTail(props) {
70
+ const { ref, className, children } = props;
71
+ return (React.createElement("div", { ref: ref, "aria-hidden": "true", className: cx(styles.tail, className) }, children));
72
+ }
73
+ /**
74
+ * The container a modal surface's frame sits in, since the surface has no
75
+ * positioner: fixed, the full viewport, above the surface (`--layer-4`, the
76
+ * dialogs' layer, rendered after the popup in its portal) and never hit
77
+ * tested, so the engine measures in viewport coordinates as they are.
78
+ */
79
+ export function OutlineMorphLayer(props) {
80
+ const { className, children } = props;
81
+ return (React.createElement("div", { "aria-hidden": "true", className: cx(styles.layer, className) }, children));
82
+ }
83
+ //# sourceMappingURL=OutlineMorph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OutlineMorph.js","sourceRoot":"","sources":["../../src/foundations/outline-morph/OutlineMorph.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAA;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,EACL,sBAAsB,GAGvB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Engine';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/foundations/outline-morph/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EACL,uBAAuB,EACvB,+BAA+B,EAC/B,sBAAsB,EACtB,eAAe,EACf,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './OutlineMorph';
2
+ export { OUTLINE_MORPH_ATTRIBUTE, OUTLINE_MORPH_PENDING_ATTRIBUTE, OUTLINE_MORPH_PROPERTY, canOutlineMorph, } from './morphEngine';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/foundations/outline-morph/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EACL,uBAAuB,EACvB,+BAA+B,EAC/B,sBAAsB,EACtB,eAAe,GAGhB,MAAM,eAAe,CAAA"}
@@ -0,0 +1,219 @@
1
+ /** The attribute the popup carries while the overlay draws its frame. */
2
+ export declare const OUTLINE_MORPH_ATTRIBUTE = "data-outline-morph";
3
+ /**
4
+ * The app-wide (and per-subtree) switch: `none` on the trigger or the popup
5
+ * (inherited, so `:root` turns every morph off) leaves every popup its own
6
+ * open and close. Read at each open and close.
7
+ */
8
+ export declare const OUTLINE_MORPH_PROPERTY = "--fgd-outline-morph";
9
+ /**
10
+ * The popup's attribute while an open waits for its placement (a frame or
11
+ * two, at most PLACEMENT_FRAMES): the foundation's CSS holds the popup
12
+ * clipped away meanwhile (still focusable, as Base UI moves focus in during
13
+ * the wait), a discrete hold, so it never paints unclipped before the morph
14
+ * starts [D196]. A timeout removes it and the popup shows at once.
15
+ */
16
+ export declare const OUTLINE_MORPH_PENDING_ATTRIBUTE = "data-outline-morph-pending";
17
+ /** Durations in ms: `open` grows the outline into the frame, `close` is the faster way back. */
18
+ export type OutlineMorphDuration = {
19
+ open: number;
20
+ close: number;
21
+ };
22
+ /**
23
+ * How the trigger draws its focus ring, so the engine knows when it shows:
24
+ * - `focus-visible`: on the trigger itself while it matches `:focus-visible`
25
+ * (buttons, menu triggers, the Select trigger). Focus moves into the popup
26
+ * while it is open and comes back on close.
27
+ * - `focus-within`: on the trigger (a field's box) whenever anything inside
28
+ * it holds focus, pointer focus included (Combobox, Autocomplete, Search:
29
+ * `:has(:focus)` or `data-focused`). Focus stays in the input while the
30
+ * popup is open, so the ring stays drawn and a close lands on it.
31
+ */
32
+ export type OutlineMorphRing = 'focus-visible' | 'focus-within';
33
+ /**
34
+ * Whether the morph may run now: Web Animations, motion allowed, no forced
35
+ * colors, not printing. Read at each open, so a preference change applies
36
+ * to the next one.
37
+ */
38
+ export declare function canOutlineMorph(): boolean;
39
+ /**
40
+ * The controller behind `useOutlineMorph`. Elements arrive through the ref
41
+ * callbacks; `update` receives the open state in a layout effect, so both
42
+ * directions start in the commit that changes the popup, before it paints.
43
+ */
44
+ export declare class OutlineMorphController {
45
+ /** Explicit durations (the hook's `duration` option); otherwise the tokens are read at each open and close. */
46
+ duration: OutlineMorphDuration | undefined;
47
+ ring: OutlineMorphRing;
48
+ /** A modal surface (a dialog, a sheet): the `-surface` durations. */
49
+ surface: boolean;
50
+ /** The timing of the running morph, read from the trigger when it started. */
51
+ private timing;
52
+ /** Every trigger attached (a popup may have several); `source` is the one this open came from. */
53
+ private sources;
54
+ private source;
55
+ private target;
56
+ private frame;
57
+ /** The popup's own tail (an adopter's arrow) and the cap that stands in for it while the morph runs. */
58
+ private tailSource;
59
+ private tail;
60
+ private tailAnimation;
61
+ private tailFlight;
62
+ private phase;
63
+ private open;
64
+ /** Whether the morph was on at the last update (a popup mounting before its open reaches us is held if so). */
65
+ private enabled;
66
+ private anticipateFrame;
67
+ /**
68
+ * Where a pending open starts (viewport coordinates), the share of the
69
+ * open duration it runs, and, for a fresh open, the ring it started from.
70
+ */
71
+ private pending;
72
+ private flight;
73
+ private frameAnimation;
74
+ private targetAnimation;
75
+ /** The popup's own frame, read while it shows (its border is the face while the morph runs). */
76
+ private targetFrame;
77
+ private placementObserver;
78
+ private placementFrame;
79
+ private placementTries;
80
+ private trackFrame;
81
+ private settleObserver;
82
+ private settleTimer;
83
+ /** A trigger: its focus ring (or edge) is where the morph starts and lands. */
84
+ readonly sourceRef: (element: HTMLElement | null) => void;
85
+ /** The popup: its border box and radius are the frame the morph grows into. */
86
+ readonly targetRef: (element: HTMLElement | null) => void;
87
+ /** The popup's own tail, if it has one: the cap draws its copy while the morph runs [§9.17]. */
88
+ readonly tailSourceRef: (element: HTMLElement | null) => void;
89
+ /** The tail cap, the overlay's tail, rendered after the frame in the same container. */
90
+ readonly tailRef: (element: HTMLElement | null) => void;
91
+ /** The overlay frame, a sibling of the popup inside its positioned container. */
92
+ readonly frameRef: (element: HTMLElement | null) => void;
93
+ /**
94
+ * A popup mounted before its open reaches the controller (its owner's
95
+ * open state can land a commit after Base UI's): held as a pending open
96
+ * would be, if the morph would run, so it never paints unclipped first.
97
+ * The open claims the hold; if none comes within two frames, it goes.
98
+ */
99
+ private anticipate;
100
+ /**
101
+ * The trigger this open belongs to: the only one attached, else the one
102
+ * marked open (Base UI's `aria-expanded` / `data-popup-open`), else the
103
+ * one holding focus, else the last attached. Detached ones are dropped.
104
+ */
105
+ private pickSource;
106
+ /**
107
+ * The popup or the frame detached: once the commit is over, a running
108
+ * morph stops if it is still gone. A ref that is only reattached (a
109
+ * merged ref's new identity, React's development double mount) comes
110
+ * back within the same commit, and a pending open keeps waiting for it.
111
+ */
112
+ private detachSoon;
113
+ /** The popup's positioned container, which also holds the frame. */
114
+ private get container();
115
+ /**
116
+ * A length token's px value: a plain length as is, else resolved on the
117
+ * trigger itself (`resolveOn`), else through the frame's own
118
+ * `outline-offset` (the frame is ours, hidden while idle, and its CSS
119
+ * never sets that property), since a custom property's computed value
120
+ * keeps `calc()` and font-relative units unresolved.
121
+ */
122
+ private readonly resolveLength;
123
+ /**
124
+ * Receives the open state, and whether the morph is on, after each commit.
125
+ * Off (`enabled` false) stops a running morph, so the change the commit
126
+ * carries happens the popup's own way.
127
+ */
128
+ update(open: boolean, enabled: boolean): void;
129
+ /** Clears everything: animations, observers, the frame and the popup's attribute. */
130
+ stop(): void;
131
+ private startOpen;
132
+ private startClose;
133
+ /**
134
+ * Which ring a close lands on. A field that draws its ring on any focus
135
+ * (`focus-within`) keeps it while focus stays in it. Otherwise focus comes
136
+ * back to the trigger when the popup hides, with a ring if the focus inside
137
+ * the popup shows one (the browser carries it over) or if the popup was
138
+ * closed from the keyboard.
139
+ */
140
+ private closingRing;
141
+ /**
142
+ * The ring a running close lands on now: drawn once the trigger draws it;
143
+ * the planned one while focus stays in the trigger or the popup (on its
144
+ * way back); none once focus has gone elsewhere (an outside press).
145
+ */
146
+ private liveRing;
147
+ /** Starts a pending open once the popup is placed and laid out. Returns whether it started. */
148
+ private tryStart;
149
+ /**
150
+ * The box fixed elements are laid out in: a modal layer's own box (fixed,
151
+ * inset 0: the viewport less a reserved scrollbar gutter), else the
152
+ * root's client box.
153
+ */
154
+ private viewport;
155
+ /** The system ring's weight, `--fgd-focus-width` (2 px): a frame's weight where neither end has one. */
156
+ private defaultWeight;
157
+ private readTargetFrame;
158
+ /** The frame's box now, mid-animation, in viewport coordinates. */
159
+ private currentBox;
160
+ /** How far the running animation has come (eased, 0–1); 1 when none runs. */
161
+ private progress;
162
+ /**
163
+ * Animates the frame and the popup's clip from one box to the other
164
+ * (viewport coordinates, converted to the container's) on one timing.
165
+ * The popup's border takes its face (its attribute) while the frame draws
166
+ * the edge.
167
+ */
168
+ private run;
169
+ /**
170
+ * Re-measures the end the morph travels to every frame while it runs; if
171
+ * it moved (a scroll, a resize, the popup settling its size) or a close's
172
+ * ring changed (focus came back, or left), both animations take new
173
+ * keyframes at their current time.
174
+ */
175
+ private track;
176
+ /**
177
+ * The open lands: in one task the popup's clip and attribute go (its own
178
+ * border shows) and the frame hides, so nothing changes on screen.
179
+ */
180
+ private handOff;
181
+ /**
182
+ * The popup's own tail as the cap copies it, in the container's
183
+ * coordinates, or null (no tail, or not laid out). Its box is exact for
184
+ * the quarter turns a tail takes. The edge it sits on is read from where
185
+ * it lies against the popup (so logical sides need no direction rule).
186
+ */
187
+ private readTail;
188
+ /**
189
+ * Places the cap on the tail (custom properties only), in whole pixels
190
+ * from the container's corner: the tail's box is laid out, so it paints
191
+ * snapped to the pixel grid, and a fractional translation would paint the
192
+ * cap's stroke softer than the tail it hands off to.
193
+ */
194
+ private placeTail;
195
+ /**
196
+ * The tail cap: a copy of the popup's tail above the frame, shown only on
197
+ * the trigger side of the frame's trigger-facing inner edge, so it grows
198
+ * out of that edge as the frame arrives, tip first and always attached,
199
+ * and is whole exactly as the frame lands; a close retracts it into the
200
+ * edge. Its stroke takes the frame's color on the same timing, its face
201
+ * the popup's. Nothing fades.
202
+ */
203
+ private startTail;
204
+ /**
205
+ * The close lands on the trigger. The frame and the popup's clip hold
206
+ * their end state until the popup's container hides, which takes the
207
+ * frame with it in the frame focus returns (so the ring shows at once);
208
+ * then everything clears. A container that never hides clears after
209
+ * SETTLE_MS.
210
+ */
211
+ private landClose;
212
+ /** While an open waits for the popup's placement: try now, then watch its container and the popup, and poll a few frames. */
213
+ private watchPlacement;
214
+ private cancelPlacement;
215
+ private cancelTrack;
216
+ private cancelSettle;
217
+ private cancelAnimations;
218
+ }
219
+ //# sourceMappingURL=morphEngine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"morphEngine.d.ts","sourceRoot":"","sources":["../../src/foundations/outline-morph/morphEngine.ts"],"names":[],"mappings":"AAgCA,yEAAyE;AACzE,eAAO,MAAM,uBAAuB,uBAAuB,CAAA;AAE3D;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,wBAAwB,CAAA;AAE3D;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,+BAA+B,CAAA;AA6D3E,gGAAgG;AA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