@expressivecss/expressive 0.15.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.
- package/CHANGELOG.md +1807 -1
- package/README.md +9 -8
- package/dist/css/expressive.css +19176 -11958
- package/dist/css/expressive.css.map +1 -1
- package/dist/css/expressive.min.css +1 -1
- package/dist/css/expressive.min.css.map +1 -1
- package/dist/fonts/LICENSE-noto-sans-arabic +93 -0
- package/dist/fonts/LICENSE-noto-sans-hebrew +93 -0
- package/dist/fonts/LICENSE-noto-sans-thai +93 -0
- package/dist/fonts/material-symbols-outlined.woff2 +0 -0
- package/dist/fonts/material-symbols-rounded.woff2 +0 -0
- package/dist/fonts/material-symbols-sharp.woff2 +0 -0
- package/dist/fonts/noto-sans-arabic-arabic-400.woff2 +0 -0
- package/dist/fonts/noto-sans-arabic-arabic-500.woff2 +0 -0
- package/dist/fonts/noto-sans-arabic-arabic-700.woff2 +0 -0
- package/dist/fonts/noto-sans-cyrillic-400.woff2 +0 -0
- package/dist/fonts/noto-sans-cyrillic-500.woff2 +0 -0
- package/dist/fonts/noto-sans-cyrillic-700.woff2 +0 -0
- package/dist/fonts/noto-sans-cyrillic-ext-400.woff2 +0 -0
- package/dist/fonts/noto-sans-cyrillic-ext-500.woff2 +0 -0
- package/dist/fonts/noto-sans-cyrillic-ext-700.woff2 +0 -0
- package/dist/fonts/noto-sans-devanagari-400.woff2 +0 -0
- package/dist/fonts/noto-sans-devanagari-500.woff2 +0 -0
- package/dist/fonts/noto-sans-devanagari-700.woff2 +0 -0
- package/dist/fonts/noto-sans-greek-400.woff2 +0 -0
- package/dist/fonts/noto-sans-greek-500.woff2 +0 -0
- package/dist/fonts/noto-sans-greek-700.woff2 +0 -0
- package/dist/fonts/noto-sans-greek-ext-400.woff2 +0 -0
- package/dist/fonts/noto-sans-greek-ext-500.woff2 +0 -0
- package/dist/fonts/noto-sans-greek-ext-700.woff2 +0 -0
- package/dist/fonts/noto-sans-hebrew-hebrew-400.woff2 +0 -0
- package/dist/fonts/noto-sans-hebrew-hebrew-500.woff2 +0 -0
- package/dist/fonts/noto-sans-hebrew-hebrew-700.woff2 +0 -0
- package/dist/fonts/noto-sans-latin-700.woff2 +0 -0
- package/dist/fonts/noto-sans-latin-ext-400.woff2 +0 -0
- package/dist/fonts/noto-sans-latin-ext-500.woff2 +0 -0
- package/dist/fonts/noto-sans-latin-ext-700.woff2 +0 -0
- package/dist/fonts/noto-sans-thai-thai-400.woff2 +0 -0
- package/dist/fonts/noto-sans-thai-thai-500.woff2 +0 -0
- package/dist/fonts/noto-sans-thai-thai-700.woff2 +0 -0
- package/dist/fonts/noto-sans-vietnamese-400.woff2 +0 -0
- package/dist/fonts/noto-sans-vietnamese-500.woff2 +0 -0
- package/dist/fonts/noto-sans-vietnamese-700.woff2 +0 -0
- package/dist/fonts/roboto-cyrillic-400.woff2 +0 -0
- package/dist/fonts/roboto-cyrillic-500.woff2 +0 -0
- package/dist/fonts/roboto-cyrillic-700.woff2 +0 -0
- package/dist/fonts/roboto-cyrillic-ext-400.woff2 +0 -0
- package/dist/fonts/roboto-cyrillic-ext-500.woff2 +0 -0
- package/dist/fonts/roboto-cyrillic-ext-700.woff2 +0 -0
- package/dist/fonts/roboto-greek-400.woff2 +0 -0
- package/dist/fonts/roboto-greek-500.woff2 +0 -0
- package/dist/fonts/roboto-greek-700.woff2 +0 -0
- package/dist/fonts/roboto-greek-ext-400.woff2 +0 -0
- package/dist/fonts/roboto-greek-ext-500.woff2 +0 -0
- package/dist/fonts/roboto-greek-ext-700.woff2 +0 -0
- package/dist/fonts/roboto-latin-700.woff2 +0 -0
- package/dist/fonts/roboto-latin-ext-400.woff2 +0 -0
- package/dist/fonts/roboto-latin-ext-500.woff2 +0 -0
- package/dist/fonts/roboto-latin-ext-700.woff2 +0 -0
- package/dist/fonts/roboto-vietnamese-400.woff2 +0 -0
- package/dist/fonts/roboto-vietnamese-500.woff2 +0 -0
- package/dist/fonts/roboto-vietnamese-700.woff2 +0 -0
- package/dist/js/chunks/chunk-26VUH75M.mjs +102 -0
- package/dist/js/chunks/chunk-26VUH75M.mjs.map +7 -0
- package/dist/js/chunks/chunk-2LFCOGC3.mjs +233 -0
- package/dist/js/chunks/chunk-2LFCOGC3.mjs.map +7 -0
- package/dist/js/chunks/{chunk-DXGRXYYL.mjs → chunk-36GELQGX.mjs} +29 -46
- package/dist/js/chunks/chunk-36GELQGX.mjs.map +7 -0
- package/dist/js/chunks/{chunk-74MXKKLN.mjs → chunk-3FKWIRHW.mjs} +15 -29
- package/dist/js/chunks/chunk-3FKWIRHW.mjs.map +7 -0
- package/dist/js/chunks/chunk-3KF65KGL.mjs +209 -0
- package/dist/js/chunks/chunk-3KF65KGL.mjs.map +7 -0
- package/dist/js/chunks/{chunk-KVJAVDBC.mjs → chunk-3KLZRQZI.mjs} +88 -116
- package/dist/js/chunks/chunk-3KLZRQZI.mjs.map +7 -0
- package/dist/js/chunks/{chunk-CK2XCICY.mjs → chunk-3XORNED5.mjs} +3 -11
- package/dist/js/chunks/chunk-3XORNED5.mjs.map +7 -0
- package/dist/js/chunks/chunk-4WBGAQN3.mjs +113 -0
- package/dist/js/chunks/chunk-4WBGAQN3.mjs.map +7 -0
- package/dist/js/chunks/{chunk-FM5CZOUB.mjs → chunk-5F4URJHL.mjs} +19 -30
- package/dist/js/chunks/chunk-5F4URJHL.mjs.map +7 -0
- package/dist/js/chunks/chunk-67UNY7RH.mjs +299 -0
- package/dist/js/chunks/chunk-67UNY7RH.mjs.map +7 -0
- package/dist/js/chunks/chunk-7CXNATJS.mjs +97 -0
- package/dist/js/chunks/chunk-7CXNATJS.mjs.map +7 -0
- package/dist/js/chunks/{chunk-UETTGDLI.mjs → chunk-7X44MKEQ.mjs} +43 -48
- package/dist/js/chunks/chunk-7X44MKEQ.mjs.map +7 -0
- package/dist/js/chunks/chunk-7ZAMOMGY.mjs +440 -0
- package/dist/js/chunks/chunk-7ZAMOMGY.mjs.map +7 -0
- package/dist/js/chunks/chunk-AEG6LOAJ.mjs +54 -0
- package/dist/js/chunks/chunk-AEG6LOAJ.mjs.map +7 -0
- package/dist/js/chunks/chunk-AQNFCJJ5.mjs +135 -0
- package/dist/js/chunks/chunk-AQNFCJJ5.mjs.map +7 -0
- package/dist/js/chunks/chunk-B55LWKBM.mjs +75 -0
- package/dist/js/chunks/chunk-B55LWKBM.mjs.map +7 -0
- package/dist/js/chunks/chunk-BB5VXYXT.mjs +28 -0
- package/dist/js/chunks/chunk-BB5VXYXT.mjs.map +7 -0
- package/dist/js/chunks/chunk-BDATLH3H.mjs +108 -0
- package/dist/js/chunks/chunk-BDATLH3H.mjs.map +7 -0
- package/dist/js/chunks/chunk-CWMQOT4O.mjs +232 -0
- package/dist/js/chunks/chunk-CWMQOT4O.mjs.map +7 -0
- package/dist/js/chunks/chunk-CY2CTOVM.mjs +81 -0
- package/dist/js/chunks/chunk-CY2CTOVM.mjs.map +7 -0
- package/dist/js/chunks/{chunk-NUHMOAOY.mjs → chunk-DWA5UYLJ.mjs} +363 -218
- package/dist/js/chunks/chunk-DWA5UYLJ.mjs.map +7 -0
- package/dist/js/chunks/chunk-EB2V4OKL.mjs +79 -0
- package/dist/js/chunks/chunk-EB2V4OKL.mjs.map +7 -0
- package/dist/js/chunks/chunk-EWO662ZC.mjs +188 -0
- package/dist/js/chunks/chunk-EWO662ZC.mjs.map +7 -0
- package/dist/js/chunks/{chunk-ZX6M7SWO.mjs → chunk-F7LAKFMX.mjs} +320 -141
- package/dist/js/chunks/chunk-F7LAKFMX.mjs.map +7 -0
- package/dist/js/chunks/{chunk-L27Q6ZMI.mjs → chunk-FNIIH2LU.mjs} +20 -33
- package/dist/js/chunks/chunk-FNIIH2LU.mjs.map +7 -0
- package/dist/js/chunks/chunk-GE3YMFS6.mjs +15 -0
- package/dist/js/chunks/chunk-GE3YMFS6.mjs.map +7 -0
- package/dist/js/chunks/chunk-GFWYMWYN.mjs +125 -0
- package/dist/js/chunks/chunk-GFWYMWYN.mjs.map +7 -0
- package/dist/js/chunks/chunk-GNRSYMVH.mjs +1 -0
- package/dist/js/chunks/chunk-H5ISU45X.mjs +87 -0
- package/dist/js/chunks/chunk-H5ISU45X.mjs.map +7 -0
- package/dist/js/chunks/{chunk-GJL6GCIU.mjs → chunk-H6YIKFAQ.mjs} +311 -186
- package/dist/js/chunks/chunk-H6YIKFAQ.mjs.map +7 -0
- package/dist/js/chunks/{chunk-BGZLF6JZ.mjs → chunk-HEH7E3KO.mjs} +155 -35
- package/dist/js/chunks/chunk-HEH7E3KO.mjs.map +7 -0
- package/dist/js/chunks/chunk-HQRLBTNM.mjs +152 -0
- package/dist/js/chunks/chunk-HQRLBTNM.mjs.map +7 -0
- package/dist/js/chunks/chunk-I2F7MLUU.mjs +137 -0
- package/dist/js/chunks/chunk-I2F7MLUU.mjs.map +7 -0
- package/dist/js/chunks/chunk-IQOTGGHX.mjs +797 -0
- package/dist/js/chunks/chunk-IQOTGGHX.mjs.map +7 -0
- package/dist/js/chunks/chunk-JH3YWKA6.mjs +225 -0
- package/dist/js/chunks/chunk-JH3YWKA6.mjs.map +7 -0
- package/dist/js/chunks/chunk-JOLJAYIJ.mjs +7 -0
- package/dist/js/chunks/chunk-JOLJAYIJ.mjs.map +7 -0
- package/dist/js/chunks/{chunk-VGNYF6FB.mjs → chunk-KOTGMCMI.mjs} +116 -24
- package/dist/js/chunks/chunk-KOTGMCMI.mjs.map +7 -0
- package/dist/js/chunks/{chunk-LQWUDNHZ.mjs → chunk-LC4O5LFS.mjs} +21 -45
- package/dist/js/chunks/chunk-LC4O5LFS.mjs.map +7 -0
- package/dist/js/chunks/chunk-LEF33SCP.mjs +127 -0
- package/dist/js/chunks/chunk-LEF33SCP.mjs.map +7 -0
- package/dist/js/chunks/{chunk-PDG64UHF.mjs → chunk-LFORZRPH.mjs} +21 -23
- package/dist/js/chunks/chunk-LFORZRPH.mjs.map +7 -0
- package/dist/js/chunks/chunk-LWLNV5EC.mjs +451 -0
- package/dist/js/chunks/chunk-LWLNV5EC.mjs.map +7 -0
- package/dist/js/chunks/chunk-LXRHUQAX.mjs +491 -0
- package/dist/js/chunks/chunk-LXRHUQAX.mjs.map +7 -0
- package/dist/js/chunks/{chunk-SFI2U4YW.mjs → chunk-MA2SZZFB.mjs} +82 -111
- package/dist/js/chunks/chunk-MA2SZZFB.mjs.map +7 -0
- package/dist/js/chunks/chunk-MDBZAMIV.mjs +121 -0
- package/dist/js/chunks/chunk-MDBZAMIV.mjs.map +7 -0
- package/dist/js/chunks/chunk-NODZ5VAD.mjs +75 -0
- package/dist/js/chunks/chunk-NODZ5VAD.mjs.map +7 -0
- package/dist/js/chunks/chunk-O2WJB6TH.mjs +365 -0
- package/dist/js/chunks/chunk-O2WJB6TH.mjs.map +7 -0
- package/dist/js/chunks/chunk-PCABY5BN.mjs +35 -0
- package/dist/js/chunks/chunk-PCABY5BN.mjs.map +7 -0
- package/dist/js/chunks/chunk-PWKYVMND.mjs +120 -0
- package/dist/js/chunks/chunk-PWKYVMND.mjs.map +7 -0
- package/dist/js/chunks/{chunk-SMY7GJSS.mjs → chunk-QHZZT7YO.mjs} +66 -38
- package/dist/js/chunks/chunk-QHZZT7YO.mjs.map +7 -0
- package/dist/js/chunks/chunk-QND56EW2.mjs +439 -0
- package/dist/js/chunks/chunk-QND56EW2.mjs.map +7 -0
- package/dist/js/chunks/chunk-QNODAANY.mjs +376 -0
- package/dist/js/chunks/chunk-QNODAANY.mjs.map +7 -0
- package/dist/js/chunks/{chunk-KHXZ2A4K.mjs → chunk-QRO5FV3I.mjs} +156 -73
- package/dist/js/chunks/chunk-QRO5FV3I.mjs.map +7 -0
- package/dist/js/chunks/chunk-R7A7JRC5.mjs +440 -0
- package/dist/js/chunks/chunk-R7A7JRC5.mjs.map +7 -0
- package/dist/js/chunks/chunk-RKG2CBFE.mjs +74 -0
- package/dist/js/chunks/chunk-RKG2CBFE.mjs.map +7 -0
- package/dist/js/chunks/{chunk-XAEAEHIX.mjs → chunk-RSNS5OYS.mjs} +38 -25
- package/dist/js/chunks/chunk-RSNS5OYS.mjs.map +7 -0
- package/dist/js/chunks/{chunk-X4ISMKE2.mjs → chunk-RUDYMEJ3.mjs} +7 -6
- package/dist/js/chunks/chunk-RUDYMEJ3.mjs.map +7 -0
- package/dist/js/chunks/chunk-STJR62SU.mjs +161 -0
- package/dist/js/chunks/chunk-STJR62SU.mjs.map +7 -0
- package/dist/js/chunks/chunk-SUSD4UTN.mjs +220 -0
- package/dist/js/chunks/chunk-SUSD4UTN.mjs.map +7 -0
- package/dist/js/chunks/{chunk-5CEAOLUA.mjs → chunk-SYBOA5HC.mjs} +26 -48
- package/dist/js/chunks/chunk-SYBOA5HC.mjs.map +7 -0
- package/dist/js/chunks/chunk-T4MOBP3J.mjs +108 -0
- package/dist/js/chunks/chunk-T4MOBP3J.mjs.map +7 -0
- package/dist/js/chunks/chunk-TM7HPGTV.mjs +342 -0
- package/dist/js/chunks/chunk-TM7HPGTV.mjs.map +7 -0
- package/dist/js/chunks/{chunk-C6CHEWYP.mjs → chunk-TMQDZSDC.mjs} +71 -35
- package/dist/js/chunks/chunk-TMQDZSDC.mjs.map +7 -0
- package/dist/js/chunks/chunk-TVSX5YA2.mjs +48 -0
- package/dist/js/chunks/chunk-TVSX5YA2.mjs.map +7 -0
- package/dist/js/chunks/chunk-UHO5CV6K.mjs +80 -0
- package/dist/js/chunks/chunk-UHO5CV6K.mjs.map +7 -0
- package/dist/js/chunks/chunk-UKCNELUN.mjs +223 -0
- package/dist/js/chunks/chunk-UKCNELUN.mjs.map +7 -0
- package/dist/js/chunks/chunk-UKQK5GWR.mjs +167 -0
- package/dist/js/chunks/chunk-UKQK5GWR.mjs.map +7 -0
- package/dist/js/chunks/{chunk-TSZYSW7F.mjs → chunk-UTSLYQ65.mjs} +21 -48
- package/dist/js/chunks/chunk-UTSLYQ65.mjs.map +7 -0
- package/dist/js/chunks/chunk-VS5OJBOD.mjs +108 -0
- package/dist/js/chunks/chunk-VS5OJBOD.mjs.map +7 -0
- package/dist/js/chunks/chunk-VZMROW5A.mjs +759 -0
- package/dist/js/chunks/chunk-VZMROW5A.mjs.map +7 -0
- package/dist/js/chunks/chunk-W6FAL3TI.mjs +38 -0
- package/dist/js/chunks/chunk-W6FAL3TI.mjs.map +7 -0
- package/dist/js/chunks/chunk-XB6Y7P5W.mjs +69 -0
- package/dist/js/chunks/chunk-XB6Y7P5W.mjs.map +7 -0
- package/dist/js/chunks/chunk-XDAMOMVD.mjs +226 -0
- package/dist/js/chunks/chunk-XDAMOMVD.mjs.map +7 -0
- package/dist/js/chunks/{chunk-WDK4T63U.mjs → chunk-XJPMW5SP.mjs} +247 -172
- package/dist/js/chunks/chunk-XJPMW5SP.mjs.map +7 -0
- package/dist/js/chunks/{chunk-KUFHW3DS.mjs → chunk-YKANQILZ.mjs} +16 -21
- package/dist/js/chunks/chunk-YKANQILZ.mjs.map +7 -0
- package/dist/js/chunks/chunk-YLZOJLDI.mjs +175 -0
- package/dist/js/chunks/chunk-YLZOJLDI.mjs.map +7 -0
- package/dist/js/chunks/chunk-ZK7YY322.mjs +514 -0
- package/dist/js/chunks/chunk-ZK7YY322.mjs.map +7 -0
- package/dist/js/expressive.cjs +10266 -3628
- package/dist/js/expressive.cjs.map +4 -4
- package/dist/js/expressive.js +10266 -3628
- package/dist/js/expressive.js.map +4 -4
- package/dist/js/expressive.min.js +23 -22
- package/dist/js/expressive.min.js.map +4 -4
- package/dist/js/expressive.mjs +181 -69
- package/dist/js/expressive.mjs.map +2 -2
- package/dist/js/internal/behaviors/bottomSheets.mjs +4 -3
- package/dist/js/internal/behaviors/copy.mjs +9 -0
- package/dist/js/internal/behaviors/copy.mjs.map +7 -0
- package/dist/js/internal/behaviors/dataTables.mjs +8 -0
- package/dist/js/internal/behaviors/dataTables.mjs.map +7 -0
- package/dist/js/internal/behaviors/dialogs.mjs +2 -2
- package/dist/js/internal/behaviors/forms.mjs +2 -2
- package/dist/js/internal/behaviors/imageCompare.mjs +8 -0
- package/dist/js/internal/behaviors/imageCompare.mjs.map +7 -0
- package/dist/js/internal/behaviors/lists.mjs +8 -0
- package/dist/js/internal/behaviors/lists.mjs.map +7 -0
- package/dist/js/internal/behaviors/paneResize.mjs +8 -0
- package/dist/js/internal/behaviors/paneResize.mjs.map +7 -0
- package/dist/js/internal/behaviors/sheetDrag.mjs +7 -2
- package/dist/js/internal/behaviors/sideSheets.mjs +4 -3
- package/dist/js/internal/behaviors/sortable.mjs +8 -0
- package/dist/js/internal/behaviors/sortable.mjs.map +7 -0
- package/dist/js/internal/behaviors/theme.mjs +8 -0
- package/dist/js/internal/behaviors/theme.mjs.map +7 -0
- package/dist/js/internal/behaviors/tour.mjs +8 -0
- package/dist/js/internal/behaviors/tour.mjs.map +7 -0
- package/dist/js/internal/behaviors/transferList.mjs +8 -0
- package/dist/js/internal/behaviors/transferList.mjs.map +7 -0
- package/dist/js/internal/components/appBar.mjs +3 -2
- package/dist/js/internal/components/autocomplete.mjs +5 -4
- package/dist/js/internal/components/backToTop.mjs +9 -0
- package/dist/js/internal/components/backToTop.mjs.map +7 -0
- package/dist/js/internal/components/barChart.mjs +5 -4
- package/dist/js/internal/components/buttonGroup.mjs +3 -2
- package/dist/js/internal/components/buttons.mjs +3 -3
- package/dist/js/internal/components/cards.mjs +3 -3
- package/dist/js/internal/components/carousel.mjs +3 -3
- package/dist/js/internal/components/cascader.mjs +10 -0
- package/dist/js/internal/components/cascader.mjs.map +7 -0
- package/dist/js/internal/components/characterCounter.mjs +3 -2
- package/dist/js/internal/components/chips.mjs +7 -5
- package/dist/js/internal/components/colorPicker.mjs +9 -0
- package/dist/js/internal/components/colorPicker.mjs.map +7 -0
- package/dist/js/internal/components/columnChart.mjs +4 -3
- package/dist/js/internal/components/commandPalette.mjs +3 -3
- package/dist/js/internal/components/confetti.mjs +3 -2
- package/dist/js/internal/components/currencyInput.mjs +9 -0
- package/dist/js/internal/components/currencyInput.mjs.map +7 -0
- package/dist/js/internal/components/datepicker.mjs +12 -8
- package/dist/js/internal/components/expandingCard.mjs +3 -3
- package/dist/js/internal/components/funnelChart.mjs +10 -0
- package/dist/js/internal/components/funnelChart.mjs.map +7 -0
- package/dist/js/internal/components/heatmapChart.mjs +4 -3
- package/dist/js/internal/components/hoverCard.mjs +9 -0
- package/dist/js/internal/components/hoverCard.mjs.map +7 -0
- package/dist/js/internal/components/index.mjs +131 -65
- package/dist/js/internal/components/inputMask.mjs +9 -0
- package/dist/js/internal/components/inputMask.mjs.map +7 -0
- package/dist/js/internal/components/keypad.mjs +3 -3
- package/dist/js/internal/components/lightbox.mjs +3 -3
- package/dist/js/internal/components/lineChart.mjs +41 -4
- package/dist/js/internal/components/loadingOverlay.mjs +9 -0
- package/dist/js/internal/components/loadingOverlay.mjs.map +7 -0
- package/dist/js/internal/components/mapView.mjs +3 -3
- package/dist/js/internal/components/menu.mjs +3 -3
- package/dist/js/internal/components/menubar.mjs +10 -0
- package/dist/js/internal/components/menubar.mjs.map +7 -0
- package/dist/js/internal/components/messageScroller.mjs +3 -3
- package/dist/js/internal/components/mixedChart.mjs +5 -4
- package/dist/js/internal/components/navigationRail.mjs +3 -2
- package/dist/js/internal/components/particles.mjs +3 -2
- package/dist/js/internal/components/pieChart.mjs +4 -3
- package/dist/js/internal/components/pullToRefresh.mjs +9 -0
- package/dist/js/internal/components/pullToRefresh.mjs.map +7 -0
- package/dist/js/internal/components/questionnaire.mjs +3 -3
- package/dist/js/internal/components/radarChart.mjs +4 -3
- package/dist/js/internal/components/radialChart.mjs +4 -3
- package/dist/js/internal/components/registry.mjs +60 -41
- package/dist/js/internal/components/richTextEditor.mjs +3 -3
- package/dist/js/internal/components/sankeyChart.mjs +10 -0
- package/dist/js/internal/components/sankeyChart.mjs.map +7 -0
- package/dist/js/internal/components/scatterChart.mjs +10 -0
- package/dist/js/internal/components/scatterChart.mjs.map +7 -0
- package/dist/js/internal/components/scrollspy.mjs +3 -2
- package/dist/js/internal/components/select.mjs +5 -4
- package/dist/js/internal/components/showMore.mjs +9 -0
- package/dist/js/internal/components/showMore.mjs.map +7 -0
- package/dist/js/internal/components/slider.mjs +3 -3
- package/dist/js/internal/components/snackbar.mjs +2 -2
- package/dist/js/internal/components/swipeActions.mjs +9 -0
- package/dist/js/internal/components/swipeActions.mjs.map +7 -0
- package/dist/js/internal/components/tabs.mjs +3 -4
- package/dist/js/internal/components/timepicker.mjs +5 -4
- package/dist/js/internal/components/tooltip.mjs +3 -3
- package/dist/js/internal/components/treeSelect.mjs +14 -0
- package/dist/js/internal/components/treeSelect.mjs.map +7 -0
- package/dist/js/internal/components/treemapChart.mjs +10 -0
- package/dist/js/internal/components/treemapChart.mjs.map +7 -0
- package/dist/js/internal/core/component.mjs +6 -3
- package/dist/js/internal/core/formControl.mjs +12 -0
- package/dist/js/internal/core/formControl.mjs.map +7 -0
- package/dist/js/internal/core/imageURL.mjs +7 -0
- package/dist/js/internal/core/imageURL.mjs.map +7 -0
- package/dist/js/internal/core/spring.mjs +11 -0
- package/dist/js/internal/core/spring.mjs.map +7 -0
- package/dist/js/internal/core/utils.mjs +21 -3
- package/dist/js/internal/plugins/dockedDisplayPlugin.mjs +2 -2
- package/dist/js/internal/plugins/modalDisplayPlugin.mjs +13 -0
- package/dist/js/internal/plugins/modalDisplayPlugin.mjs.map +7 -0
- package/dist/js/modular.mjs +172 -69
- package/dist/types/behaviors/bottomSheets.d.ts +23 -5
- package/dist/types/behaviors/copy.d.ts +18 -0
- package/dist/types/behaviors/dataTables.d.ts +125 -0
- package/dist/types/behaviors/dialogs.d.ts +27 -1
- package/dist/types/behaviors/forms.d.ts +70 -4
- package/dist/types/behaviors/imageCompare.d.ts +13 -0
- package/dist/types/behaviors/lists.d.ts +12 -0
- package/dist/types/behaviors/paneResize.d.ts +29 -0
- package/dist/types/behaviors/sheetDrag.d.ts +18 -0
- package/dist/types/behaviors/sideSheets.d.ts +1 -1
- package/dist/types/behaviors/sortable.d.ts +28 -0
- package/dist/types/behaviors/theme.d.ts +22 -0
- package/dist/types/behaviors/tour.d.ts +36 -0
- package/dist/types/behaviors/transferList.d.ts +53 -0
- package/dist/types/components/appBar.d.ts +5 -6
- package/dist/types/components/autocomplete.d.ts +105 -20
- package/dist/types/components/backToTop.d.ts +36 -0
- package/dist/types/components/barChart.d.ts +3 -6
- package/dist/types/components/buttonGroup.d.ts +2 -4
- package/dist/types/components/buttons.d.ts +5 -5
- package/dist/types/components/cards.d.ts +3 -16
- package/dist/types/components/carousel.d.ts +16 -15
- package/dist/types/components/cascader.d.ts +130 -0
- package/dist/types/components/characterCounter.d.ts +2 -15
- package/dist/types/components/chips.d.ts +80 -19
- package/dist/types/components/colorPicker.d.ts +56 -0
- package/dist/types/components/columnChart.d.ts +23 -10
- package/dist/types/components/commandPalette.d.ts +11 -16
- package/dist/types/components/confetti.d.ts +2 -4
- package/dist/types/components/currencyInput.d.ts +60 -0
- package/dist/types/components/datepicker.d.ts +107 -56
- package/dist/types/components/expandingCard.d.ts +4 -6
- package/dist/types/components/funnelChart.d.ts +35 -0
- package/dist/types/components/heatmapChart.d.ts +42 -8
- package/dist/types/components/hoverCard.d.ts +59 -0
- package/dist/types/components/index.d.ts +16 -1
- package/dist/types/components/inputMask.d.ts +28 -0
- package/dist/types/components/keypad.d.ts +38 -6
- package/dist/types/components/lightbox.d.ts +14 -20
- package/dist/types/components/lineChart.d.ts +212 -12
- package/dist/types/components/loadingOverlay.d.ts +42 -0
- package/dist/types/components/mapView.d.ts +138 -27
- package/dist/types/components/menu.d.ts +74 -22
- package/dist/types/components/menubar.d.ts +37 -0
- package/dist/types/components/messageScroller.d.ts +2 -14
- package/dist/types/components/mixedChart.d.ts +15 -6
- package/dist/types/components/navigationRail.d.ts +16 -5
- package/dist/types/components/particles.d.ts +22 -5
- package/dist/types/components/pieChart.d.ts +33 -9
- package/dist/types/components/pullToRefresh.d.ts +80 -0
- package/dist/types/components/questionnaire.d.ts +58 -16
- package/dist/types/components/radarChart.d.ts +10 -6
- package/dist/types/components/radialChart.d.ts +58 -7
- package/dist/types/components/registry.d.ts +73 -3
- package/dist/types/components/richTextEditor.d.ts +45 -22
- package/dist/types/components/sankeyChart.d.ts +72 -0
- package/dist/types/components/scatterChart.d.ts +102 -0
- package/dist/types/components/scrollspy.d.ts +3 -5
- package/dist/types/components/select.d.ts +44 -33
- package/dist/types/components/showMore.d.ts +53 -0
- package/dist/types/components/slider.d.ts +2 -15
- package/dist/types/components/snackbar.d.ts +68 -1
- package/dist/types/components/swipeActions.d.ts +81 -0
- package/dist/types/components/tabs.d.ts +92 -30
- package/dist/types/components/timepicker.d.ts +128 -27
- package/dist/types/components/tooltip.d.ts +57 -21
- package/dist/types/components/treeSelect.d.ts +106 -0
- package/dist/types/components/treemapChart.d.ts +56 -0
- package/dist/types/core/component.d.ts +49 -25
- package/dist/types/core/formControl.d.ts +21 -0
- package/dist/types/core/imageURL.d.ts +2 -0
- package/dist/types/core/spring.d.ts +20 -0
- package/dist/types/core/utils.d.ts +123 -72
- package/dist/types/modular.d.ts +33 -1
- package/dist/types/plugins/dockedDisplayPlugin.d.ts +10 -8
- package/dist/types/plugins/modalDisplayPlugin.d.ts +39 -0
- package/package.json +17 -13
- package/src/sass/README.md +27 -18
- package/src/sass/abstracts/_elevation.scss +13 -7
- package/src/sass/abstracts/_index.scss +1 -0
- package/src/sass/abstracts/_mixins.scss +864 -78
- package/src/sass/abstracts/_spring.scss +63 -0
- package/src/sass/abstracts/_variables.scss +64 -21
- package/src/sass/base/_fonts.scss +61 -48
- package/src/sass/base/_global.scss +104 -24
- package/src/sass/base/_index.scss +2 -0
- package/src/sass/base/_normalize.scss +59 -114
- package/src/sass/base/_print.scss +21 -0
- package/src/sass/base/_prose.scss +68 -0
- package/src/sass/base/_typography.scss +9 -5
- package/src/sass/components/_accordion.scss +10 -19
- package/src/sass/components/_alert.scss +102 -0
- package/src/sass/components/_aura.scss +9 -3
- package/src/sass/components/_avatar.scss +3 -3
- package/src/sass/components/_back-to-top.scss +38 -0
- package/src/sass/components/_badges.scss +6 -5
- package/src/sass/components/_bar-chart.scss +31 -90
- package/src/sass/components/_bottom-sheet.scss +51 -16
- package/src/sass/components/_breadcrumb.scss +8 -7
- package/src/sass/components/_button-groups.scss +30 -63
- package/src/sass/components/_buttons.scss +137 -94
- package/src/sass/components/_calendar.scss +244 -0
- package/src/sass/components/_cards.scss +36 -44
- package/src/sass/components/_carousel.scss +37 -113
- package/src/sass/components/_cascader.scss +131 -0
- package/src/sass/components/_chips.scss +36 -46
- package/src/sass/components/_column-chart.scss +15 -26
- package/src/sass/components/_command-palette.scss +4 -7
- package/src/sass/components/_confetti.scss +1 -4
- package/src/sass/components/_countdown.scss +1 -1
- package/src/sass/components/_data-table.scss +172 -25
- package/src/sass/components/_datepicker.scss +54 -40
- package/src/sass/components/_description-list.scss +85 -0
- package/src/sass/components/_dialog.scss +48 -55
- package/src/sass/components/_docked-display.scss +1 -3
- package/src/sass/components/_drag-handle.scss +16 -20
- package/src/sass/components/_expanding-card.scss +21 -14
- package/src/sass/components/_fab-menu.scss +43 -39
- package/src/sass/components/_funnel-chart.scss +63 -0
- package/src/sass/components/_heatmap-chart.scss +114 -29
- package/src/sass/components/_icon-buttons.scss +8 -11
- package/src/sass/components/_icons-material-design.scss +2 -2
- package/src/sass/components/_image-compare.scss +108 -0
- package/src/sass/components/_index.scss +20 -0
- package/src/sass/components/_keypad.scss +39 -19
- package/src/sass/components/_kpi.scss +6 -11
- package/src/sass/components/_lightbox.scss +24 -13
- package/src/sass/components/_line-chart.scss +9 -63
- package/src/sass/components/_list.scss +59 -14
- package/src/sass/components/_loading-indicator.scss +1 -0
- package/src/sass/components/_loading-overlay.scss +105 -0
- package/src/sass/components/_map.scss +37 -11
- package/src/sass/components/_marquee.scss +4 -3
- package/src/sass/components/_mega-menu.scss +128 -0
- package/src/sass/components/_menu.scss +146 -127
- package/src/sass/components/_menubar.scss +47 -0
- package/src/sass/components/_message-scroller.scss +2 -2
- package/src/sass/components/_message.scss +3 -3
- package/src/sass/components/_mixed-chart.scss +27 -35
- package/src/sass/components/_modal-display.scss +21 -0
- package/src/sass/components/_navbar.scss +45 -36
- package/src/sass/components/_navigation-bar.scss +12 -77
- package/src/sass/components/_navigation-rail.scss +161 -92
- package/src/sass/components/_org-chart.scss +192 -0
- package/src/sass/components/_page-footer.scss +2 -4
- package/src/sass/components/_pagination.scss +9 -27
- package/src/sass/components/_panes.scss +35 -42
- package/src/sass/components/_particles.scss +1 -4
- package/src/sass/components/_pie-chart.scss +86 -68
- package/src/sass/components/_popover.scss +18 -5
- package/src/sass/components/_progress.scss +183 -44
- package/src/sass/components/_pull-to-refresh.scss +90 -0
- package/src/sass/components/_questionnaire.scss +74 -3
- package/src/sass/components/_radar-chart.scss +40 -42
- package/src/sass/components/_radial-chart.scss +108 -46
- package/src/sass/components/_rich-text-editor.scss +2 -2
- package/src/sass/components/_sankey-chart.scss +91 -0
- package/src/sass/components/_scatter-chart.scss +144 -0
- package/src/sass/components/_scrim.scss +0 -2
- package/src/sass/components/_scrollspy.scss +0 -2
- package/src/sass/components/_search.scss +27 -26
- package/src/sass/components/_show-more.scss +8 -0
- package/src/sass/components/_side-sheet.scss +32 -51
- package/src/sass/components/_skeleton.scss +26 -19
- package/src/sass/components/_snackbar.scss +25 -21
- package/src/sass/components/_split-button.scss +5 -5
- package/src/sass/components/_stat.scss +3 -8
- package/src/sass/components/_stepper.scss +1 -1
- package/src/sass/components/_swipe-actions.scss +71 -0
- package/src/sass/components/_table_of_contents.scss +1 -3
- package/src/sass/components/_tabs.scss +49 -46
- package/src/sass/components/_timeline.scss +12 -12
- package/src/sass/components/_timepicker.scss +111 -79
- package/src/sass/components/_toolbar.scss +36 -47
- package/src/sass/components/_tooltip.scss +25 -12
- package/src/sass/components/_tour.scss +89 -0
- package/src/sass/components/_transfer-list.scss +73 -0
- package/src/sass/components/_transitions.scss +4 -4
- package/src/sass/components/_tree.scss +7 -32
- package/src/sass/components/_treemap-chart.scss +98 -0
- package/src/sass/components/forms/_checkboxes.scss +107 -44
- package/src/sass/components/forms/_color-picker.scss +135 -0
- package/src/sass/components/forms/_color-swatches.scss +85 -0
- package/src/sass/components/forms/_drop-zone.scss +16 -13
- package/src/sass/components/forms/_fieldset.scss +4 -7
- package/src/sass/components/forms/_file-input.scss +12 -8
- package/src/sass/components/forms/_index.scss +3 -1
- package/src/sass/components/forms/_input-fields.scss +271 -90
- package/src/sass/components/forms/_radio-buttons.scss +34 -117
- package/src/sass/components/forms/_rating.scss +2 -32
- package/src/sass/components/forms/_select.scss +198 -20
- package/src/sass/components/forms/_slider.scss +92 -98
- package/src/sass/components/forms/_switches.scss +62 -180
- package/src/sass/custom.scss +10 -1
- package/src/sass/expressive.scss +3 -63
- package/src/sass/tokens/_contrast.scss +94 -0
- package/src/sass/tokens/_elevation.scss +16 -0
- package/src/sass/tokens/_index.scss +5 -0
- package/src/sass/tokens/_motion.scss +109 -0
- package/src/sass/tokens/_reference.scss +72 -141
- package/src/sass/tokens/_shape.scss +38 -0
- package/src/sass/tokens/_stacking.scss +27 -0
- package/src/sass/tokens/_state.scss +0 -2
- package/src/sass/tokens/_theme.scss +10 -1
- package/src/sass/tokens/_vibrant.scss +2 -5
- package/src/sass/utilities/_defer-render.scss +17 -0
- package/src/sass/utilities/_helpers.scss +184 -27
- package/src/sass/utilities/_index.scss +1 -0
- package/src/sass/utilities/_scroll-area.scss +0 -2
- package/src/sass/utilities/_spacing.scss +52 -34
- package/src/sass/utilities/_typescale.scss +8 -1
- package/src/sass/utilities/_visibility.scss +46 -77
- package/src/sass/utilities/_z-depth.scss +7 -4
- package/dist/js/chunks/chunk-33QVDDGR.mjs +0 -270
- package/dist/js/chunks/chunk-33QVDDGR.mjs.map +0 -7
- package/dist/js/chunks/chunk-45FER6RI.mjs +0 -59
- package/dist/js/chunks/chunk-45FER6RI.mjs.map +0 -7
- package/dist/js/chunks/chunk-5CEAOLUA.mjs.map +0 -7
- package/dist/js/chunks/chunk-6VATUZC6.mjs +0 -295
- package/dist/js/chunks/chunk-6VATUZC6.mjs.map +0 -7
- package/dist/js/chunks/chunk-74MXKKLN.mjs.map +0 -7
- package/dist/js/chunks/chunk-AIURVCG6.mjs +0 -55
- package/dist/js/chunks/chunk-AIURVCG6.mjs.map +0 -7
- package/dist/js/chunks/chunk-BGZLF6JZ.mjs.map +0 -7
- package/dist/js/chunks/chunk-C6CHEWYP.mjs.map +0 -7
- package/dist/js/chunks/chunk-CK2XCICY.mjs.map +0 -7
- package/dist/js/chunks/chunk-CXXM2L4F.mjs +0 -344
- package/dist/js/chunks/chunk-CXXM2L4F.mjs.map +0 -7
- package/dist/js/chunks/chunk-DXGRXYYL.mjs.map +0 -7
- package/dist/js/chunks/chunk-FM5CZOUB.mjs.map +0 -7
- package/dist/js/chunks/chunk-GJL6GCIU.mjs.map +0 -7
- package/dist/js/chunks/chunk-K3HZMFMD.mjs +0 -135
- package/dist/js/chunks/chunk-K3HZMFMD.mjs.map +0 -7
- package/dist/js/chunks/chunk-KHXZ2A4K.mjs.map +0 -7
- package/dist/js/chunks/chunk-KQACNQ22.mjs +0 -7
- package/dist/js/chunks/chunk-KQACNQ22.mjs.map +0 -7
- package/dist/js/chunks/chunk-KUFHW3DS.mjs.map +0 -7
- package/dist/js/chunks/chunk-KVJAVDBC.mjs.map +0 -7
- package/dist/js/chunks/chunk-L27Q6ZMI.mjs.map +0 -7
- package/dist/js/chunks/chunk-LQWUDNHZ.mjs.map +0 -7
- package/dist/js/chunks/chunk-M372EDXD.mjs +0 -322
- package/dist/js/chunks/chunk-M372EDXD.mjs.map +0 -7
- package/dist/js/chunks/chunk-M3MURWMB.mjs +0 -82
- package/dist/js/chunks/chunk-M3MURWMB.mjs.map +0 -7
- package/dist/js/chunks/chunk-NUHMOAOY.mjs.map +0 -7
- package/dist/js/chunks/chunk-OWG3LMUL.mjs +0 -169
- package/dist/js/chunks/chunk-OWG3LMUL.mjs.map +0 -7
- package/dist/js/chunks/chunk-PD6HYHAE.mjs +0 -48
- package/dist/js/chunks/chunk-PD6HYHAE.mjs.map +0 -7
- package/dist/js/chunks/chunk-PDG64UHF.mjs.map +0 -7
- package/dist/js/chunks/chunk-PO3AXVR3.mjs +0 -546
- package/dist/js/chunks/chunk-PO3AXVR3.mjs.map +0 -7
- package/dist/js/chunks/chunk-QYGK36OG.mjs +0 -181
- package/dist/js/chunks/chunk-QYGK36OG.mjs.map +0 -7
- package/dist/js/chunks/chunk-SFI2U4YW.mjs.map +0 -7
- package/dist/js/chunks/chunk-SMY7GJSS.mjs.map +0 -7
- package/dist/js/chunks/chunk-TCCA2HDG.mjs +0 -414
- package/dist/js/chunks/chunk-TCCA2HDG.mjs.map +0 -7
- package/dist/js/chunks/chunk-TSZYSW7F.mjs.map +0 -7
- package/dist/js/chunks/chunk-UAZSDUVP.mjs +0 -90
- package/dist/js/chunks/chunk-UAZSDUVP.mjs.map +0 -7
- package/dist/js/chunks/chunk-UBRZZWRA.mjs +0 -127
- package/dist/js/chunks/chunk-UBRZZWRA.mjs.map +0 -7
- package/dist/js/chunks/chunk-UCOE7ZDL.mjs +0 -287
- package/dist/js/chunks/chunk-UCOE7ZDL.mjs.map +0 -7
- package/dist/js/chunks/chunk-UETTGDLI.mjs.map +0 -7
- package/dist/js/chunks/chunk-UNCRDLP6.mjs +0 -136
- package/dist/js/chunks/chunk-UNCRDLP6.mjs.map +0 -7
- package/dist/js/chunks/chunk-VGNYF6FB.mjs.map +0 -7
- package/dist/js/chunks/chunk-VGPGBNGL.mjs +0 -68
- package/dist/js/chunks/chunk-VGPGBNGL.mjs.map +0 -7
- package/dist/js/chunks/chunk-VKAUVTQY.mjs +0 -1
- package/dist/js/chunks/chunk-VM4FTS7L.mjs +0 -48
- package/dist/js/chunks/chunk-VM4FTS7L.mjs.map +0 -7
- package/dist/js/chunks/chunk-WDK4T63U.mjs.map +0 -7
- package/dist/js/chunks/chunk-WOCCTVUF.mjs +0 -185
- package/dist/js/chunks/chunk-WOCCTVUF.mjs.map +0 -7
- package/dist/js/chunks/chunk-WQYN5L4E.mjs +0 -107
- package/dist/js/chunks/chunk-WQYN5L4E.mjs.map +0 -7
- package/dist/js/chunks/chunk-X4ISMKE2.mjs.map +0 -7
- package/dist/js/chunks/chunk-XAEAEHIX.mjs.map +0 -7
- package/dist/js/chunks/chunk-ZX6M7SWO.mjs.map +0 -7
- /package/dist/js/chunks/{chunk-VKAUVTQY.mjs.map → chunk-GNRSYMVH.mjs.map} +0 -0
|
@@ -1,11 +1,22 @@
|
|
|
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 *;
|
|
6
7
|
|
|
7
8
|
$_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
8
9
|
|
|
10
|
+
/// A dp size as rem, for a box that holds text or an icon.
|
|
11
|
+
///
|
|
12
|
+
/// Type is set in rem, so raising the browser's default font size or zooming
|
|
13
|
+
/// text only grows the text. A px box around it stays put, and the text spills
|
|
14
|
+
/// out of it or is cut. A rem box grows with its text, and it renders exactly
|
|
15
|
+
/// as before at the default 16px. Borders, gaps and insets stay px.
|
|
16
|
+
@function rem($px) {
|
|
17
|
+
@return math.div($px, 16px) * 1rem;
|
|
18
|
+
}
|
|
19
|
+
|
|
9
20
|
/// A state layer opacity, as the percentage `color-mix()` wants.
|
|
10
21
|
///
|
|
11
22
|
/// The tokens hold numbers (0.08), because an overlay uses one as `opacity`
|
|
@@ -23,12 +34,17 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
23
34
|
@return calc(var(--md-sys-state-#{$state}-state-layer-opacity) * 100%);
|
|
24
35
|
}
|
|
25
36
|
|
|
37
|
+
/// `$color` at the `$state` layer's opacity, mixed over `$base`.
|
|
38
|
+
@function state-layer($color, $state, $base: transparent) {
|
|
39
|
+
@return color-mix(in oklab, $color state-opacity($state), $base);
|
|
40
|
+
}
|
|
41
|
+
|
|
26
42
|
|
|
27
43
|
// Common-button geometry. M3 Expressive's default size is small: 40dp,
|
|
28
44
|
// label-large, corner.full, 16dp inset, 8dp icon gap. The size axis moves
|
|
29
45
|
// those tokens; the style mixins only change color and elevation.
|
|
30
46
|
@mixin btn(
|
|
31
|
-
$height: var(--md-comp-filled-button-container-height, 40px),
|
|
47
|
+
$height: var(--md-comp-filled-button-container-height, #{rem(40px)}),
|
|
32
48
|
$border-radius: var(--md-comp-filled-button-container-shape, 9999px),
|
|
33
49
|
$padding-left: var(--md-comp-filled-button-leading-space, 16px),
|
|
34
50
|
$padding-right: var(--md-comp-filled-button-trailing-space, 16px),
|
|
@@ -56,21 +72,24 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
56
72
|
user-select: none;
|
|
57
73
|
appearance: none;
|
|
58
74
|
-webkit-tap-highlight-color: transparent;
|
|
59
|
-
transition: background-color
|
|
75
|
+
transition: background-color var(--md-sys-motion-duration-short4) ease-out, box-shadow var(--md-sys-motion-duration-short4) ease-out;
|
|
60
76
|
}
|
|
61
77
|
|
|
62
78
|
// State layers mix the on-color into the container in oklab; the opacities come
|
|
63
79
|
// from md.sys.state via `state-opacity()`. Filled and tonal have no elevation.
|
|
64
80
|
|
|
65
|
-
// Shared by
|
|
66
|
-
|
|
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) {
|
|
67
84
|
&:hover {
|
|
68
|
-
|
|
85
|
+
@if $hover-depth { @include z-depth($hover-depth); }
|
|
86
|
+
background-color: state-layer($on, "hover", $base);
|
|
69
87
|
}
|
|
70
88
|
|
|
71
89
|
&:active,
|
|
72
90
|
&:focus {
|
|
73
|
-
|
|
91
|
+
@if $press-depth { @include z-depth($press-depth); }
|
|
92
|
+
background-color: state-layer($on, "focus", $base);
|
|
74
93
|
}
|
|
75
94
|
|
|
76
95
|
@include focus-visible();
|
|
@@ -80,14 +99,14 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
80
99
|
color: var(--md-comp-filled-button-label-text-color, var(--md-sys-color-on-primary));
|
|
81
100
|
background-color: var(--md-comp-filled-button-container-color, var(--md-sys-color-primary));
|
|
82
101
|
|
|
83
|
-
@include
|
|
102
|
+
@include btn-states(var(--md-sys-color-on-primary), var(--md-sys-color-primary));
|
|
84
103
|
}
|
|
85
104
|
|
|
86
105
|
@mixin btn-tonal {
|
|
87
106
|
color: var(--md-sys-color-on-secondary-container);
|
|
88
107
|
background-color: var(--md-sys-color-secondary-container);
|
|
89
108
|
|
|
90
|
-
@include
|
|
109
|
+
@include btn-states(var(--md-sys-color-on-secondary-container), var(--md-sys-color-secondary-container));
|
|
91
110
|
}
|
|
92
111
|
|
|
93
112
|
@mixin btn-elevated {
|
|
@@ -95,18 +114,7 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
95
114
|
background-color: var(--md-sys-color-surface-container-low);
|
|
96
115
|
@include z-depth("1");
|
|
97
116
|
|
|
98
|
-
|
|
99
|
-
@include z-depth("2");
|
|
100
|
-
background-color: color-mix(in oklab, var(--md-sys-color-primary) state-opacity("hover"), var(--md-sys-color-surface-container-low));
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
&:active,
|
|
104
|
-
&:focus {
|
|
105
|
-
@include z-depth("1");
|
|
106
|
-
background-color: color-mix(in oklab, var(--md-sys-color-primary) state-opacity("focus"), var(--md-sys-color-surface-container-low));
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
@include focus-visible();
|
|
117
|
+
@include btn-states(var(--md-sys-color-primary), var(--md-sys-color-surface-container-low), "2", "1");
|
|
110
118
|
}
|
|
111
119
|
|
|
112
120
|
@mixin btn-outlined {
|
|
@@ -118,7 +126,7 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
118
126
|
// height right.
|
|
119
127
|
border: var(--md-comp-filled-button-outline-width, 1px) solid var(--md-sys-color-outline);
|
|
120
128
|
|
|
121
|
-
@include
|
|
129
|
+
@include btn-states(var(--md-sys-color-primary), transparent);
|
|
122
130
|
}
|
|
123
131
|
|
|
124
132
|
@mixin btn-flat {
|
|
@@ -127,7 +135,7 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
127
135
|
background-color: transparent;
|
|
128
136
|
border-color: transparent;
|
|
129
137
|
|
|
130
|
-
@include
|
|
138
|
+
@include btn-states(var(--md-sys-color-primary), transparent);
|
|
131
139
|
}
|
|
132
140
|
|
|
133
141
|
@mixin btn-disabled {
|
|
@@ -139,6 +147,36 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
139
147
|
cursor: default;
|
|
140
148
|
}
|
|
141
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
|
+
|
|
142
180
|
// Off the screen but not out of the document: still focusable, still read, and
|
|
143
181
|
// still a form control. `display: none` and `visibility: hidden` both take the
|
|
144
182
|
// element out of the tab order, which is the wrong trade for a control whose
|
|
@@ -148,9 +186,6 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
148
186
|
// `$important` is for the `.visually-hidden` utility, which has to beat a
|
|
149
187
|
// consumer's own `position` or `padding` the way `.hide` beats their
|
|
150
188
|
// `display`. Component rules leave it off.
|
|
151
|
-
//
|
|
152
|
-
// _navigation-rail.scss carries its own copy, which predates the mixin and
|
|
153
|
-
// omits the margin and white-space; fold it in when it is next touched.
|
|
154
189
|
@mixin visually-hidden($important: false) {
|
|
155
190
|
$flag: null;
|
|
156
191
|
@if $important { $flag: !important; }
|
|
@@ -169,40 +204,343 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
169
204
|
// Focus with Keyboard
|
|
170
205
|
// The ring itself, for the rare selector that cannot be written as
|
|
171
206
|
// `&:focus-visible` on the focused element - a filter chip draws its ring on
|
|
172
|
-
// the <label>, but the focus is on the checkbox before it.
|
|
173
|
-
|
|
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) {
|
|
174
210
|
outline: 3px solid var(--md-sys-color-secondary);
|
|
175
|
-
outline-offset:
|
|
211
|
+
outline-offset: $offset;
|
|
176
212
|
}
|
|
177
213
|
|
|
178
|
-
@mixin focus-visible {
|
|
214
|
+
@mixin focus-visible($offset: 2px) {
|
|
179
215
|
&:focus-visible {
|
|
180
|
-
@include focus-ring();
|
|
216
|
+
@include focus-ring($offset);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// The 18dp up arrow on a pseudo-element: Stat and KPI change lines, data
|
|
221
|
+
// table sort buttons. Rotate it 180deg for down.
|
|
222
|
+
@mixin trend-arrow {
|
|
223
|
+
content: "";
|
|
224
|
+
flex: none;
|
|
225
|
+
width: 18px;
|
|
226
|
+
height: 18px;
|
|
227
|
+
background-color: currentColor;
|
|
228
|
+
mask: $trend-arrow center / 18px no-repeat;
|
|
229
|
+
}
|
|
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
|
+
|
|
278
|
+
// A 48dp icon action in a dialog, pane or side sheet header bar.
|
|
279
|
+
@mixin header-icon-action {
|
|
280
|
+
flex: 0 0 48px;
|
|
281
|
+
box-sizing: border-box;
|
|
282
|
+
width: 48px;
|
|
283
|
+
height: 48px;
|
|
284
|
+
min-width: 48px;
|
|
285
|
+
padding: 0;
|
|
286
|
+
border: none;
|
|
287
|
+
border-radius: 50%;
|
|
288
|
+
background-color: transparent;
|
|
289
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
290
|
+
box-shadow: none;
|
|
291
|
+
|
|
292
|
+
> #{$icon} {
|
|
293
|
+
@include icon-size(rem(24px));
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
&:hover {
|
|
297
|
+
background-color: state-layer(var(--md-sys-color-on-surface), "hover");
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
@include focus-visible;
|
|
301
|
+
}
|
|
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
|
+
|
|
312
|
+
// Forced colors repaint every background as Canvas and drop box-shadow, so a
|
|
313
|
+
// state shown only by a fill or a ring disappears. forced-colors-selected marks
|
|
314
|
+
// a selected item with a Highlight outline. forced-colors-fill keeps a drawn
|
|
315
|
+
// shape (an indicator bar, a dot, a glyph drawn as a mask) by opting it out
|
|
316
|
+
// and painting it with a system color.
|
|
317
|
+
@mixin forced-colors-selected {
|
|
318
|
+
@media (forced-colors: active) {
|
|
319
|
+
outline: 2px solid Highlight;
|
|
320
|
+
outline-offset: -2px;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// A tree branch's chevron, drawn as the row's ::before: it points to the end
|
|
325
|
+
// edge while closed. The row turns it with `transform: none` once the branch
|
|
326
|
+
// opens, and with rotate(90deg) under :dir(rtl). .tree and the tree select
|
|
327
|
+
// share it.
|
|
328
|
+
|
|
329
|
+
@mixin tree-chevron {
|
|
330
|
+
content: "";
|
|
331
|
+
flex: none;
|
|
332
|
+
width: 20px;
|
|
333
|
+
height: 20px;
|
|
334
|
+
background-color: currentColor;
|
|
335
|
+
mask: $expand-more center / 20px no-repeat;
|
|
336
|
+
transform: rotate(-90deg);
|
|
337
|
+
transition: transform var(--md-sys-motion-duration-short3) ease-out;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
@mixin forced-colors-fill($color: CanvasText) {
|
|
341
|
+
@media (forced-colors: active) {
|
|
342
|
+
forced-color-adjust: none;
|
|
343
|
+
background-color: $color;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
// A fieldset of round, labeled choices (color swatches, rating): no fieldset
|
|
348
|
+
// chrome, a body-medium legend, and labels whose 4px of padding makes the
|
|
349
|
+
// 48px target. $control is the input the label's focus and disabled states
|
|
350
|
+
// follow.
|
|
351
|
+
@mixin choice-fieldset($radius, $control) {
|
|
352
|
+
display: flex;
|
|
353
|
+
flex-wrap: wrap;
|
|
354
|
+
align-items: center;
|
|
355
|
+
margin: 0;
|
|
356
|
+
padding: 0;
|
|
357
|
+
border: 0;
|
|
358
|
+
|
|
359
|
+
> legend {
|
|
360
|
+
margin-block-end: 4px;
|
|
361
|
+
padding: 0;
|
|
362
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
363
|
+
@include typescale("body-medium");
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
> label {
|
|
367
|
+
display: inline-flex;
|
|
368
|
+
gap: 0;
|
|
369
|
+
min-height: 0;
|
|
370
|
+
padding: 4px;
|
|
371
|
+
border-radius: $radius;
|
|
372
|
+
cursor: pointer;
|
|
373
|
+
|
|
374
|
+
&:has(> #{$control}:focus-visible) {
|
|
375
|
+
@include focus-ring;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
&:has(> #{$control}:disabled) {
|
|
379
|
+
opacity: 0.38;
|
|
380
|
+
cursor: default;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// A navigation bar or rail destination stacked over its label: the indicator
|
|
386
|
+
// behind the icon, its hover layer, the active state, and a sibling badge on
|
|
387
|
+
// the upper trailing corner of the 24dp glyph. $prefix names the component
|
|
388
|
+
// tokens (nav-bar, nav-rail); $inset is the destination's top padding. Rules
|
|
389
|
+
// passed as content land between the active state and the badge.
|
|
390
|
+
@mixin nav-destination($prefix, $inset, $transition) {
|
|
391
|
+
> #{$icon} {
|
|
392
|
+
display: flex;
|
|
393
|
+
flex-shrink: 0;
|
|
394
|
+
align-items: center;
|
|
395
|
+
justify-content: center;
|
|
396
|
+
box-sizing: border-box;
|
|
397
|
+
width: var(--md-comp-#{$prefix}-indicator-width);
|
|
398
|
+
height: var(--md-comp-#{$prefix}-indicator-height);
|
|
399
|
+
border-radius: var(--md-comp-#{$prefix}-indicator-shape);
|
|
400
|
+
font-size: var(--md-comp-#{$prefix}-icon-size);
|
|
401
|
+
color: inherit;
|
|
402
|
+
transition: $transition;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
&:hover:not(.active, [aria-current]) > #{$icon} {
|
|
406
|
+
background-color: state-layer(var(--md-sys-color-on-surface), "hover");
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
&.active,
|
|
410
|
+
&[aria-current] {
|
|
411
|
+
color: var(--md-sys-color-on-surface);
|
|
412
|
+
|
|
413
|
+
> #{$icon} {
|
|
414
|
+
background-color: var(--md-comp-#{$prefix}-active-indicator-color);
|
|
415
|
+
color: var(--md-comp-#{$prefix}-active-color);
|
|
416
|
+
--md-icon-fill: 1;
|
|
417
|
+
@include forced-colors-selected;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
@content;
|
|
422
|
+
|
|
423
|
+
> .badge {
|
|
424
|
+
position: absolute;
|
|
425
|
+
z-index: 1;
|
|
426
|
+
top: calc(#{$inset} + (var(--md-comp-#{$prefix}-indicator-height) - 24px) / 2);
|
|
427
|
+
inset-inline-start: calc(50% + 12px);
|
|
428
|
+
transform: translate(-50%, -50%);
|
|
429
|
+
|
|
430
|
+
&:dir(rtl) {
|
|
431
|
+
transform: translate(50%, -50%);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
// The same destination laid out as a row (bar .horizontal, rail .expanded):
|
|
437
|
+
// the indicator moves from the icon to the whole destination.
|
|
438
|
+
@mixin nav-destination-row($prefix) {
|
|
439
|
+
> #{$icon} {
|
|
440
|
+
width: var(--md-comp-#{$prefix}-icon-size);
|
|
441
|
+
height: var(--md-comp-#{$prefix}-icon-size);
|
|
442
|
+
border-radius: 0;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
&:hover:not(.active, [aria-current]) {
|
|
446
|
+
background-color: state-layer(var(--md-sys-color-on-surface), "hover");
|
|
447
|
+
|
|
448
|
+
> #{$icon} {
|
|
449
|
+
background-color: transparent;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
&.active,
|
|
454
|
+
&[aria-current] {
|
|
455
|
+
background-color: var(--md-comp-#{$prefix}-active-indicator-color);
|
|
456
|
+
color: var(--md-comp-#{$prefix}-active-color);
|
|
457
|
+
@include forced-colors-selected;
|
|
458
|
+
|
|
459
|
+
> #{$icon} {
|
|
460
|
+
background-color: transparent;
|
|
461
|
+
color: inherit;
|
|
462
|
+
outline: none;
|
|
463
|
+
}
|
|
181
464
|
}
|
|
182
465
|
}
|
|
183
466
|
|
|
184
467
|
// M3 type role. Every property must name a token tokens/_reference.scss
|
|
185
468
|
// actually defines — a missing var() drops the whole declaration.
|
|
186
|
-
|
|
469
|
+
// $emphasized takes the role's M3 Expressive emphasized weight.
|
|
470
|
+
@mixin typescale($role, $emphasized: false) {
|
|
187
471
|
font-family: var(--md-sys-typescale-#{$role}-font-family-name);
|
|
188
472
|
font-size: var(--md-sys-typescale-#{$role}-font-size);
|
|
189
|
-
|
|
473
|
+
@if $emphasized {
|
|
474
|
+
font-weight: var(--md-sys-typescale-emphasized-#{$role}-font-weight);
|
|
475
|
+
} @else {
|
|
476
|
+
font-weight: var(--md-sys-typescale-#{$role}-font-weight);
|
|
477
|
+
}
|
|
190
478
|
line-height: var(--md-sys-typescale-#{$role}-line-height);
|
|
191
479
|
letter-spacing: var(--md-sys-typescale-#{$role}-letter-spacing);
|
|
192
480
|
}
|
|
193
481
|
|
|
482
|
+
// The <label> row of a radio, checkbox or switch: 48dp touch target, 12dp
|
|
483
|
+
// between control and text, body-large on-surface.
|
|
484
|
+
@mixin selection-control-label($display: flex) {
|
|
485
|
+
display: $display;
|
|
486
|
+
align-items: center;
|
|
487
|
+
gap: 12px;
|
|
488
|
+
min-height: 48px;
|
|
489
|
+
margin: 0;
|
|
490
|
+
cursor: pointer;
|
|
491
|
+
user-select: none;
|
|
492
|
+
color: var(--md-sys-color-on-surface);
|
|
493
|
+
@include typescale("body-large");
|
|
494
|
+
}
|
|
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
|
+
|
|
194
531
|
/// The state layer some controls draw as a ring rather than an overlay.
|
|
195
532
|
///
|
|
196
533
|
/// Checkboxes and radio buttons have no room for an overlay pseudo-element, so
|
|
197
534
|
/// they grow a `box-shadow` from the control's edge out to the state layer
|
|
198
535
|
/// size.
|
|
199
536
|
@mixin state-layer-ring($outer, $inner, $color, $state) {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
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);
|
|
206
544
|
}
|
|
207
545
|
|
|
208
546
|
/// The button size tokens for one rung of `$button-sizes`.
|
|
@@ -213,20 +551,22 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
213
551
|
@mixin button-size($name) {
|
|
214
552
|
$s: map.get($button-sizes, $name);
|
|
215
553
|
|
|
216
|
-
--md-comp-filled-button-container-height: #{map.get($s, height)};
|
|
217
|
-
--md-comp-filled-button-icon-size: #{map.get($s, icon)};
|
|
554
|
+
--md-comp-filled-button-container-height: #{rem(map.get($s, height))};
|
|
555
|
+
--md-comp-filled-button-icon-size: #{rem(map.get($s, icon))};
|
|
218
556
|
--md-comp-filled-button-leading-space: #{map.get($s, space)};
|
|
219
557
|
--md-comp-filled-button-trailing-space: #{map.get($s, space)};
|
|
220
558
|
--md-comp-filled-button-icon-label-space: #{map.get($s, gap)};
|
|
221
559
|
--md-comp-filled-button-outline-width: #{map.get($s, outline)};
|
|
560
|
+
--md-comp-filled-button-container-shape-square: #{map.get($s, square)};
|
|
561
|
+
--md-comp-filled-button-pressed-container-shape: #{map.get($s, pressed)};
|
|
222
562
|
}
|
|
223
563
|
|
|
224
564
|
/// The icon-button tokens for one rung of `$icon-button-sizes`.
|
|
225
565
|
@mixin icon-button-size($name) {
|
|
226
566
|
$s: map.get($icon-button-sizes, $name);
|
|
227
567
|
|
|
228
|
-
--md-comp-icon-button-container-height: #{map.get($s, height)};
|
|
229
|
-
--md-comp-icon-button-icon-size: #{map.get($s, icon)};
|
|
568
|
+
--md-comp-icon-button-container-height: #{rem(map.get($s, height))};
|
|
569
|
+
--md-comp-icon-button-icon-size: #{rem(map.get($s, icon))};
|
|
230
570
|
--md-comp-icon-button-leading-space: #{map.get($s, space)};
|
|
231
571
|
--md-comp-icon-button-trailing-space: #{map.get($s, space)};
|
|
232
572
|
--md-comp-icon-button-narrow-space: #{map.get($s, narrow)};
|
|
@@ -306,21 +646,159 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
306
646
|
}
|
|
307
647
|
}
|
|
308
648
|
|
|
649
|
+
// The .toggle legend button is the same in every chart, so chart() writes
|
|
650
|
+
// it once, with the first chart in the build.
|
|
651
|
+
$_chart-toggle-written: false;
|
|
652
|
+
|
|
653
|
+
// With .toggle, a button shows or hides each series. It covers its legend
|
|
654
|
+
// item, swatch included, and a hidden series is struck through with a
|
|
655
|
+
// hollow swatch, so the state does not rest on color. The class keeps it
|
|
656
|
+
// out of the button styles, in _buttons.scss.
|
|
657
|
+
@mixin _chart-toggle {
|
|
658
|
+
.chart-toggle {
|
|
659
|
+
min-height: rem(48px);
|
|
660
|
+
padding: 0;
|
|
661
|
+
border: 0;
|
|
662
|
+
background: none;
|
|
663
|
+
color: inherit;
|
|
664
|
+
font: inherit;
|
|
665
|
+
cursor: pointer;
|
|
666
|
+
|
|
667
|
+
&::after {
|
|
668
|
+
content: "";
|
|
669
|
+
position: absolute;
|
|
670
|
+
inset: 0;
|
|
671
|
+
border-radius: 4px;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
&:focus-visible {
|
|
675
|
+
outline: none;
|
|
676
|
+
|
|
677
|
+
&::after {
|
|
678
|
+
@include focus-ring();
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
&:hover {
|
|
683
|
+
color: var(--md-sys-color-on-surface);
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
&[aria-pressed="false"] {
|
|
687
|
+
text-decoration: line-through;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
&[aria-disabled="true"] {
|
|
691
|
+
cursor: default;
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
li:has(> .chart-toggle[aria-pressed="false"])::before {
|
|
696
|
+
mask: radial-gradient(closest-side, transparent 50%, #000 calc(50% + 0.5px));
|
|
697
|
+
}
|
|
698
|
+
}
|
|
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
|
+
|
|
309
714
|
// The parts LineChart draws for every chart type, prefixed with the
|
|
310
715
|
// component's name: .#{$name}-plot, -cursor, -tooltip, -labels and -legend.
|
|
311
|
-
// Defines the --md-comp-#{$name}-height, -grid-color and -color-1..
|
|
716
|
+
// Defines the --md-comp-#{$name}-height, -grid-color and -color-1..N tokens,
|
|
312
717
|
// and --#{$name}-color on each [data-series]. Include it at the root of the
|
|
313
718
|
// component's partial; the component adds its own marks and cursor look.
|
|
314
|
-
|
|
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
|
+
|
|
771
|
+
@if not $_chart-toggle-written {
|
|
772
|
+
$_chart-toggle-written: true !global;
|
|
773
|
+
@include _chart-toggle;
|
|
774
|
+
}
|
|
775
|
+
|
|
315
776
|
.#{$name} {
|
|
316
|
-
--md-comp-#{$name}-height: 240px;
|
|
777
|
+
--md-comp-#{$name}-height: #{rem(240px)};
|
|
317
778
|
--md-comp-#{$name}-grid-color: var(--md-sys-color-outline-variant);
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
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
|
+
}
|
|
322
796
|
|
|
323
|
-
|
|
797
|
+
@if $rows {
|
|
798
|
+
display: grid;
|
|
799
|
+
} @else {
|
|
800
|
+
display: flex;
|
|
801
|
+
}
|
|
324
802
|
flex-direction: column;
|
|
325
803
|
gap: 8px;
|
|
326
804
|
min-width: 0;
|
|
@@ -333,6 +811,28 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
333
811
|
// it hangs up from the bottom edge, where the overflow cannot scroll.
|
|
334
812
|
position: relative;
|
|
335
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
|
+
|
|
336
836
|
> figcaption {
|
|
337
837
|
color: var(--md-sys-color-on-surface-variant);
|
|
338
838
|
@include typescale("title-small");
|
|
@@ -345,27 +845,92 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
345
845
|
}
|
|
346
846
|
}
|
|
347
847
|
|
|
348
|
-
@for $i from 1 through
|
|
848
|
+
@for $i from 1 through $colors {
|
|
349
849
|
.#{$name} [data-series="#{$i}"] {
|
|
350
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
|
+
}
|
|
351
854
|
}
|
|
352
855
|
}
|
|
353
856
|
|
|
354
857
|
.#{$name}-plot {
|
|
355
858
|
position: relative;
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
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
|
+
}
|
|
361
888
|
touch-action: pan-y;
|
|
362
889
|
@include focus-visible;
|
|
363
890
|
}
|
|
364
891
|
|
|
365
892
|
.#{$name}-cursor {
|
|
366
893
|
position: absolute;
|
|
367
|
-
|
|
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
|
+
}
|
|
368
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
|
+
}
|
|
369
934
|
}
|
|
370
935
|
|
|
371
936
|
// Rich tooltip surface, as in _tooltip.scss.
|
|
@@ -374,21 +939,31 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
374
939
|
|
|
375
940
|
position: absolute;
|
|
376
941
|
top: 0;
|
|
942
|
+
@if $rows {
|
|
943
|
+
left: 50%;
|
|
944
|
+
}
|
|
377
945
|
z-index: 1;
|
|
378
946
|
display: grid;
|
|
379
947
|
grid-template-columns: auto auto;
|
|
380
948
|
gap: 4px 16px;
|
|
381
|
-
min-width: 120px;
|
|
949
|
+
min-width: rem(120px);
|
|
382
950
|
margin: 0;
|
|
383
951
|
padding: 12px 16px;
|
|
384
|
-
border-radius:
|
|
952
|
+
border-radius: var(--md-sys-shape-corner-medium);
|
|
385
953
|
background-color: var(--md-comp-#{$name}-tooltip-color);
|
|
386
954
|
color: var(--md-sys-color-on-surface-variant);
|
|
387
955
|
@include typescale("body-small");
|
|
388
956
|
white-space: nowrap;
|
|
389
957
|
font-variant-numeric: tabular-nums;
|
|
390
958
|
pointer-events: none;
|
|
391
|
-
|
|
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
|
+
}
|
|
392
967
|
@include z-depth("2");
|
|
393
968
|
@include glass(var(--md-comp-#{$name}-tooltip-color));
|
|
394
969
|
|
|
@@ -397,7 +972,13 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
397
972
|
}
|
|
398
973
|
|
|
399
974
|
&.end {
|
|
400
|
-
|
|
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
|
+
}
|
|
401
982
|
}
|
|
402
983
|
|
|
403
984
|
> strong {
|
|
@@ -421,9 +1002,7 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
421
1002
|
|
|
422
1003
|
.#{$name}-labels,
|
|
423
1004
|
.#{$name}-legend {
|
|
424
|
-
|
|
425
|
-
padding: 0;
|
|
426
|
-
list-style: none;
|
|
1005
|
+
@include list-reset;
|
|
427
1006
|
color: var(--md-sys-color-on-surface-variant);
|
|
428
1007
|
@include typescale("body-small");
|
|
429
1008
|
}
|
|
@@ -431,26 +1010,87 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
431
1010
|
.#{$name}-labels {
|
|
432
1011
|
display: grid;
|
|
433
1012
|
grid-auto-columns: minmax(0, 1fr);
|
|
434
|
-
|
|
435
|
-
|
|
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
|
+
}
|
|
436
1022
|
|
|
437
1023
|
> li {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
1024
|
+
@include ellipsis;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
// When each label is wider than its column, LineChart keeps every nth
|
|
1028
|
+
// one. A kept label spreads over the hidden ones beside it, still
|
|
1029
|
+
// centred on its own column; the flex box centres what overflows. The
|
|
1030
|
+
// end labels line up with the chart's edges, so none overflows them.
|
|
1031
|
+
&[data-thinned] > li:not([data-skip]) {
|
|
1032
|
+
display: flex;
|
|
1033
|
+
justify-content: center;
|
|
1034
|
+
overflow: visible;
|
|
1035
|
+
|
|
1036
|
+
&:first-child {
|
|
1037
|
+
justify-content: start;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
&:last-child {
|
|
1041
|
+
justify-content: end;
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
> li[data-skip] {
|
|
1046
|
+
visibility: hidden;
|
|
441
1047
|
}
|
|
442
1048
|
}
|
|
443
1049
|
|
|
444
1050
|
.#{$name}-legend {
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
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
|
+
}
|
|
448
1067
|
|
|
449
1068
|
> li {
|
|
450
|
-
|
|
1069
|
+
position: relative;
|
|
1070
|
+
@if $legend-columns {
|
|
1071
|
+
display: contents;
|
|
1072
|
+
} @else {
|
|
1073
|
+
display: flex;
|
|
1074
|
+
}
|
|
451
1075
|
align-items: center;
|
|
452
1076
|
gap: 8px;
|
|
453
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
|
+
}
|
|
454
1094
|
}
|
|
455
1095
|
|
|
456
1096
|
// Series swatches.
|
|
@@ -464,15 +1104,57 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
464
1104
|
background-color: var(--#{$name}-color);
|
|
465
1105
|
}
|
|
466
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
|
+
|
|
467
1140
|
.#{$name}.sparkline {
|
|
468
1141
|
--md-comp-#{$name}-height: 48px;
|
|
1142
|
+
@if $lines {
|
|
1143
|
+
--md-comp-#{$name}-line-width: 2px;
|
|
1144
|
+
}
|
|
469
1145
|
// Keep the taller hidden table from adding scrollable overflow. A
|
|
470
1146
|
// sparkline has no tooltip or focus ring to clip.
|
|
471
1147
|
overflow: clip;
|
|
472
1148
|
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
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
|
+
}
|
|
476
1158
|
}
|
|
477
1159
|
|
|
478
1160
|
.#{$name}-labels,
|
|
@@ -482,14 +1164,30 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
482
1164
|
}
|
|
483
1165
|
|
|
484
1166
|
@media (forced-colors: active) {
|
|
485
|
-
|
|
486
|
-
|
|
1167
|
+
@if $grid {
|
|
1168
|
+
.#{$name}-plot {
|
|
1169
|
+
background: none;
|
|
1170
|
+
}
|
|
487
1171
|
}
|
|
488
1172
|
|
|
489
1173
|
.#{$name}-tooltip {
|
|
490
1174
|
outline: 1px solid CanvasText;
|
|
491
1175
|
}
|
|
492
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
|
+
|
|
493
1191
|
// The marks keep their colors, so the swatches that key them must too.
|
|
494
1192
|
.#{$name}-legend > li::before,
|
|
495
1193
|
.#{$name}-tooltip > span:nth-of-type(odd)::before {
|
|
@@ -497,3 +1195,91 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
497
1195
|
}
|
|
498
1196
|
}
|
|
499
1197
|
}
|
|
1198
|
+
|
|
1199
|
+
// The columns' or bars' growth, inside their container: from the zero
|
|
1200
|
+
// line, or after update() from where each span was, which ColumnChart
|
|
1201
|
+
// writes as --from-top and --from-bottom. !important lets these starting
|
|
1202
|
+
// values beat the inline --top and --bottom.
|
|
1203
|
+
@mixin chart-column-motion {
|
|
1204
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
1205
|
+
> div > span {
|
|
1206
|
+
transition: clip-path var(--md-sys-motion-duration-medium4) var(--md-sys-motion-easing-standard);
|
|
1207
|
+
|
|
1208
|
+
@starting-style {
|
|
1209
|
+
--top: var(--from-top, var(--zero, 100%)) !important;
|
|
1210
|
+
--bottom: var(--from-bottom, calc(100% - var(--zero, 100%))) !important;
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
// The value labels LineChart draws for .axis: an .#{$name}-axis list in the
|
|
1217
|
+
// plot, behind the marks, with each label's distance down the plot in --at.
|
|
1218
|
+
// A label sits beside the plot with a grid line across it at its value; a
|
|
1219
|
+
// mixed chart's end scale gets a second list, .end, on the far side, whose
|
|
1220
|
+
// labels share those lines. With $beside the plot and row labels make room
|
|
1221
|
+
// at the inline start (and end, for .end) for
|
|
1222
|
+
// --md-comp-#{$name}-axis-width, 48px. Without it the component places the
|
|
1223
|
+
// labels itself.
|
|
1224
|
+
@mixin chart-axis($name, $beside: true) {
|
|
1225
|
+
.#{$name}.axis {
|
|
1226
|
+
--md-comp-#{$name}-axis-width: #{rem(48px)};
|
|
1227
|
+
|
|
1228
|
+
> .#{$name}-plot {
|
|
1229
|
+
background: none;
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
@if $beside {
|
|
1234
|
+
// Room for the top label's upper half.
|
|
1235
|
+
.#{$name}.axis > .#{$name}-plot {
|
|
1236
|
+
margin-block-start: 8px;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
.#{$name}.axis > :is(.#{$name}-plot, .#{$name}-labels) {
|
|
1240
|
+
margin-inline-start: var(--md-comp-#{$name}-axis-width);
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
.#{$name}.axis:has(.#{$name}-axis.end) > :is(.#{$name}-plot, .#{$name}-labels) {
|
|
1244
|
+
margin-inline-end: var(--md-comp-#{$name}-axis-width);
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
.#{$name}-axis {
|
|
1249
|
+
position: absolute;
|
|
1250
|
+
inset: 0;
|
|
1251
|
+
@include list-reset;
|
|
1252
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
1253
|
+
@include typescale("body-small");
|
|
1254
|
+
font-variant-numeric: tabular-nums;
|
|
1255
|
+
pointer-events: none;
|
|
1256
|
+
|
|
1257
|
+
> li {
|
|
1258
|
+
position: absolute;
|
|
1259
|
+
inset-inline: 0;
|
|
1260
|
+
top: var(--at, 0%);
|
|
1261
|
+
border-block-start: 1px solid var(--md-comp-#{$name}-grid-color);
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
> li > span {
|
|
1265
|
+
position: absolute;
|
|
1266
|
+
inset-inline-end: 100%;
|
|
1267
|
+
box-sizing: border-box;
|
|
1268
|
+
width: var(--md-comp-#{$name}-axis-width);
|
|
1269
|
+
padding-inline-end: 8px;
|
|
1270
|
+
@include ellipsis;
|
|
1271
|
+
text-align: end;
|
|
1272
|
+
translate: 0 -50%;
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
&.end > li {
|
|
1276
|
+
border: 0;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
&.end > li > span {
|
|
1280
|
+
inset-inline: 100% auto;
|
|
1281
|
+
padding-inline: 8px 0;
|
|
1282
|
+
text-align: start;
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
}
|