@esri/calcite-components 3.0.0-next.32 → 3.0.0-next.33
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/dist/calcite/{MB6BMD5E.js → 26IO2DFH.js} +2 -2
- package/dist/calcite/{LX2YQS4U.js → 2BT5YUDG.js} +2 -2
- package/dist/calcite/{SYK4FTZH.js → 2ELI7726.js} +2 -2
- package/dist/calcite/{VMO2YM6S.js → 2FNEO7WI.js} +2 -2
- package/dist/calcite/{QXPKOPK6.js → 2G5KP7NS.js} +2 -2
- package/dist/calcite/{XQT3ARK7.js → 2I7TXBOJ.js} +1 -1
- package/dist/calcite/{JXGOSDPL.js → 2IDCHRIY.js} +2 -2
- package/dist/calcite/{DFAELDU6.js → 32F7OYWG.js} +2 -2
- package/dist/calcite/{FHBSNVWS.js → 34MYG2SR.js} +2 -2
- package/dist/calcite/{NSJJUDD5.js → 3OWLLN6E.js} +1 -1
- package/dist/calcite/{ODT4ESQX.js → 3SBDIKJN.js} +2 -2
- package/dist/calcite/{6HMJ7IAN.js → 3VAGNN4W.js} +2 -2
- package/dist/calcite/{S4KCVUMK.js → 3YBFK766.js} +2 -2
- package/dist/calcite/{QU4JAWC7.js → 44UACY3A.js} +1 -1
- package/dist/calcite/{2CFGBANM.js → 47EXVXM4.js} +2 -2
- package/dist/calcite/{T26XIUHV.js → 4FMY2PMX.js} +1 -1
- package/dist/calcite/{C3FAV6KN.js → 4HJ5FBOB.js} +2 -2
- package/dist/calcite/{KPMV2D6K.js → 4HJIMAWL.js} +2 -2
- package/dist/calcite/{DTYN7THU.js → 4QTOGGXE.js} +2 -2
- package/dist/calcite/{OQM7M4LD.js → 4RCOCFTP.js} +2 -2
- package/dist/calcite/{WL7W34FL.js → 4SHMKACC.js} +2 -2
- package/dist/calcite/{5BPLCLE7.js → 5D4KIQOF.js} +2 -2
- package/dist/calcite/{PSUUPEN4.js → 5DN2BIDW.js} +2 -2
- package/dist/calcite/{EHZG4LE2.js → 5OV5PICE.js} +2 -2
- package/dist/calcite/{NF577U7I.js → 5SHDRCG2.js} +2 -2
- package/dist/calcite/{Q2FJNOVK.js → 5VOSN73J.js} +2 -2
- package/dist/calcite/{3OQR6QD6.js → 5ZX7CO4J.js} +2 -2
- package/dist/calcite/{DKZRNRMY.js → 636QG2TD.js} +2 -2
- package/dist/calcite/{FD4PSMOO.js → 65ZSNVXX.js} +2 -2
- package/dist/calcite/{UDBJ5NLP.js → 6FWC7CPN.js} +2 -2
- package/dist/calcite/{WN6F4PNF.js → 6KUTIZF6.js} +2 -2
- package/dist/calcite/{RUB6IP3S.js → 73SU4V26.js} +2 -2
- package/dist/calcite/{FF6CJJEI.js → 75NA7GBJ.js} +2 -2
- package/dist/calcite/{WVDSEXQM.js → 7CFRPPJ3.js} +2 -2
- package/dist/calcite/{WVSQG7Q4.js → 7EMFMGDN.js} +2 -2
- package/dist/calcite/{OV65BSSD.js → 7HHA3B5C.js} +2 -2
- package/dist/calcite/{5IAWAE6S.js → 7KNRXSYM.js} +2 -2
- package/dist/calcite/{VS6QJKDS.js → 7Q2W43H6.js} +2 -2
- package/dist/calcite/{DORYBWJU.js → 7QEBTXWK.js} +2 -2
- package/dist/calcite/{56NG57ZV.js → 7TC3RJZQ.js} +2 -2
- package/dist/calcite/{T4W4G6KB.js → 7XJXZGFV.js} +2 -2
- package/dist/calcite/{TTSEPZSJ.js → 7ZBYZTXJ.js} +2 -2
- package/dist/calcite/{6FZRZAH5.js → A2TAJ3PS.js} +2 -2
- package/dist/calcite/{R37VNQRF.js → AJAEXC42.js} +2 -2
- package/dist/calcite/{4V63JUI2.js → ALJURNZI.js} +2 -2
- package/dist/calcite/{U2DELPEU.js → ALXG3XKA.js} +2 -2
- package/dist/calcite/{7QKSBB3N.js → AM4CUPBH.js} +2 -2
- package/dist/calcite/{KQY3EVJS.js → ANHQSOHO.js} +2 -2
- package/dist/calcite/{KFFWCGKO.js → ATXEMWE4.js} +2 -2
- package/dist/calcite/{RW3UTAP6.js → B2S2FBIJ.js} +2 -2
- package/dist/calcite/{JIDBLZG5.js → B2SZ5IPM.js} +1 -1
- package/dist/calcite/{4XUDRKCH.js → BD4TL6AH.js} +2 -2
- package/dist/calcite/{KQBGS3JW.js → BDVVXRMT.js} +2 -2
- package/dist/calcite/{PSFM7BPQ.js → BHJGRRBY.js} +2 -2
- package/dist/calcite/{NZPAHMXS.js → C2IYUJGM.js} +2 -2
- package/dist/calcite/{COH2GFYL.js → CAT7G5XB.js} +2 -2
- package/dist/calcite/{MGMKHKIC.js → CCGSLRBB.js} +2 -2
- package/dist/calcite/{MG7QGLOL.js → CKI6SRQH.js} +2 -2
- package/dist/calcite/{NWFEXSMI.js → CMRKQV56.js} +2 -2
- package/dist/calcite/{VRROUFDW.js → CRQQJBON.js} +2 -2
- package/dist/calcite/{3CKQU5XN.js → CW6LZAQP.js} +2 -2
- package/dist/calcite/{37ZNQYK3.js → DBYCMN2O.js} +2 -2
- package/dist/calcite/{VYJ3DOK4.js → DF2S5THD.js} +2 -2
- package/dist/calcite/{CUT3RNUC.js → DFQPUI6L.js} +2 -2
- package/dist/calcite/{G6KEPXBZ.js → DPXLIJ3O.js} +2 -2
- package/dist/calcite/{6GUPDZAM.js → EEPBJT5Q.js} +2 -2
- package/dist/calcite/{RJYSB6EU.js → EFHAWPPE.js} +2 -2
- package/dist/calcite/{NX5T23QG.js → EJAZCG6J.js} +2 -2
- package/dist/calcite/{AHS3NOAH.js → EKQGLFXV.js} +2 -2
- package/dist/calcite/{5N3CKIWM.js → ENI6RAC3.js} +2 -2
- package/dist/calcite/{HZEIWH6R.js → EXJ5AUGD.js} +1 -1
- package/dist/calcite/{2NBUINVW.js → F26NGMH6.js} +2 -2
- package/dist/calcite/{5L3D5M33.js → F4QKQSRM.js} +2 -2
- package/dist/calcite/{7UIFT2VV.js → F65GDKFK.js} +2 -2
- package/dist/calcite/{3UDCR3H5.js → F6MNCGQA.js} +2 -2
- package/dist/calcite/{HJFN4BRU.js → FC6NAB6L.js} +2 -2
- package/dist/calcite/{CQ6NWQF3.js → FDI6IMZA.js} +2 -2
- package/dist/calcite/{YG42Q3M4.js → FDLR7FE6.js} +2 -2
- package/dist/calcite/{FBBY2FFJ.js → FNXMD56B.js} +1 -1
- package/dist/calcite/{BDP67RLN.js → FSB26AXH.js} +2 -2
- package/dist/calcite/{HZZ34WWL.js → FUDAUFRI.js} +2 -2
- package/dist/calcite/{DCDPYODC.js → FWI5XWRU.js} +2 -2
- package/dist/calcite/{MGGFWF3L.js → FWLVKU6N.js} +2 -2
- package/dist/calcite/{V4666GZB.js → FZXGKHLN.js} +2 -2
- package/dist/calcite/{3RAXIH4Q.js → G6PW4TI7.js} +1 -1
- package/dist/calcite/{BWF7LUS7.js → GAJOIBJT.js} +2 -2
- package/dist/calcite/{WLIEYVUM.js → GI63MSAL.js} +2 -2
- package/dist/calcite/{Q5GDESPC.js → GIV47MWB.js} +2 -2
- package/dist/calcite/{DEFZFG7M.js → GOLGU2AW.js} +2 -2
- package/dist/calcite/{54QYFZMH.js → GOPYP4JX.js} +2 -2
- package/dist/calcite/{VS6GGLMS.js → GR67CO7H.js} +2 -2
- package/dist/calcite/{4HUGW2TV.js → H5RISXEE.js} +2 -2
- package/dist/calcite/{N4ECI2C6.js → HG62FMVH.js} +1 -1
- package/dist/calcite/{5TFHJSQ6.js → HNNEX7YJ.js} +2 -2
- package/dist/calcite/{GRLJY2QO.js → HPEYNPBS.js} +2 -2
- package/dist/calcite/{H4P7XXUV.js → HSTJNMII.js} +2 -2
- package/dist/calcite/{3S7M4AEL.js → HUHRUUV6.js} +1 -1
- package/dist/calcite/{G6WSCBIR.js → HYVLIUG2.js} +2 -2
- package/dist/calcite/{4RCORMBI.js → HZ5TQRST.js} +2 -2
- package/dist/calcite/{6N6FNMXF.js → I5SLUUDD.js} +2 -2
- package/dist/calcite/{QOMBG5VY.js → I6HOGEFP.js} +2 -2
- package/dist/calcite/{MABVOTZQ.js → ICC2OVDX.js} +2 -2
- package/dist/calcite/{KMVX7O74.js → IFIGTMI5.js} +2 -2
- package/dist/calcite/{PXAGEXGK.js → IFXQRR4J.js} +2 -2
- package/dist/calcite/{WFA3BQUO.js → IHKOYGE7.js} +2 -2
- package/dist/calcite/{NTBGD6QF.js → IHYXY3G5.js} +2 -2
- package/dist/calcite/{7PYUACLF.js → IJ267YYI.js} +1 -1
- package/dist/calcite/{NGCPS4MN.js → IJ3UUSWS.js} +2 -2
- package/dist/calcite/{G7GTLADM.js → IJNQO2GE.js} +2 -2
- package/dist/calcite/{VKBWVWOJ.js → IJQZ67AY.js} +2 -2
- package/dist/calcite/{HG6WHXLO.js → IR6RTS4B.js} +2 -2
- package/dist/calcite/{ML5XF54J.js → ISD6YPZN.js} +2 -2
- package/dist/calcite/{WBKJ2GZM.js → IWBFZA6Z.js} +2 -2
- package/dist/calcite/{ZU4G6AUP.js → IWHM5EXF.js} +2 -2
- package/dist/calcite/{65YB76KW.js → JA6KJTME.js} +2 -2
- package/dist/calcite/{4RLGJMEE.js → JDE2AP36.js} +2 -2
- package/dist/calcite/{RLLJEWY7.js → JDHJ2F2K.js} +2 -2
- package/dist/calcite/{IMUAENZ3.js → JERBSZG4.js} +2 -2
- package/dist/calcite/{UURLY4AS.js → JQVDKAPW.js} +2 -2
- package/dist/calcite/{KMXRIKUR.js → KELZZPPS.js} +2 -2
- package/dist/calcite/{EXOKKMDM.js → KGHDN4CL.js} +2 -2
- package/dist/calcite/{432VRR22.js → KH5HDNEE.js} +2 -2
- package/dist/calcite/{YRWZP7EG.js → KLMYVWC5.js} +2 -2
- package/dist/calcite/{J237BOPO.js → KSJOVFDL.js} +2 -2
- package/dist/calcite/{R7KFEXKC.js → KX5U36N6.js} +2 -2
- package/dist/calcite/{NNPVGQ3I.js → L2TPLBOG.js} +2 -2
- package/dist/calcite/{C5ELI2YU.js → L5IWXYMP.js} +2 -2
- package/dist/calcite/{VYJ3UQL4.js → LNRG6MB4.js} +1 -1
- package/dist/calcite/{5MZDRNSW.js → LQKACSG5.js} +2 -2
- package/dist/calcite/{RLPHE6BB.js → MIVIMUU7.js} +2 -2
- package/dist/calcite/{VWYQMRTA.js → MLQIHP3N.js} +1 -1
- package/dist/calcite/{4ZMJUGQQ.js → MMFMIEEY.js} +1 -1
- package/dist/calcite/{ZCDKSTJT.js → MSFQSK6W.js} +2 -2
- package/dist/calcite/{2DEWT4DT.js → N4O3D3JX.js} +2 -2
- package/dist/calcite/{OK3LZMBS.js → N635N52K.js} +2 -2
- package/dist/calcite/{YLXMJKFV.js → NB3EOQDI.js} +2 -2
- package/dist/calcite/{2OD7VERE.js → NEWQVDTI.js} +2 -2
- package/dist/calcite/{MTBW5BK5.js → NFWPONSG.js} +2 -2
- package/dist/calcite/{NH4HLN4F.js → NTMEQUR7.js} +2 -2
- package/dist/calcite/{FST6JDV5.js → NWZKTUOI.js} +2 -2
- package/dist/calcite/{E6XGQLBW.js → NZWL7S3Z.js} +2 -2
- package/dist/calcite/{NVIKDC2Z.js → O35H24WQ.js} +2 -2
- package/dist/calcite/{TZ3R46LV.js → O3IW3KF6.js} +2 -2
- package/dist/calcite/{N7N5II3C.js → O3PNB4TL.js} +2 -2
- package/dist/calcite/{LYEITIAX.js → OC372PQE.js} +2 -2
- package/dist/calcite/{FZN6WWVE.js → OKKFQESN.js} +2 -2
- package/dist/calcite/{ZBVIGKZG.js → OQOTNXZ4.js} +2 -2
- package/dist/calcite/{PT635UIY.js → P4XE47UL.js} +2 -2
- package/dist/calcite/{22THXK6L.js → P5W3RQYC.js} +2 -2
- package/dist/calcite/{MKWS4P2F.js → PGWHI2NW.js} +2 -2
- package/dist/calcite/{7LVSWMXK.js → Q23IJAYI.js} +1 -1
- package/dist/calcite/{LUJ5UWCG.js → Q4MSQTOI.js} +2 -2
- package/dist/calcite/{HPVCFRQR.js → QMQG4AUZ.js} +2 -2
- package/dist/calcite/{TRCFC72P.js → QTAHC7UN.js} +2 -2
- package/dist/calcite/{6DSI2GEC.js → QZSUWHJS.js} +2 -2
- package/dist/calcite/{MVHSOPKG.js → R6E6GSE3.js} +2 -2
- package/dist/calcite/{MXYD22HO.js → R6EDIIC4.js} +1 -1
- package/dist/calcite/{TSGVXM2C.js → RANKPFKS.js} +2 -2
- package/dist/calcite/{DJYBOOW5.js → RCL5WCEC.js} +2 -2
- package/dist/calcite/{QITLMJOB.js → RCWVLTTY.js} +2 -2
- package/dist/calcite/{L3HLZRS2.js → RGC54VDR.js} +1 -1
- package/dist/calcite/{YKJZMW6L.js → RIK26BQQ.js} +1 -1
- package/dist/calcite/{3LHVIOXM.js → RPZUNW43.js} +2 -2
- package/dist/calcite/{M37HOJZH.js → RQAHRGNE.js} +2 -2
- package/dist/calcite/{DB2SNSEO.js → RXA6FLRT.js} +2 -2
- package/dist/calcite/{OOV3EJLI.js → RXAPECBI.js} +2 -2
- package/dist/calcite/{UBRHBUED.js → SHM34JEW.js} +2 -2
- package/dist/calcite/{F4M2Z3DQ.js → SIT6OTCT.js} +2 -2
- package/dist/calcite/{5C3SFZFM.js → SR6SSELH.js} +2 -2
- package/dist/calcite/{PVVU3VMN.js → SRRIQ4RS.js} +2 -2
- package/dist/calcite/{LUOBUYF5.js → SVFQ6VON.js} +2 -2
- package/dist/calcite/{PJORDRLI.js → T52JVSF6.js} +2 -2
- package/dist/calcite/{IIDQO42S.js → T5P6UT47.js} +2 -2
- package/dist/calcite/{CVQYID4P.js → TCGTUQYV.js} +2 -2
- package/dist/calcite/{UXVRXVDB.js → THYG4URE.js} +2 -2
- package/dist/calcite/{XQK7CCLK.js → TKRJFUIC.js} +2 -2
- package/dist/calcite/{U6V2LILR.js → TLYINRRM.js} +2 -2
- package/dist/calcite/{I4TMFUOU.js → TNEQ5FEB.js} +2 -2
- package/dist/calcite/{QPFO57TE.js → TP2RRRPA.js} +2 -2
- package/dist/calcite/{VJFYVQPF.js → TZYJK5SH.js} +2 -2
- package/dist/calcite/{GCUT7RUP.js → U662IHND.js} +2 -2
- package/dist/calcite/{XEK4QIYP.js → U6MJXCTZ.js} +2 -2
- package/dist/calcite/{SNMSX2BS.js → UHKCERQ6.js} +2 -2
- package/dist/calcite/{767NEMHU.js → UNZAXMLT.js} +2 -2
- package/dist/calcite/{KS6GRUUG.js → UQUFP2IT.js} +1 -1
- package/dist/calcite/{TKZNHBT3.js → UVI52JRO.js} +2 -2
- package/dist/calcite/{GZCSFEEZ.js → VDYEAONL.js} +2 -2
- package/dist/calcite/{5PQBR2JB.js → VLAJTO7X.js} +2 -2
- package/dist/calcite/{BZYRHOFM.js → VPDPGEQQ.js} +2 -2
- package/dist/calcite/{MFX34R7R.js → VTVGHSNO.js} +2 -2
- package/dist/calcite/{KRS4TQ5O.js → VTYKXAXJ.js} +2 -2
- package/dist/calcite/{CVIHFKGX.js → VWK6O3HM.js} +2 -2
- package/dist/calcite/{X36WV264.js → VYMV5ZES.js} +2 -2
- package/dist/calcite/{PE22FR6N.js → W2LZ5B57.js} +2 -2
- package/dist/calcite/{VK47PGHN.js → WJAE4RLH.js} +2 -2
- package/dist/calcite/{KMJ2CLIV.js → WLF67MO2.js} +2 -2
- package/dist/calcite/{RWVLSL54.js → WTOOHKXX.js} +2 -2
- package/dist/calcite/{7EZQZXX4.js → WTQHR6BF.js} +2 -2
- package/dist/calcite/{PMDGDTAN.js → WXPAU4I4.js} +2 -2
- package/dist/calcite/{4FCTXGWN.js → X5XSHMIS.js} +2 -2
- package/dist/calcite/{MVMV75OW.js → XAWFVIG4.js} +2 -2
- package/dist/calcite/{E7FMB53D.js → XDKTOSBX.js} +2 -2
- package/dist/calcite/{CIIVUULP.js → XMYYWT6S.js} +2 -2
- package/dist/calcite/{RLARWVMJ.js → XW3X4IBO.js} +2 -2
- package/dist/calcite/{BYN7DCY7.js → Y3UMNEDQ.js} +2 -2
- package/dist/calcite/{NMMUV6O7.js → YCICYLDH.js} +2 -2
- package/dist/calcite/{KQHYBQQV.js → YFJ5VQTV.js} +2 -2
- package/dist/calcite/{HRHR2I62.js → YHJRQPZQ.js} +2 -2
- package/dist/calcite/{RSDY7NWN.js → YMA3ALU3.js} +1 -1
- package/dist/calcite/{XGI5TJLF.js → YMVYXAVG.js} +2 -2
- package/dist/calcite/{MUTPH5HT.js → YPHSUHHI.js} +2 -2
- package/dist/calcite/{MKLU72BZ.js → YPI2PYPW.js} +2 -2
- package/dist/calcite/{YC2HG6IW.js → Z5TMGJT2.js} +1 -1
- package/dist/calcite/{SZLHCYZB.js → Z74DW3IN.js} +2 -2
- package/dist/calcite/{7FDKCYGQ.js → ZBDPBLE6.js} +2 -2
- package/dist/calcite/{GPDJBFNN.js → ZJB5V7C3.js} +1 -1
- package/dist/calcite/{DJPMETTS.js → ZKS7OC3Y.js} +2 -2
- package/dist/calcite/calcite.esm.js +2 -2
- package/dist/chunks/ExpandToggle.js +1 -1
- package/dist/chunks/FloatingArrow.js +1 -1
- package/dist/chunks/Heading.js +1 -1
- package/dist/chunks/Validation.js +1 -1
- package/dist/chunks/_commonjsHelpers.js +1 -1
- package/dist/chunks/array.js +1 -1
- package/dist/chunks/component.js +1 -1
- package/dist/chunks/core.js +1 -1
- package/dist/chunks/date.js +1 -1
- package/dist/chunks/dom.js +1 -1
- package/dist/chunks/dynamicClasses.js +1 -1
- package/dist/chunks/filter.js +1 -1
- package/dist/chunks/floating-ui.js +1 -1
- package/dist/chunks/focusTrapComponent.js +1 -1
- package/dist/chunks/form.js +1 -1
- package/dist/chunks/global.js +1 -1
- package/dist/chunks/guid.js +1 -1
- package/dist/chunks/input.js +1 -1
- package/dist/chunks/interactive.js +1 -1
- package/dist/chunks/key.js +1 -1
- package/dist/chunks/label.js +1 -1
- package/dist/chunks/loadable.js +1 -1
- package/dist/chunks/locale.js +1 -1
- package/dist/chunks/logger.js +1 -1
- package/dist/chunks/math.js +1 -1
- package/dist/chunks/observers.js +1 -1
- package/dist/chunks/openCloseComponent.js +1 -1
- package/dist/chunks/resources.js +1 -1
- package/dist/chunks/resources2.js +1 -1
- package/dist/chunks/resources3.js +1 -1
- package/dist/chunks/resources4.js +1 -1
- package/dist/chunks/resources5.js +1 -1
- package/dist/chunks/resources6.js +1 -1
- package/dist/chunks/resources7.js +1 -1
- package/dist/chunks/responsive.js +1 -1
- package/dist/chunks/runtime.js +2 -2
- package/dist/chunks/sortableComponent.js +1 -1
- package/dist/chunks/time.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utils.js +1 -1
- package/dist/chunks/utils2.js +1 -1
- package/dist/chunks/utils3.js +1 -1
- package/dist/chunks/utils4.js +1 -1
- package/dist/components/calcite-accordion/customElement.js +1 -1
- package/dist/components/calcite-accordion-item/customElement.js +1 -1
- package/dist/components/calcite-action/customElement.js +1 -1
- package/dist/components/calcite-action-bar/customElement.js +1 -1
- package/dist/components/calcite-action-group/customElement.js +1 -1
- package/dist/components/calcite-action-menu/customElement.js +1 -1
- package/dist/components/calcite-action-pad/customElement.js +1 -1
- package/dist/components/calcite-alert/customElement.js +1 -1
- package/dist/components/calcite-avatar/customElement.js +1 -1
- package/dist/components/calcite-block/customElement.js +1 -1
- package/dist/components/calcite-block-section/customElement.js +1 -1
- package/dist/components/calcite-button/customElement.js +1 -1
- package/dist/components/calcite-card/customElement.js +1 -1
- package/dist/components/calcite-card-group/customElement.js +1 -1
- package/dist/components/calcite-carousel/customElement.js +1 -1
- package/dist/components/calcite-carousel-item/customElement.js +1 -1
- package/dist/components/calcite-checkbox/customElement.js +1 -1
- package/dist/components/calcite-chip/customElement.js +1 -1
- package/dist/components/calcite-chip-group/customElement.js +1 -1
- package/dist/components/calcite-color-picker/customElement.js +1 -1
- package/dist/components/calcite-color-picker-hex-input/customElement.js +1 -1
- package/dist/components/calcite-color-picker-swatch/customElement.js +1 -1
- package/dist/components/calcite-combobox/customElement.js +1 -1
- package/dist/components/calcite-combobox-item/customElement.js +1 -1
- package/dist/components/calcite-combobox-item-group/customElement.js +1 -1
- package/dist/components/calcite-date-picker/customElement.js +1 -1
- package/dist/components/calcite-date-picker-day/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
- package/dist/components/calcite-dialog/customElement.js +2 -2
- package/dist/components/calcite-dropdown/customElement.js +1 -1
- package/dist/components/calcite-dropdown-group/customElement.js +1 -1
- package/dist/components/calcite-dropdown-item/customElement.js +1 -1
- package/dist/components/calcite-fab/customElement.js +1 -1
- package/dist/components/calcite-filter/customElement.js +1 -1
- package/dist/components/calcite-flow/customElement.js +1 -1
- package/dist/components/calcite-flow-item/customElement.js +1 -1
- package/dist/components/calcite-graph/customElement.js +1 -1
- package/dist/components/calcite-handle/customElement.js +1 -1
- package/dist/components/calcite-icon/customElement.js +1 -1
- package/dist/components/calcite-inline-editable/customElement.js +1 -1
- package/dist/components/calcite-input/customElement.js +1 -1
- package/dist/components/calcite-input-date-picker/customElement.js +1 -1
- package/dist/components/calcite-input-message/customElement.js +1 -1
- package/dist/components/calcite-input-number/customElement.js +1 -1
- package/dist/components/calcite-input-text/customElement.js +1 -1
- package/dist/components/calcite-input-time-picker/customElement.js +1 -1
- package/dist/components/calcite-input-time-zone/customElement.js +1 -1
- package/dist/components/calcite-label/customElement.js +1 -1
- package/dist/components/calcite-link/customElement.js +1 -1
- package/dist/components/calcite-list/customElement.js +1 -1
- package/dist/components/calcite-list-item/customElement.js +1 -1
- package/dist/components/calcite-list-item-group/customElement.js +1 -1
- package/dist/components/calcite-loader/customElement.js +1 -1
- package/dist/components/calcite-menu/customElement.js +1 -1
- package/dist/components/calcite-menu-item/customElement.js +1 -1
- package/dist/components/calcite-meter/customElement.js +1 -1
- package/dist/components/calcite-modal/customElement.js +1 -1
- package/dist/components/calcite-navigation/customElement.js +1 -1
- package/dist/components/calcite-navigation-logo/customElement.js +1 -1
- package/dist/components/calcite-navigation-user/customElement.js +1 -1
- package/dist/components/calcite-notice/customElement.js +1 -1
- package/dist/components/calcite-option/customElement.js +1 -1
- package/dist/components/calcite-option-group/customElement.js +1 -1
- package/dist/components/calcite-pagination/customElement.js +1 -1
- package/dist/components/calcite-panel/customElement.js +1 -1
- package/dist/components/calcite-popover/customElement.js +1 -1
- package/dist/components/calcite-progress/customElement.js +1 -1
- package/dist/components/calcite-radio-button/customElement.js +1 -1
- package/dist/components/calcite-radio-button-group/customElement.js +1 -1
- package/dist/components/calcite-rating/customElement.js +1 -1
- package/dist/components/calcite-scrim/customElement.js +1 -1
- package/dist/components/calcite-segmented-control/customElement.js +1 -1
- package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
- package/dist/components/calcite-select/customElement.js +1 -1
- package/dist/components/calcite-sheet/customElement.js +1 -1
- package/dist/components/calcite-shell/customElement.js +1 -1
- package/dist/components/calcite-shell-center-row/customElement.js +1 -1
- package/dist/components/calcite-shell-panel/customElement.js +1 -1
- package/dist/components/calcite-slider/customElement.js +1 -1
- package/dist/components/calcite-sort-handle/customElement.js +1 -1
- package/dist/components/calcite-sortable-list/customElement.js +1 -1
- package/dist/components/calcite-split-button/customElement.js +1 -1
- package/dist/components/calcite-stack/customElement.js +1 -1
- package/dist/components/calcite-stepper/customElement.js +1 -1
- package/dist/components/calcite-stepper-item/customElement.js +1 -1
- package/dist/components/calcite-switch/customElement.js +1 -1
- package/dist/components/calcite-tab/customElement.js +1 -1
- package/dist/components/calcite-tab-nav/customElement.js +1 -1
- package/dist/components/calcite-tab-title/customElement.js +1 -1
- package/dist/components/calcite-table/customElement.js +1 -1
- package/dist/components/calcite-table-cell/customElement.js +1 -1
- package/dist/components/calcite-table-header/customElement.js +1 -1
- package/dist/components/calcite-table-row/customElement.js +1 -1
- package/dist/components/calcite-tabs/customElement.js +1 -1
- package/dist/components/calcite-text-area/customElement.js +1 -1
- package/dist/components/calcite-tile/customElement.js +1 -1
- package/dist/components/calcite-tile-group/customElement.js +1 -1
- package/dist/components/calcite-tile-select/customElement.js +1 -1
- package/dist/components/calcite-tile-select-group/customElement.js +1 -1
- package/dist/components/calcite-time-picker/customElement.js +1 -1
- package/dist/components/calcite-tip/customElement.js +1 -1
- package/dist/components/calcite-tip-group/customElement.js +1 -1
- package/dist/components/calcite-tip-manager/customElement.js +1 -1
- package/dist/components/calcite-tooltip/customElement.js +1 -1
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.33
|
|
5
5
|
*/
|
|
6
|
-
import{b as z}from"./WLIEYVUM.js";import{b as I}from"./PE22FR6N.js";import"./T26XIUHV.js";import{a as v}from"./IIDQO42S.js";import"./MUTPH5HT.js";import{a as E,b as B}from"./RWVLSL54.js";import{a as s}from"./C3FAV6KN.js";import"./XQT3ARK7.js";import{a as H}from"./2DEWT4DT.js";import{n as k,u as d}from"./F4M2Z3DQ.js";import{a as C,b as S,d as w}from"./ZCDKSTJT.js";import"./7PYUACLF.js";import{A as i,M as y,a as n,e as u,w as $,y as r,z as x}from"./OQM7M4LD.js";var c={content:"content",toggle:"toggle",header:"header"},t={actionsEnd:"actions-end",button:"button",container:"container",content:"content",contentStart:"content-start",controlContainer:"control-container",description:"description",header:"header",headerContainer:"header-container",headerHasText:"header--has-text",heading:"heading",icon:"icon",iconStart:"icon--start",iconEnd:"icon--end",iconEndContainer:"icon-end-container",invalid:"invalid",statusIcon:"status-icon",summary:"summary",title:"title",toggle:"toggle",toggleIcon:"toggle-icon",valid:"valid"},h={actionsEnd:"actions-end",contentStart:"content-start",control:"control",headerMenuActions:"header-menu-actions",icon:"icon"},b={opened:"chevron-up",closed:"chevron-down",valid:"check-circle",invalid:"exclamation-mark-triangle"},F=$`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{--calcite-icon-size: 1rem;--calcite-spacing-eighth: .125rem;--calcite-spacing-quarter: .25rem;--calcite-spacing-half: .5rem;--calcite-spacing-three-quarters: .75rem;--calcite-spacing: 1rem;--calcite-spacing-plus-quarter: 1.25rem;--calcite-spacing-plus-half: 1.5rem;--calcite-spacing-double: 2rem;--calcite-menu-min-width: 10rem;--calcite-header-min-height: 3rem;--calcite-footer-min-height: 3rem}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-shrink:0;flex-grow:0;flex-direction:column;border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-color-border-3);padding:0;transition-property:margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-timing-function:cubic-bezier(.215,.44,.42,.88);flex-basis:auto;transition-duration:var(--calcite-animation-timing)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.header{margin:0;display:flex;align-content:space-between;align-items:center;fill:var(--calcite-color-text-2);color:var(--calcite-color-text-2)}.heading{margin:0;padding:0;font-weight:var(--calcite-font-weight-medium)}.header .heading{flex:1 1 auto;padding:.5rem}.header{justify-content:flex-start}.header--has-text{padding:var(--calcite-spacing-md)}.header,.toggle{grid-area:header}.header-container{display:grid;align-items:stretch;grid-template:auto/auto 1fr auto auto;grid-template-areas:"handle header control menu actions-end";grid-column:header-start/actions-end;grid-row:1/2}.content-start,.icon,.icon--start,.icon--end{margin-inline-end:var(--calcite-spacing-md)}.icon calcite-loader{margin-inline-end:var(--calcite-spacing-xxxs)}.icon--start,.icon--end{color:var(--calcite-color-text-3)}.actions-end{grid-area:actions-end}.toggle{margin:0;display:flex;cursor:pointer;flex-wrap:nowrap;align-items:center;justify-content:space-between;border-style:none;padding:0;font-family:var(--calcite-font-family);outline-color:transparent;text-align:initial;background-color:transparent}.toggle:hover{background-color:var(--calcite-color-foreground-2)}.toggle:focus{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}calcite-loader[inline]{grid-area:control;align-self:center}calcite-handle{grid-area:handle}.title{margin:0}.header .title .heading{padding:0;font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-medium);line-height:1.25;color:var(--calcite-color-text-2);transition-property:color;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);word-wrap:break-word;word-break:break-word}.description{margin-block-start:.125rem;padding:0;font-size:var(--calcite-font-size--2);line-height:1.375;color:var(--calcite-color-text-3);word-wrap:break-word;word-break:break-word}.icon{display:flex}.status-icon.valid{color:var(--calcite-color-status-success)}.status-icon.invalid{color:var(--calcite-color-status-danger)}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}.icon-end-container{display:flex;align-items:center;margin-inline-start:auto}.toggle-icon{align-self:center;justify-self:end;color:var(--calcite-color-text-3);transition-property:color;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);margin-inline-end:var(--calcite-spacing-md)}.toggle:hover .toggle-icon{color:var(--calcite-color-text-1)}.container{position:relative;display:flex;block-size:100%;flex-direction:column}.content{position:relative;min-block-size:0px;flex:1 1 0%}@keyframes in{0%{opacity:0}to{opacity:1}}.content{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;padding-block:var(--calcite-block-padding, var(--calcite-spacing-sm));padding-inline:var(--calcite-block-padding, var(--calcite-spacing-md))}.content-start{display:flex;align-items:center;color:var(--calcite-color-text-3)}.control-container{margin:0;display:flex;grid-area:control}calcite-action-menu{grid-area:menu}.actions-end{display:flex;align-items:stretch}:host([open]){margin-block:.5rem}:host([open]) .header .title .heading{color:var(--calcite-color-text-1)}:host([hidden]){display:none}[hidden]{display:none}`,f=class extends x{constructor(){super(...arguments),this.openTransitionProp="margin-top",this.hasContentStart=!1,this.hasControl=!1,this.hasEndActions=!1,this.hasIcon=!1,this.hasMenuActions=!1,this.collapsible=!1,this.disabled=!1,this.dragHandle=!1,this.loading=!1,this.menuPlacement=I,this.messages=H(),this.open=!1,this.overlayPositioning="absolute",this.calciteBlockBeforeClose=r({cancelable:!1}),this.calciteBlockBeforeOpen=r({cancelable:!1}),this.calciteBlockClose=r({cancelable:!1}),this.calciteBlockOpen=r({cancelable:!1}),this.calciteBlockToggle=r({cancelable:!1})}static{this.properties={hasContentStart:16,hasControl:16,hasEndActions:16,hasIcon:16,hasMenuActions:16,collapsible:7,description:1,disabled:7,dragHandle:7,heading:1,headingLevel:11,iconEnd:3,iconFlipRtl:3,iconStart:3,loading:7,label:1,menuFlipPlacements:0,menuPlacement:3,messageOverrides:0,open:7,overlayPositioning:3,status:3}}static{this.styles=F}async setFocus(){await w(this),k(this.el)}connectedCallback(){super.connectedCallback(),this.transitionEl=this.el}async load(){C(this),this.open&&v(this)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&v(this)}updated(){E(this)}loaded(){S(this)}onBeforeOpen(){this.calciteBlockBeforeOpen.emit()}onOpen(){this.calciteBlockOpen.emit()}onBeforeClose(){this.calciteBlockBeforeClose.emit()}onClose(){this.calciteBlockClose.emit()}onHeaderClick(){this.open=!this.open,this.calciteBlockToggle.emit()}controlSlotChangeHandler(e){this.hasControl=d(e)}menuActionsSlotChangeHandler(e){this.hasMenuActions=d(e)}iconSlotChangeHandler(e){this.hasIcon=d(e)}actionsEndSlotChangeHandler(e){this.hasEndActions=d(e)}handleContentStartSlotChange(e){this.hasContentStart=d(e)}renderScrim(){let{loading:e}=this,o=n`<slot></slot>`;return[e?n`<calcite-scrim .loading=${e}></calcite-scrim>`:null,o]}renderLoaderStatusIcon(){let{loading:e,messages:o,status:a}=this;return e?s("loader",n`<div class=${i(t.icon)}><calcite-loader inline .label=${o.loading}></calcite-loader></div>`):a?s("status-icon",n`<div class=${i(t.icon)}><calcite-icon class=${i({[t.statusIcon]:!0,[t.valid]:a=="valid",[t.invalid]:a=="invalid"})} .icon=${b[a]} scale=s></calcite-icon></div>`):s("icon-slot",n`<div class=${i(t.icon)} .hidden=${!this.hasIcon}>${s("icon-slot",n`<slot name=${h.icon} @slotchange=${this.iconSlotChangeHandler}></slot>`)}</div>`)}renderActionsEnd(){return n`<div class=${i(t.actionsEnd)} .hidden=${!this.hasEndActions}><slot name=${h.actionsEnd} @slotchange=${this.actionsEndSlotChangeHandler}></slot></div>`}renderContentStart(){return n`<div class=${i(t.contentStart)} .hidden=${!this.hasContentStart}><slot name=${h.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot></div>`}renderTitle(){let{heading:e,headingLevel:o,description:a}=this;return e||a?n`<div class=${i(t.title)}>${z({class:t.heading,level:o,children:e})}${a?n`<div class=${i(t.description)}>${a}</div>`:null}</div>`:null}renderIcon(e){let{iconFlipRtl:o}=this,a=o==="both"||e==="start"?o==="start":o==="end",l=e==="start"?this.iconStart:this.iconEnd,g=e==="start"?t.iconStart:t.iconEnd;if(l)return s(l,n`<calcite-icon class=${i(g)} .flipRtl=${a} .icon=${l} scale=s></calcite-icon>`)}render(){let{collapsible:e,loading:o,open:a,label:l,heading:g,messages:m,description:A,menuFlipPlacements:P,menuPlacement:M}=this,O=a?m.collapse:m.expand,p=n`<header class=${i({[t.header]:!0,[t.headerHasText]:!!(g||A)})} id=${c.header}>${this.renderIcon("start")}${this.renderContentStart()}${this.renderLoaderStatusIcon()}${this.renderTitle()}</header>`,T=a?b.opened:b.closed,L=n`<div class=${i(t.headerContainer)}>${this.dragHandle?n`<calcite-handle .label=${g||l}></calcite-handle>`:null}${e?n`<button aria-controls=${c.content} aria-describedby=${c.header} .ariaExpanded=${e?a:null} class=${i(t.toggle)} id=${c.toggle} @click=${this.onHeaderClick} title=${O??u}>${p}<div class=${i(t.iconEndContainer)}>${this.renderIcon("end")}<calcite-icon class=${i(t.toggleIcon)} .icon=${T} scale=s></calcite-icon></div></button>`:this.iconEnd?n`<div>${p}<div class=${i(t.iconEndContainer)}>${this.renderIcon("end")}</div></div>`:p}<div aria-labelledby=${c.header} class=${i(t.controlContainer)} .hidden=${!this.hasControl}><slot name=${h.control} @slotchange=${this.controlSlotChangeHandler}></slot></div><calcite-action-menu .flipPlacements=${P??["top","bottom"]} .hidden=${!this.hasMenuActions} .label=${m.options} .overlayPositioning=${this.overlayPositioning} .placement=${M}><slot name=${h.headerMenuActions} @slotchange=${this.menuActionsSlotChangeHandler}></slot></calcite-action-menu>${this.renderActionsEnd()}</div>`;return B({disabled:this.disabled,children:n`<article aria-label=${l??u} .ariaBusy=${o} class=${i({[t.container]:!0})}>${L}<section aria-labelledby=${c.toggle} class=${i(t.content)} .hidden=${!a} id=${c.content}>${this.renderScrim()}</section></article>`})}};y("calcite-block",f);export{f as Block};
|
|
6
|
+
import{b as z}from"./GI63MSAL.js";import{b as I}from"./W2LZ5B57.js";import"./4FMY2PMX.js";import{a as v}from"./T5P6UT47.js";import"./YPHSUHHI.js";import{a as E,b as B}from"./WTOOHKXX.js";import{a as s}from"./4HJ5FBOB.js";import"./2I7TXBOJ.js";import{a as H}from"./N4O3D3JX.js";import{n as k,u as d}from"./SIT6OTCT.js";import{a as C,b as S,d as w}from"./MSFQSK6W.js";import"./IJ267YYI.js";import{A as i,M as y,a as n,e as u,w as $,y as r,z as x}from"./4RCOCFTP.js";var c={content:"content",toggle:"toggle",header:"header"},t={actionsEnd:"actions-end",button:"button",container:"container",content:"content",contentStart:"content-start",controlContainer:"control-container",description:"description",header:"header",headerContainer:"header-container",headerHasText:"header--has-text",heading:"heading",icon:"icon",iconStart:"icon--start",iconEnd:"icon--end",iconEndContainer:"icon-end-container",invalid:"invalid",statusIcon:"status-icon",summary:"summary",title:"title",toggle:"toggle",toggleIcon:"toggle-icon",valid:"valid"},h={actionsEnd:"actions-end",contentStart:"content-start",control:"control",headerMenuActions:"header-menu-actions",icon:"icon"},b={opened:"chevron-up",closed:"chevron-down",valid:"check-circle",invalid:"exclamation-mark-triangle"},F=$`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{--calcite-icon-size: 1rem;--calcite-spacing-eighth: .125rem;--calcite-spacing-quarter: .25rem;--calcite-spacing-half: .5rem;--calcite-spacing-three-quarters: .75rem;--calcite-spacing: 1rem;--calcite-spacing-plus-quarter: 1.25rem;--calcite-spacing-plus-half: 1.5rem;--calcite-spacing-double: 2rem;--calcite-menu-min-width: 10rem;--calcite-header-min-height: 3rem;--calcite-footer-min-height: 3rem}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-shrink:0;flex-grow:0;flex-direction:column;border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-color-border-3);padding:0;transition-property:margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-timing-function:cubic-bezier(.215,.44,.42,.88);flex-basis:auto;transition-duration:var(--calcite-animation-timing)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.header{margin:0;display:flex;align-content:space-between;align-items:center;fill:var(--calcite-color-text-2);color:var(--calcite-color-text-2)}.heading{margin:0;padding:0;font-weight:var(--calcite-font-weight-medium)}.header .heading{flex:1 1 auto;padding:.5rem}.header{justify-content:flex-start}.header--has-text{padding:var(--calcite-spacing-md)}.header,.toggle{grid-area:header}.header-container{display:grid;align-items:stretch;grid-template:auto/auto 1fr auto auto;grid-template-areas:"handle header control menu actions-end";grid-column:header-start/actions-end;grid-row:1/2}.content-start,.icon,.icon--start,.icon--end{margin-inline-end:var(--calcite-spacing-md)}.icon calcite-loader{margin-inline-end:var(--calcite-spacing-xxxs)}.icon--start,.icon--end{color:var(--calcite-color-text-3)}.actions-end{grid-area:actions-end}.toggle{margin:0;display:flex;cursor:pointer;flex-wrap:nowrap;align-items:center;justify-content:space-between;border-style:none;padding:0;font-family:var(--calcite-font-family);outline-color:transparent;text-align:initial;background-color:transparent}.toggle:hover{background-color:var(--calcite-color-foreground-2)}.toggle:focus{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}calcite-loader[inline]{grid-area:control;align-self:center}calcite-handle{grid-area:handle}.title{margin:0}.header .title .heading{padding:0;font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-medium);line-height:1.25;color:var(--calcite-color-text-2);transition-property:color;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);word-wrap:break-word;word-break:break-word}.description{margin-block-start:.125rem;padding:0;font-size:var(--calcite-font-size--2);line-height:1.375;color:var(--calcite-color-text-3);word-wrap:break-word;word-break:break-word}.icon{display:flex}.status-icon.valid{color:var(--calcite-color-status-success)}.status-icon.invalid{color:var(--calcite-color-status-danger)}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}.icon-end-container{display:flex;align-items:center;margin-inline-start:auto}.toggle-icon{align-self:center;justify-self:end;color:var(--calcite-color-text-3);transition-property:color;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);margin-inline-end:var(--calcite-spacing-md)}.toggle:hover .toggle-icon{color:var(--calcite-color-text-1)}.container{position:relative;display:flex;block-size:100%;flex-direction:column}.content{position:relative;min-block-size:0px;flex:1 1 0%}@keyframes in{0%{opacity:0}to{opacity:1}}.content{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;padding-block:var(--calcite-block-padding, var(--calcite-spacing-sm));padding-inline:var(--calcite-block-padding, var(--calcite-spacing-md))}.content-start{display:flex;align-items:center;color:var(--calcite-color-text-3)}.control-container{margin:0;display:flex;grid-area:control}calcite-action-menu{grid-area:menu}.actions-end{display:flex;align-items:stretch}:host([open]){margin-block:.5rem}:host([open]) .header .title .heading{color:var(--calcite-color-text-1)}:host([hidden]){display:none}[hidden]{display:none}`,f=class extends x{constructor(){super(...arguments),this.openTransitionProp="margin-top",this.hasContentStart=!1,this.hasControl=!1,this.hasEndActions=!1,this.hasIcon=!1,this.hasMenuActions=!1,this.collapsible=!1,this.disabled=!1,this.dragHandle=!1,this.loading=!1,this.menuPlacement=I,this.messages=H(),this.open=!1,this.overlayPositioning="absolute",this.calciteBlockBeforeClose=r({cancelable:!1}),this.calciteBlockBeforeOpen=r({cancelable:!1}),this.calciteBlockClose=r({cancelable:!1}),this.calciteBlockOpen=r({cancelable:!1}),this.calciteBlockToggle=r({cancelable:!1})}static{this.properties={hasContentStart:16,hasControl:16,hasEndActions:16,hasIcon:16,hasMenuActions:16,collapsible:7,description:1,disabled:7,dragHandle:7,heading:1,headingLevel:11,iconEnd:3,iconFlipRtl:3,iconStart:3,loading:7,label:1,menuFlipPlacements:0,menuPlacement:3,messageOverrides:0,open:7,overlayPositioning:3,status:3}}static{this.styles=F}async setFocus(){await w(this),k(this.el)}connectedCallback(){super.connectedCallback(),this.transitionEl=this.el}async load(){C(this),this.open&&v(this)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&v(this)}updated(){E(this)}loaded(){S(this)}onBeforeOpen(){this.calciteBlockBeforeOpen.emit()}onOpen(){this.calciteBlockOpen.emit()}onBeforeClose(){this.calciteBlockBeforeClose.emit()}onClose(){this.calciteBlockClose.emit()}onHeaderClick(){this.open=!this.open,this.calciteBlockToggle.emit()}controlSlotChangeHandler(e){this.hasControl=d(e)}menuActionsSlotChangeHandler(e){this.hasMenuActions=d(e)}iconSlotChangeHandler(e){this.hasIcon=d(e)}actionsEndSlotChangeHandler(e){this.hasEndActions=d(e)}handleContentStartSlotChange(e){this.hasContentStart=d(e)}renderScrim(){let{loading:e}=this,o=n`<slot></slot>`;return[e?n`<calcite-scrim .loading=${e}></calcite-scrim>`:null,o]}renderLoaderStatusIcon(){let{loading:e,messages:o,status:a}=this;return e?s("loader",n`<div class=${i(t.icon)}><calcite-loader inline .label=${o.loading}></calcite-loader></div>`):a?s("status-icon",n`<div class=${i(t.icon)}><calcite-icon class=${i({[t.statusIcon]:!0,[t.valid]:a=="valid",[t.invalid]:a=="invalid"})} .icon=${b[a]} scale=s></calcite-icon></div>`):s("icon-slot",n`<div class=${i(t.icon)} .hidden=${!this.hasIcon}>${s("icon-slot",n`<slot name=${h.icon} @slotchange=${this.iconSlotChangeHandler}></slot>`)}</div>`)}renderActionsEnd(){return n`<div class=${i(t.actionsEnd)} .hidden=${!this.hasEndActions}><slot name=${h.actionsEnd} @slotchange=${this.actionsEndSlotChangeHandler}></slot></div>`}renderContentStart(){return n`<div class=${i(t.contentStart)} .hidden=${!this.hasContentStart}><slot name=${h.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot></div>`}renderTitle(){let{heading:e,headingLevel:o,description:a}=this;return e||a?n`<div class=${i(t.title)}>${z({class:t.heading,level:o,children:e})}${a?n`<div class=${i(t.description)}>${a}</div>`:null}</div>`:null}renderIcon(e){let{iconFlipRtl:o}=this,a=o==="both"||e==="start"?o==="start":o==="end",l=e==="start"?this.iconStart:this.iconEnd,g=e==="start"?t.iconStart:t.iconEnd;if(l)return s(l,n`<calcite-icon class=${i(g)} .flipRtl=${a} .icon=${l} scale=s></calcite-icon>`)}render(){let{collapsible:e,loading:o,open:a,label:l,heading:g,messages:m,description:A,menuFlipPlacements:P,menuPlacement:M}=this,O=a?m.collapse:m.expand,p=n`<header class=${i({[t.header]:!0,[t.headerHasText]:!!(g||A)})} id=${c.header}>${this.renderIcon("start")}${this.renderContentStart()}${this.renderLoaderStatusIcon()}${this.renderTitle()}</header>`,T=a?b.opened:b.closed,L=n`<div class=${i(t.headerContainer)}>${this.dragHandle?n`<calcite-handle .label=${g||l}></calcite-handle>`:null}${e?n`<button aria-controls=${c.content} aria-describedby=${c.header} .ariaExpanded=${e?a:null} class=${i(t.toggle)} id=${c.toggle} @click=${this.onHeaderClick} title=${O??u}>${p}<div class=${i(t.iconEndContainer)}>${this.renderIcon("end")}<calcite-icon class=${i(t.toggleIcon)} .icon=${T} scale=s></calcite-icon></div></button>`:this.iconEnd?n`<div>${p}<div class=${i(t.iconEndContainer)}>${this.renderIcon("end")}</div></div>`:p}<div aria-labelledby=${c.header} class=${i(t.controlContainer)} .hidden=${!this.hasControl}><slot name=${h.control} @slotchange=${this.controlSlotChangeHandler}></slot></div><calcite-action-menu .flipPlacements=${P??["top","bottom"]} .hidden=${!this.hasMenuActions} .label=${m.options} .overlayPositioning=${this.overlayPositioning} .placement=${M}><slot name=${h.headerMenuActions} @slotchange=${this.menuActionsSlotChangeHandler}></slot></calcite-action-menu>${this.renderActionsEnd()}</div>`;return B({disabled:this.disabled,children:n`<article aria-label=${l??u} .ariaBusy=${o} class=${i({[t.container]:!0})}>${L}<section aria-labelledby=${c.toggle} class=${i(t.content)} .hidden=${!a} id=${c.content}>${this.renderScrim()}</section></article>`})}};y("calcite-block",f);export{f as Block};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.33
|
|
5
5
|
*/
|
|
6
|
-
import{d as pe}from"./MXYD22HO.js";import{a as ue}from"./LUJ5UWCG.js";import{a as me}from"./432VRR22.js";import{a as be,b as ge,c as fe,d,e as D,g as H,h as ve,i as T,k as v,l as $}from"./KMVX7O74.js";import{a as Z,c as A,d as ee,e as te,f as ie,g as C,h as se}from"./PE22FR6N.js";import"./T26XIUHV.js";import{a as k}from"./IIDQO42S.js";import{a as le,c as ae,e as oe,f as ne,h as ce}from"./CQ6NWQF3.js";import{c as re,d as he,e as de}from"./TTSEPZSJ.js";import{a as K,b as Q}from"./RWVLSL54.js";import{a as u}from"./C3FAV6KN.js";import{a as w}from"./6FZRZAH5.js";import"./UURLY4AS.js";import{a as E,b as Y}from"./XQT3ARK7.js";import{a as S}from"./V4666GZB.js";import{a as X}from"./2DEWT4DT.js";import{a as G,b as g}from"./54QYFZMH.js";import{f as I,i as _}from"./F4M2Z3DQ.js";import{a as q,b as j,c as N,d as J}from"./ZCDKSTJT.js";import{a as W}from"./7PYUACLF.js";import{A as h,E as R,G as B,M as U,a as r,e as m,w as O,x as P,y as b,z as L}from"./OQM7M4LD.js";var ye={button:"x-button"},ke=({disabled:z,key:e,label:t,scale:i})=>u(e,r`<button .ariaLabel=${t} class=${h(ye.button)} .disabled=${z} tabindex=-1 type=button><calcite-icon icon=x .scale=${w(i)}></calcite-icon></button>`),Ae=O`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]) .x-button{inline-size:1rem;block-size:1rem}:host([scale=m]) .x-button{inline-size:1.5rem;block-size:1.5rem}:host([scale=l]) .x-button{inline-size:2rem;block-size:2rem}.x-button{margin:0;display:flex;cursor:pointer;appearance:none;align-content:center;align-items:center;justify-content:center;align-self:center;border-width:2px;background-color:transparent;color:var(--calcite-color-text-3);outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-radius:50%;border-color:transparent;background-color:var(--calcite-color-foreground-2)}.x-button:active,.x-button:hover{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-3)}.x-button:active{border-style:solid;border-color:var(--calcite-color-brand)}.x-button calcite-icon{color:inherit}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-combobox-item-spacing-unit-l: .5rem;--calcite-combobox-item-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) }:host([scale=s]) .x-button{margin-inline:.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-combobox-item-spacing-unit-l: .75rem;--calcite-combobox-item-spacing-unit-s: .5rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) }:host([scale=m]) .x-button{margin-inline-end:.75rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-combobox-item-spacing-unit-l: 1rem;--calcite-combobox-item-spacing-unit-s: .75rem;--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(.625rem - 1px) }:host([scale=l]) .x-button{margin-inline-end:1rem}.wrapper{display:flex;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1);outline-color:transparent;padding-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.wrapper:hover .icon{color:var(--calcite-color-text-1)}:host(:focus-within) .wrapper,.wrapper--active{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:2px solid var(--calcite-color-status-danger);outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;gap:var(--calcite-combobox-item-spacing-unit-s);margin-inline-end:var(--calcite-combobox-item-spacing-unit-s)}.grid-input.selection-display-fit,.grid-input.selection-display-single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-combobox-item-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;inline-size:0px;min-inline-size:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.placeholder-icon{color:var(--calcite-color-text-3)}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-inline-size:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-color-text-3)}.floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown);display:none;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);transition-property:inset,left,opacity;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@media (forced-colors: active){.wrapper,.floating-ui-container{border:1px solid canvasText}}.screen-readers-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.list-container{max-block-size:45vh;overflow-y:auto;background-color:var(--calcite-color-foreground-1);inline-size:var(--calcite-dropdown-width, 100%)}.list{margin:0;display:block;padding:0}.list--hide{block-size:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);max-inline-size:100%}.chip--active{background-color:var(--calcite-color-foreground-3)}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}::slotted(calcite-combobox-item-group:not(:first-child)){padding-block-start:var(--calcite-combobox-item-spacing-unit-l)}`,xe="combobox-item-",Ie="combobox-chip-",Ce="combobox-label-",F="combobox-listbox-",$e="combobox-input-",M=class extends L{constructor(){super(),this.internalComboboxChangeEvent=()=>{this.calciteComboboxChange.emit()},this.emitComboboxChange=E(this.internalComboboxChangeEvent,0),this.filterItems=(()=>{let e=(t,i)=>t&&i.some(({el:s})=>t===s);return E((t,i=!1,s=!0)=>{let l=me([...this.data,...this.groupData],t,["description","label","metadata","shortHeading"]),a=this.getItemsAndGroups(),o=t==="";a.forEach(n=>{if(o){n.hidden=!1;return}let c=!e(n,l);n.hidden=c;let[p,x]=n.ancestors;(e(p,l)||e(x,l))&&(n.hidden=!1),c||n.ancestors.forEach(f=>f.hidden=!1)}),this.filterTextMatchPattern=this.filterText&&new RegExp(`(${Y(this.filterText)})`,"i"),this.filteredItems=this.getFilteredItems(),this.filteredItems.forEach(n=>{n.filterTextMatchPattern=this.filterTextMatchPattern}),i&&(this.open=this.filterText.trim().length>0&&this.filteredItems.length>0),s&&this.calciteComboboxFilterChange.emit()},B.filter)})(),this._filterText="",this.getSelectedItems=()=>{if(!this.isMulti()){let e=this.items.find(({selected:t})=>t);return e?[e]:[]}return this.items.filter(e=>e.selected&&(this.selectionMode!=="ancestors"||!T(e))).sort((e,t)=>{let i=this.selectedItems.indexOf(e),s=this.selectedItems.indexOf(t);return i>-1&&s>-1?i-s:s-i})},this.guid=W(),this.ignoreSelectedEventsFlag=!1,this.inputHeight=0,this.internalValueChangeFlag=!1,this.mutationObserver=S("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.openTransitionProp="opacity",this.placement=Z,this.resizeObserver=S("resize",()=>{this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}),this.textInput=G(),this._value=null,this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.groupItems=[],this.items=[],this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.clearDisabled=!1,this.disabled=!1,this.filteredItems=[],this.maxItems=0,this.messages=X(),this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.readOnly=!1,this.required=!1,this.scale="m",this.selectedItems=[],this.selectionDisplay="all",this.selectionMode="multiple",this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.calciteComboboxBeforeClose=b({cancelable:!1}),this.calciteComboboxBeforeOpen=b({cancelable:!1}),this.calciteComboboxChange=b({cancelable:!1}),this.calciteComboboxChipClose=b({cancelable:!1}),this.calciteComboboxClose=b({cancelable:!1}),this.calciteComboboxFilterChange=b({cancelable:!1}),this.calciteComboboxOpen=b({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteComboboxItemChange",this.calciteComboboxItemChangeHandler),this.listen("calciteInternalComboboxItemChange",this.calciteInternalComboboxItemChangeHandler),this.listen("click",this.comboboxFocusHandler)}static{this.properties={activeChipIndex:16,activeDescendant:16,activeItemIndex:16,compactSelectionDisplay:16,groupItems:16,items:16,needsIcon:16,selectedHiddenChipsCount:16,selectedVisibleChipsCount:16,allowCustomValues:7,clearDisabled:7,disabled:7,filterText:3,filteredItems:0,flipPlacements:0,form:3,label:1,maxItems:11,messageOverrides:0,name:3,open:7,overlayPositioning:3,placeholder:1,placeholderIcon:3,placeholderIconFlipRtl:7,readOnly:7,required:7,scale:3,selectedItems:0,selectionDisplay:3,selectionMode:3,status:3,validationIcon:[3,{converter:R}],validationMessage:1,validity:0,value:1}}static{this.styles=Ae}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:i,open:s}=this,l=i[0],a=l?.icon,o=v(t);return!s&&l?!!a&&o:!!e&&(!l||o)}get filterText(){return this._filterText}set filterText(e){let t=this._filterText;e!==t&&(this._filterText=e,this.filterTextChange(e))}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueHandler(e))}async reposition(e=!1){let{floatingEl:t,referenceEl:i,placement:s,overlayPositioning:l,filteredFlipPlacements:a}=this;return te(this,{floatingEl:t,referenceEl:i,overlayPositioning:l,placement:s,flipPlacements:a,type:"menu"},e)}async setFocus(){await J(this),this.textInput.value?.focus(),this.activeChipIndex=-1,this.activeItemIndex=-1}connectedCallback(){super.connectedCallback(),re(this),ae(this),this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.updateItems(),this.setFilteredPlacements(),this.open&&(this.openHandler(),k(this)),C(this)}async load(){q(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("maxItems")&&(this.hasUpdated||this.maxItems!==0)&&this.setMaxScrollerHeight(),e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")&&this.reposition(!0),(e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="multiple")||e.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler(),e.has("selectedItems")&&(this.hasUpdated||this.selectedItems?.length>0)&&this.selectedItemsHandler()}updated(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),K(this),this.hasUpdated||this.refreshSelectionDisplay()}loaded(){ne(this,this.getValue()),C(this),j(this)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),he(this),oe(this),se(this)}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){k(this),!this.disabled&&this.setMaxScrollerHeight()}handleDisabledChange(e){e||(this.open=!1)}valueHandler(e){if(!this.internalValueChangeFlag){let t=this.getItems();Array.isArray(e)?t.forEach(i=>i.selected=e.includes(i.value)):e?t.forEach(i=>i.selected=e===i.value):t.forEach(i=>i.selected=!1),this.updateItems()}}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1}async documentClickHandler(e){this.disabled||e.composedPath().includes(this.el)||(await this.componentOnReady(),!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1)),this.allowCustomValues&&this.filterText.trim().length&&this.addCustomChip(this.filterText),this.open=!1)}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,i=this.filteredItems.indexOf(t);this.updateActiveItemIndex(i),this.toggleSelection(t,t.selected)}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.updateItems()}clearValue(){this.ignoreSelectedEventsFlag=!0,this.items.forEach(e=>e.selected=!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=[],this.emitComboboxChange(),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}clearInputValue(){this.textInput.value.value="",this.filterText=""}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?ee(t,e):null}getValue(){let e=this.selectedItems.map(t=>t?.value?.toString());return e?.length?e.length>1?e:e[0]:""}comboboxInViewport(){let e=this.el.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.right<=(window.innerWidth||document.documentElement.clientWidth)&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)}keyDownHandler(e){if(this.readOnly)return;let{key:t}=e;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):this.open?(this.open=!1,e.preventDefault()):!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1));break;case"ArrowLeft":(this.activeChipIndex!==-1||this.textInput.value.selectionStart===0)&&(this.previousChip(),e.preventDefault());break;case"ArrowRight":this.activeChipIndex!==-1&&(this.nextChip(),e.preventDefault());break;case"ArrowUp":this.filteredItems.length&&(e.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.comboboxInViewport()||this.el.scrollIntoView());break;case"ArrowDown":this.filteredItems.length&&(e.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":!this.textInput.value.value&&!e.defaultPrevented&&(this.open||(this.open=!0,this.shiftActiveItemIndex(1)),e.preventDefault());break;case"Home":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":!this.clearDisabled&&!this.open&&this.clearValue(),this.open=!1,e.preventDefault();break;case"Enter":if(this.open&&this.activeItemIndex>-1){let i=this.filteredItems[this.activeItemIndex];this.toggleSelection(i,!i.selected),e.preventDefault()}else this.activeChipIndex>-1?(this.removeActiveChip(),e.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):e.defaultPrevented||le(this)&&e.preventDefault();break;case"Delete":case"Backspace":{if(this.selectionDisplay==="single"||this.selectionDisplay==="fit"&&this.selectedHiddenChipsCount>0)return;this.activeChipIndex>-1?(e.preventDefault(),this.removeActiveChip()):!this.filterText&&this.isMulti()&&(e.preventDefault(),this.removeLastChip());break}}}onBeforeOpen(){this.scrollToActiveItem(),this.calciteComboboxBeforeOpen.emit()}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),ie(this)}async setMaxScrollerHeight(){let{listContainerEl:e,open:t,referenceEl:i}=this;if(!e||!t)return;await this.reposition(!0);let s=this.getMaxScrollerHeight();e.style.maxHeight=s>0?`${s}px`:"",e.style.minWidth=`${i.clientWidth}px`,await this.reposition(!0)}calciteChipCloseHandler(e){this.open=!1;let t=this.items.find(i=>i===e);t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()}clickHandler(e){if(this.readOnly)return;let t=e.composedPath();if(t.some(i=>i.tagName==="CALCITE-CHIP")){this.open=!1,e.preventDefault();return}if(t.some(i=>i.classList?.contains(ye.button))){this.clearValue(),e.preventDefault();return}this.open=!this.open,this.ensureRecentSelectedItemIsActive()}ensureRecentSelectedItemIsActive(){let{selectedItems:e}=this,t=e.length===0?0:this.items.indexOf(e[e.length-1]);this.updateActiveItemIndex(t)}hideChip(e){e.classList.add(d.chipInvisible)}showChip(e){e.classList.remove(d.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:i}){e.forEach(s=>{if(!s.selected)this.hideChip(s);else{let l=I(s);if(l&&l<t){t-=l+i,this.showChip(s);return}}this.hideChip(s)})}async refreshSelectionDisplay(){if(await N(this),v(this.selectionMode)||!this.textInput.value)return;let{allSelectedIndicatorChipEl:e,chipContainerEl:t,selectionDisplay:i,placeholder:s,selectedIndicatorChipEl:l,textInput:{value:a}}=this,o=parseInt(getComputedStyle(t).gap.replace("px","")),n=I(t),{fontSize:c,fontFamily:p}=getComputedStyle(a),x=(_(s,`${c} ${p}`)||parseInt(pe))+o,f=I(e),y=I(l),we=Math.max(f,y);if(this.setCompactSelectionDisplay({chipContainerElGap:o,chipContainerElWidth:n,inputWidth:x,largestSelectedIndicatorChipWidth:we}),i==="fit"){let V=Array.from(this.el.shadowRoot.querySelectorAll("calcite-chip")).filter(Ee=>Ee.closable),Se=Math.round(n-((this.selectedHiddenChipsCount>0?y:0)+o+x+o));this.refreshChipDisplay({availableHorizontalChipElSpace:Se,chipContainerElGap:o,chipEls:V}),this.setVisibleAndHiddenChips(V)}}setFloatingEl(e){this.floatingEl=e,C(this)}setCompactSelectionDisplay({chipContainerElGap:e,chipContainerElWidth:t,inputWidth:i,largestSelectedIndicatorChipWidth:s}){let l=Math.round(s+e+i);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<l)&&(this.maxCompactBreakpoint=l),this.compactSelectionDisplay=t<this.maxCompactBreakpoint}setContainerEl(e){e&&this.resizeObserver?.observe(e),this.listContainerEl=e,this.transitionEl=e}setChipContainerEl(e){e&&this.resizeObserver?.observe(e),this.chipContainerEl=e}setReferenceEl(e){this.referenceEl=e,C(this)}setAllSelectedIndicatorChipEl(e){this.allSelectedIndicatorChipEl=e}setSelectedIndicatorChipEl(e){this.selectedIndicatorChipEl=e}setVisibleAndHiddenChips(e){let t=0;e.forEach(s=>{s.selected&&!s.classList.contains(d.chipInvisible)&&t++}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let i=this.getSelectedItems().length-t;i!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=i)}getMaxScrollerHeight(){let e=this.getItemsAndGroups().filter(l=>!l.hidden),{maxItems:t}=this,i=0,s=0;return e.length>t&&e.forEach(l=>{if(i<t){let a=this.calculateScrollerHeight(l);a>0&&(s+=a,i++)}}),s}calculateScrollerHeight(e){if(!e)return;let t=e.getBoundingClientRect().height,i=Array.from(e.querySelectorAll(fe)).reduce((s,l)=>s+l.getBoundingClientRect().height,0);return t-i}inputHandler(e){let t=e.target.value;this.filterText=t}getItemsAndGroups(){return[...this.groupItems,...this.items]}toggleSelection(e,t){!e||this.selectionMode==="single-persist"&&e.selected&&e.value===this.value&&!t||(this.isMulti()?(e.selected=t,this.updateAncestors(e),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")):(this.ignoreSelectedEventsFlag=!0,this.items.forEach(i=>i.selected=i===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInput.value&&(this.textInput.value.value=$(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")))}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=H(e),i=ve(e);e.selected?t.forEach(s=>{s.selected=!0}):(i.forEach(s=>s.selected=!1),[...t].forEach(s=>{T(s)||(s.selected=!1)}))}getFilteredItems(){return this.filterText===""?this.items:this.items.filter(e=>!e.hidden)}updateItems(){this.items=this.getItems(),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.groupData=this.getGroupData(),this.selectedItems=this.getSelectedItems(),this.filteredItems=this.getFilteredItems(),this.needsIcon=this.getNeedsIcon(),this.items.forEach(e=>{e.selectionMode=this.selectionMode,e.scale=this.scale}),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach((e,t,i)=>{t===0&&(e.afterEmptyGroup=!1);let s=i[t+1];s&&(s.afterEmptyGroup=e.children.length===0)})}getData(){return this.items.map(e=>({description:e.description,filterDisabled:e.filterDisabled,label:e.heading||e.textLabel,metadata:e.metadata,shortHeading:e.shortHeading,el:e}))}getGroupData(){return this.groupItems.map(e=>({label:e.label,el:e}))}getNeedsIcon(){return v(this.selectionMode)&&this.items.some(e=>e.icon)}resetText(){this.textInput.value&&(this.textInput.value.value=""),this.filterText=""}getItems(){return Array.from(this.el.querySelectorAll(be)).filter(e=>!e.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(ge))}addCustomChip(e,t){let i=this.items.find(s=>s.textLabel===e);if(i)this.toggleSelection(i,!0);else{this.isMulti()||this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1);let s=document.createElement("calcite-combobox-item");s.value=e,s.textLabel=e,s.selected=!0,this.el.prepend(s),this.resetText(),t&&this.setFocus(),this.updateItems(),this.filterItems(""),this.open=!0,this.emitComboboxChange()}}removeActiveChip(){this.toggleSelection(this.selectedItems[this.activeChipIndex],!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex+1;t>e?(this.activeChipIndex=-1,this.setFocus()):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl.querySelector(`#${Ie}${e}`):null)?.setFocus()}scrollToActiveItem(){let e=this.filteredItems[this.activeItemIndex];if(!e)return;let t=this.calculateScrollerHeight(e),{offsetHeight:i,scrollTop:s}=this.listContainerEl;i+s<e.offsetTop+t?this.listContainerEl.scrollTop=e.offsetTop-i+t:e.offsetTop<s&&(this.listContainerEl.scrollTop=e.offsetTop)}shiftActiveItemIndex(e){let{length:t}=this.filteredItems,i=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(i),this.scrollToActiveItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t=null;this.filteredItems.forEach((i,s)=>{s===e?(i.active=!0,t=`${xe}${i.guid}`):i.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isAllSelected(){return this.getItems().length===this.getSelectedItems().length}isMulti(){return!v(this.selectionMode)}comboboxFocusHandler(){this.disabled||this.textInput.value?.focus()}renderChips(){let{activeChipIndex:e,readOnly:t,scale:i,selectionMode:s,messages:l}=this;return this.selectedItems.map((a,o)=>{let n={chip:!0,"chip--active":e===o},c=[...H(a)].reverse(),p=$(a),x=[...c,a].map(y=>$(y)),f=s!=="ancestors"?p:x.join(" / ");return u(p,r`<calcite-chip .appearance=${t?"outline":"solid"} class=${h(n)} .closable=${!t} data-test-id=${`chip-${o}`} .icon=${a.icon} .iconFlipRtl=${a.iconFlipRtl} id=${(a.guid?`${Ie}${a.guid}`:null)??m} .label=${f} .messageOverrides=${{dismissLabel:l.removeTag}} @focusin=${()=>this.activeChipIndex=o} @calciteChipClose=${()=>this.calciteChipCloseHandler(a)} .scale=${i} .selected=${a.selected} .tabIndex=${e===o?0:-1} title=${f??m} .value=${a.value}>${f}</calcite-chip>`)})}renderAllSelectedIndicatorChip(){let{compactSelectionDisplay:e,scale:t,selectedVisibleChipsCount:i,setAllSelectedIndicatorChipEl:s}=this,l=this.messages.allSelected;return r`<calcite-chip class=${h({chip:!0,[d.chipInvisible]:!(this.isAllSelected()&&!i&&!e)})} .label=${l} .scale=${t} title=${l??m} value ${g(s)}>${l}</calcite-chip>`}renderAllSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,scale:t,selectedVisibleChipsCount:i}=this,s=this.messages.all||"All";return r`<calcite-chip class=${h({chip:!0,[d.chipInvisible]:!(this.isAllSelected()&&!i&&e)})} .label=${s} .scale=${t} title=${s??m} value>${s}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,getSelectedItems:i,scale:s,selectedHiddenChipsCount:l,selectedVisibleChipsCount:a,setSelectedIndicatorChipEl:o}=this,n,c;if(e)n=!0;else if(t==="single"){let p=i().length;this.isAllSelected()?n=!0:p>0?n=!1:n=!0,c=`${p} ${this.messages.selected}`}else t==="fit"&&(n=!!(this.isAllSelected()&&a===0||l===0),c=a>0?`+${l}`:`${l} ${this.messages.selected}`);return r`<calcite-chip class=${h({chip:!0,[d.chipInvisible]:n})} .label=${c} .scale=${s} title=${c??m} value ${g(o)}>${c}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,getSelectedItems:i,scale:s,selectedHiddenChipsCount:l}=this,a,o;if(e){let n=i().length;this.isAllSelected()?a=!0:t==="fit"?(a=!(l>0),o=`${l||0}`):t==="single"&&(a=!(n>0),o=`${n}`)}else a=!0;return r`<calcite-chip class=${h({chip:!0,[d.chipInvisible]:a})} .label=${o} .scale=${s} title=${o??m} value>${o}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:i,selectionMode:s,selectedItems:l,open:a}=this,o=v(s),n=l[0],c=!a&&o&&!!n&&!this.filterText;return r`<span class=${h({"input-wrap":!0,"input-wrap--single":o})}>${c&&u("label",r`<span class=${h({label:!0,"label--icon":!!n?.icon})}>${$(n)}</span>`)||""}${u("input",r`<input aria-activedescendant=${this.activeDescendant??m} aria-controls=${`${F}${e}`} aria-errormessage=${D.validationMessage} aria-owns=${`${F}${e}`} aria-autocomplete=list .ariaExpanded=${a} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${de(this)} class=${h({[d.input]:!0,"input--single":!0,[d.inputHidden]:c,"input--icon":this.showingInlineIcon&&!!this.placeholderIcon})} data-test-id=input .disabled=${t} .id=${`${$e}${e}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${i??m} .readOnly=${this.readOnly} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${P(this.filterText??"")} ${g(this.textInput)}>`)}</span>`}renderListBoxOptions(){return this.filteredItems.map(e=>r`<li .ariaSelected=${e.selected} id=${(e.guid?`${xe}${e.guid}`:null)??m} role=option tabindex=-1>${e.textLabel}</li>`)}renderFloatingUIContainer(){let{setFloatingEl:e,setContainerEl:t,open:i}=this,s={[d.listContainer]:!0,[A.animation]:!0,[A.animationActive]:i};return r`<div aria-hidden=true class=${h(d.floatingUIContainer)} ${g(e)}><div class=${h(s)} ${g(t)}><ul class=${h({list:!0,"list--hide":!i})}><slot></slot></ul></div></div>`}renderSelectedOrPlaceholderIcon(){let{open:e,placeholderIcon:t,placeholderIconFlipRtl:i,selectedItems:s}=this,l=s[0],a=l?.icon,o=t&&(e||!l);return this.showingInlineIcon&&u("selected-placeholder-icon",r`<span class="icon-start"><calcite-icon class=${h({[d.selectedIcon]:!o,[d.placeholderIcon]:o})} .flipRtl=${o?i:l.iconFlipRtl} .icon=${o?t:a} .scale=${w(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return u("chevron",r`<span class="icon-end"><calcite-icon class=${h(d.icon)} .icon=${e?"chevron-up":"chevron-down"} .scale=${w(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:i,open:s,readOnly:l}=this,a=v(this.selectionMode),o=e==="all",n=e==="single",c=!a&&e==="fit",p=!this.clearDisabled&&this.value?.length>0;return Q({disabled:this.disabled,children:r`<div aria-live=polite class=${h({wrapper:!0,"wrapper--single":a||!this.selectedItems.length,"wrapper--active":s})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${g(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${u("grid",r`<div class=${h({"grid-input":!0,[d.selectionDisplayFit]:c,[d.selectionDisplaySingle]:n})} ${g(this.setChipContainerEl)}>${!a&&!n&&this.renderChips()||""}${!a&&!o&&[this.renderSelectedIndicatorChip(),this.renderSelectedIndicatorChipCompact(),this.renderAllSelectedIndicatorChip(),this.renderAllSelectedIndicatorChipCompact()]||""}<label class="screen-readers-only" .htmlFor=${`${$e}${t}`} .id=${`${Ce}${t}`}>${i}</label>${this.renderInput()}</div>`)}${!l&&p?u("close-button",ke({disabled:this.disabled,label:this.messages.clear,scale:this.scale})):null}${!l&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${Ce}${t}`} aria-multiselectable=true class="screen-readers-only" .id=${`${F}${t}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${ce({component:this})}${this.validationMessage&&this.status==="invalid"?ue({icon:this.validationIcon,id:D.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};U("calcite-combobox",M);export{M as Combobox};
|
|
6
|
+
import{d as pe}from"./R6EDIIC4.js";import{a as ue}from"./Q4MSQTOI.js";import{a as me}from"./KH5HDNEE.js";import{a as be,b as ge,c as fe,d,e as D,g as H,h as ve,i as T,k as v,l as $}from"./IFIGTMI5.js";import{a as Z,c as A,d as ee,e as te,f as ie,g as C,h as se}from"./W2LZ5B57.js";import"./4FMY2PMX.js";import{a as k}from"./T5P6UT47.js";import{a as le,c as ae,e as oe,f as ne,h as ce}from"./FDI6IMZA.js";import{c as re,d as he,e as de}from"./7ZBYZTXJ.js";import{a as K,b as Q}from"./WTOOHKXX.js";import{a as u}from"./4HJ5FBOB.js";import{a as w}from"./A2TAJ3PS.js";import"./JQVDKAPW.js";import{a as E,b as Y}from"./2I7TXBOJ.js";import{a as S}from"./FZXGKHLN.js";import{a as X}from"./N4O3D3JX.js";import{a as G,b as g}from"./GOPYP4JX.js";import{f as I,i as _}from"./SIT6OTCT.js";import{a as q,b as j,c as N,d as J}from"./MSFQSK6W.js";import{a as W}from"./IJ267YYI.js";import{A as h,E as R,G as B,M as U,a as r,e as m,w as O,x as P,y as b,z as L}from"./4RCOCFTP.js";var ye={button:"x-button"},ke=({disabled:z,key:e,label:t,scale:i})=>u(e,r`<button .ariaLabel=${t} class=${h(ye.button)} .disabled=${z} tabindex=-1 type=button><calcite-icon icon=x .scale=${w(i)}></calcite-icon></button>`),Ae=O`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]) .x-button{inline-size:1rem;block-size:1rem}:host([scale=m]) .x-button{inline-size:1.5rem;block-size:1.5rem}:host([scale=l]) .x-button{inline-size:2rem;block-size:2rem}.x-button{margin:0;display:flex;cursor:pointer;appearance:none;align-content:center;align-items:center;justify-content:center;align-self:center;border-width:2px;background-color:transparent;color:var(--calcite-color-text-3);outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-radius:50%;border-color:transparent;background-color:var(--calcite-color-foreground-2)}.x-button:active,.x-button:hover{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-3)}.x-button:active{border-style:solid;border-color:var(--calcite-color-brand)}.x-button calcite-icon{color:inherit}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-combobox-item-spacing-unit-l: .5rem;--calcite-combobox-item-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) }:host([scale=s]) .x-button{margin-inline:.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-combobox-item-spacing-unit-l: .75rem;--calcite-combobox-item-spacing-unit-s: .5rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) }:host([scale=m]) .x-button{margin-inline-end:.75rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-combobox-item-spacing-unit-l: 1rem;--calcite-combobox-item-spacing-unit-s: .75rem;--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(.625rem - 1px) }:host([scale=l]) .x-button{margin-inline-end:1rem}.wrapper{display:flex;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1);outline-color:transparent;padding-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.wrapper:hover .icon{color:var(--calcite-color-text-1)}:host(:focus-within) .wrapper,.wrapper--active{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:2px solid var(--calcite-color-status-danger);outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;gap:var(--calcite-combobox-item-spacing-unit-s);margin-inline-end:var(--calcite-combobox-item-spacing-unit-s)}.grid-input.selection-display-fit,.grid-input.selection-display-single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-combobox-item-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;inline-size:0px;min-inline-size:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.placeholder-icon{color:var(--calcite-color-text-3)}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-inline-size:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-color-text-3)}.floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown);display:none;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);transition-property:inset,left,opacity;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@media (forced-colors: active){.wrapper,.floating-ui-container{border:1px solid canvasText}}.screen-readers-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.list-container{max-block-size:45vh;overflow-y:auto;background-color:var(--calcite-color-foreground-1);inline-size:var(--calcite-dropdown-width, 100%)}.list{margin:0;display:block;padding:0}.list--hide{block-size:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);max-inline-size:100%}.chip--active{background-color:var(--calcite-color-foreground-3)}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}::slotted(calcite-combobox-item-group:not(:first-child)){padding-block-start:var(--calcite-combobox-item-spacing-unit-l)}`,xe="combobox-item-",Ie="combobox-chip-",Ce="combobox-label-",F="combobox-listbox-",$e="combobox-input-",M=class extends L{constructor(){super(),this.internalComboboxChangeEvent=()=>{this.calciteComboboxChange.emit()},this.emitComboboxChange=E(this.internalComboboxChangeEvent,0),this.filterItems=(()=>{let e=(t,i)=>t&&i.some(({el:s})=>t===s);return E((t,i=!1,s=!0)=>{let l=me([...this.data,...this.groupData],t,["description","label","metadata","shortHeading"]),a=this.getItemsAndGroups(),o=t==="";a.forEach(n=>{if(o){n.hidden=!1;return}let c=!e(n,l);n.hidden=c;let[p,x]=n.ancestors;(e(p,l)||e(x,l))&&(n.hidden=!1),c||n.ancestors.forEach(f=>f.hidden=!1)}),this.filterTextMatchPattern=this.filterText&&new RegExp(`(${Y(this.filterText)})`,"i"),this.filteredItems=this.getFilteredItems(),this.filteredItems.forEach(n=>{n.filterTextMatchPattern=this.filterTextMatchPattern}),i&&(this.open=this.filterText.trim().length>0&&this.filteredItems.length>0),s&&this.calciteComboboxFilterChange.emit()},B.filter)})(),this._filterText="",this.getSelectedItems=()=>{if(!this.isMulti()){let e=this.items.find(({selected:t})=>t);return e?[e]:[]}return this.items.filter(e=>e.selected&&(this.selectionMode!=="ancestors"||!T(e))).sort((e,t)=>{let i=this.selectedItems.indexOf(e),s=this.selectedItems.indexOf(t);return i>-1&&s>-1?i-s:s-i})},this.guid=W(),this.ignoreSelectedEventsFlag=!1,this.inputHeight=0,this.internalValueChangeFlag=!1,this.mutationObserver=S("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.openTransitionProp="opacity",this.placement=Z,this.resizeObserver=S("resize",()=>{this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}),this.textInput=G(),this._value=null,this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.groupItems=[],this.items=[],this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.clearDisabled=!1,this.disabled=!1,this.filteredItems=[],this.maxItems=0,this.messages=X(),this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.readOnly=!1,this.required=!1,this.scale="m",this.selectedItems=[],this.selectionDisplay="all",this.selectionMode="multiple",this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.calciteComboboxBeforeClose=b({cancelable:!1}),this.calciteComboboxBeforeOpen=b({cancelable:!1}),this.calciteComboboxChange=b({cancelable:!1}),this.calciteComboboxChipClose=b({cancelable:!1}),this.calciteComboboxClose=b({cancelable:!1}),this.calciteComboboxFilterChange=b({cancelable:!1}),this.calciteComboboxOpen=b({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteComboboxItemChange",this.calciteComboboxItemChangeHandler),this.listen("calciteInternalComboboxItemChange",this.calciteInternalComboboxItemChangeHandler),this.listen("click",this.comboboxFocusHandler)}static{this.properties={activeChipIndex:16,activeDescendant:16,activeItemIndex:16,compactSelectionDisplay:16,groupItems:16,items:16,needsIcon:16,selectedHiddenChipsCount:16,selectedVisibleChipsCount:16,allowCustomValues:7,clearDisabled:7,disabled:7,filterText:3,filteredItems:0,flipPlacements:0,form:3,label:1,maxItems:11,messageOverrides:0,name:3,open:7,overlayPositioning:3,placeholder:1,placeholderIcon:3,placeholderIconFlipRtl:7,readOnly:7,required:7,scale:3,selectedItems:0,selectionDisplay:3,selectionMode:3,status:3,validationIcon:[3,{converter:R}],validationMessage:1,validity:0,value:1}}static{this.styles=Ae}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:i,open:s}=this,l=i[0],a=l?.icon,o=v(t);return!s&&l?!!a&&o:!!e&&(!l||o)}get filterText(){return this._filterText}set filterText(e){let t=this._filterText;e!==t&&(this._filterText=e,this.filterTextChange(e))}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueHandler(e))}async reposition(e=!1){let{floatingEl:t,referenceEl:i,placement:s,overlayPositioning:l,filteredFlipPlacements:a}=this;return te(this,{floatingEl:t,referenceEl:i,overlayPositioning:l,placement:s,flipPlacements:a,type:"menu"},e)}async setFocus(){await J(this),this.textInput.value?.focus(),this.activeChipIndex=-1,this.activeItemIndex=-1}connectedCallback(){super.connectedCallback(),re(this),ae(this),this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.updateItems(),this.setFilteredPlacements(),this.open&&(this.openHandler(),k(this)),C(this)}async load(){q(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("maxItems")&&(this.hasUpdated||this.maxItems!==0)&&this.setMaxScrollerHeight(),e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")&&this.reposition(!0),(e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="multiple")||e.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler(),e.has("selectedItems")&&(this.hasUpdated||this.selectedItems?.length>0)&&this.selectedItemsHandler()}updated(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),K(this),this.hasUpdated||this.refreshSelectionDisplay()}loaded(){ne(this,this.getValue()),C(this),j(this)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),he(this),oe(this),se(this)}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){k(this),!this.disabled&&this.setMaxScrollerHeight()}handleDisabledChange(e){e||(this.open=!1)}valueHandler(e){if(!this.internalValueChangeFlag){let t=this.getItems();Array.isArray(e)?t.forEach(i=>i.selected=e.includes(i.value)):e?t.forEach(i=>i.selected=e===i.value):t.forEach(i=>i.selected=!1),this.updateItems()}}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1}async documentClickHandler(e){this.disabled||e.composedPath().includes(this.el)||(await this.componentOnReady(),!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1)),this.allowCustomValues&&this.filterText.trim().length&&this.addCustomChip(this.filterText),this.open=!1)}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,i=this.filteredItems.indexOf(t);this.updateActiveItemIndex(i),this.toggleSelection(t,t.selected)}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.updateItems()}clearValue(){this.ignoreSelectedEventsFlag=!0,this.items.forEach(e=>e.selected=!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=[],this.emitComboboxChange(),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}clearInputValue(){this.textInput.value.value="",this.filterText=""}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?ee(t,e):null}getValue(){let e=this.selectedItems.map(t=>t?.value?.toString());return e?.length?e.length>1?e:e[0]:""}comboboxInViewport(){let e=this.el.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.right<=(window.innerWidth||document.documentElement.clientWidth)&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)}keyDownHandler(e){if(this.readOnly)return;let{key:t}=e;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):this.open?(this.open=!1,e.preventDefault()):!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1));break;case"ArrowLeft":(this.activeChipIndex!==-1||this.textInput.value.selectionStart===0)&&(this.previousChip(),e.preventDefault());break;case"ArrowRight":this.activeChipIndex!==-1&&(this.nextChip(),e.preventDefault());break;case"ArrowUp":this.filteredItems.length&&(e.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.comboboxInViewport()||this.el.scrollIntoView());break;case"ArrowDown":this.filteredItems.length&&(e.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":!this.textInput.value.value&&!e.defaultPrevented&&(this.open||(this.open=!0,this.shiftActiveItemIndex(1)),e.preventDefault());break;case"Home":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":!this.clearDisabled&&!this.open&&this.clearValue(),this.open=!1,e.preventDefault();break;case"Enter":if(this.open&&this.activeItemIndex>-1){let i=this.filteredItems[this.activeItemIndex];this.toggleSelection(i,!i.selected),e.preventDefault()}else this.activeChipIndex>-1?(this.removeActiveChip(),e.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):e.defaultPrevented||le(this)&&e.preventDefault();break;case"Delete":case"Backspace":{if(this.selectionDisplay==="single"||this.selectionDisplay==="fit"&&this.selectedHiddenChipsCount>0)return;this.activeChipIndex>-1?(e.preventDefault(),this.removeActiveChip()):!this.filterText&&this.isMulti()&&(e.preventDefault(),this.removeLastChip());break}}}onBeforeOpen(){this.scrollToActiveItem(),this.calciteComboboxBeforeOpen.emit()}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),ie(this)}async setMaxScrollerHeight(){let{listContainerEl:e,open:t,referenceEl:i}=this;if(!e||!t)return;await this.reposition(!0);let s=this.getMaxScrollerHeight();e.style.maxHeight=s>0?`${s}px`:"",e.style.minWidth=`${i.clientWidth}px`,await this.reposition(!0)}calciteChipCloseHandler(e){this.open=!1;let t=this.items.find(i=>i===e);t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()}clickHandler(e){if(this.readOnly)return;let t=e.composedPath();if(t.some(i=>i.tagName==="CALCITE-CHIP")){this.open=!1,e.preventDefault();return}if(t.some(i=>i.classList?.contains(ye.button))){this.clearValue(),e.preventDefault();return}this.open=!this.open,this.ensureRecentSelectedItemIsActive()}ensureRecentSelectedItemIsActive(){let{selectedItems:e}=this,t=e.length===0?0:this.items.indexOf(e[e.length-1]);this.updateActiveItemIndex(t)}hideChip(e){e.classList.add(d.chipInvisible)}showChip(e){e.classList.remove(d.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:i}){e.forEach(s=>{if(!s.selected)this.hideChip(s);else{let l=I(s);if(l&&l<t){t-=l+i,this.showChip(s);return}}this.hideChip(s)})}async refreshSelectionDisplay(){if(await N(this),v(this.selectionMode)||!this.textInput.value)return;let{allSelectedIndicatorChipEl:e,chipContainerEl:t,selectionDisplay:i,placeholder:s,selectedIndicatorChipEl:l,textInput:{value:a}}=this,o=parseInt(getComputedStyle(t).gap.replace("px","")),n=I(t),{fontSize:c,fontFamily:p}=getComputedStyle(a),x=(_(s,`${c} ${p}`)||parseInt(pe))+o,f=I(e),y=I(l),we=Math.max(f,y);if(this.setCompactSelectionDisplay({chipContainerElGap:o,chipContainerElWidth:n,inputWidth:x,largestSelectedIndicatorChipWidth:we}),i==="fit"){let V=Array.from(this.el.shadowRoot.querySelectorAll("calcite-chip")).filter(Ee=>Ee.closable),Se=Math.round(n-((this.selectedHiddenChipsCount>0?y:0)+o+x+o));this.refreshChipDisplay({availableHorizontalChipElSpace:Se,chipContainerElGap:o,chipEls:V}),this.setVisibleAndHiddenChips(V)}}setFloatingEl(e){this.floatingEl=e,C(this)}setCompactSelectionDisplay({chipContainerElGap:e,chipContainerElWidth:t,inputWidth:i,largestSelectedIndicatorChipWidth:s}){let l=Math.round(s+e+i);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<l)&&(this.maxCompactBreakpoint=l),this.compactSelectionDisplay=t<this.maxCompactBreakpoint}setContainerEl(e){e&&this.resizeObserver?.observe(e),this.listContainerEl=e,this.transitionEl=e}setChipContainerEl(e){e&&this.resizeObserver?.observe(e),this.chipContainerEl=e}setReferenceEl(e){this.referenceEl=e,C(this)}setAllSelectedIndicatorChipEl(e){this.allSelectedIndicatorChipEl=e}setSelectedIndicatorChipEl(e){this.selectedIndicatorChipEl=e}setVisibleAndHiddenChips(e){let t=0;e.forEach(s=>{s.selected&&!s.classList.contains(d.chipInvisible)&&t++}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let i=this.getSelectedItems().length-t;i!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=i)}getMaxScrollerHeight(){let e=this.getItemsAndGroups().filter(l=>!l.hidden),{maxItems:t}=this,i=0,s=0;return e.length>t&&e.forEach(l=>{if(i<t){let a=this.calculateScrollerHeight(l);a>0&&(s+=a,i++)}}),s}calculateScrollerHeight(e){if(!e)return;let t=e.getBoundingClientRect().height,i=Array.from(e.querySelectorAll(fe)).reduce((s,l)=>s+l.getBoundingClientRect().height,0);return t-i}inputHandler(e){let t=e.target.value;this.filterText=t}getItemsAndGroups(){return[...this.groupItems,...this.items]}toggleSelection(e,t){!e||this.selectionMode==="single-persist"&&e.selected&&e.value===this.value&&!t||(this.isMulti()?(e.selected=t,this.updateAncestors(e),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")):(this.ignoreSelectedEventsFlag=!0,this.items.forEach(i=>i.selected=i===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInput.value&&(this.textInput.value.value=$(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")))}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=H(e),i=ve(e);e.selected?t.forEach(s=>{s.selected=!0}):(i.forEach(s=>s.selected=!1),[...t].forEach(s=>{T(s)||(s.selected=!1)}))}getFilteredItems(){return this.filterText===""?this.items:this.items.filter(e=>!e.hidden)}updateItems(){this.items=this.getItems(),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.groupData=this.getGroupData(),this.selectedItems=this.getSelectedItems(),this.filteredItems=this.getFilteredItems(),this.needsIcon=this.getNeedsIcon(),this.items.forEach(e=>{e.selectionMode=this.selectionMode,e.scale=this.scale}),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach((e,t,i)=>{t===0&&(e.afterEmptyGroup=!1);let s=i[t+1];s&&(s.afterEmptyGroup=e.children.length===0)})}getData(){return this.items.map(e=>({description:e.description,filterDisabled:e.filterDisabled,label:e.heading||e.textLabel,metadata:e.metadata,shortHeading:e.shortHeading,el:e}))}getGroupData(){return this.groupItems.map(e=>({label:e.label,el:e}))}getNeedsIcon(){return v(this.selectionMode)&&this.items.some(e=>e.icon)}resetText(){this.textInput.value&&(this.textInput.value.value=""),this.filterText=""}getItems(){return Array.from(this.el.querySelectorAll(be)).filter(e=>!e.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(ge))}addCustomChip(e,t){let i=this.items.find(s=>s.textLabel===e);if(i)this.toggleSelection(i,!0);else{this.isMulti()||this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1);let s=document.createElement("calcite-combobox-item");s.value=e,s.textLabel=e,s.selected=!0,this.el.prepend(s),this.resetText(),t&&this.setFocus(),this.updateItems(),this.filterItems(""),this.open=!0,this.emitComboboxChange()}}removeActiveChip(){this.toggleSelection(this.selectedItems[this.activeChipIndex],!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex+1;t>e?(this.activeChipIndex=-1,this.setFocus()):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl.querySelector(`#${Ie}${e}`):null)?.setFocus()}scrollToActiveItem(){let e=this.filteredItems[this.activeItemIndex];if(!e)return;let t=this.calculateScrollerHeight(e),{offsetHeight:i,scrollTop:s}=this.listContainerEl;i+s<e.offsetTop+t?this.listContainerEl.scrollTop=e.offsetTop-i+t:e.offsetTop<s&&(this.listContainerEl.scrollTop=e.offsetTop)}shiftActiveItemIndex(e){let{length:t}=this.filteredItems,i=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(i),this.scrollToActiveItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t=null;this.filteredItems.forEach((i,s)=>{s===e?(i.active=!0,t=`${xe}${i.guid}`):i.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isAllSelected(){return this.getItems().length===this.getSelectedItems().length}isMulti(){return!v(this.selectionMode)}comboboxFocusHandler(){this.disabled||this.textInput.value?.focus()}renderChips(){let{activeChipIndex:e,readOnly:t,scale:i,selectionMode:s,messages:l}=this;return this.selectedItems.map((a,o)=>{let n={chip:!0,"chip--active":e===o},c=[...H(a)].reverse(),p=$(a),x=[...c,a].map(y=>$(y)),f=s!=="ancestors"?p:x.join(" / ");return u(p,r`<calcite-chip .appearance=${t?"outline":"solid"} class=${h(n)} .closable=${!t} data-test-id=${`chip-${o}`} .icon=${a.icon} .iconFlipRtl=${a.iconFlipRtl} id=${(a.guid?`${Ie}${a.guid}`:null)??m} .label=${f} .messageOverrides=${{dismissLabel:l.removeTag}} @focusin=${()=>this.activeChipIndex=o} @calciteChipClose=${()=>this.calciteChipCloseHandler(a)} .scale=${i} .selected=${a.selected} .tabIndex=${e===o?0:-1} title=${f??m} .value=${a.value}>${f}</calcite-chip>`)})}renderAllSelectedIndicatorChip(){let{compactSelectionDisplay:e,scale:t,selectedVisibleChipsCount:i,setAllSelectedIndicatorChipEl:s}=this,l=this.messages.allSelected;return r`<calcite-chip class=${h({chip:!0,[d.chipInvisible]:!(this.isAllSelected()&&!i&&!e)})} .label=${l} .scale=${t} title=${l??m} value ${g(s)}>${l}</calcite-chip>`}renderAllSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,scale:t,selectedVisibleChipsCount:i}=this,s=this.messages.all||"All";return r`<calcite-chip class=${h({chip:!0,[d.chipInvisible]:!(this.isAllSelected()&&!i&&e)})} .label=${s} .scale=${t} title=${s??m} value>${s}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,getSelectedItems:i,scale:s,selectedHiddenChipsCount:l,selectedVisibleChipsCount:a,setSelectedIndicatorChipEl:o}=this,n,c;if(e)n=!0;else if(t==="single"){let p=i().length;this.isAllSelected()?n=!0:p>0?n=!1:n=!0,c=`${p} ${this.messages.selected}`}else t==="fit"&&(n=!!(this.isAllSelected()&&a===0||l===0),c=a>0?`+${l}`:`${l} ${this.messages.selected}`);return r`<calcite-chip class=${h({chip:!0,[d.chipInvisible]:n})} .label=${c} .scale=${s} title=${c??m} value ${g(o)}>${c}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,getSelectedItems:i,scale:s,selectedHiddenChipsCount:l}=this,a,o;if(e){let n=i().length;this.isAllSelected()?a=!0:t==="fit"?(a=!(l>0),o=`${l||0}`):t==="single"&&(a=!(n>0),o=`${n}`)}else a=!0;return r`<calcite-chip class=${h({chip:!0,[d.chipInvisible]:a})} .label=${o} .scale=${s} title=${o??m} value>${o}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:i,selectionMode:s,selectedItems:l,open:a}=this,o=v(s),n=l[0],c=!a&&o&&!!n&&!this.filterText;return r`<span class=${h({"input-wrap":!0,"input-wrap--single":o})}>${c&&u("label",r`<span class=${h({label:!0,"label--icon":!!n?.icon})}>${$(n)}</span>`)||""}${u("input",r`<input aria-activedescendant=${this.activeDescendant??m} aria-controls=${`${F}${e}`} aria-errormessage=${D.validationMessage} aria-owns=${`${F}${e}`} aria-autocomplete=list .ariaExpanded=${a} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${de(this)} class=${h({[d.input]:!0,"input--single":!0,[d.inputHidden]:c,"input--icon":this.showingInlineIcon&&!!this.placeholderIcon})} data-test-id=input .disabled=${t} .id=${`${$e}${e}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${i??m} .readOnly=${this.readOnly} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${P(this.filterText??"")} ${g(this.textInput)}>`)}</span>`}renderListBoxOptions(){return this.filteredItems.map(e=>r`<li .ariaSelected=${e.selected} id=${(e.guid?`${xe}${e.guid}`:null)??m} role=option tabindex=-1>${e.textLabel}</li>`)}renderFloatingUIContainer(){let{setFloatingEl:e,setContainerEl:t,open:i}=this,s={[d.listContainer]:!0,[A.animation]:!0,[A.animationActive]:i};return r`<div aria-hidden=true class=${h(d.floatingUIContainer)} ${g(e)}><div class=${h(s)} ${g(t)}><ul class=${h({list:!0,"list--hide":!i})}><slot></slot></ul></div></div>`}renderSelectedOrPlaceholderIcon(){let{open:e,placeholderIcon:t,placeholderIconFlipRtl:i,selectedItems:s}=this,l=s[0],a=l?.icon,o=t&&(e||!l);return this.showingInlineIcon&&u("selected-placeholder-icon",r`<span class="icon-start"><calcite-icon class=${h({[d.selectedIcon]:!o,[d.placeholderIcon]:o})} .flipRtl=${o?i:l.iconFlipRtl} .icon=${o?t:a} .scale=${w(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return u("chevron",r`<span class="icon-end"><calcite-icon class=${h(d.icon)} .icon=${e?"chevron-up":"chevron-down"} .scale=${w(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:i,open:s,readOnly:l}=this,a=v(this.selectionMode),o=e==="all",n=e==="single",c=!a&&e==="fit",p=!this.clearDisabled&&this.value?.length>0;return Q({disabled:this.disabled,children:r`<div aria-live=polite class=${h({wrapper:!0,"wrapper--single":a||!this.selectedItems.length,"wrapper--active":s})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${g(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${u("grid",r`<div class=${h({"grid-input":!0,[d.selectionDisplayFit]:c,[d.selectionDisplaySingle]:n})} ${g(this.setChipContainerEl)}>${!a&&!n&&this.renderChips()||""}${!a&&!o&&[this.renderSelectedIndicatorChip(),this.renderSelectedIndicatorChipCompact(),this.renderAllSelectedIndicatorChip(),this.renderAllSelectedIndicatorChipCompact()]||""}<label class="screen-readers-only" .htmlFor=${`${$e}${t}`} .id=${`${Ce}${t}`}>${i}</label>${this.renderInput()}</div>`)}${!l&&p?u("close-button",ke({disabled:this.disabled,label:this.messages.clear,scale:this.scale})):null}${!l&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${Ce}${t}`} aria-multiselectable=true class="screen-readers-only" .id=${`${F}${t}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${ce({component:this})}${this.validationMessage&&this.status==="invalid"?ue({icon:this.validationIcon,id:D.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};U("calcite-combobox",M);export{M as Combobox};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.33
|
|
5
5
|
*/
|
|
6
|
-
import{a as f}from"./
|
|
6
|
+
import{a as f}from"./FZXGKHLN.js";import{b as p}from"./GOPYP4JX.js";import{B as u}from"./SIT6OTCT.js";import{a as w,b as g,d as b}from"./MSFQSK6W.js";import"./IJ267YYI.js";import{A as h,M as m,a as l,w as c,z as d}from"./4RCOCFTP.js";var n={frame:"frame",frameAdvancing:"frame--advancing",frameRetreating:"frame--retreating"},v=c`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{position:relative;display:flex;inline-size:100%;flex:1 1 auto;align-items:stretch;overflow:hidden;background-color:transparent}:host .frame{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;padding:0;animation-name:none;animation-duration:var(--calcite-animation-timing)}:host ::slotted(*){display:none;block-size:100%}:host ::slotted(*[selected]){display:flex}:host ::slotted(.calcite-match-height:last-child){display:flex;flex:1 1 auto;overflow:hidden}:host .frame--advancing{animation-name:calcite-frame-advance}:host .frame--retreating{animation-name:calcite-frame-retreat}@keyframes calcite-frame-advance{0%{--tw-bg-opacity: .5;transform:translate3d(50px,0,0)}to{--tw-bg-opacity: 1;transform:translateZ(0)}}@keyframes calcite-frame-retreat{0%{--tw-bg-opacity: .5;transform:translate3d(-50px,0,0)}to{--tw-bg-opacity: 1;transform:translateZ(0)}}:host([hidden]){display:none}[hidden]{display:none}`,o=class extends d{constructor(){super(),this.itemMutationObserver=f("mutation",()=>this.handleMutationObserverChange()),this.selectedIndex=-1,this.flowDirection="standby",this.items=[],this.listen("calciteInternalFlowItemChange",this.handleCalciteInternalFlowItemChange),this.listen("calciteFlowItemBack",this.handleItemBackClick)}static{this.properties={flowDirection:16,items:16,customItemSelectors:1}}static{this.styles=v}async back(){let{items:e,selectedIndex:t}=this,i=e[t],a=e[t-1];if(!i||!a)return;let s=i.beforeBack?i.beforeBack:()=>Promise.resolve();try{await s.call(i)}catch{return}return i.selected=!1,a.selected=!0,a}async setFocus(){await b(this);let{items:e}=this;return e[e.length-1]?.setFocus()}connectedCallback(){super.connectedCallback(),this.itemMutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.handleMutationObserverChange()}load(){w(this)}willUpdate(e){e.has("flowDirection")&&(this.hasUpdated||this.flowDirection!=="standby")&&this.handleFlowDirectionChange(this.flowDirection)}loaded(){g(this)}disconnectedCallback(){super.disconnectedCallback(),this.itemMutationObserver?.disconnect()}async handleFlowDirectionChange(e){e!=="standby"&&(await u(this.frameEl,e==="retreating"?"calcite-frame-retreat":"calcite-frame-advance"),this.resetFlowDirection())}handleCalciteInternalFlowItemChange(e){e.stopPropagation(),this.updateFlowProps()}async handleItemBackClick(e){if(!e.defaultPrevented)return await this.back(),this.setFocus()}resetFlowDirection(){this.flowDirection="standby"}getFlowDirection(e,t){let i=e>0;return!(e>-1&&t>0)&&!i?"standby":t<e?"retreating":"advancing"}handleMutationObserverChange(){let{customItemSelectors:e,el:t}=this,i=Array.from(t.querySelectorAll(`calcite-flow-item${e?`,${e}`:""}`)).filter(a=>a.closest("calcite-flow")===t);this.items=i,this.ensureSelectedFlowItemExists(),this.updateFlowProps()}updateFlowProps(){let{selectedIndex:e,items:t}=this,i=this.findSelectedFlowItemIndex(t);t.forEach((a,s)=>{let r=s===i;r||(a.menuOpen=!1),a.showBackButton=r&&i>0}),i!==-1&&(e!==i&&(this.flowDirection=this.getFlowDirection(e,i)),this.selectedIndex=i)}findSelectedFlowItemIndex(e){let t=e.slice(0).reverse().find(i=>!!i.selected);return e.indexOf(t)}ensureSelectedFlowItemExists(){let{items:e}=this;if(this.findSelectedFlowItemIndex(e)!==-1)return;let t=e[e.length-1];t&&(t.selected=!0)}setFrameEl(e){this.frameEl=e}render(){let{flowDirection:e}=this,t={[n.frame]:!0,[n.frameAdvancing]:e==="advancing",[n.frameRetreating]:e==="retreating"};return l`<div class=${h(t)} ${p(this.setFrameEl)}><slot></slot></div>`}};m("calcite-flow",o);export{o as Flow};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.33
|
|
5
5
|
*/
|
|
6
|
-
import{a as y}from"./
|
|
6
|
+
import{a as y}from"./W2LZ5B57.js";import"./4FMY2PMX.js";import{a as S,b as P}from"./WTOOHKXX.js";import{a as l}from"./4HJ5FBOB.js";import"./2I7TXBOJ.js";import{a as T}from"./N4O3D3JX.js";import{b as w}from"./GOPYP4JX.js";import"./SIT6OTCT.js";import{a as $,b as v,d as f}from"./MSFQSK6W.js";import"./IJ267YYI.js";import{A as c,M as u,a,e as r,w as b,y as i,z as g}from"./4RCOCFTP.js";var D={handle:"handle",dropdown:"dropdown"},H={drag:"drag",blank:"blank"},p={label:"{label}",position:"{position}",total:"{total}"},I=["top","up","down","bottom"],x=b`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}.handle{cursor:move;--calcite-internal-action-padding-inline: var(--calcite-spacing-xxs);--calcite-action-text-color: var(--calcite-color-border-input)}.dropdown{block-size:100%}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,h=class extends g{constructor(){super(...arguments),this.disabled=!1,this.maxItems=0,this.messages=T({blocking:!0}),this.open=!1,this.overlayPositioning="absolute",this.placement=y,this.scale="m",this.calciteSortHandleBeforeClose=i({cancelable:!1}),this.calciteSortHandleBeforeOpen=i({cancelable:!1}),this.calciteSortHandleClose=i({cancelable:!1}),this.calciteSortHandleMove=i({cancelable:!1}),this.calciteSortHandleOpen=i({cancelable:!1}),this.calciteSortHandleReorder=i({cancelable:!1})}static{this.properties={disabled:7,flipPlacements:0,label:1,maxItems:11,messageOverrides:0,messages:0,moveToItems:0,open:7,overlayPositioning:3,placement:3,scale:3,setPosition:9,setSize:9,widthScale:3}}static{this.styles=x}async setFocus(){await f(this),this.dropdownEl?.setFocus()}async load(){$(this)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler()}updated(){S(this)}loaded(){v(this)}openHandler(){if(this.disabled){this.open=!1;return}this.dropdownEl&&(this.dropdownEl.open=this.open)}setDropdownEl(e){e&&(this.dropdownEl=e,this.openHandler())}getLabel(){let{label:e,messages:t,setPosition:o,setSize:s}=this,n=e?t.repositionLabel.replace(p.label,e):t.reposition;return n=n.replace(p.position,o?o.toString():""),n.replace(p.total,s?s.toString():"")}handleBeforeOpen(e){e.stopPropagation(),this.calciteSortHandleBeforeOpen.emit()}handleOpen(e){e.stopPropagation(),this.calciteSortHandleOpen.emit(),this.open=!0}handleBeforeClose(e){e.stopPropagation(),this.calciteSortHandleBeforeClose.emit()}handleClose(e){e.stopPropagation(),this.calciteSortHandleClose.emit(),this.open=!1}handleReorder(e){this.calciteSortHandleReorder.emit({reorder:e.target.dataset.value})}handleMoveTo(e){let t=e.target.dataset.id,o=this.moveToItems.find(s=>s.id===t);this.calciteSortHandleMove.emit({moveTo:o})}render(){let{disabled:e,flipPlacements:t,messages:o,open:s,overlayPositioning:n,placement:B,scale:m,setPosition:C,setSize:O,widthScale:M}=this,d=this.getLabel(),E=e||!C||!O;return P({disabled:e,children:a`<calcite-dropdown class=${c(D.dropdown)} .disabled=${E} .flipPlacements=${t} @calciteDropdownBeforeClose=${this.handleBeforeClose} @calciteDropdownBeforeOpen=${this.handleBeforeOpen} @calciteDropdownClose=${this.handleClose} @calciteDropdownOpen=${this.handleOpen} .overlayPositioning=${n} .placement=${B} .scale=${m} .widthScale=${M} ${w(this.setDropdownEl)}><calcite-action .active=${s} appearance=transparent class=${c(D.handle)} .icon=${e?H.blank:H.drag} .label=${d} scale=s slot=trigger .text=${d} title=${d??r}></calcite-action>${l("reorder",a`<calcite-dropdown-group .groupTitle=${o.reorder} .scale=${m} selection-mode=none>${this.renderTop()}${this.renderUp()}${this.renderDown()}${this.renderBottom()}</calcite-dropdown-group>`)}${this.renderMoveToGroup()}</calcite-dropdown>`})}renderMoveToItem(e){return l(e.id,a`<calcite-dropdown-item data-id=${e.id??r} .label=${e.label} @calciteDropdownItemSelect=${this.handleMoveTo}>${e.label}</calcite-dropdown-item>`)}renderMoveToGroup(){let{messages:e,moveToItems:t,scale:o}=this;return t?.length?l("move-to-items",a`<calcite-dropdown-group .groupTitle=${e.moveTo} .scale=${o} selection-mode=none>${t.map(s=>this.renderMoveToItem(s))}</calcite-dropdown-group>`):null}renderDropdownItem(e,t){return l(I[e],a`<calcite-dropdown-item data-value=${I[e]??r} .label=${t} @calciteDropdownItemSelect=${this.handleReorder}>${t}</calcite-dropdown-item>`)}renderTop(){let{setPosition:e}=this;return e!==1&&e!==2?this.renderDropdownItem(0,this.messages.moveToTop):null}renderUp(){return this.setPosition!==1?this.renderDropdownItem(1,this.messages.moveUp):null}renderDown(){return this.setPosition!==this.setSize?this.renderDropdownItem(2,this.messages.moveDown):null}renderBottom(){let{setPosition:e,setSize:t}=this;return e!==t&&e!==t-1?this.renderDropdownItem(3,this.messages.moveToBottom):null}};u("calcite-sort-handle",h);export{h as SortHandle};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.33
|
|
5
5
|
*/
|
|
6
|
-
import{b as e}from"./
|
|
6
|
+
import{b as e}from"./34MYG2SR.js";import"./EXJ5AUGD.js";var a={name:"lv",weekdays:"sv\u0113tdiena_pirmdiena_otrdiena_tre\u0161diena_ceturtdiena_piektdiena_sestdiena".split("_"),months:"janv\u0101ris_febru\u0101ris_marts_apr\u012Blis_maijs_j\u016Bnijs_j\u016Blijs_augusts_septembris_oktobris_novembris_decembris".split("_"),weekStart:1,weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),monthsShort:"jan_feb_mar_apr_mai_j\u016Bn_j\u016Bl_aug_sep_okt_nov_dec".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},relativeTime:{future:"p\u0113c %s",past:"pirms %s",s:"da\u017E\u0101m sekund\u0113m",m:"min\u016Btes",mm:"%d min\u016Bt\u0113m",h:"stundas",hh:"%d stund\u0101m",d:"dienas",dd:"%d dien\u0101m",M:"m\u0113ne\u0161a",MM:"%d m\u0113ne\u0161iem",y:"gada",yy:"%d gadiem"}};e.locale(a,null,!0);var i=a;export{i as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.33
|
|
5
5
|
*/
|
|
6
6
|
function we(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var n=we;var We=typeof global=="object"&&global&&global.Object===Object&&global,A=We;var Re=typeof self=="object"&&self&&self.Object===Object&&self,Le=A||Re||Function("return this")(),g=Le;var ke=function(){return g.Date.now()},O=ke;var Fe=/\s/;function Pe(e){for(var t=e.length;t--&&Fe.test(e.charAt(t)););return t}var D=Pe;var Me=/^\s+/;function Ne(e){return e&&e.slice(0,D(e)+1).replace(Me,"")}var q=Ne;var Ce=g.Symbol,i=Ce;var G=Object.prototype,Ue=G.hasOwnProperty,De=G.toString,T=i?i.toStringTag:void 0;function qe(e){var t=Ue.call(e,T),r=e[T];try{e[T]=void 0;var o=!0}catch{}var f=De.call(e);return o&&(t?e[T]=r:delete e[T]),f}var z=qe;var Ge=Object.prototype,ze=Ge.toString;function Ke(e){return ze.call(e)}var K=Ke;var _e="[object Null]",$e="[object Undefined]",_=i?i.toStringTag:void 0;function Ve(e){return e==null?e===void 0?$e:_e:_&&_ in Object(e)?z(e):K(e)}var c=Ve;function Xe(e){return e!=null&&typeof e=="object"}var y=Xe;var He="[object Symbol]";function Je(e){return typeof e=="symbol"||y(e)&&c(e)==He}var v=Je;var $=NaN,Ye=/^[-+]0x[0-9a-f]+$/i,Qe=/^0b[01]+$/i,Ze=/^0o[0-7]+$/i,et=parseInt;function tt(e){if(typeof e=="number")return e;if(v(e))return $;if(n(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=n(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=q(e);var r=Qe.test(e);return r||Ze.test(e)?et(e.slice(2),r?2:8):Ye.test(e)?$:+e}var R=tt;var rt="Expected a function",ot=Math.max,at=Math.min;function ft(e,t,r){var o,f,d,m,s,l,u=0,M=!1,b=!1,B=!0;if(typeof e!="function")throw new TypeError(rt);t=R(t)||0,n(r)&&(M=!!r.leading,b="maxWait"in r,d=b?ot(R(r.maxWait)||0,t):d,B="trailing"in r?!!r.trailing:B);function w(p){var x=o,h=f;return o=f=void 0,u=p,m=e.apply(h,x),m}function ve(p){return u=p,s=setTimeout(I,t),M?w(p):m}function Se(p){var x=p-l,h=p-u,U=t-x;return b?at(U,d-h):U}function N(p){var x=p-l,h=p-u;return l===void 0||x>=t||x<0||b&&h>=d}function I(){var p=O();if(N(p))return C(p);s=setTimeout(I,Se(p))}function C(p){return s=void 0,B&&o?w(p):(o=f=void 0,m)}function Ee(){s!==void 0&&clearTimeout(s),u=0,o=l=f=s=void 0}function Be(){return s===void 0?m:C(O())}function W(){var p=O(),x=N(p);if(o=arguments,f=this,l=p,x){if(s===void 0)return ve(l);if(b)return clearTimeout(s),s=setTimeout(I,t),w(l)}return s===void 0&&(s=setTimeout(I,t)),m}return W.cancel=Ee,W.flush=Be,W}var L=ft;function st(e,t){for(var r=-1,o=e==null?0:e.length,f=Array(o);++r<o;)f[r]=t(e[r],r,e);return f}var V=st;var pt=Array.isArray,S=pt;var ut=1/0,X=i?i.prototype:void 0,H=X?X.toString:void 0;function J(e){if(typeof e=="string")return e;if(S(e))return V(e,J)+"";if(v(e))return H?H.call(e):"";var t=e+"";return t=="0"&&1/e==-ut?"-0":t}var Y=J;function mt(e){return e==null?"":Y(e)}var Q=mt;var Z=/[\\^$.*+?()[\]{}|]/g,lt=RegExp(Z.source);function dt(e){return e=Q(e),e&<.test(e)?e.replace(Z,"\\$&"):e}var nt=dt;var it="Expected a function";function xt(e,t,r){var o=!0,f=!0;if(typeof e!="function")throw new TypeError(it);return n(r)&&(o="leading"in r?!!r.leading:o,f="trailing"in r?!!r.trailing:f),L(e,t,{leading:o,maxWait:t,trailing:f})}var ct=xt;function yt(e){return e}var ee=yt;var gt="[object AsyncFunction]",bt="[object Function]",ht="[object GeneratorFunction]",Tt="[object Proxy]";function jt(e){if(!n(e))return!1;var t=c(e);return t==bt||t==ht||t==gt||t==Tt}var te=jt;var It=9007199254740991,At=/^(?:0|[1-9]\d*)$/;function Ot(e,t){var r=typeof e;return t=t??It,!!t&&(r=="number"||r!="symbol"&&At.test(e))&&e>-1&&e%1==0&&e<t}var re=Ot;var vt=9007199254740991;function St(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=vt}var E=St;function Et(e){return e!=null&&E(e.length)&&!te(e)}var oe=Et;var Bt=Object.prototype;function wt(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Bt;return e===r}var ae=wt;function Wt(e,t){for(var r=-1,o=Array(e);++r<e;)o[r]=t(r);return o}var fe=Wt;var Rt="[object Arguments]";function Lt(e){return y(e)&&c(e)==Rt}var k=Lt;var se=Object.prototype,kt=se.hasOwnProperty,Ft=se.propertyIsEnumerable,Pt=k(function(){return arguments}())?k:function(e){return y(e)&&kt.call(e,"callee")&&!Ft.call(e,"callee")},pe=Pt;function Mt(){return!1}var ue=Mt;var de=typeof exports=="object"&&exports&&!exports.nodeType&&exports,me=de&&typeof module=="object"&&module&&!module.nodeType&&module,Nt=me&&me.exports===de,le=Nt?g.Buffer:void 0,Ct=le?le.isBuffer:void 0,Ut=Ct||ue,ne=Ut;var Dt="[object Arguments]",qt="[object Array]",Gt="[object Boolean]",zt="[object Date]",Kt="[object Error]",_t="[object Function]",$t="[object Map]",Vt="[object Number]",Xt="[object Object]",Ht="[object RegExp]",Jt="[object Set]",Yt="[object String]",Qt="[object WeakMap]",Zt="[object ArrayBuffer]",er="[object DataView]",tr="[object Float32Array]",rr="[object Float64Array]",or="[object Int8Array]",ar="[object Int16Array]",fr="[object Int32Array]",sr="[object Uint8Array]",pr="[object Uint8ClampedArray]",ur="[object Uint16Array]",mr="[object Uint32Array]",a={};a[tr]=a[rr]=a[or]=a[ar]=a[fr]=a[sr]=a[pr]=a[ur]=a[mr]=!0;a[Dt]=a[qt]=a[Zt]=a[Gt]=a[er]=a[zt]=a[Kt]=a[_t]=a[$t]=a[Vt]=a[Xt]=a[Ht]=a[Jt]=a[Yt]=a[Qt]=!1;function lr(e){return y(e)&&E(e.length)&&!!a[c(e)]}var ie=lr;function dr(e){return function(t){return e(t)}}var xe=dr;var ce=typeof exports=="object"&&exports&&!exports.nodeType&&exports,j=ce&&typeof module=="object"&&module&&!module.nodeType&&module,nr=j&&j.exports===ce,F=nr&&A.process,ir=function(){try{var e=j&&j.require&&j.require("util").types;return e||F&&F.binding&&F.binding("util")}catch{}}(),P=ir;var ye=P&&P.isTypedArray,xr=ye?xe(ye):ie,ge=xr;var cr=Object.prototype,yr=cr.hasOwnProperty;function gr(e,t){var r=S(e),o=!r&&pe(e),f=!r&&!o&&ne(e),d=!r&&!o&&!f&&ge(e),m=r||o||f||d,s=m?fe(e.length,String):[],l=s.length;for(var u in e)(t||yr.call(e,u))&&!(m&&(u=="length"||f&&(u=="offset"||u=="parent")||d&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||re(u,l)))&&s.push(u);return s}var be=gr;function br(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var he=br;var hr=Object.prototype,Tr=hr.hasOwnProperty;function jr(e){if(!n(e))return he(e);var t=ae(e),r=[];for(var o in e)o=="constructor"&&(t||!Tr.call(e,o))||r.push(o);return r}var Te=jr;function Ir(e){return oe(e)?be(e,!0):Te(e)}var je=Ir;function Ar(e){return function(t,r,o){for(var f=-1,d=Object(t),m=o(t),s=m.length;s--;){var l=m[e?s:++f];if(r(d[l],l,d)===!1)break}return t}}var Ie=Ar;var Or=Ie(),Ae=Or;function vr(e){return typeof e=="function"?e:ee}var Oe=vr;function Sr(e,t){return e==null?e:Ae(e,Oe(t),je)}var Er=Sr;export{L as a,nt as b,Er as c,ct as d};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.33
|
|
5
5
|
*/
|
|
6
|
-
import{a as ae,b as T}from"./L3HLZRS2.js";import{a as ie}from"./LUJ5UWCG.js";import{a as W,j as L}from"./HJFN4BRU.js";import{c as K,e as J,f as Q,h as Y}from"./CQ6NWQF3.js";import{c as Z,d as ee,e as te}from"./TTSEPZSJ.js";import{a as q,b as j}from"./RWVLSL54.js";import{a as B}from"./C3FAV6KN.js";import{a as G}from"./GPDJBFNN.js";import{a as N}from"./2DEWT4DT.js";import{b as R}from"./54QYFZMH.js";import{q as H,x as _}from"./F4M2Z3DQ.js";import{a as A,b as I,d as U}from"./ZCDKSTJT.js";import{a as X}from"./7PYUACLF.js";import{A as g,B as $,D as F,E as O,M as E,a as x,e as z,w as P,y as w,z as C}from"./OQM7M4LD.js";var l={container:"container",containerRange:"container--range",graph:"graph",handle:"handle",handleExtension:"handle-extension",handleLabel:"handle__label",handleLabelMinValue:"handle__label--minValue",handleLabelValue:"handle__label--value",hyphen:"hyphen",hyphenWrap:"hyphen--wrap",static:"static",thumb:"thumb",thumbActive:"thumb--active",thumbContainer:"thumb-container",thumbMinValue:"thumb--minValue",thumbPrecise:"thumb--precise",thumbValue:"thumb--value",tick:"tick",tickActive:"tick--active",tickLabel:"tick__label",tickMax:"tick__label--max",tickMin:"tick__label--min",ticks:"ticks",track:"track",trackRange:"track__range",transformed:"transformed"},se={validationMessage:"validationMessage"},le=250,ne=P`@charset "UTF-8";:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}.scale--s{--calcite-slider-handle-size: .625rem;--calcite-slider-handle-extension-height: .4rem;--calcite-slider-container-font-size: var(--calcite-font-size--3)}.scale--s .handle__label,.scale--s .tick__label{line-height:.75rem}.scale--m{--calcite-slider-handle-size: .875rem;--calcite-slider-handle-extension-height: .5rem;--calcite-slider-container-font-size: var(--calcite-font-size--2)}.scale--m .handle__label,.scale--m .tick__label{line-height:1rem}.scale--l{--calcite-slider-handle-size: 1rem;--calcite-slider-handle-extension-height: .65rem;--calcite-slider-container-font-size: var(--calcite-font-size--1)}.scale--l .handle__label,.scale--l .tick__label{line-height:1rem}.handle__label,.tick__label{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-slider-text-color, var(--calcite-color-text-2));font-size:var(--calcite-slider-container-font-size)}:host{display:block}:host .validation-container{padding-block-start:0!important}.container{position:relative;display:block;overflow-wrap:normal;word-break:normal;padding-inline:calc(var(--calcite-slider-handle-size) * .5);padding-block:calc(var(--calcite-slider-handle-size) * .5);margin-block:calc(var(--calcite-slider-handle-size) * .5);margin-inline:0;--calcite-slider-full-handle-height: calc( var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height) );touch-action:none;-webkit-user-select:none;user-select:none}:host([disabled]) .track__range,:host([disabled]) .tick--active{background-color:var(--calcite-color-text-3)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.375rem}.scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.5rem}.scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.55rem}:host([precise]:not([has-histogram])) .container .thumb--value{--calcite-slider-thumb-y-offset: calc(var(--calcite-slider-full-handle-height) * -1)}.thumb-container{position:relative;max-inline-size:100%}.thumb{--calcite-slider-thumb-x-offset: calc(var(--calcite-slider-handle-size) * .5);position:absolute;margin:0;display:flex;cursor:pointer;flex-direction:column;align-items:center;border-style:none;background-color:transparent;padding:0;font-family:inherit;outline:2px solid transparent;outline-offset:2px;transform:translate(var(--calcite-slider-thumb-x-offset),var(--calcite-slider-thumb-y-offset))}.thumb .handle__label.static,.thumb .handle__label.transformed{position:absolute;inset-block:0px;opacity:0}.thumb .handle__label.hyphen:after{content:"\u2014";display:inline-block;inline-size:1em}.thumb .handle__label.hyphen--wrap{display:flex}.thumb .handle{box-sizing:border-box;border-radius:9999px;outline-color:transparent;background-color:var(--calcite-slider-handle-fill-color, var(--calcite-color-foreground-1));block-size:var(--calcite-slider-handle-size);inline-size:var(--calcite-slider-handle-size);box-shadow:0 0 0 2px var(--calcite-color-text-3) inset;transition:border var(--calcite-internal-animation-timing-medium) ease,background-color var(--calcite-internal-animation-timing-medium) ease,box-shadow var(--calcite-animation-timing) ease}.thumb .handle-extension{inline-size:.125rem;block-size:var(--calcite-slider-handle-extension-height);background-color:var(--calcite-slider-handle-extension-color, var(--calcite-color-text-3))}.thumb:hover .handle{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}.thumb:hover .handle-extension{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.thumb:focus .handle{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.thumb:focus .handle-extension{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.thumb.thumb--minValue{transform:translate(calc(var(--calcite-slider-thumb-x-offset) * -1),var(--calcite-slider-thumb-y-offset))}.thumb.thumb--precise{--calcite-slider-thumb-y-offset: -.125rem}:host([label-handles]) .thumb{--calcite-slider-thumb-x-offset: 50%}:host([label-handles]):host(:not([has-histogram])) .scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -1.4375rem}:host([label-handles]):host(:not([has-histogram])) .scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -1.875rem}:host([label-handles]):host(:not([has-histogram])) .scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -2rem}:host([has-histogram][label-handles]) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--minValue.thumb--precise .handle__label{margin-block-start:.5em}:host(:not([has-histogram]):not([precise])) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--value .handle__label{margin-block-end:.5em}:host([label-handles][precise]):host(:not([has-histogram])) .scale--s .thumb--value{--calcite-slider-thumb-y-offset: -2.075rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--m .thumb--value{--calcite-slider-thumb-y-offset: -2.75rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--l .thumb--value{--calcite-slider-thumb-y-offset: -3.0625rem}.thumb:focus .handle,.thumb--active .handle{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand));box-shadow:0 0 8px #00000029}.thumb:hover.thumb--precise:after,.thumb:focus.thumb--precise:after,.thumb--active.thumb--precise:after{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.track{position:relative;block-size:.125rem;border-radius:0;background-color:var(--calcite-slider-track-color, var(--calcite-color-border-2));transition:all var(--calcite-internal-animation-timing-medium) ease-in}.track__range{position:absolute;inset-block-start:0px;block-size:.125rem;background-color:var(--calcite-slider-track-fill-color, var(--calcite-color-brand))}.container--range .track__range:hover{cursor:ew-resize}.container--range .track__range:after{position:absolute;inline-size:100%;content:"";inset-block-start:calc(var(--calcite-slider-full-handle-height) * .5 * -1);block-size:calc(var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height))}@media (forced-colors: active){.thumb{outline-width:0;outline-offset:0}.handle{outline:2px solid transparent;outline-offset:2px}.thumb:focus .handle,.thumb .handle-extension,.thumb:hover .handle-extension,.thumb:focus .handle-extension,.thumb:active .handle-extension{background-color:canvasText}.track{background-color:canvasText}.track__range{background-color:highlight}}.tick{position:absolute;block-size:.25rem;inline-size:.125rem;border-width:1px;border-style:solid;background-color:var(--calcite-slider-tick-color, var(--calcite-color-border-input));border-color:var(--calcite-slider-tick-border-color, var(--calcite-color-foreground-1));inset-block-start:-2px;pointer-events:none;margin-inline-start:-.125rem}.tick--active{background-color:var(--calcite-slider-tick-selected-color, var(--calcite-color-brand))}.tick__label{pointer-events:none;margin-block-start:.875rem;display:flex;justify-content:center}.tick__label--min{transition:opacity var(--calcite-animation-timing)}.tick__label--max{transition:opacity var(--calcite-internal-animation-timing-fast)}:host([has-histogram][label-handles]) .tick__label--min,:host([has-histogram][label-handles]) .tick__label--max,:host([has-histogram][precise]) .tick__label--min,:host([has-histogram][precise]) .tick__label--max{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-3)}.graph{color:var(--calcite-slider-graph-color, var(--calcite-color-foreground-3));block-size:48px}:host([label-ticks][ticks]) .container{padding-block-end:calc(.875rem + var(--calcite-slider-container-font-size))}:host([has-histogram]):host([precise][label-handles]) .container{padding-block-end:calc(var(--calcite-slider-full-handle-height) + 1em)}:host([has-histogram]):host([label-handles]:not([precise])) .container{padding-block-end:calc(var(--calcite-slider-handle-size) * .5 + 1em)}:host([has-histogram]):host([precise]:not([label-handles])) .container{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container{padding-block-start:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container--range{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([label-handles]:not([precise])) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container--range{padding-block-end:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`;function p(S){return Array.isArray(S)}var D=class extends C{constructor(){super(),this.activeProp="value",this.dragEnd=e=>{this.disabled||(this.removeDragListeners(),this.focusActiveHandle(e.clientX),this.lastDragPropValue!=this[this.dragProp]&&this.emitChange(),this.dragProp=null,this.lastDragPropValue=null,this.minValueDragRange=null,this.maxValueDragRange=null,this.minMaxValueRange=null)},this.dragUpdate=e=>{if(!this.disabled&&(e.preventDefault(),this.dragProp)){let t=this.mapToRange(e.clientX||e.pageX);if(p(this.value)&&this.dragProp==="minMaxValue")if(this.minValueDragRange&&this.maxValueDragRange&&this.minMaxValueRange){let a=t-this.minValueDragRange,i=t+this.maxValueDragRange;i<=this.max&&a>=this.min&&i-a===this.minMaxValueRange&&this.setValue({minValue:this.clamp(a,"minValue"),maxValue:this.clamp(i,"maxValue")})}else this.minValueDragRange=t-this.minValue,this.maxValueDragRange=this.maxValue-t,this.minMaxValueRange=this.maxValue-this.minValue;else this.setValue({[this.dragProp]:this.clamp(t,this.dragProp)})}},this.formatValue=e=>(L.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},L.localize(e.toString())),this.guid=`calcite-slider-${X()}`,this.messages=N({name:null}),this.pointerUpDragEnd=e=>{this.disabled||!_(e)||this.dragEnd(e)},this.maxValueDragRange=null,this.minMaxValueRange=null,this.minValueDragRange=null,this.tickValues=[],this.disabled=!1,this.fillPlacement="start",this.groupSeparator=!1,this.hasHistogram=!1,this.labelHandles=!1,this.labelTicks=!1,this.max=100,this.min=0,this.mirrored=!1,this.precise=!1,this.required=!1,this.scale="m",this.snap=!1,this.status="idle",this.step=1,this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.value=0,this.calciteSliderChange=w({cancelable:!1}),this.calciteSliderInput=w({cancelable:!1}),this.listen("pointerdown",this.pointerDownHandler),this.listen("keydown",this.handleKeyDown),this.listen("touchstart",this.handleTouchStart)}static{this.properties={maxValueDragRange:16,minMaxValueRange:16,minValueDragRange:16,tickValues:16,disabled:7,fillPlacement:3,form:3,groupSeparator:7,hasHistogram:7,histogram:0,histogramStops:0,labelFormatter:0,labelHandles:7,labelTicks:7,max:11,maxLabel:1,maxValue:9,min:11,minLabel:1,minValue:9,mirrored:7,name:3,numberingSystem:1,pageStep:11,precise:7,required:7,scale:3,snap:7,status:3,step:11,ticks:11,validationIcon:[3,{converter:O}],validationMessage:1,validity:0,value:11}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=ne}async setFocus(){await U(this),(this.minHandle?this.minHandle:this.maxHandle)?.focus()}connectedCallback(){super.connectedCallback(),this.setMinMaxFromValue(),this.setValueFromMinMax(),Z(this),K(this)}load(){A(this),p(this.value)||(this.value=this.snap?this.getClosestStep(this.value):this.clamp(this.value)),Q(this,this.value)}willUpdate(e){e.has("histogram")&&(this.hasHistogram=!!this.histogram),e.has("ticks")&&(this.tickValues=this.generateTickValues()),e.has("value")&&(this.hasUpdated||this.value!==0)&&this.setMinMaxFromValue(),(e.has("minValue")||e.has("maxValue"))&&this.setValueFromMinMax()}updated(){this.labelHandles&&(this.adjustHostObscuredHandleLabel("value"),p(this.value)&&(this.adjustHostObscuredHandleLabel("minValue"),this.precise&&!this.hasHistogram||this.hyphenateCollidingRangeHandleLabels())),this.hideObscuredBoundingTickLabels(),q(this)}loaded(){I(this)}disconnectedCallback(){super.disconnectedCallback(),ee(this),J(this),this.removeDragListeners()}handleKeyDown(e){let t=this.shouldMirror(),{activeProp:a,max:i,min:s,pageStep:r,step:o}=this,n=this[a],{key:h}=e;if(G(h)){e.preventDefault();return}let m;if(h==="ArrowUp"||h==="ArrowRight"?m=n+o*(t&&h==="ArrowRight"?-1:1):h==="ArrowDown"||h==="ArrowLeft"?m=n-o*(t&&h==="ArrowLeft"?-1:1):h==="PageUp"?r&&(m=n+r):h==="PageDown"?r&&(m=n-r):h==="Home"?m=s:h==="End"&&(m=i),isNaN(m))return;e.preventDefault();let d=Number(m.toFixed(T(o)));this.setValue({[a]:this.clamp(d,a)})}pointerDownHandler(e){if(this.disabled||!_(e))return;let t=e.clientX||e.pageX,a=this.mapToRange(t),i="value";p(this.value)&&(a>=this.minValue&&a<=this.maxValue&&this.lastDragProp==="minMaxValue"?i="minMaxValue":i=Math.abs(this.maxValue-a)<Math.abs(this.minValue-a)||a>=this.maxValue?"maxValue":"minValue"),this.lastDragPropValue=this[i],this.dragStart(i),this.el.shadowRoot.querySelector(`.${l.thumb}:active`)||this.setValue({[i]:this.clamp(a,i)}),this.focusActiveHandle(t)}handleTouchStart(e){e.preventDefault()}buildThumbType(e){let t=[e];return this.labelHandles&&t.push("labeled"),this.precise&&t.push("precise"),this.hasHistogram&&t.push("histogram"),t.join("-")}setValueFromMinMax(){let{minValue:e,maxValue:t}=this;typeof e=="number"&&typeof t=="number"&&(this.value=[e,t])}setMinMaxFromValue(){let{value:e}=this;p(e)&&(this.minValue=e[0],this.maxValue=e[1])}onLabelClick(){this.setFocus()}shouldMirror(){return this.mirrored&&!this.hasHistogram}shouldUseMinValue(){return p(this.value)?this.hasHistogram&&this.maxValue===0||!this.hasHistogram&&this.minValue===0:!1}getTickDensity(){let e=(this.max-this.min)/this.ticks/le;return e<1?1:e}generateTickValues(){let e=this.ticks??0;if(e<=0)return[];let t=[this.min],a=this.getTickDensity(),i=e*a,s=this.min;for(;s<this.max;)s+=i,t.push(Math.min(s,this.max));return t.includes(this.max)||t.push(this.max),t}onThumbBlur(){this.activeProp=null}onThumbFocus(e){let t=e.currentTarget;this.activeProp=t.getAttribute("data-value-prop")}onThumbPointerDown(e){let t=e.currentTarget;this.pointerDownDragStart(e,t.getAttribute("data-value-prop"))}onTrackPointerDown(e){this.pointerDownDragStart(e,"minMaxValue")}pointerDownDragStart(e,t){_(e)&&this.dragStart(t)}dragStart(e){this.dragProp=e,this.lastDragProp=this.dragProp,this.activeProp=e,window.addEventListener("pointermove",this.dragUpdate),window.addEventListener("pointerup",this.pointerUpDragEnd),window.addEventListener("pointercancel",this.dragEnd)}focusActiveHandle(e){this.dragProp==="minValue"?this.minHandle.focus():this.dragProp==="maxValue"||this.dragProp==="value"?this.maxHandle.focus():this.dragProp==="minMaxValue"&&this.getClosestHandle(e).focus()}emitInput(){this.calciteSliderInput.emit()}emitChange(){this.calciteSliderChange.emit()}removeDragListeners(){window.removeEventListener("pointermove",this.dragUpdate),window.removeEventListener("pointerup",this.pointerUpDragEnd),window.removeEventListener("pointercancel",this.dragEnd)}setValue(e){let t;Object.keys(e).forEach(a=>{let i=e[a];t||(t=this[a]!==i),this[a]=i}),t&&(this.dragProp||this.emitChange(),this.emitInput())}storeTrackRef(e){this.trackEl=e}storeThumbRef(e){e&&(e.getAttribute("data-value-prop")==="minValue"?this.minHandle=e:this.maxHandle=e)}clamp(e,t){return e=ae(e,this.min,this.max),t==="maxValue"&&(e=Math.max(e,this.minValue)),t==="minValue"&&(e=Math.min(e,this.maxValue)),e}mapToRange(e){let t=this.max-this.min,{left:a,width:i}=this.trackEl.getBoundingClientRect(),s=(e-a)/i,r=this.shouldMirror(),o=this.clamp(this.min+t*(r?1-s:s)),n=Number(o.toFixed(T(this.step)));return this.snap&&this.step?this.getClosestStep(n):n}getClosestStep(e){let{max:t,min:a,step:i}=this,s=new W(`${Math.floor((e-a)/i)}`).multiply(`${i}`).add(`${a}`).toString(),r=this.clamp(Number(s));return r>t&&(r-=i),r}getClosestHandle(e){return this.getDistanceX(this.maxHandle,e)>this.getDistanceX(this.minHandle,e)?this.minHandle:this.maxHandle}getDistanceX(e,t){return Math.abs(e.getBoundingClientRect().left-t)}getFontSizeForElement(e){return Number(window.getComputedStyle(e).getPropertyValue("font-size").match(/\d+/)[0])}getUnitInterval(e){e=this.clamp(e);let t=this.max-this.min;return(e-this.min)/t}adjustHostObscuredHandleLabel(e){let t=this.el.shadowRoot.querySelector(`.handle__label--${e}`),a=this.el.shadowRoot.querySelector(`.handle__label--${e}.static`),i=this.el.shadowRoot.querySelector(`.handle__label--${e}.transformed`),s=a.getBoundingClientRect(),r=this.getHostOffset(s.left,s.right);t.style.transform=`translateX(${r}px)`,i.style.transform=`translateX(${r}px)`}hyphenateCollidingRangeHandleLabels(){let{shadowRoot:e}=this.el,t=this.shouldMirror(),a=t?"value":"minValue",i=t?"minValue":"value",s=e.querySelector(`.handle__label--${a}`),r=e.querySelector(`.handle__label--${a}.static`),o=e.querySelector(`.handle__label--${a}.transformed`),n=this.getHostOffset(r.getBoundingClientRect().left,r.getBoundingClientRect().right),h=e.querySelector(`.handle__label--${i}`),m=e.querySelector(`.handle__label--${i}.static`),d=e.querySelector(`.handle__label--${i}.transformed`),u=this.getHostOffset(m.getBoundingClientRect().left,m.getBoundingClientRect().right),k=this.getFontSizeForElement(s),v=this.getRangeLabelOverlap(o,d),f=s,b=k/2;if(v>0){if(f.classList.add(l.hyphen,l.hyphenWrap),u===0&&n===0){let c=v/2-b;c=Math.sign(c)===-1?Math.abs(c):-c;let y=this.getHostOffset(o.getBoundingClientRect().left+c-b,o.getBoundingClientRect().right+c-b),V=v/2,M=this.getHostOffset(d.getBoundingClientRect().left+V,d.getBoundingClientRect().right+V);y!==0&&(c+=y,V+=y),M!==0&&(c+=M,V+=M),s.style.transform=`translateX(${c}px)`,o.style.transform=`translateX(${c-b}px)`,h.style.transform=`translateX(${V}px)`,d.style.transform=`translateX(${V}px)`}else if(n>0||u>0)s.style.transform=`translateX(${n+b}px)`,h.style.transform=`translateX(${v+u}px)`,d.style.transform=`translateX(${v+u}px)`;else if(n<0||u<0){let c=Math.abs(n)+v-b;c=Math.sign(c)===-1?Math.abs(c):-c,s.style.transform=`translateX(${c}px)`,o.style.transform=`translateX(${c-b}px)`}}else f.classList.remove(l.hyphen,l.hyphenWrap),s.style.transform=`translateX(${n}px)`,o.style.transform=`translateX(${n}px)`,h.style.transform=`translateX(${u}px)`,d.style.transform=`translateX(${u}px)`}hideObscuredBoundingTickLabels(){let e=p(this.value);if(!this.hasHistogram&&!e&&!this.labelHandles&&!this.precise||!this.hasHistogram&&!e&&this.labelHandles&&!this.precise||!this.hasHistogram&&!e&&!this.labelHandles&&this.precise||!this.hasHistogram&&!e&&this.labelHandles&&this.precise||!this.hasHistogram&&e&&!this.precise||this.hasHistogram&&!this.precise&&!this.labelHandles)return;let t=this.el.shadowRoot.querySelector(`.${l.thumbMinValue}`),a=this.el.shadowRoot.querySelector(`.${l.thumbValue}`),i=this.el.shadowRoot.querySelector(`.${l.tickMin}`),s=this.el.shadowRoot.querySelector(`.${l.tickMax}`);!t&&a&&i&&s&&(i.style.opacity=this.isMinTickLabelObscured(i,a)?"0":"1",s.style.opacity=this.isMaxTickLabelObscured(s,a)?"0":"1"),t&&a&&i&&s&&(i.style.opacity=this.isMinTickLabelObscured(i,t)||this.isMinTickLabelObscured(i,a)?"0":"1",s.style.opacity=this.isMaxTickLabelObscured(s,t)||this.isMaxTickLabelObscured(s,a)&&this.hasHistogram?"0":"1")}getHostOffset(e,t){let a=this.el.getBoundingClientRect(),i=7;return e+i<a.left?a.left-e-i:t-i>a.right?-(t-a.right)+i:0}getRangeLabelOverlap(e,t){let a=e.getBoundingClientRect(),i=t.getBoundingClientRect(),s=this.getFontSizeForElement(e),r=a.right+s-i.left;return Math.max(r,0)}isMinTickLabelObscured(e,t){let a=e.getBoundingClientRect(),i=t.getBoundingClientRect();return H(a,i)}isMaxTickLabelObscured(e,t){let a=e.getBoundingClientRect(),i=t.getBoundingClientRect();return H(a,i)}internalLabelFormatter(e,t){let a=this.labelFormatter;return a?a(e,t,this.formatValue)??this.formatValue(e):this.formatValue(e)}render(){let e=this.el.id||this.guid,t=p(this.value)?this.maxValue:this.value,a=this.minValue||this.min,i=this.shouldUseMinValue(),s=this.getUnitInterval(i?this.minValue:a)*100,r=this.getUnitInterval(t)*100,o=this.shouldMirror(),n=p(this.value),h=this.buildThumbType("max"),m=this.renderThumb({type:h,thumbPlacement:h.includes("histogram")?"below":"above",maxInterval:r,minInterval:s,mirror:o}),d=this.buildThumbType("min"),u=n?this.renderThumb({type:d,thumbPlacement:d.includes("histogram")||d.includes("precise")?"below":"above",maxInterval:r,minInterval:s,mirror:o}):null,k=n?"start":this.fillPlacement,v=k==="none"?{left:"unset",right:"unset"}:k==="end"?{left:`${o?s:r}%`,right:`${o?r:s}%`}:{left:`${o?100-r:s}%`,right:`${o?s:100-r}%`};return F(this.el,"id",e),j({disabled:this.disabled,children:x`<div aria-errormessage=${se.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${te(this)} class=${g({[l.container]:!0,[l.containerRange]:n,[`scale--${this.scale}`]:!0})}>${this.renderGraph()}<div class=${g(l.track)} ${R(this.storeTrackRef)}><div class=${g(l.trackRange)} @pointerdown=${this.onTrackPointerDown} style=${$(v)}></div><div class=${g(l.ticks)}>${this.tickValues.map(f=>{let b=`${this.getUnitInterval(f)*100}%`,c=!1;if(k==="start"||k==="end")if(i)c=f>=this.minValue&&f<=this.maxValue;else{let y=k==="start"?a:t,V=k==="start"?t:this.max;c=f>=y&&f<=V}return x`<span class=${g({[l.tick]:!0,[l.tickActive]:c})} style=${$({left:o?"":b,right:o?b:""})}>${this.renderTickLabel(f)}</span>`})}</div></div><div class=${g(l.thumbContainer)}>${u}${m}${Y({component:this})}</div></div>${this.validationMessage&&this.status==="invalid"?ie({icon:this.validationIcon,id:se.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderThumb({type:e,mirror:t,thumbPlacement:a,minInterval:i,maxInterval:s}){let r=e.includes("labeled"),o=e.includes("precise"),n=e.includes("min"),h=p(this.value),m=n?this.minValue:h?this.maxValue:this.value,d=n?"minValue":h?"maxValue":"value",u=n?this.minLabel:h?this.maxLabel:this.minLabel,k=n?this.minValue:m,v=d==="minValue"?this.internalLabelFormatter(this.minValue,"min"):d==="maxValue"?this.internalLabelFormatter(this.maxValue,"max"):this.internalLabelFormatter(m,"value"),f=n?{left:`${t?100-i:i}%`}:{right:`${t?s:100-s}%`},b=`${l.handleLabel} ${n?l.handleLabelMinValue:l.handleLabelValue}`,c=[...r?[x`<span aria-hidden=true class=${g(b)}>${v}</span>`,x`<span aria-hidden=true class=${`${b} ${l.static}`}>${v}</span>`,x`<span aria-hidden=true class=${`${b} ${l.transformed}`}>${v}</span>`]:[],x`<div class=${g(l.handle)}></div>`,o&&x`<div class=${g(l.handleExtension)}></div>`||""];return a==="below"&&c.reverse(),B(e,x`<div .ariaLabel=${u} aria-orientation=horizontal .ariaValueMax=${this.max} .ariaValueMin=${this.min} .ariaValueNow=${k} class=${g({[l.thumb]:!0,[l.thumbValue]:!n,[l.thumbActive]:this.lastDragProp!=="minMaxValue"&&this.dragProp===d,[l.thumbPrecise]:o,[l.thumbMinValue]:n})} data-value-prop=${d??z} @blur=${this.onThumbBlur} @focus=${this.onThumbFocus} @pointerdown=${this.onThumbPointerDown} role=slider style=${$(f)} tabindex=0 ${R(this.storeThumbRef)}>${c}</div>`)}renderGraph(){return this.histogram?x`<calcite-graph class=${g(l.graph)} .colorStops=${this.histogramStops} .data=${this.histogram} .highlightMax=${p(this.value)?this.maxValue:this.value} .highlightMin=${p(this.value)?this.minValue:this.min} .max=${this.max} .min=${this.min}></calcite-graph>`:null}renderTickLabel(e){let{hasHistogram:t,labelHandles:a,labelTicks:i,max:s,min:r,precise:o,value:n}=this,h=p(n),m=e===r,d=e===s,u=m||d;return i&&(!t&&(u||!o||!h)||t&&(u||!o&&!a))?x`<span class=${g({[l.tickLabel]:!0,[l.tickMin]:m,[l.tickMax]:d})}>${this.internalLabelFormatter(e,"tick")}</span>`:null}};E("calcite-slider",D);export{D as Slider};
|
|
6
|
+
import{a as ae,b as T}from"./RGC54VDR.js";import{a as ie}from"./Q4MSQTOI.js";import{a as W,j as L}from"./FC6NAB6L.js";import{c as K,e as J,f as Q,h as Y}from"./FDI6IMZA.js";import{c as Z,d as ee,e as te}from"./7ZBYZTXJ.js";import{a as q,b as j}from"./WTOOHKXX.js";import{a as B}from"./4HJ5FBOB.js";import{a as G}from"./ZJB5V7C3.js";import{a as N}from"./N4O3D3JX.js";import{b as R}from"./GOPYP4JX.js";import{q as H,x as _}from"./SIT6OTCT.js";import{a as A,b as I,d as U}from"./MSFQSK6W.js";import{a as X}from"./IJ267YYI.js";import{A as g,B as $,D as F,E as O,M as E,a as x,e as z,w as P,y as w,z as C}from"./4RCOCFTP.js";var l={container:"container",containerRange:"container--range",graph:"graph",handle:"handle",handleExtension:"handle-extension",handleLabel:"handle__label",handleLabelMinValue:"handle__label--minValue",handleLabelValue:"handle__label--value",hyphen:"hyphen",hyphenWrap:"hyphen--wrap",static:"static",thumb:"thumb",thumbActive:"thumb--active",thumbContainer:"thumb-container",thumbMinValue:"thumb--minValue",thumbPrecise:"thumb--precise",thumbValue:"thumb--value",tick:"tick",tickActive:"tick--active",tickLabel:"tick__label",tickMax:"tick__label--max",tickMin:"tick__label--min",ticks:"ticks",track:"track",trackRange:"track__range",transformed:"transformed"},se={validationMessage:"validationMessage"},le=250,ne=P`@charset "UTF-8";:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}.scale--s{--calcite-slider-handle-size: .625rem;--calcite-slider-handle-extension-height: .4rem;--calcite-slider-container-font-size: var(--calcite-font-size--3)}.scale--s .handle__label,.scale--s .tick__label{line-height:.75rem}.scale--m{--calcite-slider-handle-size: .875rem;--calcite-slider-handle-extension-height: .5rem;--calcite-slider-container-font-size: var(--calcite-font-size--2)}.scale--m .handle__label,.scale--m .tick__label{line-height:1rem}.scale--l{--calcite-slider-handle-size: 1rem;--calcite-slider-handle-extension-height: .65rem;--calcite-slider-container-font-size: var(--calcite-font-size--1)}.scale--l .handle__label,.scale--l .tick__label{line-height:1rem}.handle__label,.tick__label{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-slider-text-color, var(--calcite-color-text-2));font-size:var(--calcite-slider-container-font-size)}:host{display:block}:host .validation-container{padding-block-start:0!important}.container{position:relative;display:block;overflow-wrap:normal;word-break:normal;padding-inline:calc(var(--calcite-slider-handle-size) * .5);padding-block:calc(var(--calcite-slider-handle-size) * .5);margin-block:calc(var(--calcite-slider-handle-size) * .5);margin-inline:0;--calcite-slider-full-handle-height: calc( var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height) );touch-action:none;-webkit-user-select:none;user-select:none}:host([disabled]) .track__range,:host([disabled]) .tick--active{background-color:var(--calcite-color-text-3)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.375rem}.scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.5rem}.scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -.55rem}:host([precise]:not([has-histogram])) .container .thumb--value{--calcite-slider-thumb-y-offset: calc(var(--calcite-slider-full-handle-height) * -1)}.thumb-container{position:relative;max-inline-size:100%}.thumb{--calcite-slider-thumb-x-offset: calc(var(--calcite-slider-handle-size) * .5);position:absolute;margin:0;display:flex;cursor:pointer;flex-direction:column;align-items:center;border-style:none;background-color:transparent;padding:0;font-family:inherit;outline:2px solid transparent;outline-offset:2px;transform:translate(var(--calcite-slider-thumb-x-offset),var(--calcite-slider-thumb-y-offset))}.thumb .handle__label.static,.thumb .handle__label.transformed{position:absolute;inset-block:0px;opacity:0}.thumb .handle__label.hyphen:after{content:"\u2014";display:inline-block;inline-size:1em}.thumb .handle__label.hyphen--wrap{display:flex}.thumb .handle{box-sizing:border-box;border-radius:9999px;outline-color:transparent;background-color:var(--calcite-slider-handle-fill-color, var(--calcite-color-foreground-1));block-size:var(--calcite-slider-handle-size);inline-size:var(--calcite-slider-handle-size);box-shadow:0 0 0 2px var(--calcite-color-text-3) inset;transition:border var(--calcite-internal-animation-timing-medium) ease,background-color var(--calcite-internal-animation-timing-medium) ease,box-shadow var(--calcite-animation-timing) ease}.thumb .handle-extension{inline-size:.125rem;block-size:var(--calcite-slider-handle-extension-height);background-color:var(--calcite-slider-handle-extension-color, var(--calcite-color-text-3))}.thumb:hover .handle{box-shadow:0 0 0 3px var(--calcite-color-brand) inset}.thumb:hover .handle-extension{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.thumb:focus .handle{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.thumb:focus .handle-extension{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.thumb.thumb--minValue{transform:translate(calc(var(--calcite-slider-thumb-x-offset) * -1),var(--calcite-slider-thumb-y-offset))}.thumb.thumb--precise{--calcite-slider-thumb-y-offset: -.125rem}:host([label-handles]) .thumb{--calcite-slider-thumb-x-offset: 50%}:host([label-handles]):host(:not([has-histogram])) .scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -1.4375rem}:host([label-handles]):host(:not([has-histogram])) .scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -1.875rem}:host([label-handles]):host(:not([has-histogram])) .scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset: -2rem}:host([has-histogram][label-handles]) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--minValue.thumb--precise .handle__label{margin-block-start:.5em}:host(:not([has-histogram]):not([precise])) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--value .handle__label{margin-block-end:.5em}:host([label-handles][precise]):host(:not([has-histogram])) .scale--s .thumb--value{--calcite-slider-thumb-y-offset: -2.075rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--m .thumb--value{--calcite-slider-thumb-y-offset: -2.75rem}:host([label-handles][precise]):host(:not([has-histogram])) .scale--l .thumb--value{--calcite-slider-thumb-y-offset: -3.0625rem}.thumb:focus .handle,.thumb--active .handle{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand));box-shadow:0 0 8px #00000029}.thumb:hover.thumb--precise:after,.thumb:focus.thumb--precise:after,.thumb--active.thumb--precise:after{background-color:var(--calcite-slider-accent-color, var(--calcite-color-brand))}.track{position:relative;block-size:.125rem;border-radius:0;background-color:var(--calcite-slider-track-color, var(--calcite-color-border-2));transition:all var(--calcite-internal-animation-timing-medium) ease-in}.track__range{position:absolute;inset-block-start:0px;block-size:.125rem;background-color:var(--calcite-slider-track-fill-color, var(--calcite-color-brand))}.container--range .track__range:hover{cursor:ew-resize}.container--range .track__range:after{position:absolute;inline-size:100%;content:"";inset-block-start:calc(var(--calcite-slider-full-handle-height) * .5 * -1);block-size:calc(var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height))}@media (forced-colors: active){.thumb{outline-width:0;outline-offset:0}.handle{outline:2px solid transparent;outline-offset:2px}.thumb:focus .handle,.thumb .handle-extension,.thumb:hover .handle-extension,.thumb:focus .handle-extension,.thumb:active .handle-extension{background-color:canvasText}.track{background-color:canvasText}.track__range{background-color:highlight}}.tick{position:absolute;block-size:.25rem;inline-size:.125rem;border-width:1px;border-style:solid;background-color:var(--calcite-slider-tick-color, var(--calcite-color-border-input));border-color:var(--calcite-slider-tick-border-color, var(--calcite-color-foreground-1));inset-block-start:-2px;pointer-events:none;margin-inline-start:-.125rem}.tick--active{background-color:var(--calcite-slider-tick-selected-color, var(--calcite-color-brand))}.tick__label{pointer-events:none;margin-block-start:.875rem;display:flex;justify-content:center}.tick__label--min{transition:opacity var(--calcite-animation-timing)}.tick__label--max{transition:opacity var(--calcite-internal-animation-timing-fast)}:host([has-histogram][label-handles]) .tick__label--min,:host([has-histogram][label-handles]) .tick__label--max,:host([has-histogram][precise]) .tick__label--min,:host([has-histogram][precise]) .tick__label--max{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-3)}.graph{color:var(--calcite-slider-graph-color, var(--calcite-color-foreground-3));block-size:48px}:host([label-ticks][ticks]) .container{padding-block-end:calc(.875rem + var(--calcite-slider-container-font-size))}:host([has-histogram]):host([precise][label-handles]) .container{padding-block-end:calc(var(--calcite-slider-full-handle-height) + 1em)}:host([has-histogram]):host([label-handles]:not([precise])) .container{padding-block-end:calc(var(--calcite-slider-handle-size) * .5 + 1em)}:host([has-histogram]):host([precise]:not([label-handles])) .container{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container{padding-block-start:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container--range{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([label-handles]:not([precise])) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container--range{padding-block-end:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`;function p(S){return Array.isArray(S)}var D=class extends C{constructor(){super(),this.activeProp="value",this.dragEnd=e=>{this.disabled||(this.removeDragListeners(),this.focusActiveHandle(e.clientX),this.lastDragPropValue!=this[this.dragProp]&&this.emitChange(),this.dragProp=null,this.lastDragPropValue=null,this.minValueDragRange=null,this.maxValueDragRange=null,this.minMaxValueRange=null)},this.dragUpdate=e=>{if(!this.disabled&&(e.preventDefault(),this.dragProp)){let t=this.mapToRange(e.clientX||e.pageX);if(p(this.value)&&this.dragProp==="minMaxValue")if(this.minValueDragRange&&this.maxValueDragRange&&this.minMaxValueRange){let a=t-this.minValueDragRange,i=t+this.maxValueDragRange;i<=this.max&&a>=this.min&&i-a===this.minMaxValueRange&&this.setValue({minValue:this.clamp(a,"minValue"),maxValue:this.clamp(i,"maxValue")})}else this.minValueDragRange=t-this.minValue,this.maxValueDragRange=this.maxValue-t,this.minMaxValueRange=this.maxValue-this.minValue;else this.setValue({[this.dragProp]:this.clamp(t,this.dragProp)})}},this.formatValue=e=>(L.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},L.localize(e.toString())),this.guid=`calcite-slider-${X()}`,this.messages=N({name:null}),this.pointerUpDragEnd=e=>{this.disabled||!_(e)||this.dragEnd(e)},this.maxValueDragRange=null,this.minMaxValueRange=null,this.minValueDragRange=null,this.tickValues=[],this.disabled=!1,this.fillPlacement="start",this.groupSeparator=!1,this.hasHistogram=!1,this.labelHandles=!1,this.labelTicks=!1,this.max=100,this.min=0,this.mirrored=!1,this.precise=!1,this.required=!1,this.scale="m",this.snap=!1,this.status="idle",this.step=1,this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.value=0,this.calciteSliderChange=w({cancelable:!1}),this.calciteSliderInput=w({cancelable:!1}),this.listen("pointerdown",this.pointerDownHandler),this.listen("keydown",this.handleKeyDown),this.listen("touchstart",this.handleTouchStart)}static{this.properties={maxValueDragRange:16,minMaxValueRange:16,minValueDragRange:16,tickValues:16,disabled:7,fillPlacement:3,form:3,groupSeparator:7,hasHistogram:7,histogram:0,histogramStops:0,labelFormatter:0,labelHandles:7,labelTicks:7,max:11,maxLabel:1,maxValue:9,min:11,minLabel:1,minValue:9,mirrored:7,name:3,numberingSystem:1,pageStep:11,precise:7,required:7,scale:3,snap:7,status:3,step:11,ticks:11,validationIcon:[3,{converter:O}],validationMessage:1,validity:0,value:11}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=ne}async setFocus(){await U(this),(this.minHandle?this.minHandle:this.maxHandle)?.focus()}connectedCallback(){super.connectedCallback(),this.setMinMaxFromValue(),this.setValueFromMinMax(),Z(this),K(this)}load(){A(this),p(this.value)||(this.value=this.snap?this.getClosestStep(this.value):this.clamp(this.value)),Q(this,this.value)}willUpdate(e){e.has("histogram")&&(this.hasHistogram=!!this.histogram),e.has("ticks")&&(this.tickValues=this.generateTickValues()),e.has("value")&&(this.hasUpdated||this.value!==0)&&this.setMinMaxFromValue(),(e.has("minValue")||e.has("maxValue"))&&this.setValueFromMinMax()}updated(){this.labelHandles&&(this.adjustHostObscuredHandleLabel("value"),p(this.value)&&(this.adjustHostObscuredHandleLabel("minValue"),this.precise&&!this.hasHistogram||this.hyphenateCollidingRangeHandleLabels())),this.hideObscuredBoundingTickLabels(),q(this)}loaded(){I(this)}disconnectedCallback(){super.disconnectedCallback(),ee(this),J(this),this.removeDragListeners()}handleKeyDown(e){let t=this.shouldMirror(),{activeProp:a,max:i,min:s,pageStep:r,step:o}=this,n=this[a],{key:h}=e;if(G(h)){e.preventDefault();return}let m;if(h==="ArrowUp"||h==="ArrowRight"?m=n+o*(t&&h==="ArrowRight"?-1:1):h==="ArrowDown"||h==="ArrowLeft"?m=n-o*(t&&h==="ArrowLeft"?-1:1):h==="PageUp"?r&&(m=n+r):h==="PageDown"?r&&(m=n-r):h==="Home"?m=s:h==="End"&&(m=i),isNaN(m))return;e.preventDefault();let d=Number(m.toFixed(T(o)));this.setValue({[a]:this.clamp(d,a)})}pointerDownHandler(e){if(this.disabled||!_(e))return;let t=e.clientX||e.pageX,a=this.mapToRange(t),i="value";p(this.value)&&(a>=this.minValue&&a<=this.maxValue&&this.lastDragProp==="minMaxValue"?i="minMaxValue":i=Math.abs(this.maxValue-a)<Math.abs(this.minValue-a)||a>=this.maxValue?"maxValue":"minValue"),this.lastDragPropValue=this[i],this.dragStart(i),this.el.shadowRoot.querySelector(`.${l.thumb}:active`)||this.setValue({[i]:this.clamp(a,i)}),this.focusActiveHandle(t)}handleTouchStart(e){e.preventDefault()}buildThumbType(e){let t=[e];return this.labelHandles&&t.push("labeled"),this.precise&&t.push("precise"),this.hasHistogram&&t.push("histogram"),t.join("-")}setValueFromMinMax(){let{minValue:e,maxValue:t}=this;typeof e=="number"&&typeof t=="number"&&(this.value=[e,t])}setMinMaxFromValue(){let{value:e}=this;p(e)&&(this.minValue=e[0],this.maxValue=e[1])}onLabelClick(){this.setFocus()}shouldMirror(){return this.mirrored&&!this.hasHistogram}shouldUseMinValue(){return p(this.value)?this.hasHistogram&&this.maxValue===0||!this.hasHistogram&&this.minValue===0:!1}getTickDensity(){let e=(this.max-this.min)/this.ticks/le;return e<1?1:e}generateTickValues(){let e=this.ticks??0;if(e<=0)return[];let t=[this.min],a=this.getTickDensity(),i=e*a,s=this.min;for(;s<this.max;)s+=i,t.push(Math.min(s,this.max));return t.includes(this.max)||t.push(this.max),t}onThumbBlur(){this.activeProp=null}onThumbFocus(e){let t=e.currentTarget;this.activeProp=t.getAttribute("data-value-prop")}onThumbPointerDown(e){let t=e.currentTarget;this.pointerDownDragStart(e,t.getAttribute("data-value-prop"))}onTrackPointerDown(e){this.pointerDownDragStart(e,"minMaxValue")}pointerDownDragStart(e,t){_(e)&&this.dragStart(t)}dragStart(e){this.dragProp=e,this.lastDragProp=this.dragProp,this.activeProp=e,window.addEventListener("pointermove",this.dragUpdate),window.addEventListener("pointerup",this.pointerUpDragEnd),window.addEventListener("pointercancel",this.dragEnd)}focusActiveHandle(e){this.dragProp==="minValue"?this.minHandle.focus():this.dragProp==="maxValue"||this.dragProp==="value"?this.maxHandle.focus():this.dragProp==="minMaxValue"&&this.getClosestHandle(e).focus()}emitInput(){this.calciteSliderInput.emit()}emitChange(){this.calciteSliderChange.emit()}removeDragListeners(){window.removeEventListener("pointermove",this.dragUpdate),window.removeEventListener("pointerup",this.pointerUpDragEnd),window.removeEventListener("pointercancel",this.dragEnd)}setValue(e){let t;Object.keys(e).forEach(a=>{let i=e[a];t||(t=this[a]!==i),this[a]=i}),t&&(this.dragProp||this.emitChange(),this.emitInput())}storeTrackRef(e){this.trackEl=e}storeThumbRef(e){e&&(e.getAttribute("data-value-prop")==="minValue"?this.minHandle=e:this.maxHandle=e)}clamp(e,t){return e=ae(e,this.min,this.max),t==="maxValue"&&(e=Math.max(e,this.minValue)),t==="minValue"&&(e=Math.min(e,this.maxValue)),e}mapToRange(e){let t=this.max-this.min,{left:a,width:i}=this.trackEl.getBoundingClientRect(),s=(e-a)/i,r=this.shouldMirror(),o=this.clamp(this.min+t*(r?1-s:s)),n=Number(o.toFixed(T(this.step)));return this.snap&&this.step?this.getClosestStep(n):n}getClosestStep(e){let{max:t,min:a,step:i}=this,s=new W(`${Math.floor((e-a)/i)}`).multiply(`${i}`).add(`${a}`).toString(),r=this.clamp(Number(s));return r>t&&(r-=i),r}getClosestHandle(e){return this.getDistanceX(this.maxHandle,e)>this.getDistanceX(this.minHandle,e)?this.minHandle:this.maxHandle}getDistanceX(e,t){return Math.abs(e.getBoundingClientRect().left-t)}getFontSizeForElement(e){return Number(window.getComputedStyle(e).getPropertyValue("font-size").match(/\d+/)[0])}getUnitInterval(e){e=this.clamp(e);let t=this.max-this.min;return(e-this.min)/t}adjustHostObscuredHandleLabel(e){let t=this.el.shadowRoot.querySelector(`.handle__label--${e}`),a=this.el.shadowRoot.querySelector(`.handle__label--${e}.static`),i=this.el.shadowRoot.querySelector(`.handle__label--${e}.transformed`),s=a.getBoundingClientRect(),r=this.getHostOffset(s.left,s.right);t.style.transform=`translateX(${r}px)`,i.style.transform=`translateX(${r}px)`}hyphenateCollidingRangeHandleLabels(){let{shadowRoot:e}=this.el,t=this.shouldMirror(),a=t?"value":"minValue",i=t?"minValue":"value",s=e.querySelector(`.handle__label--${a}`),r=e.querySelector(`.handle__label--${a}.static`),o=e.querySelector(`.handle__label--${a}.transformed`),n=this.getHostOffset(r.getBoundingClientRect().left,r.getBoundingClientRect().right),h=e.querySelector(`.handle__label--${i}`),m=e.querySelector(`.handle__label--${i}.static`),d=e.querySelector(`.handle__label--${i}.transformed`),u=this.getHostOffset(m.getBoundingClientRect().left,m.getBoundingClientRect().right),k=this.getFontSizeForElement(s),v=this.getRangeLabelOverlap(o,d),f=s,b=k/2;if(v>0){if(f.classList.add(l.hyphen,l.hyphenWrap),u===0&&n===0){let c=v/2-b;c=Math.sign(c)===-1?Math.abs(c):-c;let y=this.getHostOffset(o.getBoundingClientRect().left+c-b,o.getBoundingClientRect().right+c-b),V=v/2,M=this.getHostOffset(d.getBoundingClientRect().left+V,d.getBoundingClientRect().right+V);y!==0&&(c+=y,V+=y),M!==0&&(c+=M,V+=M),s.style.transform=`translateX(${c}px)`,o.style.transform=`translateX(${c-b}px)`,h.style.transform=`translateX(${V}px)`,d.style.transform=`translateX(${V}px)`}else if(n>0||u>0)s.style.transform=`translateX(${n+b}px)`,h.style.transform=`translateX(${v+u}px)`,d.style.transform=`translateX(${v+u}px)`;else if(n<0||u<0){let c=Math.abs(n)+v-b;c=Math.sign(c)===-1?Math.abs(c):-c,s.style.transform=`translateX(${c}px)`,o.style.transform=`translateX(${c-b}px)`}}else f.classList.remove(l.hyphen,l.hyphenWrap),s.style.transform=`translateX(${n}px)`,o.style.transform=`translateX(${n}px)`,h.style.transform=`translateX(${u}px)`,d.style.transform=`translateX(${u}px)`}hideObscuredBoundingTickLabels(){let e=p(this.value);if(!this.hasHistogram&&!e&&!this.labelHandles&&!this.precise||!this.hasHistogram&&!e&&this.labelHandles&&!this.precise||!this.hasHistogram&&!e&&!this.labelHandles&&this.precise||!this.hasHistogram&&!e&&this.labelHandles&&this.precise||!this.hasHistogram&&e&&!this.precise||this.hasHistogram&&!this.precise&&!this.labelHandles)return;let t=this.el.shadowRoot.querySelector(`.${l.thumbMinValue}`),a=this.el.shadowRoot.querySelector(`.${l.thumbValue}`),i=this.el.shadowRoot.querySelector(`.${l.tickMin}`),s=this.el.shadowRoot.querySelector(`.${l.tickMax}`);!t&&a&&i&&s&&(i.style.opacity=this.isMinTickLabelObscured(i,a)?"0":"1",s.style.opacity=this.isMaxTickLabelObscured(s,a)?"0":"1"),t&&a&&i&&s&&(i.style.opacity=this.isMinTickLabelObscured(i,t)||this.isMinTickLabelObscured(i,a)?"0":"1",s.style.opacity=this.isMaxTickLabelObscured(s,t)||this.isMaxTickLabelObscured(s,a)&&this.hasHistogram?"0":"1")}getHostOffset(e,t){let a=this.el.getBoundingClientRect(),i=7;return e+i<a.left?a.left-e-i:t-i>a.right?-(t-a.right)+i:0}getRangeLabelOverlap(e,t){let a=e.getBoundingClientRect(),i=t.getBoundingClientRect(),s=this.getFontSizeForElement(e),r=a.right+s-i.left;return Math.max(r,0)}isMinTickLabelObscured(e,t){let a=e.getBoundingClientRect(),i=t.getBoundingClientRect();return H(a,i)}isMaxTickLabelObscured(e,t){let a=e.getBoundingClientRect(),i=t.getBoundingClientRect();return H(a,i)}internalLabelFormatter(e,t){let a=this.labelFormatter;return a?a(e,t,this.formatValue)??this.formatValue(e):this.formatValue(e)}render(){let e=this.el.id||this.guid,t=p(this.value)?this.maxValue:this.value,a=this.minValue||this.min,i=this.shouldUseMinValue(),s=this.getUnitInterval(i?this.minValue:a)*100,r=this.getUnitInterval(t)*100,o=this.shouldMirror(),n=p(this.value),h=this.buildThumbType("max"),m=this.renderThumb({type:h,thumbPlacement:h.includes("histogram")?"below":"above",maxInterval:r,minInterval:s,mirror:o}),d=this.buildThumbType("min"),u=n?this.renderThumb({type:d,thumbPlacement:d.includes("histogram")||d.includes("precise")?"below":"above",maxInterval:r,minInterval:s,mirror:o}):null,k=n?"start":this.fillPlacement,v=k==="none"?{left:"unset",right:"unset"}:k==="end"?{left:`${o?s:r}%`,right:`${o?r:s}%`}:{left:`${o?100-r:s}%`,right:`${o?s:100-r}%`};return F(this.el,"id",e),j({disabled:this.disabled,children:x`<div aria-errormessage=${se.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${te(this)} class=${g({[l.container]:!0,[l.containerRange]:n,[`scale--${this.scale}`]:!0})}>${this.renderGraph()}<div class=${g(l.track)} ${R(this.storeTrackRef)}><div class=${g(l.trackRange)} @pointerdown=${this.onTrackPointerDown} style=${$(v)}></div><div class=${g(l.ticks)}>${this.tickValues.map(f=>{let b=`${this.getUnitInterval(f)*100}%`,c=!1;if(k==="start"||k==="end")if(i)c=f>=this.minValue&&f<=this.maxValue;else{let y=k==="start"?a:t,V=k==="start"?t:this.max;c=f>=y&&f<=V}return x`<span class=${g({[l.tick]:!0,[l.tickActive]:c})} style=${$({left:o?"":b,right:o?b:""})}>${this.renderTickLabel(f)}</span>`})}</div></div><div class=${g(l.thumbContainer)}>${u}${m}${Y({component:this})}</div></div>${this.validationMessage&&this.status==="invalid"?ie({icon:this.validationIcon,id:se.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderThumb({type:e,mirror:t,thumbPlacement:a,minInterval:i,maxInterval:s}){let r=e.includes("labeled"),o=e.includes("precise"),n=e.includes("min"),h=p(this.value),m=n?this.minValue:h?this.maxValue:this.value,d=n?"minValue":h?"maxValue":"value",u=n?this.minLabel:h?this.maxLabel:this.minLabel,k=n?this.minValue:m,v=d==="minValue"?this.internalLabelFormatter(this.minValue,"min"):d==="maxValue"?this.internalLabelFormatter(this.maxValue,"max"):this.internalLabelFormatter(m,"value"),f=n?{left:`${t?100-i:i}%`}:{right:`${t?s:100-s}%`},b=`${l.handleLabel} ${n?l.handleLabelMinValue:l.handleLabelValue}`,c=[...r?[x`<span aria-hidden=true class=${g(b)}>${v}</span>`,x`<span aria-hidden=true class=${`${b} ${l.static}`}>${v}</span>`,x`<span aria-hidden=true class=${`${b} ${l.transformed}`}>${v}</span>`]:[],x`<div class=${g(l.handle)}></div>`,o&&x`<div class=${g(l.handleExtension)}></div>`||""];return a==="below"&&c.reverse(),B(e,x`<div .ariaLabel=${u} aria-orientation=horizontal .ariaValueMax=${this.max} .ariaValueMin=${this.min} .ariaValueNow=${k} class=${g({[l.thumb]:!0,[l.thumbValue]:!n,[l.thumbActive]:this.lastDragProp!=="minMaxValue"&&this.dragProp===d,[l.thumbPrecise]:o,[l.thumbMinValue]:n})} data-value-prop=${d??z} @blur=${this.onThumbBlur} @focus=${this.onThumbFocus} @pointerdown=${this.onThumbPointerDown} role=slider style=${$(f)} tabindex=0 ${R(this.storeThumbRef)}>${c}</div>`)}renderGraph(){return this.histogram?x`<calcite-graph class=${g(l.graph)} .colorStops=${this.histogramStops} .data=${this.histogram} .highlightMax=${p(this.value)?this.maxValue:this.value} .highlightMin=${p(this.value)?this.minValue:this.min} .max=${this.max} .min=${this.min}></calcite-graph>`:null}renderTickLabel(e){let{hasHistogram:t,labelHandles:a,labelTicks:i,max:s,min:r,precise:o,value:n}=this,h=p(n),m=e===r,d=e===s,u=m||d;return i&&(!t&&(u||!o||!h)||t&&(u||!o&&!a))?x`<span class=${g({[l.tickLabel]:!0,[l.tickMin]:m,[l.tickMax]:d})}>${this.internalLabelFormatter(e,"tick")}</span>`:null}};E("calcite-slider",D);export{D as Slider};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.33
|
|
5
5
|
*/
|
|
6
|
-
import{a as ae,l as re}from"./F4M2Z3DQ.js";import{H as te}from"./OQM7M4LD.js";var ie=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],B=ie.join(","),oe=typeof Element>"u",R=oe?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,K=!oe&&Element.prototype.getRootNode?function(o){var e;return o==null||(e=o.getRootNode)===null||e===void 0?void 0:e.call(o)}:function(o){return o?.ownerDocument},j=function o(e,t){var a;t===void 0&&(t=!0);var u=e==null||(a=e.getAttribute)===null||a===void 0?void 0:a.call(e,"inert"),s=u===""||u==="true",r=s||t&&e&&o(e.parentNode);return r},Te=function(e){var t,a=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return a===""||a==="true"},ue=function(e,t,a){if(j(e))return[];var u=Array.prototype.slice.apply(e.querySelectorAll(B));return t&&R.call(e,B)&&u.unshift(e),u=u.filter(a),u},se=function o(e,t,a){for(var u=[],s=Array.from(e);s.length;){var r=s.shift();if(!j(r,!1))if(r.tagName==="SLOT"){var v=r.assignedElements(),d=v.length?v:r.children,h=o(d,!0,a);a.flatten?u.push.apply(u,h):u.push({scopeParent:r,candidates:h})}else{var T=R.call(r,B);T&&a.filter(r)&&(t||!e.includes(r))&&u.push(r);var w=r.shadowRoot||typeof a.getShadowRoot=="function"&&a.getShadowRoot(r),S=!j(w,!1)&&(!a.shadowRootFilter||a.shadowRootFilter(r));if(w&&S){var P=o(w===!0?r.children:w.children,!0,a);a.flatten?u.push.apply(u,P):u.push({scopeParent:r,candidates:P})}else s.unshift.apply(s,r.children)}}return u},ce=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},E=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Te(e))&&!ce(e)?0:e.tabIndex},Ne=function(e,t){var a=E(e);return a<0&&t&&!ce(e)?0:a},Fe=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},le=function(e){return e.tagName==="INPUT"},Ee=function(e){return le(e)&&e.type==="hidden"},Se=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(a){return a.tagName==="SUMMARY"});return t},ke=function(e,t){for(var a=0;a<e.length;a++)if(e[a].checked&&e[a].form===t)return e[a]},Re=function(e){if(!e.name)return!0;var t=e.form||K(e),a=function(v){return t.querySelectorAll('input[type="radio"][name="'+v+'"]')},u;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")u=a(window.CSS.escape(e.name));else try{u=a(e.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var s=ke(u,e.form);return!s||s===e},De=function(e){return le(e)&&e.type==="radio"},Pe=function(e){return De(e)&&!Re(e)},Ie=function(e){var t,a=e&&K(e),u=(t=a)===null||t===void 0?void 0:t.host,s=!1;if(a&&a!==e){var r,v,d;for(s=!!((r=u)!==null&&r!==void 0&&(v=r.ownerDocument)!==null&&v!==void 0&&v.contains(u)||e!=null&&(d=e.ownerDocument)!==null&&d!==void 0&&d.contains(e));!s&&u;){var h,T,w;a=K(u),u=(h=a)===null||h===void 0?void 0:h.host,s=!!((T=u)!==null&&T!==void 0&&(w=T.ownerDocument)!==null&&w!==void 0&&w.contains(u))}}return s},ne=function(e){var t=e.getBoundingClientRect(),a=t.width,u=t.height;return a===0&&u===0},Oe=function(e,t){var a=t.displayCheck,u=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=R.call(e,"details>summary:first-of-type"),r=s?e.parentElement:e;if(R.call(r,"details:not([open]) *"))return!0;if(!a||a==="full"||a==="legacy-full"){if(typeof u=="function"){for(var v=e;e;){var d=e.parentElement,h=K(e);if(d&&!d.shadowRoot&&u(d)===!0)return ne(e);e.assignedSlot?e=e.assignedSlot:!d&&h!==e.ownerDocument?e=h.host:e=d}e=v}if(Ie(e))return!e.getClientRects().length;if(a!=="legacy-full")return!0}else if(a==="non-zero-area")return ne(e);return!1},Ce=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var a=0;a<t.children.length;a++){var u=t.children.item(a);if(u.tagName==="LEGEND")return R.call(t,"fieldset[disabled] *")?!0:!u.contains(e)}return!0}t=t.parentElement}return!1},M=function(e,t){return!(t.disabled||j(t)||Ee(t)||Oe(t,e)||Se(t)||Ce(t))},W=function(e,t){return!(Pe(t)||E(t)<0||!M(e,t))},Ae=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},xe=function o(e){var t=[],a=[];return e.forEach(function(u,s){var r=!!u.scopeParent,v=r?u.scopeParent:u,d=Ne(v,r),h=r?o(u.candidates):v;d===0?r?t.push.apply(t,h):t.push(v):a.push({documentOrder:s,tabIndex:d,item:u,isScope:r,content:h})}),a.sort(Fe).reduce(function(u,s){return s.isScope?u.push.apply(u,s.content):u.push(s.content),u},[]).concat(t)},fe=function(e,t){t=t||{};var a;return t.getShadowRoot?a=se([e],t.includeContainer,{filter:W.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ae}):a=ue(e,t.includeContainer,W.bind(null,t)),xe(a)},de=function(e,t){t=t||{};var a;return t.getShadowRoot?a=se([e],t.includeContainer,{filter:M.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):a=ue(e,t.includeContainer,M.bind(null,t)),a},D=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return R.call(e,B)===!1?!1:W(t,e)},Le=ie.concat("iframe").join(","),G=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return R.call(e,Le)===!1?!1:M(t,e)};function Be(o,e,t){return(e=je(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function ve(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(o);e&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(o,u).enumerable})),t.push.apply(t,a)}return t}function be(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ve(Object(t),!0).forEach(function(a){Be(o,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ve(Object(t)).forEach(function(a){Object.defineProperty(o,a,Object.getOwnPropertyDescriptor(t,a))})}return o}function Ke(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var a=t.call(o,e||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function je(o){var e=Ke(o,"string");return typeof e=="symbol"?e:e+""}var pe={activateTrap:function(e,t){if(e.length>0){var a=e[e.length-1];a!==t&&a.pause()}var u=e.indexOf(t);u===-1||e.splice(u,1),e.push(t)},deactivateTrap:function(e,t){var a=e.indexOf(t);a!==-1&&e.splice(a,1),e.length>0&&e[e.length-1].unpause()}},Me=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Ge=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},x=function(e){return e?.key==="Tab"||e?.keyCode===9},Ue=function(e){return x(e)&&!e.shiftKey},qe=function(e){return x(e)&&e.shiftKey},he=function(e){return setTimeout(e,0)},ge=function(e,t){var a=-1;return e.every(function(u,s){return t(u)?(a=s,!1):!0}),a},A=function(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),u=1;u<t;u++)a[u-1]=arguments[u];return typeof e=="function"?e.apply(void 0,a):e},U=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Ve=[],me=function(e,t){var a=t?.document||document,u=t?.trapStack||Ve,s=be({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Ue,isKeyBackward:qe},t),r={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},v,d=function(n,i,c){return n&&n[i]!==void 0?n[i]:s[c||i]},h=function(n,i){var c=typeof i?.composedPath=="function"?i.composedPath():void 0;return r.containerGroups.findIndex(function(l){var f=l.container,p=l.tabbableNodes;return f.contains(n)||c?.includes(f)||p.find(function(g){return g===n})})},T=function(n){var i=s[n];if(typeof i=="function"){for(var c=arguments.length,l=new Array(c>1?c-1:0),f=1;f<c;f++)l[f-1]=arguments[f];i=i.apply(void 0,l)}if(i===!0&&(i=void 0),!i){if(i===void 0||i===!1)return i;throw new Error("`".concat(n,"` was specified but was not a node, or did not return a node"))}var p=i;if(typeof i=="string"&&(p=a.querySelector(i),!p))throw new Error("`".concat(n,"` as selector refers to no known node"));return p},w=function(){var n=T("initialFocus");if(n===!1)return!1;if(n===void 0||!G(n,s.tabbableOptions))if(h(a.activeElement)>=0)n=a.activeElement;else{var i=r.tabbableGroups[0],c=i&&i.firstTabbableNode;n=c||T("fallbackFocus")}if(!n)throw new Error("Your focus-trap needs to have at least one focusable element");return n},S=function(){if(r.containerGroups=r.containers.map(function(n){var i=fe(n,s.tabbableOptions),c=de(n,s.tabbableOptions),l=i.length>0?i[0]:void 0,f=i.length>0?i[i.length-1]:void 0,p=c.find(function(m){return D(m)}),g=c.slice().reverse().find(function(m){return D(m)}),y=!!i.find(function(m){return E(m)>0});return{container:n,tabbableNodes:i,focusableNodes:c,posTabIndexesFound:y,firstTabbableNode:l,lastTabbableNode:f,firstDomTabbableNode:p,lastDomTabbableNode:g,nextTabbableNode:function(k){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,F=i.indexOf(k);return F<0?O?c.slice(c.indexOf(k)+1).find(function(C){return D(C)}):c.slice(0,c.indexOf(k)).reverse().find(function(C){return D(C)}):i[F+(O?1:-1)]}}}),r.tabbableGroups=r.containerGroups.filter(function(n){return n.tabbableNodes.length>0}),r.tabbableGroups.length<=0&&!T("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(r.containerGroups.find(function(n){return n.posTabIndexesFound})&&r.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},P=function(n){var i=n.activeElement;if(i)return i.shadowRoot&&i.shadowRoot.activeElement!==null?P(i.shadowRoot):i},N=function(n){if(n!==!1&&n!==P(document)){if(!n||!n.focus){N(w());return}n.focus({preventScroll:!!s.preventScroll}),r.mostRecentlyFocusedNode=n,Me(n)&&n.select()}},Z=function(n){var i=T("setReturnFocus",n);return i||(i===!1?!1:n)},z=function(n){var i=n.target,c=n.event,l=n.isBackward,f=l===void 0?!1:l;i=i||U(c),S();var p=null;if(r.tabbableGroups.length>0){var g=h(i,c),y=g>=0?r.containerGroups[g]:void 0;if(g<0)f?p=r.tabbableGroups[r.tabbableGroups.length-1].lastTabbableNode:p=r.tabbableGroups[0].firstTabbableNode;else if(f){var m=ge(r.tabbableGroups,function(V){var Y=V.firstTabbableNode;return i===Y});if(m<0&&(y.container===i||G(i,s.tabbableOptions)&&!D(i,s.tabbableOptions)&&!y.nextTabbableNode(i,!1))&&(m=g),m>=0){var k=m===0?r.tabbableGroups.length-1:m-1,O=r.tabbableGroups[k];p=E(i)>=0?O.lastTabbableNode:O.lastDomTabbableNode}else x(c)||(p=y.nextTabbableNode(i,!1))}else{var F=ge(r.tabbableGroups,function(V){var Y=V.lastTabbableNode;return i===Y});if(F<0&&(y.container===i||G(i,s.tabbableOptions)&&!D(i,s.tabbableOptions)&&!y.nextTabbableNode(i))&&(F=g),F>=0){var C=F===r.tabbableGroups.length-1?0:F+1,ee=r.tabbableGroups[C];p=E(i)>=0?ee.firstTabbableNode:ee.firstDomTabbableNode}else x(c)||(p=y.nextTabbableNode(i))}}else p=T("fallbackFocus");return p},L=function(n){var i=U(n);if(!(h(i,n)>=0)){if(A(s.clickOutsideDeactivates,n)){v.deactivate({returnFocus:s.returnFocusOnDeactivate});return}A(s.allowOutsideClick,n)||n.preventDefault()}},X=function(n){var i=U(n),c=h(i,n)>=0;if(c||i instanceof Document)c&&(r.mostRecentlyFocusedNode=i);else{n.stopImmediatePropagation();var l,f=!0;if(r.mostRecentlyFocusedNode)if(E(r.mostRecentlyFocusedNode)>0){var p=h(r.mostRecentlyFocusedNode),g=r.containerGroups[p].tabbableNodes;if(g.length>0){var y=g.findIndex(function(m){return m===r.mostRecentlyFocusedNode});y>=0&&(s.isKeyForward(r.recentNavEvent)?y+1<g.length&&(l=g[y+1],f=!1):y-1>=0&&(l=g[y-1],f=!1))}}else r.containerGroups.some(function(m){return m.tabbableNodes.some(function(k){return E(k)>0})})||(f=!1);else f=!1;f&&(l=z({target:r.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(r.recentNavEvent)})),N(l||r.mostRecentlyFocusedNode||w())}r.recentNavEvent=void 0},ye=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;r.recentNavEvent=n;var c=z({event:n,isBackward:i});c&&(x(n)&&n.preventDefault(),N(c))},$=function(n){(s.isKeyForward(n)||s.isKeyBackward(n))&&ye(n,s.isKeyBackward(n))},J=function(n){Ge(n)&&A(s.escapeDeactivates,n)!==!1&&(n.preventDefault(),v.deactivate())},Q=function(n){var i=U(n);h(i,n)>=0||A(s.clickOutsideDeactivates,n)||A(s.allowOutsideClick,n)||(n.preventDefault(),n.stopImmediatePropagation())},H=function(){if(r.active)return pe.activateTrap(u,v),r.delayInitialFocusTimer=s.delayInitialFocus?he(function(){N(w())}):N(w()),a.addEventListener("focusin",X,!0),a.addEventListener("mousedown",L,{capture:!0,passive:!1}),a.addEventListener("touchstart",L,{capture:!0,passive:!1}),a.addEventListener("click",Q,{capture:!0,passive:!1}),a.addEventListener("keydown",$,{capture:!0,passive:!1}),a.addEventListener("keydown",J),v},_=function(){if(r.active)return a.removeEventListener("focusin",X,!0),a.removeEventListener("mousedown",L,!0),a.removeEventListener("touchstart",L,!0),a.removeEventListener("click",Q,!0),a.removeEventListener("keydown",$,!0),a.removeEventListener("keydown",J),v},we=function(n){var i=n.some(function(c){var l=Array.from(c.removedNodes);return l.some(function(f){return f===r.mostRecentlyFocusedNode})});i&&N(w())},q=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(we):void 0,I=function(){q&&(q.disconnect(),r.active&&!r.paused&&r.containers.map(function(n){q.observe(n,{subtree:!0,childList:!0})}))};return v={get active(){return r.active},get paused(){return r.paused},activate:function(n){if(r.active)return this;var i=d(n,"onActivate"),c=d(n,"onPostActivate"),l=d(n,"checkCanFocusTrap");l||S(),r.active=!0,r.paused=!1,r.nodeFocusedBeforeActivation=a.activeElement,i?.();var f=function(){l&&S(),H(),I(),c?.()};return l?(l(r.containers.concat()).then(f,f),this):(f(),this)},deactivate:function(n){if(!r.active)return this;var i=be({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},n);clearTimeout(r.delayInitialFocusTimer),r.delayInitialFocusTimer=void 0,_(),r.active=!1,r.paused=!1,I(),pe.deactivateTrap(u,v);var c=d(i,"onDeactivate"),l=d(i,"onPostDeactivate"),f=d(i,"checkCanReturnFocus"),p=d(i,"returnFocus","returnFocusOnDeactivate");c?.();var g=function(){he(function(){p&&N(Z(r.nodeFocusedBeforeActivation)),l?.()})};return p&&f?(f(Z(r.nodeFocusedBeforeActivation)).then(g,g),this):(g(),this)},pause:function(n){if(r.paused||!r.active)return this;var i=d(n,"onPause"),c=d(n,"onPostPause");return r.paused=!0,i?.(),_(),I(),c?.(),this},unpause:function(n){if(!r.paused||!r.active)return this;var i=d(n,"onUnpause"),c=d(n,"onPostUnpause");return r.paused=!1,i?.(),S(),H(),I(),c?.(),this},updateContainerElements:function(n){var i=[].concat(n).filter(Boolean);return r.containers=i.map(function(c){return typeof c=="string"?a.querySelector(c):c}),r.active&&S(),I(),this}},v.updateContainerElements(e),v};function Je(o,e){let{el:t}=o,a=e?.focusTrapEl||t;if(!a)return;let u={fallbackFocus:a,setReturnFocus:s=>(re(s),!1),...e?.focusTrapOptions,document:t.ownerDocument,tabbableOptions:ae,trapStack:te};o.focusTrap=me(a,u)}function Qe(o,e){o.focusTrapDisabled||o.focusTrap?.activate(e)}function He(o,e){o.focusTrap?.deactivate(e)}function _e(o){o.focusTrap?.updateContainerElements(o.el)}export{Je as a,Qe as b,He as c,_e as d};
|
|
6
|
+
import{a as ae,l as re}from"./SIT6OTCT.js";import{H as te}from"./4RCOCFTP.js";var ie=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],B=ie.join(","),oe=typeof Element>"u",R=oe?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,K=!oe&&Element.prototype.getRootNode?function(o){var e;return o==null||(e=o.getRootNode)===null||e===void 0?void 0:e.call(o)}:function(o){return o?.ownerDocument},j=function o(e,t){var a;t===void 0&&(t=!0);var u=e==null||(a=e.getAttribute)===null||a===void 0?void 0:a.call(e,"inert"),s=u===""||u==="true",r=s||t&&e&&o(e.parentNode);return r},Te=function(e){var t,a=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return a===""||a==="true"},ue=function(e,t,a){if(j(e))return[];var u=Array.prototype.slice.apply(e.querySelectorAll(B));return t&&R.call(e,B)&&u.unshift(e),u=u.filter(a),u},se=function o(e,t,a){for(var u=[],s=Array.from(e);s.length;){var r=s.shift();if(!j(r,!1))if(r.tagName==="SLOT"){var v=r.assignedElements(),d=v.length?v:r.children,h=o(d,!0,a);a.flatten?u.push.apply(u,h):u.push({scopeParent:r,candidates:h})}else{var T=R.call(r,B);T&&a.filter(r)&&(t||!e.includes(r))&&u.push(r);var w=r.shadowRoot||typeof a.getShadowRoot=="function"&&a.getShadowRoot(r),S=!j(w,!1)&&(!a.shadowRootFilter||a.shadowRootFilter(r));if(w&&S){var P=o(w===!0?r.children:w.children,!0,a);a.flatten?u.push.apply(u,P):u.push({scopeParent:r,candidates:P})}else s.unshift.apply(s,r.children)}}return u},ce=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},E=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Te(e))&&!ce(e)?0:e.tabIndex},Ne=function(e,t){var a=E(e);return a<0&&t&&!ce(e)?0:a},Fe=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},le=function(e){return e.tagName==="INPUT"},Ee=function(e){return le(e)&&e.type==="hidden"},Se=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(a){return a.tagName==="SUMMARY"});return t},ke=function(e,t){for(var a=0;a<e.length;a++)if(e[a].checked&&e[a].form===t)return e[a]},Re=function(e){if(!e.name)return!0;var t=e.form||K(e),a=function(v){return t.querySelectorAll('input[type="radio"][name="'+v+'"]')},u;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")u=a(window.CSS.escape(e.name));else try{u=a(e.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var s=ke(u,e.form);return!s||s===e},De=function(e){return le(e)&&e.type==="radio"},Pe=function(e){return De(e)&&!Re(e)},Ie=function(e){var t,a=e&&K(e),u=(t=a)===null||t===void 0?void 0:t.host,s=!1;if(a&&a!==e){var r,v,d;for(s=!!((r=u)!==null&&r!==void 0&&(v=r.ownerDocument)!==null&&v!==void 0&&v.contains(u)||e!=null&&(d=e.ownerDocument)!==null&&d!==void 0&&d.contains(e));!s&&u;){var h,T,w;a=K(u),u=(h=a)===null||h===void 0?void 0:h.host,s=!!((T=u)!==null&&T!==void 0&&(w=T.ownerDocument)!==null&&w!==void 0&&w.contains(u))}}return s},ne=function(e){var t=e.getBoundingClientRect(),a=t.width,u=t.height;return a===0&&u===0},Oe=function(e,t){var a=t.displayCheck,u=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=R.call(e,"details>summary:first-of-type"),r=s?e.parentElement:e;if(R.call(r,"details:not([open]) *"))return!0;if(!a||a==="full"||a==="legacy-full"){if(typeof u=="function"){for(var v=e;e;){var d=e.parentElement,h=K(e);if(d&&!d.shadowRoot&&u(d)===!0)return ne(e);e.assignedSlot?e=e.assignedSlot:!d&&h!==e.ownerDocument?e=h.host:e=d}e=v}if(Ie(e))return!e.getClientRects().length;if(a!=="legacy-full")return!0}else if(a==="non-zero-area")return ne(e);return!1},Ce=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var a=0;a<t.children.length;a++){var u=t.children.item(a);if(u.tagName==="LEGEND")return R.call(t,"fieldset[disabled] *")?!0:!u.contains(e)}return!0}t=t.parentElement}return!1},M=function(e,t){return!(t.disabled||j(t)||Ee(t)||Oe(t,e)||Se(t)||Ce(t))},W=function(e,t){return!(Pe(t)||E(t)<0||!M(e,t))},Ae=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},xe=function o(e){var t=[],a=[];return e.forEach(function(u,s){var r=!!u.scopeParent,v=r?u.scopeParent:u,d=Ne(v,r),h=r?o(u.candidates):v;d===0?r?t.push.apply(t,h):t.push(v):a.push({documentOrder:s,tabIndex:d,item:u,isScope:r,content:h})}),a.sort(Fe).reduce(function(u,s){return s.isScope?u.push.apply(u,s.content):u.push(s.content),u},[]).concat(t)},fe=function(e,t){t=t||{};var a;return t.getShadowRoot?a=se([e],t.includeContainer,{filter:W.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ae}):a=ue(e,t.includeContainer,W.bind(null,t)),xe(a)},de=function(e,t){t=t||{};var a;return t.getShadowRoot?a=se([e],t.includeContainer,{filter:M.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):a=ue(e,t.includeContainer,M.bind(null,t)),a},D=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return R.call(e,B)===!1?!1:W(t,e)},Le=ie.concat("iframe").join(","),G=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return R.call(e,Le)===!1?!1:M(t,e)};function Be(o,e,t){return(e=je(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function ve(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(o);e&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(o,u).enumerable})),t.push.apply(t,a)}return t}function be(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ve(Object(t),!0).forEach(function(a){Be(o,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ve(Object(t)).forEach(function(a){Object.defineProperty(o,a,Object.getOwnPropertyDescriptor(t,a))})}return o}function Ke(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var a=t.call(o,e||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function je(o){var e=Ke(o,"string");return typeof e=="symbol"?e:e+""}var pe={activateTrap:function(e,t){if(e.length>0){var a=e[e.length-1];a!==t&&a.pause()}var u=e.indexOf(t);u===-1||e.splice(u,1),e.push(t)},deactivateTrap:function(e,t){var a=e.indexOf(t);a!==-1&&e.splice(a,1),e.length>0&&e[e.length-1].unpause()}},Me=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Ge=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},x=function(e){return e?.key==="Tab"||e?.keyCode===9},Ue=function(e){return x(e)&&!e.shiftKey},qe=function(e){return x(e)&&e.shiftKey},he=function(e){return setTimeout(e,0)},ge=function(e,t){var a=-1;return e.every(function(u,s){return t(u)?(a=s,!1):!0}),a},A=function(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),u=1;u<t;u++)a[u-1]=arguments[u];return typeof e=="function"?e.apply(void 0,a):e},U=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Ve=[],me=function(e,t){var a=t?.document||document,u=t?.trapStack||Ve,s=be({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Ue,isKeyBackward:qe},t),r={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},v,d=function(n,i,c){return n&&n[i]!==void 0?n[i]:s[c||i]},h=function(n,i){var c=typeof i?.composedPath=="function"?i.composedPath():void 0;return r.containerGroups.findIndex(function(l){var f=l.container,p=l.tabbableNodes;return f.contains(n)||c?.includes(f)||p.find(function(g){return g===n})})},T=function(n){var i=s[n];if(typeof i=="function"){for(var c=arguments.length,l=new Array(c>1?c-1:0),f=1;f<c;f++)l[f-1]=arguments[f];i=i.apply(void 0,l)}if(i===!0&&(i=void 0),!i){if(i===void 0||i===!1)return i;throw new Error("`".concat(n,"` was specified but was not a node, or did not return a node"))}var p=i;if(typeof i=="string"&&(p=a.querySelector(i),!p))throw new Error("`".concat(n,"` as selector refers to no known node"));return p},w=function(){var n=T("initialFocus");if(n===!1)return!1;if(n===void 0||!G(n,s.tabbableOptions))if(h(a.activeElement)>=0)n=a.activeElement;else{var i=r.tabbableGroups[0],c=i&&i.firstTabbableNode;n=c||T("fallbackFocus")}if(!n)throw new Error("Your focus-trap needs to have at least one focusable element");return n},S=function(){if(r.containerGroups=r.containers.map(function(n){var i=fe(n,s.tabbableOptions),c=de(n,s.tabbableOptions),l=i.length>0?i[0]:void 0,f=i.length>0?i[i.length-1]:void 0,p=c.find(function(m){return D(m)}),g=c.slice().reverse().find(function(m){return D(m)}),y=!!i.find(function(m){return E(m)>0});return{container:n,tabbableNodes:i,focusableNodes:c,posTabIndexesFound:y,firstTabbableNode:l,lastTabbableNode:f,firstDomTabbableNode:p,lastDomTabbableNode:g,nextTabbableNode:function(k){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,F=i.indexOf(k);return F<0?O?c.slice(c.indexOf(k)+1).find(function(C){return D(C)}):c.slice(0,c.indexOf(k)).reverse().find(function(C){return D(C)}):i[F+(O?1:-1)]}}}),r.tabbableGroups=r.containerGroups.filter(function(n){return n.tabbableNodes.length>0}),r.tabbableGroups.length<=0&&!T("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(r.containerGroups.find(function(n){return n.posTabIndexesFound})&&r.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},P=function(n){var i=n.activeElement;if(i)return i.shadowRoot&&i.shadowRoot.activeElement!==null?P(i.shadowRoot):i},N=function(n){if(n!==!1&&n!==P(document)){if(!n||!n.focus){N(w());return}n.focus({preventScroll:!!s.preventScroll}),r.mostRecentlyFocusedNode=n,Me(n)&&n.select()}},Z=function(n){var i=T("setReturnFocus",n);return i||(i===!1?!1:n)},z=function(n){var i=n.target,c=n.event,l=n.isBackward,f=l===void 0?!1:l;i=i||U(c),S();var p=null;if(r.tabbableGroups.length>0){var g=h(i,c),y=g>=0?r.containerGroups[g]:void 0;if(g<0)f?p=r.tabbableGroups[r.tabbableGroups.length-1].lastTabbableNode:p=r.tabbableGroups[0].firstTabbableNode;else if(f){var m=ge(r.tabbableGroups,function(V){var Y=V.firstTabbableNode;return i===Y});if(m<0&&(y.container===i||G(i,s.tabbableOptions)&&!D(i,s.tabbableOptions)&&!y.nextTabbableNode(i,!1))&&(m=g),m>=0){var k=m===0?r.tabbableGroups.length-1:m-1,O=r.tabbableGroups[k];p=E(i)>=0?O.lastTabbableNode:O.lastDomTabbableNode}else x(c)||(p=y.nextTabbableNode(i,!1))}else{var F=ge(r.tabbableGroups,function(V){var Y=V.lastTabbableNode;return i===Y});if(F<0&&(y.container===i||G(i,s.tabbableOptions)&&!D(i,s.tabbableOptions)&&!y.nextTabbableNode(i))&&(F=g),F>=0){var C=F===r.tabbableGroups.length-1?0:F+1,ee=r.tabbableGroups[C];p=E(i)>=0?ee.firstTabbableNode:ee.firstDomTabbableNode}else x(c)||(p=y.nextTabbableNode(i))}}else p=T("fallbackFocus");return p},L=function(n){var i=U(n);if(!(h(i,n)>=0)){if(A(s.clickOutsideDeactivates,n)){v.deactivate({returnFocus:s.returnFocusOnDeactivate});return}A(s.allowOutsideClick,n)||n.preventDefault()}},X=function(n){var i=U(n),c=h(i,n)>=0;if(c||i instanceof Document)c&&(r.mostRecentlyFocusedNode=i);else{n.stopImmediatePropagation();var l,f=!0;if(r.mostRecentlyFocusedNode)if(E(r.mostRecentlyFocusedNode)>0){var p=h(r.mostRecentlyFocusedNode),g=r.containerGroups[p].tabbableNodes;if(g.length>0){var y=g.findIndex(function(m){return m===r.mostRecentlyFocusedNode});y>=0&&(s.isKeyForward(r.recentNavEvent)?y+1<g.length&&(l=g[y+1],f=!1):y-1>=0&&(l=g[y-1],f=!1))}}else r.containerGroups.some(function(m){return m.tabbableNodes.some(function(k){return E(k)>0})})||(f=!1);else f=!1;f&&(l=z({target:r.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(r.recentNavEvent)})),N(l||r.mostRecentlyFocusedNode||w())}r.recentNavEvent=void 0},ye=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;r.recentNavEvent=n;var c=z({event:n,isBackward:i});c&&(x(n)&&n.preventDefault(),N(c))},$=function(n){(s.isKeyForward(n)||s.isKeyBackward(n))&&ye(n,s.isKeyBackward(n))},J=function(n){Ge(n)&&A(s.escapeDeactivates,n)!==!1&&(n.preventDefault(),v.deactivate())},Q=function(n){var i=U(n);h(i,n)>=0||A(s.clickOutsideDeactivates,n)||A(s.allowOutsideClick,n)||(n.preventDefault(),n.stopImmediatePropagation())},H=function(){if(r.active)return pe.activateTrap(u,v),r.delayInitialFocusTimer=s.delayInitialFocus?he(function(){N(w())}):N(w()),a.addEventListener("focusin",X,!0),a.addEventListener("mousedown",L,{capture:!0,passive:!1}),a.addEventListener("touchstart",L,{capture:!0,passive:!1}),a.addEventListener("click",Q,{capture:!0,passive:!1}),a.addEventListener("keydown",$,{capture:!0,passive:!1}),a.addEventListener("keydown",J),v},_=function(){if(r.active)return a.removeEventListener("focusin",X,!0),a.removeEventListener("mousedown",L,!0),a.removeEventListener("touchstart",L,!0),a.removeEventListener("click",Q,!0),a.removeEventListener("keydown",$,!0),a.removeEventListener("keydown",J),v},we=function(n){var i=n.some(function(c){var l=Array.from(c.removedNodes);return l.some(function(f){return f===r.mostRecentlyFocusedNode})});i&&N(w())},q=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(we):void 0,I=function(){q&&(q.disconnect(),r.active&&!r.paused&&r.containers.map(function(n){q.observe(n,{subtree:!0,childList:!0})}))};return v={get active(){return r.active},get paused(){return r.paused},activate:function(n){if(r.active)return this;var i=d(n,"onActivate"),c=d(n,"onPostActivate"),l=d(n,"checkCanFocusTrap");l||S(),r.active=!0,r.paused=!1,r.nodeFocusedBeforeActivation=a.activeElement,i?.();var f=function(){l&&S(),H(),I(),c?.()};return l?(l(r.containers.concat()).then(f,f),this):(f(),this)},deactivate:function(n){if(!r.active)return this;var i=be({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},n);clearTimeout(r.delayInitialFocusTimer),r.delayInitialFocusTimer=void 0,_(),r.active=!1,r.paused=!1,I(),pe.deactivateTrap(u,v);var c=d(i,"onDeactivate"),l=d(i,"onPostDeactivate"),f=d(i,"checkCanReturnFocus"),p=d(i,"returnFocus","returnFocusOnDeactivate");c?.();var g=function(){he(function(){p&&N(Z(r.nodeFocusedBeforeActivation)),l?.()})};return p&&f?(f(Z(r.nodeFocusedBeforeActivation)).then(g,g),this):(g(),this)},pause:function(n){if(r.paused||!r.active)return this;var i=d(n,"onPause"),c=d(n,"onPostPause");return r.paused=!0,i?.(),_(),I(),c?.(),this},unpause:function(n){if(!r.paused||!r.active)return this;var i=d(n,"onUnpause"),c=d(n,"onPostUnpause");return r.paused=!1,i?.(),S(),H(),I(),c?.(),this},updateContainerElements:function(n){var i=[].concat(n).filter(Boolean);return r.containers=i.map(function(c){return typeof c=="string"?a.querySelector(c):c}),r.active&&S(),I(),this}},v.updateContainerElements(e),v};function Je(o,e){let{el:t}=o,a=e?.focusTrapEl||t;if(!a)return;let u={fallbackFocus:a,setReturnFocus:s=>(re(s),!1),...e?.focusTrapOptions,document:t.ownerDocument,tabbableOptions:ae,trapStack:te};o.focusTrap=me(a,u)}function Qe(o,e){o.focusTrapDisabled||o.focusTrap?.activate(e)}function He(o,e){o.focusTrap?.deactivate(e)}function _e(o){o.focusTrap?.updateContainerElements(o.el)}export{Je as a,Qe as b,He as c,_e as d};
|