@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,97 @@
1
+ import { tv } from "../../utils/tv.js";
2
+ //#region src/components/slider/slider-styles.ts
3
+ /** Variant definitions for {@link Slider} and {@link RangeSlider}; extend them to add sizes. */
4
+ const sliderStyles = tv({
5
+ slots: {
6
+ root: [
7
+ "group/slider flex shrink-0 select-none",
8
+ "[--m3-slider-gap-0:6px] [--m3-slider-gap-1:6px]",
9
+ "has-[[data-thumb=\"0\"][data-focus-visible]]:[--m3-slider-gap-0:10px]",
10
+ "has-[[data-thumb=\"1\"][data-focus-visible]]:[--m3-slider-gap-1:10px]"
11
+ ],
12
+ track: ["relative isolate grid flex-1 cursor-pointer grid-cols-1 grid-rows-1 items-center justify-items-start group-data-disabled/slider:cursor-default", "before:absolute before:-z-10 before:[inset-inline:0] before:[inset-block:min(0px,calc((100%_-_48px)/2))] before:content-['']"],
13
+ segment: [
14
+ "col-start-1 row-start-1 flex [block-size:var(--m3-slider-track)] items-center overflow-hidden",
15
+ "data-[tone=active]:bg-[var(--_md-comp-slider-active-track-color)]",
16
+ "data-[tone=inactive]:bg-[var(--_md-comp-slider-inactive-track-color)]",
17
+ "group-data-disabled/slider:data-[tone=active]:bg-on-surface/38",
18
+ "group-data-disabled/slider:data-[tone=inactive]:bg-on-surface/12",
19
+ "forced-colors:forced-color-adjust-none",
20
+ "forced-colors:data-[tone=active]:bg-[Highlight]!",
21
+ "forced-colors:data-[tone=inactive]:bg-[Canvas]! forced-colors:data-[tone=inactive]:border forced-colors:data-[tone=inactive]:border-solid forced-colors:data-[tone=inactive]:border-[CanvasText]",
22
+ "forced-colors:group-data-disabled/slider:data-[tone=active]:bg-[GrayText]!",
23
+ "forced-colors:group-data-disabled/slider:data-[tone=inactive]:border-[GrayText]"
24
+ ],
25
+ stop: [
26
+ "size-[4px] shrink-0 rounded-full",
27
+ "in-data-[tone=active]:bg-on-primary",
28
+ "in-data-[tone=inactive]:bg-[var(--_md-comp-slider-stop-indicator-color)]",
29
+ "group-data-disabled/slider:in-data-[tone=active]:bg-inverse-on-surface",
30
+ "group-data-disabled/slider:in-data-[tone=inactive]:bg-on-surface/38",
31
+ "forced-colors:in-data-[tone=active]:bg-[HighlightText]! forced-colors:in-data-[tone=inactive]:bg-[CanvasText]!",
32
+ "forced-colors:group-data-disabled/slider:in-data-[tone=active]:bg-[Canvas]! forced-colors:group-data-disabled/slider:in-data-[tone=inactive]:bg-[GrayText]!"
33
+ ],
34
+ tick: [
35
+ "col-start-1 row-start-1 size-[4px] rounded-full",
36
+ "data-active:bg-on-primary not-data-active:bg-[var(--_md-comp-slider-stop-indicator-color)]",
37
+ "group-data-disabled/slider:data-active:bg-inverse-on-surface",
38
+ "group-data-disabled/slider:not-data-active:bg-on-surface/38",
39
+ "forced-colors:forced-color-adjust-none",
40
+ "forced-colors:data-active:bg-[HighlightText]! forced-colors:not-data-active:bg-[CanvasText]!",
41
+ "forced-colors:group-data-disabled/slider:data-active:bg-[Canvas]! forced-colors:group-data-disabled/slider:not-data-active:bg-[GrayText]!"
42
+ ],
43
+ icon: [
44
+ "flex shrink-0 items-center justify-center overflow-hidden",
45
+ "in-data-[tone=active]:text-on-primary in-data-[tone=inactive]:text-on-secondary-container",
46
+ "forced-colors:in-data-[tone=active]:text-[HighlightText]! forced-colors:in-data-[tone=inactive]:text-[CanvasText]!",
47
+ "[&>svg]:[block-size:var(--m3-slider-icon)] [&>svg]:[inline-size:var(--m3-slider-icon)] [&>svg]:shrink-0"
48
+ ],
49
+ movedIcon: [
50
+ "col-start-1 row-start-1 flex shrink-0 items-center justify-center overflow-hidden",
51
+ "text-on-secondary-container forced-colors:forced-color-adjust-none forced-colors:text-[CanvasText]!",
52
+ "[&>svg]:[block-size:var(--m3-slider-icon)] [&>svg]:[inline-size:var(--m3-slider-icon)] [&>svg]:shrink-0"
53
+ ],
54
+ thumb: ["col-start-1 row-start-1 flex [inline-size:4px] [block-size:var(--m3-slider-handle)] cursor-pointer justify-center", "rounded-full focus-ring group-data-disabled/slider:cursor-default"],
55
+ handle: [
56
+ "[inline-size:4px] [block-size:100%] rounded-full bg-[var(--_md-comp-slider-handle-color)]",
57
+ "data-active:[inline-size:2px]",
58
+ "group-data-disabled/slider:bg-[color-mix(in_srgb,var(--md-sys-color-on-surface)_38%,var(--md-sys-color-surface))]",
59
+ "forced-colors:forced-color-adjust-none forced-colors:bg-[CanvasText]! forced-colors:group-data-disabled/slider:bg-[GrayText]!"
60
+ ],
61
+ labelAnchor: "col-start-1 row-start-1 flex [inline-size:0] [block-size:0] items-end justify-center self-start [margin-block-start:-12px]",
62
+ label: [
63
+ "flex h-[44px] min-w-[48px] items-center justify-center rounded-full ps-[16px] pe-[16px]",
64
+ "bg-[var(--_md-comp-slider-value-indicator-container-color)] text-label-large whitespace-nowrap",
65
+ "text-[color:var(--_md-comp-slider-value-indicator-label-label-text-color)]",
66
+ "[direction:ltr] [writing-mode:horizontal-tb]",
67
+ "forced-colors:outline forced-colors:outline-1 forced-colors:outline-solid forced-colors:outline-[CanvasText]"
68
+ ]
69
+ },
70
+ variants: {
71
+ orientation: {
72
+ horizontal: {
73
+ root: "h-(--m3-slider-handle) w-full touch-pan-y flex-row items-center",
74
+ track: "ms-[2px] me-[2px] self-stretch"
75
+ },
76
+ vertical: {
77
+ root: "h-[240px] w-(--m3-slider-handle) touch-pan-x flex-col items-center",
78
+ track: "mt-[2px] mb-[2px] self-stretch [direction:rtl] [writing-mode:vertical-lr]"
79
+ }
80
+ },
81
+ size: {
82
+ xs: { root: "[--m3-slider-track:16px] [--m3-slider-corner:8px] [--m3-slider-handle:44px]" },
83
+ sm: { root: "[--m3-slider-track:24px] [--m3-slider-corner:8px] [--m3-slider-handle:44px]" },
84
+ md: { root: "[--m3-slider-track:40px] [--m3-slider-corner:12px] [--m3-slider-handle:52px] [--m3-slider-icon:24px]" },
85
+ lg: { root: "[--m3-slider-track:56px] [--m3-slider-corner:16px] [--m3-slider-handle:68px] [--m3-slider-icon:24px]" },
86
+ xl: { root: "[--m3-slider-track:96px] [--m3-slider-corner:28px] [--m3-slider-handle:108px] [--m3-slider-icon:32px]" }
87
+ }
88
+ },
89
+ defaultVariants: {
90
+ orientation: "horizontal",
91
+ size: "xs"
92
+ }
93
+ });
94
+ //#endregion
95
+ export { sliderStyles };
96
+
97
+ //# sourceMappingURL=slider-styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slider-styles.js","names":[],"sources":["../../../src/components/slider/slider-styles.ts"],"sourcesContent":["import { tv, type VariantProps } from '../../utils/tv';\n\n/*\n * Values follow Compose Material 3 (Slider.kt, SliderTokens) and, for the Expressive sizes\n * Compose doesn't ship, the M3 spec's measurements table (handle heights) and the M3 token\n * values in Material Components Android (`m3_comp_slider_{xsmall…xlarge}_*`):\n *\n * | size | track | corner | handle | inset icon |\n * | xs | 16px | 8px | 44px | — |\n * | sm | 24px | 8px | 44px | — |\n * | md | 40px | 12px | 52px | 24px |\n * | lg | 56px | 16px | 68px | 24px |\n * | xl | 96px | 28px | 108px | 32px |\n *\n * Active track and handle `primary`, inactive track `secondary-container`; the handle is\n * 4px wide, 2px while pressed, dragged or focused, with a 6px gap to the track (10px while\n * keyboard-focused, for the focus ring). Stop indicators and ticks are 4px dots,\n * `on-primary` on the active track and `on-secondary-container` on the inactive one\n * (`inverse-on-surface` / `on-surface` 38% disabled; m3.material.io tokens). Disabled:\n * active track `on-surface` 38%, inactive 12%, handle `on-surface` 38% over `surface`.\n * Inset icons sit 10px inside the track, `on-primary` / `on-secondary-container` (MDC);\n * when the active track is too short for the start icon, it moves to the inactive track\n * (M3 spec).\n * The value indicator is a 44px `inverse-surface` pill with `label-large`\n * `inverse-on-surface` text, 12px above the handle.\n *\n * The track is one grid cell: segments, ticks and thumbs are placed with logical margins,\n * so nothing is positioned. A vertical slider writes its track bottom-to-top\n * (`writing-mode: vertical-lr` + `direction: rtl`), so the same geometry serves both\n * orientations and RTL. The track, handle, inactive stop and value indicator colours come\n * from the slider's component tokens (`slider-tokens.ts`, `--md-comp-slider-*`); the root\n * carries `data-tokens` and `data-size`. Every class is written out in full so Tailwind can\n * find it.\n */\n\n/** Variant definitions for {@link Slider} and {@link RangeSlider}; extend them to add sizes. */\nexport const sliderStyles = tv({\n slots: {\n root: [\n 'group/slider flex shrink-0 select-none',\n '[--m3-slider-gap-0:6px] [--m3-slider-gap-1:6px]',\n 'has-[[data-thumb=\"0\"][data-focus-visible]]:[--m3-slider-gap-0:10px]',\n 'has-[[data-thumb=\"1\"][data-focus-visible]]:[--m3-slider-gap-1:10px]',\n ],\n // The track takes the presses. Its hit area is at least 48px across (M3's touch target)\n // without changing the layout: a transparent layer under its parts reaches 2px past an\n // xs or sm slider's 44px on each side. The block axis is the cross axis in both\n // orientations (a vertical track's writing mode is vertical).\n track: [\n 'relative isolate grid flex-1 cursor-pointer grid-cols-1 grid-rows-1 items-center justify-items-start group-data-disabled/slider:cursor-default',\n \"before:absolute before:-z-10 before:[inset-inline:0] before:[inset-block:min(0px,calc((100%_-_48px)/2))] before:content-['']\",\n ],\n segment: [\n 'col-start-1 row-start-1 flex [block-size:var(--m3-slider-track)] items-center overflow-hidden',\n 'data-[tone=active]:bg-[var(--_md-comp-slider-active-track-color)]',\n 'data-[tone=inactive]:bg-[var(--_md-comp-slider-inactive-track-color)]',\n 'group-data-disabled/slider:data-[tone=active]:bg-on-surface/38',\n 'group-data-disabled/slider:data-[tone=inactive]:bg-on-surface/12',\n // Forced colours: tracks, stops and the handle are backgrounds, which forced colours\n // drop, so they take system colours: the active track `Highlight`, the inactive one an\n // outlined `Canvas` track, `GrayText` when disabled.\n 'forced-colors:forced-color-adjust-none',\n 'forced-colors:data-[tone=active]:bg-[Highlight]!',\n 'forced-colors:data-[tone=inactive]:bg-[Canvas]! forced-colors:data-[tone=inactive]:border forced-colors:data-[tone=inactive]:border-solid forced-colors:data-[tone=inactive]:border-[CanvasText]',\n 'forced-colors:group-data-disabled/slider:data-[tone=active]:bg-[GrayText]!',\n 'forced-colors:group-data-disabled/slider:data-[tone=inactive]:border-[GrayText]',\n ],\n // Stop indicators follow the live m3.material.io token table (2026-10-13): on the active\n // track `on-primary`, on the inactive track `on-secondary-container`; disabled,\n // `inverse-on-surface` and `on-surface` at the table's 0.38 disabled stop opacity.\n stop: [\n 'size-[4px] shrink-0 rounded-full',\n 'in-data-[tone=active]:bg-on-primary',\n 'in-data-[tone=inactive]:bg-[var(--_md-comp-slider-stop-indicator-color)]',\n 'group-data-disabled/slider:in-data-[tone=active]:bg-inverse-on-surface',\n 'group-data-disabled/slider:in-data-[tone=inactive]:bg-on-surface/38',\n 'forced-colors:in-data-[tone=active]:bg-[HighlightText]! forced-colors:in-data-[tone=inactive]:bg-[CanvasText]!',\n 'forced-colors:group-data-disabled/slider:in-data-[tone=active]:bg-[Canvas]! forced-colors:group-data-disabled/slider:in-data-[tone=inactive]:bg-[GrayText]!',\n ],\n tick: [\n 'col-start-1 row-start-1 size-[4px] rounded-full',\n 'data-active:bg-on-primary not-data-active:bg-[var(--_md-comp-slider-stop-indicator-color)]',\n 'group-data-disabled/slider:data-active:bg-inverse-on-surface',\n 'group-data-disabled/slider:not-data-active:bg-on-surface/38',\n 'forced-colors:forced-color-adjust-none',\n 'forced-colors:data-active:bg-[HighlightText]! forced-colors:not-data-active:bg-[CanvasText]!',\n 'forced-colors:group-data-disabled/slider:data-active:bg-[Canvas]! forced-colors:group-data-disabled/slider:not-data-active:bg-[GrayText]!',\n ],\n icon: [\n 'flex shrink-0 items-center justify-center overflow-hidden',\n 'in-data-[tone=active]:text-on-primary in-data-[tone=inactive]:text-on-secondary-container',\n 'forced-colors:in-data-[tone=active]:text-[HighlightText]! forced-colors:in-data-[tone=inactive]:text-[CanvasText]!',\n '[&>svg]:[block-size:var(--m3-slider-icon)] [&>svg]:[inline-size:var(--m3-slider-icon)] [&>svg]:shrink-0',\n ],\n // The start icon, moved to the inactive track while the active one is too short for it.\n movedIcon: [\n 'col-start-1 row-start-1 flex shrink-0 items-center justify-center overflow-hidden',\n 'text-on-secondary-container forced-colors:forced-color-adjust-none forced-colors:text-[CanvasText]!',\n '[&>svg]:[block-size:var(--m3-slider-icon)] [&>svg]:[inline-size:var(--m3-slider-icon)] [&>svg]:shrink-0',\n ],\n thumb: [\n 'col-start-1 row-start-1 flex [inline-size:4px] [block-size:var(--m3-slider-handle)] cursor-pointer justify-center',\n 'rounded-full focus-ring group-data-disabled/slider:cursor-default',\n ],\n handle: [\n '[inline-size:4px] [block-size:100%] rounded-full bg-[var(--_md-comp-slider-handle-color)]',\n 'data-active:[inline-size:2px]',\n 'group-data-disabled/slider:bg-[color-mix(in_srgb,var(--md-sys-color-on-surface)_38%,var(--md-sys-color-surface))]',\n 'forced-colors:forced-color-adjust-none forced-colors:bg-[CanvasText]! forced-colors:group-data-disabled/slider:bg-[GrayText]!',\n ],\n // A zero-size box at the thumb that the value indicator hangs from.\n // It sits 12px before the row's block start (above, or left of a vertical slider).\n labelAnchor:\n 'col-start-1 row-start-1 flex [inline-size:0] [block-size:0] items-end justify-center self-start [margin-block-start:-12px]',\n label: [\n 'flex h-[44px] min-w-[48px] items-center justify-center rounded-full ps-[16px] pe-[16px]',\n 'bg-[var(--_md-comp-slider-value-indicator-container-color)] text-label-large whitespace-nowrap',\n 'text-[color:var(--_md-comp-slider-value-indicator-label-label-text-color)]',\n '[direction:ltr] [writing-mode:horizontal-tb]',\n // Forced colours repaint the pill as `Canvas`; an outline gives it its edge.\n 'forced-colors:outline forced-colors:outline-1 forced-colors:outline-solid forced-colors:outline-[CanvasText]',\n ],\n },\n variants: {\n orientation: {\n horizontal: {\n // A swipe across the slider scrolls the page (Compose drags only along the track).\n root: 'h-(--m3-slider-handle) w-full touch-pan-y flex-row items-center',\n track: 'ms-[2px] me-[2px] self-stretch',\n },\n vertical: {\n root: 'h-[240px] w-(--m3-slider-handle) touch-pan-x flex-col items-center',\n // Inline axis runs bottom-to-top, so the geometry and logical properties carry over.\n track: 'mt-[2px] mb-[2px] self-stretch [direction:rtl] [writing-mode:vertical-lr]',\n },\n },\n size: {\n xs: { root: '[--m3-slider-track:16px] [--m3-slider-corner:8px] [--m3-slider-handle:44px]' },\n sm: { root: '[--m3-slider-track:24px] [--m3-slider-corner:8px] [--m3-slider-handle:44px]' },\n md: {\n root: '[--m3-slider-track:40px] [--m3-slider-corner:12px] [--m3-slider-handle:52px] [--m3-slider-icon:24px]',\n },\n lg: {\n root: '[--m3-slider-track:56px] [--m3-slider-corner:16px] [--m3-slider-handle:68px] [--m3-slider-icon:24px]',\n },\n xl: {\n root: '[--m3-slider-track:96px] [--m3-slider-corner:28px] [--m3-slider-handle:108px] [--m3-slider-icon:32px]',\n },\n },\n },\n defaultVariants: { orientation: 'horizontal', size: 'xs' },\n});\n\n/**\n * The variants of {@link sliderStyles}, 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 SliderStyleProps = VariantProps<typeof sliderStyles>;\nexport type SliderSize = NonNullable<SliderStyleProps['size']>;\nexport type SliderOrientation = NonNullable<SliderStyleProps['orientation']>;\n"],"mappings":";;;AAoCA,MAAa,eAAe,GAAG;CAC7B,OAAO;EACL,MAAM;GACJ;GACA;GACA;GACA;EACF;EAKA,OAAO,CACL,kJACA,8HACF;EACA,SAAS;GACP;GACA;GACA;GACA;GACA;GAIA;GACA;GACA;GACA;GACA;EACF;EAIA,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,MAAM;GACJ;GACA;GACA;GACA;EACF;EAEA,WAAW;GACT;GACA;GACA;EACF;EACA,OAAO,CACL,qHACA,mEACF;EACA,QAAQ;GACN;GACA;GACA;GACA;EACF;EAGA,aACE;EACF,OAAO;GACL;GACA;GACA;GACA;GAEA;EACF;CACF;CACA,UAAU;EACR,aAAa;GACX,YAAY;IAEV,MAAM;IACN,OAAO;GACT;GACA,UAAU;IACR,MAAM;IAEN,OAAO;GACT;EACF;EACA,MAAM;GACJ,IAAI,EAAE,MAAM,8EAA8E;GAC1F,IAAI,EAAE,MAAM,8EAA8E;GAC1F,IAAI,EACF,MAAM,uGACR;GACA,IAAI,EACF,MAAM,uGACR;GACA,IAAI,EACF,MAAM,wGACR;EACF;CACF;CACA,iBAAiB;EAAE,aAAa;EAAc,MAAM;CAAK;AAC3D,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ComponentTokenSet } from "../../tokens/component.js";
2
+ import "../../index.js";
3
+ //#region src/components/slider/slider-tokens.d.ts
4
+ /** The tokens of {@link Slider} and {@link RangeSlider}: `--md-comp-slider-<part>`. */
5
+ export declare const sliderTokenSet: ComponentTokenSet<"stop-indicator-color" | "active-track-color" | "inactive-track-color" | "handle-color" | "value-indicator-container-color" | "value-indicator-label-label-text-color">;
6
+ //#endregion
7
+ //# sourceMappingURL=slider-tokens.d.ts.map
@@ -0,0 +1,66 @@
1
+ import { color, defineComponentTokens } from "../../tokens/component.js";
2
+ //#region src/components/slider/slider-tokens.ts
3
+ /** The tokens of {@link Slider} and {@link RangeSlider}: `--md-comp-slider-<part>`. */
4
+ const sliderTokenSet = defineComponentTokens({
5
+ name: "md-comp-slider",
6
+ tokens: {
7
+ "active-track-color": {
8
+ value: color("primary"),
9
+ description: "The track between the start (or the other thumb) and the handle.",
10
+ compose: "SliderTokens.ActiveTrackColor",
11
+ paints: {
12
+ property: "background-color",
13
+ slot: "active-track"
14
+ }
15
+ },
16
+ "inactive-track-color": {
17
+ value: color("secondary-container"),
18
+ description: "The rest of the track.",
19
+ compose: "SliderTokens.InactiveTrackColor",
20
+ paints: {
21
+ property: "background-color",
22
+ slot: "inactive-track"
23
+ }
24
+ },
25
+ "handle-color": {
26
+ value: color("primary"),
27
+ description: "The handle.",
28
+ compose: "SliderTokens.HandleColor",
29
+ paints: {
30
+ property: "background-color",
31
+ slot: "handle"
32
+ }
33
+ },
34
+ "stop-indicator-color": {
35
+ value: color("on-secondary-container"),
36
+ description: "The stop indicators and tick marks on the inactive track.",
37
+ compose: "SliderTokens.StopIndicatorColor",
38
+ paints: {
39
+ property: "background-color",
40
+ slot: "stop-indicator"
41
+ }
42
+ },
43
+ "value-indicator-container-color": {
44
+ value: color("inverse-surface"),
45
+ description: "The value indicator’s container.",
46
+ compose: "SliderTokens.ValueIndicatorContainerColor",
47
+ paints: {
48
+ property: "background-color",
49
+ slot: "value-indicator"
50
+ }
51
+ },
52
+ "value-indicator-label-label-text-color": {
53
+ value: color("inverse-on-surface"),
54
+ description: "The value indicator’s text.",
55
+ compose: "SliderTokens.ValueIndicatorLabelTextColor",
56
+ paints: {
57
+ property: "color",
58
+ slot: "value-indicator"
59
+ }
60
+ }
61
+ }
62
+ });
63
+ //#endregion
64
+ export { sliderTokenSet };
65
+
66
+ //# sourceMappingURL=slider-tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slider-tokens.js","names":[],"sources":["../../../src/components/slider/slider-tokens.ts"],"sourcesContent":["import { color, defineComponentTokens } from '../../tokens/component';\n\n/*\n * The slider's component tokens, M3's `md.comp.slider.*` names (checked against\n * m3.material.io's token tables, 2026-10-14), with Compose's SliderTokens defaults. One set\n * for every size and both orientations. Disabled values, the stop indicators on the active\n * track and the inset icons stay classes.\n */\n\n/** The tokens of {@link Slider} and {@link RangeSlider}: `--md-comp-slider-<part>`. */\nexport const sliderTokenSet = defineComponentTokens({\n name: 'md-comp-slider',\n tokens: {\n 'active-track-color': {\n value: color('primary'),\n description: 'The track between the start (or the other thumb) and the handle.',\n compose: 'SliderTokens.ActiveTrackColor',\n paints: { property: 'background-color', slot: 'active-track' },\n },\n 'inactive-track-color': {\n value: color('secondary-container'),\n description: 'The rest of the track.',\n compose: 'SliderTokens.InactiveTrackColor',\n paints: { property: 'background-color', slot: 'inactive-track' },\n },\n 'handle-color': {\n value: color('primary'),\n description: 'The handle.',\n compose: 'SliderTokens.HandleColor',\n paints: { property: 'background-color', slot: 'handle' },\n },\n 'stop-indicator-color': {\n value: color('on-secondary-container'),\n description: 'The stop indicators and tick marks on the inactive track.',\n compose: 'SliderTokens.StopIndicatorColor',\n paints: { property: 'background-color', slot: 'stop-indicator' },\n },\n 'value-indicator-container-color': {\n value: color('inverse-surface'),\n description: 'The value indicator’s container.',\n compose: 'SliderTokens.ValueIndicatorContainerColor',\n paints: { property: 'background-color', slot: 'value-indicator' },\n },\n 'value-indicator-label-label-text-color': {\n value: color('inverse-on-surface'),\n description: 'The value indicator’s text.',\n compose: 'SliderTokens.ValueIndicatorLabelTextColor',\n paints: { property: 'color', slot: 'value-indicator' },\n },\n },\n});\n"],"mappings":";;;AAUA,MAAa,iBAAiB,sBAAsB;CAClD,MAAM;CACN,QAAQ;EACN,sBAAsB;GACpB,OAAO,MAAM,SAAS;GACtB,aAAa;GACb,SAAS;GACT,QAAQ;IAAE,UAAU;IAAoB,MAAM;GAAe;EAC/D;EACA,wBAAwB;GACtB,OAAO,MAAM,qBAAqB;GAClC,aAAa;GACb,SAAS;GACT,QAAQ;IAAE,UAAU;IAAoB,MAAM;GAAiB;EACjE;EACA,gBAAgB;GACd,OAAO,MAAM,SAAS;GACtB,aAAa;GACb,SAAS;GACT,QAAQ;IAAE,UAAU;IAAoB,MAAM;GAAS;EACzD;EACA,wBAAwB;GACtB,OAAO,MAAM,wBAAwB;GACrC,aAAa;GACb,SAAS;GACT,QAAQ;IAAE,UAAU;IAAoB,MAAM;GAAiB;EACjE;EACA,mCAAmC;GACjC,OAAO,MAAM,iBAAiB;GAC9B,aAAa;GACb,SAAS;GACT,QAAQ;IAAE,UAAU;IAAoB,MAAM;GAAkB;EAClE;EACA,0CAA0C;GACxC,OAAO,MAAM,oBAAoB;GACjC,aAAa;GACb,SAAS;GACT,QAAQ;IAAE,UAAU;IAAS,MAAM;GAAkB;EACvD;CACF;AACF,CAAC"}
@@ -0,0 +1,138 @@
1
+ "use client";
2
+ import { useEffect, useRef } from "react";
3
+ /** The thumb nearest to `value`, picked as React Aria's track press picks it. */
4
+ function closestThumb(state, value) {
5
+ const split = state.values.findIndex((v) => value - v < 0);
6
+ if (split === 0) return 0;
7
+ if (split === -1) return state.values.length - 1;
8
+ const before = state.values[split - 1];
9
+ const after = state.values[split];
10
+ return Math.abs(before - value) < Math.abs(after - value) ? split - 1 : split;
11
+ }
12
+ /**
13
+ * Touch and pen presses on a slider's track, as Compose's slider takes them
14
+ * (`Slider.kt`: `draggable(orientation)` and a tap that sets the value on release).
15
+ * React Aria sets the value on pointer down and claims every move, so a vertical swipe that
16
+ * started on a horizontal slider changed its value and never scrolled the page. Here a touch
17
+ * changes nothing until it either lifts (a tap: the nearest thumb jumps there) or moves
18
+ * `TOUCH_SLOP` along the track (a drag: the nearest thumb follows the finger). A swipe across
19
+ * the track is left to the browser, which scrolls (the slider's `touch-action` allows the
20
+ * cross axis) and cancels the pointer. Mouse presses keep React Aria's handling.
21
+ *
22
+ * With drawn stops (`discrete`), every press, the mouse's too, maps through the corner inset
23
+ * the stops and thumb are drawn with (`(offset − corner) / (length − 2 × corner)`), so a tap
24
+ * on a drawn stop selects that stop: React Aria's linear mapping picked the next one near the
25
+ * ends of a large slider, whose corners are wider than half a step (2026-10-17).
26
+ *
27
+ * Returns handlers that wrap React Aria's `trackProps`.
28
+ */
29
+ function useTouchTrack(trackProps, { state, trackRef, orientation, direction, disabled, discrete = false }) {
30
+ const vertical = orientation === "vertical";
31
+ const cleanup = useRef(null);
32
+ useEffect(() => () => cleanup.current?.(), []);
33
+ /** The track's corner in px (`--m3-slider-corner`, which a token may set as any length). */
34
+ const cornerOf = (track) => {
35
+ if (!discrete) return 0;
36
+ const probe = track.ownerDocument.createElement("div");
37
+ probe.style.cssText = "position:absolute;visibility:hidden;width:var(--m3-slider-corner)";
38
+ track.append(probe);
39
+ const corner = probe.getBoundingClientRect().width;
40
+ probe.remove();
41
+ return corner;
42
+ };
43
+ const percentAt = (clientX, clientY, corner) => {
44
+ const rect = trackRef.current.getBoundingClientRect();
45
+ const size = vertical ? rect.height : rect.width;
46
+ const offset = vertical ? rect.bottom - clientY : direction === "rtl" ? rect.right - clientX : clientX - rect.left;
47
+ const span = size - 2 * corner;
48
+ const percent = span > 0 ? (offset - corner) / span : 0;
49
+ return Math.min(1, Math.max(0, percent));
50
+ };
51
+ const onPointerDown = (event) => {
52
+ const mouse = event.pointerType === "mouse";
53
+ const onThumb = event.target.closest?.("[data-thumb]");
54
+ if (mouse && (!discrete || event.button !== 0) || onThumb || disabled || !trackRef.current || state.values.some((_, index) => state.isThumbDragging(index))) {
55
+ trackProps.onPointerDown?.(event);
56
+ return;
57
+ }
58
+ event.preventDefault();
59
+ cleanup.current?.();
60
+ const { pointerId, clientX: startX, clientY: startY } = event;
61
+ const track = trackRef.current;
62
+ const corner = cornerOf(track);
63
+ let dragging = null;
64
+ const startDragging = (index, percent) => {
65
+ dragging = index;
66
+ try {
67
+ track.setPointerCapture(pointerId);
68
+ } catch {}
69
+ state.setFocusedThumb(index);
70
+ state.setThumbDragging(index, true);
71
+ state.setThumbPercent(index, percent);
72
+ };
73
+ if (mouse) {
74
+ const percent = percentAt(startX, startY, corner);
75
+ const index = closestThumb(state, state.getPercentValue(percent));
76
+ if (!state.isThumbEditable(index)) return;
77
+ startDragging(index, percent);
78
+ }
79
+ const move = (e) => {
80
+ if (e.pointerId !== pointerId) return;
81
+ if (dragging === null) {
82
+ const along = Math.abs(vertical ? e.clientY - startY : e.clientX - startX);
83
+ const across = Math.abs(vertical ? e.clientX - startX : e.clientY - startY);
84
+ if (across >= 8 && across >= along) return end();
85
+ if (along < 8 || along <= across) return;
86
+ const percent = percentAt(e.clientX, e.clientY, corner);
87
+ const index = closestThumb(state, state.getPercentValue(percent));
88
+ if (!state.isThumbEditable(index)) return end();
89
+ startDragging(index, percent);
90
+ return;
91
+ }
92
+ state.setThumbPercent(dragging, percentAt(e.clientX, e.clientY, corner));
93
+ };
94
+ const up = (e) => {
95
+ if (e.pointerId !== pointerId) return;
96
+ if (dragging !== null) state.setThumbDragging(dragging, false);
97
+ else {
98
+ const value = state.getPercentValue(percentAt(e.clientX, e.clientY, corner));
99
+ const index = closestThumb(state, value);
100
+ if (state.isThumbEditable(index)) {
101
+ state.setFocusedThumb(index);
102
+ state.setThumbDragging(index, true);
103
+ state.setThumbValue(index, value);
104
+ state.setThumbDragging(index, false);
105
+ }
106
+ }
107
+ end();
108
+ };
109
+ const cancel = (e) => {
110
+ if (e.pointerId !== pointerId) return;
111
+ if (dragging !== null) state.setThumbDragging(dragging, false);
112
+ end();
113
+ };
114
+ function end() {
115
+ window.removeEventListener("pointermove", move);
116
+ window.removeEventListener("pointerup", up);
117
+ window.removeEventListener("pointercancel", cancel);
118
+ cleanup.current = null;
119
+ }
120
+ window.addEventListener("pointermove", move);
121
+ window.addEventListener("pointerup", up);
122
+ window.addEventListener("pointercancel", cancel);
123
+ cleanup.current = end;
124
+ };
125
+ return {
126
+ ...trackProps,
127
+ onPointerDown,
128
+ onTouchStart: typeof PointerEvent === "undefined" ? trackProps.onTouchStart : void 0,
129
+ style: {
130
+ ...trackProps.style,
131
+ touchAction: vertical ? "pan-x" : "pan-y"
132
+ }
133
+ };
134
+ }
135
+ //#endregion
136
+ export { useTouchTrack };
137
+
138
+ //# sourceMappingURL=use-touch-track.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-touch-track.js","names":[],"sources":["../../../src/components/slider/use-touch-track.ts"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef, type HTMLAttributes, type PointerEvent, type RefObject } from 'react';\nimport type { SliderState } from 'react-stately';\n\n/** How far a touch moves along the track before it drags the slider (Android's touch slop). */\nexport const TOUCH_SLOP = 8;\n\ninterface TouchTrackOptions {\n state: SliderState;\n trackRef: RefObject<HTMLElement | null>;\n orientation: 'horizontal' | 'vertical';\n direction: 'ltr' | 'rtl';\n disabled: boolean;\n /**\n * A discrete slider with drawn stops (`ticks`): its values are spread between the track's\n * corners (`positionOf`), so a press maps back through the same inset.\n */\n discrete?: boolean;\n}\n\n/** The thumb nearest to `value`, picked as React Aria's track press picks it. */\nfunction closestThumb(state: SliderState, value: number): number {\n const split = state.values.findIndex((v) => value - v < 0);\n if (split === 0) return 0;\n if (split === -1) return state.values.length - 1;\n const before = state.values[split - 1]!;\n const after = state.values[split]!;\n return Math.abs(before - value) < Math.abs(after - value) ? split - 1 : split;\n}\n\n/**\n * Touch and pen presses on a slider's track, as Compose's slider takes them\n * (`Slider.kt`: `draggable(orientation)` and a tap that sets the value on release).\n * React Aria sets the value on pointer down and claims every move, so a vertical swipe that\n * started on a horizontal slider changed its value and never scrolled the page. Here a touch\n * changes nothing until it either lifts (a tap: the nearest thumb jumps there) or moves\n * `TOUCH_SLOP` along the track (a drag: the nearest thumb follows the finger). A swipe across\n * the track is left to the browser, which scrolls (the slider's `touch-action` allows the\n * cross axis) and cancels the pointer. Mouse presses keep React Aria's handling.\n *\n * With drawn stops (`discrete`), every press, the mouse's too, maps through the corner inset\n * the stops and thumb are drawn with (`(offset − corner) / (length − 2 × corner)`), so a tap\n * on a drawn stop selects that stop: React Aria's linear mapping picked the next one near the\n * ends of a large slider, whose corners are wider than half a step (2026-10-17).\n *\n * Returns handlers that wrap React Aria's `trackProps`.\n */\nexport function useTouchTrack(\n trackProps: HTMLAttributes<HTMLElement>,\n { state, trackRef, orientation, direction, disabled, discrete = false }: TouchTrackOptions,\n): HTMLAttributes<HTMLElement> {\n const vertical = orientation === 'vertical';\n const cleanup = useRef<(() => void) | null>(null);\n useEffect(() => () => cleanup.current?.(), []);\n\n /** The track's corner in px (`--m3-slider-corner`, which a token may set as any length). */\n const cornerOf = (track: HTMLElement) => {\n if (!discrete) return 0;\n const probe = track.ownerDocument.createElement('div');\n probe.style.cssText = 'position:absolute;visibility:hidden;width:var(--m3-slider-corner)';\n track.append(probe);\n const corner = probe.getBoundingClientRect().width;\n probe.remove();\n return corner;\n };\n\n const percentAt = (clientX: number, clientY: number, corner: number) => {\n const rect = trackRef.current!.getBoundingClientRect();\n const size = vertical ? rect.height : rect.width;\n // Along the track from its minimum end.\n const offset = vertical\n ? rect.bottom - clientY\n : direction === 'rtl'\n ? rect.right - clientX\n : clientX - rect.left;\n const span = size - 2 * corner;\n const percent = span > 0 ? (offset - corner) / span : 0;\n return Math.min(1, Math.max(0, percent));\n };\n\n const onPointerDown = (event: PointerEvent<HTMLElement>) => {\n const mouse = event.pointerType === 'mouse';\n // A press on a thumb drags that thumb (React Aria's thumb handling).\n const onThumb = (event.target as Element).closest?.('[data-thumb]');\n if (\n (mouse && (!discrete || event.button !== 0)) ||\n onThumb ||\n disabled ||\n !trackRef.current ||\n state.values.some((_, index) => state.isThumbDragging(index))\n ) {\n trackProps.onPointerDown?.(event);\n return;\n }\n // No compatibility mouse events (React Aria's `onMouseDown` would set the value);\n // `touch-action` still lets the browser scroll.\n event.preventDefault();\n cleanup.current?.();\n const { pointerId, clientX: startX, clientY: startY } = event;\n const track = trackRef.current;\n const corner = cornerOf(track);\n let dragging: number | null = null;\n const startDragging = (index: number, percent: number) => {\n dragging = index;\n try {\n track.setPointerCapture(pointerId);\n } catch {\n // The pointer may already be gone.\n }\n state.setFocusedThumb(index);\n state.setThumbDragging(index, true);\n state.setThumbPercent(index, percent);\n };\n // The mouse (on a discrete slider) sets the value as it goes down and drags from there,\n // as React Aria does; a touch waits to tell a tap, a drag and a scroll apart.\n if (mouse) {\n const percent = percentAt(startX, startY, corner);\n const index = closestThumb(state, state.getPercentValue(percent));\n if (!state.isThumbEditable(index)) return;\n startDragging(index, percent);\n }\n\n const move = (e: globalThis.PointerEvent) => {\n if (e.pointerId !== pointerId) return;\n if (dragging === null) {\n const along = Math.abs(vertical ? e.clientY - startY : e.clientX - startX);\n const across = Math.abs(vertical ? e.clientX - startX : e.clientY - startY);\n // A move across the track belongs to the page (or a sheet the slider sits in): it's\n // no longer a tap either.\n if (across >= TOUCH_SLOP && across >= along) return end();\n if (along < TOUCH_SLOP || along <= across) return;\n const percent = percentAt(e.clientX, e.clientY, corner);\n const index = closestThumb(state, state.getPercentValue(percent));\n if (!state.isThumbEditable(index)) return end();\n startDragging(index, percent);\n return;\n }\n state.setThumbPercent(dragging, percentAt(e.clientX, e.clientY, corner));\n };\n const up = (e: globalThis.PointerEvent) => {\n if (e.pointerId !== pointerId) return;\n if (dragging !== null) {\n state.setThumbDragging(dragging, false);\n } else {\n // A tap: the nearest thumb jumps to it on release.\n const value = state.getPercentValue(percentAt(e.clientX, e.clientY, corner));\n const index = closestThumb(state, value);\n if (state.isThumbEditable(index)) {\n state.setFocusedThumb(index);\n state.setThumbDragging(index, true);\n state.setThumbValue(index, value);\n state.setThumbDragging(index, false);\n }\n }\n end();\n };\n // The browser took the touch to scroll: nothing changes.\n const cancel = (e: globalThis.PointerEvent) => {\n if (e.pointerId !== pointerId) return;\n if (dragging !== null) state.setThumbDragging(dragging, false);\n end();\n };\n function end() {\n window.removeEventListener('pointermove', move);\n window.removeEventListener('pointerup', up);\n window.removeEventListener('pointercancel', cancel);\n cleanup.current = null;\n }\n window.addEventListener('pointermove', move);\n window.addEventListener('pointerup', up);\n window.addEventListener('pointercancel', cancel);\n cleanup.current = end;\n };\n\n return {\n ...trackProps,\n onPointerDown,\n // Touches arrive as pointer events; React Aria's touch handler would set the value on\n // touch start.\n onTouchStart: typeof PointerEvent === 'undefined' ? trackProps.onTouchStart : undefined,\n style: { ...trackProps.style, touchAction: vertical ? 'pan-x' : 'pan-y' },\n };\n}\n"],"mappings":";;;AAsBA,SAAS,aAAa,OAAoB,OAAuB;CAC/D,MAAM,QAAQ,MAAM,OAAO,WAAW,MAAM,QAAQ,IAAI,CAAC;CACzD,IAAI,UAAU,GAAG,OAAO;CACxB,IAAI,UAAU,IAAI,OAAO,MAAM,OAAO,SAAS;CAC/C,MAAM,SAAS,MAAM,OAAO,QAAQ;CACpC,MAAM,QAAQ,MAAM,OAAO;CAC3B,OAAO,KAAK,IAAI,SAAS,KAAK,IAAI,KAAK,IAAI,QAAQ,KAAK,IAAI,QAAQ,IAAI;AAC1E;;;;;;;;;;;;;;;;;;AAmBA,SAAgB,cACd,YACA,EAAE,OAAO,UAAU,aAAa,WAAW,UAAU,WAAW,SACnC;CAC7B,MAAM,WAAW,gBAAgB;CACjC,MAAM,UAAU,OAA4B,IAAI;CAChD,sBAAsB,QAAQ,UAAU,GAAG,CAAC,CAAC;;CAG7C,MAAM,YAAY,UAAuB;EACvC,IAAI,CAAC,UAAU,OAAO;EACtB,MAAM,QAAQ,MAAM,cAAc,cAAc,KAAK;EACrD,MAAM,MAAM,UAAU;EACtB,MAAM,OAAO,KAAK;EAClB,MAAM,SAAS,MAAM,sBAAsB,CAAC,CAAC;EAC7C,MAAM,OAAO;EACb,OAAO;CACT;CAEA,MAAM,aAAa,SAAiB,SAAiB,WAAmB;EACtE,MAAM,OAAO,SAAS,QAAS,sBAAsB;EACrD,MAAM,OAAO,WAAW,KAAK,SAAS,KAAK;EAE3C,MAAM,SAAS,WACX,KAAK,SAAS,UACd,cAAc,QACZ,KAAK,QAAQ,UACb,UAAU,KAAK;EACrB,MAAM,OAAO,OAAO,IAAI;EACxB,MAAM,UAAU,OAAO,KAAK,SAAS,UAAU,OAAO;EACtD,OAAO,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,OAAO,CAAC;CACzC;CAEA,MAAM,iBAAiB,UAAqC;EAC1D,MAAM,QAAQ,MAAM,gBAAgB;EAEpC,MAAM,UAAW,MAAM,OAAmB,UAAU,cAAc;EAClE,IACG,UAAU,CAAC,YAAY,MAAM,WAAW,MACzC,WACA,YACA,CAAC,SAAS,WACV,MAAM,OAAO,MAAM,GAAG,UAAU,MAAM,gBAAgB,KAAK,CAAC,GAC5D;GACA,WAAW,gBAAgB,KAAK;GAChC;EACF;EAGA,MAAM,eAAe;EACrB,QAAQ,UAAU;EAClB,MAAM,EAAE,WAAW,SAAS,QAAQ,SAAS,WAAW;EACxD,MAAM,QAAQ,SAAS;EACvB,MAAM,SAAS,SAAS,KAAK;EAC7B,IAAI,WAA0B;EAC9B,MAAM,iBAAiB,OAAe,YAAoB;GACxD,WAAW;GACX,IAAI;IACF,MAAM,kBAAkB,SAAS;GACnC,QAAQ,CAER;GACA,MAAM,gBAAgB,KAAK;GAC3B,MAAM,iBAAiB,OAAO,IAAI;GAClC,MAAM,gBAAgB,OAAO,OAAO;EACtC;EAGA,IAAI,OAAO;GACT,MAAM,UAAU,UAAU,QAAQ,QAAQ,MAAM;GAChD,MAAM,QAAQ,aAAa,OAAO,MAAM,gBAAgB,OAAO,CAAC;GAChE,IAAI,CAAC,MAAM,gBAAgB,KAAK,GAAG;GACnC,cAAc,OAAO,OAAO;EAC9B;EAEA,MAAM,QAAQ,MAA+B;GAC3C,IAAI,EAAE,cAAc,WAAW;GAC/B,IAAI,aAAa,MAAM;IACrB,MAAM,QAAQ,KAAK,IAAI,WAAW,EAAE,UAAU,SAAS,EAAE,UAAU,MAAM;IACzE,MAAM,SAAS,KAAK,IAAI,WAAW,EAAE,UAAU,SAAS,EAAE,UAAU,MAAM;IAG1E,IAAI,UAAA,KAAwB,UAAU,OAAO,OAAO,IAAI;IACxD,IAAI,QAAA,KAAsB,SAAS,QAAQ;IAC3C,MAAM,UAAU,UAAU,EAAE,SAAS,EAAE,SAAS,MAAM;IACtD,MAAM,QAAQ,aAAa,OAAO,MAAM,gBAAgB,OAAO,CAAC;IAChE,IAAI,CAAC,MAAM,gBAAgB,KAAK,GAAG,OAAO,IAAI;IAC9C,cAAc,OAAO,OAAO;IAC5B;GACF;GACA,MAAM,gBAAgB,UAAU,UAAU,EAAE,SAAS,EAAE,SAAS,MAAM,CAAC;EACzE;EACA,MAAM,MAAM,MAA+B;GACzC,IAAI,EAAE,cAAc,WAAW;GAC/B,IAAI,aAAa,MACf,MAAM,iBAAiB,UAAU,KAAK;QACjC;IAEL,MAAM,QAAQ,MAAM,gBAAgB,UAAU,EAAE,SAAS,EAAE,SAAS,MAAM,CAAC;IAC3E,MAAM,QAAQ,aAAa,OAAO,KAAK;IACvC,IAAI,MAAM,gBAAgB,KAAK,GAAG;KAChC,MAAM,gBAAgB,KAAK;KAC3B,MAAM,iBAAiB,OAAO,IAAI;KAClC,MAAM,cAAc,OAAO,KAAK;KAChC,MAAM,iBAAiB,OAAO,KAAK;IACrC;GACF;GACA,IAAI;EACN;EAEA,MAAM,UAAU,MAA+B;GAC7C,IAAI,EAAE,cAAc,WAAW;GAC/B,IAAI,aAAa,MAAM,MAAM,iBAAiB,UAAU,KAAK;GAC7D,IAAI;EACN;EACA,SAAS,MAAM;GACb,OAAO,oBAAoB,eAAe,IAAI;GAC9C,OAAO,oBAAoB,aAAa,EAAE;GAC1C,OAAO,oBAAoB,iBAAiB,MAAM;GAClD,QAAQ,UAAU;EACpB;EACA,OAAO,iBAAiB,eAAe,IAAI;EAC3C,OAAO,iBAAiB,aAAa,EAAE;EACvC,OAAO,iBAAiB,iBAAiB,MAAM;EAC/C,QAAQ,UAAU;CACpB;CAEA,OAAO;EACL,GAAG;EACH;EAGA,cAAc,OAAO,iBAAiB,cAAc,WAAW,eAAe,KAAA;EAC9E,OAAO;GAAE,GAAG,WAAW;GAAO,aAAa,WAAW,UAAU;EAAQ;CAC1E;AACF"}
@@ -0,0 +1,96 @@
1
+ import { SnackbarData, SnackbarHostState } from "./snackbar-state.js";
2
+ import { ComponentPropsWithRef } from "react";
3
+ //#region src/components/snackbar/Snackbar.d.ts
4
+ export interface SnackbarClassNames {
5
+ /** The snackbar's container. */
6
+ root?: string;
7
+ /** The message text. */
8
+ message?: string;
9
+ /** The row holding the action and dismiss buttons. */
10
+ actions?: string;
11
+ /** The action button. */
12
+ action?: string;
13
+ /** The dismiss (×) button. */
14
+ dismiss?: string;
15
+ }
16
+ export interface SnackbarLabels {
17
+ /** Name of the dismiss (×) button. @default "Dismiss" */
18
+ dismiss: string;
19
+ }
20
+ interface SnackbarOwnProps {
21
+ /** The message. */
22
+ children: React.ReactNode;
23
+ /** Label of the action button. */
24
+ actionLabel?: string;
25
+ /** Called when the action button is pressed. */
26
+ onAction?: () => void;
27
+ /** Shows a dismiss (×) button that calls this. Escape calls it too. */
28
+ onDismiss?: () => void;
29
+ /**
30
+ * Called on Escape while focus is inside, which dismisses a snackbar with or without the ×
31
+ * button. @default onDismiss
32
+ */
33
+ onEscape?: () => void;
34
+ /** Words the snackbar announces, with English defaults. */
35
+ labels?: Partial<SnackbarLabels>;
36
+ /** Put the actions under the message, for long action labels. @default false */
37
+ actionOnNewLine?: boolean;
38
+ /** Classes for each part, by slot. `classNames.root` is merged with `className`. */
39
+ classNames?: SnackbarClassNames;
40
+ }
41
+ export type SnackbarProps = SnackbarOwnProps & Omit<ComponentPropsWithRef<'div'>, keyof SnackbarOwnProps>;
42
+ /**
43
+ * M3 snackbar: a brief message about an app process, with an optional action and dismiss
44
+ * button. Usually shown through a {@link SnackbarHost}; render it directly for custom
45
+ * placement. Escape dismisses it while focus is inside (`onEscape`, or `onDismiss`).
46
+ *
47
+ * Outside a host it announces its message politely itself, when it appears and when the
48
+ * message changes, without moving focus (the host's live region does this inside one).
49
+ *
50
+ * @example
51
+ * <Snackbar actionLabel="Undo" onAction={undo} onDismiss={close}>Message archived</Snackbar>
52
+ */
53
+ export declare function Snackbar({ children, actionLabel, onAction, onDismiss, onEscape, labels: labelsProp, actionOnNewLine, classNames, className, onKeyDown, ...rest }: SnackbarProps): import("react").JSX.Element;
54
+ /** A {@link SnackbarHostState} that lives as long as the component. */
55
+ export declare function useSnackbarHostState(): SnackbarHostState;
56
+ export interface SnackbarHostProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {
57
+ /** The queue of snackbars to show, from `useSnackbarHostState()`. */
58
+ state: SnackbarHostState;
59
+ /** Renders each snackbar; defaults to {@link Snackbar}. */
60
+ snackbar?: (data: SnackbarData) => React.ReactNode;
61
+ /** Words each default snackbar announces, with English defaults. */
62
+ labels?: Partial<SnackbarLabels>;
63
+ /**
64
+ * The key combination that moves focus to a snackbar with actions, as the spec asks for on
65
+ * the web. F6 by default, the key React Aria's toasts take (browsers use it to move between
66
+ * the window's panes): while a snackbar with a control shows, F6 goes to it from anywhere on
67
+ * the page, and pressed again there it stays. Document it where your app lists its
68
+ * shortcuts. `false` turns it off.
69
+ * @default "F6"
70
+ */
71
+ focusShortcut?: string | false;
72
+ }
73
+ /**
74
+ * Shows the snackbars of a {@link SnackbarHostState} one at a time, in a polite live
75
+ * region. Position it with `className` (e.g. `fixed inset-x-0 bottom-0`); a snackbar
76
+ * expands upward from the bottom edge as it enters.
77
+ *
78
+ * - Snackbars without an action leave after 4s (`short`) or 10s (`long`); the timer pauses
79
+ * while the pointer or focus is on the snackbar. On the web, use an auto-dismissing
80
+ * snackbar only alongside inline feedback for the same event: it may be gone before
81
+ * someone reads it. Snackbars with an action stay until acted on or dismissed.
82
+ * - The live region is rendered empty first: a snackbar shown before the host mounts (one
83
+ * at launch) appears once the region has been registered, so it's announced.
84
+ * - `focusShortcut` (F6) moves focus to a snackbar with actions; Escape dismisses it.
85
+ * When it leaves, focus returns to where it was before it entered the snackbar; if that
86
+ * element is gone (an undone row was removed, say), to the control that followed it in
87
+ * the Tab order, or else the one before it.
88
+ *
89
+ * @example
90
+ * const snackbar = useSnackbarHostState();
91
+ * <SnackbarHost state={snackbar} className="fixed inset-x-0 bottom-0" />
92
+ * snackbar.showSnackbar({ message: 'Saved' });
93
+ */
94
+ export declare function SnackbarHost({ state, snackbar, labels, focusShortcut, className, ref, ...rest }: SnackbarHostProps): import("react").JSX.Element;
95
+ //#endregion
96
+ //# sourceMappingURL=Snackbar.d.ts.map