@expressivecss/expressive 0.15.0 → 0.16.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 +1502 -1
- package/README.md +9 -8
- package/dist/css/expressive.css +19247 -11923
- 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-2CS6TITK.mjs +219 -0
- package/dist/js/chunks/chunk-2CS6TITK.mjs.map +7 -0
- package/dist/js/chunks/chunk-2RLBDFH4.mjs +108 -0
- package/dist/js/chunks/chunk-2RLBDFH4.mjs.map +7 -0
- package/dist/js/chunks/chunk-3L3QIYLC.mjs +85 -0
- package/dist/js/chunks/chunk-3L3QIYLC.mjs.map +7 -0
- package/dist/js/chunks/chunk-4EWGD4V2.mjs +75 -0
- package/dist/js/chunks/chunk-4EWGD4V2.mjs.map +7 -0
- package/dist/js/chunks/chunk-4IKVPCSU.mjs +7 -0
- package/dist/js/chunks/chunk-4IKVPCSU.mjs.map +7 -0
- package/dist/js/chunks/chunk-4PIXLDNJ.mjs +127 -0
- package/dist/js/chunks/chunk-4PIXLDNJ.mjs.map +7 -0
- package/dist/js/chunks/{chunk-KVJAVDBC.mjs → chunk-4QUCNFSD.mjs} +64 -113
- package/dist/js/chunks/chunk-4QUCNFSD.mjs.map +7 -0
- package/dist/js/chunks/{chunk-UETTGDLI.mjs → chunk-4TRZ2AER.mjs} +35 -41
- package/dist/js/chunks/chunk-4TRZ2AER.mjs.map +7 -0
- package/dist/js/chunks/{chunk-C6CHEWYP.mjs → chunk-5KIHWJI2.mjs} +40 -26
- package/dist/js/chunks/chunk-5KIHWJI2.mjs.map +7 -0
- package/dist/js/chunks/{chunk-L27Q6ZMI.mjs → chunk-67ZPPKXS.mjs} +20 -33
- package/dist/js/chunks/chunk-67ZPPKXS.mjs.map +7 -0
- package/dist/js/chunks/{chunk-XAEAEHIX.mjs → chunk-6FSEUFVW.mjs} +39 -26
- package/dist/js/chunks/chunk-6FSEUFVW.mjs.map +7 -0
- package/dist/js/chunks/chunk-752ADW4M.mjs +225 -0
- package/dist/js/chunks/chunk-752ADW4M.mjs.map +7 -0
- package/dist/js/chunks/{chunk-CK2XCICY.mjs → chunk-75E5EDJF.mjs} +3 -11
- package/dist/js/chunks/chunk-75E5EDJF.mjs.map +7 -0
- package/dist/js/chunks/{chunk-KHXZ2A4K.mjs → chunk-7NLUI3RR.mjs} +139 -66
- package/dist/js/chunks/chunk-7NLUI3RR.mjs.map +7 -0
- package/dist/js/chunks/chunk-7W7TV6NY.mjs +108 -0
- package/dist/js/chunks/chunk-7W7TV6NY.mjs.map +7 -0
- package/dist/js/chunks/chunk-7YQBHTK3.mjs +225 -0
- package/dist/js/chunks/chunk-7YQBHTK3.mjs.map +7 -0
- package/dist/js/chunks/chunk-7YZ5CN3V.mjs +33 -0
- package/dist/js/chunks/chunk-7YZ5CN3V.mjs.map +7 -0
- package/dist/js/chunks/chunk-AI73GJKG.mjs +28 -0
- package/dist/js/chunks/chunk-AI73GJKG.mjs.map +7 -0
- package/dist/js/chunks/{chunk-LQWUDNHZ.mjs → chunk-ANKFWNWT.mjs} +21 -45
- package/dist/js/chunks/chunk-ANKFWNWT.mjs.map +7 -0
- package/dist/js/chunks/{chunk-5CEAOLUA.mjs → chunk-B7DQFHA5.mjs} +30 -47
- package/dist/js/chunks/chunk-B7DQFHA5.mjs.map +7 -0
- package/dist/js/chunks/chunk-BIGU5RCJ.mjs +153 -0
- package/dist/js/chunks/chunk-BIGU5RCJ.mjs.map +7 -0
- package/dist/js/chunks/{chunk-VGNYF6FB.mjs → chunk-BPF3I2MN.mjs} +109 -24
- package/dist/js/chunks/chunk-BPF3I2MN.mjs.map +7 -0
- package/dist/js/chunks/chunk-CMGXGYUC.mjs +74 -0
- package/dist/js/chunks/chunk-CMGXGYUC.mjs.map +7 -0
- package/dist/js/chunks/{chunk-NUHMOAOY.mjs → chunk-CSYWKEK3.mjs} +310 -196
- package/dist/js/chunks/chunk-CSYWKEK3.mjs.map +7 -0
- package/dist/js/chunks/chunk-CZSQHXEV.mjs +227 -0
- package/dist/js/chunks/chunk-CZSQHXEV.mjs.map +7 -0
- package/dist/js/chunks/chunk-DZYVU75J.mjs +121 -0
- package/dist/js/chunks/chunk-DZYVU75J.mjs.map +7 -0
- package/dist/js/chunks/{chunk-74MXKKLN.mjs → chunk-EC26RU2D.mjs} +11 -29
- package/dist/js/chunks/chunk-EC26RU2D.mjs.map +7 -0
- package/dist/js/chunks/{chunk-WDK4T63U.mjs → chunk-EVCVFEV3.mjs} +235 -146
- package/dist/js/chunks/chunk-EVCVFEV3.mjs.map +7 -0
- package/dist/js/chunks/chunk-FCNF4GRJ.mjs +445 -0
- package/dist/js/chunks/chunk-FCNF4GRJ.mjs.map +7 -0
- package/dist/js/chunks/chunk-GCWWEZKO.mjs +342 -0
- package/dist/js/chunks/chunk-GCWWEZKO.mjs.map +7 -0
- package/dist/js/chunks/chunk-GNRSYMVH.mjs +1 -0
- package/dist/js/chunks/chunk-GVZQH2H5.mjs +54 -0
- package/dist/js/chunks/chunk-GVZQH2H5.mjs.map +7 -0
- package/dist/js/chunks/chunk-GWZ76SR4.mjs +435 -0
- package/dist/js/chunks/chunk-GWZ76SR4.mjs.map +7 -0
- package/dist/js/chunks/{chunk-PDG64UHF.mjs → chunk-ILDRRG7T.mjs} +21 -23
- package/dist/js/chunks/chunk-ILDRRG7T.mjs.map +7 -0
- package/dist/js/chunks/chunk-INLZWHLY.mjs +80 -0
- package/dist/js/chunks/chunk-INLZWHLY.mjs.map +7 -0
- package/dist/js/chunks/chunk-JUKBBN6P.mjs +175 -0
- package/dist/js/chunks/chunk-JUKBBN6P.mjs.map +7 -0
- package/dist/js/chunks/chunk-KYIEG4U3.mjs +730 -0
- package/dist/js/chunks/chunk-KYIEG4U3.mjs.map +7 -0
- package/dist/js/chunks/{chunk-BGZLF6JZ.mjs → chunk-KZPSAXIU.mjs} +142 -32
- package/dist/js/chunks/chunk-KZPSAXIU.mjs.map +7 -0
- package/dist/js/chunks/chunk-LDXCC2L3.mjs +438 -0
- package/dist/js/chunks/chunk-LDXCC2L3.mjs.map +7 -0
- package/dist/js/chunks/chunk-NAC72P7R.mjs +137 -0
- package/dist/js/chunks/chunk-NAC72P7R.mjs.map +7 -0
- package/dist/js/chunks/chunk-NBJAUGPP.mjs +244 -0
- package/dist/js/chunks/chunk-NBJAUGPP.mjs.map +7 -0
- package/dist/js/chunks/chunk-NNHVANQA.mjs +113 -0
- package/dist/js/chunks/chunk-NNHVANQA.mjs.map +7 -0
- package/dist/js/chunks/chunk-NVQ5EHCU.mjs +376 -0
- package/dist/js/chunks/chunk-NVQ5EHCU.mjs.map +7 -0
- package/dist/js/chunks/{chunk-DXGRXYYL.mjs → chunk-OP43LLIC.mjs} +28 -45
- package/dist/js/chunks/chunk-OP43LLIC.mjs.map +7 -0
- package/dist/js/chunks/chunk-OUCHKSAW.mjs +63 -0
- package/dist/js/chunks/chunk-OUCHKSAW.mjs.map +7 -0
- package/dist/js/chunks/{chunk-TSZYSW7F.mjs → chunk-OYNUDOHR.mjs} +19 -47
- package/dist/js/chunks/chunk-OYNUDOHR.mjs.map +7 -0
- package/dist/js/chunks/{chunk-UAZSDUVP.mjs → chunk-P6DRQ6KS.mjs} +36 -30
- package/dist/js/chunks/chunk-P6DRQ6KS.mjs.map +7 -0
- package/dist/js/chunks/chunk-PA7NU5AK.mjs +99 -0
- package/dist/js/chunks/chunk-PA7NU5AK.mjs.map +7 -0
- package/dist/js/chunks/chunk-QACZ6TUP.mjs +224 -0
- package/dist/js/chunks/chunk-QACZ6TUP.mjs.map +7 -0
- package/dist/js/chunks/{chunk-GJL6GCIU.mjs → chunk-QXKWVHBD.mjs} +265 -161
- package/dist/js/chunks/chunk-QXKWVHBD.mjs.map +7 -0
- package/dist/js/chunks/{chunk-X4ISMKE2.mjs → chunk-ROH2HDB4.mjs} +7 -6
- package/dist/js/chunks/chunk-ROH2HDB4.mjs.map +7 -0
- package/dist/js/chunks/chunk-S23RJ3XY.mjs +86 -0
- package/dist/js/chunks/chunk-S23RJ3XY.mjs.map +7 -0
- package/dist/js/chunks/{chunk-SMY7GJSS.mjs → chunk-SPPHF7YZ.mjs} +36 -29
- package/dist/js/chunks/chunk-SPPHF7YZ.mjs.map +7 -0
- package/dist/js/chunks/chunk-T3BNSRP3.mjs +152 -0
- package/dist/js/chunks/chunk-T3BNSRP3.mjs.map +7 -0
- package/dist/js/chunks/chunk-TFABTUAZ.mjs +108 -0
- package/dist/js/chunks/chunk-TFABTUAZ.mjs.map +7 -0
- package/dist/js/chunks/chunk-U4B3VHFS.mjs +507 -0
- package/dist/js/chunks/chunk-U4B3VHFS.mjs.map +7 -0
- package/dist/js/chunks/chunk-UGJHCHXG.mjs +341 -0
- package/dist/js/chunks/chunk-UGJHCHXG.mjs.map +7 -0
- package/dist/js/chunks/chunk-VFV75DHF.mjs +70 -0
- package/dist/js/chunks/chunk-VFV75DHF.mjs.map +7 -0
- package/dist/js/chunks/{chunk-ZX6M7SWO.mjs → chunk-VGY4M57S.mjs} +266 -120
- package/dist/js/chunks/chunk-VGY4M57S.mjs.map +7 -0
- package/dist/js/chunks/chunk-VH4BMAZS.mjs +167 -0
- package/dist/js/chunks/chunk-VH4BMAZS.mjs.map +7 -0
- package/dist/js/chunks/chunk-VJVQIXHC.mjs +123 -0
- package/dist/js/chunks/chunk-VJVQIXHC.mjs.map +7 -0
- package/dist/js/chunks/{chunk-SFI2U4YW.mjs → chunk-VMY55K2X.mjs} +76 -109
- package/dist/js/chunks/chunk-VMY55K2X.mjs.map +7 -0
- package/dist/js/chunks/{chunk-KUFHW3DS.mjs → chunk-VR3L2WN5.mjs} +11 -17
- package/dist/js/chunks/chunk-VR3L2WN5.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-WU7XJ4RR.mjs +450 -0
- package/dist/js/chunks/chunk-WU7XJ4RR.mjs.map +7 -0
- package/dist/js/chunks/chunk-X7SDA2J5.mjs +116 -0
- package/dist/js/chunks/chunk-X7SDA2J5.mjs.map +7 -0
- package/dist/js/chunks/chunk-Y6H2X7ZC.mjs +209 -0
- package/dist/js/chunks/chunk-Y6H2X7ZC.mjs.map +7 -0
- package/dist/js/chunks/chunk-Y6TLRA3U.mjs +129 -0
- package/dist/js/chunks/chunk-Y6TLRA3U.mjs.map +7 -0
- package/dist/js/chunks/chunk-Z4GICXR2.mjs +190 -0
- package/dist/js/chunks/chunk-Z4GICXR2.mjs.map +7 -0
- package/dist/js/chunks/chunk-Z4OARDZ7.mjs +442 -0
- package/dist/js/chunks/chunk-Z4OARDZ7.mjs.map +7 -0
- package/dist/js/chunks/{chunk-FM5CZOUB.mjs → chunk-ZJNLAGY5.mjs} +19 -30
- package/dist/js/chunks/chunk-ZJNLAGY5.mjs.map +7 -0
- package/dist/js/chunks/chunk-ZKWUWBUB.mjs +81 -0
- package/dist/js/chunks/chunk-ZKWUWBUB.mjs.map +7 -0
- package/dist/js/chunks/chunk-ZM3XBHWV.mjs +746 -0
- package/dist/js/chunks/chunk-ZM3XBHWV.mjs.map +7 -0
- package/dist/js/chunks/chunk-ZO6ZLHFF.mjs +48 -0
- package/dist/js/chunks/chunk-ZO6ZLHFF.mjs.map +7 -0
- package/dist/js/chunks/chunk-ZVLOUDIJ.mjs +251 -0
- package/dist/js/chunks/chunk-ZVLOUDIJ.mjs.map +7 -0
- package/dist/js/expressive.cjs +10613 -4327
- package/dist/js/expressive.cjs.map +4 -4
- package/dist/js/expressive.js +10613 -4327
- 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 +182 -71
- 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 +10 -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 +4 -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 +6 -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 +11 -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 -66
- 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 +25 -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 +59 -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 +4 -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 +13 -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 +2 -1
- package/dist/js/internal/core/formControl.mjs +12 -0
- package/dist/js/internal/core/formControl.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 +11 -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 +173 -71
- package/dist/types/behaviors/bottomSheets.d.ts +19 -3
- package/dist/types/behaviors/copy.d.ts +18 -0
- package/dist/types/behaviors/dataTables.d.ts +129 -0
- package/dist/types/behaviors/dialogs.d.ts +27 -1
- package/dist/types/behaviors/forms.d.ts +68 -2
- package/dist/types/behaviors/imageCompare.d.ts +12 -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 +51 -0
- package/dist/types/components/appBar.d.ts +5 -6
- package/dist/types/components/autocomplete.d.ts +91 -17
- 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 +9 -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 +65 -19
- package/dist/types/components/colorPicker.d.ts +42 -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 +59 -0
- package/dist/types/components/datepicker.d.ts +56 -32
- package/dist/types/components/expandingCard.d.ts +4 -6
- package/dist/types/components/funnelChart.d.ts +38 -0
- package/dist/types/components/heatmapChart.d.ts +39 -8
- package/dist/types/components/hoverCard.d.ts +58 -0
- package/dist/types/components/index.d.ts +16 -1
- package/dist/types/components/inputMask.d.ts +30 -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 +172 -10
- package/dist/types/components/loadingOverlay.d.ts +42 -0
- package/dist/types/components/mapView.d.ts +26 -17
- package/dist/types/components/menu.d.ts +60 -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 +8 -4
- package/dist/types/components/pieChart.d.ts +32 -7
- 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 +6 -14
- 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 +43 -30
- package/dist/types/components/showMore.d.ts +51 -0
- package/dist/types/components/slider.d.ts +3 -15
- package/dist/types/components/snackbar.d.ts +61 -0
- package/dist/types/components/swipeActions.d.ts +81 -0
- package/dist/types/components/tabs.d.ts +89 -27
- package/dist/types/components/timepicker.d.ts +113 -21
- package/dist/types/components/tooltip.d.ts +56 -20
- 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 +43 -25
- package/dist/types/core/formControl.d.ts +21 -0
- package/dist/types/core/spring.d.ts +20 -0
- package/dist/types/core/utils.d.ts +85 -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 +32 -0
- package/package.json +10 -8
- 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 +422 -36
- package/src/sass/abstracts/_spring.scss +63 -0
- package/src/sass/abstracts/_variables.scss +39 -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 +9 -16
- package/src/sass/components/_alert.scss +102 -0
- package/src/sass/components/_aura.scss +8 -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 +41 -19
- package/src/sass/components/_bottom-sheet.scss +44 -16
- package/src/sass/components/_breadcrumb.scss +8 -1
- package/src/sass/components/_button-groups.scss +15 -25
- package/src/sass/components/_buttons.scss +156 -63
- package/src/sass/components/_calendar.scss +246 -0
- package/src/sass/components/_cards.scss +36 -44
- package/src/sass/components/_carousel.scss +27 -103
- package/src/sass/components/_cascader.scss +142 -0
- package/src/sass/components/_chips.scss +36 -46
- package/src/sass/components/_column-chart.scss +19 -12
- package/src/sass/components/_command-palette.scss +4 -7
- package/src/sass/components/_confetti.scss +0 -2
- package/src/sass/components/_countdown.scss +1 -1
- package/src/sass/components/_data-table.scss +162 -25
- package/src/sass/components/_datepicker.scss +54 -40
- package/src/sass/components/_description-list.scss +85 -0
- package/src/sass/components/_dialog.scss +42 -41
- 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 +20 -9
- package/src/sass/components/_fab-menu.scss +44 -32
- package/src/sass/components/_funnel-chart.scss +124 -0
- package/src/sass/components/_heatmap-chart.scss +111 -22
- package/src/sass/components/_icon-buttons.scss +7 -7
- 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 +16 -2
- 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 +33 -11
- package/src/sass/components/_marquee.scss +3 -2
- package/src/sass/components/_mega-menu.scss +137 -0
- package/src/sass/components/_menu.scss +143 -123
- package/src/sass/components/_menubar.scss +59 -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 +37 -9
- package/src/sass/components/_modal-display.scss +21 -0
- package/src/sass/components/_navbar.scss +34 -20
- package/src/sass/components/_navigation-bar.scss +15 -77
- package/src/sass/components/_navigation-rail.scss +151 -92
- package/src/sass/components/_org-chart.scss +192 -0
- package/src/sass/components/_page-footer.scss +1 -1
- package/src/sass/components/_pagination.scss +6 -13
- package/src/sass/components/_panes.scss +32 -26
- package/src/sass/components/_particles.scss +0 -2
- package/src/sass/components/_pie-chart.scss +91 -11
- package/src/sass/components/_popover.scss +18 -5
- package/src/sass/components/_progress.scss +152 -31
- 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 +38 -10
- package/src/sass/components/_radial-chart.scss +113 -5
- package/src/sass/components/_rich-text-editor.scss +2 -2
- package/src/sass/components/_sankey-chart.scss +114 -0
- package/src/sass/components/_scatter-chart.scss +153 -0
- package/src/sass/components/_scrim.scss +0 -2
- package/src/sass/components/_scrollspy.scss +0 -2
- package/src/sass/components/_search.scss +26 -22
- package/src/sass/components/_show-more.scss +8 -0
- package/src/sass/components/_side-sheet.scss +23 -37
- package/src/sass/components/_skeleton.scss +2 -4
- package/src/sass/components/_snackbar.scss +27 -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/_tabs.scss +51 -32
- package/src/sass/components/_timeline.scss +12 -12
- package/src/sass/components/_timepicker.scss +109 -78
- package/src/sass/components/_toolbar.scss +35 -43
- package/src/sass/components/_tooltip.scss +21 -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 +3 -16
- package/src/sass/components/_treemap-chart.scss +122 -0
- package/src/sass/components/forms/_checkboxes.scss +106 -24
- 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 +15 -9
- package/src/sass/components/forms/_fieldset.scss +7 -7
- package/src/sass/components/forms/_file-input.scss +6 -8
- package/src/sass/components/forms/_index.scss +3 -1
- package/src/sass/components/forms/_input-fields.scss +254 -90
- package/src/sass/components/forms/_radio-buttons.scss +33 -94
- package/src/sass/components/forms/_rating.scss +2 -32
- package/src/sass/components/forms/_select.scss +199 -20
- package/src/sass/components/forms/_slider.scss +91 -94
- package/src/sass/components/forms/_switches.scss +53 -164
- 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 +183 -26
- 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 +47 -76
- 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.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
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/ts/components/lineChart.ts"],
|
|
4
|
+
"sourcesContent": ["import { Component, BaseOptions } from '../core/component';\nimport { Utils, svgNode } from '../core/utils';\n\nexport interface LineChartOptions extends BaseOptions {\n /**\n * Lowest value on the y axis. Defaults to the data minimum less 10% of\n * the range; a stacked chart starts at zero or its lowest total, and a\n * column chart always includes zero. Overridden by `data-min` on the chart.\n */\n min: number | null;\n /**\n * Highest value on the y axis. Defaults to the data maximum plus 10% of\n * the range. Overridden by `data-max` on the chart.\n */\n max: number | null;\n /**\n * Redraws the chart whenever its table changes, once for the edits a\n * script makes in one run, so page script need not call `update()`.\n * `data-watch` on the chart turns it on too. Read when the chart starts.\n */\n watch: boolean;\n}\n\nconst _defaults: LineChartOptions = {\n min: null,\n max: null,\n watch: false\n};\n\nexport const COLORS = 4;\n\n/** The least space between two row labels. */\nconst LABEL_GAP = 4;\n\n/** A label's text width, and where the column it labels starts and ends. */\ninterface LabelBox {\n width: number;\n start: number;\n end: number;\n}\n\n/** Measures each label along the inline axis, which runs leftward in a right-to-left chart. */\nfunction labelBoxes(items: Element[], rtl: boolean): LabelBox[] {\n const range = document.createRange();\n return items.map((item) => {\n range.selectNodeContents(item);\n const width = range.getBoundingClientRect().width;\n const { left, right } = item.getBoundingClientRect();\n return rtl ? { width, start: -right, end: -left } : { width, start: left, end: right };\n });\n}\n\n/**\n * Where a kept label's text starts, as the CSS places it: the first and last\n * against the outer ends of their columns, the rest centred on theirs.\n */\nfunction labelStart(boxes: LabelBox[], index: number) {\n const box = boxes[index];\n if (index === 0) return box.start;\n if (index === boxes.length - 1) return box.end - box.width;\n return (box.start + box.end - box.width) / 2;\n}\n\n/** Whether keeping every stepth label leaves them apart and inside the chart. */\nfunction labelsFit(boxes: LabelBox[], step: number) {\n const edge = boxes[boxes.length - 1].end;\n let previous = -Infinity;\n for (let index = 0; index < boxes.length; index += step) {\n const start = labelStart(boxes, index);\n if (start < previous + LABEL_GAP || start + boxes[index].width > edge) return false;\n previous = start + boxes[index].width;\n }\n return true;\n}\n\n/**\n * How many columns apart the kept labels are: 1 when every label fits its\n * column, else the fewest that keeps them apart. When none does, 1 again,\n * and every label is cut to an ellipsis as before.\n */\nfunction labelStep(boxes: LabelBox[]) {\n if (boxes.every((box) => box.width + LABEL_GAP <= box.end - box.start)) return 1;\n for (let step = 2; step <= boxes.length; step++) {\n if (labelsFit(boxes, step)) return step;\n }\n return 1;\n}\n\n/**\n * Keeps every nth column label when they are wider than their columns, so a\n * narrow chart shows whole labels rather than cutting each to an ellipsis.\n * The container gets data-thinned and each hidden label data-skip.\n */\nfunction thinLabels(container: Element, items: Element[]) {\n const step = labelStep(labelBoxes(items, getComputedStyle(container).direction === 'rtl'));\n container.toggleAttribute('data-thinned', step > 1);\n items.forEach((item, index) => item.toggleAttribute('data-skip', index % step > 0));\n}\n\n/** Whether the changes reach the data: inside the table, or a table added or removed. */\nfunction tableChanged(records: MutationRecord[], el: Element) {\n const isTable = (node: Node) => node.nodeName === 'TABLE';\n return records.some((record) =>\n record.target !== el || [...record.addedNodes, ...record.removedNodes].some(isTable));\n}\n\n/**\n * The legend of a pie or radial chart: an item per row, colored as\n * `colors[i]` when that is set, holding a span for each of `rows[i]`.\n */\nexport function rowLegend(className: string, colors: (string | undefined)[], rows: string[][]): HTMLUListElement {\n const legend = document.createElement('ul');\n legend.className = className;\n legend.setAttribute('aria-hidden', 'true');\n legend.append(...rows.map((cells, i) => {\n const li = document.createElement('li');\n if (colors[i]) li.dataset.series = colors[i];\n li.append(...cells.map((content) => Object.assign(document.createElement('span'), { textContent: content })));\n return li;\n }));\n return legend;\n}\n\n/** A point at a turn clockwise from the top and a distance from the middle, as \"x,y\". */\nexport function polarPoint(turn: number, r: number): string {\n const angle = turn * 2 * Math.PI;\n return `${(r * Math.sin(angle)).toFixed(3)},${(-r * Math.cos(angle)).toFixed(3)}`;\n}\n\n/** A series' color number, for its `data-series`. */\nexport const seriesColor = (i: number) => String((i % COLORS) + 1);\nlet _gradientId = 0;\n\n/** The series update() moves the marks from: none when the reader asked for less motion. */\nconst startsFrom = (series: Series[]) =>\n matchMedia('(prefers-reduced-motion: reduce)').matches ? [] : series;\n\n/** A cubic-bezier() easing's four numbers, or the standard curve's for any other easing. */\nconst splines = (easing: string) => /cubic-bezier\\(([^)]*)\\)/.exec(easing)?.[1] ?? '0.2, 0, 0, 1';\n\n/**\n * The timing of the paths' motion after update(), from the chart's motion\n * tokens, as the columns' CSS transition reads them. Null for a zero\n * duration, which SVG would take as indefinite and hold the old shape.\n * ponytail: a curve that overshoots is not a valid SVG spline, so the\n * paths then skip their motion; a linear() token gets the standard curve.\n */\nexport function pace(el: Element) {\n const style = getComputedStyle(el);\n const dur = style.getPropertyValue('--md-sys-motion-duration-medium4').trim() || '400ms';\n return parseFloat(dur) > 0 ? { dur, keySplines: splines(style.getPropertyValue('--md-sys-motion-easing-standard')) } : null;\n}\n\n/**\n * Moves a path from the path data `from` to its own. SVG animation rather\n * than a CSS transition, since WebKit cannot transition the d property.\n */\nexport function morph(path: SVGElement, from: string, timing: Pace) {\n const to = path.getAttribute('d');\n if (from === to) return;\n path.append(svgNode('animate', { attributeName: 'd', from, to, ...timing, calcMode: 'spline', keyTimes: '0;1', fill: 'remove' }));\n}\n\n/** The paths' motion timing. */\ntype Pace = NonNullable<ReturnType<typeof pace>>;\n\n/** A series' line, the fill under it and its dots, as path data. */\ninterface Shape {\n line: string;\n area: string;\n dots: string;\n}\n\n/** A row's distance down the plot, in percent. */\ntype RowY = (index: number) => number;\n\n/** The buttons in a chart's generated parts, such as a .toggle legend's. */\nconst buttons = (nodes: Element[]) => nodes.flatMap((node) => Array.from(node.querySelectorAll('button')));\n\n/**\n * Whether a series has data. Its values, not its tops: stacked over another\n * series' gaps a series can have no top, yet still draws once that one hides.\n */\nconst drawable = (series: Series) => series.values.some((value) => value !== null);\n\n/** Axis steps, as multiples of a power of ten. */\nconst NICE = [1, 2, 2.5, 5, 10];\n\n/** A round step that cuts `span` into at most `parts` pieces. */\nexport function niceStep(span: number, parts = 4) {\n const raw = span / parts || 1;\n const power = 10 ** Math.floor(Math.log10(raw));\n return power * NICE.find((multiple) => multiple * power >= raw * (1 - 1e-9))!;\n}\n\n/** The multiples of `step` from `low` to `high`, without float error. */\nexport function steps(low: number, high: number, step: number) {\n const values: number[] = [];\n for (let i = Math.ceil(low / step - 1e-9); i * step <= high + step * 1e-9; i++) {\n values.push(Number((i * step).toPrecision(12)));\n }\n return values;\n}\n\n/** A number format in the element's language, or the browser's for an invalid lang attribute. */\nexport function numberFormat(el: Element, options: Intl.NumberFormatOptions) {\n return new Intl.NumberFormat(Utils.locale(el), options);\n}\n\n/** A y scale's ends, and with .axis the values its labels mark. */\nexport interface ChartScale {\n min: number;\n max: number;\n ticks: number[];\n}\n\nexport interface Series {\n name: string;\n /** Header cell classes, such as `dashed`. */\n className: string;\n /** The series' column in the table, from 1, which tells apart two of one name. */\n column: number;\n /** The `data-series` color number, by its column, so hiding a series shifts none. */\n color: string;\n /** Cell text, shown in the tooltip as the author formatted it. */\n text: string[];\n values: (number | null)[];\n /**\n * Where each value is drawn: the value, or in a stacked chart the running\n * total, which is unknown (null) above a gap.\n */\n tops: (number | null)[];\n /** In a stacked chart, the total of the series below, which this area fills down to. */\n base?: (number | null)[];\n /** The series' y scale: a value's distance down the plot, in percent. */\n y: (value: number) => number;\n scale: ChartScale;\n /**\n * The currency, percent or spacing around the first number written as\n * cell text, such as ['$', ''], which the axis labels repeat.\n */\n affix: [string, string];\n}\n\n/**\n * Reads a cell as a number. `data-value` wins over the text, which may carry\n * currency or percent signs, grouping commas and a typographic minus around\n * one number. Anything else, such as \"(1,200)\" or \"3\u20135\", is a gap rather\n * than a guess.\n */\nexport function cellValue(cell: Element | undefined): number | null {\n if (!cell) return null;\n return numberValue((cell as HTMLElement).dataset.value ?? cell.textContent);\n}\n\n/** Reads text as one number, as cellValue does, or null. */\nexport function numberValue(raw: string): number | null {\n const text = raw.replace(/\\u2212/g, '-').replace(/[\\s%\\p{Sc}]/gu, '');\n if (!/^[+-]?(\\d{1,3}(,\\d{3})+|\\d+)?(\\.\\d+)?(e[+-]?\\d+)?$/i.test(text)) return null;\n // The pattern also lets through \"e5\" (NaN) and \"1e400\" (Infinity).\n const value = parseFloat(text.replace(/,/g, ''));\n return Number.isFinite(value) ? value : null;\n}\n\n/** An axis label: the tick in `format`, with the column's signs after any minus. */\nexport function tickText(format: Intl.NumberFormat, tick: number, [prefix, suffix]: [string, string]) {\n return format.format(tick).replace(/^[-\\u2212]?/, (sign) => sign + prefix) + suffix;\n}\n\n/** The currency, percent and spacing around a cell's number, as [prefix, suffix]. */\nexport function signs(text: string): [string, string] {\n // Each end is read from its own side, so a long run of spaces stays linear.\n const prefix = /^[\\s\\p{Sc}]*/u.exec(text)![0];\n const end = (chars: string) => [...chars].reverse().join('');\n return [prefix, end(/^[\\s%\\p{Sc}]*/u.exec(end(text.slice(prefix.length)))![0])];\n}\n\n/** The signs around the first value a column spells out in its text. */\nexport function affix(cells: (Element | undefined)[]): [string, string] {\n const cell = cells.find((each) => !(each as HTMLElement)?.dataset.value && cellValue(each) !== null);\n return signs(cell?.textContent.trim() ?? '');\n}\n\n/** Straight lines through the points; one point is a dot. */\nfunction straightPath(points: [number, number][]): string {\n return `M${points.join('L')}${points.length > 1 ? '' : 'h0'}`;\n}\n\n/**\n * A monotone cubic through the points (Fritsch-Butland tangents), so the\n * curve never overshoots a data point. Bezier curves keep their shape under\n * the plot's non-uniform scaling, so this can be drawn in a 0-100 box.\n */\nfunction monotonePath(points: [number, number][]): string {\n const n = points.length;\n if (n === 0) return '';\n if (n === 1) return `M${points[0][0]},${points[0][1]}h0`;\n const slopes: number[] = [];\n for (let i = 0; i < n - 1; i++) {\n slopes.push((points[i + 1][1] - points[i][1]) / (points[i + 1][0] - points[i][0]));\n }\n const tangents = points.map((_, i) => {\n if (i === 0) return slopes[0];\n if (i === n - 1) return slopes[n - 2];\n const [a, b] = [slopes[i - 1], slopes[i]];\n return a * b <= 0 ? 0 : 2 / (1 / a + 1 / b);\n });\n let d = `M${points[0][0]},${points[0][1]}`;\n for (let i = 0; i < n - 1; i++) {\n const [[x0, y0], [x1, y1]] = [points[i], points[i + 1]];\n const h = (x1 - x0) / 3;\n d += `C${x0 + h},${y0 + tangents[i] * h} ${x1 - h},${y1 - tangents[i + 1] * h} ${x1},${y1}`;\n }\n return d;\n}\n\n/**\n * Line chart. The data is the chart's <table>; this class draws it as an SVG\n * with x labels, a legend for more than one series, and a cursor and tooltip\n * that follow the pointer or the arrow keys. Styling is CSS.\n *\n * Call `update()` after changing the table, or start it with `watch` or\n * `data-watch`.\n */\nexport class LineChart extends Component<LineChartOptions> {\n /** The values' x positions and series, read from the table. */\n labels: string[] = [];\n series: Series[] = [];\n /** The highlighted row, or -1. */\n activeIndex = -1;\n private _generated: Element[] = [];\n /** Watches the row labels' width, to thin them on a narrow chart. */\n private _labelSizes: ResizeObserver | null = null;\n /** With `watch`, redraws the chart when its table changes. */\n private _tableWatch: MutationObserver | null = null;\n /** Every series in the table, shown or not, as the legend lists them. */\n protected _all: Series[] = [];\n /**\n * During update(), the series drawn before it, which the new marks move\n * from. Empty otherwise, and when the reader prefers less motion.\n */\n protected _before: Series[] = [];\n /** The columns of the series a .toggle legend hid, kept through update(). */\n private _hidden = new Set<number>();\n /** The table's header cells and body rows, as read. */\n protected _header: HTMLTableCellElement[] = [];\n protected _rows: HTMLTableRowElement[] = [];\n protected _plot: HTMLElement;\n protected _cursor: HTMLElement;\n protected _tooltip: HTMLElement;\n protected _y: (value: number) => number;\n /**\n * Whether the rows run right to left: a horizontal row axis in a\n * right-to-left context, like the labels. Bar chart rows keep their order.\n */\n protected _reversed = false;\n\n /** The class prefix of the generated parts; ColumnChart reuses this class. */\n protected get _type() {\n return 'line-chart';\n }\n\n /** The column the series start at; a scatter chart's first value column is its x axis. */\n protected get _seriesFrom() {\n return 1;\n }\n\n /** The column the series end before, as slice() takes it; a bubble chart's last column holds sizes. */\n protected get _seriesTo(): number | undefined {\n return undefined;\n }\n\n /** Whether the y axis always includes zero, as columns grow from it. */\n protected get _fromZero() {\n return false;\n }\n\n /**\n * Whether the rows run down the plot and the values across it, as in a\n * bar chart. The rows then keep their order in a right-to-left context.\n */\n protected get _horizontal() {\n return false;\n }\n\n /**\n * Whether the rows go round a circle, as in a pie or radar chart. The\n * arrows then step round it, wrapping from the last row to the first.\n */\n protected get _circular() {\n return false;\n }\n\n /** Whether .axis labels the value scale, which a sparkline never does. */\n protected get _axis() {\n return this.el.classList.contains('axis') && !this.el.classList.contains('sparkline');\n }\n\n /** Whether the cursor marks each series with a point. */\n protected get _points() {\n return true;\n }\n\n /** How many rows `show()` can highlight. */\n protected get _count() {\n return this.labels.length;\n }\n\n constructor(el: HTMLElement, options: Partial<LineChartOptions>) {\n super(el, options);\n\n this._build();\n this._listen();\n if (this.options.watch || this.el.hasAttribute('data-watch')) {\n this._tableWatch = new MutationObserver((records) => tableChanged(records, this.el) && this.update());\n }\n this._watch();\n }\n\n /**\n * Observes the table as it is now, and the chart for a table added or\n * replaced. Reconnecting drops the changes already queued, which the\n * caller has just drawn.\n */\n private _watch() {\n if (!this._tableWatch) return;\n this._tableWatch.disconnect();\n this._tableWatch.observe(this.el, { childList: true });\n const table = this.el.querySelector(':scope > table');\n if (table) {\n this._tableWatch.observe(table, {\n subtree: true,\n childList: true,\n characterData: true,\n attributeFilter: ['data-value', 'class', 'data-label']\n });\n }\n }\n\n /** Reads the table and draws it, when it has data. */\n private _build() {\n this._read();\n if (!this.labels.length || !this.series.length) return;\n this._reversed = !this._horizontal && getComputedStyle(this.el).direction === 'rtl';\n this._render();\n }\n\n /** Whether the pointer and keys pick rows, which a sparkline's do not. */\n private get _interactive() {\n return !this.el.classList.contains('sparkline');\n }\n\n /** Lets the pointer and keys pick rows on the plot. */\n private _listen() {\n if (this._plot && this._interactive) {\n // A tap has no move before it, so the press picks the row too.\n this._plot.addEventListener('pointerdown', this._onPointerMove);\n this._plot.addEventListener('pointermove', this._onPointerMove);\n this._plot.addEventListener('pointerleave', this._onLeave);\n this._plot.addEventListener('pointercancel', this._onCancel);\n this._plot.addEventListener('keydown', this._onKeyDown);\n this._plot.addEventListener('focus', this._onFocus);\n this._plot.addEventListener('blur', this._onLeave);\n }\n }\n\n static get defaults(): LineChartOptions {\n return _defaults;\n }\n\n static key = 'Expressive_LineChart';\n\n destroy() {\n // The listeners live on the plot, which goes with the generated nodes.\n this._generated.forEach((node) => node.remove());\n this._generated = [];\n this._labelSizes?.disconnect();\n this._tableWatch?.disconnect();\n super.destroy();\n }\n\n /**\n * Redraws the chart from its table as it is now. Focus stays on the chart,\n * on the same legend button when one had it, and the highlighted row stays\n * where the table still has it.\n */\n update() {\n if ((this.constructor as typeof LineChart).getInstance(this.el) !== this) return;\n const old = this._generated;\n // Inside a shadow root, the document's active element is the host.\n const active = (this.el.getRootNode() as Document | ShadowRoot).activeElement;\n const [index, focused] = [this.activeIndex, old.some((node) => node.contains(active))];\n const button = buttons(old).indexOf(active as HTMLButtonElement);\n this._generated = [];\n this.activeIndex = -1;\n this._plot = this._cursor = this._tooltip = undefined;\n this._before = startsFrom(this.series);\n this._build();\n this._before = [];\n // Focus moves before the old plot goes, so a keyboard focus ring carries\n // over, and before the listeners, so focusing picks no row of its own.\n if (focused) (buttons(this._generated)[button] ?? this._plot)?.focus({ preventScroll: true });\n old.forEach((node) => node.remove());\n this._listen();\n this.show(Math.min(index, this._count - 1));\n this._watch();\n }\n\n /**\n * Highlights one row: moves the cursor and fills the tooltip.\n * Pass -1 to hide them. Does nothing for a chart without data.\n */\n show(index: number) {\n // Skipping a repeat also keeps the live tooltip from re-announcing.\n if (!this._tooltip || index === this.activeIndex) return;\n this.activeIndex = index;\n const hidden = index < 0 || index >= this.labels.length;\n this._cursor.hidden = this._tooltip.hidden = hidden;\n if (hidden) return;\n\n this._cursor.replaceChildren();\n const title = document.createElement('strong');\n title.textContent = this.labels[index];\n this._tooltip.replaceChildren(title);\n\n this.series.forEach((series) => {\n const value = series.values[index];\n if (value === null) return;\n const color = series.color;\n const top = series.tops[index];\n if (top !== null && this._points) {\n const dot = document.createElement('span');\n dot.className = series.className;\n dot.dataset.series = color;\n dot.style.top = `${series.y(top)}%`;\n this._cursor.append(dot);\n }\n const name = document.createElement('span');\n name.dataset.series = color;\n name.textContent = series.name;\n const text = document.createElement('span');\n text.textContent = series.text[index];\n this._tooltip.append(name, text);\n });\n this._place(index);\n }\n\n /**\n * Moves the filled cursor and tooltip to a row: beside its band, with the\n * tooltip opening back over the plot past the middle.\n */\n protected _place(index: number) {\n const x = this._x(index);\n const side = this._horizontal ? 'top' : 'left';\n this._cursor.style[side] = this._tooltip.style[side] = `${x}%`;\n this._tooltip.classList.toggle('end', x > 50);\n }\n\n protected _read() {\n const table = this.el.querySelector<HTMLTableElement>(':scope > table');\n if (!table) return;\n // Without a <thead> the parser puts the header row in the first <tbody>.\n const headerRow = table.tHead?.rows[0] ?? table.rows[0];\n const header = Array.from(headerRow?.cells ?? []);\n const rows = Array.from(table.tBodies)\n .flatMap((body) => Array.from(body.rows))\n .filter((row) => row !== headerRow);\n [this._header, this._rows] = [header, rows];\n this.labels = rows.map((row) => row.cells[0]?.textContent.trim() ?? '');\n const from = this._seriesFrom;\n this.series = header.slice(from, this._seriesTo).map((cell, i) => {\n const values = rows.map((row) => cellValue(row.cells[i + from]));\n return {\n name: cell.textContent.trim(),\n className: cell.className,\n column: i + from,\n color: seriesColor(i),\n text: rows.map((row) => row.cells[i + from]?.textContent.trim() ?? ''),\n values,\n tops: values,\n y: undefined,\n scale: undefined,\n affix: affix(rows.map((row) => row.cells[i + from]))\n };\n });\n this._all = this.series;\n this.series = this._shown(this._all);\n const option = (name: 'min' | 'max') => this._number(name) ?? this.options[name];\n this._y = this._scale(this.series, option('min'), option('max'));\n }\n\n /**\n * The series to draw, arranged: those the legend has not hidden, or none\n * without data. When the ones shown hold no data, as after the table\n * changed, the hidden ones come back, so the legend never hides the only\n * data there is.\n */\n private _shown(all: Series[]): Series[] {\n const shown = all.filter((series) => !this._hidden.has(series.column));\n this._arrange(shown);\n if (shown.some(drawable)) return shown;\n if (!this._hidden.size) return [];\n this._hidden.clear();\n return this._shown(all);\n }\n\n /** Turns the values read into what is drawn: with .stacked, running totals. */\n protected _arrange(series: Series[]) {\n if (this.el.classList.contains('stacked')) this._stack(series);\n }\n\n /**\n * Stacks each series on the ones before it: its tops become running\n * totals and its base the total below. A gap leaves the total unknown, so\n * the series above break there too.\n */\n protected _stack(series: Series[]) {\n // ponytail: negative values overlap the band below; diverging stacks if needed.\n const totals: (number | null)[] = this.labels.map(() => 0);\n for (const each of series) {\n each.base = [...totals];\n each.tops = each.values.map((value, i) =>\n (totals[i] = value === null || totals[i] === null ? null : totals[i] + value));\n }\n }\n\n /** A number from one of the chart's data attributes, or null. */\n protected _number(name: string) {\n const value = parseFloat(this.el.dataset[name] ?? '');\n return Number.isFinite(value) ? value : null;\n }\n\n /**\n * Fits a y scale to the series' tops, between `min` and `max` where they\n * are set, and gives it to each series.\n */\n protected _scale(series: Series[], min: number | null, max: number | null, fromZero = this._fromZero) {\n const fixed = [min !== null, max !== null] as const;\n const stacked = this.el.classList.contains('stacked');\n let [low, high] = [Infinity, -Infinity];\n // A base below zero, such as a range's low end, needs room on the scale too.\n for (const { tops, base = [] } of series) {\n for (const value of [...tops, ...base]) {\n if (value === null) continue;\n low = Math.min(low, value);\n high = Math.max(high, value);\n }\n }\n if (low > high) low = high = 0;\n if (fromZero) {\n // Zero is on the scale, with 10% of the span to spare on each side\n // that has data.\n const [bottom, top] = [Math.min(0, low), Math.max(0, high)];\n const room = (top - (min ?? bottom)) * 0.1 || 1;\n min ??= bottom < 0 ? bottom - room : 0;\n max ??= top + room;\n } else {\n const pad = (high - low) * 0.1 || 1;\n // Stacked areas are read against zero, with the headroom of that span.\n min ??= stacked ? Math.min(0, low) : low - pad;\n max ??= high + (stacked ? (high - min) * 0.1 || 1 : pad);\n }\n return this._apply(series, this._fit(min, max, fixed));\n }\n\n /**\n * With .axis, widens each end the chart chose to a round step and lists\n * the steps for the labels. An end set by the author stays where it is.\n */\n protected _fit(min: number, max: number, [fixedMin, fixedMax]: readonly boolean[]): ChartScale {\n if (!this._axis) return { min, max, ticks: [] };\n const step = niceStep(max - min);\n const low = fixedMin ? min : Math.floor(min / step + 1e-9) * step;\n const high = fixedMax ? max : Math.ceil(max / step - 1e-9) * step;\n return { min: low, max: high, ticks: steps(low, high, step) };\n }\n\n /** Gives the series a scale and the y function it draws with. */\n protected _apply(series: Series[], scale: ChartScale) {\n const y = (value: number) => 100 - ((value - scale.min) / (scale.max - scale.min || 1)) * 100;\n for (const each of series) Object.assign(each, { y, scale });\n return y;\n }\n\n /** Each row sits in the middle of an equal band, beside its label. */\n private _x(index: number) {\n const x = ((index + 0.5) / this.labels.length) * 100;\n return this._reversed ? 100 - x : x;\n }\n\n private _render() {\n const type = this._type;\n this._plot = document.createElement('div');\n this._plot.className = `${type}-plot`;\n const caption = this.el.querySelector(':scope > figcaption')?.textContent.trim();\n this._plot.setAttribute('role', 'group');\n this._plot.setAttribute('aria-roledescription', type.replace(/-/g, ' '));\n if (caption) this._plot.setAttribute('aria-label', caption);\n if (this._interactive) this._plot.tabIndex = 0;\n\n this._cursor = document.createElement('div');\n this._cursor.className = `${type}-cursor`;\n this._cursor.hidden = true;\n this._tooltip = document.createElement('div');\n this._tooltip.className = `${type}-tooltip`;\n this._tooltip.hidden = true;\n this._tooltip.setAttribute('aria-live', 'polite');\n this._plot.append(...this._axes(), this._draw(), this._cursor, this._tooltip);\n\n this._generated = [this._plot, ...this._guides()];\n this.el.append(...this._generated);\n }\n\n /**\n * The <tfoot> row as a total to show over the plot, its value over its\n * label, or null without one.\n */\n protected _total(className: string): HTMLElement | null {\n const footer = this.el.querySelector<HTMLTableElement>(':scope > table')?.tFoot?.rows[0];\n if (!footer) return null;\n const total = document.createElement('div');\n total.className = className;\n const [label, value] = [document.createElement('span'), document.createElement('strong')];\n label.textContent = footer.cells[0]?.textContent.trim() ?? '';\n value.textContent = footer.cells[1]?.textContent.trim() ?? '';\n total.append(value, label);\n return total;\n }\n\n /** The parts below the plot: the row labels and the legend. */\n protected _guides(): Element[] {\n const labels = document.createElement('ol');\n labels.className = `${this._type}-labels`;\n labels.setAttribute('aria-hidden', 'true');\n // A loop rather than a spread: a spread of every row overflows the stack.\n for (const text of this.labels) {\n const li = document.createElement('li');\n // In a span, so a kept label can overflow its column centred.\n li.append(document.createElement('span'));\n li.firstChild.textContent = text;\n labels.append(li);\n }\n this._observeLabels(labels, Array.from(labels.children));\n return [labels, ...this._legend()];\n }\n\n /**\n * Thins the column labels in container whenever its width changes. A bar\n * chart's labels run down instead, and no labels leaves nothing to watch.\n */\n protected _observeLabels(container: HTMLElement, items: Element[]) {\n this._labelSizes?.disconnect();\n if (this._horizontal || !items.length) return;\n this._labelSizes = new ResizeObserver(() => thinLabels(container, items));\n this._labelSizes.observe(container);\n }\n\n /**\n * With .axis, the value labels, behind the marks: the start scale's with\n * a grid line at each, and a mixed chart's end scale on the far side.\n */\n protected _axes(): Element[] {\n if (!this._axis) return [];\n const isEnd = (series: Series) => series.className.split(/\\s+/).includes('end');\n const start = this.series.find((series) => !isEnd(series)) ?? this.series[0];\n const end = this.series.find((series) => series.y !== start.y);\n return [start, end].filter(Boolean).map((series, i) => this._valueAxis(series!, i > 0));\n }\n\n /** One scale's labels, each placed by --at, its value's distance down the plot. */\n private _valueAxis(series: Series, end: boolean) {\n const axis = document.createElement('ol');\n axis.className = `${this._type}-axis${end ? ' end' : ''}`;\n axis.setAttribute('aria-hidden', 'true');\n const number = numberFormat(this.el, { notation: 'compact', maximumSignificantDigits: 3 });\n for (const tick of series.scale.ticks) {\n const li = document.createElement('li');\n const label = document.createElement('span');\n label.textContent = tickText(number, tick, series.affix);\n li.style.setProperty('--at', `${series.y(tick)}%`);\n li.append(label);\n axis.append(li);\n }\n return axis;\n }\n\n /**\n * The series legend, for more than one series. With .toggle each item is\n * a button that shows or hides its series, and the scale refits.\n */\n protected _legend(): Element[] {\n if (this._all.length < 2) return [];\n const toggle = this.el.classList.contains('toggle');\n const legend = document.createElement('ul');\n legend.className = `${this._type}-legend`;\n if (!toggle) legend.setAttribute('aria-hidden', 'true');\n legend.append(...this._all.map((series) => {\n const li = document.createElement('li');\n li.dataset.series = series.color;\n li.append(toggle ? this._toggle(series) : series.name);\n return li;\n }));\n return [legend];\n }\n\n /** A button that shows or hides a series, though never the last one shown. */\n private _toggle(series: Series) {\n const button = document.createElement('button');\n const shown = this.series.includes(series);\n button.type = 'button';\n button.className = 'chart-toggle';\n button.textContent = series.name;\n button.setAttribute('aria-pressed', String(shown));\n // The last series shown with data stays, so the chart never empties.\n if (shown && drawable(series) && this.series.filter(drawable).length < 2) button.setAttribute('aria-disabled', 'true');\n button.addEventListener('click', () => {\n if (button.hasAttribute('aria-disabled')) return;\n if (shown) this._hidden.add(series.column);\n else this._hidden.delete(series.column);\n this.update();\n });\n return button;\n }\n\n /** Draws the series, which fill the plot. */\n protected _draw(drawn = this.series): Element {\n const svg = svgNode('svg', {\n viewBox: '0 0 100 100',\n preserveAspectRatio: 'none',\n 'aria-hidden': 'true',\n focusable: 'false'\n });\n const timing = this._before.length ? pace(this.el) : null;\n const starts = timing ? this._starts(drawn) : [];\n svg.append(...drawn.map((series, i) => this._line(series, starts[i], timing)));\n return svg;\n }\n\n /**\n * After update(), the shape each series moves from: where it was drawn,\n * and for a row it had no value at, its base. That is the plot bottom,\n * or in a stack where the series below starts, so the stack stays joined.\n */\n private _starts(drawn: Series[]): Shape[] {\n let below: RowY | undefined;\n return drawn.map((series) => {\n const base: RowY = !series.base ? () => 100 : below ?? this._baseY(series);\n below = this._was(series, base);\n return this._shape(series, below, base);\n });\n }\n\n /** Where a series drew each row before update(), or its base for a row it had no value at. */\n private _was(series: Series, base: RowY): RowY {\n const old = this._before.find((each) => each.column === series.column);\n return (index) => {\n const top = old?.tops[index] ?? null;\n return top === null ? base(index) : old!.y(top);\n };\n }\n\n /** Where a stacked area's base runs: the series below, or the plot bottom when zero is off the scale. */\n private _baseY(series: Series): RowY {\n return (index) => Math.min(100, series.y(series.base![index]!));\n }\n\n /**\n * A series' paths, with its rows at `top` and a stacked area's base at\n * `base`. The line is smooth, or with .straight straight, and a gap in the\n * data breaks it into runs.\n */\n private _shape(series: Series, top: RowY, base: RowY): Shape {\n const runs: number[][] = [[]];\n series.tops.forEach((value, index) => {\n if (value === null) runs.push([]);\n else runs[runs.length - 1].push(index);\n });\n const filled = runs.filter((run) => run.length);\n const points = (run: number[], y: RowY) => run.map((index): [number, number] => [this._x(index), y(index)]);\n const curve = this.el.classList.contains('straight') ? straightPath : monotonePath;\n const tops = filled.map((run) => curve(points(run, top)));\n return {\n line: tops.join(''),\n // A stacked area runs back along the series below; the reversed curve\n // is the same curve.\n area: filled\n .map((run, r) => series.base\n ? `${tops[r]}L${curve(points(run, base).reverse()).slice(1)}Z`\n : `${tops[r]}V100H${this._x(run[0])}Z`)\n .join(''),\n // Round caps on zero-length lines, so CSS sizes the dots in pixels.\n dots: filled.flatMap((run) => points(run, top)).map(([x, y]) => `M${x},${y}h0`).join('')\n };\n }\n\n /**\n * One series' group: its line, the fill under it, and with .points a dot\n * at each value. After update() each path moves from its `from` shape.\n */\n private _line(series: Series, from?: Shape, timing?: Pace | null) {\n const group = svgNode('g', {\n class: `${this._type}-series ${series.className}`.trim(),\n 'data-series': series.color\n });\n const shape = this._shape(series, (index) => series.y(series.tops[index]!), this._baseY(series));\n\n const id = `line-chart-gradient-${++_gradientId}`;\n const gradient = svgNode('linearGradient', { id, x2: '0', y2: '1' });\n gradient.append(svgNode('stop'), svgNode('stop', { offset: '1' }));\n\n const path = (part: keyof Shape, name: string, attributes: Record<string, string> = {}) => {\n const node = svgNode('path', { class: `${this._type}-${name}`, d: shape[part], ...attributes });\n // A start shape comes with the timing it moves on.\n if (from) morph(node, from[part], timing!);\n return node;\n };\n group.append(gradient, path('area', 'area', { fill: `url(#${id})` }), path('line', 'line'));\n if (this.el.classList.contains('points')) group.append(path('dots', 'points'));\n return group;\n }\n\n private _onPointerMove = (e: PointerEvent) => {\n this.show(this._indexAt(e));\n };\n\n /** The row under the pointer, or -1. */\n protected _indexAt(e: PointerEvent) {\n const box = this._plot.getBoundingClientRect();\n const fraction = this._horizontal\n ? (e.clientY - box.top) / box.height\n : (e.clientX - box.left) / box.width;\n const index = Math.floor((this._reversed ? 1 - fraction : fraction) * this.labels.length);\n return Math.min(this.labels.length - 1, Math.max(0, index));\n }\n\n /**\n * For a circular chart, the pointer's position from the plot's middle: a\n * fraction of a turn clockwise from the top, and its distance as a share\n * of the plot's width.\n */\n protected _polarAt(e: PointerEvent): [turn: number, distance: number] {\n const box = this._plot.getBoundingClientRect();\n const [x, y] = [e.clientX - box.left - box.width / 2, e.clientY - box.top - box.height / 2];\n return [(Math.atan2(x, -y) / (2 * Math.PI) + 1) % 1, Math.hypot(x, y) / box.width];\n }\n\n /** The keys that move to the next row and to the one before. */\n protected get _arrows(): [string[], string[]] {\n // Round a circle both pairs work. The rows run clockwise in RTL too, so\n // right still moves the way the top row turns.\n if (this._circular) return [['ArrowRight', 'ArrowDown'], ['ArrowLeft', 'ArrowUp']];\n // Arrows move the cursor the way they point, so they swap in RTL.\n if (this._horizontal) return [['ArrowDown'], ['ArrowUp']];\n return this._reversed ? [['ArrowLeft'], ['ArrowRight']] : [['ArrowRight'], ['ArrowLeft']];\n }\n\n private _onFocus = () => {\n // Only keyboard focus picks the first row; a press off the marks, which\n // focuses the plot too, leaves the tooltip hidden.\n if (this.activeIndex < 0 && this._plot.matches(':focus-visible')) this.show(0);\n };\n\n private _onLeave = (e: Event) => {\n // A touch leaves as it lifts; the tapped row stays until the plot blurs.\n if ((e as PointerEvent).pointerType === 'touch' || this._plot.matches(':focus-visible')) return;\n this.show(-1);\n };\n\n /** The browser took the touch to scroll the page. */\n private _onCancel = () => {\n this.show(-1);\n };\n\n /** The index a key moves to, or undefined for a key the chart ignores. */\n protected _keyTarget(key: string): number | undefined {\n const last = this.labels.length - 1;\n const [forward, back] = this._arrows;\n const step = (by: number) => {\n if (!this._circular) return Math.min(last, Math.max(0, this.activeIndex + by));\n // Round a circle the ends meet; from no row, back starts at the last.\n if (this.activeIndex < 0) return by > 0 ? 0 : last;\n return (this.activeIndex + by + last + 1) % (last + 1);\n };\n // With nothing shown, Escape is left to a dialog or sheet around the chart.\n if (key === 'Escape') return this.activeIndex < 0 ? undefined : -1;\n return forward.includes(key) ? step(1)\n : back.includes(key) ? step(-1)\n : { Home: 0, End: last }[key];\n }\n\n private _onKeyDown = (e: KeyboardEvent) => {\n const next = this._keyTarget(e.key);\n if (next === undefined) return;\n e.preventDefault();\n this.show(next);\n };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAuBA,IAAM,YAA8B;AAAA,EAClC,KAAK;AAAA,EACL,KAAK;AAAA,EACL,OAAO;AACT;AAEO,IAAM,SAAS;AAGtB,IAAM,YAAY;AAUlB,SAAS,WAAW,OAAkB,KAA0B;AAC9D,QAAM,QAAQ,SAAS,YAAY;AACnC,SAAO,MAAM,IAAI,CAAC,SAAS;AACzB,UAAM,mBAAmB,IAAI;AAC7B,UAAM,QAAQ,MAAM,sBAAsB,EAAE;AAC5C,UAAM,EAAE,MAAM,MAAM,IAAI,KAAK,sBAAsB;AACnD,WAAO,MAAM,EAAE,OAAO,OAAO,CAAC,OAAO,KAAK,CAAC,KAAK,IAAI,EAAE,OAAO,OAAO,MAAM,KAAK,MAAM;AAAA,EACvF,CAAC;AACH;AAMA,SAAS,WAAW,OAAmB,OAAe;AACpD,QAAM,MAAM,MAAM,KAAK;AACvB,MAAI,UAAU,EAAG,QAAO,IAAI;AAC5B,MAAI,UAAU,MAAM,SAAS,EAAG,QAAO,IAAI,MAAM,IAAI;AACrD,UAAQ,IAAI,QAAQ,IAAI,MAAM,IAAI,S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AAM,GAAG,KAAK,KAAK,EAAE,GAAG;AAAA,EAChC;AAQF;AAhqBa,UAkJJ,MAAM;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Snackbar
|
|
3
|
+
} from "./chunk-KZPSAXIU.mjs";
|
|
4
|
+
import {
|
|
5
|
+
Utils
|
|
6
|
+
} from "./chunk-ZVLOUDIJ.mjs";
|
|
7
|
+
|
|
8
|
+
// src/ts/behaviors/copy.ts
|
|
9
|
+
var _Copy = class _Copy {
|
|
10
|
+
// A second Init adds nothing: addEventListener ignores a listener it has.
|
|
11
|
+
static Init() {
|
|
12
|
+
if (typeof document === "undefined") return;
|
|
13
|
+
document.addEventListener("click", _Copy._onClick);
|
|
14
|
+
}
|
|
15
|
+
/** The text a copy button would write, or null when it names nothing. */
|
|
16
|
+
static textFor(button) {
|
|
17
|
+
if (button.hasAttribute("data-copy")) return button.getAttribute("data-copy");
|
|
18
|
+
const source = Utils.getElementById(button, button.getAttribute("data-copy-for") ?? "");
|
|
19
|
+
if (!source) return null;
|
|
20
|
+
return source instanceof HTMLInputElement || source instanceof HTMLTextAreaElement || source instanceof HTMLSelectElement ? source.value : (source.textContent ?? "").trim();
|
|
21
|
+
}
|
|
22
|
+
static async _onClick(e) {
|
|
23
|
+
const button = Utils.closestInPath(e, "[data-copy], [data-copy-for]");
|
|
24
|
+
if (!button || button.matches(':disabled, [aria-disabled="true"]')) return;
|
|
25
|
+
const text = _Copy.textFor(button);
|
|
26
|
+
if (text === null) return;
|
|
27
|
+
let copied = true;
|
|
28
|
+
try {
|
|
29
|
+
await navigator.clipboard.writeText(text);
|
|
30
|
+
} catch {
|
|
31
|
+
copied = false;
|
|
32
|
+
}
|
|
33
|
+
new Snackbar({
|
|
34
|
+
text: copied ? button.getAttribute("data-copy-message") || _Copy.i18n.copied : button.getAttribute("data-copy-error") || _Copy.i18n.failed,
|
|
35
|
+
root: button,
|
|
36
|
+
// A second copy answers at once rather than waiting behind the first.
|
|
37
|
+
replace: true
|
|
38
|
+
});
|
|
39
|
+
Utils.emit(button, "copy", { text, copied });
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
_Copy.i18n = { copied: "Copied", failed: "Couldn't copy" };
|
|
43
|
+
var Copy = _Copy;
|
|
44
|
+
|
|
45
|
+
export {
|
|
46
|
+
Copy
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=chunk-ZO6ZLHFF.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/ts/behaviors/copy.ts"],
|
|
4
|
+
"sourcesContent": ["import { Snackbar } from '../components/snackbar';\nimport { Utils } from '../core/utils';\n\n/**\n * Copy buttons. A click on `[data-copy]` writes that attribute's text to the\n * clipboard; a click on `[data-copy-for=\"id\"]` writes the named element's\n * value (fields) or text content (anything else). A snackbar confirms the\n * result, which is also what screen readers announce: it is a polite status.\n * `Copy.i18n` holds its two texts; `data-copy-message` and `data-copy-error`\n * replace them for one button.\n */\nexport class Copy {\n static i18n = { copied: 'Copied', failed: \"Couldn't copy\" };\n // A second Init adds nothing: addEventListener ignores a listener it has.\n static Init() {\n if (typeof document === 'undefined') return;\n document.addEventListener('click', Copy._onClick);\n }\n\n /** The text a copy button would write, or null when it names nothing. */\n static textFor(button: Element): string | null {\n if (button.hasAttribute('data-copy')) return button.getAttribute('data-copy');\n const source = Utils.getElementById(button, button.getAttribute('data-copy-for') ?? '');\n if (!source) return null;\n return source instanceof HTMLInputElement ||\n source instanceof HTMLTextAreaElement ||\n source instanceof HTMLSelectElement\n ? source.value\n : (source.textContent ?? '').trim();\n }\n\n private static async _onClick(e: MouseEvent) {\n const button = Utils.closestInPath(e, '[data-copy], [data-copy-for]');\n if (!button || button.matches(':disabled, [aria-disabled=\"true\"]')) return;\n const text = Copy.textFor(button);\n if (text === null) return;\n let copied = true;\n try {\n await navigator.clipboard.writeText(text);\n } catch {\n // No clipboard API outside a secure context, or permission refused.\n copied = false;\n }\n new Snackbar({\n text: copied\n ? button.getAttribute('data-copy-message') || Copy.i18n.copied\n : button.getAttribute('data-copy-error') || Copy.i18n.failed,\n root: button as HTMLElement,\n // A second copy answers at once rather than waiting behind the first.\n replace: true\n });\n Utils.emit(button, 'copy', { text, copied });\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAWO,IAAM,QAAN,MAAM,MAAK;AAAA;AAAA,EAGhB,OAAO,OAAO;AACZ,QAAI,OAAO,aAAa,YAAa;AACrC,aAAS,iBAAiB,SAAS,MAAK,QAAQ;AAAA,EAClD;AAAA;AAAA,EAGA,OAAO,QAAQ,QAAgC;AAC7C,QAAI,OAAO,aAAa,WAAW,EAAG,QAAO,OAAO,aAAa,WAAW;AAC5E,UAAM,SAAS,MAAM,eAAe,QAAQ,OAAO,aAAa,eAAe,KAAK,EAAE;AACtF,QAAI,CAAC,OAAQ,QAAO;AACpB,WAAO,kBAAkB,oBACvB,kBAAkB,uBAClB,kBAAkB,oBAChB,OAAO,SACN,OAAO,eAAe,IAAI,KAAK;AAAA,EACtC;AAAA,EAEA,aAAqB,SAAS,GAAe;AAC3C,UAAM,SAAS,MAAM,cAAc,GAAG,8BAA8B;AACpE,QAAI,CAAC,UAAU,OAAO,QAAQ,mCAAmC,EAAG;AACpE,UAAM,OAAO,MAAK,QAAQ,MAAM;AAChC,QAAI,SAAS,KAAM;AACnB,QAAI,SAAS;AACb,QAAI;AACF,YAAM,UAAU,UAAU,UAAU,IAAI;AAAA,IAC1C,QAAQ;AAEN,eAAS;AAAA,IACX;AACA,QAAI,SAAS;AAAA,MACX,MAAM,SACF,OAAO,aAAa,mBAAmB,KAAK,MAAK,KAAK,SACtD,OAAO,aAAa,iBAAiB,KAAK,MAAK,KAAK;AAAA,MACxD,MAAM;AAAA;AAAA,MAEN,SAAS;AAAA,IACX,CAAC;AACD,UAAM,KAAK,QAAQ,QAAQ,EAAE,MAAM,OAAO,CAAC;AAAA,EAC7C;AACF;AA1Ca,MACJ,OAAO,EAAE,QAAQ,UAAU,QAAQ,gBAAgB;AADrD,IAAM,OAAN;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
// src/ts/core/utils.ts
|
|
2
|
+
var fit = (start, size, view, offset) => start < offset ? offset : start + size > view - offset ? view - size : start;
|
|
3
|
+
function restoreAttribute(el, name, value) {
|
|
4
|
+
if (value === null) el.removeAttribute(name);
|
|
5
|
+
else el.setAttribute(name, value);
|
|
6
|
+
}
|
|
7
|
+
function footerButton(parent, text, className, onClick, visible = true) {
|
|
8
|
+
const button = document.createElement("button");
|
|
9
|
+
button.className = `${className} text`;
|
|
10
|
+
button.style.visibility = visible ? "visible" : "hidden";
|
|
11
|
+
button.type = "button";
|
|
12
|
+
button.tabIndex = visible ? 0 : -1;
|
|
13
|
+
button.innerText = text;
|
|
14
|
+
button.addEventListener("click", onClick);
|
|
15
|
+
parent.append(button);
|
|
16
|
+
}
|
|
17
|
+
function pickerFooter(footer, { i18n, showClearBtn, autoSubmit }, clearClass, onClear, onConfirm, onCancel) {
|
|
18
|
+
footerButton(footer, i18n.clear, clearClass, onClear, showClearBtn);
|
|
19
|
+
if (autoSubmit) return;
|
|
20
|
+
const buttons = document.createElement("div");
|
|
21
|
+
buttons.classList.add("confirmation-btns");
|
|
22
|
+
footer.append(buttons);
|
|
23
|
+
footerButton(buttons, i18n.cancel, "btn-cancel", onCancel);
|
|
24
|
+
footerButton(buttons, i18n.done, "btn-confirm", onConfirm);
|
|
25
|
+
}
|
|
26
|
+
function controllerFor(node) {
|
|
27
|
+
return new (node.ownerDocument?.defaultView ?? window).AbortController();
|
|
28
|
+
}
|
|
29
|
+
function svgNode(name, attributes = {}) {
|
|
30
|
+
const element = document.createElementNS("http://www.w3.org/2000/svg", name);
|
|
31
|
+
for (const key in attributes) element.setAttribute(key, attributes[key]);
|
|
32
|
+
return element;
|
|
33
|
+
}
|
|
34
|
+
var Utils = class _Utils {
|
|
35
|
+
/**
|
|
36
|
+
* Whether a keydown belongs to an IME composition, such as the Enter that
|
|
37
|
+
* confirms a candidate. Safari reports `isComposing` false for that Enter,
|
|
38
|
+
* so keyCode 229 covers it.
|
|
39
|
+
*/
|
|
40
|
+
static isComposing(e) {
|
|
41
|
+
return e.isComposing || e.keyCode === 229;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* `handler`, skipped for every key of an IME composition: while the user
|
|
45
|
+
* picks a candidate, Enter, the arrows and Escape belong to the IME.
|
|
46
|
+
*/
|
|
47
|
+
static ignoringComposition(handler) {
|
|
48
|
+
return (e) => {
|
|
49
|
+
if (!_Utils.isComposing(e)) handler(e);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Run `callback` once the document is parsed.
|
|
54
|
+
*
|
|
55
|
+
* The document-level behaviors all used a bare DOMContentLoaded listener,
|
|
56
|
+
* which never fires if the bundle is loaded after that event - an async or
|
|
57
|
+
* deferred script tag, or a dynamic import. Checking readyState first covers
|
|
58
|
+
* both orders.
|
|
59
|
+
*/
|
|
60
|
+
static onDocumentReady(callback) {
|
|
61
|
+
if (typeof document === "undefined") return;
|
|
62
|
+
if (document.readyState === "loading") {
|
|
63
|
+
document.addEventListener("DOMContentLoaded", callback, { once: true });
|
|
64
|
+
} else {
|
|
65
|
+
callback();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The language an element is written in, from the nearest `lang`, or
|
|
70
|
+
* undefined without one or for a tag the browser does not know.
|
|
71
|
+
*/
|
|
72
|
+
static locale(el) {
|
|
73
|
+
let [node, lang] = [el, void 0];
|
|
74
|
+
while (node && lang === void 0) {
|
|
75
|
+
lang = node.closest("[lang]")?.lang;
|
|
76
|
+
node = node.getRootNode().host;
|
|
77
|
+
}
|
|
78
|
+
try {
|
|
79
|
+
return lang ? Intl.getCanonicalLocales(lang)[0] : void 0;
|
|
80
|
+
} catch {
|
|
81
|
+
return void 0;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Generates a unique string identifier. Every caller prefixes the result and
|
|
86
|
+
* uses it as an element id, and a UUID is valid in that position.
|
|
87
|
+
*
|
|
88
|
+
* `randomUUID` is exposed only in secure contexts, and a dev server on a
|
|
89
|
+
* plain-HTTP LAN address - the usual way a page is opened on a phone - is
|
|
90
|
+
* not one. Without the fallback every component that stamps an id would
|
|
91
|
+
* throw there. The ids only have to be unique within one document, so the
|
|
92
|
+
* fallback does not need to be cryptographic.
|
|
93
|
+
*/
|
|
94
|
+
static guid() {
|
|
95
|
+
return globalThis.crypto?.randomUUID?.() ?? `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Where an element created at runtime has to be appended to stay in the same
|
|
99
|
+
* tree as `el`. A stylesheet adopted into a shadow root cannot match a node
|
|
100
|
+
* in the document, so a portal that lands on `document.body` is unstyled
|
|
101
|
+
* whenever its origin lives in a shadow root (adr/0002).
|
|
102
|
+
*
|
|
103
|
+
* Light-DOM elements still get `document.body`, which is what escapes an
|
|
104
|
+
* ancestor's `overflow: hidden` and stacking context. Inside a shadow root
|
|
105
|
+
* both hazards come back: the host's own ancestors still form the containing
|
|
106
|
+
* block, so a transformed ancestor re-anchors `position: fixed` and a
|
|
107
|
+
* positioned one re-anchors `position: absolute`.
|
|
108
|
+
*/
|
|
109
|
+
static portalRoot(el) {
|
|
110
|
+
const root = el.getRootNode();
|
|
111
|
+
return root.host ? root : document.body;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* `getElementById` against the tree `el` lives in. The mirror of
|
|
115
|
+
* `portalRoot`: an id in a shadow root is invisible to
|
|
116
|
+
* `document.getElementById`, so a trigger and its target inside the same
|
|
117
|
+
* root could not find each other at all.
|
|
118
|
+
*
|
|
119
|
+
* Falls back to the document for a detached `el`, whose root is a plain
|
|
120
|
+
* element with no lookup of its own.
|
|
121
|
+
*/
|
|
122
|
+
static getElementById(el, id) {
|
|
123
|
+
const root = el.getRootNode();
|
|
124
|
+
return root.getElementById ? root.getElementById(id) : document.getElementById(id);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Adds or removes one name in an element's inline `anchor-name` list. A
|
|
128
|
+
* trigger can anchor a Tooltip and a Menu at once, and writing the whole
|
|
129
|
+
* property let the last writer, or the first to be destroyed, wipe the other.
|
|
130
|
+
*/
|
|
131
|
+
static setAnchorName(el, name, on) {
|
|
132
|
+
const names = el.style.getPropertyValue("anchor-name").split(",").map((n) => n.trim()).filter((n) => n && n !== "none" && n !== name);
|
|
133
|
+
if (on) names.push(name);
|
|
134
|
+
if (names.length) el.style.setProperty("anchor-name", names.join(", "));
|
|
135
|
+
else el.style.removeProperty("anchor-name");
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Fires `expressive:<type>` from `el`. It bubbles and crosses shadow roots,
|
|
139
|
+
* so a page can listen on the element, an ancestor or the document. A
|
|
140
|
+
* `cancelable` event returns false once a listener calls preventDefault().
|
|
141
|
+
*/
|
|
142
|
+
static emit(el, type, detail, cancelable = false) {
|
|
143
|
+
return el.dispatchEvent(new CustomEvent(`expressive:${type}`, { bubbles: true, composed: true, cancelable, detail }));
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* The element an event really started on, for a listener on the document.
|
|
147
|
+
* There `event.target` is retargeted to the shadow host, so delegation that
|
|
148
|
+
* reads it never sees anything inside an open shadow root. A closed root
|
|
149
|
+
* keeps its inside private and still yields the host.
|
|
150
|
+
*/
|
|
151
|
+
static eventTarget(event) {
|
|
152
|
+
const target = event.composedPath()[0] ?? event.target;
|
|
153
|
+
return target instanceof Element ? target : null;
|
|
154
|
+
}
|
|
155
|
+
/** Whether a key was pressed without Alt, Ctrl or Meta, which belong to the browser and the system. */
|
|
156
|
+
static plainKey(e) {
|
|
157
|
+
return !(e.altKey || e.ctrlKey || e.metaKey);
|
|
158
|
+
}
|
|
159
|
+
/** Where a key moves from `index` among `count` items: by `steps`, or to an end for Home and End. NaN for any other key. */
|
|
160
|
+
static _keyIndex(key, index, count, steps) {
|
|
161
|
+
if (key === "Home") return 0;
|
|
162
|
+
if (key === "End") return count - 1;
|
|
163
|
+
return index + (steps[key] ?? NaN);
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* The item a key moves focus to, from the focused one among `items`: by
|
|
167
|
+
* the offset `steps` gives the key, or to the first or last for Home and
|
|
168
|
+
* End. Disabled items are skipped. Undefined for other keys, for a key
|
|
169
|
+
* with a modifier, when focus is on none of the items, and past either end
|
|
170
|
+
* unless `wrap`.
|
|
171
|
+
*/
|
|
172
|
+
static focusTarget(items, e, steps, wrap = false) {
|
|
173
|
+
const enabled = items.filter((item) => !item.matches(':disabled, [aria-disabled="true"], .disabled'));
|
|
174
|
+
const index = enabled.indexOf(_Utils.eventTarget(e));
|
|
175
|
+
if (index < 0 || !_Utils.plainKey(e)) return void 0;
|
|
176
|
+
const to = _Utils._keyIndex(e.key, index, enabled.length, steps);
|
|
177
|
+
return enabled[wrap ? (to + enabled.length) % enabled.length : to];
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Whether focus is on or inside any of `els`, read from each element's own
|
|
181
|
+
* root. A document listener cannot tell from `composedPath()` when the
|
|
182
|
+
* element sits in a closed shadow root, but the element's root still knows
|
|
183
|
+
* what has focus.
|
|
184
|
+
*/
|
|
185
|
+
static focusIsIn(...els) {
|
|
186
|
+
return els.some((el) => {
|
|
187
|
+
const active = el && el.getRootNode().activeElement;
|
|
188
|
+
return !!active && el.contains(active);
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* `closest()` for a document listener: the nearest element on the event's
|
|
193
|
+
* composed path that matches `selector`. Unlike `eventTarget(e).closest()`
|
|
194
|
+
* it climbs out of shadow roots too, so a press on a shadow-root icon inside
|
|
195
|
+
* a light-DOM button still finds the button.
|
|
196
|
+
*/
|
|
197
|
+
static closestInPath(event, selector) {
|
|
198
|
+
for (const node of event.composedPath()) {
|
|
199
|
+
if (node instanceof Element && node.matches(selector)) return node;
|
|
200
|
+
}
|
|
201
|
+
return null;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Retrieves target element id from trigger.
|
|
205
|
+
* @param trigger Trigger element.
|
|
206
|
+
*/
|
|
207
|
+
static getIdFromTrigger(trigger) {
|
|
208
|
+
return trigger.dataset.target || (trigger.getAttribute("href")?.slice(1) ?? "");
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Writes document coordinates as `top`/`left` on an absolutely positioned
|
|
212
|
+
* element. A static body uses document coordinates; positioned parents,
|
|
213
|
+
* such as a shadow host, use their padding edge, including borders and
|
|
214
|
+
* local scrolling.
|
|
215
|
+
*/
|
|
216
|
+
static _placeInOffsetParent(el, coordinates) {
|
|
217
|
+
let { x, y } = coordinates;
|
|
218
|
+
const parent = el.offsetParent;
|
|
219
|
+
if (parent && (parent !== document.body || getComputedStyle(parent).position !== "static")) {
|
|
220
|
+
const rect = parent.getBoundingClientRect();
|
|
221
|
+
const root = parent === document.scrollingElement;
|
|
222
|
+
x -= rect.left + window.scrollX + parent.clientLeft - (root ? 0 : parent.scrollLeft);
|
|
223
|
+
y -= rect.top + window.scrollY + parent.clientTop - (root ? 0 : parent.scrollTop);
|
|
224
|
+
}
|
|
225
|
+
el.style.top = y + "px";
|
|
226
|
+
el.style.left = x + "px";
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Moves document coordinates so a `width` by `height` box stays in the
|
|
230
|
+
* viewport. A box past the left or top edge, or within `offset` of it,
|
|
231
|
+
* starts `offset` in; a box past the right or bottom edge, or within
|
|
232
|
+
* `offset` of it, ends at that edge. `offset` is the margin plus the slide
|
|
233
|
+
* distance, or minus it for right alignment.
|
|
234
|
+
*/
|
|
235
|
+
static _repositionWithinScreen(x, y, width, height, margin, transitionMovement, align) {
|
|
236
|
+
const offset = margin + (align === "right" ? -transitionMovement : transitionMovement);
|
|
237
|
+
return {
|
|
238
|
+
x: window.scrollX + fit(x - window.scrollX, width, window.innerWidth, offset),
|
|
239
|
+
y: window.scrollY + fit(y - window.scrollY, height, window.innerHeight, offset)
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
export {
|
|
245
|
+
restoreAttribute,
|
|
246
|
+
pickerFooter,
|
|
247
|
+
controllerFor,
|
|
248
|
+
svgNode,
|
|
249
|
+
Utils
|
|
250
|
+
};
|
|
251
|
+
//# sourceMappingURL=chunk-ZVLOUDIJ.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/ts/core/utils.ts"],
|
|
4
|
+
"sourcesContent": ["/** One axis of a viewport clamp: `start` moved so `size` fits in `view`. */\nconst fit = (start: number, size: number, view: number, offset: number) =>\n start < offset ? offset : start + size > view - offset ? view - size : start;\n\n/** Sets an attribute, or removes it for null, as when restoring a value read with getAttribute. */\nexport function restoreAttribute(el: Element, name: string, value: string | null) {\n if (value === null) el.removeAttribute(name);\n else el.setAttribute(name, value);\n}\n\n/** A picker footer text button; a hidden one is also out of the tab order. */\nfunction footerButton(parent: HTMLElement, text: string, className: string, onClick: () => void, visible = true) {\n const button = document.createElement('button');\n button.className = `${className} text`;\n button.style.visibility = visible ? 'visible' : 'hidden';\n button.type = 'button';\n button.tabIndex = visible ? 0 : -1;\n button.innerText = text;\n button.addEventListener('click', onClick);\n parent.append(button);\n}\n\n/**\n * Fills a picker's footer: a Clear button, hidden unless `showClearBtn`,\n * then Cancel and Done unless the picker writes its value without them.\n */\nexport function pickerFooter(\n footer: HTMLElement,\n { i18n, showClearBtn, autoSubmit }: { i18n: Partial<Record<'clear' | 'cancel' | 'done', string>>; showClearBtn: boolean; autoSubmit: boolean },\n clearClass: string,\n onClear: () => void,\n onConfirm: () => void,\n onCancel: () => void\n) {\n footerButton(footer, i18n.clear, clearClass, onClear, showClearBtn);\n if (autoSubmit) return;\n const buttons = document.createElement('div');\n buttons.classList.add('confirmation-btns');\n footer.append(buttons);\n footerButton(buttons, i18n.cancel, 'btn-cancel', onCancel);\n footerButton(buttons, i18n.done, 'btn-confirm', onConfirm);\n}\n\n/**\n * An AbortController from the window `node` is in. Its signal removes\n * listeners added there, and jsdom rejects a signal from another window.\n */\nexport function controllerFor(node: Node): AbortController {\n return new (node.ownerDocument?.defaultView ?? window).AbortController();\n}\n\n/** An SVG element with its attributes. */\nexport function svgNode(name: string, attributes: Record<string, string> = {}): SVGElement {\n const element = document.createElementNS('http://www.w3.org/2000/svg', name);\n for (const key in attributes) element.setAttribute(key, attributes[key]);\n return element;\n}\n\n/**\n * Class with utilitary functions for global usage.\n */\nexport class Utils {\n /**\n * Whether a keydown belongs to an IME composition, such as the Enter that\n * confirms a candidate. Safari reports `isComposing` false for that Enter,\n * so keyCode 229 covers it.\n */\n static isComposing(e: KeyboardEvent): boolean {\n return e.isComposing || e.keyCode === 229;\n }\n\n /**\n * `handler`, skipped for every key of an IME composition: while the user\n * picks a candidate, Enter, the arrows and Escape belong to the IME.\n */\n static ignoringComposition(handler: (e: KeyboardEvent) => void): (e: KeyboardEvent) => void {\n return (e) => {\n if (!Utils.isComposing(e)) handler(e);\n };\n }\n\n /**\n * Run `callback` once the document is parsed.\n *\n * The document-level behaviors all used a bare DOMContentLoaded listener,\n * which never fires if the bundle is loaded after that event - an async or\n * deferred script tag, or a dynamic import. Checking readyState first covers\n * both orders.\n */\n static onDocumentReady(callback: () => void): void {\n if (typeof document === 'undefined') return;\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback, { once: true });\n } else {\n callback();\n }\n }\n\n /**\n * The language an element is written in, from the nearest `lang`, or\n * undefined without one or for a tag the browser does not know.\n */\n static locale(el: Element): string | undefined {\n // Inside a shadow root the language comes from the host's tree, unless\n // something nearer sets one.\n let [node, lang]: [Element | undefined, string | undefined] = [el, undefined];\n while (node && lang === undefined) {\n lang = node.closest<HTMLElement>('[lang]')?.lang;\n node = (node.getRootNode() as ShadowRoot).host;\n }\n try {\n return lang ? Intl.getCanonicalLocales(lang)[0] : undefined;\n } catch {\n return undefined;\n }\n }\n\n /**\n * Generates a unique string identifier. Every caller prefixes the result and\n * uses it as an element id, and a UUID is valid in that position.\n *\n * `randomUUID` is exposed only in secure contexts, and a dev server on a\n * plain-HTTP LAN address - the usual way a page is opened on a phone - is\n * not one. Without the fallback every component that stamps an id would\n * throw there. The ids only have to be unique within one document, so the\n * fallback does not need to be cryptographic.\n */\n static guid(): string {\n return (\n globalThis.crypto?.randomUUID?.() ??\n `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`\n );\n }\n\n /**\n * Where an element created at runtime has to be appended to stay in the same\n * tree as `el`. A stylesheet adopted into a shadow root cannot match a node\n * in the document, so a portal that lands on `document.body` is unstyled\n * whenever its origin lives in a shadow root (adr/0002).\n *\n * Light-DOM elements still get `document.body`, which is what escapes an\n * ancestor's `overflow: hidden` and stacking context. Inside a shadow root\n * both hazards come back: the host's own ancestors still form the containing\n * block, so a transformed ancestor re-anchors `position: fixed` and a\n * positioned one re-anchors `position: absolute`.\n */\n static portalRoot(el: Node): HTMLElement | ShadowRoot {\n const root = el.getRootNode() as ShadowRoot;\n // Only a ShadowRoot has a host; a Document or a detached subtree does not.\n return root.host ? root : document.body;\n }\n\n /**\n * `getElementById` against the tree `el` lives in. The mirror of\n * `portalRoot`: an id in a shadow root is invisible to\n * `document.getElementById`, so a trigger and its target inside the same\n * root could not find each other at all.\n *\n * Falls back to the document for a detached `el`, whose root is a plain\n * element with no lookup of its own.\n */\n static getElementById(el: Node, id: string): HTMLElement {\n const root = el.getRootNode() as Document | ShadowRoot;\n return (root.getElementById ? root.getElementById(id) : document.getElementById(id)) as HTMLElement;\n }\n\n /**\n * Adds or removes one name in an element's inline `anchor-name` list. A\n * trigger can anchor a Tooltip and a Menu at once, and writing the whole\n * property let the last writer, or the first to be destroyed, wipe the other.\n */\n static setAnchorName(el: HTMLElement, name: string, on: boolean) {\n const names = el.style.getPropertyValue('anchor-name').split(',').map((n) => n.trim())\n .filter((n) => n && n !== 'none' && n !== name);\n if (on) names.push(name);\n if (names.length) el.style.setProperty('anchor-name', names.join(', '));\n else el.style.removeProperty('anchor-name');\n }\n\n /**\n * Fires `expressive:<type>` from `el`. It bubbles and crosses shadow roots,\n * so a page can listen on the element, an ancestor or the document. A\n * `cancelable` event returns false once a listener calls preventDefault().\n */\n static emit(el: Element, type: string, detail?: unknown, cancelable = false) {\n return el.dispatchEvent(new CustomEvent(`expressive:${type}`, { bubbles: true, composed: true, cancelable, detail }));\n }\n\n /**\n * The element an event really started on, for a listener on the document.\n * There `event.target` is retargeted to the shadow host, so delegation that\n * reads it never sees anything inside an open shadow root. A closed root\n * keeps its inside private and still yields the host.\n */\n static eventTarget(event: Event): Element | null {\n const target = event.composedPath()[0] ?? event.target;\n return target instanceof Element ? target : null;\n }\n\n /** Whether a key was pressed without Alt, Ctrl or Meta, which belong to the browser and the system. */\n static plainKey(e: KeyboardEvent): boolean {\n return !(e.altKey || e.ctrlKey || e.metaKey);\n }\n\n /** Where a key moves from `index` among `count` items: by `steps`, or to an end for Home and End. NaN for any other key. */\n static _keyIndex(key: string, index: number, count: number, steps: Record<string, number>) {\n if (key === 'Home') return 0;\n if (key === 'End') return count - 1;\n return index + (steps[key] ?? NaN);\n }\n\n /**\n * The item a key moves focus to, from the focused one among `items`: by\n * the offset `steps` gives the key, or to the first or last for Home and\n * End. Disabled items are skipped. Undefined for other keys, for a key\n * with a modifier, when focus is on none of the items, and past either end\n * unless `wrap`.\n */\n static focusTarget(items: HTMLElement[], e: KeyboardEvent, steps: Record<string, number>, wrap = false): HTMLElement | undefined {\n const enabled = items.filter((item) => !item.matches(':disabled, [aria-disabled=\"true\"], .disabled'));\n const index = enabled.indexOf(Utils.eventTarget(e) as HTMLElement);\n if (index < 0 || !Utils.plainKey(e)) return undefined;\n const to = Utils._keyIndex(e.key, index, enabled.length, steps);\n return enabled[wrap ? (to + enabled.length) % enabled.length : to];\n }\n\n /**\n * Whether focus is on or inside any of `els`, read from each element's own\n * root. A document listener cannot tell from `composedPath()` when the\n * element sits in a closed shadow root, but the element's root still knows\n * what has focus.\n */\n static focusIsIn(...els: (Element | null | undefined)[]): boolean {\n return els.some((el) => {\n const active = el && (el.getRootNode() as Document | ShadowRoot).activeElement;\n return !!active && el.contains(active);\n });\n }\n\n /**\n * `closest()` for a document listener: the nearest element on the event's\n * composed path that matches `selector`. Unlike `eventTarget(e).closest()`\n * it climbs out of shadow roots too, so a press on a shadow-root icon inside\n * a light-DOM button still finds the button.\n */\n static closestInPath(event: Event, selector: string): Element | null {\n for (const node of event.composedPath()) {\n if (node instanceof Element && node.matches(selector)) return node;\n }\n return null;\n }\n\n /**\n * Retrieves target element id from trigger.\n * @param trigger Trigger element.\n */\n static getIdFromTrigger(trigger: HTMLElement): string {\n return trigger.dataset.target || (trigger.getAttribute('href')?.slice(1) ?? '');\n }\n\n /**\n * Writes document coordinates as `top`/`left` on an absolutely positioned\n * element. A static body uses document coordinates; positioned parents,\n * such as a shadow host, use their padding edge, including borders and\n * local scrolling.\n */\n static _placeInOffsetParent(el: HTMLElement, coordinates: { x: number; y: number }) {\n let { x, y } = coordinates;\n const parent = el.offsetParent as HTMLElement;\n if (parent && (parent !== document.body || getComputedStyle(parent).position !== 'static')) {\n const rect = parent.getBoundingClientRect();\n const root = parent === document.scrollingElement;\n x -= rect.left + window.scrollX + parent.clientLeft - (root ? 0 : parent.scrollLeft);\n y -= rect.top + window.scrollY + parent.clientTop - (root ? 0 : parent.scrollTop);\n }\n el.style.top = y + 'px';\n el.style.left = x + 'px';\n }\n\n /**\n * Moves document coordinates so a `width` by `height` box stays in the\n * viewport. A box past the left or top edge, or within `offset` of it,\n * starts `offset` in; a box past the right or bottom edge, or within\n * `offset` of it, ends at that edge. `offset` is the margin plus the slide\n * distance, or minus it for right alignment.\n */\n static _repositionWithinScreen(\n x: number,\n y: number,\n width: number,\n height: number,\n margin: number,\n transitionMovement: number,\n align: string\n ) {\n const offset = margin + (align === 'right' ? -transitionMovement : transitionMovement);\n return {\n x: window.scrollX + fit(x - window.scrollX, width, window.innerWidth, offset),\n y: window.scrollY + fit(y - window.scrollY, height, window.innerHeight, offset)\n };\n }\n}\n"],
|
|
5
|
+
"mappings": ";AACA,IAAM,MAAM,CAAC,OAAe,MAAc,MAAc,WACtD,QAAQ,SAAS,SAAS,QAAQ,OAAO,OAAO,SAAS,OAAO,OAAO;AAGlE,SAAS,iBAAiB,IAAa,MAAc,OAAsB;AAChF,MAAI,UAAU,KAAM,IAAG,gBAAgB,IAAI;AAAA,MACtC,IAAG,aAAa,MAAM,KAAK;AAClC;AAGA,SAAS,aAAa,QAAqB,MAAc,WAAmB,SAAqB,UAAU,MAAM;AAC/G,QAAM,SAAS,SAAS,cAAc,QAAQ;AAC9C,SAAO,YAAY,GAAG,SAAS;AAC/B,SAAO,MAAM,aAAa,UAAU,YAAY;AAChD,SAAO,OAAO;AACd,SAAO,WAAW,UAAU,IAAI;AAChC,SAAO,YAAY;AACnB,SAAO,iBAAiB,SAAS,OAAO;AACxC,SAAO,OAAO,MAAM;AACtB;AAMO,SAAS,aACd,QACA,EAAE,MAAM,cAAc,WAAW,GACjC,YACA,SACA,WACA,UACA;AACA,eAAa,QAAQ,KAAK,OAAO,YAAY,SAAS,YAAY;AAClE,MAAI,WAAY;AAChB,QAAM,UAAU,SAAS,cAAc,KAAK;AAC5C,UAAQ,UAAU,IAAI,mBAAmB;AACzC,SAAO,OAAO,OAAO;AACrB,eAAa,SAAS,KAAK,QAAQ,cAAc,QAAQ;AACzD,eAAa,SAAS,KAAK,MAAM,eAAe,SAAS;AAC3D;AAMO,SAAS,cAAc,MAA6B;AACzD,SAAO,KAAK,KAAK,eAAe,eAAe,QAAQ,gBAAgB;AACzE;AAGO,SAAS,QAAQ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