@expressivecss/expressive 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1807 -1
- package/README.md +9 -8
- package/dist/css/expressive.css +19176 -11958
- package/dist/css/expressive.css.map +1 -1
- package/dist/css/expressive.min.css +1 -1
- package/dist/css/expressive.min.css.map +1 -1
- package/dist/fonts/LICENSE-noto-sans-arabic +93 -0
- package/dist/fonts/LICENSE-noto-sans-hebrew +93 -0
- package/dist/fonts/LICENSE-noto-sans-thai +93 -0
- package/dist/fonts/material-symbols-outlined.woff2 +0 -0
- package/dist/fonts/material-symbols-rounded.woff2 +0 -0
- package/dist/fonts/material-symbols-sharp.woff2 +0 -0
- package/dist/fonts/noto-sans-arabic-arabic-400.woff2 +0 -0
- package/dist/fonts/noto-sans-arabic-arabic-500.woff2 +0 -0
- package/dist/fonts/noto-sans-arabic-arabic-700.woff2 +0 -0
- package/dist/fonts/noto-sans-cyrillic-400.woff2 +0 -0
- package/dist/fonts/noto-sans-cyrillic-500.woff2 +0 -0
- package/dist/fonts/noto-sans-cyrillic-700.woff2 +0 -0
- package/dist/fonts/noto-sans-cyrillic-ext-400.woff2 +0 -0
- package/dist/fonts/noto-sans-cyrillic-ext-500.woff2 +0 -0
- package/dist/fonts/noto-sans-cyrillic-ext-700.woff2 +0 -0
- package/dist/fonts/noto-sans-devanagari-400.woff2 +0 -0
- package/dist/fonts/noto-sans-devanagari-500.woff2 +0 -0
- package/dist/fonts/noto-sans-devanagari-700.woff2 +0 -0
- package/dist/fonts/noto-sans-greek-400.woff2 +0 -0
- package/dist/fonts/noto-sans-greek-500.woff2 +0 -0
- package/dist/fonts/noto-sans-greek-700.woff2 +0 -0
- package/dist/fonts/noto-sans-greek-ext-400.woff2 +0 -0
- package/dist/fonts/noto-sans-greek-ext-500.woff2 +0 -0
- package/dist/fonts/noto-sans-greek-ext-700.woff2 +0 -0
- package/dist/fonts/noto-sans-hebrew-hebrew-400.woff2 +0 -0
- package/dist/fonts/noto-sans-hebrew-hebrew-500.woff2 +0 -0
- package/dist/fonts/noto-sans-hebrew-hebrew-700.woff2 +0 -0
- package/dist/fonts/noto-sans-latin-700.woff2 +0 -0
- package/dist/fonts/noto-sans-latin-ext-400.woff2 +0 -0
- package/dist/fonts/noto-sans-latin-ext-500.woff2 +0 -0
- package/dist/fonts/noto-sans-latin-ext-700.woff2 +0 -0
- package/dist/fonts/noto-sans-thai-thai-400.woff2 +0 -0
- package/dist/fonts/noto-sans-thai-thai-500.woff2 +0 -0
- package/dist/fonts/noto-sans-thai-thai-700.woff2 +0 -0
- package/dist/fonts/noto-sans-vietnamese-400.woff2 +0 -0
- package/dist/fonts/noto-sans-vietnamese-500.woff2 +0 -0
- package/dist/fonts/noto-sans-vietnamese-700.woff2 +0 -0
- package/dist/fonts/roboto-cyrillic-400.woff2 +0 -0
- package/dist/fonts/roboto-cyrillic-500.woff2 +0 -0
- package/dist/fonts/roboto-cyrillic-700.woff2 +0 -0
- package/dist/fonts/roboto-cyrillic-ext-400.woff2 +0 -0
- package/dist/fonts/roboto-cyrillic-ext-500.woff2 +0 -0
- package/dist/fonts/roboto-cyrillic-ext-700.woff2 +0 -0
- package/dist/fonts/roboto-greek-400.woff2 +0 -0
- package/dist/fonts/roboto-greek-500.woff2 +0 -0
- package/dist/fonts/roboto-greek-700.woff2 +0 -0
- package/dist/fonts/roboto-greek-ext-400.woff2 +0 -0
- package/dist/fonts/roboto-greek-ext-500.woff2 +0 -0
- package/dist/fonts/roboto-greek-ext-700.woff2 +0 -0
- package/dist/fonts/roboto-latin-700.woff2 +0 -0
- package/dist/fonts/roboto-latin-ext-400.woff2 +0 -0
- package/dist/fonts/roboto-latin-ext-500.woff2 +0 -0
- package/dist/fonts/roboto-latin-ext-700.woff2 +0 -0
- package/dist/fonts/roboto-vietnamese-400.woff2 +0 -0
- package/dist/fonts/roboto-vietnamese-500.woff2 +0 -0
- package/dist/fonts/roboto-vietnamese-700.woff2 +0 -0
- package/dist/js/chunks/chunk-26VUH75M.mjs +102 -0
- package/dist/js/chunks/chunk-26VUH75M.mjs.map +7 -0
- package/dist/js/chunks/chunk-2LFCOGC3.mjs +233 -0
- package/dist/js/chunks/chunk-2LFCOGC3.mjs.map +7 -0
- package/dist/js/chunks/{chunk-DXGRXYYL.mjs → chunk-36GELQGX.mjs} +29 -46
- package/dist/js/chunks/chunk-36GELQGX.mjs.map +7 -0
- package/dist/js/chunks/{chunk-74MXKKLN.mjs → chunk-3FKWIRHW.mjs} +15 -29
- package/dist/js/chunks/chunk-3FKWIRHW.mjs.map +7 -0
- package/dist/js/chunks/chunk-3KF65KGL.mjs +209 -0
- package/dist/js/chunks/chunk-3KF65KGL.mjs.map +7 -0
- package/dist/js/chunks/{chunk-KVJAVDBC.mjs → chunk-3KLZRQZI.mjs} +88 -116
- package/dist/js/chunks/chunk-3KLZRQZI.mjs.map +7 -0
- package/dist/js/chunks/{chunk-CK2XCICY.mjs → chunk-3XORNED5.mjs} +3 -11
- package/dist/js/chunks/chunk-3XORNED5.mjs.map +7 -0
- package/dist/js/chunks/chunk-4WBGAQN3.mjs +113 -0
- package/dist/js/chunks/chunk-4WBGAQN3.mjs.map +7 -0
- package/dist/js/chunks/{chunk-FM5CZOUB.mjs → chunk-5F4URJHL.mjs} +19 -30
- package/dist/js/chunks/chunk-5F4URJHL.mjs.map +7 -0
- package/dist/js/chunks/chunk-67UNY7RH.mjs +299 -0
- package/dist/js/chunks/chunk-67UNY7RH.mjs.map +7 -0
- package/dist/js/chunks/chunk-7CXNATJS.mjs +97 -0
- package/dist/js/chunks/chunk-7CXNATJS.mjs.map +7 -0
- package/dist/js/chunks/{chunk-UETTGDLI.mjs → chunk-7X44MKEQ.mjs} +43 -48
- package/dist/js/chunks/chunk-7X44MKEQ.mjs.map +7 -0
- package/dist/js/chunks/chunk-7ZAMOMGY.mjs +440 -0
- package/dist/js/chunks/chunk-7ZAMOMGY.mjs.map +7 -0
- package/dist/js/chunks/chunk-AEG6LOAJ.mjs +54 -0
- package/dist/js/chunks/chunk-AEG6LOAJ.mjs.map +7 -0
- package/dist/js/chunks/chunk-AQNFCJJ5.mjs +135 -0
- package/dist/js/chunks/chunk-AQNFCJJ5.mjs.map +7 -0
- package/dist/js/chunks/chunk-B55LWKBM.mjs +75 -0
- package/dist/js/chunks/chunk-B55LWKBM.mjs.map +7 -0
- package/dist/js/chunks/chunk-BB5VXYXT.mjs +28 -0
- package/dist/js/chunks/chunk-BB5VXYXT.mjs.map +7 -0
- package/dist/js/chunks/chunk-BDATLH3H.mjs +108 -0
- package/dist/js/chunks/chunk-BDATLH3H.mjs.map +7 -0
- package/dist/js/chunks/chunk-CWMQOT4O.mjs +232 -0
- package/dist/js/chunks/chunk-CWMQOT4O.mjs.map +7 -0
- package/dist/js/chunks/chunk-CY2CTOVM.mjs +81 -0
- package/dist/js/chunks/chunk-CY2CTOVM.mjs.map +7 -0
- package/dist/js/chunks/{chunk-NUHMOAOY.mjs → chunk-DWA5UYLJ.mjs} +363 -218
- package/dist/js/chunks/chunk-DWA5UYLJ.mjs.map +7 -0
- package/dist/js/chunks/chunk-EB2V4OKL.mjs +79 -0
- package/dist/js/chunks/chunk-EB2V4OKL.mjs.map +7 -0
- package/dist/js/chunks/chunk-EWO662ZC.mjs +188 -0
- package/dist/js/chunks/chunk-EWO662ZC.mjs.map +7 -0
- package/dist/js/chunks/{chunk-ZX6M7SWO.mjs → chunk-F7LAKFMX.mjs} +320 -141
- package/dist/js/chunks/chunk-F7LAKFMX.mjs.map +7 -0
- package/dist/js/chunks/{chunk-L27Q6ZMI.mjs → chunk-FNIIH2LU.mjs} +20 -33
- package/dist/js/chunks/chunk-FNIIH2LU.mjs.map +7 -0
- package/dist/js/chunks/chunk-GE3YMFS6.mjs +15 -0
- package/dist/js/chunks/chunk-GE3YMFS6.mjs.map +7 -0
- package/dist/js/chunks/chunk-GFWYMWYN.mjs +125 -0
- package/dist/js/chunks/chunk-GFWYMWYN.mjs.map +7 -0
- package/dist/js/chunks/chunk-GNRSYMVH.mjs +1 -0
- package/dist/js/chunks/chunk-H5ISU45X.mjs +87 -0
- package/dist/js/chunks/chunk-H5ISU45X.mjs.map +7 -0
- package/dist/js/chunks/{chunk-GJL6GCIU.mjs → chunk-H6YIKFAQ.mjs} +311 -186
- package/dist/js/chunks/chunk-H6YIKFAQ.mjs.map +7 -0
- package/dist/js/chunks/{chunk-BGZLF6JZ.mjs → chunk-HEH7E3KO.mjs} +155 -35
- package/dist/js/chunks/chunk-HEH7E3KO.mjs.map +7 -0
- package/dist/js/chunks/chunk-HQRLBTNM.mjs +152 -0
- package/dist/js/chunks/chunk-HQRLBTNM.mjs.map +7 -0
- package/dist/js/chunks/chunk-I2F7MLUU.mjs +137 -0
- package/dist/js/chunks/chunk-I2F7MLUU.mjs.map +7 -0
- package/dist/js/chunks/chunk-IQOTGGHX.mjs +797 -0
- package/dist/js/chunks/chunk-IQOTGGHX.mjs.map +7 -0
- package/dist/js/chunks/chunk-JH3YWKA6.mjs +225 -0
- package/dist/js/chunks/chunk-JH3YWKA6.mjs.map +7 -0
- package/dist/js/chunks/chunk-JOLJAYIJ.mjs +7 -0
- package/dist/js/chunks/chunk-JOLJAYIJ.mjs.map +7 -0
- package/dist/js/chunks/{chunk-VGNYF6FB.mjs → chunk-KOTGMCMI.mjs} +116 -24
- package/dist/js/chunks/chunk-KOTGMCMI.mjs.map +7 -0
- package/dist/js/chunks/{chunk-LQWUDNHZ.mjs → chunk-LC4O5LFS.mjs} +21 -45
- package/dist/js/chunks/chunk-LC4O5LFS.mjs.map +7 -0
- package/dist/js/chunks/chunk-LEF33SCP.mjs +127 -0
- package/dist/js/chunks/chunk-LEF33SCP.mjs.map +7 -0
- package/dist/js/chunks/{chunk-PDG64UHF.mjs → chunk-LFORZRPH.mjs} +21 -23
- package/dist/js/chunks/chunk-LFORZRPH.mjs.map +7 -0
- package/dist/js/chunks/chunk-LWLNV5EC.mjs +451 -0
- package/dist/js/chunks/chunk-LWLNV5EC.mjs.map +7 -0
- package/dist/js/chunks/chunk-LXRHUQAX.mjs +491 -0
- package/dist/js/chunks/chunk-LXRHUQAX.mjs.map +7 -0
- package/dist/js/chunks/{chunk-SFI2U4YW.mjs → chunk-MA2SZZFB.mjs} +82 -111
- package/dist/js/chunks/chunk-MA2SZZFB.mjs.map +7 -0
- package/dist/js/chunks/chunk-MDBZAMIV.mjs +121 -0
- package/dist/js/chunks/chunk-MDBZAMIV.mjs.map +7 -0
- package/dist/js/chunks/chunk-NODZ5VAD.mjs +75 -0
- package/dist/js/chunks/chunk-NODZ5VAD.mjs.map +7 -0
- package/dist/js/chunks/chunk-O2WJB6TH.mjs +365 -0
- package/dist/js/chunks/chunk-O2WJB6TH.mjs.map +7 -0
- package/dist/js/chunks/chunk-PCABY5BN.mjs +35 -0
- package/dist/js/chunks/chunk-PCABY5BN.mjs.map +7 -0
- package/dist/js/chunks/chunk-PWKYVMND.mjs +120 -0
- package/dist/js/chunks/chunk-PWKYVMND.mjs.map +7 -0
- package/dist/js/chunks/{chunk-SMY7GJSS.mjs → chunk-QHZZT7YO.mjs} +66 -38
- package/dist/js/chunks/chunk-QHZZT7YO.mjs.map +7 -0
- package/dist/js/chunks/chunk-QND56EW2.mjs +439 -0
- package/dist/js/chunks/chunk-QND56EW2.mjs.map +7 -0
- package/dist/js/chunks/chunk-QNODAANY.mjs +376 -0
- package/dist/js/chunks/chunk-QNODAANY.mjs.map +7 -0
- package/dist/js/chunks/{chunk-KHXZ2A4K.mjs → chunk-QRO5FV3I.mjs} +156 -73
- package/dist/js/chunks/chunk-QRO5FV3I.mjs.map +7 -0
- package/dist/js/chunks/chunk-R7A7JRC5.mjs +440 -0
- package/dist/js/chunks/chunk-R7A7JRC5.mjs.map +7 -0
- package/dist/js/chunks/chunk-RKG2CBFE.mjs +74 -0
- package/dist/js/chunks/chunk-RKG2CBFE.mjs.map +7 -0
- package/dist/js/chunks/{chunk-XAEAEHIX.mjs → chunk-RSNS5OYS.mjs} +38 -25
- package/dist/js/chunks/chunk-RSNS5OYS.mjs.map +7 -0
- package/dist/js/chunks/{chunk-X4ISMKE2.mjs → chunk-RUDYMEJ3.mjs} +7 -6
- package/dist/js/chunks/chunk-RUDYMEJ3.mjs.map +7 -0
- package/dist/js/chunks/chunk-STJR62SU.mjs +161 -0
- package/dist/js/chunks/chunk-STJR62SU.mjs.map +7 -0
- package/dist/js/chunks/chunk-SUSD4UTN.mjs +220 -0
- package/dist/js/chunks/chunk-SUSD4UTN.mjs.map +7 -0
- package/dist/js/chunks/{chunk-5CEAOLUA.mjs → chunk-SYBOA5HC.mjs} +26 -48
- package/dist/js/chunks/chunk-SYBOA5HC.mjs.map +7 -0
- package/dist/js/chunks/chunk-T4MOBP3J.mjs +108 -0
- package/dist/js/chunks/chunk-T4MOBP3J.mjs.map +7 -0
- package/dist/js/chunks/chunk-TM7HPGTV.mjs +342 -0
- package/dist/js/chunks/chunk-TM7HPGTV.mjs.map +7 -0
- package/dist/js/chunks/{chunk-C6CHEWYP.mjs → chunk-TMQDZSDC.mjs} +71 -35
- package/dist/js/chunks/chunk-TMQDZSDC.mjs.map +7 -0
- package/dist/js/chunks/chunk-TVSX5YA2.mjs +48 -0
- package/dist/js/chunks/chunk-TVSX5YA2.mjs.map +7 -0
- package/dist/js/chunks/chunk-UHO5CV6K.mjs +80 -0
- package/dist/js/chunks/chunk-UHO5CV6K.mjs.map +7 -0
- package/dist/js/chunks/chunk-UKCNELUN.mjs +223 -0
- package/dist/js/chunks/chunk-UKCNELUN.mjs.map +7 -0
- package/dist/js/chunks/chunk-UKQK5GWR.mjs +167 -0
- package/dist/js/chunks/chunk-UKQK5GWR.mjs.map +7 -0
- package/dist/js/chunks/{chunk-TSZYSW7F.mjs → chunk-UTSLYQ65.mjs} +21 -48
- package/dist/js/chunks/chunk-UTSLYQ65.mjs.map +7 -0
- package/dist/js/chunks/chunk-VS5OJBOD.mjs +108 -0
- package/dist/js/chunks/chunk-VS5OJBOD.mjs.map +7 -0
- package/dist/js/chunks/chunk-VZMROW5A.mjs +759 -0
- package/dist/js/chunks/chunk-VZMROW5A.mjs.map +7 -0
- package/dist/js/chunks/chunk-W6FAL3TI.mjs +38 -0
- package/dist/js/chunks/chunk-W6FAL3TI.mjs.map +7 -0
- package/dist/js/chunks/chunk-XB6Y7P5W.mjs +69 -0
- package/dist/js/chunks/chunk-XB6Y7P5W.mjs.map +7 -0
- package/dist/js/chunks/chunk-XDAMOMVD.mjs +226 -0
- package/dist/js/chunks/chunk-XDAMOMVD.mjs.map +7 -0
- package/dist/js/chunks/{chunk-WDK4T63U.mjs → chunk-XJPMW5SP.mjs} +247 -172
- package/dist/js/chunks/chunk-XJPMW5SP.mjs.map +7 -0
- package/dist/js/chunks/{chunk-KUFHW3DS.mjs → chunk-YKANQILZ.mjs} +16 -21
- package/dist/js/chunks/chunk-YKANQILZ.mjs.map +7 -0
- package/dist/js/chunks/chunk-YLZOJLDI.mjs +175 -0
- package/dist/js/chunks/chunk-YLZOJLDI.mjs.map +7 -0
- package/dist/js/chunks/chunk-ZK7YY322.mjs +514 -0
- package/dist/js/chunks/chunk-ZK7YY322.mjs.map +7 -0
- package/dist/js/expressive.cjs +10266 -3628
- package/dist/js/expressive.cjs.map +4 -4
- package/dist/js/expressive.js +10266 -3628
- package/dist/js/expressive.js.map +4 -4
- package/dist/js/expressive.min.js +23 -22
- package/dist/js/expressive.min.js.map +4 -4
- package/dist/js/expressive.mjs +181 -69
- package/dist/js/expressive.mjs.map +2 -2
- package/dist/js/internal/behaviors/bottomSheets.mjs +4 -3
- package/dist/js/internal/behaviors/copy.mjs +9 -0
- package/dist/js/internal/behaviors/copy.mjs.map +7 -0
- package/dist/js/internal/behaviors/dataTables.mjs +8 -0
- package/dist/js/internal/behaviors/dataTables.mjs.map +7 -0
- package/dist/js/internal/behaviors/dialogs.mjs +2 -2
- package/dist/js/internal/behaviors/forms.mjs +2 -2
- package/dist/js/internal/behaviors/imageCompare.mjs +8 -0
- package/dist/js/internal/behaviors/imageCompare.mjs.map +7 -0
- package/dist/js/internal/behaviors/lists.mjs +8 -0
- package/dist/js/internal/behaviors/lists.mjs.map +7 -0
- package/dist/js/internal/behaviors/paneResize.mjs +8 -0
- package/dist/js/internal/behaviors/paneResize.mjs.map +7 -0
- package/dist/js/internal/behaviors/sheetDrag.mjs +7 -2
- package/dist/js/internal/behaviors/sideSheets.mjs +4 -3
- package/dist/js/internal/behaviors/sortable.mjs +8 -0
- package/dist/js/internal/behaviors/sortable.mjs.map +7 -0
- package/dist/js/internal/behaviors/theme.mjs +8 -0
- package/dist/js/internal/behaviors/theme.mjs.map +7 -0
- package/dist/js/internal/behaviors/tour.mjs +8 -0
- package/dist/js/internal/behaviors/tour.mjs.map +7 -0
- package/dist/js/internal/behaviors/transferList.mjs +8 -0
- package/dist/js/internal/behaviors/transferList.mjs.map +7 -0
- package/dist/js/internal/components/appBar.mjs +3 -2
- package/dist/js/internal/components/autocomplete.mjs +5 -4
- package/dist/js/internal/components/backToTop.mjs +9 -0
- package/dist/js/internal/components/backToTop.mjs.map +7 -0
- package/dist/js/internal/components/barChart.mjs +5 -4
- package/dist/js/internal/components/buttonGroup.mjs +3 -2
- package/dist/js/internal/components/buttons.mjs +3 -3
- package/dist/js/internal/components/cards.mjs +3 -3
- package/dist/js/internal/components/carousel.mjs +3 -3
- package/dist/js/internal/components/cascader.mjs +10 -0
- package/dist/js/internal/components/cascader.mjs.map +7 -0
- package/dist/js/internal/components/characterCounter.mjs +3 -2
- package/dist/js/internal/components/chips.mjs +7 -5
- package/dist/js/internal/components/colorPicker.mjs +9 -0
- package/dist/js/internal/components/colorPicker.mjs.map +7 -0
- package/dist/js/internal/components/columnChart.mjs +4 -3
- package/dist/js/internal/components/commandPalette.mjs +3 -3
- package/dist/js/internal/components/confetti.mjs +3 -2
- package/dist/js/internal/components/currencyInput.mjs +9 -0
- package/dist/js/internal/components/currencyInput.mjs.map +7 -0
- package/dist/js/internal/components/datepicker.mjs +12 -8
- package/dist/js/internal/components/expandingCard.mjs +3 -3
- package/dist/js/internal/components/funnelChart.mjs +10 -0
- package/dist/js/internal/components/funnelChart.mjs.map +7 -0
- package/dist/js/internal/components/heatmapChart.mjs +4 -3
- package/dist/js/internal/components/hoverCard.mjs +9 -0
- package/dist/js/internal/components/hoverCard.mjs.map +7 -0
- package/dist/js/internal/components/index.mjs +131 -65
- package/dist/js/internal/components/inputMask.mjs +9 -0
- package/dist/js/internal/components/inputMask.mjs.map +7 -0
- package/dist/js/internal/components/keypad.mjs +3 -3
- package/dist/js/internal/components/lightbox.mjs +3 -3
- package/dist/js/internal/components/lineChart.mjs +41 -4
- package/dist/js/internal/components/loadingOverlay.mjs +9 -0
- package/dist/js/internal/components/loadingOverlay.mjs.map +7 -0
- package/dist/js/internal/components/mapView.mjs +3 -3
- package/dist/js/internal/components/menu.mjs +3 -3
- package/dist/js/internal/components/menubar.mjs +10 -0
- package/dist/js/internal/components/menubar.mjs.map +7 -0
- package/dist/js/internal/components/messageScroller.mjs +3 -3
- package/dist/js/internal/components/mixedChart.mjs +5 -4
- package/dist/js/internal/components/navigationRail.mjs +3 -2
- package/dist/js/internal/components/particles.mjs +3 -2
- package/dist/js/internal/components/pieChart.mjs +4 -3
- package/dist/js/internal/components/pullToRefresh.mjs +9 -0
- package/dist/js/internal/components/pullToRefresh.mjs.map +7 -0
- package/dist/js/internal/components/questionnaire.mjs +3 -3
- package/dist/js/internal/components/radarChart.mjs +4 -3
- package/dist/js/internal/components/radialChart.mjs +4 -3
- package/dist/js/internal/components/registry.mjs +60 -41
- package/dist/js/internal/components/richTextEditor.mjs +3 -3
- package/dist/js/internal/components/sankeyChart.mjs +10 -0
- package/dist/js/internal/components/sankeyChart.mjs.map +7 -0
- package/dist/js/internal/components/scatterChart.mjs +10 -0
- package/dist/js/internal/components/scatterChart.mjs.map +7 -0
- package/dist/js/internal/components/scrollspy.mjs +3 -2
- package/dist/js/internal/components/select.mjs +5 -4
- package/dist/js/internal/components/showMore.mjs +9 -0
- package/dist/js/internal/components/showMore.mjs.map +7 -0
- package/dist/js/internal/components/slider.mjs +3 -3
- package/dist/js/internal/components/snackbar.mjs +2 -2
- package/dist/js/internal/components/swipeActions.mjs +9 -0
- package/dist/js/internal/components/swipeActions.mjs.map +7 -0
- package/dist/js/internal/components/tabs.mjs +3 -4
- package/dist/js/internal/components/timepicker.mjs +5 -4
- package/dist/js/internal/components/tooltip.mjs +3 -3
- package/dist/js/internal/components/treeSelect.mjs +14 -0
- package/dist/js/internal/components/treeSelect.mjs.map +7 -0
- package/dist/js/internal/components/treemapChart.mjs +10 -0
- package/dist/js/internal/components/treemapChart.mjs.map +7 -0
- package/dist/js/internal/core/component.mjs +6 -3
- package/dist/js/internal/core/formControl.mjs +12 -0
- package/dist/js/internal/core/formControl.mjs.map +7 -0
- package/dist/js/internal/core/imageURL.mjs +7 -0
- package/dist/js/internal/core/imageURL.mjs.map +7 -0
- package/dist/js/internal/core/spring.mjs +11 -0
- package/dist/js/internal/core/spring.mjs.map +7 -0
- package/dist/js/internal/core/utils.mjs +21 -3
- package/dist/js/internal/plugins/dockedDisplayPlugin.mjs +2 -2
- package/dist/js/internal/plugins/modalDisplayPlugin.mjs +13 -0
- package/dist/js/internal/plugins/modalDisplayPlugin.mjs.map +7 -0
- package/dist/js/modular.mjs +172 -69
- package/dist/types/behaviors/bottomSheets.d.ts +23 -5
- package/dist/types/behaviors/copy.d.ts +18 -0
- package/dist/types/behaviors/dataTables.d.ts +125 -0
- package/dist/types/behaviors/dialogs.d.ts +27 -1
- package/dist/types/behaviors/forms.d.ts +70 -4
- package/dist/types/behaviors/imageCompare.d.ts +13 -0
- package/dist/types/behaviors/lists.d.ts +12 -0
- package/dist/types/behaviors/paneResize.d.ts +29 -0
- package/dist/types/behaviors/sheetDrag.d.ts +18 -0
- package/dist/types/behaviors/sideSheets.d.ts +1 -1
- package/dist/types/behaviors/sortable.d.ts +28 -0
- package/dist/types/behaviors/theme.d.ts +22 -0
- package/dist/types/behaviors/tour.d.ts +36 -0
- package/dist/types/behaviors/transferList.d.ts +53 -0
- package/dist/types/components/appBar.d.ts +5 -6
- package/dist/types/components/autocomplete.d.ts +105 -20
- package/dist/types/components/backToTop.d.ts +36 -0
- package/dist/types/components/barChart.d.ts +3 -6
- package/dist/types/components/buttonGroup.d.ts +2 -4
- package/dist/types/components/buttons.d.ts +5 -5
- package/dist/types/components/cards.d.ts +3 -16
- package/dist/types/components/carousel.d.ts +16 -15
- package/dist/types/components/cascader.d.ts +130 -0
- package/dist/types/components/characterCounter.d.ts +2 -15
- package/dist/types/components/chips.d.ts +80 -19
- package/dist/types/components/colorPicker.d.ts +56 -0
- package/dist/types/components/columnChart.d.ts +23 -10
- package/dist/types/components/commandPalette.d.ts +11 -16
- package/dist/types/components/confetti.d.ts +2 -4
- package/dist/types/components/currencyInput.d.ts +60 -0
- package/dist/types/components/datepicker.d.ts +107 -56
- package/dist/types/components/expandingCard.d.ts +4 -6
- package/dist/types/components/funnelChart.d.ts +35 -0
- package/dist/types/components/heatmapChart.d.ts +42 -8
- package/dist/types/components/hoverCard.d.ts +59 -0
- package/dist/types/components/index.d.ts +16 -1
- package/dist/types/components/inputMask.d.ts +28 -0
- package/dist/types/components/keypad.d.ts +38 -6
- package/dist/types/components/lightbox.d.ts +14 -20
- package/dist/types/components/lineChart.d.ts +212 -12
- package/dist/types/components/loadingOverlay.d.ts +42 -0
- package/dist/types/components/mapView.d.ts +138 -27
- package/dist/types/components/menu.d.ts +74 -22
- package/dist/types/components/menubar.d.ts +37 -0
- package/dist/types/components/messageScroller.d.ts +2 -14
- package/dist/types/components/mixedChart.d.ts +15 -6
- package/dist/types/components/navigationRail.d.ts +16 -5
- package/dist/types/components/particles.d.ts +22 -5
- package/dist/types/components/pieChart.d.ts +33 -9
- package/dist/types/components/pullToRefresh.d.ts +80 -0
- package/dist/types/components/questionnaire.d.ts +58 -16
- package/dist/types/components/radarChart.d.ts +10 -6
- package/dist/types/components/radialChart.d.ts +58 -7
- package/dist/types/components/registry.d.ts +73 -3
- package/dist/types/components/richTextEditor.d.ts +45 -22
- package/dist/types/components/sankeyChart.d.ts +72 -0
- package/dist/types/components/scatterChart.d.ts +102 -0
- package/dist/types/components/scrollspy.d.ts +3 -5
- package/dist/types/components/select.d.ts +44 -33
- package/dist/types/components/showMore.d.ts +53 -0
- package/dist/types/components/slider.d.ts +2 -15
- package/dist/types/components/snackbar.d.ts +68 -1
- package/dist/types/components/swipeActions.d.ts +81 -0
- package/dist/types/components/tabs.d.ts +92 -30
- package/dist/types/components/timepicker.d.ts +128 -27
- package/dist/types/components/tooltip.d.ts +57 -21
- package/dist/types/components/treeSelect.d.ts +106 -0
- package/dist/types/components/treemapChart.d.ts +56 -0
- package/dist/types/core/component.d.ts +49 -25
- package/dist/types/core/formControl.d.ts +21 -0
- package/dist/types/core/imageURL.d.ts +2 -0
- package/dist/types/core/spring.d.ts +20 -0
- package/dist/types/core/utils.d.ts +123 -72
- package/dist/types/modular.d.ts +33 -1
- package/dist/types/plugins/dockedDisplayPlugin.d.ts +10 -8
- package/dist/types/plugins/modalDisplayPlugin.d.ts +39 -0
- package/package.json +17 -13
- package/src/sass/README.md +27 -18
- package/src/sass/abstracts/_elevation.scss +13 -7
- package/src/sass/abstracts/_index.scss +1 -0
- package/src/sass/abstracts/_mixins.scss +864 -78
- package/src/sass/abstracts/_spring.scss +63 -0
- package/src/sass/abstracts/_variables.scss +64 -21
- package/src/sass/base/_fonts.scss +61 -48
- package/src/sass/base/_global.scss +104 -24
- package/src/sass/base/_index.scss +2 -0
- package/src/sass/base/_normalize.scss +59 -114
- package/src/sass/base/_print.scss +21 -0
- package/src/sass/base/_prose.scss +68 -0
- package/src/sass/base/_typography.scss +9 -5
- package/src/sass/components/_accordion.scss +10 -19
- package/src/sass/components/_alert.scss +102 -0
- package/src/sass/components/_aura.scss +9 -3
- package/src/sass/components/_avatar.scss +3 -3
- package/src/sass/components/_back-to-top.scss +38 -0
- package/src/sass/components/_badges.scss +6 -5
- package/src/sass/components/_bar-chart.scss +31 -90
- package/src/sass/components/_bottom-sheet.scss +51 -16
- package/src/sass/components/_breadcrumb.scss +8 -7
- package/src/sass/components/_button-groups.scss +30 -63
- package/src/sass/components/_buttons.scss +137 -94
- package/src/sass/components/_calendar.scss +244 -0
- package/src/sass/components/_cards.scss +36 -44
- package/src/sass/components/_carousel.scss +37 -113
- package/src/sass/components/_cascader.scss +131 -0
- package/src/sass/components/_chips.scss +36 -46
- package/src/sass/components/_column-chart.scss +15 -26
- package/src/sass/components/_command-palette.scss +4 -7
- package/src/sass/components/_confetti.scss +1 -4
- package/src/sass/components/_countdown.scss +1 -1
- package/src/sass/components/_data-table.scss +172 -25
- package/src/sass/components/_datepicker.scss +54 -40
- package/src/sass/components/_description-list.scss +85 -0
- package/src/sass/components/_dialog.scss +48 -55
- package/src/sass/components/_docked-display.scss +1 -3
- package/src/sass/components/_drag-handle.scss +16 -20
- package/src/sass/components/_expanding-card.scss +21 -14
- package/src/sass/components/_fab-menu.scss +43 -39
- package/src/sass/components/_funnel-chart.scss +63 -0
- package/src/sass/components/_heatmap-chart.scss +114 -29
- package/src/sass/components/_icon-buttons.scss +8 -11
- package/src/sass/components/_icons-material-design.scss +2 -2
- package/src/sass/components/_image-compare.scss +108 -0
- package/src/sass/components/_index.scss +20 -0
- package/src/sass/components/_keypad.scss +39 -19
- package/src/sass/components/_kpi.scss +6 -11
- package/src/sass/components/_lightbox.scss +24 -13
- package/src/sass/components/_line-chart.scss +9 -63
- package/src/sass/components/_list.scss +59 -14
- package/src/sass/components/_loading-indicator.scss +1 -0
- package/src/sass/components/_loading-overlay.scss +105 -0
- package/src/sass/components/_map.scss +37 -11
- package/src/sass/components/_marquee.scss +4 -3
- package/src/sass/components/_mega-menu.scss +128 -0
- package/src/sass/components/_menu.scss +146 -127
- package/src/sass/components/_menubar.scss +47 -0
- package/src/sass/components/_message-scroller.scss +2 -2
- package/src/sass/components/_message.scss +3 -3
- package/src/sass/components/_mixed-chart.scss +27 -35
- package/src/sass/components/_modal-display.scss +21 -0
- package/src/sass/components/_navbar.scss +45 -36
- package/src/sass/components/_navigation-bar.scss +12 -77
- package/src/sass/components/_navigation-rail.scss +161 -92
- package/src/sass/components/_org-chart.scss +192 -0
- package/src/sass/components/_page-footer.scss +2 -4
- package/src/sass/components/_pagination.scss +9 -27
- package/src/sass/components/_panes.scss +35 -42
- package/src/sass/components/_particles.scss +1 -4
- package/src/sass/components/_pie-chart.scss +86 -68
- package/src/sass/components/_popover.scss +18 -5
- package/src/sass/components/_progress.scss +183 -44
- package/src/sass/components/_pull-to-refresh.scss +90 -0
- package/src/sass/components/_questionnaire.scss +74 -3
- package/src/sass/components/_radar-chart.scss +40 -42
- package/src/sass/components/_radial-chart.scss +108 -46
- package/src/sass/components/_rich-text-editor.scss +2 -2
- package/src/sass/components/_sankey-chart.scss +91 -0
- package/src/sass/components/_scatter-chart.scss +144 -0
- package/src/sass/components/_scrim.scss +0 -2
- package/src/sass/components/_scrollspy.scss +0 -2
- package/src/sass/components/_search.scss +27 -26
- package/src/sass/components/_show-more.scss +8 -0
- package/src/sass/components/_side-sheet.scss +32 -51
- package/src/sass/components/_skeleton.scss +26 -19
- package/src/sass/components/_snackbar.scss +25 -21
- package/src/sass/components/_split-button.scss +5 -5
- package/src/sass/components/_stat.scss +3 -8
- package/src/sass/components/_stepper.scss +1 -1
- package/src/sass/components/_swipe-actions.scss +71 -0
- package/src/sass/components/_table_of_contents.scss +1 -3
- package/src/sass/components/_tabs.scss +49 -46
- package/src/sass/components/_timeline.scss +12 -12
- package/src/sass/components/_timepicker.scss +111 -79
- package/src/sass/components/_toolbar.scss +36 -47
- package/src/sass/components/_tooltip.scss +25 -12
- package/src/sass/components/_tour.scss +89 -0
- package/src/sass/components/_transfer-list.scss +73 -0
- package/src/sass/components/_transitions.scss +4 -4
- package/src/sass/components/_tree.scss +7 -32
- package/src/sass/components/_treemap-chart.scss +98 -0
- package/src/sass/components/forms/_checkboxes.scss +107 -44
- package/src/sass/components/forms/_color-picker.scss +135 -0
- package/src/sass/components/forms/_color-swatches.scss +85 -0
- package/src/sass/components/forms/_drop-zone.scss +16 -13
- package/src/sass/components/forms/_fieldset.scss +4 -7
- package/src/sass/components/forms/_file-input.scss +12 -8
- package/src/sass/components/forms/_index.scss +3 -1
- package/src/sass/components/forms/_input-fields.scss +271 -90
- package/src/sass/components/forms/_radio-buttons.scss +34 -117
- package/src/sass/components/forms/_rating.scss +2 -32
- package/src/sass/components/forms/_select.scss +198 -20
- package/src/sass/components/forms/_slider.scss +92 -98
- package/src/sass/components/forms/_switches.scss +62 -180
- package/src/sass/custom.scss +10 -1
- package/src/sass/expressive.scss +3 -63
- package/src/sass/tokens/_contrast.scss +94 -0
- package/src/sass/tokens/_elevation.scss +16 -0
- package/src/sass/tokens/_index.scss +5 -0
- package/src/sass/tokens/_motion.scss +109 -0
- package/src/sass/tokens/_reference.scss +72 -141
- package/src/sass/tokens/_shape.scss +38 -0
- package/src/sass/tokens/_stacking.scss +27 -0
- package/src/sass/tokens/_state.scss +0 -2
- package/src/sass/tokens/_theme.scss +10 -1
- package/src/sass/tokens/_vibrant.scss +2 -5
- package/src/sass/utilities/_defer-render.scss +17 -0
- package/src/sass/utilities/_helpers.scss +184 -27
- package/src/sass/utilities/_index.scss +1 -0
- package/src/sass/utilities/_scroll-area.scss +0 -2
- package/src/sass/utilities/_spacing.scss +52 -34
- package/src/sass/utilities/_typescale.scss +8 -1
- package/src/sass/utilities/_visibility.scss +46 -77
- package/src/sass/utilities/_z-depth.scss +7 -4
- package/dist/js/chunks/chunk-33QVDDGR.mjs +0 -270
- package/dist/js/chunks/chunk-33QVDDGR.mjs.map +0 -7
- package/dist/js/chunks/chunk-45FER6RI.mjs +0 -59
- package/dist/js/chunks/chunk-45FER6RI.mjs.map +0 -7
- package/dist/js/chunks/chunk-5CEAOLUA.mjs.map +0 -7
- package/dist/js/chunks/chunk-6VATUZC6.mjs +0 -295
- package/dist/js/chunks/chunk-6VATUZC6.mjs.map +0 -7
- package/dist/js/chunks/chunk-74MXKKLN.mjs.map +0 -7
- package/dist/js/chunks/chunk-AIURVCG6.mjs +0 -55
- package/dist/js/chunks/chunk-AIURVCG6.mjs.map +0 -7
- package/dist/js/chunks/chunk-BGZLF6JZ.mjs.map +0 -7
- package/dist/js/chunks/chunk-C6CHEWYP.mjs.map +0 -7
- package/dist/js/chunks/chunk-CK2XCICY.mjs.map +0 -7
- package/dist/js/chunks/chunk-CXXM2L4F.mjs +0 -344
- package/dist/js/chunks/chunk-CXXM2L4F.mjs.map +0 -7
- package/dist/js/chunks/chunk-DXGRXYYL.mjs.map +0 -7
- package/dist/js/chunks/chunk-FM5CZOUB.mjs.map +0 -7
- package/dist/js/chunks/chunk-GJL6GCIU.mjs.map +0 -7
- package/dist/js/chunks/chunk-K3HZMFMD.mjs +0 -135
- package/dist/js/chunks/chunk-K3HZMFMD.mjs.map +0 -7
- package/dist/js/chunks/chunk-KHXZ2A4K.mjs.map +0 -7
- package/dist/js/chunks/chunk-KQACNQ22.mjs +0 -7
- package/dist/js/chunks/chunk-KQACNQ22.mjs.map +0 -7
- package/dist/js/chunks/chunk-KUFHW3DS.mjs.map +0 -7
- package/dist/js/chunks/chunk-KVJAVDBC.mjs.map +0 -7
- package/dist/js/chunks/chunk-L27Q6ZMI.mjs.map +0 -7
- package/dist/js/chunks/chunk-LQWUDNHZ.mjs.map +0 -7
- package/dist/js/chunks/chunk-M372EDXD.mjs +0 -322
- package/dist/js/chunks/chunk-M372EDXD.mjs.map +0 -7
- package/dist/js/chunks/chunk-M3MURWMB.mjs +0 -82
- package/dist/js/chunks/chunk-M3MURWMB.mjs.map +0 -7
- package/dist/js/chunks/chunk-NUHMOAOY.mjs.map +0 -7
- package/dist/js/chunks/chunk-OWG3LMUL.mjs +0 -169
- package/dist/js/chunks/chunk-OWG3LMUL.mjs.map +0 -7
- package/dist/js/chunks/chunk-PD6HYHAE.mjs +0 -48
- package/dist/js/chunks/chunk-PD6HYHAE.mjs.map +0 -7
- package/dist/js/chunks/chunk-PDG64UHF.mjs.map +0 -7
- package/dist/js/chunks/chunk-PO3AXVR3.mjs +0 -546
- package/dist/js/chunks/chunk-PO3AXVR3.mjs.map +0 -7
- package/dist/js/chunks/chunk-QYGK36OG.mjs +0 -181
- package/dist/js/chunks/chunk-QYGK36OG.mjs.map +0 -7
- package/dist/js/chunks/chunk-SFI2U4YW.mjs.map +0 -7
- package/dist/js/chunks/chunk-SMY7GJSS.mjs.map +0 -7
- package/dist/js/chunks/chunk-TCCA2HDG.mjs +0 -414
- package/dist/js/chunks/chunk-TCCA2HDG.mjs.map +0 -7
- package/dist/js/chunks/chunk-TSZYSW7F.mjs.map +0 -7
- package/dist/js/chunks/chunk-UAZSDUVP.mjs +0 -90
- package/dist/js/chunks/chunk-UAZSDUVP.mjs.map +0 -7
- package/dist/js/chunks/chunk-UBRZZWRA.mjs +0 -127
- package/dist/js/chunks/chunk-UBRZZWRA.mjs.map +0 -7
- package/dist/js/chunks/chunk-UCOE7ZDL.mjs +0 -287
- package/dist/js/chunks/chunk-UCOE7ZDL.mjs.map +0 -7
- package/dist/js/chunks/chunk-UETTGDLI.mjs.map +0 -7
- package/dist/js/chunks/chunk-UNCRDLP6.mjs +0 -136
- package/dist/js/chunks/chunk-UNCRDLP6.mjs.map +0 -7
- package/dist/js/chunks/chunk-VGNYF6FB.mjs.map +0 -7
- package/dist/js/chunks/chunk-VGPGBNGL.mjs +0 -68
- package/dist/js/chunks/chunk-VGPGBNGL.mjs.map +0 -7
- package/dist/js/chunks/chunk-VKAUVTQY.mjs +0 -1
- package/dist/js/chunks/chunk-VM4FTS7L.mjs +0 -48
- package/dist/js/chunks/chunk-VM4FTS7L.mjs.map +0 -7
- package/dist/js/chunks/chunk-WDK4T63U.mjs.map +0 -7
- package/dist/js/chunks/chunk-WOCCTVUF.mjs +0 -185
- package/dist/js/chunks/chunk-WOCCTVUF.mjs.map +0 -7
- package/dist/js/chunks/chunk-WQYN5L4E.mjs +0 -107
- package/dist/js/chunks/chunk-WQYN5L4E.mjs.map +0 -7
- package/dist/js/chunks/chunk-X4ISMKE2.mjs.map +0 -7
- package/dist/js/chunks/chunk-XAEAEHIX.mjs.map +0 -7
- package/dist/js/chunks/chunk-ZX6M7SWO.mjs.map +0 -7
- /package/dist/js/chunks/{chunk-VKAUVTQY.mjs.map → chunk-GNRSYMVH.mjs.map} +0 -0
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Component
|
|
3
|
-
} from "./chunk-PD6HYHAE.mjs";
|
|
4
|
-
|
|
5
|
-
// src/ts/components/navigationRail.ts
|
|
6
|
-
var _defaults = {
|
|
7
|
-
onOpenStart: null,
|
|
8
|
-
onOpenEnd: null,
|
|
9
|
-
onCloseStart: null,
|
|
10
|
-
onCloseEnd: null
|
|
11
|
-
};
|
|
12
|
-
var COMPACT = "(width < 600px)";
|
|
13
|
-
function deepActiveElement(root) {
|
|
14
|
-
let active = root.activeElement;
|
|
15
|
-
while (active?.shadowRoot?.activeElement) active = active.shadowRoot.activeElement;
|
|
16
|
-
return active;
|
|
17
|
-
}
|
|
18
|
-
var NavigationRail = class _NavigationRail extends Component {
|
|
19
|
-
constructor(el, options) {
|
|
20
|
-
super(el, options, _NavigationRail);
|
|
21
|
-
/**
|
|
22
|
-
* Expands the rail. On compact windows the overlay (scrim) is CSS.
|
|
23
|
-
*/
|
|
24
|
-
this.expand = () => {
|
|
25
|
-
if (this.isExpanded) return;
|
|
26
|
-
if (typeof this.options.onOpenStart === "function") {
|
|
27
|
-
this.options.onOpenStart.call(this, this.el);
|
|
28
|
-
}
|
|
29
|
-
this.isExpanded = true;
|
|
30
|
-
this.el.classList.add("expanded");
|
|
31
|
-
this._sync();
|
|
32
|
-
if (typeof this.options.onOpenEnd === "function") {
|
|
33
|
-
this.options.onOpenEnd.call(this, this.el);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Collapses the rail.
|
|
38
|
-
*/
|
|
39
|
-
this.collapse = () => {
|
|
40
|
-
if (!this.isExpanded) return;
|
|
41
|
-
if (typeof this.options.onCloseStart === "function") {
|
|
42
|
-
this.options.onCloseStart.call(this, this.el);
|
|
43
|
-
}
|
|
44
|
-
this.isExpanded = false;
|
|
45
|
-
this.el.classList.remove("expanded");
|
|
46
|
-
this._sync();
|
|
47
|
-
if (typeof this.options.onCloseEnd === "function") {
|
|
48
|
-
this.options.onCloseEnd.call(this, this.el);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* Toggles expanded / collapsed.
|
|
53
|
-
*/
|
|
54
|
-
this.toggle = () => {
|
|
55
|
-
if (this.isExpanded) this.collapse();
|
|
56
|
-
else this.expand();
|
|
57
|
-
};
|
|
58
|
-
this._onClick = (e) => {
|
|
59
|
-
const target = e.target;
|
|
60
|
-
if (!(target instanceof Node)) return;
|
|
61
|
-
if (this._toggle?.contains(target)) {
|
|
62
|
-
this.toggle();
|
|
63
|
-
e.preventDefault();
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
if (target === this.el && this.isExpanded && this._isModal()) {
|
|
67
|
-
this.collapse();
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
this._onKeyDown = (e) => {
|
|
71
|
-
if (e.key !== "Escape" || e.defaultPrevented) return;
|
|
72
|
-
if (this.isExpanded && this._isModal()) {
|
|
73
|
-
const root = this.el.getRootNode();
|
|
74
|
-
const restoreFocus = this.el.contains(root.activeElement);
|
|
75
|
-
const focused = deepActiveElement(root);
|
|
76
|
-
this.collapse();
|
|
77
|
-
if (!this.isExpanded && restoreFocus && deepActiveElement(root) === focused) {
|
|
78
|
-
this._toggle?.focus();
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
this.el["Expressive_NavigationRail"] = this;
|
|
83
|
-
this.options = {
|
|
84
|
-
..._NavigationRail.defaults,
|
|
85
|
-
...options
|
|
86
|
-
};
|
|
87
|
-
this._toggle = this._findToggle();
|
|
88
|
-
this._mql = window.matchMedia(COMPACT);
|
|
89
|
-
this.isExpanded = this.el.classList.contains("expanded");
|
|
90
|
-
this._sync();
|
|
91
|
-
this.el.addEventListener("click", this._onClick);
|
|
92
|
-
document.addEventListener("keydown", this._onKeyDown);
|
|
93
|
-
}
|
|
94
|
-
static get defaults() {
|
|
95
|
-
return _defaults;
|
|
96
|
-
}
|
|
97
|
-
static init(els, options = {}) {
|
|
98
|
-
return super.init(els, options, _NavigationRail);
|
|
99
|
-
}
|
|
100
|
-
static getInstance(el) {
|
|
101
|
-
return el["Expressive_NavigationRail"];
|
|
102
|
-
}
|
|
103
|
-
destroy() {
|
|
104
|
-
this.el.removeEventListener("click", this._onClick);
|
|
105
|
-
document.removeEventListener("keydown", this._onKeyDown);
|
|
106
|
-
this.el["Expressive_NavigationRail"] = void 0;
|
|
107
|
-
}
|
|
108
|
-
_findToggle() {
|
|
109
|
-
const first = this.el.querySelector(":scope > button:not(.button)");
|
|
110
|
-
return first instanceof HTMLButtonElement ? first : null;
|
|
111
|
-
}
|
|
112
|
-
_isCompact() {
|
|
113
|
-
return this._mql.matches;
|
|
114
|
-
}
|
|
115
|
-
_isModal() {
|
|
116
|
-
return this.el.classList.contains("modal") || this._isCompact();
|
|
117
|
-
}
|
|
118
|
-
_sync() {
|
|
119
|
-
this.el.setAttribute("aria-expanded", this.isExpanded ? "true" : "false");
|
|
120
|
-
this._toggle?.setAttribute("aria-expanded", this.isExpanded ? "true" : "false");
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
export {
|
|
125
|
-
NavigationRail
|
|
126
|
-
};
|
|
127
|
-
//# sourceMappingURL=chunk-UBRZZWRA.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/ts/components/navigationRail.ts"],
|
|
4
|
-
"sourcesContent": ["import { Component, BaseOptions, InitElements, InitElement } from '../core/component';\n\nexport interface NavigationRailOptions extends BaseOptions {\n /**\n * Called before the rail expands.\n */\n onOpenStart: (el: HTMLElement) => void;\n /**\n * Called after the rail expands.\n */\n onOpenEnd: (el: HTMLElement) => void;\n /**\n * Called before the rail collapses.\n */\n onCloseStart: (el: HTMLElement) => void;\n /**\n * Called after the rail collapses.\n */\n onCloseEnd: (el: HTMLElement) => void;\n}\n\nconst _defaults: NavigationRailOptions = {\n onOpenStart: null,\n onOpenEnd: null,\n onCloseStart: null,\n onCloseEnd: null\n};\n\nconst COMPACT = '(width < 600px)';\n\n/** The focused element, followed down through open shadow roots. */\nfunction deepActiveElement(root: Document | ShadowRoot): Element | null {\n let active = root.activeElement;\n while (active?.shadowRoot?.activeElement) active = active.shadowRoot.activeElement;\n return active;\n}\n\n/**\n * Navigation rail. Layout is CSS (collapsed / .expanded). This class\n * toggles that class from the menu button, closes a compact overlay on\n * Escape or a scrim tap, and keeps aria-expanded in sync.\n */\nexport class NavigationRail extends Component<NavigationRailOptions> {\n isExpanded: boolean;\n private _toggle: HTMLButtonElement | null;\n private _mql: MediaQueryList;\n\n constructor(el: HTMLElement, options: Partial<NavigationRailOptions>) {\n super(el, options, NavigationRail);\n this.el['Expressive_NavigationRail'] = this;\n\n this.options = {\n ...NavigationRail.defaults,\n ...options\n };\n\n this._toggle = this._findToggle();\n this._mql = window.matchMedia(COMPACT);\n this.isExpanded = this.el.classList.contains('expanded');\n this._sync();\n this.el.addEventListener('click', this._onClick);\n document.addEventListener('keydown', this._onKeyDown);\n }\n\n static get defaults(): NavigationRailOptions {\n return _defaults;\n }\n\n static init(el: HTMLElement, options?: Partial<NavigationRailOptions>): NavigationRail;\n static init(\n els: InitElements<InitElement>,\n options?: Partial<NavigationRailOptions>\n ): NavigationRail[];\n static init(\n els: HTMLElement | InitElements<InitElement>,\n options: Partial<NavigationRailOptions> = {}\n ): NavigationRail | NavigationRail[] {\n return super.init(els, options, NavigationRail);\n }\n\n static getInstance(el: HTMLElement): NavigationRail {\n return el['Expressive_NavigationRail'];\n }\n\n destroy() {\n this.el.removeEventListener('click', this._onClick);\n document.removeEventListener('keydown', this._onKeyDown);\n this.el['Expressive_NavigationRail'] = undefined;\n }\n\n /**\n * Expands the rail. On compact windows the overlay (scrim) is CSS.\n */\n expand = () => {\n if (this.isExpanded) return;\n if (typeof this.options.onOpenStart === 'function') {\n this.options.onOpenStart.call(this, this.el);\n }\n this.isExpanded = true;\n this.el.classList.add('expanded');\n this._sync();\n if (typeof this.options.onOpenEnd === 'function') {\n this.options.onOpenEnd.call(this, this.el);\n }\n };\n\n /**\n * Collapses the rail.\n */\n collapse = () => {\n if (!this.isExpanded) return;\n if (typeof this.options.onCloseStart === 'function') {\n this.options.onCloseStart.call(this, this.el);\n }\n this.isExpanded = false;\n this.el.classList.remove('expanded');\n this._sync();\n if (typeof this.options.onCloseEnd === 'function') {\n this.options.onCloseEnd.call(this, this.el);\n }\n };\n\n /**\n * Toggles expanded / collapsed.\n */\n toggle = () => {\n if (this.isExpanded) this.collapse();\n else this.expand();\n };\n\n private _findToggle(): HTMLButtonElement | null {\n const first = this.el.querySelector(':scope > button:not(.button)');\n return first instanceof HTMLButtonElement ? first : null;\n }\n\n private _isCompact() {\n return this._mql.matches;\n }\n\n private _isModal() {\n return this.el.classList.contains('modal') || this._isCompact();\n }\n\n private _sync() {\n this.el.setAttribute('aria-expanded', this.isExpanded ? 'true' : 'false');\n this._toggle?.setAttribute('aria-expanded', this.isExpanded ? 'true' : 'false');\n }\n\n private _onClick = (e: MouseEvent) => {\n const target = e.target;\n if (!(target instanceof Node)) return;\n if (this._toggle?.contains(target)) {\n this.toggle();\n e.preventDefault();\n return;\n }\n if (target === this.el && this.isExpanded && this._isModal()) {\n this.collapse();\n }\n };\n\n private _onKeyDown = (e: KeyboardEvent) => {\n if (e.key !== 'Escape' || e.defaultPrevented) return;\n if (this.isExpanded && this._isModal()) {\n const root = this.el.getRootNode() as Document | ShadowRoot;\n const restoreFocus = this.el.contains(root.activeElement);\n const focused = deepActiveElement(root);\n this.collapse();\n if (!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2B;AAAA,EACvC;AAAA,EAEA,UAAU;AACR,SAAK,GAAG,oBAAoB,SAAS,KAAK,QAAQ;AAClD,aAAS,oBAAoB,WAAW,KAAK,UAAU;AACvD,SAAK,GAAG,2BAA2B,IAAI;AAAA,EACzC;AAAA,EA0CQ,cAAwC;AAC9C,UAAM,QAAQ,KAAK,GAAG,cAAc,8BAA8B;AAClE,WAAO,iBAAiB,oBAAoB,QAAQ;AAAA,EACtD;AAAA,EAEQ,aAAa;AACnB,WAAO,KAAK,KAAK;AAAA,EACnB;AAAA,EAEQ,WAAW;AACjB,WAAO,KAAK,GAAG,UAAU,SAAS,OAAO,KAAK,KAAK,WAAW;AAAA,EAChE;AAAA,EAEQ,QAAQ;AACd,SAAK,GAAG,aAAa,iBAAiB,KAAK,aAAa,SAAS,OAAO;AACxE,SAAK,SAAS,aAAa,iBAAiB,KAAK,aAAa,SAAS,OAAO;AAAA,EAChF;AA2BF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Carousel
|
|
3
|
-
} from "./chunk-KVJAVDBC.mjs";
|
|
4
|
-
import {
|
|
5
|
-
Utils
|
|
6
|
-
} from "./chunk-M372EDXD.mjs";
|
|
7
|
-
import {
|
|
8
|
-
Component
|
|
9
|
-
} from "./chunk-PD6HYHAE.mjs";
|
|
10
|
-
|
|
11
|
-
// src/ts/components/tabs.ts
|
|
12
|
-
var _defaults = {
|
|
13
|
-
duration: 300,
|
|
14
|
-
onShow: null,
|
|
15
|
-
swipeable: false,
|
|
16
|
-
responsiveThreshold: Infinity
|
|
17
|
-
// breakpoint for swipeable
|
|
18
|
-
};
|
|
19
|
-
var Tabs = class _Tabs extends Component {
|
|
20
|
-
constructor(el, options) {
|
|
21
|
-
var _a;
|
|
22
|
-
super(el, options, _Tabs);
|
|
23
|
-
this._originalPanels = /* @__PURE__ */ new Map();
|
|
24
|
-
this._originalLinks = /* @__PURE__ */ new Map();
|
|
25
|
-
// Throttled like Carousel's: every bar re-measures on resize, and the left
|
|
26
|
-
// and right positions are both read before either is written.
|
|
27
|
-
this._handleWindowResize = Utils.throttle(() => {
|
|
28
|
-
this._setTabsAndTabWidth();
|
|
29
|
-
if (this._tabWidth !== 0 && this._tabsWidth !== 0) this._positionIndicator();
|
|
30
|
-
}, 200);
|
|
31
|
-
this._handleTabClick = (e) => {
|
|
32
|
-
const target = e.target;
|
|
33
|
-
if (!target) return;
|
|
34
|
-
const tabLink = target.closest("a");
|
|
35
|
-
if (!tabLink || !Array.from(this._tabLinks).includes(tabLink)) return;
|
|
36
|
-
const tab = tabLink.parentElement;
|
|
37
|
-
const disabled = tabLink.classList.contains("disabled") || tabLink.getAttribute("aria-disabled") === "true" || tab?.classList.contains("disabled");
|
|
38
|
-
if (disabled) {
|
|
39
|
-
e.preventDefault();
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
if (tabLink.hasAttribute("target")) return;
|
|
43
|
-
if (this.options.swipeable) {
|
|
44
|
-
const index = this._tabsCarousel.images.indexOf(this._panelFor(tabLink));
|
|
45
|
-
if (index >= 0) this._tabsCarousel.set(index);
|
|
46
|
-
e.preventDefault();
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
const _oldContent = this._content;
|
|
50
|
-
this._tabLinks = this._queryTabLinks();
|
|
51
|
-
const prevIndex = this._index;
|
|
52
|
-
this._setActiveTabLink(tabLink);
|
|
53
|
-
if (this._content) {
|
|
54
|
-
this._content.style.display = "block";
|
|
55
|
-
this._content.classList.add("active");
|
|
56
|
-
if (typeof this.options.onShow === "function")
|
|
57
|
-
this.options.onShow.call(this, this._content);
|
|
58
|
-
if (_oldContent && _oldContent !== this._content) {
|
|
59
|
-
_oldContent.style.display = "none";
|
|
60
|
-
_oldContent.classList.remove("active");
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
this._setTabsAndTabWidth();
|
|
64
|
-
this._animateIndicator(prevIndex);
|
|
65
|
-
e.preventDefault();
|
|
66
|
-
};
|
|
67
|
-
this.el["Expressive_Tabs"] = this;
|
|
68
|
-
this.options = {
|
|
69
|
-
..._Tabs.defaults,
|
|
70
|
-
...options
|
|
71
|
-
};
|
|
72
|
-
this._tabLinks = this._queryTabLinks();
|
|
73
|
-
if (!this._tabLinks.length) {
|
|
74
|
-
console.error("Tabs: no tab links (an <a> child, or one inside .tab) to show");
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
this._tabLinks.forEach((link) => {
|
|
78
|
-
this._originalLinks.set(link, { active: link.classList.contains("active"), current: link.getAttribute("aria-current") });
|
|
79
|
-
const panel = this._panelFor(link);
|
|
80
|
-
if (panel) this._originalPanels.set(panel, {
|
|
81
|
-
display: panel.style.display,
|
|
82
|
-
priority: panel.style.getPropertyPriority("display"),
|
|
83
|
-
active: panel.classList.contains("active"),
|
|
84
|
-
carousel: panel.classList.contains("carousel-item")
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
(_a = this.options).swipeable && (_a.swipeable = window.innerWidth <= this.options.responsiveThreshold && this._originalPanels.size > 0);
|
|
88
|
-
this._index = 0;
|
|
89
|
-
this._setupActiveTabLink();
|
|
90
|
-
if (this.options.swipeable) {
|
|
91
|
-
this._setupSwipeableTabs();
|
|
92
|
-
} else {
|
|
93
|
-
this._setupNormalTabs();
|
|
94
|
-
}
|
|
95
|
-
this._setTabsAndTabWidth();
|
|
96
|
-
this._createIndicator();
|
|
97
|
-
this._setupEventHandlers();
|
|
98
|
-
document.fonts?.ready.then(() => {
|
|
99
|
-
if (this.el["Expressive_Tabs"] === this) this._handleWindowResize();
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
static get defaults() {
|
|
103
|
-
return _defaults;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Initializes instances of Tabs.
|
|
107
|
-
* @param els HTML elements.
|
|
108
|
-
* @param options Component options.
|
|
109
|
-
*/
|
|
110
|
-
static init(els, options = {}) {
|
|
111
|
-
return super.init(els, options, _Tabs);
|
|
112
|
-
}
|
|
113
|
-
static getInstance(el) {
|
|
114
|
-
return el["Expressive_Tabs"];
|
|
115
|
-
}
|
|
116
|
-
destroy() {
|
|
117
|
-
this._removeEventHandlers();
|
|
118
|
-
this._indicator?.remove();
|
|
119
|
-
if (this._tabsCarousel) {
|
|
120
|
-
this._teardownSwipeableTabs();
|
|
121
|
-
}
|
|
122
|
-
this._originalPanels.forEach((original, panel) => {
|
|
123
|
-
panel.style.setProperty("display", original.display, original.priority);
|
|
124
|
-
panel.classList.toggle("active", original.active);
|
|
125
|
-
panel.classList.toggle("carousel-item", original.carousel);
|
|
126
|
-
if (!panel.className) panel.removeAttribute("class");
|
|
127
|
-
});
|
|
128
|
-
this._originalLinks.forEach((original, link) => {
|
|
129
|
-
link.classList.toggle("active", original.active);
|
|
130
|
-
if (original.current === null) link.removeAttribute("aria-current");
|
|
131
|
-
else link.setAttribute("aria-current", original.current);
|
|
132
|
-
});
|
|
133
|
-
this.el["Expressive_Tabs"] = void 0;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* The index of tab that is currently shown.
|
|
137
|
-
*/
|
|
138
|
-
get index() {
|
|
139
|
-
return this._index;
|
|
140
|
-
}
|
|
141
|
-
_setupEventHandlers() {
|
|
142
|
-
window.addEventListener("resize", this._handleWindowResize);
|
|
143
|
-
this.el.addEventListener("click", this._handleTabClick);
|
|
144
|
-
}
|
|
145
|
-
_removeEventHandlers() {
|
|
146
|
-
window.removeEventListener("resize", this._handleWindowResize);
|
|
147
|
-
this.el.removeEventListener("click", this._handleTabClick);
|
|
148
|
-
}
|
|
149
|
-
_queryTabLinks() {
|
|
150
|
-
return this.el.querySelectorAll(
|
|
151
|
-
":scope > a, :scope > .tab > a"
|
|
152
|
-
);
|
|
153
|
-
}
|
|
154
|
-
_createIndicator() {
|
|
155
|
-
const tag = this.el.tagName === "UL" || this.el.tagName === "OL" ? "li" : "span";
|
|
156
|
-
const indicator = document.createElement(tag);
|
|
157
|
-
indicator.classList.add("indicator");
|
|
158
|
-
this.el.appendChild(indicator);
|
|
159
|
-
this._indicator = indicator;
|
|
160
|
-
this._positionIndicator();
|
|
161
|
-
}
|
|
162
|
-
/** Reads both positions before writing either. */
|
|
163
|
-
_positionIndicator() {
|
|
164
|
-
const left = this._calcLeftPos(this._activeTabLink);
|
|
165
|
-
const right = this._calcRightPos(this._activeTabLink);
|
|
166
|
-
this._indicator.style.left = left + "px";
|
|
167
|
-
this._indicator.style.right = right + "px";
|
|
168
|
-
}
|
|
169
|
-
/** The panel a link shows, or null for a `target` link or one without a hash. */
|
|
170
|
-
_panelFor(a) {
|
|
171
|
-
if (!a.hash || a.hasAttribute("target")) return null;
|
|
172
|
-
return document.getElementById(a.hash.slice(1));
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Which tab is current, for the eye and for assistive technology.
|
|
176
|
-
*
|
|
177
|
-
* The class alone is a colour. `aria-current` is the part a screen reader
|
|
178
|
-
* reads, and because tabs are navigation rather than a tablist (rule 2 -
|
|
179
|
-
* there is no keyboard model here to back a tablist), "current" is exactly
|
|
180
|
-
* the right word for it. Its *value* changes as the user clicks, which makes
|
|
181
|
-
* maintaining it the component's job, not the author's - see CONTEXT.md on
|
|
182
|
-
* static semantics versus dynamic state. Writing it once in the markup and
|
|
183
|
-
* never moving it left the old tab announcing itself as current.
|
|
184
|
-
*/
|
|
185
|
-
_setActiveTabLink(tabLink) {
|
|
186
|
-
Array.from(this._tabLinks).forEach((a) => {
|
|
187
|
-
a.classList.remove("active");
|
|
188
|
-
a.removeAttribute("aria-current");
|
|
189
|
-
});
|
|
190
|
-
this._activeTabLink = tabLink;
|
|
191
|
-
tabLink.classList.add("active");
|
|
192
|
-
tabLink.setAttribute("aria-current", "page");
|
|
193
|
-
this._index = Array.from(this._tabLinks).indexOf(tabLink);
|
|
194
|
-
this._content = this._panelFor(tabLink);
|
|
195
|
-
}
|
|
196
|
-
_setupActiveTabLink() {
|
|
197
|
-
this._activeTabLink = Array.from(this._tabLinks).find((a) => a.getAttribute("href") === location.hash) ?? this.el.querySelector("a.active") ?? this._tabLinks[0];
|
|
198
|
-
this._setActiveTabLink(this._activeTabLink);
|
|
199
|
-
this._originalPanels.forEach((_, panel) => panel.classList.toggle("active", panel === this._content));
|
|
200
|
-
}
|
|
201
|
-
_setupSwipeableTabs() {
|
|
202
|
-
const tabsContent = [];
|
|
203
|
-
this._tabLinks.forEach((a) => {
|
|
204
|
-
const currContent = this._panelFor(a);
|
|
205
|
-
if (!currContent) return;
|
|
206
|
-
currContent.classList.add("carousel-item");
|
|
207
|
-
tabsContent.push(currContent);
|
|
208
|
-
});
|
|
209
|
-
const tabsWrapper = document.createElement("div");
|
|
210
|
-
tabsWrapper.classList.add("tabs-content", "carousel", "flat");
|
|
211
|
-
tabsContent[0].parentElement.insertBefore(tabsWrapper, tabsContent[0]);
|
|
212
|
-
tabsContent.forEach((tabContent) => {
|
|
213
|
-
const marker = document.createComment("");
|
|
214
|
-
tabContent.before(marker);
|
|
215
|
-
this._originalPanels.get(tabContent).marker = marker;
|
|
216
|
-
tabsWrapper.appendChild(tabContent);
|
|
217
|
-
tabContent.style.display = "";
|
|
218
|
-
});
|
|
219
|
-
this._tabsCarousel = Carousel.init(tabsWrapper, {
|
|
220
|
-
fullWidth: true,
|
|
221
|
-
noWrap: true,
|
|
222
|
-
duration: this.options.duration,
|
|
223
|
-
onCycleTo: (item) => {
|
|
224
|
-
const prevIndex = this._index;
|
|
225
|
-
this._setActiveTabLink(Array.from(this._tabLinks).find((a) => !a.hasAttribute("target") && a.hash === "#" + item.id));
|
|
226
|
-
this._setTabsAndTabWidth();
|
|
227
|
-
this._animateIndicator(prevIndex);
|
|
228
|
-
if (typeof this.options.onShow === "function")
|
|
229
|
-
this.options.onShow.call(this, this._content);
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
_teardownSwipeableTabs() {
|
|
234
|
-
const tabsWrapper = this._tabsCarousel.el;
|
|
235
|
-
this._tabsCarousel.destroy();
|
|
236
|
-
this._originalPanels.forEach((original, panel) => original.marker?.replaceWith(panel));
|
|
237
|
-
tabsWrapper.remove();
|
|
238
|
-
}
|
|
239
|
-
_setupNormalTabs() {
|
|
240
|
-
Array.from(this._tabLinks).forEach((a) => {
|
|
241
|
-
if (a === this._activeTabLink) return;
|
|
242
|
-
const currContent = this._panelFor(a);
|
|
243
|
-
if (currContent) currContent.style.display = "none";
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
_setTabsAndTabWidth() {
|
|
247
|
-
this._tabsWidth = this.el.getBoundingClientRect().width;
|
|
248
|
-
this._tabWidth = Math.max(this._tabsWidth, this.el.scrollWidth) / this._tabLinks.length;
|
|
249
|
-
}
|
|
250
|
-
_calcRightPos(el) {
|
|
251
|
-
return Math.ceil(this._tabsWidth - el.offsetLeft - el.getBoundingClientRect().width);
|
|
252
|
-
}
|
|
253
|
-
_calcLeftPos(el) {
|
|
254
|
-
return Math.floor(el.offsetLeft);
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* Recalculate tab indicator position. This is useful when
|
|
258
|
-
* the indicator position is not correct.
|
|
259
|
-
*/
|
|
260
|
-
updateTabIndicator() {
|
|
261
|
-
this._setTabsAndTabWidth();
|
|
262
|
-
this._animateIndicator(this._index);
|
|
263
|
-
}
|
|
264
|
-
_animateIndicator(prevIndex) {
|
|
265
|
-
let leftDelay = 0, rightDelay = 0;
|
|
266
|
-
const isMovingLeftOrStaying = this._index - prevIndex >= 0;
|
|
267
|
-
if (isMovingLeftOrStaying) leftDelay = 90;
|
|
268
|
-
else rightDelay = 90;
|
|
269
|
-
this._indicator.style.transition = `
|
|
270
|
-
left ${this.options.duration}ms ease-out ${leftDelay}ms,
|
|
271
|
-
right ${this.options.duration}ms ease-out ${rightDelay}ms`;
|
|
272
|
-
this._positionIndicator();
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Show tab content that corresponds to the tab with the id.
|
|
276
|
-
* @param tabId The id of the tab that you want to switch to.
|
|
277
|
-
*/
|
|
278
|
-
select(tabId) {
|
|
279
|
-
const tab = Array.from(this._tabLinks).find((a) => a.getAttribute("href") === "#" + tabId);
|
|
280
|
-
if (tab) tab.click();
|
|
281
|
-
}
|
|
282
|
-
};
|
|
283
|
-
|
|
284
|
-
export {
|
|
285
|
-
Tabs
|
|
286
|
-
};
|
|
287
|
-
//# sourceMappingURL=chunk-UCOE7ZDL.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/ts/components/tabs.ts"],
|
|
4
|
-
"sourcesContent": ["import { Carousel } from './carousel';\nimport { Component, BaseOptions, InitElements, InitElement } from '../core/component';\nimport { Utils } from '../core/utils';\n\nexport interface TabsOptions extends BaseOptions {\n /**\n * Transition duration in milliseconds.\n * @default 300\n */\n duration: number;\n /**\n * Callback for when a new tab content is shown.\n * @default null\n */\n onShow: (newContent: Element) => void;\n /**\n * Set to true to enable swipeable tabs.\n * This also uses the responsiveThreshold option.\n * @default false\n */\n swipeable: boolean;\n /**\n * The maximum width of the screen, in pixels,\n * where the swipeable functionality initializes.\n * @default infinity\n */\n responsiveThreshold: number;\n}\n\nconst _defaults: TabsOptions = {\n duration: 300,\n onShow: null,\n swipeable: false,\n responsiveThreshold: Infinity // breakpoint for swipeable\n};\n\nexport class Tabs extends Component<TabsOptions> {\n _tabLinks: NodeListOf<HTMLAnchorElement>;\n _index: number;\n _indicator: HTMLElement;\n _tabWidth: number;\n _tabsWidth: number;\n _tabsCarousel: Carousel;\n _activeTabLink: HTMLAnchorElement;\n _content: HTMLElement;\n private _originalPanels = new Map<HTMLElement, { display: string; priority: string; active: boolean; carousel: boolean; marker?: Comment }>();\n private _originalLinks = new Map<HTMLAnchorElement, { active: boolean; current: string | null }>();\n\n constructor(el: HTMLElement, options: Partial<TabsOptions>) {\n super(el, options, Tabs);\n this.el['Expressive_Tabs'] = this;\n\n this.options = {\n ...Tabs.defaults,\n ...options\n };\n\n this._tabLinks = this._queryTabLinks();\n if (!this._tabLinks.length) {\n console.error('Tabs: no tab links (an <a> child, or one inside .tab) to show');\n return;\n }\n this._tabLinks.forEach(link => {\n this._originalLinks.set(link, { active: link.classList.contains('active'), current: link.getAttribute('aria-current') });\n const panel = this._panelFor(link);\n if (panel) this._originalPanels.set(panel, {\n display: panel.style.display, priority: panel.style.getPropertyPriority('display'),\n active: panel.classList.contains('active'), carousel: panel.classList.contains('carousel-item')\n });\n });\n // Swiping needs at least one panel the links resolve to.\n this.options.swipeable &&= window.innerWidth <= this.options.responsiveThreshold && this._originalPanels.size > 0;\n this._index = 0;\n this._setupActiveTabLink();\n if (this.options.swipeable) {\n this._setupSwipeableTabs();\n } else {\n this._setupNormalTabs();\n }\n // Setup tabs indicator after content to ensure accurate widths\n this._setTabsAndTabWidth();\n this._createIndicator();\n this._setupEventHandlers();\n // Labels measured before a web font arrives have the fallback's width,\n // and nothing else re-measures them until the window resizes.\n document.fonts?.ready.then(() => {\n if (this.el['Expressive_Tabs'] === this) this._handleWindowResize();\n });\n }\n\n static get defaults(): TabsOptions {\n return _defaults;\n }\n\n /**\n * Initializes instance of Tabs.\n * @param el HTML element.\n * @param options Component options.\n */\n static init(el: HTMLElement, options?: Partial<TabsOptions>): Tabs;\n /**\n * Initializes instances of Tabs.\n * @param els HTML elements.\n * @param options Component options.\n */\n static init(els: InitElements<InitElement>, options?: Partial<TabsOptions>): Tabs[];\n /**\n * Initializes instances of Tabs.\n * @param els HTML elements.\n * @param options Component options.\n */\n static init(\n els: HTMLElement | InitElements<InitElement>,\n options: Partial<TabsOptions> = {}\n ): Tabs | Tabs[] {\n return super.init(els, options, Tabs);\n }\n\n static getInstance(el: HTMLElement): Tabs {\n return el['Expressive_Tabs'];\n }\n\n destroy() {\n this._removeEventHandlers();\n this._indicator?.remove();\n if (this._tabsCarousel) {\n this._teardownSwipeableTabs();\n }\n this._originalPanels.forEach((original, panel) => {\n panel.style.setProperty('display', original.display, original.priority);\n panel.classList.toggle('active', original.active);\n panel.classList.toggle('carousel-item', original.carousel);\n if (!panel.className) panel.removeAttribute('class');\n });\n this._originalLinks.forEach((original, link) => {\n link.classList.toggle('active', original.active);\n if (original.current === null) link.removeAttribute('aria-current');\n else link.setAttribute('aria-current', original.current);\n });\n this.el['Expressive_Tabs'] = undefined;\n }\n\n /**\n * The index of tab that is currently shown.\n */\n get index() {\n return this._index;\n }\n\n _setupEventHandlers() {\n window.addEventListener('resize', this._handleWindowResize);\n this.el.addEventListener('click', this._handleTabClick);\n }\n\n _removeEventHandlers() {\n window.removeEventListener('resize', this._handleWindowResize);\n this.el.removeEventListener('click', this._handleTabClick);\n }\n\n // Throttled like Carousel's: every bar re-measures on resize, and the left\n // and right positions are both read before either is written.\n _handleWindowResize = Utils.throttle(() => {\n this._setTabsAndTabWidth();\n if (this._tabWidth !== 0 && this._tabsWidth !== 0) this._positionIndicator();\n }, 200);\n\n _queryTabLinks() {\n return this.el.querySelectorAll<HTMLAnchorElement>(\n ':scope > a, :scope > .tab > a'\n );\n }\n\n _handleTabClick = (e: MouseEvent) => {\n const target = e.target as Element | null;\n if (!target) return;\n const tabLink = target.closest('a');\n if (!tabLink || !Array.from(this._tabLinks).includes(tabLink)) return;\n\n const tab = tabLink.parentElement;\n const disabled =\n tabLink.classList.contains('disabled') ||\n tabLink.getAttribute('aria-disabled') === 'true' ||\n tab?.classList.contains('disabled');\n if (disabled) {\n e.preventDefault();\n return;\n }\n // Act as regular link if target attribute is specified.\n if (tabLink.hasAttribute('target')) return;\n if (this.options.swipeable) {\n const index = this._tabsCarousel.images.indexOf(this._panelFor(tabLink));\n if (index >= 0) this._tabsCarousel.set(index);\n e.preventDefault();\n return;\n }\n const _oldContent = this._content;\n this._tabLinks = this._queryTabLinks();\n // Moves the class and aria-current together, off the old tab and onto this\n // one - they used to be able to disagree.\n const prevIndex = this._index;\n this._setActiveTabLink(tabLink);\n\n // Swap content\n if (this._content) {\n this._content.style.display = 'block';\n this._content.classList.add('active');\n if (typeof this.options.onShow === 'function')\n this.options.onShow.call(this, this._content);\n if (_oldContent && _oldContent !== this._content) {\n _oldContent.style.display = 'none';\n _oldContent.classList.remove('active');\n }\n }\n // Update widths after content is swapped (scrollbar bugfix)\n this._setTabsAndTabWidth();\n this._animateIndicator(prevIndex);\n e.preventDefault();\n };\n\n _createIndicator() {\n const tag = this.el.tagName === 'UL' || this.el.tagName === 'OL' ? 'li' : 'span';\n const indicator = document.createElement(tag);\n indicator.classList.add('indicator');\n this.el.appendChild(indicator);\n this._indicator = indicator;\n this._positionIndicator();\n }\n\n /** Reads both positions before writing either. */\n private _positionIndicator() {\n const left = this._calcLeftPos(this._activeTabLink);\n const right = this._calcRightPos(this._activeTabLink);\n this._indicator.style.left = left + 'px';\n this._indicator.style.right = right + 'px';\n }\n\n /** The panel a link shows, or null for a `target` link or one without a hash. */\n private _panelFor(a: HTMLAnchorElement): HTMLElement | null {\n if (!a.hash || a.hasAttribute('target')) return null;\n return document.getElementById(a.hash.slice(1));\n }\n\n /**\n * Which tab is current, for the eye and for assistive technology.\n *\n * The class alone is a colour. `aria-current` is the part a screen reader\n * reads, and because tabs are navigation rather than a tablist (rule 2 -\n * there is no keyboard model here to back a tablist), \"current\" is exactly\n * the right word for it. Its *value* changes as the user clicks, which makes\n * maintaining it the component's job, not the author's - see CONTEXT.md on\n * static semantics versus dynamic state. Writing it once in the markup and\n * never moving it left the old tab announcing itself as current.\n */\n private _setActiveTabLink(tabLink: HTMLAnchorElement) {\n Array.from(this._tabLinks).forEach(a => {\n a.classList.remove('active');\n a.removeAttribute('aria-current');\n });\n this._activeTabLink = tabLink;\n tabLink.classList.add('active');\n tabLink.setAttribute('aria-current', 'page');\n this._index = Array.from(this._tabLinks).indexOf(tabLink);\n this._content = this._panelFor(tabLink);\n }\n\n _setupActiveTabLink() {\n // If the location.hash matches one of the links, use that as the active tab.\n // If no match is found, use any with class 'active', then the first link.\n this._activeTabLink =\n Array.from(this._tabLinks).find(a => a.getAttribute('href') === location.hash) ??\n this.el.querySelector<HTMLAnchorElement>('a.active') ??\n this._tabLinks[0];\n this._setActiveTabLink(this._activeTabLink);\n\n this._originalPanels.forEach((_, panel) => panel.classList.toggle('active', panel === this._content));\n }\n\n _setupSwipeableTabs() {\n const tabsContent = [];\n this._tabLinks.forEach((a) => {\n const currContent = this._panelFor(a);\n if (!currContent) return;\n currContent.classList.add('carousel-item');\n tabsContent.push(currContent);\n });\n\n // Create Carousel-Wrapper around Tab-Contents\n const tabsWrapper = document.createElement('div');\n tabsWrapper.classList.add('tabs-content', 'carousel', 'flat');\n\n // Wrap around\n tabsContent[0].parentElement.insertBefore(tabsWrapper, tabsContent[0]);\n tabsContent.forEach((tabContent) => {\n const marker = document.createComment('');\n tabContent.before(marker);\n this._originalPanels.get(tabContent).marker = marker;\n tabsWrapper.appendChild(tabContent);\n tabContent.style.display = '';\n });\n\n this._tabsCarousel = Carousel.init(tabsWrapper, {\n fullWidth: true,\n noWrap: true,\n duration: this.options.duration,\n onCycleTo: (item) => {\n const prevIndex = this._index;\n this._setActiveTabLink(Array.from(this._tabLinks).find(a => !a.hasAttribute('target') && a.hash === '#' + item.id));\n this._setTabsAndTabWidth();\n this._animateIndicator(prevIndex);\n if (typeof this.options.onShow === 'function')\n this.options.onShow.call(this, this._content);\n }\n });\n }\n\n _teardownSwipeableTabs() {\n const tabsWrapper = this._tabsCarousel.el;\n this._tabsCarousel.destroy();\n this._originalPanels.forEach((original, panel) => original.marker?.replaceWith(panel));\n tabsWrapper.remove();\n }\n\n _setupNormalTabs() {\n // Hide Tabs Content\n Array.from(this._tabLinks).forEach((a) => {\n if (a === this._activeTabLink) return;\n const currContent = this._panelFor(a);\n if (currContent) currContent.style.display = 'none';\n });\n }\n\n _setTabsAndTabWidth() {\n this._tabsWidth = this.el.getBoundingClientRect().width;\n this._tabWidth = Math.max(this._tabsWidth, this.el.scrollWidth) / this._tabLinks.length;\n }\n\n _calcRightPos(el) {\n return Math.ceil(this._tabsWidth - el.offsetLeft - el.getBoundingClientRect().width);\n }\n\n _calcLeftPos(el) {\n return Math.floor(el.offsetLeft);\n }\n\n /**\n * Recalculate tab indicator position. This is useful when\n * the indicator position is not correct.\n */\n updateTabIndicator() {\n this._setTabsAndTabWidth();\n this._animateIndicator(this._index);\n }\n\n _animateIndicator(prevIndex) {\n let leftDelay = 0,\n rightDelay = 0;\n\n const isMovingLeftOrStaying = this._index - prevIndex >= 0;\n if (isMovingLeftOrStaying) leftDelay = 90;\n else rightDelay = 90;\n\n // in v1: easeOutQuad\n this._indicator.style.transition = `\n left ${this.options.duration}ms ease-out ${leftDelay}ms,\n right ${this.options.duration}ms ease-out ${rightDelay}ms`;\n\n this._positionIndicator();\n }\n\n /**\n * Show tab content that corresponds to the tab with the id.\n * @param tabId The id of the tab that you want to switch to.\n */\n select(tabId: string) {\n const tab = Array.from(this._tabLinks).find(a => a.getAttribute('href') === '#' + tabId);\n if (tab) tab.click();\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;AA6BA,IAAM,YAAyB;AAAA,EAC7B,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,qBAAqB;AAAA;AACvB;AAEO,IAAM,OAAN,MAAM,cAAa,UAAuB;AAAA,EAY/C,YAAY,IAAiB,SAA+B;AAhD9D;AAiDI,UAAM,IAAI,SAAS,KAAI;AAJzB,SAAQ,kBAAkB,oBAAI,IAA8G;AAC5I,SAAQ,iBAAiB,oBAAI,IAAoE;AAmHjG;AAAA;AAAA,+BAAsB,MAAM,SAAS,MAAM;AACzC,WAAK,oBAAoB;AACzB,UAAI,KAAK,cAAc,KAAK,KAAK,eAAe,EAAG,MAAK,mBAAmB;AAAA,IAC7E,GAAG,GAAG;AAQN,2BAAkB,CAAC,MAAkB;AACnC,YAAM,SAAS,EAAE;AACjB,UAAI,CAAC,OAAQ;AACb,YAAM,UAAU,OAAO,QAAQ,GAAG;AAClC,UAAI,CAAC,WAAW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WAAW,IAAI,KAAK,UAAU;AAAA,EACnF;AAAA,EAEA,cAAc,IAAI;AAChB,WAAO,KAAK,KAAK,KAAK,aAAa,GAAG,aAAa,GAAG,sBAAsB,EAAE,KAAK;AAAA,EACrF;AAAA,EAEA,aAAa,IAAI;AACf,WAAO,KAAK,MAAM,GAAG,UAAU;AAAA,EACjC;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,qBAAqB;AACnB,SAAK,oBAAoB;AACzB,SAAK,kBAAkB,KAAK,MAAM;AAAA,EACpC;AAAA,EAEA,kBAAkB,WAAW;AAC3B,QAAI,YAAY,GACd,aAAa;AAEf,UAAM,wBAAwB,KAAK,SAAS,aAAa;AACzD,QAAI,sBAAuB,aAAY;AAAA,QAClC,cAAa;AAGlB,SAAK,WAAW,MAAM,aAAa;AAAA,aAC1B,KAAK,QAAQ,QAAQ,eAAe,SAAS;AAAA,cAC5C,KAAK,QAAQ,QAAQ,eAAe,UAAU;AAExD,SAAK,mBAAmB;AAAA,EAC1B;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,OAAO,OAAe;AACpB,UAAM,MAAM,MAAM,KAAK,KAAK,SAAS,EAAE,KAAK,OAAK,EAAE,aAAa,MAAM,MAAM,MAAM,KAAK;AACvF,QAAI,IAAK,KAAI,MAAM;AAAA,EACrB;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/ts/components/commandPalette.ts"],
|
|
4
|
-
"sourcesContent": ["import { Utils } from '../core/utils';\nimport { Component, BaseOptions, InitElements, InitElement, Openable } from '../core/component';\n\nexport interface CommandPaletteOptions extends BaseOptions {\n /**\n * Letter that toggles the palette together with Command on Apple platforms\n * or Ctrl elsewhere. A key event the page has already handled is left\n * alone. `null` turns the shortcut off. `data-shortcut` on the dialog sets\n * it; an empty `data-shortcut` turns it off.\n * @default 'k'\n */\n shortcut: string | null;\n /**\n * If true, the palette closes after a command runs.\n * @default true\n */\n closeOnRun: boolean;\n}\n\nconst _defaults: CommandPaletteOptions = {\n shortcut: 'k',\n closeOnRun: true\n};\n\n// On Apple platforms Ctrl+letter is text editing (Ctrl+K deletes to the end\n// of the line), so only Command opens the palette there.\nconst APPLE = typeof navigator !== 'undefined' && /Mac|iPhone|iPad|iPod/.test(navigator.platform);\n\n/** Case- and accent-insensitive text for matching. */\nconst fold = (text: string) =>\n text.normalize('NFD').replace(/\\p{Diacritic}/gu, '').toLowerCase();\n\n/**\n * A command palette: a native modal <dialog class=\"command-palette\"> holding\n * a search input and a list of commands. Typing filters the list; the arrow\n * keys move through what is left and Enter runs it, while focus stays in the\n * input. The dialog owns modality, Escape and returning focus.\n *\n * The input is a combobox and the list a listbox of options, with the active\n * option reported through aria-activedescendant. A command is the link or\n * button inside an option; running it clicks that element, so a page wires\n * commands with ordinary hrefs and click handlers.\n */\nexport class CommandPalette extends Component<CommandPaletteOptions> implements Openable {\n declare el: HTMLDialogElement;\n /** The search input. */\n input: HTMLInputElement;\n /** The list of commands. */\n list: HTMLElement;\n private _active: HTMLElement | null = null;\n private _generatedIds: HTMLElement[] = [];\n /** Wires and refilters commands the page adds or removes later. */\n private _observer: MutationObserver | null = null;\n\n constructor(el: HTMLDialogElement, options: Partial<CommandPaletteOptions>) {\n super(el, options, CommandPalette);\n this.el['Expressive_CommandPalette'] = this;\n const shortcut = el.dataset.shortcut;\n this.options = {\n ...CommandPalette.defaults,\n ...(shortcut !== undefined ? { shortcut: shortcut || null } : {}),\n ...options\n };\n this.input = el.querySelector(':scope > input');\n this.list = el.querySelector(':scope > :is(ul, ol)');\n if (!this.input || !this.list) {\n console.error('CommandPalette needs an <input> and a <ul> as children of the dialog.');\n return;\n }\n this._setupAccessibility();\n this._filter();\n // A page adding commands while the user arrows through the list keeps\n // their place.\n this._observer = new MutationObserver(() => this._filter(true));\n // Also refilter when the page hides, shows, disables or enables a command.\n // Not aria-disabled: _filter writes that itself, which would loop.\n this._observer.observe(this.list, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['hidden', 'disabled']\n });\n this.input.addEventListener('input', this._handleInput);\n this.input.addEventListener('keydown', this._handleKeydown);\n this.list.addEventListener('click', this._handleListClick);\n this.list.addEventListener('pointermove', this._handlePointerMove);\n this.el.addEventListener('close', this._handleClose);\n document.addEventListener('keydown', this._handleShortcut);\n }\n\n static get defaults(): CommandPaletteOptions {\n return _defaults;\n }\n\n /**\n * Initializes instance of CommandPalette.\n * @param el HTML element.\n * @param options Component options.\n */\n static init(el: HTMLElement, options?: Partial<CommandPaletteOptions>): CommandPalette;\n /**\n * Initializes instances of CommandPalette.\n * @param els HTML elements.\n * @param options Component options.\n */\n static init(\n els: InitElements<InitElement>,\n options?: Partial<CommandPaletteOptions>\n ): CommandPalette[];\n /**\n * Initializes instances of CommandPalette.\n * @param els HTML elements.\n * @param options Component options.\n */\n static init(\n els: HTMLElement | InitElements<InitElement>,\n options: Partial<CommandPaletteOptions> = {}\n ): CommandPalette | CommandPalette[] {\n return super.init(els, options, CommandPalette);\n }\n\n static getInstance(el: HTMLElement): CommandPalette {\n return el['Expressive_CommandPalette'];\n }\n\n /** If the palette is open. */\n get isOpen() {\n return this.el.open;\n }\n\n /** Opens the palette as a modal dialog with the search input focused. */\n open = () => {\n if (!this.el.open) this.el.showModal();\n this.input?.focus();\n };\n\n /** Closes the palette. The dialog returns focus to where it was. */\n close = () => {\n if (this.el.open) this.el.close();\n };\n\n destroy() {\n this._observer?.disconnect();\n document.removeEventListener('keydown', this._handleShortcut);\n this.el.removeEventListener('close', this._handleClose);\n if (this.input && this.list) {\n this.input.removeEventListener('input', this._handleInput);\n this.input.removeEventListener('keydown', this._handleKeydown);\n this.list.removeEventListener('click', this._handleListClick);\n this.list.removeEventListener('pointermove', this._handlePointerMove);\n for (const name of ['role', 'aria-controls', 'aria-expanded', 'aria-autocomplete', 'aria-activedescendant']) {\n this.input.removeAttribute(name);\n }\n this.list.removeAttribute('role');\n for (const item of this._items()) {\n for (const name of ['role', 'aria-selected', 'aria-disabled', 'data-filtered']) item.removeAttribute(name);\n item.classList.remove('active');\n this._action(item)?.removeAttribute('tabindex');\n }\n for (const label of this._labels()) {\n label.removeAttribute('role');\n label.removeAttribute('data-filtered');\n }\n for (const el of this._generatedIds) el.removeAttribute('id');\n const empty = this._empty();\n if (empty) empty.hidden = false;\n }\n this.el['Expressive_CommandPalette'] = undefined;\n }\n\n private _items() {\n return Array.from(this.list.children).filter(\n (child): child is HTMLElement => child instanceof HTMLElement && !child.classList.contains('label')\n );\n }\n\n private _labels() {\n return Array.from(this.list.querySelectorAll<HTMLElement>(':scope > .label'));\n }\n\n private _empty() {\n return this.el.querySelector<HTMLElement>(':scope > .command-palette-empty');\n }\n\n private _action(item: HTMLElement) {\n return item.querySelector<HTMLElement>(':scope > :is(a[href], button)');\n }\n\n private _ensureId(el: HTMLElement, prefix: string) {\n if (!el.id) {\n el.id = `${prefix}-${Utils.guid()}`;\n this._generatedIds.push(el);\n }\n return el.id;\n }\n\n private _setupAccessibility() {\n this.list.setAttribute('role', 'listbox');\n this.input.setAttribute('role', 'combobox');\n this.input.setAttribute('aria-controls', this._ensureId(this.list, 'command-palette-list'));\n this.input.setAttribute('aria-expanded', 'true');\n this.input.setAttribute('aria-autocomplete', 'list');\n }\n\n /** Every command, including ones added since the last pass, is an option. */\n private _wireItems() {\n for (const item of this._items()) {\n if (item.getAttribute('role') === 'option') continue;\n item.setAttribute('role', 'option');\n this._ensureId(item, 'command-palette-option');\n // Focus stays in the input; the commands are reached with the arrows.\n this._action(item)?.setAttribute('tabindex', '-1');\n }\n // A listbox holds only options; a group heading is a visual divider.\n for (const label of this._labels()) label.setAttribute('role', 'none');\n }\n\n /** Commands on screen: neither hidden by the page nor filtered out. */\n private _shown() {\n return this._items().filter((item) => !item.hidden && !item.hasAttribute('data-filtered'));\n }\n\n /** Shown commands the arrows and Enter can reach: disabled ones are skipped. */\n private _visible() {\n return this._shown().filter((item) => item.getAttribute('aria-disabled') !== 'true');\n }\n\n /** A disabled link or button cannot run, so its option says so. */\n private _isDisabled(item: HTMLElement) {\n const action = this._action(item);\n return !!action && (action.matches(':disabled') || action.getAttribute('aria-disabled') === 'true');\n }\n\n private _setActive(item: HTMLElement | null) {\n if (this._active === item) return;\n this._active?.classList.remove('active');\n this._active?.removeAttribute('aria-selected');\n this._active = item;\n if (item) {\n item.classList.add('active');\n item.setAttribute('aria-selected', 'true');\n this.input.setAttribute('aria-activedescendant', item.id);\n item.scrollIntoView({ block: 'nearest' });\n } else {\n this.input.removeAttribute('aria-activedescendant');\n }\n }\n\n /**\n * Shows the commands matching the query. Filtering marks rows with\n * data-filtered rather than hidden, so a command the page hides stays\n * hidden. `keepActive` holds the active command while it is still\n * reachable, for list changes the user did not make.\n */\n private _filter(keepActive = false) {\n this._wireItems();\n const terms = fold(this.input.value).split(/\\s+/).filter(Boolean);\n for (const item of this._items()) {\n // data-keywords may sit on the row or on its link or button.\n const keywords = item.dataset.keywords ?? this._action(item)?.dataset.keywords ?? '';\n const text = fold(`${item.textContent} ${keywords}`);\n item.toggleAttribute('data-filtered', !terms.every((term) => text.includes(term)));\n if (this._isDisabled(item)) item.setAttribute('aria-disabled', 'true');\n else item.removeAttribute('aria-disabled');\n }\n // A heading stays only while one of the commands under it does.\n for (const label of this._labels()) {\n let next = label.nextElementSibling as HTMLElement | null;\n let any = false;\n while (next && !next.classList.contains('label')) {\n if (!next.hidden && !next.hasAttribute('data-filtered')) any = true;\n next = next.nextElementSibling as HTMLElement | null;\n }\n label.toggleAttribute('data-filtered', !any);\n }\n const visible = this._visible();\n const empty = this._empty();\n if (empty) empty.hidden = this._shown().length > 0;\n this._setActive(keepActive && visible.includes(this._active) ? this._active : visible[0] ?? null);\n }\n\n private _move(step: number) {\n const visible = this._visible();\n if (!visible.length) return;\n const index = visible.indexOf(this._active);\n this._setActive(visible[(index + step + visible.length) % visible.length]);\n }\n\n /** Runs a command by clicking its link or button; the click handler closes. */\n private _run(item: HTMLElement) {\n (this._action(item) ?? item).click();\n }\n\n _handleInput = () => this._filter();\n\n _handleKeydown = (e: KeyboardEvent) => {\n if (e.key === Utils.keys.ARROW_DOWN || e.key === Utils.keys.ARROW_UP) {\n e.preventDefault();\n this._move(e.key === Utils.keys.ARROW_DOWN ? 1 : -1);\n } else if (e.key === Utils.keys.ENTER && !e.isComposing && e.keyCode !== 229 && this._active) {\n // keyCode 229 is the Enter that confirms an IME composition in Safari,\n // which reports isComposing false for it.\n e.preventDefault();\n this._run(this._active);\n }\n };\n\n _handleListClick = (e: MouseEvent) => {\n const item = (<Element>e.target).closest<HTMLElement>('[role=\"option\"]');\n if (!item || !this.list.contains(item) || item.getAttribute('aria-disabled') === 'true') return;\n const action = this._action(item);\n // A click on the row's padding runs its command; that click comes back\n // through here and closes the palette.\n if (action && !action.contains(<Node>e.target)) {\n action.click();\n return;\n }\n if (this.options.closeOnRun) this.close();\n };\n\n _handlePointerMove = (e: PointerEvent) => {\n const item = (<Element>e.target).closest<HTMLElement>('[role=\"option\"]');\n if (item && this.list.contains(item) && item.getAttribute('aria-disabled') !== 'true') this._setActive(item);\n };\n\n /**\n * Each opening starts from the full list. The close event is queued, so a\n * palette reopened straight away may already be open again; its new search\n * is left alone.\n */\n _handleClose = () => {\n if (this.el.open) return;\n this.input.value = '';\n this._filter();\n };\n\n _handleShortcut = (e: KeyboardEvent) => {\n const { shortcut } = this.options;\n if (!shortcut || e.defaultPrevented || e.altKey || e.shiftKey) return;\n if (!(APPLE ? e.metaKey && !e.ctrlKey : e.ctrlKey && !e.metaKey)) return;\n // A non-Latin layout reports its own letter in e.key, so fall back to the\n // physical key there. A Latin layout matches on the letter it types.\n const letter = shortcut.toLowerCase();\n const latin = /^[a-z]$/i.test(e.key);\n const hit = e.key.toLowerCase() === letter ||\n (!latin && /^[a-z]$/.test(letter) && e.code === `Key${letter.toUpperCase()}`);\n if (!hit) return;\n e.preventDefault();\n if (this.el.open) this.close();\n else this.open();\n };\n}\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