@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,166 @@
1
+ "use client";
2
+ import { usePresence } from "../../primitives/use-presence.js";
3
+ import { announcePolite, prepareAnnouncer } from "../../utils/announce.js";
4
+ import { usePreloadOnIntent } from "../../utils/load-on-demand.js";
5
+ import { LazyLoadingIndicator, preloadLoadingIndicator } from "../loading-indicator/lazy-loading-indicator.js";
6
+ import { useEffect, useId, useState } from "react";
7
+ import { jsx } from "react/jsx-runtime";
8
+ import { useObjectRef } from "react-aria";
9
+ //#region src/components/button/button-pending.tsx
10
+ const DEFAULT_LABELS = { pending: "Loading" };
11
+ /**
12
+ * The indicator's size per button size: the icon's size, but never under M3's 24px minimum
13
+ * for a loading indicator ("It should be between 24dp to 240dp").
14
+ */
15
+ const PENDING_INDICATOR_SIZE = {
16
+ xs: 24,
17
+ sm: 24,
18
+ md: 24,
19
+ lg: 32,
20
+ xl: 40
21
+ };
22
+ /**
23
+ * The swap between the content and the indicator: a crossfade on the fast effects spring
24
+ * (opacity never overshoots), held back 200ms on the way in (M3's lower bound for a loading
25
+ * indicator) so a quick action never flashes, and immediate on the way out. Both share the
26
+ * content wrapper's one grid cell, so the button keeps its width.
27
+ */
28
+ const fade = "transition-opacity duration-(--md-sys-motion-spring-effects-fast-duration) ease-(--md-sys-motion-spring-effects-fast-easing)";
29
+ const pendingClasses = {
30
+ /** The content wrapper, once the button takes a `pending` prop: one grid cell. */
31
+ content: "inline-grid",
32
+ /** What the indicator replaces (an icon button's icon), in the cell; hidden once it shows. */
33
+ replaced: `[grid-area:1/1] ${fade} [[data-pending-shown]>&]:opacity-0 [[data-pending-shown]>&]:delay-200`,
34
+ /** A button's icon and label, laid out as the content was, in the cell. */
35
+ faces: "inline-flex items-center justify-center gap-[inherit]",
36
+ /**
37
+ * The indicator's slot, in the same cell: a zero-size box centred in it, so the indicator
38
+ * (as big as the icon, at least 24px) never changes the button's size, even where it's larger
39
+ * than the icon. Its colour is the content colour (M3's 3:1 rule for an indicator in a button).
40
+ */
41
+ indicator: `pointer-events-none flex size-0 items-center justify-center self-center justify-self-center overflow-visible opacity-0 [grid-area:1/1] ${fade} [[data-pending-shown]>&]:opacity-100 [[data-pending-shown]>&]:delay-200`
42
+ };
43
+ /**
44
+ * The indicator takes the content colour, so it reads wherever the label does (M3: an indicator
45
+ * in a button needs 3:1 against it). A progress indicator given as `pendingIndicator` gets M3's
46
+ * "Progress indicators in buttons" treatment too: the label's colour, and no track.
47
+ */
48
+ const indicatorColor = {
49
+ "--md-comp-loading-indicator-active-indicator-color": "currentColor",
50
+ "--md-comp-progress-indicator-active-indicator-color": "currentColor",
51
+ "--md-comp-progress-indicator-track-color": "transparent"
52
+ };
53
+ /** The name suffix's style: text that takes no room (see `nameSuffix`). */
54
+ const HIDDEN_SUFFIX = {
55
+ fontSize: 0,
56
+ lineHeight: 0,
57
+ letterSpacing: 0,
58
+ wordSpacing: 0
59
+ };
60
+ /** Text of `node` as a screen reader reads it: `aria-hidden` subtrees left out. */
61
+ function readableText(node) {
62
+ if (node.nodeType === Node.TEXT_NODE) return node.textContent ?? "";
63
+ if (node instanceof Element && node.getAttribute("aria-hidden") === "true") return "";
64
+ return Array.from(node.childNodes, readableText).join("");
65
+ }
66
+ /** The element's accessible name, for the cases a button can be named by. */
67
+ function accessibleName(element) {
68
+ const labelledby = element.getAttribute("aria-labelledby");
69
+ if (labelledby) return labelledby.split(/\s+/).map((id) => document.getElementById(id)?.textContent?.trim() ?? "").filter(Boolean).join(" ");
70
+ return element.getAttribute("aria-label") ?? readableText(element).trim();
71
+ }
72
+ /**
73
+ * The pending state of `Button` and `IconButton` (React Aria's pending `Button`): the props for
74
+ * the root, the accessible-name suffix, and the indicator's slot.
75
+ *
76
+ * - The name gains `labels.pending` while pending, from the first frame: appended to an
77
+ * `aria-label`, an extra id on `aria-labelledby`, or a visually hidden suffix at the end of the label.
78
+ * - When it turns on while focus is in the button, the new name is announced politely, once.
79
+ * - The indicator (the core's `LoadingIndicator`, loaded on demand, or `pendingIndicator`) is
80
+ * preloaded once the button takes a `pending` prop at all, when the browser is idle or the
81
+ * pointer or focus arrives. The content hides only once the indicator is mounted
82
+ * (`data-pending-shown`), so a server-rendered pending button shows its label until then.
83
+ */
84
+ function useButtonPending({ pending: pendingProp, pendingIndicator, labels: labelsProp, size, ariaLabel, ariaLabelledby, ref: refProp, indicatorClassName }) {
85
+ const takesPending = pendingProp !== void 0;
86
+ const pending = pendingProp === true;
87
+ const custom = pendingIndicator !== void 0;
88
+ const labels = {
89
+ ...DEFAULT_LABELS,
90
+ ...labelsProp
91
+ };
92
+ const hiddenId = useId();
93
+ const ref = useObjectRef(refProp);
94
+ usePreloadOnIntent(ref, preloadLoadingIndicator, takesPending && !custom);
95
+ useEffect(() => {
96
+ if (takesPending) prepareAnnouncer();
97
+ }, [takesPending]);
98
+ const [loaded, setLoaded] = useState(false);
99
+ useEffect(() => {
100
+ if (!pending || custom || loaded) return;
101
+ let live = true;
102
+ preloadLoadingIndicator().then(() => live && setLoaded(true), () => void 0);
103
+ return () => {
104
+ live = false;
105
+ };
106
+ }, [
107
+ pending,
108
+ custom,
109
+ loaded
110
+ ]);
111
+ const shown = pending && (custom || loaded);
112
+ const { isPresent, exitProps } = usePresence(shown);
113
+ useEffect(() => {
114
+ const element = ref.current;
115
+ if (!pending || !element || !element.contains(document.activeElement)) return;
116
+ const name = accessibleName(element);
117
+ if (name) announcePolite(name);
118
+ }, [ref, pending]);
119
+ let nameProps = {};
120
+ let hiddenName = null;
121
+ let nameSuffix = null;
122
+ if (pending) {
123
+ if (ariaLabelledby) {
124
+ nameProps = { "aria-labelledby": `${ariaLabelledby} ${hiddenId}` };
125
+ hiddenName = /* @__PURE__ */ jsx("span", {
126
+ id: hiddenId,
127
+ hidden: true,
128
+ children: labels.pending
129
+ });
130
+ } else if (ariaLabel) nameProps = { "aria-label": `${ariaLabel}, ${labels.pending}` };
131
+ else nameSuffix = /* @__PURE__ */ jsx("span", {
132
+ style: HIDDEN_SUFFIX,
133
+ children: `, ${labels.pending}`
134
+ });
135
+ }
136
+ const indicator = takesPending ? /* @__PURE__ */ jsx("span", {
137
+ "aria-hidden": "true",
138
+ "data-slot": "pending-indicator",
139
+ className: indicatorClassName,
140
+ style: indicatorColor,
141
+ ...exitProps,
142
+ children: isPresent && (pendingIndicator ?? /* @__PURE__ */ jsx(LazyLoadingIndicator, {
143
+ size: PENDING_INDICATOR_SIZE[size],
144
+ "aria-label": labels.pending
145
+ }))
146
+ }) : null;
147
+ return {
148
+ /** Whether the content wrapper holds the grid cell (the button takes `pending`). */
149
+ takesPending,
150
+ rootProps: {
151
+ ref,
152
+ ...nameProps,
153
+ "data-pending": pending || void 0
154
+ },
155
+ contentProps: { "data-pending-shown": shown || void 0 },
156
+ /** The element `aria-labelledby` adds while pending, anywhere in the button. */
157
+ hiddenName,
158
+ /** The suffix of a name taken from the content, to put at the end of the label's text. */
159
+ nameSuffix,
160
+ indicator
161
+ };
162
+ }
163
+ //#endregion
164
+ export { PENDING_INDICATOR_SIZE, pendingClasses, useButtonPending };
165
+
166
+ //# sourceMappingURL=button-pending.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-pending.js","names":[],"sources":["../../../src/components/button/button-pending.tsx"],"sourcesContent":["'use client';\n\nimport {\n useEffect,\n useId,\n useState,\n type CSSProperties,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from 'react';\nimport { useObjectRef } from 'react-aria';\nimport { usePresence } from '../../primitives/use-presence';\nimport { announcePolite, prepareAnnouncer } from '../../utils/announce';\nimport { usePreloadOnIntent } from '../../utils/load-on-demand';\nimport {\n LazyLoadingIndicator,\n preloadLoadingIndicator,\n} from '../loading-indicator/lazy-loading-indicator';\nimport type { ButtonSize } from './button-styles';\n\n/** Words a `Button` or `IconButton` announces. */\nexport interface ButtonLabels {\n /** Added to the accessible name while `pending` (\"Save, Loading\"). @default \"Loading\" */\n pending: string;\n}\n\nconst DEFAULT_LABELS: ButtonLabels = { pending: 'Loading' };\n\n/**\n * The indicator's size per button size: the icon's size, but never under M3's 24px minimum\n * for a loading indicator (\"It should be between 24dp to 240dp\").\n */\nexport const PENDING_INDICATOR_SIZE: Record<ButtonSize, number> = {\n xs: 24,\n sm: 24,\n md: 24,\n lg: 32,\n xl: 40,\n};\n\n/**\n * The swap between the content and the indicator: a crossfade on the fast effects spring\n * (opacity never overshoots), held back 200ms on the way in (M3's lower bound for a loading\n * indicator) so a quick action never flashes, and immediate on the way out. Both share the\n * content wrapper's one grid cell, so the button keeps its width.\n */\nconst fade =\n 'transition-opacity duration-(--md-sys-motion-spring-effects-fast-duration) ease-(--md-sys-motion-spring-effects-fast-easing)';\n\nexport const pendingClasses = {\n /** The content wrapper, once the button takes a `pending` prop: one grid cell. */\n content: 'inline-grid',\n /** What the indicator replaces (an icon button's icon), in the cell; hidden once it shows. */\n replaced: `[grid-area:1/1] ${fade} [[data-pending-shown]>&]:opacity-0 [[data-pending-shown]>&]:delay-200`,\n /** A button's icon and label, laid out as the content was, in the cell. */\n faces: 'inline-flex items-center justify-center gap-[inherit]',\n /**\n * The indicator's slot, in the same cell: a zero-size box centred in it, so the indicator\n * (as big as the icon, at least 24px) never changes the button's size, even where it's larger\n * than the icon. Its colour is the content colour (M3's 3:1 rule for an indicator in a button).\n */\n indicator: `pointer-events-none flex size-0 items-center justify-center self-center justify-self-center overflow-visible opacity-0 [grid-area:1/1] ${fade} [[data-pending-shown]>&]:opacity-100 [[data-pending-shown]>&]:delay-200`,\n} as const;\n\n/**\n * The indicator takes the content colour, so it reads wherever the label does (M3: an indicator\n * in a button needs 3:1 against it). A progress indicator given as `pendingIndicator` gets M3's\n * \"Progress indicators in buttons\" treatment too: the label's colour, and no track.\n */\nconst indicatorColor = {\n '--md-comp-loading-indicator-active-indicator-color': 'currentColor',\n '--md-comp-progress-indicator-active-indicator-color': 'currentColor',\n '--md-comp-progress-indicator-track-color': 'transparent',\n} as CSSProperties;\n\n/** The name suffix's style: text that takes no room (see `nameSuffix`). */\nconst HIDDEN_SUFFIX: CSSProperties = {\n fontSize: 0,\n lineHeight: 0,\n letterSpacing: 0,\n wordSpacing: 0,\n};\n\ninterface PendingOptions<E extends HTMLElement> {\n pending: boolean | undefined;\n pendingIndicator: ReactElement | undefined;\n labels: Partial<ButtonLabels> | undefined;\n size: ButtonSize;\n ariaLabel: string | undefined;\n ariaLabelledby: string | undefined;\n ref: Ref<E> | undefined;\n /** Classes for the indicator's slot (`classNames.pendingIndicator`). */\n indicatorClassName: string | undefined;\n}\n\n/** Text of `node` as a screen reader reads it: `aria-hidden` subtrees left out. */\nfunction readableText(node: Node): string {\n if (node.nodeType === Node.TEXT_NODE) return node.textContent ?? '';\n if (node instanceof Element && node.getAttribute('aria-hidden') === 'true') return '';\n return Array.from(node.childNodes, readableText).join('');\n}\n\n/** The element's accessible name, for the cases a button can be named by. */\nfunction accessibleName(element: HTMLElement): string {\n const labelledby = element.getAttribute('aria-labelledby');\n if (labelledby) {\n return labelledby\n .split(/\\s+/)\n .map((id) => document.getElementById(id)?.textContent?.trim() ?? '')\n .filter(Boolean)\n .join(' ');\n }\n return element.getAttribute('aria-label') ?? readableText(element).trim();\n}\n\n/**\n * The pending state of `Button` and `IconButton` (React Aria's pending `Button`): the props for\n * the root, the accessible-name suffix, and the indicator's slot.\n *\n * - The name gains `labels.pending` while pending, from the first frame: appended to an\n * `aria-label`, an extra id on `aria-labelledby`, or a visually hidden suffix at the end of the label.\n * - When it turns on while focus is in the button, the new name is announced politely, once.\n * - The indicator (the core's `LoadingIndicator`, loaded on demand, or `pendingIndicator`) is\n * preloaded once the button takes a `pending` prop at all, when the browser is idle or the\n * pointer or focus arrives. The content hides only once the indicator is mounted\n * (`data-pending-shown`), so a server-rendered pending button shows its label until then.\n */\nexport function useButtonPending<E extends HTMLElement>({\n pending: pendingProp,\n pendingIndicator,\n labels: labelsProp,\n size,\n ariaLabel,\n ariaLabelledby,\n ref: refProp,\n indicatorClassName,\n}: PendingOptions<E>) {\n const takesPending = pendingProp !== undefined;\n const pending = pendingProp === true;\n const custom = pendingIndicator !== undefined;\n const labels = { ...DEFAULT_LABELS, ...labelsProp };\n const hiddenId = useId();\n\n // The element, for the announcement and the preload; it also forwards to the app's ref.\n const ref = useObjectRef(refProp);\n\n usePreloadOnIntent(ref, preloadLoadingIndicator, takesPending && !custom);\n useEffect(() => {\n if (takesPending) prepareAnnouncer();\n }, [takesPending]);\n\n const [loaded, setLoaded] = useState(false);\n useEffect(() => {\n if (!pending || custom || loaded) return;\n let live = true;\n preloadLoadingIndicator().then(\n () => live && setLoaded(true),\n () => undefined,\n );\n return () => {\n live = false;\n };\n }, [pending, custom, loaded]);\n\n const shown = pending && (custom || loaded);\n const { isPresent, exitProps } = usePresence(shown);\n\n useEffect(() => {\n const element = ref.current;\n if (!pending || !element || !element.contains(document.activeElement)) return;\n // The name already carries the suffix, as it does for a screen reader.\n const name = accessibleName(element);\n if (name) announcePolite(name);\n }, [ref, pending]);\n\n let nameProps: { 'aria-label'?: string; 'aria-labelledby'?: string } = {};\n let hiddenName: ReactNode = null;\n let nameSuffix: ReactNode = null;\n if (pending) {\n if (ariaLabelledby) {\n nameProps = { 'aria-labelledby': `${ariaLabelledby} ${hiddenId}` };\n hiddenName = (\n <span id={hiddenId} hidden>\n {labels.pending}\n </span>\n );\n } else if (ariaLabel) {\n nameProps = { 'aria-label': `${ariaLabel}, ${labels.pending}` };\n } else {\n // Inline text at the label's end, sized to nothing: browsers join the text of a block,\n // a grid item or an absolutely positioned box (`sr-only`) to the label with a space\n // (\"Save , Loading\"), but run inline text on (\"Save, Loading\"). No tracking either (the\n // label's is in rem, so it would still space each hidden letter out), nor line height\n // (its half-leading, centred on the zero-size text, would grow the label's line).\n nameSuffix = <span style={HIDDEN_SUFFIX}>{`, ${labels.pending}`}</span>;\n }\n }\n\n const indicator = takesPending ? (\n <span\n aria-hidden=\"true\"\n data-slot=\"pending-indicator\"\n className={indicatorClassName}\n style={indicatorColor}\n {...exitProps}\n >\n {isPresent &&\n (pendingIndicator ?? (\n <LazyLoadingIndicator size={PENDING_INDICATOR_SIZE[size]} aria-label={labels.pending} />\n ))}\n </span>\n ) : null;\n\n return {\n /** Whether the content wrapper holds the grid cell (the button takes `pending`). */\n takesPending,\n rootProps: { ref, ...nameProps, 'data-pending': pending || undefined },\n contentProps: { 'data-pending-shown': shown || undefined },\n /** The element `aria-labelledby` adds while pending, anywhere in the button. */\n hiddenName,\n /** The suffix of a name taken from the content, to put at the end of the label's text. */\n nameSuffix,\n indicator,\n };\n}\n"],"mappings":";;;;;;;;;AA2BA,MAAM,iBAA+B,EAAE,SAAS,UAAU;;;;;AAM1D,MAAa,yBAAqD;CAChE,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;;;;;;;AAQA,MAAM,OACJ;AAEF,MAAa,iBAAiB;;CAE5B,SAAS;;CAET,UAAU,mBAAmB,KAAK;;CAElC,OAAO;;;;;;CAMP,WAAW,0IAA0I,KAAK;AAC5J;;;;;;AAOA,MAAM,iBAAiB;CACrB,sDAAsD;CACtD,uDAAuD;CACvD,4CAA4C;AAC9C;;AAGA,MAAM,gBAA+B;CACnC,UAAU;CACV,YAAY;CACZ,eAAe;CACf,aAAa;AACf;;AAeA,SAAS,aAAa,MAAoB;CACxC,IAAI,KAAK,aAAa,KAAK,WAAW,OAAO,KAAK,eAAe;CACjE,IAAI,gBAAgB,WAAW,KAAK,aAAa,aAAa,MAAM,QAAQ,OAAO;CACnF,OAAO,MAAM,KAAK,KAAK,YAAY,YAAY,CAAC,CAAC,KAAK,EAAE;AAC1D;;AAGA,SAAS,eAAe,SAA8B;CACpD,MAAM,aAAa,QAAQ,aAAa,iBAAiB;CACzD,IAAI,YACF,OAAO,WACJ,MAAM,KAAK,CAAC,CACZ,KAAK,OAAO,SAAS,eAAe,EAAE,CAAC,EAAE,aAAa,KAAK,KAAK,EAAE,CAAC,CACnE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;CAEb,OAAO,QAAQ,aAAa,YAAY,KAAK,aAAa,OAAO,CAAC,CAAC,KAAK;AAC1E;;;;;;;;;;;;;AAcA,SAAgB,iBAAwC,EACtD,SAAS,aACT,kBACA,QAAQ,YACR,MACA,WACA,gBACA,KAAK,SACL,sBACoB;CACpB,MAAM,eAAe,gBAAgB,KAAA;CACrC,MAAM,UAAU,gBAAgB;CAChC,MAAM,SAAS,qBAAqB,KAAA;CACpC,MAAM,SAAS;EAAE,GAAG;EAAgB,GAAG;CAAW;CAClD,MAAM,WAAW,MAAM;CAGvB,MAAM,MAAM,aAAa,OAAO;CAEhC,mBAAmB,KAAK,yBAAyB,gBAAgB,CAAC,MAAM;CACxE,gBAAgB;EACd,IAAI,cAAc,iBAAiB;CACrC,GAAG,CAAC,YAAY,CAAC;CAEjB,MAAM,CAAC,QAAQ,aAAa,SAAS,KAAK;CAC1C,gBAAgB;EACd,IAAI,CAAC,WAAW,UAAU,QAAQ;EAClC,IAAI,OAAO;EACX,wBAAwB,CAAC,CAAC,WAClB,QAAQ,UAAU,IAAI,SACtB,KAAA,CACR;EACA,aAAa;GACX,OAAO;EACT;CACF,GAAG;EAAC;EAAS;EAAQ;CAAM,CAAC;CAE5B,MAAM,QAAQ,YAAY,UAAU;CACpC,MAAM,EAAE,WAAW,cAAc,YAAY,KAAK;CAElD,gBAAgB;EACd,MAAM,UAAU,IAAI;EACpB,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,QAAQ,SAAS,SAAS,aAAa,GAAG;EAEvE,MAAM,OAAO,eAAe,OAAO;EACnC,IAAI,MAAM,eAAe,IAAI;CAC/B,GAAG,CAAC,KAAK,OAAO,CAAC;CAEjB,IAAI,YAAmE,CAAC;CACxE,IAAI,aAAwB;CAC5B,IAAI,aAAwB;CAC5B,IAAI,SAAS;EACX,IAAI,gBAAgB;GAClB,YAAY,EAAE,mBAAmB,GAAG,eAAe,GAAG,WAAW;GACjE,aACE,oBAAC,QAAD;IAAM,IAAI;IAAU,QAAA;IACjB,UAAA,OAAO;GACJ,CAAA;EAEV,OAAO,IAAI,WACT,YAAY,EAAE,cAAc,GAAG,UAAU,IAAI,OAAO,UAAU;OAO9D,aAAa,oBAAC,QAAD;GAAM,OAAO;GAAgB,UAAA,KAAK,OAAO;EAAgB,CAAA;CAE1E;CAEA,MAAM,YAAY,eAChB,oBAAC,QAAD;EACE,eAAY;EACZ,aAAU;EACV,WAAW;EACX,OAAO;EACP,GAAI;EAEH,UAAA,cACE,oBACC,oBAAC,sBAAD;GAAsB,MAAM,uBAAuB;GAAO,cAAY,OAAO;EAAU,CAAA;CAEvF,CAAA,IACJ;CAEJ,OAAO;;EAEL;EACA,WAAW;GAAE;GAAK,GAAG;GAAW,gBAAgB,WAAW,KAAA;EAAU;EACrE,cAAc,EAAE,sBAAsB,SAAS,KAAA,EAAU;;EAEzD;;EAEA;EACA;CACF;AACF"}
@@ -0,0 +1,216 @@
1
+ import { VariantProps } from "../../utils/tv.js";
2
+ //#region src/components/button/button-styles.d.ts
3
+ export declare const buttonVariantClasses: {
4
+ readonly filled: string;
5
+ readonly elevated: string;
6
+ readonly tonal: string;
7
+ readonly outlined: "[--m3-button-border:1px] border-(length:--m3-button-border) border-solid border-[color:var(--_md-comp-button-outline-color)] bg-[var(--_md-comp-button-container-color)] text-[color:var(--_md-comp-button-label-text-color)] shadow-[shadow:var(--_md-comp-button-container-elevation)] data-disabled:not-data-selected:border-outline-variant/10";
8
+ readonly text: string;
9
+ };
10
+ /** Variant definitions for {@link Button}; extend them to add variants. */
11
+ export declare const buttonStyles: import("tailwind-variants").TVReturnType<{
12
+ variant: {
13
+ filled: {
14
+ root: string;
15
+ };
16
+ elevated: {
17
+ root: string;
18
+ };
19
+ tonal: {
20
+ root: string;
21
+ };
22
+ outlined: {
23
+ root: "[--m3-button-border:1px] border-(length:--m3-button-border) border-solid border-[color:var(--_md-comp-button-outline-color)] bg-[var(--_md-comp-button-container-color)] text-[color:var(--_md-comp-button-label-text-color)] shadow-[shadow:var(--_md-comp-button-container-elevation)] data-disabled:not-data-selected:border-outline-variant/10";
24
+ };
25
+ text: {
26
+ root: string;
27
+ };
28
+ };
29
+ size: {
30
+ xs: {
31
+ root: string;
32
+ content: string;
33
+ icon: string;
34
+ };
35
+ sm: {
36
+ root: string;
37
+ content: string;
38
+ icon: string;
39
+ };
40
+ md: {
41
+ root: string;
42
+ content: string;
43
+ icon: string;
44
+ };
45
+ lg: {
46
+ root: string;
47
+ content: string;
48
+ icon: string;
49
+ };
50
+ xl: {
51
+ root: string;
52
+ content: string;
53
+ icon: string;
54
+ };
55
+ };
56
+ shape: {
57
+ round: {};
58
+ square: {};
59
+ };
60
+ toggle: {
61
+ true: {};
62
+ false: {};
63
+ };
64
+ /** Position in a connected button group, set by `ButtonGroup`. */
65
+ connected: {
66
+ none: {};
67
+ leading: {};
68
+ middle: {};
69
+ trailing: {};
70
+ };
71
+ }, {
72
+ root: string[];
73
+ content: string;
74
+ label: string;
75
+ icon: string;
76
+ }, undefined, {
77
+ variant: {
78
+ filled: {
79
+ root: string;
80
+ };
81
+ elevated: {
82
+ root: string;
83
+ };
84
+ tonal: {
85
+ root: string;
86
+ };
87
+ outlined: {
88
+ root: "[--m3-button-border:1px] border-(length:--m3-button-border) border-solid border-[color:var(--_md-comp-button-outline-color)] bg-[var(--_md-comp-button-container-color)] text-[color:var(--_md-comp-button-label-text-color)] shadow-[shadow:var(--_md-comp-button-container-elevation)] data-disabled:not-data-selected:border-outline-variant/10";
89
+ };
90
+ text: {
91
+ root: string;
92
+ };
93
+ };
94
+ size: {
95
+ xs: {
96
+ root: string;
97
+ content: string;
98
+ icon: string;
99
+ };
100
+ sm: {
101
+ root: string;
102
+ content: string;
103
+ icon: string;
104
+ };
105
+ md: {
106
+ root: string;
107
+ content: string;
108
+ icon: string;
109
+ };
110
+ lg: {
111
+ root: string;
112
+ content: string;
113
+ icon: string;
114
+ };
115
+ xl: {
116
+ root: string;
117
+ content: string;
118
+ icon: string;
119
+ };
120
+ };
121
+ shape: {
122
+ round: {};
123
+ square: {};
124
+ };
125
+ toggle: {
126
+ true: {};
127
+ false: {};
128
+ };
129
+ /** Position in a connected button group, set by `ButtonGroup`. */
130
+ connected: {
131
+ none: {};
132
+ leading: {};
133
+ middle: {};
134
+ trailing: {};
135
+ };
136
+ }, {
137
+ root: string[];
138
+ content: string;
139
+ label: string;
140
+ icon: string;
141
+ }, import("tailwind-variants").TVReturnTypeLike<{
142
+ variant: {
143
+ filled: {
144
+ root: string;
145
+ };
146
+ elevated: {
147
+ root: string;
148
+ };
149
+ tonal: {
150
+ root: string;
151
+ };
152
+ outlined: {
153
+ root: "[--m3-button-border:1px] border-(length:--m3-button-border) border-solid border-[color:var(--_md-comp-button-outline-color)] bg-[var(--_md-comp-button-container-color)] text-[color:var(--_md-comp-button-label-text-color)] shadow-[shadow:var(--_md-comp-button-container-elevation)] data-disabled:not-data-selected:border-outline-variant/10";
154
+ };
155
+ text: {
156
+ root: string;
157
+ };
158
+ };
159
+ size: {
160
+ xs: {
161
+ root: string;
162
+ content: string;
163
+ icon: string;
164
+ };
165
+ sm: {
166
+ root: string;
167
+ content: string;
168
+ icon: string;
169
+ };
170
+ md: {
171
+ root: string;
172
+ content: string;
173
+ icon: string;
174
+ };
175
+ lg: {
176
+ root: string;
177
+ content: string;
178
+ icon: string;
179
+ };
180
+ xl: {
181
+ root: string;
182
+ content: string;
183
+ icon: string;
184
+ };
185
+ };
186
+ shape: {
187
+ round: {};
188
+ square: {};
189
+ };
190
+ toggle: {
191
+ true: {};
192
+ false: {};
193
+ };
194
+ /** Position in a connected button group, set by `ButtonGroup`. */
195
+ connected: {
196
+ none: {};
197
+ leading: {};
198
+ middle: {};
199
+ trailing: {};
200
+ };
201
+ }, {
202
+ root: string[];
203
+ content: string;
204
+ label: string;
205
+ icon: string;
206
+ }>>;
207
+ /**
208
+ * The variants of {@link buttonStyles}, for building on its styles. They are the recipe's keys, not
209
+ * component props: their names (`hasIcon`, `isOpen`…) follow the classes and may change.
210
+ */
211
+ export type ButtonStyleProps = VariantProps<typeof buttonStyles>;
212
+ export type ButtonVariant = NonNullable<ButtonStyleProps['variant']>;
213
+ export type ButtonSize = NonNullable<ButtonStyleProps['size']>;
214
+ export type ButtonShape = NonNullable<ButtonStyleProps['shape']>;
215
+ //#endregion
216
+ //# sourceMappingURL=button-styles.d.ts.map
@@ -0,0 +1,199 @@
1
+ import { tv } from "../../utils/tv.js";
2
+ import { connectedShapeVariants } from "./connected-shapes.js";
3
+ //#region src/components/button/button-styles.ts
4
+ const round = "rounded-[var(--_md-comp-button-container-shape-round-capped)]";
5
+ const square = "rounded-[var(--_md-comp-button-container-shape-square)]";
6
+ const pressed = {
7
+ xs: "data-pressed:rounded-corner-small",
8
+ sm: "data-pressed:rounded-corner-small",
9
+ md: "data-pressed:rounded-corner-medium",
10
+ lg: "data-pressed:rounded-corner-large",
11
+ xl: "data-pressed:rounded-corner-large"
12
+ };
13
+ const SIZES = Object.keys(pressed);
14
+ /** Toggle, selected: round buttons become square… */
15
+ const selectedSquare = "data-selected:not-data-pressed:not-data-disabled:rounded-[var(--_md-comp-button-container-shape-square)]";
16
+ /** …and square buttons become round. */
17
+ const selectedRound = "data-selected:not-data-pressed:not-data-disabled:rounded-[var(--_md-comp-button-container-shape-round-capped)]";
18
+ const shapeVariants = [
19
+ {
20
+ connected: "none",
21
+ shape: "round",
22
+ class: { root: round }
23
+ },
24
+ {
25
+ connected: "none",
26
+ shape: "square",
27
+ class: { root: square }
28
+ },
29
+ ...SIZES.map((size) => ({
30
+ size,
31
+ connected: "none",
32
+ class: { root: pressed[size] }
33
+ })),
34
+ {
35
+ connected: "none",
36
+ toggle: true,
37
+ shape: "round",
38
+ class: { root: selectedSquare }
39
+ },
40
+ {
41
+ connected: "none",
42
+ toggle: true,
43
+ shape: "square",
44
+ class: { root: selectedRound }
45
+ }
46
+ ];
47
+ /**
48
+ * Colours and elevation of each button variant, shared with the split button's halves.
49
+ * The resting, selected and unselected colours, the elevated button's resting elevation and
50
+ * the outline colour come from the component tokens (`button-tokens.ts`), so the element
51
+ * needs `data-tokens="md-comp-button"` and `data-variant`, as Button and the split button's
52
+ * halves render them. A consumer class (`bg-tertiary`) still wins in `cn()`. Disabled is `on-surface` 10% / `on-surface-variant` 38% for every variant.
53
+ *
54
+ * Hover raises a button only while it isn't pressed, so a press shows the pressed level
55
+ * (elevated 1, filled and tonal 0) even under the pointer (2026-10-13).
56
+ *
57
+ * The outlined style's outline is drawn inside the container's edge spacing: its width is
58
+ * `--m3-button-border` (1px; 2px at L, 3px at XL), and the padding subtracts it, so an
59
+ * outlined button is the same size as the other styles with the same content (2026-10-13).
60
+ * A selected outlined toggle has no outline, disabled or not, as on IconButton (2026-10-13).
61
+ *
62
+ * XS and S take a minimum height (32 / 40px) rather than a fixed one, so they grow around
63
+ * text at a large browser font size, as Compose's `defaultMinSize` does; `h-fit` keeps a
64
+ * stretching flex or grid parent from making them taller (2026-10-13).
65
+ */
66
+ /**
67
+ * The press morph on the default effects spring, which never bounces (`container-motion`
68
+ * reads these). Shared with the split button's halves (2026-10-15).
69
+ */
70
+ const nonBouncingMorph = "[--m3-shape-spring-duration:var(--md-sys-motion-spring-effects-default-duration)] [--m3-shape-spring-easing:var(--md-sys-motion-spring-effects-default-easing)]";
71
+ /**
72
+ * Forced colours (Windows high contrast), as Material Web's buttons: the browser paints
73
+ * every container as `Canvas`, so a filled, elevated, tonal or text button draws a 1px
74
+ * `CanvasText` boundary. It takes the outlined style's `--m3-button-border`, which the
75
+ * padding already subtracts, so the button keeps its size (2026-10-15).
76
+ */
77
+ const forcedBoundary = "forced-colors:[--m3-button-border:1px] forced-colors:border-(length:--m3-button-border) forced-colors:border-solid forced-colors:border-[CanvasText]";
78
+ /**
79
+ * Forced colours for every button, its split button halves and icon buttons: disabled
80
+ * ones are `GrayText`, and a selected toggle is filled with `Highlight` (and opts out of
81
+ * the forced palette to keep it), so it can be told from an unselected one (2026-10-15).
82
+ * They're `!important` to win over the selected and disabled colours, whose selectors are
83
+ * as specific; they apply only in forced colours.
84
+ */
85
+ const forcedColorClasses = {
86
+ disabled: "forced-colors:data-disabled:border-[GrayText]! forced-colors:data-disabled:text-[GrayText]!",
87
+ selected: "forced-colors:data-selected:not-data-disabled:border-[Highlight]! forced-colors:data-selected:not-data-disabled:bg-[Highlight]! forced-colors:data-selected:not-data-disabled:text-[HighlightText]! forced-colors:data-selected:not-data-disabled:forced-color-adjust-none"
88
+ };
89
+ const buttonVariantClasses = {
90
+ filled: "bg-[var(--_md-comp-button-container-color)] text-[color:var(--_md-comp-button-label-text-color)] shadow-[shadow:var(--_md-comp-button-container-elevation)] data-hovered:not-data-pressed:shadow-elevation-1 data-disabled:bg-on-surface/10 " + forcedBoundary,
91
+ elevated: "bg-[var(--_md-comp-button-container-color)] text-[color:var(--_md-comp-button-label-text-color)] shadow-[shadow:var(--_md-comp-button-container-elevation)] data-hovered:not-data-pressed:shadow-elevation-2 data-disabled:bg-on-surface/10 " + forcedBoundary,
92
+ tonal: "bg-[var(--_md-comp-button-container-color)] text-[color:var(--_md-comp-button-label-text-color)] shadow-[shadow:var(--_md-comp-button-container-elevation)] data-hovered:not-data-pressed:shadow-elevation-1 data-disabled:bg-on-surface/10 " + forcedBoundary,
93
+ outlined: "[--m3-button-border:1px] border-(length:--m3-button-border) border-solid border-[color:var(--_md-comp-button-outline-color)] bg-[var(--_md-comp-button-container-color)] text-[color:var(--_md-comp-button-label-text-color)] shadow-[shadow:var(--_md-comp-button-container-elevation)] data-disabled:not-data-selected:border-outline-variant/10",
94
+ text: "bg-[var(--_md-comp-button-container-color)] text-[color:var(--_md-comp-button-label-text-color)] shadow-[shadow:var(--_md-comp-button-container-elevation)] " + forcedBoundary
95
+ };
96
+ /** Variant definitions for {@link Button}; extend them to add variants. */
97
+ const buttonStyles = tv({
98
+ slots: {
99
+ root: [
100
+ "inline-flex shrink-0 cursor-pointer items-center justify-center align-middle",
101
+ "font-plain whitespace-nowrap select-none",
102
+ "state-layer focus-ring container-motion",
103
+ "data-disabled:cursor-default data-disabled:text-on-surface-variant/38 data-disabled:shadow-elevation-0",
104
+ forcedColorClasses.disabled
105
+ ],
106
+ content: "relative inline-flex shrink-0 items-center justify-center",
107
+ label: "min-w-0",
108
+ icon: "inline-flex shrink-0 items-center justify-center [&>svg]:size-full"
109
+ },
110
+ variants: {
111
+ variant: {
112
+ filled: { root: buttonVariantClasses.filled },
113
+ elevated: { root: buttonVariantClasses.elevated },
114
+ tonal: { root: buttonVariantClasses.tonal },
115
+ outlined: { root: buttonVariantClasses.outlined },
116
+ text: { root: buttonVariantClasses.text }
117
+ },
118
+ size: {
119
+ xs: {
120
+ root: "h-fit min-h-[32px] min-w-[58px] px-[calc(16px-var(--m3-button-border,0px))] text-label-large",
121
+ content: "gap-[8px]",
122
+ icon: "size-[20px]"
123
+ },
124
+ sm: {
125
+ root: "h-fit min-h-[40px] min-w-[58px] px-[calc(16px-var(--m3-button-border,0px))] text-label-large",
126
+ content: "gap-[8px]",
127
+ icon: "size-[20px]"
128
+ },
129
+ md: {
130
+ root: "h-[56px] px-[calc(24px-var(--m3-button-border,0px))] text-title-medium",
131
+ content: "gap-[8px]",
132
+ icon: "size-[24px]"
133
+ },
134
+ lg: {
135
+ root: "h-[96px] px-[calc(48px-var(--m3-button-border,0px))] font-brand text-headline-small",
136
+ content: "gap-[12px]",
137
+ icon: "size-[32px]"
138
+ },
139
+ xl: {
140
+ root: "h-[136px] px-[calc(64px-var(--m3-button-border,0px))] font-brand text-headline-large",
141
+ content: "gap-[16px]",
142
+ icon: "size-[40px]"
143
+ }
144
+ },
145
+ shape: {
146
+ round: {},
147
+ square: {}
148
+ },
149
+ toggle: {
150
+ true: {},
151
+ false: {}
152
+ },
153
+ /** Position in a connected button group, set by `ButtonGroup`. */
154
+ connected: {
155
+ none: {},
156
+ leading: {},
157
+ middle: {},
158
+ trailing: {}
159
+ }
160
+ },
161
+ compoundVariants: [
162
+ ...shapeVariants,
163
+ {
164
+ toggle: false,
165
+ class: { root: nonBouncingMorph }
166
+ },
167
+ ...connectedShapeVariants,
168
+ {
169
+ variant: "outlined",
170
+ size: "lg",
171
+ class: { root: "[--m3-button-border:2px]" }
172
+ },
173
+ {
174
+ variant: "outlined",
175
+ size: "xl",
176
+ class: { root: "[--m3-button-border:3px]" }
177
+ },
178
+ {
179
+ toggle: true,
180
+ class: { root: ["bg-[var(--_md-comp-button-unselected-container-color)] text-[color:var(--_md-comp-button-unselected-label-text-color)] data-selected:not-data-disabled:bg-[var(--_md-comp-button-selected-container-color)] data-selected:not-data-disabled:text-[color:var(--_md-comp-button-selected-label-text-color)]", forcedColorClasses.selected] }
181
+ },
182
+ {
183
+ variant: "outlined",
184
+ toggle: true,
185
+ class: { root: "data-disabled:not-data-selected:bg-outline-variant/10 data-disabled:data-selected:bg-on-surface/10 data-selected:border-transparent" }
186
+ }
187
+ ],
188
+ defaultVariants: {
189
+ variant: "filled",
190
+ size: "sm",
191
+ shape: "round",
192
+ toggle: false,
193
+ connected: "none"
194
+ }
195
+ });
196
+ //#endregion
197
+ export { buttonStyles, buttonVariantClasses, forcedColorClasses, nonBouncingMorph };
198
+
199
+ //# sourceMappingURL=button-styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-styles.js","names":[],"sources":["../../../src/components/button/button-styles.ts"],"sourcesContent":["import { tv, type VariantProps } from '../../utils/tv';\nimport { connectedShapeVariants } from './connected-shapes';\n\n/*\n * Values follow the M3 Expressive button specs and Compose's Button*Tokens files\n * (2026-10-13): text buttons use `primary`; XS buttons have 16px padding and an 8px icon\n * gap (`ButtonXSmallTokens`); small text buttons have the same 16px padding as the other\n * small buttons (\"24dp: Not recommended. Use 16dp\"); and every button, toggles included,\n * presses to 8 / 8 / 12 / 16 / 16px (\"Both round and square buttons should have the same\n * pressed shape\").\n *\n * The resting round and square corners come from the component tokens (`button-tokens.ts`,\n * `--md-comp-button-<size>-container-shape-*`). \"Full\" corners are capped at half the\n * container height instead of 9999px so the corner transition interpolates smoothly: the\n * set's derived `container-shape-round-capped`. Every class is written out in full:\n * Tailwind finds classes by scanning for literal strings.\n */\nconst round = 'rounded-[var(--_md-comp-button-container-shape-round-capped)]';\nconst square = 'rounded-[var(--_md-comp-button-container-shape-square)]';\n\nconst pressed = {\n xs: 'data-pressed:rounded-corner-small',\n sm: 'data-pressed:rounded-corner-small',\n md: 'data-pressed:rounded-corner-medium',\n lg: 'data-pressed:rounded-corner-large',\n xl: 'data-pressed:rounded-corner-large',\n} as const;\n\ntype Size = keyof typeof pressed;\nconst SIZES = Object.keys(pressed) as Size[];\n\n/** Toggle, selected: round buttons become square… */\nconst selectedSquare =\n 'data-selected:not-data-pressed:not-data-disabled:rounded-[var(--_md-comp-button-container-shape-square)]';\n\n/** …and square buttons become round. */\nconst selectedRound =\n 'data-selected:not-data-pressed:not-data-disabled:rounded-[var(--_md-comp-button-container-shape-round-capped)]';\n\nconst shapeVariants = [\n { connected: 'none' as const, shape: 'round' as const, class: { root: round } },\n { connected: 'none' as const, shape: 'square' as const, class: { root: square } },\n ...SIZES.map((size) => ({ size, connected: 'none' as const, class: { root: pressed[size] } })),\n // Selected toggle buttons swap shape: round becomes square and square becomes round.\n {\n connected: 'none' as const,\n toggle: true,\n shape: 'round' as const,\n class: { root: selectedSquare },\n },\n {\n connected: 'none' as const,\n toggle: true,\n shape: 'square' as const,\n class: { root: selectedRound },\n },\n];\n\n/**\n * Colours and elevation of each button variant, shared with the split button's halves.\n * The resting, selected and unselected colours, the elevated button's resting elevation and\n * the outline colour come from the component tokens (`button-tokens.ts`), so the element\n * needs `data-tokens=\"md-comp-button\"` and `data-variant`, as Button and the split button's\n * halves render them. A consumer class (`bg-tertiary`) still wins in `cn()`. Disabled is `on-surface` 10% / `on-surface-variant` 38% for every variant.\n *\n * Hover raises a button only while it isn't pressed, so a press shows the pressed level\n * (elevated 1, filled and tonal 0) even under the pointer (2026-10-13).\n *\n * The outlined style's outline is drawn inside the container's edge spacing: its width is\n * `--m3-button-border` (1px; 2px at L, 3px at XL), and the padding subtracts it, so an\n * outlined button is the same size as the other styles with the same content (2026-10-13).\n * A selected outlined toggle has no outline, disabled or not, as on IconButton (2026-10-13).\n *\n * XS and S take a minimum height (32 / 40px) rather than a fixed one, so they grow around\n * text at a large browser font size, as Compose's `defaultMinSize` does; `h-fit` keeps a\n * stretching flex or grid parent from making them taller (2026-10-13).\n */\n/**\n * The press morph on the default effects spring, which never bounces (`container-motion`\n * reads these). Shared with the split button's halves (2026-10-15).\n */\nexport const nonBouncingMorph =\n '[--m3-shape-spring-duration:var(--md-sys-motion-spring-effects-default-duration)] [--m3-shape-spring-easing:var(--md-sys-motion-spring-effects-default-easing)]';\n\n/**\n * Forced colours (Windows high contrast), as Material Web's buttons: the browser paints\n * every container as `Canvas`, so a filled, elevated, tonal or text button draws a 1px\n * `CanvasText` boundary. It takes the outlined style's `--m3-button-border`, which the\n * padding already subtracts, so the button keeps its size (2026-10-15).\n */\nconst forcedBoundary =\n 'forced-colors:[--m3-button-border:1px] forced-colors:border-(length:--m3-button-border) forced-colors:border-solid forced-colors:border-[CanvasText]';\n\n/**\n * Forced colours for every button, its split button halves and icon buttons: disabled\n * ones are `GrayText`, and a selected toggle is filled with `Highlight` (and opts out of\n * the forced palette to keep it), so it can be told from an unselected one (2026-10-15).\n * They're `!important` to win over the selected and disabled colours, whose selectors are\n * as specific; they apply only in forced colours.\n */\nexport const forcedColorClasses = {\n disabled:\n 'forced-colors:data-disabled:border-[GrayText]! forced-colors:data-disabled:text-[GrayText]!',\n selected:\n 'forced-colors:data-selected:not-data-disabled:border-[Highlight]! forced-colors:data-selected:not-data-disabled:bg-[Highlight]! forced-colors:data-selected:not-data-disabled:text-[HighlightText]! forced-colors:data-selected:not-data-disabled:forced-color-adjust-none',\n} as const;\n\nexport const buttonVariantClasses = {\n filled:\n 'bg-[var(--_md-comp-button-container-color)] text-[color:var(--_md-comp-button-label-text-color)] shadow-[shadow:var(--_md-comp-button-container-elevation)] data-hovered:not-data-pressed:shadow-elevation-1 data-disabled:bg-on-surface/10 ' +\n forcedBoundary,\n elevated:\n 'bg-[var(--_md-comp-button-container-color)] text-[color:var(--_md-comp-button-label-text-color)] shadow-[shadow:var(--_md-comp-button-container-elevation)] data-hovered:not-data-pressed:shadow-elevation-2 data-disabled:bg-on-surface/10 ' +\n forcedBoundary,\n tonal:\n 'bg-[var(--_md-comp-button-container-color)] text-[color:var(--_md-comp-button-label-text-color)] shadow-[shadow:var(--_md-comp-button-container-elevation)] data-hovered:not-data-pressed:shadow-elevation-1 data-disabled:bg-on-surface/10 ' +\n forcedBoundary,\n outlined:\n '[--m3-button-border:1px] border-(length:--m3-button-border) border-solid border-[color:var(--_md-comp-button-outline-color)] bg-[var(--_md-comp-button-container-color)] text-[color:var(--_md-comp-button-label-text-color)] shadow-[shadow:var(--_md-comp-button-container-elevation)] data-disabled:not-data-selected:border-outline-variant/10',\n text:\n 'bg-[var(--_md-comp-button-container-color)] text-[color:var(--_md-comp-button-label-text-color)] shadow-[shadow:var(--_md-comp-button-container-elevation)] ' +\n forcedBoundary,\n} as const;\n\n/** Variant definitions for {@link Button}; extend them to add variants. */\nexport const buttonStyles = tv({\n slots: {\n root: [\n 'inline-flex shrink-0 cursor-pointer items-center justify-center align-middle',\n 'font-plain whitespace-nowrap select-none',\n 'state-layer focus-ring container-motion',\n 'data-disabled:cursor-default data-disabled:text-on-surface-variant/38 data-disabled:shadow-elevation-0',\n forcedColorClasses.disabled,\n ],\n // Library-owned inner wrapper: holds the touch target, never receives consumer layout. It\n // never shrinks: in a button narrower than its content (a button group's compressed\n // neighbour) the content stays centred, giving up the padding equally on both sides\n // (2026-10-15).\n content: 'relative inline-flex shrink-0 items-center justify-center',\n label: 'min-w-0',\n icon: 'inline-flex shrink-0 items-center justify-center [&>svg]:size-full',\n },\n variants: {\n variant: {\n filled: { root: buttonVariantClasses.filled },\n elevated: { root: buttonVariantClasses.elevated },\n tonal: { root: buttonVariantClasses.tonal },\n outlined: { root: buttonVariantClasses.outlined },\n text: { root: buttonVariantClasses.text },\n },\n size: {\n xs: {\n root: 'h-fit min-h-[32px] min-w-[58px] px-[calc(16px-var(--m3-button-border,0px))] text-label-large',\n content: 'gap-[8px]',\n icon: 'size-[20px]',\n },\n sm: {\n root: 'h-fit min-h-[40px] min-w-[58px] px-[calc(16px-var(--m3-button-border,0px))] text-label-large',\n content: 'gap-[8px]',\n icon: 'size-[20px]',\n },\n md: {\n root: 'h-[56px] px-[calc(24px-var(--m3-button-border,0px))] text-title-medium',\n content: 'gap-[8px]',\n icon: 'size-[24px]',\n },\n lg: {\n root: 'h-[96px] px-[calc(48px-var(--m3-button-border,0px))] font-brand text-headline-small',\n content: 'gap-[12px]',\n icon: 'size-[32px]',\n },\n xl: {\n root: 'h-[136px] px-[calc(64px-var(--m3-button-border,0px))] font-brand text-headline-large',\n content: 'gap-[16px]',\n icon: 'size-[40px]',\n },\n },\n shape: {\n round: {},\n square: {},\n },\n toggle: {\n true: {},\n false: {},\n },\n /** Position in a connected button group, set by `ButtonGroup`. */\n connected: { none: {}, leading: {}, middle: {}, trailing: {} },\n },\n compoundVariants: [\n ...shapeVariants,\n // A plain button's press morph runs on the default effects spring, which never bounces\n // (Compose's Button: \"DefaultEffects is intentional here\"); a toggle's selection morph\n // keeps the fast spatial spring, as Compose's ToggleButton (2026-10-15).\n { toggle: false, class: { root: nonBouncingMorph } },\n ...connectedShapeVariants,\n // Outline width grows with size.\n { variant: 'outlined', size: 'lg', class: { root: '[--m3-button-border:2px]' } },\n { variant: 'outlined', size: 'xl', class: { root: '[--m3-button-border:3px]' } },\n // Toggle colours: unselected → selected, from the component tokens.\n {\n toggle: true,\n class: {\n root: [\n 'bg-[var(--_md-comp-button-unselected-container-color)] text-[color:var(--_md-comp-button-unselected-label-text-color)] data-selected:not-data-disabled:bg-[var(--_md-comp-button-selected-container-color)] data-selected:not-data-disabled:text-[color:var(--_md-comp-button-selected-label-text-color)]',\n forcedColorClasses.selected,\n ],\n },\n },\n {\n variant: 'outlined',\n toggle: true,\n // Disabled: unselected outline-variant at 10%; selected on-surface at 10%, as\n // `OutlinedButtonTokens.SelectedDisabledContainerColor` and the outlined icon button\n // (2026-10-15).\n class: {\n root: 'data-disabled:not-data-selected:bg-outline-variant/10 data-disabled:data-selected:bg-on-surface/10 data-selected:border-transparent',\n },\n },\n ],\n defaultVariants: {\n variant: 'filled',\n size: 'sm',\n shape: 'round',\n toggle: false,\n connected: 'none',\n },\n});\n\n/**\n * The variants of {@link buttonStyles}, for building on its styles. They are the recipe's keys, not\n * component props: their names (`hasIcon`, `isOpen`…) follow the classes and may change.\n */\nexport type ButtonStyleProps = VariantProps<typeof buttonStyles>;\nexport type ButtonVariant = NonNullable<ButtonStyleProps['variant']>;\nexport type ButtonSize = NonNullable<ButtonStyleProps['size']>;\nexport type ButtonShape = NonNullable<ButtonStyleProps['shape']>;\n"],"mappings":";;;AAiBA,MAAM,QAAQ;AACd,MAAM,SAAS;AAEf,MAAM,UAAU;CACd,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AAGA,MAAM,QAAQ,OAAO,KAAK,OAAO;;AAGjC,MAAM,iBACJ;;AAGF,MAAM,gBACJ;AAEF,MAAM,gBAAgB;CACpB;EAAE,WAAW;EAAiB,OAAO;EAAkB,OAAO,EAAE,MAAM,MAAM;CAAE;CAC9E;EAAE,WAAW;EAAiB,OAAO;EAAmB,OAAO,EAAE,MAAM,OAAO;CAAE;CAChF,GAAG,MAAM,KAAK,UAAU;EAAE;EAAM,WAAW;EAAiB,OAAO,EAAE,MAAM,QAAQ,MAAM;CAAE,EAAE;CAE7F;EACE,WAAW;EACX,QAAQ;EACR,OAAO;EACP,OAAO,EAAE,MAAM,eAAe;CAChC;CACA;EACE,WAAW;EACX,QAAQ;EACR,OAAO;EACP,OAAO,EAAE,MAAM,cAAc;CAC/B;AACF;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAa,mBACX;;;;;;;AAQF,MAAM,iBACJ;;;;;;;;AASF,MAAa,qBAAqB;CAChC,UACE;CACF,UACE;AACJ;AAEA,MAAa,uBAAuB;CAClC,QACE,iPACA;CACF,UACE,iPACA;CACF,OACE,iPACA;CACF,UACE;CACF,MACE,iKACA;AACJ;;AAGA,MAAa,eAAe,GAAG;CAC7B,OAAO;EACL,MAAM;GACJ;GACA;GACA;GACA;GACA,mBAAmB;EACrB;EAKA,SAAS;EACT,OAAO;EACP,MAAM;CACR;CACA,UAAU;EACR,SAAS;GACP,QAAQ,EAAE,MAAM,qBAAqB,OAAO;GAC5C,UAAU,EAAE,MAAM,qBAAqB,SAAS;GAChD,OAAO,EAAE,MAAM,qBAAqB,MAAM;GAC1C,UAAU,EAAE,MAAM,qBAAqB,SAAS;GAChD,MAAM,EAAE,MAAM,qBAAqB,KAAK;EAC1C;EACA,MAAM;GACJ,IAAI;IACF,MAAM;IACN,SAAS;IACT,MAAM;GACR;GACA,IAAI;IACF,MAAM;IACN,SAAS;IACT,MAAM;GACR;GACA,IAAI;IACF,MAAM;IACN,SAAS;IACT,MAAM;GACR;GACA,IAAI;IACF,MAAM;IACN,SAAS;IACT,MAAM;GACR;GACA,IAAI;IACF,MAAM;IACN,SAAS;IACT,MAAM;GACR;EACF;EACA,OAAO;GACL,OAAO,CAAC;GACR,QAAQ,CAAC;EACX;EACA,QAAQ;GACN,MAAM,CAAC;GACP,OAAO,CAAC;EACV;;EAEA,WAAW;GAAE,MAAM,CAAC;GAAG,SAAS,CAAC;GAAG,QAAQ,CAAC;GAAG,UAAU,CAAC;EAAE;CAC/D;CACA,kBAAkB;EAChB,GAAG;EAIH;GAAE,QAAQ;GAAO,OAAO,EAAE,MAAM,iBAAiB;EAAE;EACnD,GAAG;EAEH;GAAE,SAAS;GAAY,MAAM;GAAM,OAAO,EAAE,MAAM,2BAA2B;EAAE;EAC/E;GAAE,SAAS;GAAY,MAAM;GAAM,OAAO,EAAE,MAAM,2BAA2B;EAAE;EAE/E;GACE,QAAQ;GACR,OAAO,EACL,MAAM,CACJ,6SACA,mBAAmB,QACrB,EACF;EACF;EACA;GACE,SAAS;GACT,QAAQ;GAIR,OAAO,EACL,MAAM,sIACR;EACF;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;EACN,OAAO;EACP,QAAQ;EACR,WAAW;CACb;AACF,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { ComponentTokenSet } from "../../tokens/component.js";
2
+ import "../../index.js";
3
+ //#region src/components/button/button-tokens.d.ts
4
+ /**
5
+ * The tokens of {@link Button}: `--md-comp-button-<variant>-<part>` per variant and
6
+ * `--md-comp-button-<size>-container-shape-<round|square>` per size.
7
+ */
8
+ export declare const buttonTokenSet: ComponentTokenSet<never>;
9
+ //#endregion
10
+ //# sourceMappingURL=button-tokens.d.ts.map