@windmorph/react 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (761) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +23 -0
  3. package/README.md +149 -2
  4. package/dist/cli.d.ts +1 -0
  5. package/dist/cli.js +112 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/components/app-bar/AppBarItems.js +23 -0
  8. package/dist/components/app-bar/AppBarItems.js.map +1 -0
  9. package/dist/components/app-bar/TopAppBar.d.ts +89 -0
  10. package/dist/components/app-bar/TopAppBar.js +103 -0
  11. package/dist/components/app-bar/TopAppBar.js.map +1 -0
  12. package/dist/components/app-bar/app-bar-styles.d.ts +280 -0
  13. package/dist/components/app-bar/app-bar-styles.js +142 -0
  14. package/dist/components/app-bar/app-bar-styles.js.map +1 -0
  15. package/dist/components/app-bar/app-bar-tokens.d.ts +7 -0
  16. package/dist/components/app-bar/app-bar-tokens.js +64 -0
  17. package/dist/components/app-bar/app-bar-tokens.js.map +1 -0
  18. package/dist/components/app-bar/use-app-bar-scroll.d.ts +6 -0
  19. package/dist/components/app-bar/use-app-bar-scroll.js +139 -0
  20. package/dist/components/app-bar/use-app-bar-scroll.js.map +1 -0
  21. package/dist/components/autocomplete/Autocomplete.d.ts +142 -0
  22. package/dist/components/autocomplete/Autocomplete.js +284 -0
  23. package/dist/components/autocomplete/Autocomplete.js.map +1 -0
  24. package/dist/components/badge/Badge.d.ts +71 -0
  25. package/dist/components/badge/Badge.js +72 -0
  26. package/dist/components/badge/Badge.js.map +1 -0
  27. package/dist/components/badge/badge-styles.d.ts +100 -0
  28. package/dist/components/badge/badge-styles.js +43 -0
  29. package/dist/components/badge/badge-styles.js.map +1 -0
  30. package/dist/components/badge/badge-tokens.d.ts +7 -0
  31. package/dist/components/badge/badge-tokens.js +40 -0
  32. package/dist/components/badge/badge-tokens.js.map +1 -0
  33. package/dist/components/button/Button.d.ts +91 -0
  34. package/dist/components/button/Button.js +96 -0
  35. package/dist/components/button/Button.js.map +1 -0
  36. package/dist/components/button/ButtonContext.d.ts +30 -0
  37. package/dist/components/button/ButtonContext.js +18 -0
  38. package/dist/components/button/ButtonContext.js.map +1 -0
  39. package/dist/components/button/DensityZeroButtons.js +25 -0
  40. package/dist/components/button/DensityZeroButtons.js.map +1 -0
  41. package/dist/components/button/button-pending.d.ts +10 -0
  42. package/dist/components/button/button-pending.js +166 -0
  43. package/dist/components/button/button-pending.js.map +1 -0
  44. package/dist/components/button/button-styles.d.ts +216 -0
  45. package/dist/components/button/button-styles.js +199 -0
  46. package/dist/components/button/button-styles.js.map +1 -0
  47. package/dist/components/button/button-tokens.d.ts +10 -0
  48. package/dist/components/button/button-tokens.js +257 -0
  49. package/dist/components/button/button-tokens.js.map +1 -0
  50. package/dist/components/button/connected-shapes.js +152 -0
  51. package/dist/components/button/connected-shapes.js.map +1 -0
  52. package/dist/components/card/Card.d.ts +60 -0
  53. package/dist/components/card/Card.js +69 -0
  54. package/dist/components/card/Card.js.map +1 -0
  55. package/dist/components/card/card-styles.d.ts +42 -0
  56. package/dist/components/card/card-styles.js +64 -0
  57. package/dist/components/card/card-styles.js.map +1 -0
  58. package/dist/components/card/card-tokens.d.ts +7 -0
  59. package/dist/components/card/card-tokens.js +84 -0
  60. package/dist/components/card/card-tokens.js.map +1 -0
  61. package/dist/components/carousel/Carousel.d.ts +124 -0
  62. package/dist/components/carousel/Carousel.js +387 -0
  63. package/dist/components/carousel/Carousel.js.map +1 -0
  64. package/dist/components/carousel/carousel-keylines.js +486 -0
  65. package/dist/components/carousel/carousel-keylines.js.map +1 -0
  66. package/dist/components/carousel/carousel-press-area.js +35 -0
  67. package/dist/components/carousel/carousel-press-area.js.map +1 -0
  68. package/dist/components/carousel/carousel-styles.d.ts +188 -0
  69. package/dist/components/carousel/carousel-styles.js +116 -0
  70. package/dist/components/carousel/carousel-styles.js.map +1 -0
  71. package/dist/components/carousel/carousel-tokens.d.ts +7 -0
  72. package/dist/components/carousel/carousel-tokens.js +18 -0
  73. package/dist/components/carousel/carousel-tokens.js.map +1 -0
  74. package/dist/components/checkbox/Checkbox.d.ts +78 -0
  75. package/dist/components/checkbox/Checkbox.js +77 -0
  76. package/dist/components/checkbox/Checkbox.js.map +1 -0
  77. package/dist/components/checkbox/checkbox-box.js +34 -0
  78. package/dist/components/checkbox/checkbox-box.js.map +1 -0
  79. package/dist/components/checkbox/checkbox-styles.d.ts +100 -0
  80. package/dist/components/checkbox/checkbox-styles.js +54 -0
  81. package/dist/components/checkbox/checkbox-styles.js.map +1 -0
  82. package/dist/components/checkbox/checkbox-tokens.d.ts +7 -0
  83. package/dist/components/checkbox/checkbox-tokens.js +41 -0
  84. package/dist/components/checkbox/checkbox-tokens.js.map +1 -0
  85. package/dist/components/chip/Chip.d.ts +171 -0
  86. package/dist/components/chip/Chip.js +348 -0
  87. package/dist/components/chip/Chip.js.map +1 -0
  88. package/dist/components/chip/ChipSet.d.ts +70 -0
  89. package/dist/components/chip/ChipSet.js +198 -0
  90. package/dist/components/chip/ChipSet.js.map +1 -0
  91. package/dist/components/chip/chip-styles.d.ts +263 -0
  92. package/dist/components/chip/chip-styles.js +360 -0
  93. package/dist/components/chip/chip-styles.js.map +1 -0
  94. package/dist/components/chip/chip-tokens.d.ts +13 -0
  95. package/dist/components/chip/chip-tokens.js +185 -0
  96. package/dist/components/chip/chip-tokens.js.map +1 -0
  97. package/dist/components/date-picker/CalendarGrid.js +94 -0
  98. package/dist/components/date-picker/CalendarGrid.js.map +1 -0
  99. package/dist/components/date-picker/CompactDateDialog.js +63 -0
  100. package/dist/components/date-picker/CompactDateDialog.js.map +1 -0
  101. package/dist/components/date-picker/DateField.d.ts +161 -0
  102. package/dist/components/date-picker/DateField.js +393 -0
  103. package/dist/components/date-picker/DateField.js.map +1 -0
  104. package/dist/components/date-picker/DateInput.d.ts +20 -0
  105. package/dist/components/date-picker/DateInput.js +99 -0
  106. package/dist/components/date-picker/DateInput.js.map +1 -0
  107. package/dist/components/date-picker/DatePicker.d.ts +165 -0
  108. package/dist/components/date-picker/DatePicker.js +492 -0
  109. package/dist/components/date-picker/DatePicker.js.map +1 -0
  110. package/dist/components/date-picker/PickerDialog.d.ts +121 -0
  111. package/dist/components/date-picker/PickerDialog.js +161 -0
  112. package/dist/components/date-picker/PickerDialog.js.map +1 -0
  113. package/dist/components/date-picker/calendar-parts.js +141 -0
  114. package/dist/components/date-picker/calendar-parts.js.map +1 -0
  115. package/dist/components/date-picker/date-format.js +72 -0
  116. package/dist/components/date-picker/date-format.js.map +1 -0
  117. package/dist/components/date-picker/date-picker-styles.d.ts +247 -0
  118. package/dist/components/date-picker/date-picker-styles.js +163 -0
  119. package/dist/components/date-picker/date-picker-styles.js.map +1 -0
  120. package/dist/components/date-picker/date-picker-tokens.d.ts +7 -0
  121. package/dist/components/date-picker/date-picker-tokens.js +104 -0
  122. package/dist/components/date-picker/date-picker-tokens.js.map +1 -0
  123. package/dist/components/date-picker/picker-dialog-context.js +8 -0
  124. package/dist/components/date-picker/picker-dialog-context.js.map +1 -0
  125. package/dist/components/date-picker/picker-dialog-styles.d.ts +95 -0
  126. package/dist/components/date-picker/picker-dialog-styles.js +57 -0
  127. package/dist/components/date-picker/picker-dialog-styles.js.map +1 -0
  128. package/dist/components/date-picker/picker-icons.js +24 -0
  129. package/dist/components/date-picker/picker-icons.js.map +1 -0
  130. package/dist/components/date-picker/use-media-query.js +21 -0
  131. package/dist/components/date-picker/use-media-query.js.map +1 -0
  132. package/dist/components/date-picker/use-size-transform.js +62 -0
  133. package/dist/components/date-picker/use-size-transform.js.map +1 -0
  134. package/dist/components/date-picker/use-view-exit.js +68 -0
  135. package/dist/components/date-picker/use-view-exit.js.map +1 -0
  136. package/dist/components/dialog/Dialog.d.ts +267 -0
  137. package/dist/components/dialog/Dialog.js +521 -0
  138. package/dist/components/dialog/Dialog.js.map +1 -0
  139. package/dist/components/dialog/dialog-styles.d.ts +335 -0
  140. package/dist/components/dialog/dialog-styles.js +377 -0
  141. package/dist/components/dialog/dialog-styles.js.map +1 -0
  142. package/dist/components/dialog/dialog-tokens.d.ts +7 -0
  143. package/dist/components/dialog/dialog-tokens.js +57 -0
  144. package/dist/components/dialog/dialog-tokens.js.map +1 -0
  145. package/dist/components/divider/Divider.d.ts +59 -0
  146. package/dist/components/divider/Divider.js +53 -0
  147. package/dist/components/divider/Divider.js.map +1 -0
  148. package/dist/components/divider/divider-styles.d.ts +90 -0
  149. package/dist/components/divider/divider-styles.js +66 -0
  150. package/dist/components/divider/divider-styles.js.map +1 -0
  151. package/dist/components/divider/divider-tokens.d.ts +7 -0
  152. package/dist/components/divider/divider-tokens.js +16 -0
  153. package/dist/components/divider/divider-tokens.js.map +1 -0
  154. package/dist/components/fab/Fab.d.ts +130 -0
  155. package/dist/components/fab/Fab.js +137 -0
  156. package/dist/components/fab/Fab.js.map +1 -0
  157. package/dist/components/fab/FabTooltip.js +36 -0
  158. package/dist/components/fab/FabTooltip.js.map +1 -0
  159. package/dist/components/fab/fab-styles.d.ts +286 -0
  160. package/dist/components/fab/fab-styles.js +131 -0
  161. package/dist/components/fab/fab-styles.js.map +1 -0
  162. package/dist/components/fab/fab-tokens.d.ts +12 -0
  163. package/dist/components/fab/fab-tokens.js +105 -0
  164. package/dist/components/fab/fab-tokens.js.map +1 -0
  165. package/dist/components/fab-menu/FabMenu.d.ts +156 -0
  166. package/dist/components/fab-menu/FabMenu.js +291 -0
  167. package/dist/components/fab-menu/FabMenu.js.map +1 -0
  168. package/dist/components/fab-menu/fab-menu-stagger.js +51 -0
  169. package/dist/components/fab-menu/fab-menu-stagger.js.map +1 -0
  170. package/dist/components/fab-menu/fab-menu-styles.d.ts +166 -0
  171. package/dist/components/fab-menu/fab-menu-styles.js +107 -0
  172. package/dist/components/fab-menu/fab-menu-styles.js.map +1 -0
  173. package/dist/components/fab-menu/fab-menu-tokens.d.ts +7 -0
  174. package/dist/components/fab-menu/fab-menu-tokens.js +120 -0
  175. package/dist/components/fab-menu/fab-menu-tokens.js.map +1 -0
  176. package/dist/components/icon-button/IconButton.d.ts +125 -0
  177. package/dist/components/icon-button/IconButton.js +112 -0
  178. package/dist/components/icon-button/IconButton.js.map +1 -0
  179. package/dist/components/icon-button/icon-button-styles.d.ts +217 -0
  180. package/dist/components/icon-button/icon-button-styles.js +244 -0
  181. package/dist/components/icon-button/icon-button-styles.js.map +1 -0
  182. package/dist/components/icon-button/icon-button-tokens.d.ts +11 -0
  183. package/dist/components/icon-button/icon-button-tokens.js +215 -0
  184. package/dist/components/icon-button/icon-button-tokens.js.map +1 -0
  185. package/dist/components/list/List.d.ts +265 -0
  186. package/dist/components/list/List.js +1386 -0
  187. package/dist/components/list/List.js.map +1 -0
  188. package/dist/components/list/ListMedia.d.ts +88 -0
  189. package/dist/components/list/ListMedia.js +132 -0
  190. package/dist/components/list/ListMedia.js.map +1 -0
  191. package/dist/components/list/list-styles.d.ts +375 -0
  192. package/dist/components/list/list-styles.js +220 -0
  193. package/dist/components/list/list-styles.js.map +1 -0
  194. package/dist/components/list/list-tokens.d.ts +7 -0
  195. package/dist/components/list/list-tokens.js +92 -0
  196. package/dist/components/list/list-tokens.js.map +1 -0
  197. package/dist/components/loading-indicator/LoadingIndicator.d.ts +65 -0
  198. package/dist/components/loading-indicator/LoadingIndicator.js +92 -0
  199. package/dist/components/loading-indicator/LoadingIndicator.js.map +1 -0
  200. package/dist/components/loading-indicator/lazy-loading-indicator.js +25 -0
  201. package/dist/components/loading-indicator/lazy-loading-indicator.js.map +1 -0
  202. package/dist/components/loading-indicator/loading-indicator-frames.js +149 -0
  203. package/dist/components/loading-indicator/loading-indicator-frames.js.map +1 -0
  204. package/dist/components/loading-indicator/loading-indicator-styles.d.ts +36 -0
  205. package/dist/components/loading-indicator/loading-indicator-styles.js +22 -0
  206. package/dist/components/loading-indicator/loading-indicator-styles.js.map +1 -0
  207. package/dist/components/loading-indicator/loading-indicator-tokens.d.ts +7 -0
  208. package/dist/components/loading-indicator/loading-indicator-tokens.js +44 -0
  209. package/dist/components/loading-indicator/loading-indicator-tokens.js.map +1 -0
  210. package/dist/components/menu/Menu.d.ts +215 -0
  211. package/dist/components/menu/Menu.js +715 -0
  212. package/dist/components/menu/Menu.js.map +1 -0
  213. package/dist/components/menu/menu-styles.d.ts +354 -0
  214. package/dist/components/menu/menu-styles.js +219 -0
  215. package/dist/components/menu/menu-styles.js.map +1 -0
  216. package/dist/components/menu/menu-tokens.d.ts +7 -0
  217. package/dist/components/menu/menu-tokens.js +93 -0
  218. package/dist/components/menu/menu-tokens.js.map +1 -0
  219. package/dist/components/menu/menu-trigger.d.ts +51 -0
  220. package/dist/components/menu/menu-trigger.js +100 -0
  221. package/dist/components/menu/menu-trigger.js.map +1 -0
  222. package/dist/components/menu/use-reveal-entering.js +42 -0
  223. package/dist/components/menu/use-reveal-entering.js.map +1 -0
  224. package/dist/components/navigation/NavItem.d.ts +54 -0
  225. package/dist/components/navigation/NavItem.js +182 -0
  226. package/dist/components/navigation/NavItem.js.map +1 -0
  227. package/dist/components/navigation/NavigationBar.d.ts +64 -0
  228. package/dist/components/navigation/NavigationBar.js +121 -0
  229. package/dist/components/navigation/NavigationBar.js.map +1 -0
  230. package/dist/components/navigation/NavigationRail.d.ts +91 -0
  231. package/dist/components/navigation/NavigationRail.js +285 -0
  232. package/dist/components/navigation/NavigationRail.js.map +1 -0
  233. package/dist/components/navigation/nav-item-styles.d.ts +190 -0
  234. package/dist/components/navigation/nav-item-styles.js +123 -0
  235. package/dist/components/navigation/nav-item-styles.js.map +1 -0
  236. package/dist/components/navigation/navigation-styles.d.ts +239 -0
  237. package/dist/components/navigation/navigation-styles.js +134 -0
  238. package/dist/components/navigation/navigation-styles.js.map +1 -0
  239. package/dist/components/navigation/navigation-tokens.d.ts +9 -0
  240. package/dist/components/navigation/navigation-tokens.js +114 -0
  241. package/dist/components/navigation/navigation-tokens.js.map +1 -0
  242. package/dist/components/navigation/use-hide-on-scroll.js +115 -0
  243. package/dist/components/navigation/use-hide-on-scroll.js.map +1 -0
  244. package/dist/components/navigation/use-item-arrow-keys.js +37 -0
  245. package/dist/components/navigation/use-item-arrow-keys.js.map +1 -0
  246. package/dist/components/navigation/use-rail-item-morph.js +61 -0
  247. package/dist/components/navigation/use-rail-item-morph.js.map +1 -0
  248. package/dist/components/progress/ProgressIndicator.d.ts +95 -0
  249. package/dist/components/progress/ProgressIndicator.js +426 -0
  250. package/dist/components/progress/ProgressIndicator.js.map +1 -0
  251. package/dist/components/progress/progress-geometry.js +285 -0
  252. package/dist/components/progress/progress-geometry.js.map +1 -0
  253. package/dist/components/progress/progress-styles.d.ts +81 -0
  254. package/dist/components/progress/progress-styles.js +43 -0
  255. package/dist/components/progress/progress-styles.js.map +1 -0
  256. package/dist/components/progress/progress-tokens.d.ts +7 -0
  257. package/dist/components/progress/progress-tokens.js +39 -0
  258. package/dist/components/progress/progress-tokens.js.map +1 -0
  259. package/dist/components/pull-to-refresh/PullToRefresh.d.ts +94 -0
  260. package/dist/components/pull-to-refresh/PullToRefresh.js +395 -0
  261. package/dist/components/pull-to-refresh/PullToRefresh.js.map +1 -0
  262. package/dist/components/pull-to-refresh/pull-to-refresh-math.js +37 -0
  263. package/dist/components/pull-to-refresh/pull-to-refresh-math.js.map +1 -0
  264. package/dist/components/pull-to-refresh/pull-to-refresh-styles.d.ts +53 -0
  265. package/dist/components/pull-to-refresh/pull-to-refresh-styles.js +14 -0
  266. package/dist/components/pull-to-refresh/pull-to-refresh-styles.js.map +1 -0
  267. package/dist/components/radio/RadioGroup.d.ts +121 -0
  268. package/dist/components/radio/RadioGroup.js +163 -0
  269. package/dist/components/radio/RadioGroup.js.map +1 -0
  270. package/dist/components/radio/radio-ring.js +21 -0
  271. package/dist/components/radio/radio-ring.js.map +1 -0
  272. package/dist/components/radio/radio-styles.d.ts +155 -0
  273. package/dist/components/radio/radio-styles.js +60 -0
  274. package/dist/components/radio/radio-styles.js.map +1 -0
  275. package/dist/components/radio/radio-tokens.d.ts +7 -0
  276. package/dist/components/radio/radio-tokens.js +31 -0
  277. package/dist/components/radio/radio-tokens.js.map +1 -0
  278. package/dist/components/search/SearchAppBar.d.ts +45 -0
  279. package/dist/components/search/SearchAppBar.js +61 -0
  280. package/dist/components/search/SearchAppBar.js.map +1 -0
  281. package/dist/components/search/SearchBar.d.ts +147 -0
  282. package/dist/components/search/SearchBar.js +412 -0
  283. package/dist/components/search/SearchBar.js.map +1 -0
  284. package/dist/components/search/search-styles.d.ts +243 -0
  285. package/dist/components/search/search-styles.js +143 -0
  286. package/dist/components/search/search-styles.js.map +1 -0
  287. package/dist/components/search/search-tokens.d.ts +9 -0
  288. package/dist/components/search/search-tokens.js +70 -0
  289. package/dist/components/search/search-tokens.js.map +1 -0
  290. package/dist/components/select/Select.d.ts +187 -0
  291. package/dist/components/select/Select.js +319 -0
  292. package/dist/components/select/Select.js.map +1 -0
  293. package/dist/components/select/field-shell.d.ts +29 -0
  294. package/dist/components/select/field-shell.js +135 -0
  295. package/dist/components/select/field-shell.js.map +1 -0
  296. package/dist/components/select/option-list.d.ts +81 -0
  297. package/dist/components/select/option-list.js +291 -0
  298. package/dist/components/select/option-list.js.map +1 -0
  299. package/dist/components/select/search-list.js +135 -0
  300. package/dist/components/select/search-list.js.map +1 -0
  301. package/dist/components/select/selection-cap.js +30 -0
  302. package/dist/components/select/selection-cap.js.map +1 -0
  303. package/dist/components/sheet/BottomSheet.d.ts +154 -0
  304. package/dist/components/sheet/BottomSheet.js +442 -0
  305. package/dist/components/sheet/BottomSheet.js.map +1 -0
  306. package/dist/components/sheet/SheetTrigger.d.ts +25 -0
  307. package/dist/components/sheet/SheetTrigger.js +46 -0
  308. package/dist/components/sheet/SheetTrigger.js.map +1 -0
  309. package/dist/components/sheet/SideSheet.d.ts +139 -0
  310. package/dist/components/sheet/SideSheet.js +289 -0
  311. package/dist/components/sheet/SideSheet.js.map +1 -0
  312. package/dist/components/sheet/bottom-sheet-gesture.js +30 -0
  313. package/dist/components/sheet/bottom-sheet-gesture.js.map +1 -0
  314. package/dist/components/sheet/lazy-bottom-sheet.js +33 -0
  315. package/dist/components/sheet/lazy-bottom-sheet.js.map +1 -0
  316. package/dist/components/sheet/sheet-gesture.js +48 -0
  317. package/dist/components/sheet/sheet-gesture.js.map +1 -0
  318. package/dist/components/sheet/sheet-icons.js +31 -0
  319. package/dist/components/sheet/sheet-icons.js.map +1 -0
  320. package/dist/components/sheet/sheet-settle.js +58 -0
  321. package/dist/components/sheet/sheet-settle.js.map +1 -0
  322. package/dist/components/sheet/sheet-styles.d.ts +312 -0
  323. package/dist/components/sheet/sheet-styles.js +229 -0
  324. package/dist/components/sheet/sheet-styles.js.map +1 -0
  325. package/dist/components/sheet/sheet-tokens.d.ts +12 -0
  326. package/dist/components/sheet/sheet-tokens.js +115 -0
  327. package/dist/components/sheet/sheet-tokens.js.map +1 -0
  328. package/dist/components/sheet/side-swipe-gesture.js +22 -0
  329. package/dist/components/sheet/side-swipe-gesture.js.map +1 -0
  330. package/dist/components/sheet/use-peek-inert.js +32 -0
  331. package/dist/components/sheet/use-peek-inert.js.map +1 -0
  332. package/dist/components/sheet/use-side-swipe.js +174 -0
  333. package/dist/components/sheet/use-side-swipe.js.map +1 -0
  334. package/dist/components/slider/Slider.d.ts +129 -0
  335. package/dist/components/slider/Slider.js +295 -0
  336. package/dist/components/slider/Slider.js.map +1 -0
  337. package/dist/components/slider/slider-geometry.js +138 -0
  338. package/dist/components/slider/slider-geometry.js.map +1 -0
  339. package/dist/components/slider/slider-styles.d.ts +133 -0
  340. package/dist/components/slider/slider-styles.js +97 -0
  341. package/dist/components/slider/slider-styles.js.map +1 -0
  342. package/dist/components/slider/slider-tokens.d.ts +7 -0
  343. package/dist/components/slider/slider-tokens.js +66 -0
  344. package/dist/components/slider/slider-tokens.js.map +1 -0
  345. package/dist/components/slider/use-touch-track.js +138 -0
  346. package/dist/components/slider/use-touch-track.js.map +1 -0
  347. package/dist/components/snackbar/Snackbar.d.ts +96 -0
  348. package/dist/components/snackbar/Snackbar.js +253 -0
  349. package/dist/components/snackbar/Snackbar.js.map +1 -0
  350. package/dist/components/snackbar/snackbar-state.d.ts +58 -0
  351. package/dist/components/snackbar/snackbar-state.js +73 -0
  352. package/dist/components/snackbar/snackbar-state.js.map +1 -0
  353. package/dist/components/snackbar/snackbar-styles.d.ts +109 -0
  354. package/dist/components/snackbar/snackbar-styles.js +67 -0
  355. package/dist/components/snackbar/snackbar-styles.js.map +1 -0
  356. package/dist/components/snackbar/snackbar-tokens.d.ts +7 -0
  357. package/dist/components/snackbar/snackbar-tokens.js +54 -0
  358. package/dist/components/snackbar/snackbar-tokens.js.map +1 -0
  359. package/dist/components/split-button/SplitButton.d.ts +109 -0
  360. package/dist/components/split-button/SplitButton.js +195 -0
  361. package/dist/components/split-button/SplitButton.js.map +1 -0
  362. package/dist/components/split-button/split-button-styles.d.ts +214 -0
  363. package/dist/components/split-button/split-button-styles.js +164 -0
  364. package/dist/components/split-button/split-button-styles.js.map +1 -0
  365. package/dist/components/split-button/split-button-tokens.d.ts +7 -0
  366. package/dist/components/split-button/split-button-tokens.js +36 -0
  367. package/dist/components/split-button/split-button-tokens.js.map +1 -0
  368. package/dist/components/switch/Switch.d.ts +82 -0
  369. package/dist/components/switch/Switch.js +165 -0
  370. package/dist/components/switch/Switch.js.map +1 -0
  371. package/dist/components/switch/switch-styles.d.ts +96 -0
  372. package/dist/components/switch/switch-styles.js +68 -0
  373. package/dist/components/switch/switch-styles.js.map +1 -0
  374. package/dist/components/switch/switch-thumb.js +41 -0
  375. package/dist/components/switch/switch-thumb.js.map +1 -0
  376. package/dist/components/switch/switch-tokens.d.ts +7 -0
  377. package/dist/components/switch/switch-tokens.js +78 -0
  378. package/dist/components/switch/switch-tokens.js.map +1 -0
  379. package/dist/components/tabs/Tabs.d.ts +120 -0
  380. package/dist/components/tabs/Tabs.js +346 -0
  381. package/dist/components/tabs/Tabs.js.map +1 -0
  382. package/dist/components/tabs/tabs-styles.d.ts +198 -0
  383. package/dist/components/tabs/tabs-styles.js +99 -0
  384. package/dist/components/tabs/tabs-styles.js.map +1 -0
  385. package/dist/components/tabs/tabs-tokens.d.ts +7 -0
  386. package/dist/components/tabs/tabs-tokens.js +121 -0
  387. package/dist/components/tabs/tabs-tokens.js.map +1 -0
  388. package/dist/components/text-field/TextField.d.ts +175 -0
  389. package/dist/components/text-field/TextField.js +250 -0
  390. package/dist/components/text-field/TextField.js.map +1 -0
  391. package/dist/components/text-field/text-field-styles.d.ts +252 -0
  392. package/dist/components/text-field/text-field-styles.js +209 -0
  393. package/dist/components/text-field/text-field-styles.js.map +1 -0
  394. package/dist/components/text-field/text-field-tokens.d.ts +7 -0
  395. package/dist/components/text-field/text-field-tokens.js +177 -0
  396. package/dist/components/text-field/text-field-tokens.js.map +1 -0
  397. package/dist/components/time-picker/TimePicker.d.ts +142 -0
  398. package/dist/components/time-picker/TimePicker.js +700 -0
  399. package/dist/components/time-picker/TimePicker.js.map +1 -0
  400. package/dist/components/time-picker/time-picker-styles.d.ts +175 -0
  401. package/dist/components/time-picker/time-picker-styles.js +112 -0
  402. package/dist/components/time-picker/time-picker-styles.js.map +1 -0
  403. package/dist/components/time-picker/time-picker-tokens.d.ts +7 -0
  404. package/dist/components/time-picker/time-picker-tokens.js +86 -0
  405. package/dist/components/time-picker/time-picker-tokens.js.map +1 -0
  406. package/dist/components/toolbar/Toolbar.d.ts +209 -0
  407. package/dist/components/toolbar/Toolbar.js +282 -0
  408. package/dist/components/toolbar/Toolbar.js.map +1 -0
  409. package/dist/components/toolbar/toolbar-styles.d.ts +403 -0
  410. package/dist/components/toolbar/toolbar-styles.js +253 -0
  411. package/dist/components/toolbar/toolbar-styles.js.map +1 -0
  412. package/dist/components/toolbar/toolbar-tokens.d.ts +27 -0
  413. package/dist/components/toolbar/toolbar-tokens.js +117 -0
  414. package/dist/components/toolbar/toolbar-tokens.js.map +1 -0
  415. package/dist/components/toolbar/use-toolbar-scroll-expansion.d.ts +56 -0
  416. package/dist/components/toolbar/use-toolbar-scroll-expansion.js +86 -0
  417. package/dist/components/toolbar/use-toolbar-scroll-expansion.js.map +1 -0
  418. package/dist/components/tooltip/Tooltip.d.ts +131 -0
  419. package/dist/components/tooltip/Tooltip.js +388 -0
  420. package/dist/components/tooltip/Tooltip.js.map +1 -0
  421. package/dist/components/tooltip/lazy-tooltip.js +35 -0
  422. package/dist/components/tooltip/lazy-tooltip.js.map +1 -0
  423. package/dist/components/tooltip/tooltip-placement.d.ts +16 -0
  424. package/dist/components/tooltip/tooltip-placement.js +14 -0
  425. package/dist/components/tooltip/tooltip-placement.js.map +1 -0
  426. package/dist/components/tooltip/tooltip-styles.d.ts +142 -0
  427. package/dist/components/tooltip/tooltip-styles.js +81 -0
  428. package/dist/components/tooltip/tooltip-styles.js.map +1 -0
  429. package/dist/components/tooltip/tooltip-tokens.d.ts +9 -0
  430. package/dist/components/tooltip/tooltip-tokens.js +72 -0
  431. package/dist/components/tooltip/tooltip-tokens.js.map +1 -0
  432. package/dist/components/tooltip/tooltip-trigger.d.ts +42 -0
  433. package/dist/components/tooltip/tooltip-trigger.js +115 -0
  434. package/dist/components/tooltip/tooltip-trigger.js.map +1 -0
  435. package/dist/composites/button-group/ButtonGroup.d.ts +116 -0
  436. package/dist/composites/button-group/ButtonGroup.js +270 -0
  437. package/dist/composites/button-group/ButtonGroup.js.map +1 -0
  438. package/dist/composites/button-group/button-group-styles.d.ts +73 -0
  439. package/dist/composites/button-group/button-group-styles.js +87 -0
  440. package/dist/composites/button-group/button-group-styles.js.map +1 -0
  441. package/dist/composites/button-group/lazy-overflow-menu.js +43 -0
  442. package/dist/composites/button-group/lazy-overflow-menu.js.map +1 -0
  443. package/dist/composites/button-group/overflow-menu-list.js +26 -0
  444. package/dist/composites/button-group/overflow-menu-list.js.map +1 -0
  445. package/dist/composites/button-group/use-overflow.js +75 -0
  446. package/dist/composites/button-group/use-overflow.js.map +1 -0
  447. package/dist/composites/button-group/use-press-expansion.js +155 -0
  448. package/dist/composites/button-group/use-press-expansion.js.map +1 -0
  449. package/dist/index.d.ts +142 -0
  450. package/dist/index.js +136 -0
  451. package/dist/motion/get-m3-spring.d.ts +6 -0
  452. package/dist/motion/get-m3-spring.js +10 -0
  453. package/dist/motion/get-m3-spring.js.map +1 -0
  454. package/dist/motion/reduced-motion.js +19 -0
  455. package/dist/motion/reduced-motion.js.map +1 -0
  456. package/dist/motion/use-m3-spring.d.ts +13 -0
  457. package/dist/motion/use-m3-spring.js +22 -0
  458. package/dist/motion/use-m3-spring.js.map +1 -0
  459. package/dist/next/NextRouterProvider.d.ts +13 -0
  460. package/dist/next/NextRouterProvider.js +26 -0
  461. package/dist/next/NextRouterProvider.js.map +1 -0
  462. package/dist/next/get-theme-from-cookies.d.ts +32 -0
  463. package/dist/next/get-theme-from-cookies.js +27 -0
  464. package/dist/next/get-theme-from-cookies.js.map +1 -0
  465. package/dist/next/navigation-guard.d.ts +30 -0
  466. package/dist/next/navigation-guard.js +68 -0
  467. package/dist/next/navigation-guard.js.map +1 -0
  468. package/dist/next.d.ts +5 -0
  469. package/dist/next.js +5 -0
  470. package/dist/primitives/ButtonBase.d.ts +115 -0
  471. package/dist/primitives/ButtonBase.js +231 -0
  472. package/dist/primitives/ButtonBase.js.map +1 -0
  473. package/dist/primitives/DomDirectionLocale.d.ts +18 -0
  474. package/dist/primitives/DomDirectionLocale.js +28 -0
  475. package/dist/primitives/DomDirectionLocale.js.map +1 -0
  476. package/dist/primitives/Field.d.ts +50 -0
  477. package/dist/primitives/Field.js +74 -0
  478. package/dist/primitives/Field.js.map +1 -0
  479. package/dist/primitives/IconFaces.js +23 -0
  480. package/dist/primitives/IconFaces.js.map +1 -0
  481. package/dist/primitives/Overlay.d.ts +39 -0
  482. package/dist/primitives/Overlay.js +86 -0
  483. package/dist/primitives/Overlay.js.map +1 -0
  484. package/dist/primitives/SelectionControl.d.ts +55 -0
  485. package/dist/primitives/SelectionControl.js +58 -0
  486. package/dist/primitives/SelectionControl.js.map +1 -0
  487. package/dist/primitives/Surface.d.ts +123 -0
  488. package/dist/primitives/Surface.js +68 -0
  489. package/dist/primitives/Surface.js.map +1 -0
  490. package/dist/primitives/ToolbarContext.js +12 -0
  491. package/dist/primitives/ToolbarContext.js.map +1 -0
  492. package/dist/primitives/TouchTarget.d.ts +14 -0
  493. package/dist/primitives/TouchTarget.js +20 -0
  494. package/dist/primitives/TouchTarget.js.map +1 -0
  495. package/dist/primitives/TriggerContext.d.ts +34 -0
  496. package/dist/primitives/TriggerContext.js +24 -0
  497. package/dist/primitives/TriggerContext.js.map +1 -0
  498. package/dist/primitives/hidden-input-focus.js +27 -0
  499. package/dist/primitives/hidden-input-focus.js.map +1 -0
  500. package/dist/primitives/icon-faces-styles.d.ts +9 -0
  501. package/dist/primitives/icon-faces-styles.js +45 -0
  502. package/dist/primitives/icon-faces-styles.js.map +1 -0
  503. package/dist/primitives/locale-with-direction.d.ts +9 -0
  504. package/dist/primitives/locale-with-direction.js +17 -0
  505. package/dist/primitives/locale-with-direction.js.map +1 -0
  506. package/dist/primitives/morph-path.d.ts +25 -0
  507. package/dist/primitives/morph-path.js +38 -0
  508. package/dist/primitives/morph-path.js.map +1 -0
  509. package/dist/primitives/selection-control-styles.d.ts +54 -0
  510. package/dist/primitives/selection-control-styles.js +44 -0
  511. package/dist/primitives/selection-control-styles.js.map +1 -0
  512. package/dist/primitives/use-m3-interaction.d.ts +51 -0
  513. package/dist/primitives/use-m3-interaction.js +149 -0
  514. package/dist/primitives/use-m3-interaction.js.map +1 -0
  515. package/dist/primitives/use-m3-morph.d.ts +18 -0
  516. package/dist/primitives/use-m3-morph.js +36 -0
  517. package/dist/primitives/use-m3-morph.js.map +1 -0
  518. package/dist/primitives/use-presence.d.ts +19 -0
  519. package/dist/primitives/use-presence.js +37 -0
  520. package/dist/primitives/use-presence.js.map +1 -0
  521. package/dist/primitives.d.ts +36 -0
  522. package/dist/primitives.js +34 -0
  523. package/dist/shapes/corner-rounding.d.ts +13 -0
  524. package/dist/shapes/corner-rounding.js +18 -0
  525. package/dist/shapes/corner-rounding.js.map +1 -0
  526. package/dist/shapes/cubic.d.ts +52 -0
  527. package/dist/shapes/cubic.js +189 -0
  528. package/dist/shapes/cubic.js.map +1 -0
  529. package/dist/shapes/feature-mapping.js +80 -0
  530. package/dist/shapes/feature-mapping.js.map +1 -0
  531. package/dist/shapes/features.d.ts +23 -0
  532. package/dist/shapes/features.js +82 -0
  533. package/dist/shapes/features.js.map +1 -0
  534. package/dist/shapes/float-mapping.js +65 -0
  535. package/dist/shapes/float-mapping.js.map +1 -0
  536. package/dist/shapes/generated/material-shape-path-record.d.ts +11 -0
  537. package/dist/shapes/generated/material-shape-path-record.js +48 -0
  538. package/dist/shapes/generated/material-shape-path-record.js.map +1 -0
  539. package/dist/shapes/generated/material-shape-paths.d.ts +78 -0
  540. package/dist/shapes/generated/material-shape-paths.js +218 -0
  541. package/dist/shapes/generated/material-shape-paths.js.map +1 -0
  542. package/dist/shapes/mask.d.ts +14 -0
  543. package/dist/shapes/mask.js +24 -0
  544. package/dist/shapes/mask.js.map +1 -0
  545. package/dist/shapes/material-shapes.d.ts +11 -0
  546. package/dist/shapes/material-shapes.js +250 -0
  547. package/dist/shapes/material-shapes.js.map +1 -0
  548. package/dist/shapes/morph.d.ts +25 -0
  549. package/dist/shapes/morph.js +97 -0
  550. package/dist/shapes/morph.js.map +1 -0
  551. package/dist/shapes/path.d.ts +33 -0
  552. package/dist/shapes/path.js +47 -0
  553. package/dist/shapes/path.js.map +1 -0
  554. package/dist/shapes/point.d.ts +28 -0
  555. package/dist/shapes/point.js +103 -0
  556. package/dist/shapes/point.js.map +1 -0
  557. package/dist/shapes/polygon-measure.js +140 -0
  558. package/dist/shapes/polygon-measure.js.map +1 -0
  559. package/dist/shapes/rounded-polygon.d.ts +44 -0
  560. package/dist/shapes/rounded-polygon.js +278 -0
  561. package/dist/shapes/rounded-polygon.js.map +1 -0
  562. package/dist/shapes/shape-path.d.ts +15 -0
  563. package/dist/shapes/shapes.d.ts +53 -0
  564. package/dist/shapes/shapes.js +171 -0
  565. package/dist/shapes/shapes.js.map +1 -0
  566. package/dist/styles/generated/components.css +710 -0
  567. package/dist/styles/generated/theme.css +247 -0
  568. package/dist/styles/generated/themes.css +3361 -0
  569. package/dist/styles/generated/tokens.css +284 -0
  570. package/dist/styles/styles.css +15 -0
  571. package/dist/styles/utilities.css +283 -0
  572. package/dist/styles.compiled.css +2 -0
  573. package/dist/theme/ThemeProvider.d.ts +72 -0
  574. package/dist/theme/ThemeProvider.js +144 -0
  575. package/dist/theme/ThemeProvider.js.map +1 -0
  576. package/dist/theme/ThemeScope.d.ts +32 -0
  577. package/dist/theme/ThemeScope.js +67 -0
  578. package/dist/theme/ThemeScope.js.map +1 -0
  579. package/dist/theme/ThemeScript.d.ts +26 -0
  580. package/dist/theme/ThemeScript.js +44 -0
  581. package/dist/theme/ThemeScript.js.map +1 -0
  582. package/dist/theme/context.d.ts +32 -0
  583. package/dist/theme/context.js +47 -0
  584. package/dist/theme/context.js.map +1 -0
  585. package/dist/theme/create-theme.d.ts +60 -0
  586. package/dist/theme/create-theme.js +47 -0
  587. package/dist/theme/create-theme.js.map +1 -0
  588. package/dist/theme/css.js +54 -0
  589. package/dist/theme/css.js.map +1 -0
  590. package/dist/theme/parse-palettes.js +40 -0
  591. package/dist/theme/parse-palettes.js.map +1 -0
  592. package/dist/theme/scheme.d.ts +6 -0
  593. package/dist/theme/scheme.js +118 -0
  594. package/dist/theme/scheme.js.map +1 -0
  595. package/dist/theme/state.d.ts +38 -0
  596. package/dist/theme/state.js +93 -0
  597. package/dist/theme/state.js.map +1 -0
  598. package/dist/theme/storage.js +21 -0
  599. package/dist/theme/storage.js.map +1 -0
  600. package/dist/tokens/breakpoints.d.ts +15 -0
  601. package/dist/tokens/breakpoints.js +16 -0
  602. package/dist/tokens/breakpoints.js.map +1 -0
  603. package/dist/tokens/color.d.ts +104 -0
  604. package/dist/tokens/color.js +147 -0
  605. package/dist/tokens/color.js.map +1 -0
  606. package/dist/tokens/component.d.ts +110 -0
  607. package/dist/tokens/component.js +67 -0
  608. package/dist/tokens/component.js.map +1 -0
  609. package/dist/tokens/density.d.ts +20 -0
  610. package/dist/tokens/density.js +27 -0
  611. package/dist/tokens/density.js.map +1 -0
  612. package/dist/tokens/elevation.d.ts +44 -0
  613. package/dist/tokens/elevation.js +45 -0
  614. package/dist/tokens/elevation.js.map +1 -0
  615. package/dist/tokens/motion.d.ts +79 -0
  616. package/dist/tokens/motion.js +126 -0
  617. package/dist/tokens/motion.js.map +1 -0
  618. package/dist/tokens/shape.d.ts +22 -0
  619. package/dist/tokens/shape.js +22 -0
  620. package/dist/tokens/shape.js.map +1 -0
  621. package/dist/tokens/spring-velocity.d.ts +19 -0
  622. package/dist/tokens/spring-velocity.js +44 -0
  623. package/dist/tokens/spring-velocity.js.map +1 -0
  624. package/dist/tokens/state.d.ts +18 -0
  625. package/dist/tokens/state.js +19 -0
  626. package/dist/tokens/state.js.map +1 -0
  627. package/dist/tokens/typography.d.ts +64 -0
  628. package/dist/tokens/typography.js +60 -0
  629. package/dist/tokens/typography.js.map +1 -0
  630. package/dist/tokens/z-index.d.ts +17 -0
  631. package/dist/tokens/z-index.js +18 -0
  632. package/dist/tokens/z-index.js.map +1 -0
  633. package/dist/utils/announce.js +51 -0
  634. package/dist/utils/announce.js.map +1 -0
  635. package/dist/utils/assert-collection-children.js +26 -0
  636. package/dist/utils/assert-collection-children.js.map +1 -0
  637. package/dist/utils/closed-by.d.ts +9 -0
  638. package/dist/utils/closed-by.js +12 -0
  639. package/dist/utils/closed-by.js.map +1 -0
  640. package/dist/utils/cn.d.ts +31 -0
  641. package/dist/utils/cn.js +37 -0
  642. package/dist/utils/cn.js.map +1 -0
  643. package/dist/utils/composite-keys.js +32 -0
  644. package/dist/utils/composite-keys.js.map +1 -0
  645. package/dist/utils/focus-visible.js +14 -0
  646. package/dist/utils/focus-visible.js.map +1 -0
  647. package/dist/utils/focus.js +51 -0
  648. package/dist/utils/focus.js.map +1 -0
  649. package/dist/utils/focusable-disabled.js +12 -0
  650. package/dist/utils/focusable-disabled.js.map +1 -0
  651. package/dist/utils/keep-pressed-in-place.d.ts +60 -0
  652. package/dist/utils/keep-pressed-in-place.js +127 -0
  653. package/dist/utils/keep-pressed-in-place.js.map +1 -0
  654. package/dist/utils/load-on-demand.js +111 -0
  655. package/dist/utils/load-on-demand.js.map +1 -0
  656. package/dist/utils/merge-data-tokens.d.ts +9 -0
  657. package/dist/utils/merge-data-tokens.js +15 -0
  658. package/dist/utils/merge-data-tokens.js.map +1 -0
  659. package/dist/utils/natural-size.js +53 -0
  660. package/dist/utils/natural-size.js.map +1 -0
  661. package/dist/utils/nearest-reveal.js +28 -0
  662. package/dist/utils/nearest-reveal.js.map +1 -0
  663. package/dist/utils/placement.js +14 -0
  664. package/dist/utils/placement.js.map +1 -0
  665. package/dist/utils/radio-group-keys.js +74 -0
  666. package/dist/utils/radio-group-keys.js.map +1 -0
  667. package/dist/utils/rendered-description.js +17 -0
  668. package/dist/utils/rendered-description.js.map +1 -0
  669. package/dist/utils/root-props.d.ts +103 -0
  670. package/dist/utils/root-props.js +51 -0
  671. package/dist/utils/root-props.js.map +1 -0
  672. package/dist/utils/search.d.ts +11 -0
  673. package/dist/utils/search.js +18 -0
  674. package/dist/utils/search.js.map +1 -0
  675. package/dist/utils/shortcut.js +20 -0
  676. package/dist/utils/shortcut.js.map +1 -0
  677. package/dist/utils/split-data-attributes.d.ts +12 -0
  678. package/dist/utils/split-data-attributes.js +20 -0
  679. package/dist/utils/split-data-attributes.js.map +1 -0
  680. package/dist/utils/toolbar-keys.js +28 -0
  681. package/dist/utils/toolbar-keys.js.map +1 -0
  682. package/dist/utils/tv.d.ts +7 -0
  683. package/dist/utils/tv.js +9 -0
  684. package/dist/utils/tv.js.map +1 -0
  685. package/dist/utils/typeahead.js +64 -0
  686. package/dist/utils/typeahead.js.map +1 -0
  687. package/dist/utils/warn-once.js +30 -0
  688. package/dist/utils/warn-once.js.map +1 -0
  689. package/dist/vendor/material-color-utilities/blend/blend.js +88 -0
  690. package/dist/vendor/material-color-utilities/blend/blend.js.map +1 -0
  691. package/dist/vendor/material-color-utilities/contrast/contrast.js +131 -0
  692. package/dist/vendor/material-color-utilities/contrast/contrast.js.map +1 -0
  693. package/dist/vendor/material-color-utilities/dislike/dislike_analyzer.js +58 -0
  694. package/dist/vendor/material-color-utilities/dislike/dislike_analyzer.js.map +1 -0
  695. package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2021.js +620 -0
  696. package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2021.js.map +1 -0
  697. package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2025.js +786 -0
  698. package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2025.js.map +1 -0
  699. package/dist/vendor/material-color-utilities/dynamiccolor/contrast_curve.js +59 -0
  700. package/dist/vendor/material-color-utilities/dynamiccolor/contrast_curve.js.map +1 -0
  701. package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_color.js +420 -0
  702. package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_color.js.map +1 -0
  703. package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_scheme.js +701 -0
  704. package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_scheme.js.map +1 -0
  705. package/dist/vendor/material-color-utilities/dynamiccolor/material_dynamic_colors.js +374 -0
  706. package/dist/vendor/material-color-utilities/dynamiccolor/material_dynamic_colors.js.map +1 -0
  707. package/dist/vendor/material-color-utilities/dynamiccolor/tone_delta_pair.js +65 -0
  708. package/dist/vendor/material-color-utilities/dynamiccolor/tone_delta_pair.js.map +1 -0
  709. package/dist/vendor/material-color-utilities/dynamiccolor/variant.js +38 -0
  710. package/dist/vendor/material-color-utilities/dynamiccolor/variant.js.map +1 -0
  711. package/dist/vendor/material-color-utilities/hct/cam16.js +309 -0
  712. package/dist/vendor/material-color-utilities/hct/cam16.js.map +1 -0
  713. package/dist/vendor/material-color-utilities/hct/hct.js +148 -0
  714. package/dist/vendor/material-color-utilities/hct/hct.js.map +1 -0
  715. package/dist/vendor/material-color-utilities/hct/hct_solver.js +660 -0
  716. package/dist/vendor/material-color-utilities/hct/hct_solver.js.map +1 -0
  717. package/dist/vendor/material-color-utilities/hct/viewing_conditions.js +117 -0
  718. package/dist/vendor/material-color-utilities/hct/viewing_conditions.js.map +1 -0
  719. package/dist/vendor/material-color-utilities/index.js +51 -0
  720. package/dist/vendor/material-color-utilities/index.js.map +1 -0
  721. package/dist/vendor/material-color-utilities/palettes/core_palette.js +22 -0
  722. package/dist/vendor/material-color-utilities/palettes/core_palette.js.map +1 -0
  723. package/dist/vendor/material-color-utilities/palettes/tonal_palette.js +134 -0
  724. package/dist/vendor/material-color-utilities/palettes/tonal_palette.js.map +1 -0
  725. package/dist/vendor/material-color-utilities/scheme/scheme.js +21 -0
  726. package/dist/vendor/material-color-utilities/scheme/scheme.js.map +1 -0
  727. package/dist/vendor/material-color-utilities/scheme/scheme_android.js +21 -0
  728. package/dist/vendor/material-color-utilities/scheme/scheme_android.js.map +1 -0
  729. package/dist/vendor/material-color-utilities/scheme/scheme_content.js +22 -0
  730. package/dist/vendor/material-color-utilities/scheme/scheme_content.js.map +1 -0
  731. package/dist/vendor/material-color-utilities/scheme/scheme_expressive.js +38 -0
  732. package/dist/vendor/material-color-utilities/scheme/scheme_expressive.js.map +1 -0
  733. package/dist/vendor/material-color-utilities/scheme/scheme_fidelity.js +22 -0
  734. package/dist/vendor/material-color-utilities/scheme/scheme_fidelity.js.map +1 -0
  735. package/dist/vendor/material-color-utilities/scheme/scheme_fruit_salad.js +22 -0
  736. package/dist/vendor/material-color-utilities/scheme/scheme_fruit_salad.js.map +1 -0
  737. package/dist/vendor/material-color-utilities/scheme/scheme_monochrome.js +22 -0
  738. package/dist/vendor/material-color-utilities/scheme/scheme_monochrome.js.map +1 -0
  739. package/dist/vendor/material-color-utilities/scheme/scheme_neutral.js +36 -0
  740. package/dist/vendor/material-color-utilities/scheme/scheme_neutral.js.map +1 -0
  741. package/dist/vendor/material-color-utilities/scheme/scheme_rainbow.js +22 -0
  742. package/dist/vendor/material-color-utilities/scheme/scheme_rainbow.js.map +1 -0
  743. package/dist/vendor/material-color-utilities/scheme/scheme_tonal_spot.js +41 -0
  744. package/dist/vendor/material-color-utilities/scheme/scheme_tonal_spot.js.map +1 -0
  745. package/dist/vendor/material-color-utilities/scheme/scheme_vibrant.js +39 -0
  746. package/dist/vendor/material-color-utilities/scheme/scheme_vibrant.js.map +1 -0
  747. package/dist/vendor/material-color-utilities/score/score.js +115 -0
  748. package/dist/vendor/material-color-utilities/score/score.js.map +1 -0
  749. package/dist/vendor/material-color-utilities/temperature/temperature_cache.js +227 -0
  750. package/dist/vendor/material-color-utilities/temperature/temperature_cache.js.map +1 -0
  751. package/dist/vendor/material-color-utilities/utils/color_utils.js +246 -0
  752. package/dist/vendor/material-color-utilities/utils/color_utils.js.map +1 -0
  753. package/dist/vendor/material-color-utilities/utils/image_utils.js +21 -0
  754. package/dist/vendor/material-color-utilities/utils/image_utils.js.map +1 -0
  755. package/dist/vendor/material-color-utilities/utils/math_utils.js +119 -0
  756. package/dist/vendor/material-color-utilities/utils/math_utils.js.map +1 -0
  757. package/dist/vendor/material-color-utilities/utils/string_utils.js +74 -0
  758. package/dist/vendor/material-color-utilities/utils/string_utils.js.map +1 -0
  759. package/dist/vendor/material-color-utilities/utils/theme_utils.js +24 -0
  760. package/dist/vendor/material-color-utilities/utils/theme_utils.js.map +1 -0
  761. package/package.json +114 -3
@@ -0,0 +1,147 @@
1
+ //#region src/tokens/color.ts
2
+ /**
3
+ * M3 colour roles, built-in themes and contrast levels.
4
+ *
5
+ * Role names are the kebab-case form of the `MaterialDynamicColors` methods in
6
+ * `@material/material-color-utilities`, plus the custom-colour roles (`success`,
7
+ * `warning`; see {@link CUSTOM_COLOR_ROLES}). They become `--md-sys-color-<role>` CSS
8
+ * variables and `bg-<role>` / `text-<role>` / … Tailwind utilities.
9
+ */
10
+ const COLOR_ROLES = [
11
+ "primary",
12
+ "on-primary",
13
+ "primary-container",
14
+ "on-primary-container",
15
+ "inverse-primary",
16
+ "primary-fixed",
17
+ "primary-fixed-dim",
18
+ "on-primary-fixed",
19
+ "on-primary-fixed-variant",
20
+ "secondary",
21
+ "on-secondary",
22
+ "secondary-container",
23
+ "on-secondary-container",
24
+ "secondary-fixed",
25
+ "secondary-fixed-dim",
26
+ "on-secondary-fixed",
27
+ "on-secondary-fixed-variant",
28
+ "tertiary",
29
+ "on-tertiary",
30
+ "tertiary-container",
31
+ "on-tertiary-container",
32
+ "tertiary-fixed",
33
+ "tertiary-fixed-dim",
34
+ "on-tertiary-fixed",
35
+ "on-tertiary-fixed-variant",
36
+ "error",
37
+ "on-error",
38
+ "error-container",
39
+ "on-error-container",
40
+ "background",
41
+ "on-background",
42
+ "surface",
43
+ "surface-dim",
44
+ "surface-bright",
45
+ "surface-container-lowest",
46
+ "surface-container-low",
47
+ "surface-container",
48
+ "surface-container-high",
49
+ "surface-container-highest",
50
+ "on-surface",
51
+ "surface-variant",
52
+ "on-surface-variant",
53
+ "inverse-surface",
54
+ "inverse-on-surface",
55
+ "outline",
56
+ "outline-variant",
57
+ "shadow",
58
+ "scrim",
59
+ "surface-tint",
60
+ "success",
61
+ "on-success",
62
+ "success-container",
63
+ "on-success-container",
64
+ "warning",
65
+ "on-warning",
66
+ "warning-container",
67
+ "on-warning-container"
68
+ ];
69
+ /**
70
+ * Colours M3 has no key colour for, generated the way Material Theme Builder makes "custom
71
+ * colours": each gets colour, on-colour, container and on-container roles, with the error
72
+ * roles' tone rules (so the same contrast as error), harmonised toward the theme's seed.
73
+ */
74
+ const CUSTOM_COLORS = ["success", "warning"];
75
+ /** The four roles of each custom colour. */
76
+ const CUSTOM_COLOR_ROLES = COLOR_ROLES.filter((role) => CUSTOM_COLORS.some((name) => role.includes(name)));
77
+ /** The default custom colours; only their hue and chroma matter, not their lightness. */
78
+ const DEFAULT_CUSTOM_COLORS = {
79
+ success: "#1E8E3E",
80
+ warning: "#F9AB00"
81
+ };
82
+ /** Scheme variants supported by the 2025 colour spec. */
83
+ const SCHEME_VARIANTS = [
84
+ "tonal-spot",
85
+ "neutral",
86
+ "vibrant",
87
+ "expressive"
88
+ ];
89
+ /**
90
+ * The six tonal palettes an M3 scheme is built from: the "core colours" of Material Theme
91
+ * Builder. Every colour role takes its tone from one of them.
92
+ */
93
+ const PALETTE_NAMES = [
94
+ "primary",
95
+ "secondary",
96
+ "tertiary",
97
+ "error",
98
+ "neutral",
99
+ "neutralVariant"
100
+ ];
101
+ /** The six built-in themes: each one's seed colour and scheme variant. */
102
+ const BUILT_IN_THEMES = {
103
+ baseline: {
104
+ seed: "#6750A4",
105
+ variant: "tonal-spot"
106
+ },
107
+ ocean: {
108
+ seed: "#0061A4",
109
+ variant: "tonal-spot"
110
+ },
111
+ forest: {
112
+ seed: "#386A20",
113
+ variant: "tonal-spot"
114
+ },
115
+ sunset: {
116
+ seed: "#A04100",
117
+ variant: "tonal-spot"
118
+ },
119
+ rose: {
120
+ seed: "#9C4146",
121
+ variant: "tonal-spot"
122
+ },
123
+ slate: {
124
+ seed: "#545F71",
125
+ variant: "neutral"
126
+ }
127
+ };
128
+ /** The built-in themes' names, in order: `baseline`, `ocean`, `forest`, `sunset`, `rose`, `slate`. */
129
+ const BUILT_IN_THEME_NAMES = Object.keys(BUILT_IN_THEMES);
130
+ const DEFAULT_THEME = "baseline";
131
+ const COLOR_MODES = [
132
+ "light",
133
+ "dark",
134
+ "system"
135
+ ];
136
+ /** Contrast levels and the `contrastLevel` passed to the colour library. */
137
+ const CONTRAST_LEVELS = {
138
+ standard: 0,
139
+ medium: .5,
140
+ high: 1
141
+ };
142
+ /** The contrast levels' names: `standard`, `medium` and `high`. */
143
+ const CONTRAST_LEVEL_NAMES = Object.keys(CONTRAST_LEVELS);
144
+ //#endregion
145
+ export { BUILT_IN_THEMES, BUILT_IN_THEME_NAMES, COLOR_MODES, COLOR_ROLES, CONTRAST_LEVELS, CONTRAST_LEVEL_NAMES, CUSTOM_COLORS, CUSTOM_COLOR_ROLES, DEFAULT_CUSTOM_COLORS, DEFAULT_THEME, PALETTE_NAMES, SCHEME_VARIANTS };
146
+
147
+ //# sourceMappingURL=color.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.js","names":[],"sources":["../../src/tokens/color.ts"],"sourcesContent":["/**\n * M3 colour roles, built-in themes and contrast levels.\n *\n * Role names are the kebab-case form of the `MaterialDynamicColors` methods in\n * `@material/material-color-utilities`, plus the custom-colour roles (`success`,\n * `warning`; see {@link CUSTOM_COLOR_ROLES}). They become `--md-sys-color-<role>` CSS\n * variables and `bg-<role>` / `text-<role>` / … Tailwind utilities.\n */\n\nexport const COLOR_ROLES = [\n 'primary',\n 'on-primary',\n 'primary-container',\n 'on-primary-container',\n 'inverse-primary',\n 'primary-fixed',\n 'primary-fixed-dim',\n 'on-primary-fixed',\n 'on-primary-fixed-variant',\n 'secondary',\n 'on-secondary',\n 'secondary-container',\n 'on-secondary-container',\n 'secondary-fixed',\n 'secondary-fixed-dim',\n 'on-secondary-fixed',\n 'on-secondary-fixed-variant',\n 'tertiary',\n 'on-tertiary',\n 'tertiary-container',\n 'on-tertiary-container',\n 'tertiary-fixed',\n 'tertiary-fixed-dim',\n 'on-tertiary-fixed',\n 'on-tertiary-fixed-variant',\n 'error',\n 'on-error',\n 'error-container',\n 'on-error-container',\n 'background',\n 'on-background',\n 'surface',\n 'surface-dim',\n 'surface-bright',\n 'surface-container-lowest',\n 'surface-container-low',\n 'surface-container',\n 'surface-container-high',\n 'surface-container-highest',\n 'on-surface',\n 'surface-variant',\n 'on-surface-variant',\n 'inverse-surface',\n 'inverse-on-surface',\n 'outline',\n 'outline-variant',\n 'shadow',\n 'scrim',\n 'surface-tint',\n 'success',\n 'on-success',\n 'success-container',\n 'on-success-container',\n 'warning',\n 'on-warning',\n 'warning-container',\n 'on-warning-container',\n] as const;\n\n/** An M3 colour role, such as `primary` or `on-surface-variant` (`--md-sys-color-<role>`). */\nexport type ColorRole = (typeof COLOR_ROLES)[number];\n\n/**\n * Colours M3 has no key colour for, generated the way Material Theme Builder makes \"custom\n * colours\": each gets colour, on-colour, container and on-container roles, with the error\n * roles' tone rules (so the same contrast as error), harmonised toward the theme's seed.\n */\nexport const CUSTOM_COLORS = ['success', 'warning'] as const;\nexport type CustomColorName = (typeof CUSTOM_COLORS)[number];\n\n/** The four roles of each custom colour. */\nexport const CUSTOM_COLOR_ROLES = COLOR_ROLES.filter((role) =>\n CUSTOM_COLORS.some((name) => role.includes(name)),\n);\n\n/** The default custom colours; only their hue and chroma matter, not their lightness. */\nexport const DEFAULT_CUSTOM_COLORS: Readonly<Record<CustomColorName, `#${string}`>> = {\n success: '#1E8E3E',\n warning: '#F9AB00',\n};\n\n/** Scheme variants supported by the 2025 colour spec. */\nexport const SCHEME_VARIANTS = ['tonal-spot', 'neutral', 'vibrant', 'expressive'] as const;\nexport type SchemeVariant = (typeof SCHEME_VARIANTS)[number];\n\n/**\n * The six tonal palettes an M3 scheme is built from: the \"core colours\" of Material Theme\n * Builder. Every colour role takes its tone from one of them.\n */\nexport const PALETTE_NAMES = [\n 'primary',\n 'secondary',\n 'tertiary',\n 'error',\n 'neutral',\n 'neutralVariant',\n] as const;\nexport type PaletteName = (typeof PALETTE_NAMES)[number];\n\n/**\n * Where a palette comes from: a scheme variant (that palette from that variant of the same\n * seed) or a hex colour (a palette built from its hue and chroma, as Material Theme Builder\n * does for a core colour).\n */\nexport type PaletteSource = SchemeVariant | `#${string}`;\n\n/** Per-palette sources; any palette left out comes from the theme's own `variant`. */\nexport type ThemePalettes = Partial<Record<PaletteName, PaletteSource>>;\n\nexport interface ThemeSeed {\n seed: string;\n variant: SchemeVariant;\n /**\n * Takes some palettes from elsewhere, e.g. `{ neutral: 'tonal-spot', neutralVariant:\n * 'tonal-spot' }` for vivid accents on calm surfaces, or `{ tertiary: '#00A07A' }` for a\n * brand's own tertiary colour. Roles still take their tones from the M3 spec, so contrast\n * is unchanged.\n */\n palettes?: ThemePalettes;\n /** The success and warning colours; each defaults to {@link DEFAULT_CUSTOM_COLORS}. */\n customColors?: Partial<Record<CustomColorName, `#${string}`>>;\n /**\n * Turns each custom colour's hue up to 15° toward the seed, as Material Theme Builder\n * does, so it belongs to the theme. `false` keeps a brand's exact status colours.\n * @default true\n */\n harmonize?: boolean;\n}\n\n/** The six built-in themes: each one's seed colour and scheme variant. */\nexport const BUILT_IN_THEMES = {\n baseline: { seed: '#6750A4', variant: 'tonal-spot' },\n ocean: { seed: '#0061A4', variant: 'tonal-spot' },\n forest: { seed: '#386A20', variant: 'tonal-spot' },\n sunset: { seed: '#A04100', variant: 'tonal-spot' },\n rose: { seed: '#9C4146', variant: 'tonal-spot' },\n slate: { seed: '#545F71', variant: 'neutral' },\n} as const satisfies Record<string, ThemeSeed>;\n\nexport type BuiltInThemeName = keyof typeof BUILT_IN_THEMES;\n/** The built-in themes' names, in order: `baseline`, `ocean`, `forest`, `sunset`, `rose`, `slate`. */\nexport const BUILT_IN_THEME_NAMES = Object.keys(BUILT_IN_THEMES) as BuiltInThemeName[];\nexport const DEFAULT_THEME: BuiltInThemeName = 'baseline';\n\nexport const COLOR_MODES = ['light', 'dark', 'system'] as const;\nexport type ColorMode = (typeof COLOR_MODES)[number];\nexport type ResolvedColorMode = Exclude<ColorMode, 'system'>;\n\n/** Contrast levels and the `contrastLevel` passed to the colour library. */\nexport const CONTRAST_LEVELS = { standard: 0, medium: 0.5, high: 1 } as const;\nexport type ContrastLevel = keyof typeof CONTRAST_LEVELS;\n/** The contrast levels' names: `standard`, `medium` and `high`. */\nexport const CONTRAST_LEVEL_NAMES = Object.keys(CONTRAST_LEVELS) as ContrastLevel[];\n"],"mappings":";;;;;;;;;AASA,MAAa,cAAc;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;AAUA,MAAa,gBAAgB,CAAC,WAAW,SAAS;;AAIlD,MAAa,qBAAqB,YAAY,QAAQ,SACpD,cAAc,MAAM,SAAS,KAAK,SAAS,IAAI,CAAC,CAClD;;AAGA,MAAa,wBAAyE;CACpF,SAAS;CACT,SAAS;AACX;;AAGA,MAAa,kBAAkB;CAAC;CAAc;CAAW;CAAW;AAAY;;;;;AAOhF,MAAa,gBAAgB;CAC3B;CACA;CACA;CACA;CACA;CACA;AACF;;AAkCA,MAAa,kBAAkB;CAC7B,UAAU;EAAE,MAAM;EAAW,SAAS;CAAa;CACnD,OAAO;EAAE,MAAM;EAAW,SAAS;CAAa;CAChD,QAAQ;EAAE,MAAM;EAAW,SAAS;CAAa;CACjD,QAAQ;EAAE,MAAM;EAAW,SAAS;CAAa;CACjD,MAAM;EAAE,MAAM;EAAW,SAAS;CAAa;CAC/C,OAAO;EAAE,MAAM;EAAW,SAAS;CAAU;AAC/C;;AAIA,MAAa,uBAAuB,OAAO,KAAK,eAAe;AAC/D,MAAa,gBAAkC;AAE/C,MAAa,cAAc;CAAC;CAAS;CAAQ;AAAQ;;AAKrD,MAAa,kBAAkB;CAAE,UAAU;CAAG,QAAQ;CAAK,MAAM;AAAE;;AAGnE,MAAa,uBAAuB,OAAO,KAAK,eAAe"}
@@ -0,0 +1,110 @@
1
+ import { ColorRole } from "./color.js";
2
+ import { SpringFamily, SpringSpeed } from "./motion.js";
3
+ import { ElevationLevel } from "./elevation.js";
4
+ import { CornerName } from "./shape.js";
5
+ import { TypeRole } from "./typography.js";
6
+ //#region src/tokens/component.d.ts
7
+ /** A token's default, as CSS. Use the helpers below, so it reads the system tokens. */
8
+ export type TokenValue = string;
9
+ /**
10
+ * Where a token shows, for the tests that set it and check the result: the element (the
11
+ * component's root, or the element with `data-slot="<slot>"` inside it), the computed CSS
12
+ * property, and the `data-*` state the element must be in.
13
+ */
14
+ export interface TokenPaints {
15
+ /** The `data-slot` of the element it paints. The component's root when omitted. */
16
+ slot?: string;
17
+ /** The CSS property, as `getComputedStyle` names it: `background-color`. */
18
+ property: string;
19
+ /** A state attribute the element needs, without `data-`: `selected`. */
20
+ state?: string;
21
+ }
22
+ export interface ComponentToken {
23
+ /** The default, usually a system token. */
24
+ value: TokenValue;
25
+ /** What it paints, for the docs site's token table. */
26
+ description: string;
27
+ /** The Jetpack Compose token it matches (`FilledCardTokens.ContainerColor`), for the docs. */
28
+ compose?: string;
29
+ /** Where it shows, for the token tests. */
30
+ paints?: TokenPaints;
31
+ }
32
+ /**
33
+ * One value of a scoping attribute (`data-variant="filled"`): the public prefix of its
34
+ * tokens, its tokens, and the private values it sets without a public name.
35
+ */
36
+ export interface ComponentTokenScope {
37
+ /** The public prefix: `md-comp-filled-card` gives `--md-comp-filled-card-<token>`. */
38
+ prefix: string;
39
+ /** Tokens with a public name, `--<prefix>-<token>`, read as `--_<set name>-<token>`. */
40
+ tokens?: Readonly<Record<string, ComponentToken>>;
41
+ /** Private-only values (`--_<set name>-<token>`): not themeable and not documented. */
42
+ fixed?: Readonly<Record<string, TokenValue>>;
43
+ }
44
+ export interface ComponentTokenSet<Token extends string = string> {
45
+ /** The private prefix and `data-tokens` value: `md-comp-card`, `wm-message-field`. */
46
+ name: string;
47
+ /** Tokens with one public name, `--<name>-<token>`, whatever the element's state. */
48
+ tokens: Readonly<Record<Token, ComponentToken>>;
49
+ /**
50
+ * Defaults that change with a `data-*` attribute on the same element:
51
+ * `{ size: { sm: { height: px(40) } } }` applies on `[data-size="sm"]`.
52
+ */
53
+ states?: Readonly<Record<string, Readonly<Record<string, Readonly<Partial<Record<Token, TokenValue>>>>>>>;
54
+ /**
55
+ * Private values worked out from the tokens (`--_<name>-<key>`), such as a corner capped
56
+ * at half the height. Not themeable themselves: set the tokens they come from.
57
+ */
58
+ derived?: Readonly<Record<string, TokenValue>>;
59
+ /**
60
+ * Tokens whose public name depends on a `data-*` attribute on the same element:
61
+ * `{ variant: { filled: { prefix: 'md-comp-filled-card', tokens: { 'container-color': … } } } }`
62
+ * applies on `[data-variant="filled"]` and is set as `--md-comp-filled-card-container-color`.
63
+ * Every value of an attribute declares the same private variables (a token or a `fixed`
64
+ * value each), so a nested component never inherits its parent's.
65
+ */
66
+ scopes?: Readonly<Record<string, Readonly<Record<string, ComponentTokenScope>>>>;
67
+ }
68
+ /** A public variable of a set, as the docs, the tests and the generated name list read it. */
69
+ export interface PublicComponentToken extends ComponentToken {
70
+ /** The variable an app sets: `--md-comp-filled-card-container-color`. */
71
+ name: string;
72
+ /** The part the component's classes read, `--_<set name>-<token>`: `container-color`. */
73
+ token: string;
74
+ /** For a scoped token, the attribute (without `data-`) and value it applies on. */
75
+ scope?: {
76
+ attribute: string;
77
+ value: string;
78
+ };
79
+ }
80
+ export declare function defineComponentTokens<Token extends string>(set: ComponentTokenSet<Token>): ComponentTokenSet<Token>;
81
+ /** A colour role's variable, for a token's default: `color('primary')`. */
82
+ export declare const color: (role: ColorRole) => TokenValue;
83
+ /** A colour role at an opacity, as M3's disabled states (`on-surface` at 12% or 38%). */
84
+ export declare const colorAt: (role: ColorRole, opacity: number) => TokenValue;
85
+ /** An elevation level's shadow: `elevation(1)`. */
86
+ export declare const elevation: (level: ElevationLevel) => TokenValue;
87
+ /** A corner-scale step's variable: `corner('large')`. */
88
+ export declare const corner: (name: CornerName) => TokenValue;
89
+ /** A length in px (Compose dp map to CSS px 1:1): `px(56)`. */
90
+ export declare const px: (value: number) => TokenValue;
91
+ /** One property of a type-scale role: `typescale('body-large', 'size')`. */
92
+ export declare const typescale: (role: TypeRole, property: "font" | "size" | "line-height" | "tracking" | "weight") => TokenValue;
93
+ /** A motion spring's duration or easing: `spring('spatial', 'fast', 'easing')`. */
94
+ export declare const spring: (family: SpringFamily, speed: SpringSpeed, part: "duration" | "easing") => TokenValue;
95
+ /** The five `text-*` tokens for one type role. */
96
+ export declare const typeTokens: (role: TypeRole) => {
97
+ readonly 'text-font': string;
98
+ readonly 'text-size': string;
99
+ readonly 'text-line-height': string;
100
+ readonly 'text-tracking': string;
101
+ readonly 'text-weight': string;
102
+ };
103
+ /** Whether a value is a component token set, for code that discovers them in a module. */
104
+ export declare function isComponentTokenSet(value: unknown): value is ComponentTokenSet;
105
+ /** Every public variable of a set: its own tokens, then each scope value's, in order. */
106
+ export declare function componentTokenList(set: ComponentTokenSet): PublicComponentToken[];
107
+ /** The CSS for one set: the resolved variables, then each state's and scope's defaults. */
108
+ export declare function componentTokensCss(set: ComponentTokenSet): string;
109
+ //#endregion
110
+ //# sourceMappingURL=component.d.ts.map
@@ -0,0 +1,67 @@
1
+ //#region src/tokens/component.ts
2
+ function defineComponentTokens(set) {
3
+ return set;
4
+ }
5
+ /** A colour role's variable, for a token's default: `color('primary')`. */
6
+ const color = (role) => `var(--md-sys-color-${role})`;
7
+ /** A colour role at an opacity, as M3's disabled states (`on-surface` at 12% or 38%). */
8
+ const colorAt = (role, opacity) => `color-mix(in srgb, var(--md-sys-color-${role}) ${Math.round(opacity * 100)}%, transparent)`;
9
+ /** An elevation level's shadow: `elevation(1)`. */
10
+ const elevation = (level) => `var(--md-sys-elevation-level-${level})`;
11
+ /** A corner-scale step's variable: `corner('large')`. */
12
+ const corner = (name) => `var(--md-sys-shape-corner-${name})`;
13
+ /** A length in px (Compose dp map to CSS px 1:1): `px(56)`. */
14
+ const px = (value) => `${value}px`;
15
+ /** One property of a type-scale role: `typescale('body-large', 'size')`. */
16
+ const typescale = (role, property) => `var(--md-sys-typescale-${role}-${property})`;
17
+ /** A motion spring's duration or easing: `spring('spatial', 'fast', 'easing')`. */
18
+ const spring = (family, speed, part) => `var(--md-sys-motion-spring-${family}-${speed}-${part})`;
19
+ /** The five `text-*` tokens for one type role. */
20
+ const typeTokens = (role) => ({
21
+ "text-font": typescale(role, "font"),
22
+ "text-size": typescale(role, "size"),
23
+ "text-line-height": typescale(role, "line-height"),
24
+ "text-tracking": typescale(role, "tracking"),
25
+ "text-weight": typescale(role, "weight")
26
+ });
27
+ /** Whether a value is a component token set, for code that discovers them in a module. */
28
+ function isComponentTokenSet(value) {
29
+ return typeof value === "object" && value !== null && typeof value.name === "string" && typeof value.tokens === "object" && value.tokens !== null;
30
+ }
31
+ /** Every public variable of a set: its own tokens, then each scope value's, in order. */
32
+ function componentTokenList(set) {
33
+ const own = Object.entries(set.tokens).map(([token, entry]) => ({
34
+ ...entry,
35
+ name: `--${set.name}-${token}`,
36
+ token
37
+ }));
38
+ const scoped = Object.entries(set.scopes ?? {}).flatMap(([attribute, values]) => Object.entries(values).flatMap(([value, scope]) => Object.entries(scope.tokens ?? {}).map(([token, entry]) => ({
39
+ ...entry,
40
+ name: `--${scope.prefix}-${token}`,
41
+ token,
42
+ scope: {
43
+ attribute,
44
+ value
45
+ }
46
+ }))));
47
+ return [...own, ...scoped];
48
+ }
49
+ /** The CSS for one set: the resolved variables, then each state's and scope's defaults. */
50
+ function componentTokensCss(set) {
51
+ const element = `[data-tokens~="${set.name}"]`;
52
+ const declarations = (values) => Object.entries(values).flatMap(([token, value]) => value === void 0 ? [] : [` --_${set.name}-${token}: var(--${set.name}-${token}, ${value});`]);
53
+ const rule = (selector, lines) => lines.length ? [`:where(${selector}) {\n${lines.join("\n")}\n}`] : [];
54
+ const base = declarations(Object.fromEntries(Object.entries(set.tokens).map(([token, { value }]) => [token, value])));
55
+ const derived = Object.entries(set.derived ?? {}).map(([key, value]) => ` --_${set.name}-${key}: ${value};`);
56
+ const states = Object.entries(set.states ?? {}).flatMap(([attribute, values]) => Object.entries(values).flatMap(([state, overrides]) => rule(`${element}[data-${attribute}="${state}"]`, declarations(overrides))));
57
+ const scopes = Object.entries(set.scopes ?? {}).flatMap(([attribute, values]) => Object.entries(values).flatMap(([value, scope]) => rule(`${element}[data-${attribute}="${value}"]`, [...Object.entries(scope.tokens ?? {}).map(([token, entry]) => ` --_${set.name}-${token}: var(--${scope.prefix}-${token}, ${entry.value});`), ...Object.entries(scope.fixed ?? {}).map(([token, fixed]) => ` --_${set.name}-${token}: ${fixed};`)])));
58
+ return [
59
+ ...rule(element, [...base, ...derived]),
60
+ ...states,
61
+ ...scopes
62
+ ].join("\n\n");
63
+ }
64
+ //#endregion
65
+ export { color, colorAt, componentTokenList, componentTokensCss, corner, defineComponentTokens, elevation, isComponentTokenSet, px, spring, typeTokens, typescale };
66
+
67
+ //# sourceMappingURL=component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.js","names":[],"sources":["../../src/tokens/component.ts"],"sourcesContent":["import type { ColorRole } from './color';\nimport type { ElevationLevel } from './elevation';\nimport type { SpringFamily, SpringSpeed } from './motion';\nimport type { CornerName } from './shape';\nimport type { TypeRole } from './typography';\n\n/*\n * Component tokens: every value a component paints, as a CSS variable an app can set.\n *\n * A component's tokens file defines a set with `defineComponentTokens`, and its package's\n * `generate` script writes the CSS with `componentTokensCss` (the core's and Windmorph Pro's\n * to their `generated/components.css`). Each token is two variables:\n *\n * - the public one, unset by default. An app sets it on the component (`className`) or on\n * any ancestor, globally or per theme. A set's own tokens are `--<name>-<token>`; a scoped\n * token (below) is `--<scope prefix>-<token>`, so M3's names can put the variant or size\n * in the component segment (`--md-comp-filled-card-container-color`).\n * - `--_<name>-<token>`, the resolved one, which the component's classes read. It is set on\n * the element marked `data-tokens=\"<name>\"` to the public variable, falling back to the\n * default for that element's `data-size`, `data-variant` (or any other `data-*` state).\n *\n * So a component's classes read one private variable per part, and sizes and variants only\n * change which public variable and default fill it.\n */\n\n/** A token's default, as CSS. Use the helpers below, so it reads the system tokens. */\nexport type TokenValue = string;\n\n/**\n * Where a token shows, for the tests that set it and check the result: the element (the\n * component's root, or the element with `data-slot=\"<slot>\"` inside it), the computed CSS\n * property, and the `data-*` state the element must be in.\n */\nexport interface TokenPaints {\n /** The `data-slot` of the element it paints. The component's root when omitted. */\n slot?: string;\n /** The CSS property, as `getComputedStyle` names it: `background-color`. */\n property: string;\n /** A state attribute the element needs, without `data-`: `selected`. */\n state?: string;\n}\n\nexport interface ComponentToken {\n /** The default, usually a system token. */\n value: TokenValue;\n /** What it paints, for the docs site's token table. */\n description: string;\n /** The Jetpack Compose token it matches (`FilledCardTokens.ContainerColor`), for the docs. */\n compose?: string;\n /** Where it shows, for the token tests. */\n paints?: TokenPaints;\n}\n\n/**\n * One value of a scoping attribute (`data-variant=\"filled\"`): the public prefix of its\n * tokens, its tokens, and the private values it sets without a public name.\n */\nexport interface ComponentTokenScope {\n /** The public prefix: `md-comp-filled-card` gives `--md-comp-filled-card-<token>`. */\n prefix: string;\n /** Tokens with a public name, `--<prefix>-<token>`, read as `--_<set name>-<token>`. */\n tokens?: Readonly<Record<string, ComponentToken>>;\n /** Private-only values (`--_<set name>-<token>`): not themeable and not documented. */\n fixed?: Readonly<Record<string, TokenValue>>;\n}\n\nexport interface ComponentTokenSet<Token extends string = string> {\n /** The private prefix and `data-tokens` value: `md-comp-card`, `wm-message-field`. */\n name: string;\n /** Tokens with one public name, `--<name>-<token>`, whatever the element's state. */\n tokens: Readonly<Record<Token, ComponentToken>>;\n /**\n * Defaults that change with a `data-*` attribute on the same element:\n * `{ size: { sm: { height: px(40) } } }` applies on `[data-size=\"sm\"]`.\n */\n states?: Readonly<\n Record<string, Readonly<Record<string, Readonly<Partial<Record<Token, TokenValue>>>>>>\n >;\n /**\n * Private values worked out from the tokens (`--_<name>-<key>`), such as a corner capped\n * at half the height. Not themeable themselves: set the tokens they come from.\n */\n derived?: Readonly<Record<string, TokenValue>>;\n /**\n * Tokens whose public name depends on a `data-*` attribute on the same element:\n * `{ variant: { filled: { prefix: 'md-comp-filled-card', tokens: { 'container-color': … } } } }`\n * applies on `[data-variant=\"filled\"]` and is set as `--md-comp-filled-card-container-color`.\n * Every value of an attribute declares the same private variables (a token or a `fixed`\n * value each), so a nested component never inherits its parent's.\n */\n scopes?: Readonly<Record<string, Readonly<Record<string, ComponentTokenScope>>>>;\n}\n\n/** A public variable of a set, as the docs, the tests and the generated name list read it. */\nexport interface PublicComponentToken extends ComponentToken {\n /** The variable an app sets: `--md-comp-filled-card-container-color`. */\n name: string;\n /** The part the component's classes read, `--_<set name>-<token>`: `container-color`. */\n token: string;\n /** For a scoped token, the attribute (without `data-`) and value it applies on. */\n scope?: { attribute: string; value: string };\n}\n\nexport function defineComponentTokens<Token extends string>(\n set: ComponentTokenSet<Token>,\n): ComponentTokenSet<Token> {\n return set;\n}\n\n/** The variable a component's classes read for `token`: `var(--_<name>-<token>)`. */\nexport const resolvedToken = (set: ComponentTokenSet, token: string) =>\n `var(--_${set.name}-${token})`;\n\n/** A colour role's variable, for a token's default: `color('primary')`. */\nexport const color = (role: ColorRole): TokenValue => `var(--md-sys-color-${role})`;\n\n/** A colour role at an opacity, as M3's disabled states (`on-surface` at 12% or 38%). */\nexport const colorAt = (role: ColorRole, opacity: number): TokenValue =>\n `color-mix(in srgb, var(--md-sys-color-${role}) ${Math.round(opacity * 100)}%, transparent)`;\n\n/** An elevation level's shadow: `elevation(1)`. */\nexport const elevation = (level: ElevationLevel): TokenValue =>\n `var(--md-sys-elevation-level-${level})`;\n\n/** A corner-scale step's variable: `corner('large')`. */\nexport const corner = (name: CornerName): TokenValue => `var(--md-sys-shape-corner-${name})`;\n\n/** A length in px (Compose dp map to CSS px 1:1): `px(56)`. */\nexport const px = (value: number): TokenValue => `${value}px`;\n\n/** One property of a type-scale role: `typescale('body-large', 'size')`. */\nexport const typescale = (\n role: TypeRole,\n property: 'font' | 'size' | 'line-height' | 'tracking' | 'weight',\n): TokenValue => `var(--md-sys-typescale-${role}-${property})`;\n\n/** A motion spring's duration or easing: `spring('spatial', 'fast', 'easing')`. */\nexport const spring = (\n family: SpringFamily,\n speed: SpringSpeed,\n part: 'duration' | 'easing',\n): TokenValue => `var(--md-sys-motion-spring-${family}-${speed}-${part})`;\n\n/** The five `text-*` tokens for one type role. */\nexport const typeTokens = (role: TypeRole) =>\n ({\n 'text-font': typescale(role, 'font'),\n 'text-size': typescale(role, 'size'),\n 'text-line-height': typescale(role, 'line-height'),\n 'text-tracking': typescale(role, 'tracking'),\n 'text-weight': typescale(role, 'weight'),\n }) as const;\n\n/** Whether a value is a component token set, for code that discovers them in a module. */\nexport function isComponentTokenSet(value: unknown): value is ComponentTokenSet {\n return (\n typeof value === 'object' &&\n value !== null &&\n typeof (value as ComponentTokenSet).name === 'string' &&\n typeof (value as ComponentTokenSet).tokens === 'object' &&\n (value as ComponentTokenSet).tokens !== null\n );\n}\n\n/** Every public variable of a set: its own tokens, then each scope value's, in order. */\nexport function componentTokenList(set: ComponentTokenSet): PublicComponentToken[] {\n const own = Object.entries<ComponentToken>(set.tokens).map(([token, entry]) => ({\n ...entry,\n name: `--${set.name}-${token}`,\n token,\n }));\n const scoped = Object.entries(set.scopes ?? {}).flatMap(([attribute, values]) =>\n Object.entries(values).flatMap(([value, scope]) =>\n Object.entries(scope.tokens ?? {}).map(([token, entry]) => ({\n ...entry,\n name: `--${scope.prefix}-${token}`,\n token,\n scope: { attribute, value },\n })),\n ),\n );\n return [...own, ...scoped];\n}\n\n/** The CSS for one set: the resolved variables, then each state's and scope's defaults. */\nexport function componentTokensCss(set: ComponentTokenSet): string {\n const element = `[data-tokens~=\"${set.name}\"]`;\n const declarations = (values: Readonly<Record<string, TokenValue | undefined>>) =>\n Object.entries(values).flatMap(([token, value]) =>\n value === undefined\n ? []\n : [` --_${set.name}-${token}: var(--${set.name}-${token}, ${value});`],\n );\n const rule = (selector: string, lines: string[]) =>\n lines.length ? [`:where(${selector}) {\\n${lines.join('\\n')}\\n}`] : [];\n\n const base = declarations(\n Object.fromEntries(\n Object.entries<ComponentToken>(set.tokens).map(([token, { value }]) => [token, value]),\n ),\n );\n const derived = Object.entries(set.derived ?? {}).map(\n ([key, value]) => ` --_${set.name}-${key}: ${value};`,\n );\n const states = Object.entries(set.states ?? {}).flatMap(([attribute, values]) =>\n Object.entries(values).flatMap(([state, overrides]) =>\n rule(`${element}[data-${attribute}=\"${state}\"]`, declarations(overrides)),\n ),\n );\n const scopes = Object.entries(set.scopes ?? {}).flatMap(([attribute, values]) =>\n Object.entries(values).flatMap(([value, scope]) =>\n rule(`${element}[data-${attribute}=\"${value}\"]`, [\n ...Object.entries(scope.tokens ?? {}).map(\n ([token, entry]) =>\n ` --_${set.name}-${token}: var(--${scope.prefix}-${token}, ${entry.value});`,\n ),\n ...Object.entries(scope.fixed ?? {}).map(\n ([token, fixed]) => ` --_${set.name}-${token}: ${fixed};`,\n ),\n ]),\n ),\n );\n return [...rule(element, [...base, ...derived]), ...states, ...scopes].join('\\n\\n');\n}\n"],"mappings":";AAuGA,SAAgB,sBACd,KAC0B;CAC1B,OAAO;AACT;;AAOA,MAAa,SAAS,SAAgC,sBAAsB,KAAK;;AAGjF,MAAa,WAAW,MAAiB,YACvC,yCAAyC,KAAK,IAAI,KAAK,MAAM,UAAU,GAAG,EAAE;;AAG9E,MAAa,aAAa,UACxB,gCAAgC,MAAM;;AAGxC,MAAa,UAAU,SAAiC,6BAA6B,KAAK;;AAG1F,MAAa,MAAM,UAA8B,GAAG,MAAM;;AAG1D,MAAa,aACX,MACA,aACe,0BAA0B,KAAK,GAAG,SAAS;;AAG5D,MAAa,UACX,QACA,OACA,SACe,8BAA8B,OAAO,GAAG,MAAM,GAAG,KAAK;;AAGvE,MAAa,cAAc,UACxB;CACC,aAAa,UAAU,MAAM,MAAM;CACnC,aAAa,UAAU,MAAM,MAAM;CACnC,oBAAoB,UAAU,MAAM,aAAa;CACjD,iBAAiB,UAAU,MAAM,UAAU;CAC3C,eAAe,UAAU,MAAM,QAAQ;AACzC;;AAGF,SAAgB,oBAAoB,OAA4C;CAC9E,OACE,OAAO,UAAU,YACjB,UAAU,QACV,OAAQ,MAA4B,SAAS,YAC7C,OAAQ,MAA4B,WAAW,YAC9C,MAA4B,WAAW;AAE5C;;AAGA,SAAgB,mBAAmB,KAAgD;CACjF,MAAM,MAAM,OAAO,QAAwB,IAAI,MAAM,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY;EAC9E,GAAG;EACH,MAAM,KAAK,IAAI,KAAK,GAAG;EACvB;CACF,EAAE;CACF,MAAM,SAAS,OAAO,QAAQ,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,WAAW,YACnE,OAAO,QAAQ,MAAM,CAAC,CAAC,SAAS,CAAC,OAAO,WACtC,OAAO,QAAQ,MAAM,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY;EAC1D,GAAG;EACH,MAAM,KAAK,MAAM,OAAO,GAAG;EAC3B;EACA,OAAO;GAAE;GAAW;EAAM;CAC5B,EAAE,CACJ,CACF;CACA,OAAO,CAAC,GAAG,KAAK,GAAG,MAAM;AAC3B;;AAGA,SAAgB,mBAAmB,KAAgC;CACjE,MAAM,UAAU,kBAAkB,IAAI,KAAK;CAC3C,MAAM,gBAAgB,WACpB,OAAO,QAAQ,MAAM,CAAC,CAAC,SAAS,CAAC,OAAO,WACtC,UAAU,KAAA,IACN,CAAC,IACD,CAAC,QAAQ,IAAI,KAAK,GAAG,MAAM,UAAU,IAAI,KAAK,GAAG,MAAM,IAAI,MAAM,GAAG,CAC1E;CACF,MAAM,QAAQ,UAAkB,UAC9B,MAAM,SAAS,CAAC,UAAU,SAAS,OAAO,MAAM,KAAK,IAAI,EAAE,IAAI,IAAI,CAAC;CAEtE,MAAM,OAAO,aACX,OAAO,YACL,OAAO,QAAwB,IAAI,MAAM,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,aAAa,CAAC,OAAO,KAAK,CAAC,CACvF,CACF;CACA,MAAM,UAAU,OAAO,QAAQ,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,KAC/C,CAAC,KAAK,WAAW,QAAQ,IAAI,KAAK,GAAG,IAAI,IAAI,MAAM,EACtD;CACA,MAAM,SAAS,OAAO,QAAQ,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,WAAW,YACnE,OAAO,QAAQ,MAAM,CAAC,CAAC,SAAS,CAAC,OAAO,eACtC,KAAK,GAAG,QAAQ,QAAQ,UAAU,IAAI,MAAM,KAAK,aAAa,SAAS,CAAC,CAC1E,CACF;CACA,MAAM,SAAS,OAAO,QAAQ,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,WAAW,YACnE,OAAO,QAAQ,MAAM,CAAC,CAAC,SAAS,CAAC,OAAO,WACtC,KAAK,GAAG,QAAQ,QAAQ,UAAU,IAAI,MAAM,KAAK,CAC/C,GAAG,OAAO,QAAQ,MAAM,UAAU,CAAC,CAAC,CAAC,CAAC,KACnC,CAAC,OAAO,WACP,QAAQ,IAAI,KAAK,GAAG,MAAM,UAAU,MAAM,OAAO,GAAG,MAAM,IAAI,MAAM,MAAM,GAC9E,GACA,GAAG,OAAO,QAAQ,MAAM,SAAS,CAAC,CAAC,CAAC,CAAC,KAClC,CAAC,OAAO,WAAW,QAAQ,IAAI,KAAK,GAAG,MAAM,IAAI,MAAM,EAC1D,CACF,CAAC,CACH,CACF;CACA,OAAO;EAAC,GAAG,KAAK,SAAS,CAAC,GAAG,MAAM,GAAG,OAAO,CAAC;EAAG,GAAG;EAAQ,GAAG;CAAM,CAAC,CAAC,KAAK,MAAM;AACpF"}
@@ -0,0 +1,20 @@
1
+ //#region src/tokens/density.d.ts
2
+ /**
3
+ * M3 web density levels, `0` (default) to `-3`. `data-density` sets `--md-sys-density` for a
4
+ * subtree; components scale their heights by it (architecture §5, Density).
5
+ */
6
+ export declare const DENSITIES: readonly [0, -1, -2, -3];
7
+ /** A density level: `0` (default) to `-3` (densest). Each step takes 4px off a component's height. */
8
+ export type Density = (typeof DENSITIES)[number];
9
+ export declare const DEFAULT_DENSITY: Density;
10
+ /** Whether `value` is a density level, as a number or as its attribute text (`"-2"`). */
11
+ export declare function isDensity(value: unknown): value is Density | `${Density}`;
12
+ /**
13
+ * The `data-density` attribute for an element, or nothing when `density` is left out (the
14
+ * element then inherits its ancestors' density). Spread it on a component's root.
15
+ */
16
+ export declare function densityAttribute(density: Density | undefined): {
17
+ 'data-density'?: `${Density}`;
18
+ };
19
+ //#endregion
20
+ //# sourceMappingURL=density.d.ts.map
@@ -0,0 +1,27 @@
1
+ //#region src/tokens/density.ts
2
+ /**
3
+ * M3 web density levels, `0` (default) to `-3`. `data-density` sets `--md-sys-density` for a
4
+ * subtree; components scale their heights by it (architecture §5, Density).
5
+ */
6
+ const DENSITIES = [
7
+ 0,
8
+ -1,
9
+ -2,
10
+ -3
11
+ ];
12
+ const DEFAULT_DENSITY = 0;
13
+ /** Whether `value` is a density level, as a number or as its attribute text (`"-2"`). */
14
+ function isDensity(value) {
15
+ return DENSITIES.some((level) => level === value || String(level) === value);
16
+ }
17
+ /**
18
+ * The `data-density` attribute for an element, or nothing when `density` is left out (the
19
+ * element then inherits its ancestors' density). Spread it on a component's root.
20
+ */
21
+ function densityAttribute(density) {
22
+ return density === void 0 ? {} : { "data-density": `${density}` };
23
+ }
24
+ //#endregion
25
+ export { DEFAULT_DENSITY, DENSITIES, densityAttribute, isDensity };
26
+
27
+ //# sourceMappingURL=density.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"density.js","names":[],"sources":["../../src/tokens/density.ts"],"sourcesContent":["/**\n * M3 web density levels, `0` (default) to `-3`. `data-density` sets `--md-sys-density` for a\n * subtree; components scale their heights by it (architecture §5, Density).\n */\nexport const DENSITIES = [0, -1, -2, -3] as const;\n\n/** A density level: `0` (default) to `-3` (densest). Each step takes 4px off a component's height. */\nexport type Density = (typeof DENSITIES)[number];\n\nexport const DEFAULT_DENSITY: Density = 0;\n\n/** Whether `value` is a density level, as a number or as its attribute text (`\"-2\"`). */\nexport function isDensity(value: unknown): value is Density | `${Density}` {\n return DENSITIES.some((level) => level === value || String(level) === value);\n}\n\n/**\n * The `data-density` attribute for an element, or nothing when `density` is left out (the\n * element then inherits its ancestors' density). Spread it on a component's root.\n */\nexport function densityAttribute(density: Density | undefined): { 'data-density'?: `${Density}` } {\n return density === undefined ? {} : { 'data-density': `${density}` };\n}\n"],"mappings":";;;;;AAIA,MAAa,YAAY;CAAC;CAAG;CAAI;CAAI;AAAE;AAKvC,MAAa,kBAA2B;;AAGxC,SAAgB,UAAU,OAAiD;CACzE,OAAO,UAAU,MAAM,UAAU,UAAU,SAAS,OAAO,KAAK,MAAM,KAAK;AAC7E;;;;;AAMA,SAAgB,iBAAiB,SAAiE;CAChG,OAAO,YAAY,KAAA,IAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,UAAU;AACrE"}
@@ -0,0 +1,44 @@
1
+ //#region src/tokens/elevation.d.ts
2
+ /**
3
+ * M3 elevation levels (Compose `ElevationTokens`) and their shadows.
4
+ * Shadows follow the M3 design kit's key + ambient pair and are tinted with the
5
+ * `shadow` colour role, so they follow the active theme.
6
+ */
7
+ export declare const ELEVATION_LEVELS: {
8
+ readonly 0: {
9
+ readonly dp: 0;
10
+ readonly key: null;
11
+ readonly ambient: null;
12
+ };
13
+ readonly 1: {
14
+ readonly dp: 1;
15
+ readonly key: "0 1px 2px 0";
16
+ readonly ambient: "0 1px 3px 1px";
17
+ };
18
+ readonly 2: {
19
+ readonly dp: 3;
20
+ readonly key: "0 1px 2px 0";
21
+ readonly ambient: "0 2px 6px 2px";
22
+ };
23
+ readonly 3: {
24
+ readonly dp: 6;
25
+ readonly key: "0 1px 3px 0";
26
+ readonly ambient: "0 4px 8px 3px";
27
+ };
28
+ readonly 4: {
29
+ readonly dp: 8;
30
+ readonly key: "0 2px 3px 0";
31
+ readonly ambient: "0 6px 10px 4px";
32
+ };
33
+ readonly 5: {
34
+ readonly dp: 12;
35
+ readonly key: "0 4px 4px 0";
36
+ readonly ambient: "0 8px 12px 6px";
37
+ };
38
+ };
39
+ export type ElevationLevel = keyof typeof ELEVATION_LEVELS;
40
+ export declare const ELEVATION_LEVEL_NAMES: ElevationLevel[];
41
+ export declare const SHADOW_KEY_OPACITY = 0.3;
42
+ export declare const SHADOW_AMBIENT_OPACITY = 0.15;
43
+ //#endregion
44
+ //# sourceMappingURL=elevation.d.ts.map
@@ -0,0 +1,45 @@
1
+ //#region src/tokens/elevation.ts
2
+ /**
3
+ * M3 elevation levels (Compose `ElevationTokens`) and their shadows.
4
+ * Shadows follow the M3 design kit's key + ambient pair and are tinted with the
5
+ * `shadow` colour role, so they follow the active theme.
6
+ */
7
+ const ELEVATION_LEVELS = {
8
+ 0: {
9
+ dp: 0,
10
+ key: null,
11
+ ambient: null
12
+ },
13
+ 1: {
14
+ dp: 1,
15
+ key: "0 1px 2px 0",
16
+ ambient: "0 1px 3px 1px"
17
+ },
18
+ 2: {
19
+ dp: 3,
20
+ key: "0 1px 2px 0",
21
+ ambient: "0 2px 6px 2px"
22
+ },
23
+ 3: {
24
+ dp: 6,
25
+ key: "0 1px 3px 0",
26
+ ambient: "0 4px 8px 3px"
27
+ },
28
+ 4: {
29
+ dp: 8,
30
+ key: "0 2px 3px 0",
31
+ ambient: "0 6px 10px 4px"
32
+ },
33
+ 5: {
34
+ dp: 12,
35
+ key: "0 4px 4px 0",
36
+ ambient: "0 8px 12px 6px"
37
+ }
38
+ };
39
+ const ELEVATION_LEVEL_NAMES = Object.keys(ELEVATION_LEVELS).map(Number);
40
+ const SHADOW_KEY_OPACITY = .3;
41
+ const SHADOW_AMBIENT_OPACITY = .15;
42
+ //#endregion
43
+ export { ELEVATION_LEVELS, ELEVATION_LEVEL_NAMES, SHADOW_AMBIENT_OPACITY, SHADOW_KEY_OPACITY };
44
+
45
+ //# sourceMappingURL=elevation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elevation.js","names":[],"sources":["../../src/tokens/elevation.ts"],"sourcesContent":["/**\n * M3 elevation levels (Compose `ElevationTokens`) and their shadows.\n * Shadows follow the M3 design kit's key + ambient pair and are tinted with the\n * `shadow` colour role, so they follow the active theme.\n */\nexport const ELEVATION_LEVELS = {\n 0: { dp: 0, key: null, ambient: null },\n 1: { dp: 1, key: '0 1px 2px 0', ambient: '0 1px 3px 1px' },\n 2: { dp: 3, key: '0 1px 2px 0', ambient: '0 2px 6px 2px' },\n 3: { dp: 6, key: '0 1px 3px 0', ambient: '0 4px 8px 3px' },\n 4: { dp: 8, key: '0 2px 3px 0', ambient: '0 6px 10px 4px' },\n 5: { dp: 12, key: '0 4px 4px 0', ambient: '0 8px 12px 6px' },\n} as const;\n\nexport type ElevationLevel = keyof typeof ELEVATION_LEVELS;\nexport const ELEVATION_LEVEL_NAMES = Object.keys(ELEVATION_LEVELS).map(Number) as ElevationLevel[];\n\nexport const SHADOW_KEY_OPACITY = 0.3;\nexport const SHADOW_AMBIENT_OPACITY = 0.15;\n"],"mappings":";;;;;;AAKA,MAAa,mBAAmB;CAC9B,GAAG;EAAE,IAAI;EAAG,KAAK;EAAM,SAAS;CAAK;CACrC,GAAG;EAAE,IAAI;EAAG,KAAK;EAAe,SAAS;CAAgB;CACzD,GAAG;EAAE,IAAI;EAAG,KAAK;EAAe,SAAS;CAAgB;CACzD,GAAG;EAAE,IAAI;EAAG,KAAK;EAAe,SAAS;CAAgB;CACzD,GAAG;EAAE,IAAI;EAAG,KAAK;EAAe,SAAS;CAAiB;CAC1D,GAAG;EAAE,IAAI;EAAI,KAAK;EAAe,SAAS;CAAiB;AAC7D;AAGA,MAAa,wBAAwB,OAAO,KAAK,gBAAgB,CAAC,CAAC,IAAI,MAAM;AAE7E,MAAa,qBAAqB;AAClC,MAAa,yBAAyB"}
@@ -0,0 +1,79 @@
1
+ //#region src/tokens/motion.d.ts
2
+ /**
3
+ * M3 Expressive motion: spring tokens for the `expressive` and `standard` motion
4
+ * schemes (Compose `ExpressiveMotionTokens` / `StandardMotionTokens`), plus the
5
+ * legacy duration + easing tokens for consumers migrating from baseline M3.
6
+ *
7
+ * Compose springs are expressed as a damping ratio and stiffness with mass 1.
8
+ * Motion (`motion/react`) takes a damping coefficient, so
9
+ * `damping = 2 * dampingRatio * sqrt(stiffness * mass)`.
10
+ */
11
+ export declare const MOTION_SCHEMES: readonly ["expressive", "standard"];
12
+ export type MotionScheme = (typeof MOTION_SCHEMES)[number];
13
+ export declare const DEFAULT_MOTION_SCHEME: MotionScheme;
14
+ export declare const SPRING_FAMILIES: readonly ["spatial", "effects"];
15
+ export type SpringFamily = (typeof SPRING_FAMILIES)[number];
16
+ export declare const SPRING_SPEEDS: readonly ["fast", "default", "slow"];
17
+ export type SpringSpeed = (typeof SPRING_SPEEDS)[number];
18
+ export interface SpringToken {
19
+ dampingRatio: number;
20
+ stiffness: number;
21
+ }
22
+ type SpringScheme = Record<SpringFamily, Record<SpringSpeed, SpringToken>>;
23
+ export declare const SPRINGS: Record<MotionScheme, SpringScheme>;
24
+ /** A spring transition in the shape Motion's `transition` prop expects. */
25
+ export interface MotionSpring {
26
+ type: 'spring';
27
+ stiffness: number;
28
+ damping: number;
29
+ mass: number;
30
+ }
31
+ export declare function toMotionSpring({ dampingRatio, stiffness }: SpringToken): MotionSpring;
32
+ /**
33
+ * Position of a unit step spring (0 → 1, mass 1) at time `t` seconds,
34
+ * using the closed-form solution for under- and critically-damped springs.
35
+ */
36
+ export declare function springPosition({ dampingRatio: z, stiffness: k }: SpringToken, t: number): number;
37
+ /** Time in ms after which the spring stays within the settle threshold of its target. */
38
+ export declare function springSettleDuration(token: SpringToken): number;
39
+ /**
40
+ * CSS `linear()` approximation of a spring, sampled at evenly spaced points
41
+ * over its settle duration. Pair it with {@link springSettleDuration}.
42
+ */
43
+ export declare function springToLinearEasing(token: SpringToken, samples?: number): string;
44
+ /** Legacy M3 durations (Compose `MotionTokens`), in ms. */
45
+ export declare const LEGACY_DURATIONS: {
46
+ readonly 'short-1': 50;
47
+ readonly 'short-2': 100;
48
+ readonly 'short-3': 150;
49
+ readonly 'short-4': 200;
50
+ readonly 'medium-1': 250;
51
+ readonly 'medium-2': 300;
52
+ readonly 'medium-3': 350;
53
+ readonly 'medium-4': 400;
54
+ readonly 'long-1': 450;
55
+ readonly 'long-2': 500;
56
+ readonly 'long-3': 550;
57
+ readonly 'long-4': 600;
58
+ readonly 'extra-long-1': 700;
59
+ readonly 'extra-long-2': 800;
60
+ readonly 'extra-long-3': 900;
61
+ readonly 'extra-long-4': 1000;
62
+ };
63
+ /** Legacy M3 easing curves (Compose `MotionTokens`). */
64
+ export declare const LEGACY_EASINGS: {
65
+ readonly emphasized: "cubic-bezier(0.2, 0, 0, 1)";
66
+ readonly 'emphasized-accelerate': "cubic-bezier(0.3, 0, 0.8, 0.15)";
67
+ readonly 'emphasized-decelerate': "cubic-bezier(0.05, 0.7, 0.1, 1)";
68
+ readonly standard: "cubic-bezier(0.2, 0, 0, 1)";
69
+ readonly 'standard-accelerate': "cubic-bezier(0.3, 0, 1, 1)";
70
+ readonly 'standard-decelerate': "cubic-bezier(0, 0, 0, 1)";
71
+ readonly legacy: "cubic-bezier(0.4, 0, 0.2, 1)";
72
+ readonly 'legacy-accelerate': "cubic-bezier(0.4, 0, 1, 1)";
73
+ readonly 'legacy-decelerate': "cubic-bezier(0, 0, 0.2, 1)";
74
+ readonly linear: "cubic-bezier(0, 0, 1, 1)";
75
+ };
76
+ /** `<family>-<speed>` names used by the `ease-m3-*` / `duration-m3-*` utilities. */
77
+ export declare const SPRING_TOKEN_NAMES: ("spatial-fast" | "spatial-default" | "spatial-slow" | "effects-fast" | "effects-default" | "effects-slow")[];
78
+ //#endregion
79
+ //# sourceMappingURL=motion.d.ts.map