@expressivecss/expressive 0.16.0 → 0.17.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 (384) hide show
  1. package/CHANGELOG.md +306 -1
  2. package/README.md +1 -1
  3. package/dist/css/expressive.css +540 -646
  4. package/dist/css/expressive.css.map +1 -1
  5. package/dist/css/expressive.min.css +1 -1
  6. package/dist/css/expressive.min.css.map +1 -1
  7. package/dist/js/chunks/{chunk-PA7NU5AK.mjs → chunk-26VUH75M.mjs} +6 -3
  8. package/dist/js/chunks/chunk-26VUH75M.mjs.map +7 -0
  9. package/dist/js/chunks/{chunk-NBJAUGPP.mjs → chunk-2LFCOGC3.mjs} +12 -23
  10. package/dist/js/chunks/chunk-2LFCOGC3.mjs.map +7 -0
  11. package/dist/js/chunks/{chunk-OP43LLIC.mjs → chunk-36GELQGX.mjs} +4 -4
  12. package/dist/js/chunks/{chunk-OP43LLIC.mjs.map → chunk-36GELQGX.mjs.map} +2 -2
  13. package/dist/js/chunks/{chunk-EC26RU2D.mjs → chunk-3FKWIRHW.mjs} +6 -2
  14. package/dist/js/chunks/chunk-3FKWIRHW.mjs.map +7 -0
  15. package/dist/js/chunks/{chunk-Y6H2X7ZC.mjs → chunk-3KF65KGL.mjs} +3 -3
  16. package/dist/js/chunks/{chunk-4QUCNFSD.mjs → chunk-3KLZRQZI.mjs} +31 -10
  17. package/dist/js/chunks/chunk-3KLZRQZI.mjs.map +7 -0
  18. package/dist/js/chunks/{chunk-75E5EDJF.mjs → chunk-3XORNED5.mjs} +2 -2
  19. package/dist/js/chunks/{chunk-NNHVANQA.mjs → chunk-4WBGAQN3.mjs} +3 -3
  20. package/dist/js/chunks/{chunk-ZJNLAGY5.mjs → chunk-5F4URJHL.mjs} +2 -2
  21. package/dist/js/chunks/{chunk-ZVLOUDIJ.mjs → chunk-67UNY7RH.mjs} +50 -2
  22. package/dist/js/chunks/chunk-67UNY7RH.mjs.map +7 -0
  23. package/dist/js/chunks/{chunk-P6DRQ6KS.mjs → chunk-7CXNATJS.mjs} +6 -5
  24. package/dist/js/chunks/chunk-7CXNATJS.mjs.map +7 -0
  25. package/dist/js/chunks/{chunk-4TRZ2AER.mjs → chunk-7X44MKEQ.mjs} +15 -14
  26. package/dist/js/chunks/chunk-7X44MKEQ.mjs.map +7 -0
  27. package/dist/js/chunks/{chunk-GWZ76SR4.mjs → chunk-7ZAMOMGY.mjs} +12 -7
  28. package/dist/js/chunks/chunk-7ZAMOMGY.mjs.map +7 -0
  29. package/dist/js/chunks/{chunk-GVZQH2H5.mjs → chunk-AEG6LOAJ.mjs} +2 -2
  30. package/dist/js/chunks/{chunk-Y6TLRA3U.mjs → chunk-AQNFCJJ5.mjs} +27 -21
  31. package/dist/js/chunks/chunk-AQNFCJJ5.mjs.map +7 -0
  32. package/dist/js/chunks/{chunk-OUCHKSAW.mjs → chunk-B55LWKBM.mjs} +16 -4
  33. package/dist/js/chunks/chunk-B55LWKBM.mjs.map +7 -0
  34. package/dist/js/chunks/{chunk-AI73GJKG.mjs → chunk-BB5VXYXT.mjs} +2 -2
  35. package/dist/js/chunks/{chunk-2RLBDFH4.mjs → chunk-BDATLH3H.mjs} +4 -4
  36. package/dist/js/chunks/{chunk-2CS6TITK.mjs → chunk-CWMQOT4O.mjs} +23 -10
  37. package/dist/js/chunks/chunk-CWMQOT4O.mjs.map +7 -0
  38. package/dist/js/chunks/{chunk-ZKWUWBUB.mjs → chunk-CY2CTOVM.mjs} +2 -2
  39. package/dist/js/chunks/{chunk-CSYWKEK3.mjs → chunk-DWA5UYLJ.mjs} +58 -27
  40. package/dist/js/chunks/chunk-DWA5UYLJ.mjs.map +7 -0
  41. package/dist/js/chunks/{chunk-CMGXGYUC.mjs → chunk-EB2V4OKL.mjs} +14 -9
  42. package/dist/js/chunks/chunk-EB2V4OKL.mjs.map +7 -0
  43. package/dist/js/chunks/{chunk-Z4GICXR2.mjs → chunk-EWO662ZC.mjs} +5 -7
  44. package/dist/js/chunks/chunk-EWO662ZC.mjs.map +7 -0
  45. package/dist/js/chunks/{chunk-VGY4M57S.mjs → chunk-F7LAKFMX.mjs} +67 -34
  46. package/dist/js/chunks/chunk-F7LAKFMX.mjs.map +7 -0
  47. package/dist/js/chunks/{chunk-67ZPPKXS.mjs → chunk-FNIIH2LU.mjs} +3 -3
  48. package/dist/js/chunks/chunk-GE3YMFS6.mjs +15 -0
  49. package/dist/js/chunks/chunk-GE3YMFS6.mjs.map +7 -0
  50. package/dist/js/chunks/{chunk-DZYVU75J.mjs → chunk-GFWYMWYN.mjs} +18 -14
  51. package/dist/js/chunks/chunk-GFWYMWYN.mjs.map +7 -0
  52. package/dist/js/chunks/{chunk-3L3QIYLC.mjs → chunk-H5ISU45X.mjs} +8 -6
  53. package/dist/js/chunks/chunk-H5ISU45X.mjs.map +7 -0
  54. package/dist/js/chunks/{chunk-QXKWVHBD.mjs → chunk-H6YIKFAQ.mjs} +67 -46
  55. package/dist/js/chunks/chunk-H6YIKFAQ.mjs.map +7 -0
  56. package/dist/js/chunks/{chunk-KZPSAXIU.mjs → chunk-HEH7E3KO.mjs} +22 -12
  57. package/dist/js/chunks/chunk-HEH7E3KO.mjs.map +7 -0
  58. package/dist/js/chunks/{chunk-T3BNSRP3.mjs → chunk-HQRLBTNM.mjs} +3 -3
  59. package/dist/js/chunks/{chunk-NAC72P7R.mjs → chunk-I2F7MLUU.mjs} +2 -2
  60. package/dist/js/chunks/{chunk-ZM3XBHWV.mjs → chunk-IQOTGGHX.mjs} +86 -35
  61. package/dist/js/chunks/chunk-IQOTGGHX.mjs.map +7 -0
  62. package/dist/js/chunks/{chunk-QACZ6TUP.mjs → chunk-JH3YWKA6.mjs} +5 -4
  63. package/dist/js/chunks/chunk-JH3YWKA6.mjs.map +7 -0
  64. package/dist/js/chunks/chunk-JOLJAYIJ.mjs +7 -0
  65. package/dist/js/chunks/{chunk-4IKVPCSU.mjs.map → chunk-JOLJAYIJ.mjs.map} +1 -1
  66. package/dist/js/chunks/{chunk-BPF3I2MN.mjs → chunk-KOTGMCMI.mjs} +9 -2
  67. package/dist/js/chunks/chunk-KOTGMCMI.mjs.map +7 -0
  68. package/dist/js/chunks/{chunk-ANKFWNWT.mjs → chunk-LC4O5LFS.mjs} +3 -3
  69. package/dist/js/chunks/{chunk-4PIXLDNJ.mjs → chunk-LEF33SCP.mjs} +2 -2
  70. package/dist/js/chunks/{chunk-ILDRRG7T.mjs → chunk-LFORZRPH.mjs} +3 -3
  71. package/dist/js/chunks/{chunk-Z4OARDZ7.mjs → chunk-LWLNV5EC.mjs} +26 -17
  72. package/dist/js/chunks/chunk-LWLNV5EC.mjs.map +7 -0
  73. package/dist/js/chunks/{chunk-WU7XJ4RR.mjs → chunk-LXRHUQAX.mjs} +66 -25
  74. package/dist/js/chunks/chunk-LXRHUQAX.mjs.map +7 -0
  75. package/dist/js/chunks/{chunk-VMY55K2X.mjs → chunk-MA2SZZFB.mjs} +11 -7
  76. package/dist/js/chunks/chunk-MA2SZZFB.mjs.map +7 -0
  77. package/dist/js/chunks/{chunk-VJVQIXHC.mjs → chunk-MDBZAMIV.mjs} +8 -10
  78. package/dist/js/chunks/chunk-MDBZAMIV.mjs.map +7 -0
  79. package/dist/js/chunks/{chunk-4EWGD4V2.mjs → chunk-NODZ5VAD.mjs} +2 -2
  80. package/dist/js/chunks/{chunk-UGJHCHXG.mjs → chunk-O2WJB6TH.mjs} +79 -55
  81. package/dist/js/chunks/chunk-O2WJB6TH.mjs.map +7 -0
  82. package/dist/js/chunks/{chunk-7YZ5CN3V.mjs → chunk-PCABY5BN.mjs} +5 -3
  83. package/dist/js/chunks/chunk-PCABY5BN.mjs.map +7 -0
  84. package/dist/js/chunks/{chunk-X7SDA2J5.mjs → chunk-PWKYVMND.mjs} +9 -5
  85. package/dist/js/chunks/{chunk-X7SDA2J5.mjs.map → chunk-PWKYVMND.mjs.map} +2 -2
  86. package/dist/js/chunks/{chunk-SPPHF7YZ.mjs → chunk-QHZZT7YO.mjs} +35 -14
  87. package/dist/js/chunks/chunk-QHZZT7YO.mjs.map +7 -0
  88. package/dist/js/chunks/{chunk-LDXCC2L3.mjs → chunk-QND56EW2.mjs} +5 -4
  89. package/dist/js/chunks/chunk-QND56EW2.mjs.map +7 -0
  90. package/dist/js/chunks/{chunk-NVQ5EHCU.mjs → chunk-QNODAANY.mjs} +4 -4
  91. package/dist/js/chunks/{chunk-7NLUI3RR.mjs → chunk-QRO5FV3I.mjs} +23 -13
  92. package/dist/js/chunks/chunk-QRO5FV3I.mjs.map +7 -0
  93. package/dist/js/chunks/{chunk-FCNF4GRJ.mjs → chunk-R7A7JRC5.mjs} +6 -11
  94. package/dist/js/chunks/chunk-R7A7JRC5.mjs.map +7 -0
  95. package/dist/js/chunks/{chunk-S23RJ3XY.mjs → chunk-RKG2CBFE.mjs} +4 -16
  96. package/dist/js/chunks/chunk-RKG2CBFE.mjs.map +7 -0
  97. package/dist/js/chunks/{chunk-6FSEUFVW.mjs → chunk-RSNS5OYS.mjs} +6 -6
  98. package/dist/js/chunks/chunk-RSNS5OYS.mjs.map +7 -0
  99. package/dist/js/chunks/{chunk-ROH2HDB4.mjs → chunk-RUDYMEJ3.mjs} +2 -2
  100. package/dist/js/chunks/{chunk-BIGU5RCJ.mjs → chunk-STJR62SU.mjs} +13 -5
  101. package/dist/js/chunks/chunk-STJR62SU.mjs.map +7 -0
  102. package/dist/js/chunks/{chunk-752ADW4M.mjs → chunk-SUSD4UTN.mjs} +27 -32
  103. package/dist/js/chunks/chunk-SUSD4UTN.mjs.map +7 -0
  104. package/dist/js/chunks/{chunk-B7DQFHA5.mjs → chunk-SYBOA5HC.mjs} +7 -12
  105. package/dist/js/chunks/chunk-SYBOA5HC.mjs.map +7 -0
  106. package/dist/js/chunks/{chunk-TFABTUAZ.mjs → chunk-T4MOBP3J.mjs} +2 -2
  107. package/dist/js/chunks/{chunk-GCWWEZKO.mjs → chunk-TM7HPGTV.mjs} +3 -3
  108. package/dist/js/chunks/{chunk-5KIHWJI2.mjs → chunk-TMQDZSDC.mjs} +34 -12
  109. package/dist/js/chunks/chunk-TMQDZSDC.mjs.map +7 -0
  110. package/dist/js/chunks/{chunk-ZO6ZLHFF.mjs → chunk-TVSX5YA2.mjs} +3 -3
  111. package/dist/js/chunks/{chunk-INLZWHLY.mjs → chunk-UHO5CV6K.mjs} +2 -2
  112. package/dist/js/chunks/{chunk-INLZWHLY.mjs.map → chunk-UHO5CV6K.mjs.map} +2 -2
  113. package/dist/js/chunks/{chunk-7YQBHTK3.mjs → chunk-UKCNELUN.mjs} +6 -8
  114. package/dist/js/chunks/chunk-UKCNELUN.mjs.map +7 -0
  115. package/dist/js/chunks/{chunk-VH4BMAZS.mjs → chunk-UKQK5GWR.mjs} +13 -13
  116. package/dist/js/chunks/chunk-UKQK5GWR.mjs.map +7 -0
  117. package/dist/js/chunks/{chunk-OYNUDOHR.mjs → chunk-UTSLYQ65.mjs} +7 -6
  118. package/dist/js/chunks/{chunk-OYNUDOHR.mjs.map → chunk-UTSLYQ65.mjs.map} +2 -2
  119. package/dist/js/chunks/{chunk-7W7TV6NY.mjs → chunk-VS5OJBOD.mjs} +2 -2
  120. package/dist/js/chunks/{chunk-7W7TV6NY.mjs.map → chunk-VS5OJBOD.mjs.map} +2 -2
  121. package/dist/js/chunks/{chunk-KYIEG4U3.mjs → chunk-VZMROW5A.mjs} +43 -14
  122. package/dist/js/chunks/chunk-VZMROW5A.mjs.map +7 -0
  123. package/dist/js/chunks/{chunk-VFV75DHF.mjs → chunk-XB6Y7P5W.mjs} +11 -12
  124. package/dist/js/chunks/chunk-XB6Y7P5W.mjs.map +7 -0
  125. package/dist/js/chunks/{chunk-CZSQHXEV.mjs → chunk-XDAMOMVD.mjs} +20 -21
  126. package/dist/js/chunks/chunk-XDAMOMVD.mjs.map +7 -0
  127. package/dist/js/chunks/{chunk-EVCVFEV3.mjs → chunk-XJPMW5SP.mjs} +21 -35
  128. package/dist/js/chunks/chunk-XJPMW5SP.mjs.map +7 -0
  129. package/dist/js/chunks/{chunk-VR3L2WN5.mjs → chunk-YKANQILZ.mjs} +7 -6
  130. package/dist/js/chunks/chunk-YKANQILZ.mjs.map +7 -0
  131. package/dist/js/chunks/{chunk-JUKBBN6P.mjs → chunk-YLZOJLDI.mjs} +2 -2
  132. package/dist/js/chunks/{chunk-U4B3VHFS.mjs → chunk-ZK7YY322.mjs} +28 -21
  133. package/dist/js/chunks/chunk-ZK7YY322.mjs.map +7 -0
  134. package/dist/js/expressive.cjs +2739 -2387
  135. package/dist/js/expressive.cjs.map +4 -4
  136. package/dist/js/expressive.js +2739 -2387
  137. package/dist/js/expressive.js.map +4 -4
  138. package/dist/js/expressive.min.js +7 -7
  139. package/dist/js/expressive.min.js.map +4 -4
  140. package/dist/js/expressive.mjs +76 -75
  141. package/dist/js/expressive.mjs.map +1 -1
  142. package/dist/js/internal/behaviors/bottomSheets.mjs +3 -3
  143. package/dist/js/internal/behaviors/copy.mjs +3 -3
  144. package/dist/js/internal/behaviors/dataTables.mjs +2 -4
  145. package/dist/js/internal/behaviors/dialogs.mjs +2 -2
  146. package/dist/js/internal/behaviors/forms.mjs +2 -2
  147. package/dist/js/internal/behaviors/imageCompare.mjs +2 -2
  148. package/dist/js/internal/behaviors/lists.mjs +2 -2
  149. package/dist/js/internal/behaviors/paneResize.mjs +2 -2
  150. package/dist/js/internal/behaviors/sheetDrag.mjs +2 -2
  151. package/dist/js/internal/behaviors/sideSheets.mjs +3 -3
  152. package/dist/js/internal/behaviors/sortable.mjs +2 -2
  153. package/dist/js/internal/behaviors/theme.mjs +2 -2
  154. package/dist/js/internal/behaviors/tour.mjs +2 -2
  155. package/dist/js/internal/behaviors/transferList.mjs +2 -2
  156. package/dist/js/internal/components/appBar.mjs +3 -3
  157. package/dist/js/internal/components/autocomplete.mjs +5 -4
  158. package/dist/js/internal/components/backToTop.mjs +3 -3
  159. package/dist/js/internal/components/barChart.mjs +5 -5
  160. package/dist/js/internal/components/buttonGroup.mjs +3 -3
  161. package/dist/js/internal/components/buttons.mjs +3 -3
  162. package/dist/js/internal/components/cards.mjs +3 -3
  163. package/dist/js/internal/components/carousel.mjs +3 -3
  164. package/dist/js/internal/components/cascader.mjs +4 -4
  165. package/dist/js/internal/components/characterCounter.mjs +3 -3
  166. package/dist/js/internal/components/chips.mjs +7 -6
  167. package/dist/js/internal/components/colorPicker.mjs +3 -3
  168. package/dist/js/internal/components/columnChart.mjs +4 -4
  169. package/dist/js/internal/components/commandPalette.mjs +3 -3
  170. package/dist/js/internal/components/confetti.mjs +3 -3
  171. package/dist/js/internal/components/currencyInput.mjs +3 -3
  172. package/dist/js/internal/components/datepicker.mjs +8 -7
  173. package/dist/js/internal/components/expandingCard.mjs +3 -3
  174. package/dist/js/internal/components/funnelChart.mjs +4 -4
  175. package/dist/js/internal/components/heatmapChart.mjs +4 -4
  176. package/dist/js/internal/components/hoverCard.mjs +3 -3
  177. package/dist/js/internal/components/index.mjs +60 -59
  178. package/dist/js/internal/components/inputMask.mjs +3 -3
  179. package/dist/js/internal/components/keypad.mjs +3 -3
  180. package/dist/js/internal/components/lightbox.mjs +3 -3
  181. package/dist/js/internal/components/lineChart.mjs +23 -7
  182. package/dist/js/internal/components/loadingOverlay.mjs +3 -3
  183. package/dist/js/internal/components/mapView.mjs +3 -3
  184. package/dist/js/internal/components/menu.mjs +3 -3
  185. package/dist/js/internal/components/menubar.mjs +4 -4
  186. package/dist/js/internal/components/messageScroller.mjs +3 -3
  187. package/dist/js/internal/components/mixedChart.mjs +5 -5
  188. package/dist/js/internal/components/navigationRail.mjs +3 -3
  189. package/dist/js/internal/components/particles.mjs +3 -3
  190. package/dist/js/internal/components/pieChart.mjs +4 -4
  191. package/dist/js/internal/components/pullToRefresh.mjs +3 -3
  192. package/dist/js/internal/components/questionnaire.mjs +3 -3
  193. package/dist/js/internal/components/radarChart.mjs +4 -4
  194. package/dist/js/internal/components/radialChart.mjs +4 -4
  195. package/dist/js/internal/components/registry.mjs +59 -58
  196. package/dist/js/internal/components/richTextEditor.mjs +3 -3
  197. package/dist/js/internal/components/sankeyChart.mjs +4 -4
  198. package/dist/js/internal/components/scatterChart.mjs +4 -4
  199. package/dist/js/internal/components/scrollspy.mjs +3 -3
  200. package/dist/js/internal/components/select.mjs +5 -4
  201. package/dist/js/internal/components/showMore.mjs +3 -3
  202. package/dist/js/internal/components/slider.mjs +3 -3
  203. package/dist/js/internal/components/snackbar.mjs +2 -2
  204. package/dist/js/internal/components/swipeActions.mjs +3 -3
  205. package/dist/js/internal/components/tabs.mjs +3 -3
  206. package/dist/js/internal/components/timepicker.mjs +5 -5
  207. package/dist/js/internal/components/tooltip.mjs +3 -3
  208. package/dist/js/internal/components/treeSelect.mjs +6 -5
  209. package/dist/js/internal/components/treemapChart.mjs +4 -4
  210. package/dist/js/internal/core/component.mjs +6 -4
  211. package/dist/js/internal/core/formControl.mjs +2 -2
  212. package/dist/js/internal/core/imageURL.mjs +7 -0
  213. package/dist/js/internal/core/imageURL.mjs.map +7 -0
  214. package/dist/js/internal/core/utils.mjs +11 -1
  215. package/dist/js/internal/plugins/dockedDisplayPlugin.mjs +2 -2
  216. package/dist/js/internal/plugins/modalDisplayPlugin.mjs +3 -3
  217. package/dist/js/modular.mjs +76 -75
  218. package/dist/types/behaviors/bottomSheets.d.ts +5 -3
  219. package/dist/types/behaviors/dataTables.d.ts +2 -6
  220. package/dist/types/behaviors/forms.d.ts +7 -7
  221. package/dist/types/behaviors/imageCompare.d.ts +2 -1
  222. package/dist/types/behaviors/transferList.d.ts +2 -0
  223. package/dist/types/components/autocomplete.d.ts +14 -3
  224. package/dist/types/components/carousel.d.ts +7 -0
  225. package/dist/types/components/chips.d.ts +15 -0
  226. package/dist/types/components/colorPicker.d.ts +14 -0
  227. package/dist/types/components/currencyInput.d.ts +5 -4
  228. package/dist/types/components/datepicker.d.ts +54 -27
  229. package/dist/types/components/funnelChart.d.ts +1 -4
  230. package/dist/types/components/heatmapChart.d.ts +3 -0
  231. package/dist/types/components/hoverCard.d.ts +1 -0
  232. package/dist/types/components/inputMask.d.ts +0 -2
  233. package/dist/types/components/lineChart.d.ts +43 -5
  234. package/dist/types/components/mapView.d.ts +113 -11
  235. package/dist/types/components/menu.d.ts +14 -0
  236. package/dist/types/components/particles.d.ts +14 -1
  237. package/dist/types/components/pieChart.d.ts +1 -2
  238. package/dist/types/components/richTextEditor.d.ts +40 -9
  239. package/dist/types/components/select.d.ts +1 -3
  240. package/dist/types/components/showMore.d.ts +2 -0
  241. package/dist/types/components/slider.d.ts +0 -1
  242. package/dist/types/components/snackbar.d.ts +7 -1
  243. package/dist/types/components/tabs.d.ts +3 -3
  244. package/dist/types/components/timepicker.d.ts +15 -6
  245. package/dist/types/components/tooltip.d.ts +1 -1
  246. package/dist/types/components/treemapChart.d.ts +2 -2
  247. package/dist/types/core/component.d.ts +9 -3
  248. package/dist/types/core/imageURL.d.ts +2 -0
  249. package/dist/types/core/utils.d.ts +39 -1
  250. package/dist/types/modular.d.ts +1 -1
  251. package/dist/types/plugins/modalDisplayPlugin.d.ts +8 -1
  252. package/package.json +8 -6
  253. package/src/sass/abstracts/_mixins.scss +459 -59
  254. package/src/sass/abstracts/_variables.scss +25 -0
  255. package/src/sass/components/_accordion.scss +1 -3
  256. package/src/sass/components/_aura.scss +1 -0
  257. package/src/sass/components/_back-to-top.scss +3 -3
  258. package/src/sass/components/_bar-chart.scss +2 -83
  259. package/src/sass/components/_bottom-sheet.scss +7 -0
  260. package/src/sass/components/_breadcrumb.scss +1 -7
  261. package/src/sass/components/_button-groups.scss +15 -38
  262. package/src/sass/components/_buttons.scss +24 -74
  263. package/src/sass/components/_calendar.scss +1 -3
  264. package/src/sass/components/_carousel.scss +10 -10
  265. package/src/sass/components/_cascader.scss +3 -14
  266. package/src/sass/components/_column-chart.scss +1 -19
  267. package/src/sass/components/_confetti.scss +3 -4
  268. package/src/sass/components/_data-table.scss +10 -0
  269. package/src/sass/components/_dialog.scss +10 -18
  270. package/src/sass/components/_expanding-card.scss +1 -5
  271. package/src/sass/components/_fab-menu.scss +4 -12
  272. package/src/sass/components/_funnel-chart.scss +1 -62
  273. package/src/sass/components/_heatmap-chart.scss +2 -6
  274. package/src/sass/components/_icon-buttons.scss +1 -4
  275. package/src/sass/components/_line-chart.scss +2 -70
  276. package/src/sass/components/_map.scss +4 -0
  277. package/src/sass/components/_marquee.scss +3 -3
  278. package/src/sass/components/_mega-menu.scss +8 -17
  279. package/src/sass/components/_menu.scss +10 -11
  280. package/src/sass/components/_menubar.scss +1 -13
  281. package/src/sass/components/_mixed-chart.scss +1 -37
  282. package/src/sass/components/_navbar.scss +11 -16
  283. package/src/sass/components/_navigation-bar.scss +2 -5
  284. package/src/sass/components/_navigation-rail.scss +25 -15
  285. package/src/sass/components/_page-footer.scss +1 -3
  286. package/src/sass/components/_pagination.scss +3 -14
  287. package/src/sass/components/_panes.scss +3 -16
  288. package/src/sass/components/_particles.scss +3 -4
  289. package/src/sass/components/_pie-chart.scss +8 -70
  290. package/src/sass/components/_progress.scss +31 -13
  291. package/src/sass/components/_radar-chart.scss +2 -32
  292. package/src/sass/components/_radial-chart.scss +2 -48
  293. package/src/sass/components/_sankey-chart.scss +5 -28
  294. package/src/sass/components/_scatter-chart.scss +2 -11
  295. package/src/sass/components/_search.scss +1 -4
  296. package/src/sass/components/_side-sheet.scss +9 -14
  297. package/src/sass/components/_skeleton.scss +24 -15
  298. package/src/sass/components/_snackbar.scss +11 -13
  299. package/src/sass/components/_table_of_contents.scss +1 -3
  300. package/src/sass/components/_tabs.scss +4 -20
  301. package/src/sass/components/_timepicker.scss +2 -1
  302. package/src/sass/components/_toolbar.scss +1 -4
  303. package/src/sass/components/_tooltip.scss +9 -5
  304. package/src/sass/components/_tree.scss +5 -17
  305. package/src/sass/components/_treemap-chart.scss +2 -26
  306. package/src/sass/components/forms/_checkboxes.scss +2 -21
  307. package/src/sass/components/forms/_drop-zone.scss +1 -4
  308. package/src/sass/components/forms/_fieldset.scss +1 -4
  309. package/src/sass/components/forms/_file-input.scss +6 -0
  310. package/src/sass/components/forms/_input-fields.scss +21 -4
  311. package/src/sass/components/forms/_radio-buttons.scss +2 -24
  312. package/src/sass/components/forms/_select.scss +6 -7
  313. package/src/sass/components/forms/_slider.scss +1 -4
  314. package/src/sass/components/forms/_switches.scss +14 -21
  315. package/src/sass/utilities/_helpers.scss +1 -1
  316. package/src/sass/utilities/_visibility.scss +1 -3
  317. package/dist/js/chunks/chunk-2CS6TITK.mjs.map +0 -7
  318. package/dist/js/chunks/chunk-3L3QIYLC.mjs.map +0 -7
  319. package/dist/js/chunks/chunk-4IKVPCSU.mjs +0 -7
  320. package/dist/js/chunks/chunk-4QUCNFSD.mjs.map +0 -7
  321. package/dist/js/chunks/chunk-4TRZ2AER.mjs.map +0 -7
  322. package/dist/js/chunks/chunk-5KIHWJI2.mjs.map +0 -7
  323. package/dist/js/chunks/chunk-6FSEUFVW.mjs.map +0 -7
  324. package/dist/js/chunks/chunk-752ADW4M.mjs.map +0 -7
  325. package/dist/js/chunks/chunk-7NLUI3RR.mjs.map +0 -7
  326. package/dist/js/chunks/chunk-7YQBHTK3.mjs.map +0 -7
  327. package/dist/js/chunks/chunk-7YZ5CN3V.mjs.map +0 -7
  328. package/dist/js/chunks/chunk-B7DQFHA5.mjs.map +0 -7
  329. package/dist/js/chunks/chunk-BIGU5RCJ.mjs.map +0 -7
  330. package/dist/js/chunks/chunk-BPF3I2MN.mjs.map +0 -7
  331. package/dist/js/chunks/chunk-CMGXGYUC.mjs.map +0 -7
  332. package/dist/js/chunks/chunk-CSYWKEK3.mjs.map +0 -7
  333. package/dist/js/chunks/chunk-CZSQHXEV.mjs.map +0 -7
  334. package/dist/js/chunks/chunk-DZYVU75J.mjs.map +0 -7
  335. package/dist/js/chunks/chunk-EC26RU2D.mjs.map +0 -7
  336. package/dist/js/chunks/chunk-EVCVFEV3.mjs.map +0 -7
  337. package/dist/js/chunks/chunk-FCNF4GRJ.mjs.map +0 -7
  338. package/dist/js/chunks/chunk-GWZ76SR4.mjs.map +0 -7
  339. package/dist/js/chunks/chunk-KYIEG4U3.mjs.map +0 -7
  340. package/dist/js/chunks/chunk-KZPSAXIU.mjs.map +0 -7
  341. package/dist/js/chunks/chunk-LDXCC2L3.mjs.map +0 -7
  342. package/dist/js/chunks/chunk-NBJAUGPP.mjs.map +0 -7
  343. package/dist/js/chunks/chunk-OUCHKSAW.mjs.map +0 -7
  344. package/dist/js/chunks/chunk-P6DRQ6KS.mjs.map +0 -7
  345. package/dist/js/chunks/chunk-PA7NU5AK.mjs.map +0 -7
  346. package/dist/js/chunks/chunk-QACZ6TUP.mjs.map +0 -7
  347. package/dist/js/chunks/chunk-QXKWVHBD.mjs.map +0 -7
  348. package/dist/js/chunks/chunk-S23RJ3XY.mjs.map +0 -7
  349. package/dist/js/chunks/chunk-SPPHF7YZ.mjs.map +0 -7
  350. package/dist/js/chunks/chunk-U4B3VHFS.mjs.map +0 -7
  351. package/dist/js/chunks/chunk-UGJHCHXG.mjs.map +0 -7
  352. package/dist/js/chunks/chunk-VFV75DHF.mjs.map +0 -7
  353. package/dist/js/chunks/chunk-VGY4M57S.mjs.map +0 -7
  354. package/dist/js/chunks/chunk-VH4BMAZS.mjs.map +0 -7
  355. package/dist/js/chunks/chunk-VJVQIXHC.mjs.map +0 -7
  356. package/dist/js/chunks/chunk-VMY55K2X.mjs.map +0 -7
  357. package/dist/js/chunks/chunk-VR3L2WN5.mjs.map +0 -7
  358. package/dist/js/chunks/chunk-WU7XJ4RR.mjs.map +0 -7
  359. package/dist/js/chunks/chunk-Y6TLRA3U.mjs.map +0 -7
  360. package/dist/js/chunks/chunk-Z4GICXR2.mjs.map +0 -7
  361. package/dist/js/chunks/chunk-Z4OARDZ7.mjs.map +0 -7
  362. package/dist/js/chunks/chunk-ZM3XBHWV.mjs.map +0 -7
  363. package/dist/js/chunks/chunk-ZVLOUDIJ.mjs.map +0 -7
  364. /package/dist/js/chunks/{chunk-Y6H2X7ZC.mjs.map → chunk-3KF65KGL.mjs.map} +0 -0
  365. /package/dist/js/chunks/{chunk-75E5EDJF.mjs.map → chunk-3XORNED5.mjs.map} +0 -0
  366. /package/dist/js/chunks/{chunk-NNHVANQA.mjs.map → chunk-4WBGAQN3.mjs.map} +0 -0
  367. /package/dist/js/chunks/{chunk-ZJNLAGY5.mjs.map → chunk-5F4URJHL.mjs.map} +0 -0
  368. /package/dist/js/chunks/{chunk-GVZQH2H5.mjs.map → chunk-AEG6LOAJ.mjs.map} +0 -0
  369. /package/dist/js/chunks/{chunk-AI73GJKG.mjs.map → chunk-BB5VXYXT.mjs.map} +0 -0
  370. /package/dist/js/chunks/{chunk-2RLBDFH4.mjs.map → chunk-BDATLH3H.mjs.map} +0 -0
  371. /package/dist/js/chunks/{chunk-ZKWUWBUB.mjs.map → chunk-CY2CTOVM.mjs.map} +0 -0
  372. /package/dist/js/chunks/{chunk-67ZPPKXS.mjs.map → chunk-FNIIH2LU.mjs.map} +0 -0
  373. /package/dist/js/chunks/{chunk-T3BNSRP3.mjs.map → chunk-HQRLBTNM.mjs.map} +0 -0
  374. /package/dist/js/chunks/{chunk-NAC72P7R.mjs.map → chunk-I2F7MLUU.mjs.map} +0 -0
  375. /package/dist/js/chunks/{chunk-ANKFWNWT.mjs.map → chunk-LC4O5LFS.mjs.map} +0 -0
  376. /package/dist/js/chunks/{chunk-4PIXLDNJ.mjs.map → chunk-LEF33SCP.mjs.map} +0 -0
  377. /package/dist/js/chunks/{chunk-ILDRRG7T.mjs.map → chunk-LFORZRPH.mjs.map} +0 -0
  378. /package/dist/js/chunks/{chunk-4EWGD4V2.mjs.map → chunk-NODZ5VAD.mjs.map} +0 -0
  379. /package/dist/js/chunks/{chunk-NVQ5EHCU.mjs.map → chunk-QNODAANY.mjs.map} +0 -0
  380. /package/dist/js/chunks/{chunk-ROH2HDB4.mjs.map → chunk-RUDYMEJ3.mjs.map} +0 -0
  381. /package/dist/js/chunks/{chunk-TFABTUAZ.mjs.map → chunk-T4MOBP3J.mjs.map} +0 -0
  382. /package/dist/js/chunks/{chunk-GCWWEZKO.mjs.map → chunk-TM7HPGTV.mjs.map} +0 -0
  383. /package/dist/js/chunks/{chunk-ZO6ZLHFF.mjs.map → chunk-TVSX5YA2.mjs.map} +0 -0
  384. /package/dist/js/chunks/{chunk-JUKBBN6P.mjs.map → chunk-YLZOJLDI.mjs.map} +0 -0
@@ -1,5 +1,6 @@
1
1
  @use "sass:list";
2
2
  @use "sass:map";
3
+ @use "sass:meta";
3
4
  @use "sass:math";
4
5
  @use "./elevation" as *;
5
6
  @use "./variables" as *;
@@ -77,8 +78,9 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
77
78
  // State layers mix the on-color into the container in oklab; the opacities come
78
79
  // from md.sys.state via `state-opacity()`. Filled and tonal have no elevation.
79
80
 
80
- // Shared by every style. Elevated also moves z-depth on hover and press.
81
- @mixin _btn-states($on, $base, $hover-depth: null, $press-depth: null) {
81
+ // Shared by every button style and the FABs. Elevated and the FABs also move
82
+ // z-depth on hover or press.
83
+ @mixin btn-states($on, $base, $hover-depth: null, $press-depth: null) {
82
84
  &:hover {
83
85
  @if $hover-depth { @include z-depth($hover-depth); }
84
86
  background-color: state-layer($on, "hover", $base);
@@ -97,14 +99,14 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
97
99
  color: var(--md-comp-filled-button-label-text-color, var(--md-sys-color-on-primary));
98
100
  background-color: var(--md-comp-filled-button-container-color, var(--md-sys-color-primary));
99
101
 
100
- @include _btn-states(var(--md-sys-color-on-primary), var(--md-sys-color-primary));
102
+ @include btn-states(var(--md-sys-color-on-primary), var(--md-sys-color-primary));
101
103
  }
102
104
 
103
105
  @mixin btn-tonal {
104
106
  color: var(--md-sys-color-on-secondary-container);
105
107
  background-color: var(--md-sys-color-secondary-container);
106
108
 
107
- @include _btn-states(var(--md-sys-color-on-secondary-container), var(--md-sys-color-secondary-container));
109
+ @include btn-states(var(--md-sys-color-on-secondary-container), var(--md-sys-color-secondary-container));
108
110
  }
109
111
 
110
112
  @mixin btn-elevated {
@@ -112,7 +114,7 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
112
114
  background-color: var(--md-sys-color-surface-container-low);
113
115
  @include z-depth("1");
114
116
 
115
- @include _btn-states(var(--md-sys-color-primary), var(--md-sys-color-surface-container-low), "2", "1");
117
+ @include btn-states(var(--md-sys-color-primary), var(--md-sys-color-surface-container-low), "2", "1");
116
118
  }
117
119
 
118
120
  @mixin btn-outlined {
@@ -124,7 +126,7 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
124
126
  // height right.
125
127
  border: var(--md-comp-filled-button-outline-width, 1px) solid var(--md-sys-color-outline);
126
128
 
127
- @include _btn-states(var(--md-sys-color-primary), transparent);
129
+ @include btn-states(var(--md-sys-color-primary), transparent);
128
130
  }
129
131
 
130
132
  @mixin btn-flat {
@@ -133,7 +135,7 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
133
135
  background-color: transparent;
134
136
  border-color: transparent;
135
137
 
136
- @include _btn-states(var(--md-sys-color-primary), transparent);
138
+ @include btn-states(var(--md-sys-color-primary), transparent);
137
139
  }
138
140
 
139
141
  @mixin btn-disabled {
@@ -145,6 +147,36 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
145
147
  cursor: default;
146
148
  }
147
149
 
150
+ // A list with no markers or indentation. WebKit drops the list role from a
151
+ // list with `list-style: none`, so markup that needs it adds role="list".
152
+ @mixin list-reset {
153
+ margin: 0;
154
+ padding: 0;
155
+ list-style: none;
156
+ }
157
+
158
+ // One line, cut off with an ellipsis when the box is too narrow for it.
159
+ @mixin ellipsis {
160
+ overflow: hidden;
161
+ text-overflow: ellipsis;
162
+ white-space: nowrap;
163
+ }
164
+
165
+ // Covers the positioned parent. Width and height still matter for replaced
166
+ // elements (a canvas, an svg, an iframe), which `inset` alone does not stretch.
167
+ @mixin fill-parent {
168
+ position: absolute;
169
+ inset: 0;
170
+ width: 100%;
171
+ height: 100%;
172
+ }
173
+
174
+ // Hidden on paper. Important so a size or state rule that sets `display`
175
+ // cannot bring it back; see base/_print.scss for the page itself.
176
+ @mixin print-hidden {
177
+ @media print { display: none !important; }
178
+ }
179
+
148
180
  // Off the screen but not out of the document: still focusable, still read, and
149
181
  // still a form control. `display: none` and `visibility: hidden` both take the
150
182
  // element out of the tab order, which is the wrong trade for a control whose
@@ -172,15 +204,16 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
172
204
  // Focus with Keyboard
173
205
  // The ring itself, for the rare selector that cannot be written as
174
206
  // `&:focus-visible` on the focused element - a filter chip draws its ring on
175
- // the <label>, but the focus is on the checkbox before it.
176
- @mixin focus-ring {
207
+ // the <label>, but the focus is on the checkbox before it. A row inside a
208
+ // scrolling list passes a negative `$offset` so the list does not clip it.
209
+ @mixin focus-ring($offset: 2px) {
177
210
  outline: 3px solid var(--md-sys-color-secondary);
178
- outline-offset: 2px;
211
+ outline-offset: $offset;
179
212
  }
180
213
 
181
- @mixin focus-visible {
214
+ @mixin focus-visible($offset: 2px) {
182
215
  &:focus-visible {
183
- @include focus-ring();
216
+ @include focus-ring($offset);
184
217
  }
185
218
  }
186
219
 
@@ -195,6 +228,53 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
195
228
  mask: $trend-arrow center / 18px no-repeat;
196
229
  }
197
230
 
231
+ // The 64dp header bar of a full-screen dialog, a side sheet or a pane: a
232
+ // flex row with no fill or shadow. `background: none` also keeps the top app
233
+ // bar's `header:has(> nav)` fill off it. Callers add their own padding.
234
+ @mixin header-bar($gap) {
235
+ display: flex;
236
+ align-items: center;
237
+ gap: $gap;
238
+ flex: 0 0 auto;
239
+ box-sizing: border-box;
240
+ min-height: 64px;
241
+ margin: 0;
242
+ background: none;
243
+ box-shadow: none;
244
+ }
245
+
246
+ // A header bar's heading: takes the free space and can shrink, title-large.
247
+ @mixin header-bar-headline {
248
+ flex: 1 1 auto;
249
+ min-width: 0;
250
+ margin: 0;
251
+ color: var(--md-sys-color-on-surface);
252
+ @include typescale("title-large");
253
+ }
254
+
255
+ // The states of a text action with no button chrome of its own: a mega menu
256
+ // or menubar item, a rail panel link, a tree or cascader row. An on-surface
257
+ // hover layer and, given `$selected` (a compound such as `[aria-current]`), a
258
+ // selected fill with a Highlight outline under forced colors. Hover comes
259
+ // first: the two have equal specificity, so the selected fill wins on hover.
260
+ @mixin text-action(
261
+ $selected: null,
262
+ $container: var(--md-sys-color-secondary-container),
263
+ $on-container: var(--md-sys-color-on-secondary-container),
264
+ ) {
265
+ &:hover {
266
+ background-color: state-layer(var(--md-sys-color-on-surface), "hover");
267
+ }
268
+
269
+ @if $selected {
270
+ &#{$selected} {
271
+ background-color: $container;
272
+ color: $on-container;
273
+ @include forced-colors-selected;
274
+ }
275
+ }
276
+ }
277
+
198
278
  // A 48dp icon action in a dialog, pane or side sheet header bar.
199
279
  @mixin header-icon-action {
200
280
  flex: 0 0 48px;
@@ -210,10 +290,7 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
210
290
  box-shadow: none;
211
291
 
212
292
  > #{$icon} {
213
- font-size: rem(24px);
214
- width: rem(24px);
215
- height: rem(24px);
216
- line-height: rem(24px);
293
+ @include icon-size(rem(24px));
217
294
  }
218
295
 
219
296
  &:hover {
@@ -223,6 +300,15 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
223
300
  @include focus-visible;
224
301
  }
225
302
 
303
+ // An icon glyph's box: a ligature font size in a square of the same size. Pass
304
+ // `$line-height: 1` where the glyph sits on a text baseline.
305
+ @mixin icon-size($size, $line-height: $size) {
306
+ font-size: $size;
307
+ width: $size;
308
+ height: $size;
309
+ line-height: $line-height;
310
+ }
311
+
226
312
  // Forced colors repaint every background as Canvas and drop box-shadow, so a
227
313
  // state shown only by a fill or a ring disappears. forced-colors-selected marks
228
314
  // a selected item with a Highlight outline. forced-colors-fill keeps a drawn
@@ -239,7 +325,6 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
239
325
  // edge while closed. The row turns it with `transform: none` once the branch
240
326
  // opens, and with rotate(90deg) under :dir(rtl). .tree and the tree select
241
327
  // share it.
242
- $_tree-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 15.4 6 9.4 7.4 8l4.6 4.6L16.6 8 18 9.4z'/%3E%3C/svg%3E");
243
328
 
244
329
  @mixin tree-chevron {
245
330
  content: "";
@@ -247,7 +332,7 @@ $_tree-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg
247
332
  width: 20px;
248
333
  height: 20px;
249
334
  background-color: currentColor;
250
- mask: $_tree-chevron center / 20px no-repeat;
335
+ mask: $expand-more center / 20px no-repeat;
251
336
  transform: rotate(-90deg);
252
337
  transition: transform var(--md-sys-motion-duration-short3) ease-out;
253
338
  }
@@ -408,14 +493,54 @@ $_tree-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg
408
493
  @include typescale("body-large");
409
494
  }
410
495
 
496
+ // A radio, checkbox or switch drawn on the <input> itself: the native look
497
+ // cleared to a $width x $height box with a 2px $border-color edge.
498
+ @mixin selection-control($width, $height, $border-color) {
499
+ appearance: none;
500
+ flex: 0 0 $width;
501
+ box-sizing: border-box;
502
+ width: $width;
503
+ height: $height;
504
+ margin: 0;
505
+ padding: 0;
506
+ border: 2px solid $border-color;
507
+ }
508
+
509
+ // The hover, checked hover and focus rings of a selection control, from the
510
+ // $inner edge out to $outer. $checked lists the states whose ring is primary.
511
+ @mixin selection-control-states($outer, $inner, $checked: ":checked") {
512
+ $checked-hover: ();
513
+ @each $state in $checked {
514
+ $checked-hover: list.append($checked-hover, "&#{$state}:hover", comma);
515
+ }
516
+
517
+ &:hover {
518
+ @include state-layer-ring($outer, $inner, var(--md-sys-color-on-surface), "hover");
519
+ }
520
+
521
+ #{$checked-hover} {
522
+ @include state-layer-ring($outer, $inner, var(--md-sys-color-primary), "hover");
523
+ }
524
+
525
+ &:focus-visible {
526
+ @include state-layer-ring($outer, $inner, var(--md-sys-color-primary), "focus");
527
+ outline: none;
528
+ }
529
+ }
530
+
411
531
  /// The state layer some controls draw as a ring rather than an overlay.
412
532
  ///
413
533
  /// Checkboxes and radio buttons have no room for an overlay pseudo-element, so
414
534
  /// they grow a `box-shadow` from the control's edge out to the state layer
415
535
  /// size.
416
536
  @mixin state-layer-ring($outer, $inner, $color, $state) {
417
- // Interpolated so a quoted color, such as "var(--c)", is written unquoted.
418
- box-shadow: 0 0 0 calc((#{$outer} - #{$inner}) / 2) state-layer(#{$color}, $state);
537
+ // Two lengths fold to one. Anything else is interpolated, so a quoted
538
+ // value, such as "var(--c)", is written unquoted.
539
+ $spread: calc((#{$outer} - #{$inner}) / 2);
540
+ @if meta.type-of($outer) == "number" and meta.type-of($inner) == "number" {
541
+ $spread: calc(($outer - $inner) / 2);
542
+ }
543
+ box-shadow: 0 0 0 $spread state-layer(#{$color}, $state);
419
544
  }
420
545
 
421
546
  /// The button size tokens for one rung of `$button-sizes`.
@@ -572,12 +697,77 @@ $_chart-toggle-written: false;
572
697
  }
573
698
  }
574
699
 
700
+ // The series colors. Past the first four come the container roles, which
701
+ // alone are 1.3:1 on the surface in light mode and 2:1 in dark. Mixed 45%
702
+ // with on-surface, they keep their hue and reach 5:1 and 6.8:1, past the 3:1
703
+ // a mark needs (WCAG 1.4.11), and surface text on them passes too.
704
+ $_chart-colors: (
705
+ var(--md-sys-color-primary),
706
+ var(--md-sys-color-tertiary),
707
+ var(--md-sys-color-secondary),
708
+ var(--md-sys-color-on-surface-variant),
709
+ color-mix(in oklab, var(--md-sys-color-primary-container) 45%, var(--md-sys-color-on-surface)),
710
+ color-mix(in oklab, var(--md-sys-color-tertiary-container) 45%, var(--md-sys-color-on-surface))
711
+ );
712
+ $_chart-on-colors: ("on-primary", "on-tertiary", "on-secondary", "surface", "surface", "surface");
713
+
575
714
  // The parts LineChart draws for every chart type, prefixed with the
576
715
  // component's name: .#{$name}-plot, -cursor, -tooltip, -labels and -legend.
577
- // Defines the --md-comp-#{$name}-height, -grid-color and -color-1..4 tokens,
716
+ // Defines the --md-comp-#{$name}-height, -grid-color and -color-1..N tokens,
578
717
  // and --#{$name}-color on each [data-series]. Include it at the root of the
579
718
  // component's partial; the component adds its own marks and cursor look.
580
- @mixin chart($name) {
719
+ //
720
+ // The options draw parts that some chart types share:
721
+ // $colors 4 to 6 series colors; 5 and 6 are primary- and
722
+ // tertiary-container deepened toward on-surface
723
+ // $on-colors adds --md-comp-#{$name}-on-color-1..N, the text color on each
724
+ // series color, and --#{$name}-on-color on each [data-series]
725
+ // $grid false leaves out the plot's grid lines and baseline
726
+ // $round a round plot with no grid, as wide as the height token and
727
+ // centred; a sparkline's sits at the inline start
728
+ // $rows a band per table row down the plot, which is as tall as its
729
+ // rows at --md-comp-#{$name}-row-height (40px each), with the
730
+ // labels beside it, grid lines down it and the tooltip below
731
+ // the highlighted row
732
+ // $tooltip middle centres the tooltip on its point instead of hanging
733
+ // it from the point's top
734
+ // $cursor line draws a 1px line with a dot on it for each series;
735
+ // band tints the highlighted row behind the marks, rounded by
736
+ // --md-comp-#{$name}-shape (4px)
737
+ // $lines styles series drawn as SVG lines: .#{$name}-line, dashed in
738
+ // a .dashed .#{$name}-series, .#{$name}-points and the area
739
+ // gradient's stops, at --md-comp-#{$name}-line-width (3px,
740
+ // sparkline 2px)
741
+ // $legend-columns a number, 3 or more, lays the legend out as a table of
742
+ // that many columns: swatch, name, then the values, the first
743
+ // of them bold
744
+ @mixin chart(
745
+ $name,
746
+ $colors: 4,
747
+ $on-colors: false,
748
+ $grid: true,
749
+ $round: false,
750
+ $rows: false,
751
+ $tooltip: top,
752
+ $cursor: null,
753
+ $lines: false,
754
+ $legend-columns: null
755
+ ) {
756
+ @if $colors < 4 or $colors > list.length($_chart-colors) {
757
+ @error "chart() takes 4 to #{list.length($_chart-colors)} $colors, got #{$colors}.";
758
+ }
759
+ @if not list.index((top, middle), $tooltip) {
760
+ @error "chart() $tooltip must be top or middle, got #{$tooltip}.";
761
+ }
762
+ @if $legend-columns and $legend-columns < 3 {
763
+ @error "chart() $legend-columns must be 3 or more, got #{$legend-columns}.";
764
+ }
765
+ @if $cursor and not list.index((line, band), $cursor) {
766
+ @error "chart() $cursor must be line, band or null, got #{$cursor}.";
767
+ }
768
+
769
+ $grid: $grid and not $round;
770
+
581
771
  @if not $_chart-toggle-written {
582
772
  $_chart-toggle-written: true !global;
583
773
  @include _chart-toggle;
@@ -586,12 +776,29 @@ $_chart-toggle-written: false;
586
776
  .#{$name} {
587
777
  --md-comp-#{$name}-height: #{rem(240px)};
588
778
  --md-comp-#{$name}-grid-color: var(--md-sys-color-outline-variant);
589
- --md-comp-#{$name}-color-1: var(--md-sys-color-primary);
590
- --md-comp-#{$name}-color-2: var(--md-sys-color-tertiary);
591
- --md-comp-#{$name}-color-3: var(--md-sys-color-secondary);
592
- --md-comp-#{$name}-color-4: var(--md-sys-color-on-surface-variant);
779
+ @for $i from 1 through $colors {
780
+ --md-comp-#{$name}-color-#{$i}: #{list.nth($_chart-colors, $i)};
781
+ }
782
+ @if $on-colors {
783
+ @for $i from 1 through $colors {
784
+ --md-comp-#{$name}-on-color-#{$i}: var(--md-sys-color-#{list.nth($_chart-on-colors, $i)});
785
+ }
786
+ }
787
+ @if $rows {
788
+ --md-comp-#{$name}-row-height: #{rem(40px)};
789
+ }
790
+ @if $cursor == band {
791
+ --md-comp-#{$name}-shape: var(--md-sys-shape-corner-extra-small);
792
+ }
793
+ @if $lines {
794
+ --md-comp-#{$name}-line-width: 3px;
795
+ }
593
796
 
594
- display: flex;
797
+ @if $rows {
798
+ display: grid;
799
+ } @else {
800
+ display: flex;
801
+ }
595
802
  flex-direction: column;
596
803
  gap: 8px;
597
804
  min-width: 0;
@@ -604,6 +811,28 @@ $_chart-toggle-written: false;
604
811
  // it hangs up from the bottom edge, where the overflow cannot scroll.
605
812
  position: relative;
606
813
 
814
+ @if $rows {
815
+ // Labels beside the plot, up to 40% of the width; everything else
816
+ // spans both columns. Dense flow puts the labels in the plot's row. A
817
+ // stretched figure, as in a grid of cards, keeps its rows at their size.
818
+ grid-template-columns: fit-content(40%) minmax(0, 1fr);
819
+ grid-auto-flow: row dense;
820
+ align-content: start;
821
+ column-gap: 12px;
822
+
823
+ > * {
824
+ grid-column: 1 / -1;
825
+ }
826
+
827
+ > .#{$name}-plot {
828
+ grid-column: 2;
829
+ }
830
+
831
+ > .#{$name}-labels {
832
+ grid-column: 1;
833
+ }
834
+ }
835
+
607
836
  > figcaption {
608
837
  color: var(--md-sys-color-on-surface-variant);
609
838
  @include typescale("title-small");
@@ -616,27 +845,92 @@ $_chart-toggle-written: false;
616
845
  }
617
846
  }
618
847
 
619
- @for $i from 1 through 4 {
848
+ @for $i from 1 through $colors {
620
849
  .#{$name} [data-series="#{$i}"] {
621
850
  --#{$name}-color: var(--md-comp-#{$name}-color-#{$i});
851
+ @if $on-colors {
852
+ --#{$name}-on-color: var(--md-comp-#{$name}-on-color-#{$i});
853
+ }
622
854
  }
623
855
  }
624
856
 
625
857
  .#{$name}-plot {
626
858
  position: relative;
627
- height: var(--md-comp-#{$name}-height);
628
- border-block-end: 1px solid var(--md-comp-#{$name}-grid-color);
629
- border-radius: 2px;
630
- // Four grid lines; the border is the fifth.
631
- background: linear-gradient(var(--md-comp-#{$name}-grid-color) 1px, transparent 0) 0 0 / 100% 25%;
859
+ @if $cursor == band {
860
+ isolation: isolate;
861
+ }
862
+ @if $round {
863
+ width: min(100%, var(--md-comp-#{$name}-height));
864
+ height: auto;
865
+ aspect-ratio: 1;
866
+ margin-inline: auto;
867
+ border-radius: 50%;
868
+ } @else {
869
+ @if $rows {
870
+ height: calc(var(--rows, 1) * var(--md-comp-#{$name}-row-height));
871
+ } @else {
872
+ height: var(--md-comp-#{$name}-height);
873
+ }
874
+ @if $grid and $rows {
875
+ border-right: 1px solid var(--md-comp-#{$name}-grid-color);
876
+ } @else if $grid {
877
+ border-block-end: 1px solid var(--md-comp-#{$name}-grid-color);
878
+ }
879
+ border-radius: 2px;
880
+ }
881
+ @if $grid and $rows {
882
+ // A line down the plot at each quarter of the value axis.
883
+ background: linear-gradient(to right, var(--md-comp-#{$name}-grid-color) 1px, transparent 0) 0 0 / 25% 100%;
884
+ } @else if $grid {
885
+ // Four grid lines; the border is the fifth.
886
+ background: linear-gradient(var(--md-comp-#{$name}-grid-color) 1px, transparent 0) 0 0 / 100% 25%;
887
+ }
632
888
  touch-action: pan-y;
633
889
  @include focus-visible;
634
890
  }
635
891
 
636
892
  .#{$name}-cursor {
637
893
  position: absolute;
638
- inset-block: 0;
894
+ @if $cursor == band and $rows {
895
+ inset-block: auto;
896
+ inset-inline: 0;
897
+ height: calc(100% / var(--rows, 1));
898
+ } @else {
899
+ inset-block: 0;
900
+ }
639
901
  pointer-events: none;
902
+
903
+ @if $cursor == line {
904
+ width: 1px;
905
+ background-color: var(--md-sys-color-outline);
906
+
907
+ > span {
908
+ position: absolute;
909
+ left: 0;
910
+ width: 10px;
911
+ height: 10px;
912
+ border: 2px solid var(--md-sys-color-surface);
913
+ border-radius: 50%;
914
+ background-color: var(--#{$name}-color);
915
+ translate: -50% -50%;
916
+ }
917
+ }
918
+
919
+ // A band behind the highlighted row's marks, which the plot's isolation
920
+ // keeps in front of the plot's own background.
921
+ @if $cursor == band {
922
+ z-index: -1;
923
+ @if not $rows {
924
+ width: calc(100% / var(--rows, 1));
925
+ }
926
+ border-radius: var(--md-comp-#{$name}-shape);
927
+ background-color: state-layer(var(--md-sys-color-on-surface), "hover");
928
+ @if $rows {
929
+ translate: 0 -50%;
930
+ } @else {
931
+ translate: -50% 0;
932
+ }
933
+ }
640
934
  }
641
935
 
642
936
  // Rich tooltip surface, as in _tooltip.scss.
@@ -645,6 +939,9 @@ $_chart-toggle-written: false;
645
939
 
646
940
  position: absolute;
647
941
  top: 0;
942
+ @if $rows {
943
+ left: 50%;
944
+ }
648
945
  z-index: 1;
649
946
  display: grid;
650
947
  grid-template-columns: auto auto;
@@ -659,7 +956,14 @@ $_chart-toggle-written: false;
659
956
  white-space: nowrap;
660
957
  font-variant-numeric: tabular-nums;
661
958
  pointer-events: none;
662
- translate: 12px 0;
959
+ @if $rows {
960
+ // Below the highlighted row, or above it in the lower half.
961
+ translate: -50% calc(var(--md-comp-#{$name}-row-height) / 2);
962
+ } @else if $tooltip == middle {
963
+ translate: 12px -50%;
964
+ } @else {
965
+ translate: 12px 0;
966
+ }
663
967
  @include z-depth("2");
664
968
  @include glass(var(--md-comp-#{$name}-tooltip-color));
665
969
 
@@ -668,7 +972,13 @@ $_chart-toggle-written: false;
668
972
  }
669
973
 
670
974
  &.end {
671
- translate: calc(-100% - 12px) 0;
975
+ @if $rows {
976
+ translate: -50% calc(-100% - var(--md-comp-#{$name}-row-height) / 2);
977
+ } @else if $tooltip == middle {
978
+ translate: calc(-100% - 12px) -50%;
979
+ } @else {
980
+ translate: calc(-100% - 12px) 0;
981
+ }
672
982
  }
673
983
 
674
984
  > strong {
@@ -692,9 +1002,7 @@ $_chart-toggle-written: false;
692
1002
 
693
1003
  .#{$name}-labels,
694
1004
  .#{$name}-legend {
695
- margin: 0;
696
- padding: 0;
697
- list-style: none;
1005
+ @include list-reset;
698
1006
  color: var(--md-sys-color-on-surface-variant);
699
1007
  @include typescale("body-small");
700
1008
  }
@@ -702,13 +1010,18 @@ $_chart-toggle-written: false;
702
1010
  .#{$name}-labels {
703
1011
  display: grid;
704
1012
  grid-auto-columns: minmax(0, 1fr);
705
- grid-auto-flow: column;
706
- text-align: center;
1013
+ @if $rows {
1014
+ grid-auto-rows: minmax(0, 1fr);
1015
+ grid-auto-flow: row;
1016
+ align-items: center;
1017
+ text-align: end;
1018
+ } @else {
1019
+ grid-auto-flow: column;
1020
+ text-align: center;
1021
+ }
707
1022
 
708
1023
  > li {
709
- overflow: hidden;
710
- text-overflow: ellipsis;
711
- white-space: nowrap;
1024
+ @include ellipsis;
712
1025
  }
713
1026
 
714
1027
  // When each label is wider than its column, LineChart keeps every nth
@@ -735,16 +1048,49 @@ $_chart-toggle-written: false;
735
1048
  }
736
1049
 
737
1050
  .#{$name}-legend {
738
- display: flex;
739
- flex-wrap: wrap;
740
- gap: 4px 16px;
1051
+ @if $legend-columns {
1052
+ $columns: auto minmax(0, 1fr);
1053
+ @for $i from 3 through $legend-columns {
1054
+ $columns: list.append($columns, auto);
1055
+ }
1056
+
1057
+ display: grid;
1058
+ grid-template-columns: $columns;
1059
+ align-items: center;
1060
+ flex-wrap: wrap;
1061
+ gap: 8px;
1062
+ } @else {
1063
+ display: flex;
1064
+ flex-wrap: wrap;
1065
+ gap: 4px 16px;
1066
+ }
741
1067
 
742
1068
  > li {
743
1069
  position: relative;
744
- display: flex;
1070
+ @if $legend-columns {
1071
+ display: contents;
1072
+ } @else {
1073
+ display: flex;
1074
+ }
745
1075
  align-items: center;
746
1076
  gap: 8px;
747
1077
  }
1078
+
1079
+ @if $legend-columns {
1080
+ > li > span:first-child {
1081
+ @include ellipsis;
1082
+ }
1083
+
1084
+ > li > span:not(:first-child) {
1085
+ text-align: end;
1086
+ font-variant-numeric: tabular-nums;
1087
+ }
1088
+
1089
+ > li > span:nth-child(2) {
1090
+ color: var(--md-sys-color-on-surface);
1091
+ font-weight: 500;
1092
+ }
1093
+ }
748
1094
  }
749
1095
 
750
1096
  // Series swatches.
@@ -758,15 +1104,57 @@ $_chart-toggle-written: false;
758
1104
  background-color: var(--#{$name}-color);
759
1105
  }
760
1106
 
1107
+ @if $lines {
1108
+ .#{$name}-line {
1109
+ fill: none;
1110
+ stroke: var(--#{$name}-color);
1111
+ stroke-width: var(--md-comp-#{$name}-line-width);
1112
+ stroke-linecap: round;
1113
+ stroke-linejoin: round;
1114
+ vector-effect: non-scaling-stroke;
1115
+ }
1116
+
1117
+ .#{$name}-series.dashed .#{$name}-line {
1118
+ stroke-dasharray: 2 8;
1119
+ }
1120
+
1121
+ // Round caps on zero-length lines: dots that keep their size at any scale.
1122
+ .#{$name}-points {
1123
+ fill: none;
1124
+ stroke: var(--#{$name}-color);
1125
+ stroke-width: calc(var(--md-comp-#{$name}-line-width) * 3);
1126
+ stroke-linecap: round;
1127
+ vector-effect: non-scaling-stroke;
1128
+ }
1129
+
1130
+ .#{$name}-series stop {
1131
+ stop-color: var(--#{$name}-color);
1132
+ stop-opacity: 0;
1133
+
1134
+ &:first-child {
1135
+ stop-opacity: 0.24;
1136
+ }
1137
+ }
1138
+ }
1139
+
761
1140
  .#{$name}.sparkline {
762
1141
  --md-comp-#{$name}-height: 48px;
1142
+ @if $lines {
1143
+ --md-comp-#{$name}-line-width: 2px;
1144
+ }
763
1145
  // Keep the taller hidden table from adding scrollable overflow. A
764
1146
  // sparkline has no tooltip or focus ring to clip.
765
1147
  overflow: clip;
766
1148
 
767
- .#{$name}-plot {
768
- border: 0;
769
- background: none;
1149
+ @if $grid {
1150
+ .#{$name}-plot {
1151
+ border: 0;
1152
+ background: none;
1153
+ }
1154
+ } @else if $round {
1155
+ .#{$name}-plot {
1156
+ margin-inline: 0;
1157
+ }
770
1158
  }
771
1159
 
772
1160
  .#{$name}-labels,
@@ -776,14 +1164,30 @@ $_chart-toggle-written: false;
776
1164
  }
777
1165
 
778
1166
  @media (forced-colors: active) {
779
- .#{$name}-plot {
780
- background: none;
1167
+ @if $grid {
1168
+ .#{$name}-plot {
1169
+ background: none;
1170
+ }
781
1171
  }
782
1172
 
783
1173
  .#{$name}-tooltip {
784
1174
  outline: 1px solid CanvasText;
785
1175
  }
786
1176
 
1177
+ @if $cursor == line {
1178
+ .#{$name}-cursor {
1179
+ background-color: CanvasText;
1180
+ }
1181
+
1182
+ .#{$name}-cursor > span {
1183
+ forced-color-adjust: none;
1184
+ }
1185
+ } @else if $cursor == band {
1186
+ .#{$name}-cursor {
1187
+ outline: 1px solid CanvasText;
1188
+ }
1189
+ }
1190
+
787
1191
  // The marks keep their colors, so the swatches that key them must too.
788
1192
  .#{$name}-legend > li::before,
789
1193
  .#{$name}-tooltip > span:nth-of-type(odd)::before {
@@ -844,9 +1248,7 @@ $_chart-toggle-written: false;
844
1248
  .#{$name}-axis {
845
1249
  position: absolute;
846
1250
  inset: 0;
847
- margin: 0;
848
- padding: 0;
849
- list-style: none;
1251
+ @include list-reset;
850
1252
  color: var(--md-sys-color-on-surface-variant);
851
1253
  @include typescale("body-small");
852
1254
  font-variant-numeric: tabular-nums;
@@ -865,10 +1267,8 @@ $_chart-toggle-written: false;
865
1267
  box-sizing: border-box;
866
1268
  width: var(--md-comp-#{$name}-axis-width);
867
1269
  padding-inline-end: 8px;
868
- overflow: hidden;
1270
+ @include ellipsis;
869
1271
  text-align: end;
870
- text-overflow: ellipsis;
871
- white-space: nowrap;
872
1272
  translate: 0 -50%;
873
1273
  }
874
1274