@esri/calcite-components 3.3.0-next.63 → 3.3.0-next.64
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/{MD73IHVV.js → 22DKEM4U.js} +1 -1
- package/dist/calcite/{FHY4ZRYR.js → 2HSTPP2A.js} +2 -2
- package/dist/calcite/{KN5DRBMX.js → 2OPYQDKQ.js} +2 -2
- package/dist/calcite/{SDJ4JBMO.js → 2RJH4NMY.js} +2 -2
- package/dist/calcite/{7HSQCSR5.js → 2S665CEV.js} +1 -1
- package/dist/calcite/{OAQKWWCU.js → 2TW2GME3.js} +2 -2
- package/dist/calcite/{ZME6UZJF.js → 2VZLFAT4.js} +2 -2
- package/dist/calcite/{S33QBYG5.js → 34QEIYUP.js} +2 -2
- package/dist/calcite/{AXR5TEB7.js → 3EOSX2DC.js} +2 -2
- package/dist/calcite/{4GXX66ME.js → 3GZGUZU6.js} +2 -2
- package/dist/calcite/{NNSWYXCA.js → 3PLCSI2R.js} +2 -2
- package/dist/calcite/{KVKTCNIY.js → 3QYAJJ57.js} +2 -2
- package/dist/calcite/{DTWAUPHD.js → 3WB4PFJL.js} +2 -2
- package/dist/calcite/{PZSKR56D.js → 44UD6KGP.js} +2 -2
- package/dist/calcite/{Z5EM4YMP.js → 4ARVFMUA.js} +2 -2
- package/dist/calcite/{PSNQGJHN.js → 4M2WQ23M.js} +2 -2
- package/dist/calcite/{EBDLQ46L.js → 4Q4KKSN4.js} +2 -2
- package/dist/calcite/{67CVBPF2.js → 5GK5T7VM.js} +2 -2
- package/dist/calcite/{ZQEIKMMT.js → 5GPOWLH5.js} +2 -2
- package/dist/calcite/{WH6NZLUK.js → 5IUWX5LO.js} +2 -2
- package/dist/calcite/{QN3VOGMB.js → 5JMAV5PN.js} +2 -2
- package/dist/calcite/{IMGHD2PP.js → 5MECWZ54.js} +2 -2
- package/dist/calcite/{XLFHJXGD.js → 5UGZBQLZ.js} +2 -2
- package/dist/calcite/{FEAOVOXO.js → 5WSIBFTK.js} +2 -2
- package/dist/calcite/{3TVDQFWP.js → 5X5N3DTT.js} +2 -2
- package/dist/calcite/{7PMIVMGI.js → 65GXBRFZ.js} +1 -1
- package/dist/calcite/{CEABUTBQ.js → 6CCUYCGM.js} +2 -2
- package/dist/calcite/{PWVH42HC.js → 6KVC6MKQ.js} +2 -2
- package/dist/calcite/{EKLMKNES.js → 6L7MSOC7.js} +2 -2
- package/dist/calcite/{4OT45MHK.js → 6LJ7LGGU.js} +2 -2
- package/dist/calcite/{QZIAQK6E.js → 6VSHUL52.js} +1 -1
- package/dist/calcite/{X7Z5Q44E.js → 6YEIMYWX.js} +2 -2
- package/dist/calcite/{D4YNGMQ4.js → 74KZUTUN.js} +1 -1
- package/dist/calcite/{TRWVOCHF.js → 7ALXVJXG.js} +2 -2
- package/dist/calcite/{TTA5IFSG.js → 7GN6DICQ.js} +2 -2
- package/dist/calcite/{J6AB53XH.js → 7H6SEVCN.js} +2 -2
- package/dist/calcite/{CWYMSFSM.js → 7M2KKTJJ.js} +2 -2
- package/dist/calcite/{OFE3T7M4.js → 7SNSI32C.js} +1 -1
- package/dist/calcite/{3UHQAYUG.js → 7USDHA7K.js} +2 -2
- package/dist/calcite/{K7DFH7E7.js → 7VV4BMQV.js} +2 -2
- package/dist/calcite/{POJUUQCX.js → ADIPWBJJ.js} +2 -2
- package/dist/calcite/{776UYBBY.js → ADX2ADPZ.js} +2 -2
- package/dist/calcite/{ROG4M5D5.js → ALQQJ6OF.js} +2 -2
- package/dist/calcite/{3OQDHIFD.js → APIRRRMC.js} +1 -1
- package/dist/calcite/{HU6DTPAD.js → AVABVMT4.js} +1 -1
- package/dist/calcite/{HA3RNKI4.js → AVP7Z65I.js} +2 -2
- package/dist/calcite/{WJQPVCTO.js → B3WRYD3E.js} +2 -2
- package/dist/calcite/{BQF7TN3W.js → B4AUKRKO.js} +2 -2
- package/dist/calcite/{WJ7I72C5.js → BCE3ZRLY.js} +2 -2
- package/dist/calcite/{OWQ6IZUG.js → BE4H6EDP.js} +2 -2
- package/dist/calcite/{6CG2SGLO.js → BI36XTIH.js} +2 -2
- package/dist/calcite/{YZ7B5KYO.js → BOKULWLC.js} +2 -2
- package/dist/calcite/{7PRCA6IS.js → BPVRQRK7.js} +1 -1
- package/dist/calcite/{3ZVQVFGE.js → BY2Q7HXW.js} +2 -2
- package/dist/calcite/{X2QBOAOZ.js → C6UCKTGD.js} +2 -2
- package/dist/calcite/{VIHWSSRW.js → CO3XEFE7.js} +2 -2
- package/dist/calcite/{Q4ZLJ3LO.js → CQ2BA3UF.js} +2 -2
- package/dist/calcite/{JRWQB4RO.js → CVXUWMEE.js} +2 -2
- package/dist/calcite/{ECZNULXS.js → D24IUQQ7.js} +1 -1
- package/dist/calcite/{OG63HTUA.js → D4GZAVQC.js} +2 -2
- package/dist/calcite/{VIAG2CF7.js → DBG6HQDL.js} +2 -2
- package/dist/calcite/{5GRBAZGY.js → DCI4UPGO.js} +2 -2
- package/dist/calcite/{TIHWCMZN.js → DDXIYENY.js} +2 -2
- package/dist/calcite/{K3DVOXIM.js → DMEUM5FZ.js} +2 -2
- package/dist/calcite/{ZYTOX3I3.js → E2PHKNBO.js} +2 -2
- package/dist/calcite/{4COXGXR5.js → E4D2ONAQ.js} +2 -2
- package/dist/calcite/{IP7OBNPO.js → E6NXYM3P.js} +2 -2
- package/dist/calcite/{L2RWHKJT.js → EAEBHD3K.js} +2 -2
- package/dist/calcite/{F62AYMXR.js → EJKXZ6YI.js} +1 -1
- package/dist/calcite/{BTURGHQU.js → EKLJNJGF.js} +2 -2
- package/dist/calcite/{WLZSHAR7.js → EMQL3GZ2.js} +2 -2
- package/dist/calcite/{IG5ZDCFZ.js → EQGJYJ5R.js} +1 -1
- package/dist/calcite/{G2DEDH5P.js → ERPVOSJU.js} +2 -2
- package/dist/calcite/{3KDX4RYN.js → ESGMYRWF.js} +1 -1
- package/dist/calcite/{YGPQES6A.js → EU65BWJH.js} +2 -2
- package/dist/calcite/{EALRW6AJ.js → EU6VX24H.js} +2 -2
- package/dist/calcite/{LKECTJEZ.js → F53EERRE.js} +2 -2
- package/dist/calcite/{SCFNEMY4.js → FKLG6SVZ.js} +2 -2
- package/dist/calcite/{3ZMINPRN.js → FOJQBMPS.js} +2 -2
- package/dist/calcite/{PZZPXJ7C.js → FWJ4NABR.js} +2 -2
- package/dist/calcite/{L3HIX54K.js → FWZ7Z4QO.js} +1 -1
- package/dist/calcite/{VERWKQU6.js → GB6LQB7Q.js} +2 -2
- package/dist/calcite/{2JEAGX6M.js → GKEONA63.js} +2 -2
- package/dist/calcite/{3AJWNDGE.js → GKYY5CY7.js} +2 -2
- package/dist/calcite/{5TADOA6L.js → GPYFP5PL.js} +2 -2
- package/dist/calcite/{34CUVJXV.js → GQQI34LF.js} +2 -2
- package/dist/calcite/{TFGQYQVO.js → HBFZPYEM.js} +2 -2
- package/dist/calcite/{KM4666XQ.js → HEXH3BPY.js} +2 -2
- package/dist/calcite/{EJLFCUZQ.js → HGR33S7K.js} +1 -1
- package/dist/calcite/{QVOHFRXW.js → HNO3DPEZ.js} +2 -2
- package/dist/calcite/{44WEW2LM.js → HQW7NLBE.js} +2 -2
- package/dist/calcite/{OTXMANKS.js → HV5MHVWI.js} +1 -1
- package/dist/calcite/{J3GT5YXD.js → I2IABKGM.js} +2 -2
- package/dist/calcite/{BGCG6WGX.js → IFJWAD3E.js} +2 -2
- package/dist/calcite/{ZRKX7JDO.js → INDGNZJL.js} +2 -2
- package/dist/calcite/{A4B2EPGE.js → INVLGOHH.js} +2 -2
- package/dist/calcite/{RSMIW2TD.js → IZ433VC7.js} +2 -2
- package/dist/calcite/{N243526J.js → J2ZX63CE.js} +2 -2
- package/dist/calcite/{GEU6U2VO.js → J6YNXX6K.js} +2 -2
- package/dist/calcite/{YQBF74YU.js → JM257H6A.js} +2 -2
- package/dist/calcite/{3RUAUOGX.js → JVQSSJ4H.js} +2 -2
- package/dist/calcite/{JHL47RK6.js → JZGYW23R.js} +2 -2
- package/dist/calcite/{7FX2FN3F.js → JZPWCUCT.js} +2 -2
- package/dist/calcite/{Z6XHNNVF.js → K7Y6ASPO.js} +2 -2
- package/dist/calcite/{WNW4IZ3H.js → KA3HFWTO.js} +2 -2
- package/dist/calcite/{MSQQ6YQW.js → KEHUEGWI.js} +2 -2
- package/dist/calcite/{QRAS6LI7.js → KHYF5YVN.js} +2 -2
- package/dist/calcite/{OH7BNANG.js → KUE3X6J5.js} +2 -2
- package/dist/calcite/{Q23F3RXW.js → KXWDX644.js} +2 -2
- package/dist/calcite/{6ZOB6PG5.js → LGNIWTHK.js} +1 -1
- package/dist/calcite/{KCDGUTQD.js → LQTPJPAU.js} +1 -1
- package/dist/calcite/{LUZLY6ZF.js → LVWD7CWZ.js} +2 -2
- package/dist/calcite/{4QQUOBTO.js → LXCQQJXR.js} +2 -2
- package/dist/calcite/{AEQMVTV7.js → MF2JLZMM.js} +2 -2
- package/dist/calcite/{3AL6WNPO.js → MHT6OBYG.js} +2 -2
- package/dist/calcite/{CB3YAZSO.js → MJH4X27B.js} +2 -2
- package/dist/calcite/{XQVZQ6NR.js → MQ3UPAUZ.js} +2 -2
- package/dist/calcite/{2B6UVAGG.js → MSHWJVGK.js} +2 -2
- package/dist/calcite/{4LDSXFQW.js → N3WZSQC2.js} +2 -2
- package/dist/calcite/{JT5WUXY3.js → N5VOBNM6.js} +2 -2
- package/dist/calcite/{BHMBRRRZ.js → NKVIAQKM.js} +1 -1
- package/dist/calcite/{WKYWK2F5.js → NPVTAF2I.js} +2 -2
- package/dist/calcite/{VFH2FEYG.js → NR3RJMEA.js} +2 -2
- package/dist/calcite/{CACLOFQ4.js → NVTMWTQD.js} +2 -2
- package/dist/calcite/{TSY7JPFJ.js → OO33OQPI.js} +2 -2
- package/dist/calcite/{OZPXLB5B.js → OUSSQA3F.js} +2 -2
- package/dist/calcite/{DZZSIW76.js → P46WOKQS.js} +2 -2
- package/dist/calcite/{STJFDW6W.js → PD7HRFE4.js} +2 -2
- package/dist/calcite/{QDFNQ5WE.js → PN5WJSBK.js} +2 -2
- package/dist/calcite/{UKGT42LH.js → PO2R4OGJ.js} +2 -2
- package/dist/calcite/{VUK2S423.js → PU7YDRNR.js} +2 -2
- package/dist/calcite/{26AKI6HU.js → QDCKHVY4.js} +2 -2
- package/dist/calcite/{6WDSBH6H.js → QMNOBOJH.js} +2 -2
- package/dist/calcite/{ZVQDCRE5.js → QPFQO7Z7.js} +2 -2
- package/dist/calcite/{IP57IX3P.js → QWX46QTJ.js} +2 -2
- package/dist/calcite/{2XXCPJLV.js → QZYEUHR5.js} +2 -2
- package/dist/calcite/{KC2OT7YP.js → R3GOL3TM.js} +2 -2
- package/dist/calcite/{FSBUEAO3.js → RMYFHWVV.js} +2 -2
- package/dist/calcite/{ERHLWFLB.js → RNIW2HV6.js} +1 -1
- package/dist/calcite/{PRMO3M52.js → RO62X4MM.js} +2 -2
- package/dist/calcite/{BYCYDMUW.js → RQPUH6GO.js} +2 -2
- package/dist/calcite/{YCAAM5QJ.js → SAUBWDNH.js} +2 -2
- package/dist/calcite/{GR2VXKUV.js → SIIMQTEO.js} +2 -2
- package/dist/calcite/{ZXTY2T3P.js → SKGOR73S.js} +2 -2
- package/dist/calcite/{7KEZU7BH.js → SR76XP6T.js} +2 -2
- package/dist/calcite/{BLVSUGSB.js → TE6CBOD6.js} +2 -2
- package/dist/calcite/{LGWNXJYB.js → TMTZJOCR.js} +2 -2
- package/dist/calcite/{CASWNZX5.js → TUJ6L62L.js} +2 -2
- package/dist/calcite/{2A7N5CPI.js → U25LIUUZ.js} +2 -2
- package/dist/calcite/{QS7MITKR.js → UGJEXITG.js} +2 -2
- package/dist/calcite/{FG4QY62A.js → ULJRJORL.js} +2 -2
- package/dist/calcite/{HWWRA6HE.js → UMLLTZZJ.js} +2 -2
- package/dist/calcite/{MWVYZYBH.js → UQZH3LH2.js} +2 -2
- package/dist/calcite/{4BLBMXP4.js → V5LKVIXY.js} +2 -2
- package/dist/calcite/{CXWUB7LU.js → VE6KBBJA.js} +2 -2
- package/dist/calcite/{KI6LFPKK.js → VK3CCXZS.js} +2 -2
- package/dist/calcite/{HQ6M3S2K.js → VPQ7NGUZ.js} +2 -2
- package/dist/calcite/{2OTAQ3AZ.js → VWZ67QFF.js} +2 -2
- package/dist/calcite/{JIZN7ILA.js → WDBLL2RV.js} +2 -2
- package/dist/calcite/{DYT7YWKP.js → WGGDE556.js} +2 -2
- package/dist/calcite/{2ULGHRA4.js → WP3HJ6I5.js} +2 -2
- package/dist/calcite/{YCCO3KOV.js → X3LKOQ6S.js} +2 -2
- package/dist/calcite/{ZHQSSSSV.js → X4CL64RM.js} +2 -2
- package/dist/calcite/{FE2ZRMJT.js → XC4OPJLJ.js} +2 -2
- package/dist/calcite/{JUZV5AY2.js → XG7XWW52.js} +2 -2
- package/dist/calcite/{UX43KWBJ.js → XI5MZFGR.js} +2 -2
- package/dist/calcite/{EILRTVI6.js → XLGAGWUQ.js} +1 -1
- package/dist/calcite/{XVYKM6AR.js → XNA6U4F7.js} +2 -2
- package/dist/calcite/{3RTCTBDE.js → XPBEPYBT.js} +1 -1
- package/dist/calcite/{KFUGBRXX.js → XPEFR6GO.js} +2 -2
- package/dist/calcite/{SFIJNDAZ.js → XW2IJAZJ.js} +1 -1
- package/dist/calcite/{SCVREE77.js → YGZOBO3A.js} +2 -2
- package/dist/calcite/{CH6BND5G.js → YIOULLZH.js} +2 -2
- package/dist/calcite/{J7XOHIXZ.js → YKQJRGYP.js} +2 -2
- package/dist/calcite/{YFJBESJU.js → YNQZEVSF.js} +2 -2
- package/dist/calcite/{RGGKV5F6.js → YPVSODHF.js} +2 -2
- package/dist/calcite/{CSVTTITO.js → YZ5VQCVL.js} +2 -2
- package/dist/calcite/{O4EEYZ63.js → ZDU4XVSH.js} +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.ar.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.bg.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.bs.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.ca.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.cs.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.da.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.de.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.el.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.es.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.et.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.fi.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.fr.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.he.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.hr.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.hu.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.id.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.it.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.ja.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.ko.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.lt.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.lv.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.nl.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.no.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.pl.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.pt-BR.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.pt-PT.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.ro.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.ru.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.sk.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.sl.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.sr.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.sv.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.th.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.tr.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.uk.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.vi.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.zh-CN.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.zh-HK.json +1 -1
- package/dist/calcite/assets/action-bar/t9n/messages.zh-TW.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.ar.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.bg.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.bs.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.ca.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.cs.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.da.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.de.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.el.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.es.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.et.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.fi.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.fr.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.he.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.hr.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.hu.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.id.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.it.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.ja.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.ko.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.lt.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.lv.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.nl.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.no.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.pl.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.pt-BR.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.pt-PT.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.ro.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.ru.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.sk.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.sl.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.sr.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.sv.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.th.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.tr.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.uk.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.vi.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.zh-CN.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.zh-HK.json +1 -1
- package/dist/calcite/assets/action-pad/t9n/messages.zh-TW.json +1 -1
- package/dist/calcite/assets/icon/assignClassification16.json +1 -0
- package/dist/calcite/assets/icon/assignClassification24.json +1 -0
- package/dist/calcite/assets/icon/assignClassification32.json +1 -0
- package/dist/calcite/assets/icon/autocompletePolygon16.json +1 -0
- package/dist/calcite/assets/icon/autocompletePolygon24.json +1 -0
- package/dist/calcite/assets/icon/autocompletePolygon32.json +1 -0
- package/dist/calcite/assets/icon/circleIntersection16.json +1 -0
- package/dist/calcite/assets/icon/circleIntersection24.json +1 -0
- package/dist/calcite/assets/icon/circleIntersection32.json +1 -0
- package/dist/calcite/assets/icon/codedValueDomain16.json +1 -0
- package/dist/calcite/assets/icon/codedValueDomain24.json +1 -0
- package/dist/calcite/assets/icon/codedValueDomain32.json +1 -0
- package/dist/calcite/assets/icon/domain16.json +1 -0
- package/dist/calcite/assets/icon/domain24.json +1 -0
- package/dist/calcite/assets/icon/domain32.json +1 -0
- package/dist/calcite/assets/icon/featureDataset16.json +1 -0
- package/dist/calcite/assets/icon/featureDataset24.json +1 -0
- package/dist/calcite/assets/icon/featureDataset32.json +1 -0
- package/dist/calcite/assets/icon/geometricNetwork16.json +1 -0
- package/dist/calcite/assets/icon/geometricNetwork24.json +1 -0
- package/dist/calcite/assets/icon/geometricNetwork32.json +1 -0
- package/dist/calcite/assets/icon/intersection16.json +1 -0
- package/dist/calcite/assets/icon/intersection24.json +1 -0
- package/dist/calcite/assets/icon/intersection32.json +1 -0
- package/dist/calcite/assets/icon/layerAnnotation16.json +1 -0
- package/dist/calcite/assets/icon/layerAnnotation24.json +1 -0
- package/dist/calcite/assets/icon/layerAnnotation32.json +1 -0
- package/dist/calcite/assets/icon/layerDimension16.json +1 -0
- package/dist/calcite/assets/icon/layerDimension24.json +1 -0
- package/dist/calcite/assets/icon/layerDimension32.json +1 -0
- package/dist/calcite/assets/icon/layerMultipatch16.json +1 -0
- package/dist/calcite/assets/icon/layerMultipatch24.json +1 -0
- package/dist/calcite/assets/icon/layerMultipatch32.json +1 -0
- package/dist/calcite/assets/icon/layerMultipoint16.json +1 -0
- package/dist/calcite/assets/icon/layerMultipoint24.json +1 -0
- package/dist/calcite/assets/icon/layerMultipoint32.json +1 -0
- package/dist/calcite/assets/icon/lineAndCircleIntersection16.json +1 -0
- package/dist/calcite/assets/icon/lineAndCircleIntersection24.json +1 -0
- package/dist/calcite/assets/icon/lineAndCircleIntersection32.json +1 -0
- package/dist/calcite/assets/icon/lineIntersection16.json +1 -0
- package/dist/calcite/assets/icon/lineIntersection24.json +1 -0
- package/dist/calcite/assets/icon/lineIntersection32.json +1 -0
- package/dist/calcite/assets/icon/locationReferencingDataset16.json +1 -0
- package/dist/calcite/assets/icon/locationReferencingDataset24.json +1 -0
- package/dist/calcite/assets/icon/locationReferencingDataset32.json +1 -0
- package/dist/calcite/assets/icon/midpoint16.json +1 -0
- package/dist/calcite/assets/icon/midpoint24.json +1 -0
- package/dist/calcite/assets/icon/midpoint32.json +1 -0
- package/dist/calcite/assets/icon/newCompletePart16.json +1 -0
- package/dist/calcite/assets/icon/newCompletePart24.json +1 -0
- package/dist/calcite/assets/icon/newCompletePart32.json +1 -0
- package/dist/calcite/assets/icon/parcelDataset16.json +1 -0
- package/dist/calcite/assets/icon/parcelDataset24.json +1 -0
- package/dist/calcite/assets/icon/parcelDataset32.json +1 -0
- package/dist/calcite/assets/icon/pointAlongALine16.json +1 -0
- package/dist/calcite/assets/icon/pointAlongALine24.json +1 -0
- package/dist/calcite/assets/icon/pointAlongALine32.json +1 -0
- package/dist/calcite/assets/icon/rangeDomain16.json +1 -0
- package/dist/calcite/assets/icon/rangeDomain24.json +1 -0
- package/dist/calcite/assets/icon/rangeDomain32.json +1 -0
- package/dist/calcite/assets/icon/relationshipClass16.json +1 -0
- package/dist/calcite/assets/icon/relationshipClass24.json +1 -0
- package/dist/calcite/assets/icon/relationshipClass32.json +1 -0
- package/dist/calcite/assets/icon/topology16.json +1 -0
- package/dist/calcite/assets/icon/topology24.json +1 -0
- package/dist/calcite/assets/icon/topology32.json +1 -0
- package/dist/calcite/assets/icon/videoDataStore16.json +1 -0
- package/dist/calcite/assets/icon/videoDataStore24.json +1 -0
- package/dist/calcite/assets/icon/videoDataStore32.json +1 -0
- 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/XButton.js +1 -1
- package/dist/chunks/_sortable.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/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/interact.min.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/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/resources8.js +1 -1
- package/dist/chunks/responsive.js +1 -1
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/sortableComponent.js +1 -1
- package/dist/chunks/text.js +1 -1
- package/dist/chunks/useCancelable.js +1 -1
- package/dist/chunks/useFocusTrap.js +1 -1
- package/dist/chunks/usePreventDocumentScroll.js +1 -1
- package/dist/chunks/useSetFocus.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/useTime.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-autocomplete/customElement.js +1 -1
- package/dist/components/calcite-autocomplete-item/customElement.js +1 -1
- package/dist/components/calcite-autocomplete-item-group/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-group/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 +1 -1
- 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-swatch/customElement.js +1 -1
- package/dist/components/calcite-swatch-group/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/translations.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 +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v3.3.0-next.
|
|
3
|
+
v3.3.0-next.64 */
|
|
4
4
|
var o={menu:"menu",defaultTrigger:"default-trigger"},e="calcite-action-menu",i={button:t=>`${e}-${t}-menu-button`,menu:t=>`${e}-${t}-menu`,action:(t,n)=>`${e}-${t}-action-${n}`},a={tooltip:"tooltip",trigger:"trigger"},s={menu:"ellipsis"};export{o as a,i as b,a as c,s as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v3.3.0-next.
|
|
4
|
-
import{a as y,b as x}from"./
|
|
3
|
+
v3.3.0-next.64 */
|
|
4
|
+
import{a as y,b as x}from"./N3WZSQC2.js";import{a as S}from"./V5LKVIXY.js";import{a as v}from"./2OPYQDKQ.js";import"./R3GOL3TM.js";import"./J2ZX63CE.js";import{a as g}from"./DDXIYENY.js";import"./HNO3DPEZ.js";import"./EQGJYJ5R.js";import{B as u,C as b,D as p,E as f,Q as m,g as n,h as d,l as h,o as l}from"./IZ433VC7.js";var k={handle:"handle",handleSelected:"handle--selected"},C={drag:"drag"},i={itemLabel:"{itemLabel}",position:"{position}",total:"{total}"},H=n`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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{display:flex;align-items:center;justify-content:center;align-self:stretch;border-style:none;outline-color:transparent;color:var(--calcite-handle-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-handle-background-color, transparent);padding-block:.75rem;padding-inline:.25rem;line-height:0}.handle calcite-icon{color:inherit}:host(:not([disabled])) .handle{cursor:move}:host(:not([disabled])) .handle:hover{color:var(--calcite-handle-icon-color-hover, var(--calcite-color-text-1));background-color:var(--calcite-handle-background-color-hover, var(--calcite-color-foreground-2))}:host(:not([disabled])) .handle:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));color:var(--calcite-handle-icon-color-hover, var(--calcite-color-text-1))}:host(:not([disabled])) .handle--selected{color:var(--calcite-handle-icon-color-selected, var(--calcite-color-text-1));background-color:var(--calcite-handle-background-color-selected, var(--calcite-color-foreground-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,s=class extends p{constructor(){super(...arguments),this.handleButton=u(),this.messages=S({blocking:!0}),this.focusSetter=v()(this),this.blurUnselectDisabled=!1,this.disabled=!1,this.selected=!1,this.calciteHandleChange=l({cancelable:!1}),this.calciteHandleNudge=l({cancelable:!1}),this.calciteInternalAssistiveTextChange=l({cancelable:!1})}static{this.properties={blurUnselectDisabled:[5,{},{type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[3,{},{reflect:!0}],label:1,messageOverrides:[0,{},{attribute:!1}],selected:[7,{},{reflect:!0,type:Boolean}],setPosition:[9,{},{type:Number}],setSize:[9,{},{type:Number}]}}static{this.styles=H}async setFocus(e){return this.focusSetter(()=>this.handleButton.value,e)}willUpdate(e){(e.has("messages")||e.has("label")||e.has("selected")&&(this.hasUpdated||this.selected!==!1)||e.has("setPosition")||e.has("setSize"))&&this.handleAriaTextChange()}updated(){y(this)}loaded(){g.deprecated("component",{name:"handle",removalVersion:4,suggested:"sort-handle"})}handleAriaTextChange(){let e=this.getAriaText("live");e&&this.calciteInternalAssistiveTextChange.emit({message:e})}getTooltip(){let{label:e,messages:t}=this;return t?e?t.dragHandle.replace(i.itemLabel,e):t.dragHandleUntitled:""}getAriaText(e){let{setPosition:t,setSize:o,label:c,messages:a,selected:r}=this;return!a||!c||typeof o!="number"||typeof t!="number"?null:(e==="label"?r?a.dragHandleChange:a.dragHandleIdle:r?a.dragHandleActive:a.dragHandleCommit).replace(i.position,t.toString()).replace(i.itemLabel,c).replace(i.total,o.toString())}handleKeyDown(e){if(!this.disabled)switch(e.key){case" ":this.selected=!this.selected,this.calciteHandleChange.emit(),e.preventDefault();break;case"ArrowUp":if(!this.selected)return;e.preventDefault(),this.calciteHandleNudge.emit({direction:"up"});break;case"ArrowDown":if(!this.selected)return;e.preventDefault(),this.calciteHandleNudge.emit({direction:"down"});break}}handleBlur(){this.blurUnselectDisabled||this.disabled||this.selected&&(this.selected=!1,this.calciteHandleChange.emit())}render(){return x({disabled:this.disabled,children:d`<span .ariaChecked=${this.disabled?null:this.selected} .ariaDisabled=${this.disabled?this.disabled:null} .ariaLabel=${this.disabled?null:this.getAriaText("label")} class=${f({[k.handle]:!0,[k.handleSelected]:!this.disabled&&this.selected})} @blur=${this.handleBlur} @keydown=${this.handleKeyDown} role=radio tabindex=${this.disabled?null:0} title=${this.getTooltip()??h} ${b(this.handleButton)}><calcite-icon .icon=${C.drag} scale=s></calcite-icon></span>`})}};m("calcite-handle",s);export{s as Handle};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v3.3.0-next.
|
|
4
|
-
import{a as l}from"./
|
|
3
|
+
v3.3.0-next.64 */
|
|
4
|
+
import{a as l}from"./R3GOL3TM.js";import{d as a}from"./J2ZX63CE.js";import{g as s,l as u}from"./HNO3DPEZ.js";var L=()=>l((e,n)=>{let t;function r(){t?.abort()}return n.onLoad(()=>{e.listen("focus",()=>{t=new AbortController,e.el.addEventListener("focusout",r,{signal:t.signal})})}),n.onDisconnected(()=>{e.el.removeEventListener("focusout",r)}),async(c,d)=>{if(e.disabled)return;let o=m(c());if(!o)return;let{target:f,includeContainer:v,strategy:C}=o,i=s(e.el),g=i.activeElement;if(await a(e),!(g!==i.activeElement||t&&!t?.signal.aborted))return e.el.removeEventListener("focus",r),u(f,v,C,e.el,d)}});function b(e){return"target"in e&&("includeContainer"in e||"strategy"in e)}function m(e){if(e)return b(e)?e:{target:e}}export{L as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v3.3.0-next.
|
|
4
|
-
import{a as g}from"./
|
|
3
|
+
v3.3.0-next.64 */
|
|
4
|
+
import{a as g}from"./V5LKVIXY.js";import{a as v}from"./2OPYQDKQ.js";import"./R3GOL3TM.js";import{a as m}from"./J2ZX63CE.js";import"./DDXIYENY.js";import"./HNO3DPEZ.js";import"./EQGJYJ5R.js";import{B as h,C as u,D as p,E as c,Q as b,g as d,h as o,l as i}from"./IZ433VC7.js";var e={contentCell:"content-cell",numberCell:"number-cell",selectionCell:"selection-cell",bodyRow:"body-row",footerRow:"footer-row",heading:"heading",description:"description",multipleSelectionCell:"cell--multiple-selection",assistiveText:"assistive-text",active:"active",selectedCell:"selected-cell",lastCell:"last-cell",staticCell:"static-cell"},r={checked:"check-square-f",indeterminate:"minus-square-f",unchecked:"square"},w=d`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:contents}:host([alignment=center]) th{text-align:center}:host([alignment=end]) th{text-align:end}.assistive-text{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}th{white-space:normal;text-align:start;vertical-align:top;font-weight:var(--calcite-font-weight-medium);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-table-header-border-color, var(--calcite-table-border-color, var(--calcite-color-border-3)));padding-block:calc(var(--calcite-internal-table-cell-padding) * 1.5);padding-inline:var(--calcite-internal-table-cell-padding);background-color:var(--calcite-table-header-background-color, var(--calcite-table-header-background, var(--calcite-color-foreground-2)));font-size:var(--calcite-internal-table-cell-font-size);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-table-cell-border-color, var(--calcite-table-border-color, var(--calcite-color-border-3)))}th:not(.static-cell){outline-color:transparent}th:not(.static-cell):not(.static-cell):focus-within{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}th:not(.center):not(.end).content-cell{vertical-align:top}th.center{vertical-align:middle}th.end.content-cell{vertical-align:bottom}th.body-row,th.footer-row{padding-block:var(--calcite-internal-table-cell-padding);border-block-end:0}th.footer-row{border-block-start:var(--calcite-border-width-sm) solid var(--calcite-table-header-border-color, var(--calcite-table-border-color, var(--calcite-color-border-3)))}th.last-cell{border-inline-end:0}.cell--multiple-selection{cursor:pointer;vertical-align:middle;color:var(--calcite-table-selection-cell-icon-color, var(--calcite-color-text-3));background-color:var(--calcite-table-selection-cell-background-color, var(--calcite-color-foreground-2))}.cell--multiple-selection.selected-cell{background-color:var(--calcite-table-selection-cell-background-color-selected, var(--calcite-color-foreground-2))}.cell--multiple-selection:not(.end){vertical-align:middle}.number-cell{background-color:var(--calcite-table-number-cell-background-color, var(--calcite-table-cell-background-color, var(--calcite-color-foreground-2)))}.number-cell,.selection-cell{inline-size:2rem;min-inline-size:2rem}.selection-cell calcite-icon.active{color:var(--calcite-table-selection-cell-icon-color-selected, var(--calcite-color-brand))}.number-cell calcite-icon,.selection-cell calcite-icon{margin-inline-start:auto;margin-inline-end:auto;vertical-align:middle}.heading{color:var(--calcite-table-header-heading-text-color, var(--calcite-color-text-1))}.description{color:var(--calcite-table-header-description-text-color, var(--calcite-color-text-3));font-size:var(--calcite-internal-table-cell-font-size-secondary)}`,a=class extends p{constructor(){super(...arguments),this.containerEl=h(),this.messages=g({blocking:!0}),this.focusSetter=v()(this),this.focused=!1,this.screenReaderText="",this.alignment="start",this.interactionMode="interactive",this.numberCell=!1,this.parentRowAlignment="start",this.selectionCell=!1}static{this.properties={focused:[16,{},{state:!0}],screenReaderText:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],bodyRowCount:[9,{},{type:Number}],colSpan:[11,{},{reflect:!0,type:Number}],description:[3,{},{reflect:!0}],heading:[3,{},{reflect:!0}],interactionMode:1,lastCell:[5,{},{type:Boolean}],messageOverrides:[0,{},{attribute:!1}],numberCell:[5,{},{type:Boolean}],parentRowAlignment:1,parentRowIsSelected:[5,{},{type:Boolean}],parentRowType:1,positionInRow:[9,{},{type:Number}],rowSpan:[11,{},{reflect:!0,type:Number}],scale:1,selectedRowCount:[9,{},{type:Number}],selectedRowCountLocalized:1,selectionCell:[5,{},{type:Boolean}],selectionMode:1}}static{this.styles=w}async setFocus(t){return this.focusSetter(()=>this.containerEl.value,t)}async load(){this.updateScreenReaderText()}willUpdate(t){(t.has("selectedRowCount")||t.has("selectedRowCountLocalized"))&&this.updateScreenReaderText()}updateScreenReaderText(){let t="",l=`${this.selectedRowCountLocalized} ${this.messages?.selected}`;this.numberCell?t=this.messages?.rowNumber:this.selectionMode==="single"?t=`${this.messages?.selectionColumn}. ${l}`:this.bodyRowCount===this.selectedRowCount?t=`${this.messages?.selectionColumn}. ${this.messages?.all} ${l} ${this.messages?.keyboardDeselectAll}`:t=`${this.messages?.selectionColumn}. ${l} ${this.messages?.keyboardSelectAll}`,this.screenReaderText=t}onContainerBlur(){this.focused=!1}onContainerFocus(){this.focused=!0}render(){let t=this.rowSpan?"rowgroup":this.colSpan?"colgroup":this.parentRowType==="body"?"row":"col",l=this.selectedRowCount===this.bodyRowCount,n=this.selectedRowCount>0,f=l?r.checked:n?r.indeterminate:r.unchecked,s=this.interactionMode==="static"&&!this.selectionCell;return o`<th .ariaColIndex=${this.parentRowType==="head"?this.positionInRow:void 0} class=${c({[e.bodyRow]:this.parentRowType==="body",[e.footerRow]:this.parentRowType==="foot",[e.contentCell]:!this.numberCell&&!this.selectionCell,[e.numberCell]:this.numberCell,[e.selectionCell]:this.selectionCell,[e.selectedCell]:this.parentRowIsSelected,[e.multipleSelectionCell]:this.selectionMode==="multiple",[e.staticCell]:s,[e.lastCell]:this.lastCell&&(!this.rowSpan||this.colSpan&&!!this.rowSpan),[this.parentRowAlignment]:this.parentRowAlignment==="center"||this.parentRowAlignment==="end"})} colSpan=${this.colSpan??i} @blur=${this.onContainerBlur} @focus=${this.onContainerFocus} .role=${this.parentRowType==="head"?"columnheader":"rowheader"} rowSpan=${this.rowSpan??i} scope=${t} .tabIndex=${this.selectionCell?0:s?-1:0} ${u(this.containerEl)}>${this.heading&&o`<div class=${c(e.heading)}>${this.heading}</div>`||""}${this.description&&o`<div class=${c(e.description)}>${this.description}</div>`||""}${this.selectionCell&&this.selectionMode==="multiple"&&o`<calcite-icon class=${c({[e.active]:n||l})} .icon=${f} .scale=${m(this.scale)}></calcite-icon>`||""}${(this.selectionCell||this.numberCell)&&o`<span .ariaLive=${this.focused?"polite":"off"} class=${c(e.assistiveText)}>${this.screenReaderText}</span>`||""}</th>`}};b("calcite-table-header",a);export{a as TableHeader};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v3.3.0-next.
|
|
3
|
+
v3.3.0-next.64 */
|
|
4
4
|
var m=(t,e,n)=>Math.max(e,Math.min(t,n)),c=new RegExp(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/),s=t=>{let e=(""+t).match(c);return!e||parseInt(e[1])===0?0:Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0))};function i(t){return s(t)>0&&t>0?parseFloat(`0.${t.toString().split(".")[1]}`):t}function o(t,e,n,a,r){return(t-e)*(r-a)/(n-e)+a}function g(t,e,n){return t<n?-1:t>e-n?1:0}export{m as a,s as b,i as c,o as d,g as e};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v3.3.0-next.
|
|
4
|
-
import{a as rt}from"./QZIAQK6E.js";import{a as nt}from"./PZSKR56D.js";import{a as st,b as w}from"./EBDLQ46L.js";import{a as at,b as x,c as l,d as S,g as it,h as c,i as P}from"./3ZMINPRN.js";import{g as W,h as H,i as M,k as v}from"./YFJBESJU.js";import{a as et}from"./S33QBYG5.js";import{a as J,c as Q,e as X,h as tt}from"./IP7OBNPO.js";import{c as K,d as Z}from"./XVYKM6AR.js";import{a as Y,c as k,d as _,e as q,f as G,g as D,h as j}from"./RGGKV5F6.js";import{a as U}from"./KI6LFPKK.js";import{a as R,b as N}from"./4LDSXFQW.js";import"./O4EEYZ63.js";import{b as F}from"./D4YNGMQ4.js";import{a as L}from"./4BLBMXP4.js";import{a as B}from"./KN5DRBMX.js";import"./KC2OT7YP.js";import{a as C}from"./N243526J.js";import"./TIHWCMZN.js";import"./QVOHFRXW.js";import{a as A}from"./IG5ZDCFZ.js";import{C as m,D as T,E as r,I as E,Q as z,g as O,h as g,l as p,o as f}from"./RSMIW2TD.js";var ct=O`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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{position:relative;display:inline-block;width:100%;overflow:visible;vertical-align:top;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:host .menu-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}:host .menu-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}:host .menu-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}:host .menu-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}:host .menu-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}:host .menu-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{:host .menu-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}:host([scale=s]){--calcite-toggle-spacing: .5rem;--calcite-internal-input-text-input-padding-inline-end: calc(var(--calcite-toggle-spacing) + 1rem)}:host([scale=m]){--calcite-toggle-spacing: .75rem;--calcite-internal-input-text-input-padding-inline-end: calc(var(--calcite-toggle-spacing) + 1.5rem)}:host([scale=l]){--calcite-toggle-spacing: 1rem;--calcite-internal-input-text-input-padding-inline-end: calc(var(--calcite-toggle-spacing) + 2rem)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.calendar-wrapper{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transform:translateZ(0)}.input-wrapper{position:relative}.input-wrapper .chevron-icon{color:var(--calcite-color-text-3)}.input-wrapper:focus-within .chevron-icon,.input-wrapper:active .chevron-icon,.input-wrapper:hover .chevron-icon{color:var(--calcite-color-text-1)}.input-wrapper:focus-within~.input-wrapper .chevron-icon,.input-wrapper:active~.input-wrapper .chevron-icon,.input-wrapper:hover~.input-wrapper .chevron-icon{color:var(--calcite-color-text-1)}.toggle-icon{position:absolute;display:flex;cursor:pointer;align-items:center;inset-inline-end:0;inset-block:0;padding-inline:var(--calcite-toggle-spacing)}:host([range]) .container{display:flex}:host([range]) .input-container{display:flex;flex:1 1 auto}:host([range]) .input-wrapper{flex:1 1 auto}.divider-container{display:flex;align-items:stretch;border-width:1px;border-left-width:0px;border-right-width:0px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:var(--calcite-color-foreground-1)}:host([layout=horizontal]) .divider-container{width:1px}.divider{display:inline-block;width:1px;margin-block:var(--calcite-spacing-xxs);background-color:var(--calcite-color-border-2)}:host([layout=vertical]) .divider-container{height:1px;width:100%;border-top-width:0px;border-bottom-width:0px;border-left-width:1px;border-right-width:0px;padding-inline:var(--calcite-spacing-md)}:host([layout=vertical]) .divider-container .divider{margin-top:0;margin-bottom:0;height:1px;width:100%}:host([range][layout=vertical]) .input-wrapper{width:100%}:host([range][layout=vertical]) .input-container{flex-direction:column;align-items:flex-start}.menu-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown);inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.menu-container{opacity:0;inset-block-start:0;left:0}}.menu-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.menu-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.menu-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.menu-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.menu-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.menu-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.menu-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.input .calcite-input__wrapper{margin-top:0}.vertical-chevron-container{display:flex;align-items:center;border-width:1px;border-left-width:0px;border-style:solid;border-color:var(--calcite-color-border-input);padding-inline:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}.vertical-chevron-container calcite-icon{color:var(--calcite-color-text-3)}.vertical-chevron-container calcite-icon:hover{color:var(--calcite-color-text-1)}:host([range][layout=vertical][scale=s]) .vertical-chevron-container,:host([range][layout=vertical][scale=s]) .divider-container{padding-inline:var(--calcite-spacing-sm)}:host([range][layout=vertical][scale=l]) .vertical-chevron-container,:host([range][layout=vertical][scale=l]) .divider-container{padding-inline:var(--calcite-spacing-lg)}.container:focus-within .vertical-chevron-container calcite-icon,.container:active .vertical-chevron-container calcite-icon,.container:hover .vertical-chevron-container calcite-icon{color:var(--calcite-color-text-1)}.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}.assistive-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}`,n={assistiveText:"assistive-text",calendarWrapper:"calendar-wrapper",container:"container",dividerContainer:"divider-container",divider:"divider",inputContainer:"input-container",inputNoBottomBorder:"input--no-bottom-border",inputNoRightBorder:"input--no-right-border",inputNoTopBorder:"input--no-top-border",inputNoLeftBorder:"input--no-left-border",inputWrapper:"input-wrapper",input:"input",menu:"menu-container",toggleIcon:"toggle-icon",verticalChevronContainer:"vertical-chevron-container",chevronIcon:"chevron-icon"},ut="calcite-input-date-picker",$={validationMessage:"inputDatePickerValidationMessage",dialog:u=>`date-picker-dialog--${u}`,placeholder:u=>`${ut}-placeholder-${u}`},ot={start:"start",end:"end"},y={calendar:"calendar",chevronDown:"chevron-down",chevronUp:"chevron-up"};function ht(u){if(!u)return!1;let{year:t}=P(u);return Number(t)<100}function dt(u){let t=new Date().getFullYear();return Math.floor(t/100)*100+u}var V=class extends T{constructor(){super(),this.commonDateSeparators=[".","-","/"],this.dialogId=$.dialog(A()),this.focusOnOpen=!1,this.focusTrap=nt({triggerProp:"open",focusTrapOptions:{onActivate:()=>{this.focusOnOpen&&(this.datePickerEl?.setFocus(),this.focusOnOpen=!1)},allowOutsideClick:!0,clickOutsideDeactivates:!1,initialFocus:!1,setReturnFocus:!1,onDeactivate:()=>{this.open=!1}}})(this),this.transitionProp="opacity",this.placeholderTextId=$.placeholder(A()),this.rangeStartValueChangedByUser=!1,this.userChangedValue=!1,this._value="",this.valueAsDateChangedExternally=!1,this.messages=L({blocking:!0}),this.focusSetter=B()(this),this.focusedInput="start",this.disabled=!1,this.focusTrapDisabled=!1,this.layout="horizontal",this.monthStyle="wide",this.open=!1,this.overlayPositioning="absolute",this.placement=Y,this.proximitySelectionDisabled=!1,this.range=!1,this.readOnly=!1,this.required=!1,this.scale="m",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.calciteInputDatePickerBeforeClose=f({cancelable:!1}),this.calciteInputDatePickerBeforeOpen=f({cancelable:!1}),this.calciteInputDatePickerChange=f({cancelable:!1}),this.calciteInputDatePickerClose=f({cancelable:!1}),this.calciteInputDatePickerOpen=f({cancelable:!1}),this.listen("blur",this.blurHandler),this.listen("keydown",this.keyDownHandler),this.handleDateTimeFormatChange()}static{this.properties={datePickerActiveDate:[16,{},{state:!0}],focusedInput:[16,{},{state:!0}],localeData:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],focusTrapDisabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],headingLevel:[11,{},{type:Number,reflect:!0}],label:1,layout:[3,{},{reflect:!0}],max:[3,{},{reflect:!0}],maxAsDate:[0,{},{attribute:!1}],messageOverrides:[0,{},{attribute:!1}],min:[3,{},{reflect:!0}],minAsDate:[0,{},{attribute:!1}],monthStyle:1,name:[3,{},{reflect:!0}],numberingSystem:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],proximitySelectionDisabled:[5,{},{type:Boolean}],range:[7,{},{reflect:!0,type:Boolean}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:E},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1,valueAsDate:[0,{},{attribute:!1}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=ct}get value(){return this._value}set value(t){let e=t!==this._value,a=t===""&&(this.startInput?.value!==""||this.endInput?.value!=="");(e||a)&&(this._value=t,this.valueWatcher(t))}async reposition(t=!1){let{floatingEl:e,referenceEl:a,placement:i,overlayPositioning:s,filteredFlipPlacements:o}=this;return q(this,{floatingEl:e,referenceEl:a,overlayPositioning:s,placement:i,flipPlacements:o,type:"menu"},t)}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback();let{open:t}=this;if(t&&this.openHandler(),this.min&&(this.minAsDate=l(this.min)),this.max&&(this.maxAsDate=l(this.max)),Array.isArray(this.value))this.valueAsDate=w(this.value);else if(this.value)try{let e=l(this.value),a=x(e,this.minAsDate,this.maxAsDate);this.valueAsDate=a}catch{this.warnAboutInvalidValue(this.value),this.value=""}else this.valueAsDate&&(this.range&&Array.isArray(this.valueAsDate)?this.value=[c(this.valueAsDate[0]),c(this.valueAsDate[1])]:!this.range&&!Array.isArray(this.valueAsDate)&&(this.value=c(this.valueAsDate)));K(this),Q(this),this.setFilteredPlacements(),v.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.messages._lang,useGrouping:!1},D(this)}async load(){this.handleDateTimeFormatChange(),await this.loadLocaleData(),this.onMinChanged(this.min),this.onMaxChanged(this.max)}willUpdate(t){t.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledAndReadOnlyChange(this.disabled),t.has("readOnly")&&(this.hasUpdated||this.readOnly!==!1)&&this.handleDisabledAndReadOnlyChange(this.readOnly),t.has("valueAsDate")&&this.valueAsDateWatcher(this.valueAsDate),t.has("flipPlacements")&&this.flipPlacementsHandler(),t.has("min")&&this.onMinChanged(this.min),t.has("max")&&this.onMaxChanged(this.max),t.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),t.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")&&this.reposition(!0),(t.has("numberingSystem")||t.has("messages"))&&this.handleDateTimeFormatChange(),t.has("layout")&&(this.hasUpdated||this.layout!=="horizontal")&&this.setReferenceEl(),t.has("messages")&&this.loadLocaleData()}updated(){R(this)}loaded(){this.localizeInputValues(),D(this)}disconnectedCallback(){super.disconnectedCallback(),Z(this),X(this),j(this)}handleDisabledAndReadOnlyChange(t){t||(this.open=!1)}valueWatcher(t){if(!this.userChangedValue){let e;Array.isArray(t)?e=w(t):t?e=l(t):e=void 0,!this.valueAsDateChangedExternally&&e!==this.valueAsDate&&(this.valueAsDate=e),this.localizeInputValues()}this.userChangedValue=!1}valueAsDateWatcher(t){let e=Array.isArray(t)?[c(t[0]),c(t[1])]:c(t);this.datePickerActiveDate=Array.isArray(t)?t[0]:t,this.value!==e&&(this.valueAsDateChangedExternally=!0,this.value=e,this.valueAsDateChangedExternally=!1)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}onMinChanged(t){this.minAsDate=l(t)}onMaxChanged(t){this.maxAsDate=l(t)}openHandler(){U(this),!(this.disabled||this.readOnly)&&this.reposition(!0)}calciteInternalInputInputHandler(t){let e=t.target,a=e.value,i=this.parseNumerals(a),s=this.formatNumerals(i);e.value=s;let{year:o}=it(a,this.localeData);if(o&&o.length<4)return;let h=S(a,this.localeData);at(h,this.min,this.max)&&(this.datePickerActiveDate=h)}calciteInternalInputBlurHandler(){this.commitValue()}handleDateTimeFormatChange(){let t={numberingSystem:W(this.numberingSystem)};this.dateTimeFormat=new Intl.DateTimeFormat(M(H(this.messages._lang)),t)}setReferenceEl(){let{focusedInput:t,layout:e,endWrapper:a,startWrapper:i}=this;this.referenceEl=t==="end"||e==="vertical"?a||i:i||a,requestAnimationFrame(()=>D(this))}onInputWrapperPointerDown(){this.currentOpenInput=this.focusedInput}onInputWrapperClick(t){let{range:e,endInput:a,startInput:i,currentOpenInput:s}=this,h=t.currentTarget.getAttribute("data-position");t.composedPath().find(b=>b.classList?.contains(n.toggleIcon))&&(h==="start"?i:a).setFocus(),(!e||!this.open||s===h)&&(this.open=!this.open)}setFilteredPlacements(){let{el:t,flipPlacements:e}=this;this.filteredFlipPlacements=e?_(e,t):null}setTransitionEl(t){t&&(this.transitionEl=t)}onLabelClick(){this.setFocus()}onBeforeOpen(){this.calciteInputDatePickerBeforeOpen.emit()}onOpen(){this.focusTrap.activate(),this.calciteInputDatePickerOpen.emit()}onBeforeClose(){this.calciteInputDatePickerBeforeClose.emit()}onClose(){this.calciteInputDatePickerClose.emit(),G(this),this.focusTrap.deactivate(),this.focusOnOpen=!1,this.datePickerEl?.reset()}syncHiddenFormInput(t){rt("date",this,t)}setStartInput(t){this.startInput=t}setEndInput(t){this.endInput=t}blurHandler(){this.open=!1}commitValue(){let{focusedInput:t,value:e}=this,a=`${t}Input`,i=this[a].value,s=S(i,this.localeData),o=c(s),h=Array.isArray(e);if(this.range){let d=t==="start"?0:1;if(h){if(o===e[d])return;s?(this.setRangeValue([t==="start"?s:l(e[0]),t==="end"?s:l(e[1])]),this.localizeInputValues()):this.setRangeValue([t==="end"&&l(e[0]),t==="start"&&l(e[1])])}else s&&(this.setRangeValue([t==="start"?s:l(e[0]),t==="end"?s:l(e[1])]),this.localizeInputValues())}else{if(o===e)return;this.setValue(s),this.localizeInputValues()}}keyDownHandler(t){let{defaultPrevented:e,key:a}=t;if(e)return;let i=t.composedPath().some(s=>s.tagName==="CALCITE-SELECT");a==="Enter"?(t.preventDefault(),this.commitValue(),this.shouldFocusRangeEnd()?this.endInput?.setFocus():this.shouldFocusRangeStart()&&this.startInput?.setFocus(),J(this)&&this.restoreInputFocus(!0)):(a==="ArrowDown"||a==="ArrowUp")&&!i?(this.open=!0,this.focusOnOpen=!0,t.preventDefault()):this.open&&a==="Escape"&&(this.open=!1,t.preventDefault(),this.restoreInputFocus(!0))}startInputFocus(){this.focusedInput="start"}endInputFocus(){this.focusedInput="end"}setFloatingEl(t){this.floatingEl=t,D(this)}setStartWrapper(t){this.startWrapper=t,this.setReferenceEl()}setEndWrapper(t){this.endWrapper=t,this.setReferenceEl()}setDatePickerRef(t){t&&(this.datePickerEl=t,this.focusTrap.overrideFocusTrapEl(t))}async loadLocaleData(){v.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.messages._lang,useGrouping:!1},this.localeData=await st(this.messages._lang),this.localizeInputValues()}handleDateChange(t){this.range||(t.stopPropagation(),this.setValue(t.target.valueAsDate),this.localizeInputValues(),this.restoreInputFocus())}shouldFocusRangeStart(){let t=this.value[0];return!!(this.value[1]&&!t&&this.focusedInput==="end"&&this.startInput)}shouldFocusRangeEnd(){let t=this.value[0],e=this.value[1];return!!(t&&!e&&this.focusedInput==="start"&&this.endInput)}handleDateRangeChange(t){if(!this.range)return;t.stopPropagation();let e=t.target.valueAsDate;this.setRangeValue(e),this.localizeInputValues(),this.restoreInputFocus()}restoreInputFocus(t=!1){if(!this.range){this.startInput.setFocus(),this.open=!1;return}if(t){this.focusInput();return}this.rangeStartValueChangedByUser=this.focusedInput==="start",this.focusedInput="end",!(this.shouldFocusRangeStart()||this.rangeStartValueChangedByUser)&&(this.open=!1,this.focusInput())}localizeInputValues(){let t=x(this.range?Array.isArray(this.valueAsDate)&&this.valueAsDate[0]||void 0:this.valueAsDate,this.minAsDate,this.maxAsDate),e=this.range?x(Array.isArray(this.valueAsDate)&&this.valueAsDate[1]||void 0,this.minAsDate,this.maxAsDate):null;this.setInputValue((t&&this.dateTimeFormat.format(t))??"","start"),this.setInputValue((this.range&&e&&this.dateTimeFormat.format(e))??"","end")}setInputValue(t,e="start"){let a=this[`${e}Input`];a&&(a.value=t)}setRangeValue(t){if(!this.range)return;let{value:e}=this,a=Array.isArray(e),i=Array.isArray(t),s=i?t[0]:null,o=i?c(s):"";o&&(o=this.getNormalizedDate(o));let h=i?t[1]:null,d=i?c(h):"";d&&(d=this.getNormalizedDate(d));let I=o||d?[o,d]:"";if(I===e)return;this.userChangedValue=!0,this.value=I,this.valueAsDate=I?w(I):void 0;let b=this.calciteInputDatePickerChange.emit();b&&b.defaultPrevented&&(this.value=e,a?(this.setInputValue(e[0],"start"),this.setInputValue(e[1],"end")):(this.value=e,this.setInputValue(e)))}setValue(t){if(this.range)return;let e=this.value,a=c(t);if(a=this.getNormalizedDate(a),a===e)return;this.userChangedValue=!0,this.valueAsDate=a?l(a):void 0,this.value=a||"",this.calciteInputDatePickerChange.emit().defaultPrevented&&(this.value=e,this.setInputValue(e))}warnAboutInvalidValue(t){console.warn(`The specified value "${t}" does not conform to the required format, "YYYY-MM-DD".`)}formatNumerals(t){return t?t.split("").map(e=>this.commonDateSeparators?.includes(e)?this.localeData?.separator:F?.includes(e)?v?.numberFormatter?.format(Number(e)):e).join(""):""}parseNumerals(t){return t?t.split("").map(e=>F.includes(e)?v.delocalize(e):e).join(""):""}getNormalizedDate(t){if(!t)return"";if(!ht(t))return t;let{day:e,month:a,year:i}=P(t);return`${dt(Number(i))}-${a}-${e}`}focusInput(){(this.focusedInput==="start"?this.startInput:this.endInput).setFocus()}render(){let{disabled:t,messages:{_lang:e},messages:a,numberingSystem:i,readOnly:s}=this;return v.numberFormatOptions={numberingSystem:i,locale:e,useGrouping:!1},N({disabled:this.disabled,children:g`<div class=${r(n.container)}><div aria-label=${this.label??p} class=${r(n.inputContainer)} role=group><div class=${r(n.inputWrapper)} data-position=${ot.start} @click=${this.onInputWrapperClick} @pointerdown=${this.onInputWrapperPointerDown} ${m(this.setStartWrapper)}><calcite-input-text aria-controls=${this.dialogId??p} aria-describedby=${this.placeholderTextId??p} aria-errormessage=${$.validationMessage} aria-autocomplete=none .ariaExpanded=${this.open} aria-haspopup=dialog .ariaInvalid=${this.status==="invalid"} class=${r({[n.input]:!0,[n.inputNoBottomBorder]:this.layout==="vertical"&&this.range,[n.inputNoRightBorder]:this.range})} .disabled=${t} .icon=${y.calendar} .label=${this.range?this.messages.startDate:this.messages.date} @calciteInputTextInput=${this.calciteInternalInputInputHandler} @calciteInternalInputTextBlur=${this.calciteInternalInputBlurHandler} @calciteInternalInputTextFocus=${this.startInputFocus} .placeholder=${this.localeData?.placeholder} .readOnly=${s} role=combobox .scale=${this.scale} .status=${this.status} ${m(this.setStartInput)}></calcite-input-text>${!this.readOnly&&!this.range&&this.renderToggleIcon(this.open&&this.focusedInput==="start")||""}<span aria-hidden=true class=${r(n.assistiveText)} id=${this.placeholderTextId??p}>${a.dateFormat.replace("{format}",this.localeData?.placeholder)}</span></div><div .ariaHidden=${!this.open} .ariaLabel=${a.chooseDate} aria-live=polite aria-modal=true class=${r(n.menu)} id=${this.dialogId??p} role=dialog ${m(this.setFloatingEl)}><div class=${r({[n.calendarWrapper]:!0,[k.animation]:!0,[k.animationActive]:this.open})} ${m(this.setTransitionEl)}><calcite-date-picker .activeDate=${this.datePickerActiveDate} .activeRange=${this.focusedInput} .headingLevel=${this.headingLevel} .layout=${this.layout} .max=${this.max} .maxAsDate=${this.maxAsDate} .messageOverrides=${this.messageOverrides} .min=${this.min} .minAsDate=${this.minAsDate} .monthStyle=${this.monthStyle} .numberingSystem=${i} @calciteDatePickerChange=${this.handleDateChange} @calciteDatePickerRangeChange=${this.handleDateRangeChange} .proximitySelectionDisabled=${this.proximitySelectionDisabled} .range=${this.range} .scale=${this.scale} tabindex=${(this.open?void 0:-1)??p} .valueAsDate=${this.valueAsDate} ${m(this.setDatePickerRef)}></calcite-date-picker></div></div>${this.range&&g`<div class=${r(n.dividerContainer)}><div class=${r(n.divider)}></div></div>`||""}${this.range&&g`<div class=${r(n.inputWrapper)} data-position=${ot.end} @click=${this.onInputWrapperClick} @pointerdown=${this.onInputWrapperPointerDown} ${m(this.setEndWrapper)}><calcite-input-text aria-controls=${this.dialogId??p} aria-autocomplete=none .ariaExpanded=${this.open} aria-haspopup=dialog class=${r({[n.input]:!0,[n.inputNoTopBorder]:this.layout==="vertical"&&this.range,[n.inputNoLeftBorder]:this.layout==="horizontal"&&this.range,[n.inputNoRightBorder]:this.layout==="vertical"&&this.range})} .disabled=${t} .icon=${y.calendar} .label=${this.messages.endDate} @calciteInputTextInput=${this.calciteInternalInputInputHandler} @calciteInternalInputTextBlur=${this.calciteInternalInputBlurHandler} @calciteInternalInputTextFocus=${this.endInputFocus} .placeholder=${this.localeData?.placeholder} .readOnly=${s} role=combobox .scale=${this.scale} .status=${this.status} ${m(this.setEndInput)}></calcite-input-text>${!this.readOnly&&this.layout==="horizontal"&&this.renderToggleIcon(this.open)||""}</div>`||""}</div>${this.range&&this.layout==="vertical"&&g`<div class=${r(n.verticalChevronContainer)}><calcite-icon .icon=${this.open?y.chevronUp:y.chevronDown} .scale=${C(this.scale)}></calcite-icon></div>`||""}</div>${tt({component:this})}${this.validationMessage&&this.status==="invalid"?et({icon:this.validationIcon,id:$.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderToggleIcon(t){return g`<span class=${r(n.toggleIcon)} tabindex=-1><calcite-icon class=${r(n.chevronIcon)} .icon=${t?y.chevronUp:y.chevronDown} .scale=${C(this.scale)}></calcite-icon></span>`}};z("calcite-input-date-picker",V);export{V as InputDatePicker};
|
|
3
|
+
v3.3.0-next.64 */
|
|
4
|
+
import{a as rt}from"./6VSHUL52.js";import{a as nt}from"./44UD6KGP.js";import{a as st,b as w}from"./4Q4KKSN4.js";import{a as at,b as x,c as l,d as S,g as it,h as c,i as P}from"./FOJQBMPS.js";import{g as W,h as H,i as M,k as v}from"./YNQZEVSF.js";import{a as et}from"./34QEIYUP.js";import{a as J,c as Q,e as X,h as tt}from"./E6NXYM3P.js";import{c as K,d as Z}from"./XNA6U4F7.js";import{a as Y,c as k,d as _,e as q,f as G,g as D,h as j}from"./YPVSODHF.js";import{a as U}from"./VK3CCXZS.js";import{a as R,b as N}from"./N3WZSQC2.js";import"./ZDU4XVSH.js";import{b as F}from"./74KZUTUN.js";import{a as L}from"./V5LKVIXY.js";import{a as B}from"./2OPYQDKQ.js";import"./R3GOL3TM.js";import{a as C}from"./J2ZX63CE.js";import"./DDXIYENY.js";import"./HNO3DPEZ.js";import{a as A}from"./EQGJYJ5R.js";import{C as m,D as T,E as r,I as E,Q as z,g as O,h as g,l as p,o as f}from"./IZ433VC7.js";var ct=O`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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{position:relative;display:inline-block;width:100%;overflow:visible;vertical-align:top;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:host .menu-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}:host .menu-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}:host .menu-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}:host .menu-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}:host .menu-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}:host .menu-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{:host .menu-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}:host([scale=s]){--calcite-toggle-spacing: .5rem;--calcite-internal-input-text-input-padding-inline-end: calc(var(--calcite-toggle-spacing) + 1rem)}:host([scale=m]){--calcite-toggle-spacing: .75rem;--calcite-internal-input-text-input-padding-inline-end: calc(var(--calcite-toggle-spacing) + 1.5rem)}:host([scale=l]){--calcite-toggle-spacing: 1rem;--calcite-internal-input-text-input-padding-inline-end: calc(var(--calcite-toggle-spacing) + 2rem)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.calendar-wrapper{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transform:translateZ(0)}.input-wrapper{position:relative}.input-wrapper .chevron-icon{color:var(--calcite-color-text-3)}.input-wrapper:focus-within .chevron-icon,.input-wrapper:active .chevron-icon,.input-wrapper:hover .chevron-icon{color:var(--calcite-color-text-1)}.input-wrapper:focus-within~.input-wrapper .chevron-icon,.input-wrapper:active~.input-wrapper .chevron-icon,.input-wrapper:hover~.input-wrapper .chevron-icon{color:var(--calcite-color-text-1)}.toggle-icon{position:absolute;display:flex;cursor:pointer;align-items:center;inset-inline-end:0;inset-block:0;padding-inline:var(--calcite-toggle-spacing)}:host([range]) .container{display:flex}:host([range]) .input-container{display:flex;flex:1 1 auto}:host([range]) .input-wrapper{flex:1 1 auto}.divider-container{display:flex;align-items:stretch;border-width:1px;border-left-width:0px;border-right-width:0px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:var(--calcite-color-foreground-1)}:host([layout=horizontal]) .divider-container{width:1px}.divider{display:inline-block;width:1px;margin-block:var(--calcite-spacing-xxs);background-color:var(--calcite-color-border-2)}:host([layout=vertical]) .divider-container{height:1px;width:100%;border-top-width:0px;border-bottom-width:0px;border-left-width:1px;border-right-width:0px;padding-inline:var(--calcite-spacing-md)}:host([layout=vertical]) .divider-container .divider{margin-top:0;margin-bottom:0;height:1px;width:100%}:host([range][layout=vertical]) .input-wrapper{width:100%}:host([range][layout=vertical]) .input-container{flex-direction:column;align-items:flex-start}.menu-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown);inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.menu-container{opacity:0;inset-block-start:0;left:0}}.menu-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.menu-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.menu-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.menu-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.menu-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.menu-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.menu-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.input .calcite-input__wrapper{margin-top:0}.vertical-chevron-container{display:flex;align-items:center;border-width:1px;border-left-width:0px;border-style:solid;border-color:var(--calcite-color-border-input);padding-inline:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}.vertical-chevron-container calcite-icon{color:var(--calcite-color-text-3)}.vertical-chevron-container calcite-icon:hover{color:var(--calcite-color-text-1)}:host([range][layout=vertical][scale=s]) .vertical-chevron-container,:host([range][layout=vertical][scale=s]) .divider-container{padding-inline:var(--calcite-spacing-sm)}:host([range][layout=vertical][scale=l]) .vertical-chevron-container,:host([range][layout=vertical][scale=l]) .divider-container{padding-inline:var(--calcite-spacing-lg)}.container:focus-within .vertical-chevron-container calcite-icon,.container:active .vertical-chevron-container calcite-icon,.container:hover .vertical-chevron-container calcite-icon{color:var(--calcite-color-text-1)}.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}.assistive-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}`,n={assistiveText:"assistive-text",calendarWrapper:"calendar-wrapper",container:"container",dividerContainer:"divider-container",divider:"divider",inputContainer:"input-container",inputNoBottomBorder:"input--no-bottom-border",inputNoRightBorder:"input--no-right-border",inputNoTopBorder:"input--no-top-border",inputNoLeftBorder:"input--no-left-border",inputWrapper:"input-wrapper",input:"input",menu:"menu-container",toggleIcon:"toggle-icon",verticalChevronContainer:"vertical-chevron-container",chevronIcon:"chevron-icon"},ut="calcite-input-date-picker",$={validationMessage:"inputDatePickerValidationMessage",dialog:u=>`date-picker-dialog--${u}`,placeholder:u=>`${ut}-placeholder-${u}`},ot={start:"start",end:"end"},y={calendar:"calendar",chevronDown:"chevron-down",chevronUp:"chevron-up"};function ht(u){if(!u)return!1;let{year:t}=P(u);return Number(t)<100}function dt(u){let t=new Date().getFullYear();return Math.floor(t/100)*100+u}var V=class extends T{constructor(){super(),this.commonDateSeparators=[".","-","/"],this.dialogId=$.dialog(A()),this.focusOnOpen=!1,this.focusTrap=nt({triggerProp:"open",focusTrapOptions:{onActivate:()=>{this.focusOnOpen&&(this.datePickerEl?.setFocus(),this.focusOnOpen=!1)},allowOutsideClick:!0,clickOutsideDeactivates:!1,initialFocus:!1,setReturnFocus:!1,onDeactivate:()=>{this.open=!1}}})(this),this.transitionProp="opacity",this.placeholderTextId=$.placeholder(A()),this.rangeStartValueChangedByUser=!1,this.userChangedValue=!1,this._value="",this.valueAsDateChangedExternally=!1,this.messages=L({blocking:!0}),this.focusSetter=B()(this),this.focusedInput="start",this.disabled=!1,this.focusTrapDisabled=!1,this.layout="horizontal",this.monthStyle="wide",this.open=!1,this.overlayPositioning="absolute",this.placement=Y,this.proximitySelectionDisabled=!1,this.range=!1,this.readOnly=!1,this.required=!1,this.scale="m",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.calciteInputDatePickerBeforeClose=f({cancelable:!1}),this.calciteInputDatePickerBeforeOpen=f({cancelable:!1}),this.calciteInputDatePickerChange=f({cancelable:!1}),this.calciteInputDatePickerClose=f({cancelable:!1}),this.calciteInputDatePickerOpen=f({cancelable:!1}),this.listen("blur",this.blurHandler),this.listen("keydown",this.keyDownHandler),this.handleDateTimeFormatChange()}static{this.properties={datePickerActiveDate:[16,{},{state:!0}],focusedInput:[16,{},{state:!0}],localeData:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],focusTrapDisabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],headingLevel:[11,{},{type:Number,reflect:!0}],label:1,layout:[3,{},{reflect:!0}],max:[3,{},{reflect:!0}],maxAsDate:[0,{},{attribute:!1}],messageOverrides:[0,{},{attribute:!1}],min:[3,{},{reflect:!0}],minAsDate:[0,{},{attribute:!1}],monthStyle:1,name:[3,{},{reflect:!0}],numberingSystem:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],proximitySelectionDisabled:[5,{},{type:Boolean}],range:[7,{},{reflect:!0,type:Boolean}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:E},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1,valueAsDate:[0,{},{attribute:!1}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=ct}get value(){return this._value}set value(t){let e=t!==this._value,a=t===""&&(this.startInput?.value!==""||this.endInput?.value!=="");(e||a)&&(this._value=t,this.valueWatcher(t))}async reposition(t=!1){let{floatingEl:e,referenceEl:a,placement:i,overlayPositioning:s,filteredFlipPlacements:o}=this;return q(this,{floatingEl:e,referenceEl:a,overlayPositioning:s,placement:i,flipPlacements:o,type:"menu"},t)}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback();let{open:t}=this;if(t&&this.openHandler(),this.min&&(this.minAsDate=l(this.min)),this.max&&(this.maxAsDate=l(this.max)),Array.isArray(this.value))this.valueAsDate=w(this.value);else if(this.value)try{let e=l(this.value),a=x(e,this.minAsDate,this.maxAsDate);this.valueAsDate=a}catch{this.warnAboutInvalidValue(this.value),this.value=""}else this.valueAsDate&&(this.range&&Array.isArray(this.valueAsDate)?this.value=[c(this.valueAsDate[0]),c(this.valueAsDate[1])]:!this.range&&!Array.isArray(this.valueAsDate)&&(this.value=c(this.valueAsDate)));K(this),Q(this),this.setFilteredPlacements(),v.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.messages._lang,useGrouping:!1},D(this)}async load(){this.handleDateTimeFormatChange(),await this.loadLocaleData(),this.onMinChanged(this.min),this.onMaxChanged(this.max)}willUpdate(t){t.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledAndReadOnlyChange(this.disabled),t.has("readOnly")&&(this.hasUpdated||this.readOnly!==!1)&&this.handleDisabledAndReadOnlyChange(this.readOnly),t.has("valueAsDate")&&this.valueAsDateWatcher(this.valueAsDate),t.has("flipPlacements")&&this.flipPlacementsHandler(),t.has("min")&&this.onMinChanged(this.min),t.has("max")&&this.onMaxChanged(this.max),t.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),t.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")&&this.reposition(!0),(t.has("numberingSystem")||t.has("messages"))&&this.handleDateTimeFormatChange(),t.has("layout")&&(this.hasUpdated||this.layout!=="horizontal")&&this.setReferenceEl(),t.has("messages")&&this.loadLocaleData()}updated(){R(this)}loaded(){this.localizeInputValues(),D(this)}disconnectedCallback(){super.disconnectedCallback(),Z(this),X(this),j(this)}handleDisabledAndReadOnlyChange(t){t||(this.open=!1)}valueWatcher(t){if(!this.userChangedValue){let e;Array.isArray(t)?e=w(t):t?e=l(t):e=void 0,!this.valueAsDateChangedExternally&&e!==this.valueAsDate&&(this.valueAsDate=e),this.localizeInputValues()}this.userChangedValue=!1}valueAsDateWatcher(t){let e=Array.isArray(t)?[c(t[0]),c(t[1])]:c(t);this.datePickerActiveDate=Array.isArray(t)?t[0]:t,this.value!==e&&(this.valueAsDateChangedExternally=!0,this.value=e,this.valueAsDateChangedExternally=!1)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}onMinChanged(t){this.minAsDate=l(t)}onMaxChanged(t){this.maxAsDate=l(t)}openHandler(){U(this),!(this.disabled||this.readOnly)&&this.reposition(!0)}calciteInternalInputInputHandler(t){let e=t.target,a=e.value,i=this.parseNumerals(a),s=this.formatNumerals(i);e.value=s;let{year:o}=it(a,this.localeData);if(o&&o.length<4)return;let h=S(a,this.localeData);at(h,this.min,this.max)&&(this.datePickerActiveDate=h)}calciteInternalInputBlurHandler(){this.commitValue()}handleDateTimeFormatChange(){let t={numberingSystem:W(this.numberingSystem)};this.dateTimeFormat=new Intl.DateTimeFormat(M(H(this.messages._lang)),t)}setReferenceEl(){let{focusedInput:t,layout:e,endWrapper:a,startWrapper:i}=this;this.referenceEl=t==="end"||e==="vertical"?a||i:i||a,requestAnimationFrame(()=>D(this))}onInputWrapperPointerDown(){this.currentOpenInput=this.focusedInput}onInputWrapperClick(t){let{range:e,endInput:a,startInput:i,currentOpenInput:s}=this,h=t.currentTarget.getAttribute("data-position");t.composedPath().find(b=>b.classList?.contains(n.toggleIcon))&&(h==="start"?i:a).setFocus(),(!e||!this.open||s===h)&&(this.open=!this.open)}setFilteredPlacements(){let{el:t,flipPlacements:e}=this;this.filteredFlipPlacements=e?_(e,t):null}setTransitionEl(t){t&&(this.transitionEl=t)}onLabelClick(){this.setFocus()}onBeforeOpen(){this.calciteInputDatePickerBeforeOpen.emit()}onOpen(){this.focusTrap.activate(),this.calciteInputDatePickerOpen.emit()}onBeforeClose(){this.calciteInputDatePickerBeforeClose.emit()}onClose(){this.calciteInputDatePickerClose.emit(),G(this),this.focusTrap.deactivate(),this.focusOnOpen=!1,this.datePickerEl?.reset()}syncHiddenFormInput(t){rt("date",this,t)}setStartInput(t){this.startInput=t}setEndInput(t){this.endInput=t}blurHandler(){this.open=!1}commitValue(){let{focusedInput:t,value:e}=this,a=`${t}Input`,i=this[a].value,s=S(i,this.localeData),o=c(s),h=Array.isArray(e);if(this.range){let d=t==="start"?0:1;if(h){if(o===e[d])return;s?(this.setRangeValue([t==="start"?s:l(e[0]),t==="end"?s:l(e[1])]),this.localizeInputValues()):this.setRangeValue([t==="end"&&l(e[0]),t==="start"&&l(e[1])])}else s&&(this.setRangeValue([t==="start"?s:l(e[0]),t==="end"?s:l(e[1])]),this.localizeInputValues())}else{if(o===e)return;this.setValue(s),this.localizeInputValues()}}keyDownHandler(t){let{defaultPrevented:e,key:a}=t;if(e)return;let i=t.composedPath().some(s=>s.tagName==="CALCITE-SELECT");a==="Enter"?(t.preventDefault(),this.commitValue(),this.shouldFocusRangeEnd()?this.endInput?.setFocus():this.shouldFocusRangeStart()&&this.startInput?.setFocus(),J(this)&&this.restoreInputFocus(!0)):(a==="ArrowDown"||a==="ArrowUp")&&!i?(this.open=!0,this.focusOnOpen=!0,t.preventDefault()):this.open&&a==="Escape"&&(this.open=!1,t.preventDefault(),this.restoreInputFocus(!0))}startInputFocus(){this.focusedInput="start"}endInputFocus(){this.focusedInput="end"}setFloatingEl(t){this.floatingEl=t,D(this)}setStartWrapper(t){this.startWrapper=t,this.setReferenceEl()}setEndWrapper(t){this.endWrapper=t,this.setReferenceEl()}setDatePickerRef(t){t&&(this.datePickerEl=t,this.focusTrap.overrideFocusTrapEl(t))}async loadLocaleData(){v.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.messages._lang,useGrouping:!1},this.localeData=await st(this.messages._lang),this.localizeInputValues()}handleDateChange(t){this.range||(t.stopPropagation(),this.setValue(t.target.valueAsDate),this.localizeInputValues(),this.restoreInputFocus())}shouldFocusRangeStart(){let t=this.value[0];return!!(this.value[1]&&!t&&this.focusedInput==="end"&&this.startInput)}shouldFocusRangeEnd(){let t=this.value[0],e=this.value[1];return!!(t&&!e&&this.focusedInput==="start"&&this.endInput)}handleDateRangeChange(t){if(!this.range)return;t.stopPropagation();let e=t.target.valueAsDate;this.setRangeValue(e),this.localizeInputValues(),this.restoreInputFocus()}restoreInputFocus(t=!1){if(!this.range){this.startInput.setFocus(),this.open=!1;return}if(t){this.focusInput();return}this.rangeStartValueChangedByUser=this.focusedInput==="start",this.focusedInput="end",!(this.shouldFocusRangeStart()||this.rangeStartValueChangedByUser)&&(this.open=!1,this.focusInput())}localizeInputValues(){let t=x(this.range?Array.isArray(this.valueAsDate)&&this.valueAsDate[0]||void 0:this.valueAsDate,this.minAsDate,this.maxAsDate),e=this.range?x(Array.isArray(this.valueAsDate)&&this.valueAsDate[1]||void 0,this.minAsDate,this.maxAsDate):null;this.setInputValue((t&&this.dateTimeFormat.format(t))??"","start"),this.setInputValue((this.range&&e&&this.dateTimeFormat.format(e))??"","end")}setInputValue(t,e="start"){let a=this[`${e}Input`];a&&(a.value=t)}setRangeValue(t){if(!this.range)return;let{value:e}=this,a=Array.isArray(e),i=Array.isArray(t),s=i?t[0]:null,o=i?c(s):"";o&&(o=this.getNormalizedDate(o));let h=i?t[1]:null,d=i?c(h):"";d&&(d=this.getNormalizedDate(d));let I=o||d?[o,d]:"";if(I===e)return;this.userChangedValue=!0,this.value=I,this.valueAsDate=I?w(I):void 0;let b=this.calciteInputDatePickerChange.emit();b&&b.defaultPrevented&&(this.value=e,a?(this.setInputValue(e[0],"start"),this.setInputValue(e[1],"end")):(this.value=e,this.setInputValue(e)))}setValue(t){if(this.range)return;let e=this.value,a=c(t);if(a=this.getNormalizedDate(a),a===e)return;this.userChangedValue=!0,this.valueAsDate=a?l(a):void 0,this.value=a||"",this.calciteInputDatePickerChange.emit().defaultPrevented&&(this.value=e,this.setInputValue(e))}warnAboutInvalidValue(t){console.warn(`The specified value "${t}" does not conform to the required format, "YYYY-MM-DD".`)}formatNumerals(t){return t?t.split("").map(e=>this.commonDateSeparators?.includes(e)?this.localeData?.separator:F?.includes(e)?v?.numberFormatter?.format(Number(e)):e).join(""):""}parseNumerals(t){return t?t.split("").map(e=>F.includes(e)?v.delocalize(e):e).join(""):""}getNormalizedDate(t){if(!t)return"";if(!ht(t))return t;let{day:e,month:a,year:i}=P(t);return`${dt(Number(i))}-${a}-${e}`}focusInput(){(this.focusedInput==="start"?this.startInput:this.endInput).setFocus()}render(){let{disabled:t,messages:{_lang:e},messages:a,numberingSystem:i,readOnly:s}=this;return v.numberFormatOptions={numberingSystem:i,locale:e,useGrouping:!1},N({disabled:this.disabled,children:g`<div class=${r(n.container)}><div aria-label=${this.label??p} class=${r(n.inputContainer)} role=group><div class=${r(n.inputWrapper)} data-position=${ot.start} @click=${this.onInputWrapperClick} @pointerdown=${this.onInputWrapperPointerDown} ${m(this.setStartWrapper)}><calcite-input-text aria-controls=${this.dialogId??p} aria-describedby=${this.placeholderTextId??p} aria-errormessage=${$.validationMessage} aria-autocomplete=none .ariaExpanded=${this.open} aria-haspopup=dialog .ariaInvalid=${this.status==="invalid"} class=${r({[n.input]:!0,[n.inputNoBottomBorder]:this.layout==="vertical"&&this.range,[n.inputNoRightBorder]:this.range})} .disabled=${t} .icon=${y.calendar} .label=${this.range?this.messages.startDate:this.messages.date} @calciteInputTextInput=${this.calciteInternalInputInputHandler} @calciteInternalInputTextBlur=${this.calciteInternalInputBlurHandler} @calciteInternalInputTextFocus=${this.startInputFocus} .placeholder=${this.localeData?.placeholder} .readOnly=${s} role=combobox .scale=${this.scale} .status=${this.status} ${m(this.setStartInput)}></calcite-input-text>${!this.readOnly&&!this.range&&this.renderToggleIcon(this.open&&this.focusedInput==="start")||""}<span aria-hidden=true class=${r(n.assistiveText)} id=${this.placeholderTextId??p}>${a.dateFormat.replace("{format}",this.localeData?.placeholder)}</span></div><div .ariaHidden=${!this.open} .ariaLabel=${a.chooseDate} aria-live=polite aria-modal=true class=${r(n.menu)} id=${this.dialogId??p} role=dialog ${m(this.setFloatingEl)}><div class=${r({[n.calendarWrapper]:!0,[k.animation]:!0,[k.animationActive]:this.open})} ${m(this.setTransitionEl)}><calcite-date-picker .activeDate=${this.datePickerActiveDate} .activeRange=${this.focusedInput} .headingLevel=${this.headingLevel} .layout=${this.layout} .max=${this.max} .maxAsDate=${this.maxAsDate} .messageOverrides=${this.messageOverrides} .min=${this.min} .minAsDate=${this.minAsDate} .monthStyle=${this.monthStyle} .numberingSystem=${i} @calciteDatePickerChange=${this.handleDateChange} @calciteDatePickerRangeChange=${this.handleDateRangeChange} .proximitySelectionDisabled=${this.proximitySelectionDisabled} .range=${this.range} .scale=${this.scale} tabindex=${(this.open?void 0:-1)??p} .valueAsDate=${this.valueAsDate} ${m(this.setDatePickerRef)}></calcite-date-picker></div></div>${this.range&&g`<div class=${r(n.dividerContainer)}><div class=${r(n.divider)}></div></div>`||""}${this.range&&g`<div class=${r(n.inputWrapper)} data-position=${ot.end} @click=${this.onInputWrapperClick} @pointerdown=${this.onInputWrapperPointerDown} ${m(this.setEndWrapper)}><calcite-input-text aria-controls=${this.dialogId??p} aria-autocomplete=none .ariaExpanded=${this.open} aria-haspopup=dialog class=${r({[n.input]:!0,[n.inputNoTopBorder]:this.layout==="vertical"&&this.range,[n.inputNoLeftBorder]:this.layout==="horizontal"&&this.range,[n.inputNoRightBorder]:this.layout==="vertical"&&this.range})} .disabled=${t} .icon=${y.calendar} .label=${this.messages.endDate} @calciteInputTextInput=${this.calciteInternalInputInputHandler} @calciteInternalInputTextBlur=${this.calciteInternalInputBlurHandler} @calciteInternalInputTextFocus=${this.endInputFocus} .placeholder=${this.localeData?.placeholder} .readOnly=${s} role=combobox .scale=${this.scale} .status=${this.status} ${m(this.setEndInput)}></calcite-input-text>${!this.readOnly&&this.layout==="horizontal"&&this.renderToggleIcon(this.open)||""}</div>`||""}</div>${this.range&&this.layout==="vertical"&&g`<div class=${r(n.verticalChevronContainer)}><calcite-icon .icon=${this.open?y.chevronUp:y.chevronDown} .scale=${C(this.scale)}></calcite-icon></div>`||""}</div>${tt({component:this})}${this.validationMessage&&this.status==="invalid"?et({icon:this.validationIcon,id:$.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderToggleIcon(t){return g`<span class=${r(n.toggleIcon)} tabindex=-1><calcite-icon class=${r(n.chevronIcon)} .icon=${t?y.chevronUp:y.chevronDown} .scale=${C(this.scale)}></calcite-icon></span>`}};z("calcite-input-date-picker",V);export{V as InputDatePicker};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v3.3.0-next.
|
|
4
|
-
import{l as H}from"./YFJBESJU.js";import{a as $}from"./4QQUOBTO.js";import{c as j,e as A,f as K,h as J}from"./IP7OBNPO.js";import{c as q,d as W}from"./XVYKM6AR.js";import{a as U,b as N}from"./4LDSXFQW.js";import{a as V}from"./3RUAUOGX.js";import"./D4YNGMQ4.js";import{a as G}from"./4BLBMXP4.js";import{a as _}from"./KN5DRBMX.js";import"./KC2OT7YP.js";import"./N243526J.js";import"./TIHWCMZN.js";import"./QVOHFRXW.js";import"./IG5ZDCFZ.js";import{C as z,D as E,E as M,I as R,Q as k,g as P,h as I,l as y,o as b}from"./RSMIW2TD.js";var te={offset:"offset"},oe=60;function O(t){return t.replace(":15",".25").replace(":30",".5").replace(":45",".75").replace("\u2212","-")}function se(t,e){let o=w(t,"en-US",e).replace("GMT","");return o===""?0:Number(O(o))*oe}function ae(){return new Date().getTimezoneOffset()*-1}function ie(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}async function ne(t){if(t==="offset")return o=>o;let{normalize:e}=await import("./K3DVOXIM.js");return e}async function le(t,e,o,s,a){if(o==="name"){let{groupByName:i}=await import("./PSNQGJHN.js");return(await i()).map(({label:n})=>({label:n,value:n,metadata:{filterValue:n}})).filter(n=>!!n).sort()}let l=a==="user"?t:a==="utc"?"fr":"en-GB",f=s.getTime();if(o==="region"){let[{groupByRegion:i},{getCountry:c,global:n}]=await Promise.all([import("./IP57IX3P.js"),import("./UKGT42LH.js")]);return(await i()).map(({label:m,tzs:d})=>(d.sort((u,h)=>{let v=T(u,e),x=T(h,e),p="Etc/GMT";if(u.startsWith(p)&&h.startsWith(p)){let g=u.substring(p.length),D=h.substring(p.length),ee=g===""?0:parseInt(g);return(D===""?0:parseInt(D))-ee}return v.localeCompare(x)}),{label:S(e,m),items:d.map(u=>{let h=O(w(u,l,f)),v=T(u,e),x=m===n?`${T(n,e)} Etc`:Q(u),p=c(u),g=S(e,p);return{label:v,value:u,metadata:{country:g===v?void 0:g,filterValue:x,offset:h}}})})).sort((m,d)=>m.label===n?-1:d.label===n?1:m.label.localeCompare(d.label))}let[{groupByOffset:C},{DateEngine:Z}]=await Promise.all([import("./EKLMKNES.js"),import("./SFIJNDAZ.js")]),B=await C({dateEngine:new Z,groupDateRange:1,startDate:new Date(f).toISOString()}),Y=new Intl.ListFormat(t,{style:"long",type:"conjunction"}),F=["Factory","Etc/UTC"];return B.forEach(i=>{let c=[],n=0;i.tzs.forEach((r,m)=>{F.includes(r)&&n++,c[m]=n}),i.tzs=i.tzs.filter(r=>!F.includes(r)),i.labelTzIdx=i.labelTzIdx.map(r=>r-c[r]).filter(r=>r>=0&&r<i.tzs.length)}),B.map(({labelTzIdx:i,tzs:c})=>{let n=c[0],r=O(w(n,l,f)),m=se(n,f),d=i.map(h=>T(c[h],e));return{label:me(e,r,Y.format(d)),value:m,metadata:{filterValue:c.map(h=>Q(h))}}}).filter(i=>!!i).sort((i,c)=>i.value-c.value)}function T(t,e){return e[t]||ce(t)}function re(t,e,o){return o.timeZoneRegionLabel.replace("{city}",t).replace("{country}",S(o,e))}function S(t,e){return t[e]||e}function ce(t){return t.split("/").pop()}function Q(t){return t.replace(/_/g," ")}function me(t,e,o){return t.timeZoneLabel.replace("{offset}",e).replace("{cities}",o)}function w(t,e,o=Date.now()){return t==="Factory"&&(t="Etc/GMT"),H(e,{timeZone:t,timeZoneName:"shortOffset"}).formatToParts(o).find(({type:l})=>l==="timeZoneName").value}function ue(t){return t[0].items!==void 0}function he(t){return ue(t)?t.flatMap(e=>e.items):t}function X(t,e,o){return o==null?null:he(t).find(s=>s[e]==o)}var fe=P`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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:block}.offset{white-space:nowrap}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}::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}`,L=class extends E{constructor(){super(...arguments),this.messages=G({blocking:!0}),this.focusSetter=_()(this),this.clearable=!1,this.disabled=!1,this.maxItems=0,this.mode="offset",this.offsetStyle="user",this.open=!1,this.overlayPositioning="absolute",this.readOnly=!1,this.required=!1,this.scale="m",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.calciteInputTimeZoneBeforeClose=b({cancelable:!1}),this.calciteInputTimeZoneBeforeOpen=b({cancelable:!1}),this.calciteInputTimeZoneChange=b({cancelable:!1}),this.calciteInputTimeZoneClose=b({cancelable:!1}),this.calciteInputTimeZoneOpen=b({cancelable:!1})}static{this.properties={clearable:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],mode:[3,{},{reflect:!0}],name:[3,{},{reflect:!0}],offsetStyle:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],referenceDate:1,required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:R},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=fe}get value(){return this._value}set value(e){this._value=e}async setFocus(e){return this.focusSetter(()=>this.comboboxEl,e)}connectedCallback(){super.connectedCallback(),j(this),q(this)}async load(){this.normalizer=await ne(this.mode),await this.updateTimeZoneItems();let e=this.value,o=this.normalizeValue(e);this.value=o||(e===""?o:void 0),this.updateTimeZoneSelection();let s=this.selectedTimeZoneItem?`${this.selectedTimeZoneItem.value}`:"";K(this,s),this.value=s}willUpdate(e){e.has("value")&&this.hasUpdated&&this.handleValueChange(this.value,e.get("value")),(e.has("messages")||e.has("mode")&&(this.hasUpdated||this.mode!=="offset")||e.has("referenceDate"))&&this.handleTimeZoneItemPropsChange(),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openChanged()}updated(){U(this)}loaded(){this.openChanged()}disconnectedCallback(){super.disconnectedCallback(),A(this),W(this)}async handleTimeZoneItemPropsChange(){!this.timeZoneItems||!this.hasUpdated||(await this.updateTimeZoneItems(),this.updateTimeZoneSelection())}openChanged(){this.comboboxEl&&(this.comboboxEl.open=this.open)}async handleValueChange(e,o){let s=this.normalizeValue(e);if(!s){if(this.clearable){this._value=s,this.selectedTimeZoneItem=null;return}this._value=o,this.selectedTimeZoneItem=this.findTimeZoneItem(o);return}let a=this.findTimeZoneItem(s);if(!a){this._value=o;return}this._value=s,this.selectedTimeZoneItem=a}onLabelClick(){this.setFocus()}setComboboxRef(e){this.comboboxEl=e}overrideSelectedLabelForRegion(e){this.mode!=="region"||!this.selectedTimeZoneItem||(this.comboboxEl.selectedItems[0].textLabel=this.getItemLabel(this.selectedTimeZoneItem,e))}onComboboxBeforeClose(e){e.stopPropagation(),this.overrideSelectedLabelForRegion(!1),this.calciteInputTimeZoneBeforeClose.emit()}onComboboxBeforeOpen(e){e.stopPropagation(),this.overrideSelectedLabelForRegion(!0),this.calciteInputTimeZoneBeforeOpen.emit()}onComboboxChange(e){e.stopPropagation();let s=e.target.selectedItems[0];if(!s){this._value="",this.selectedTimeZoneItem=null,this.calciteInputTimeZoneChange.emit();return}let a=this.findTimeZoneItemByLabel(s.getAttribute("data-label")),l=`${a.value}`;this.value===l&&a.label===this.selectedTimeZoneItem.label||(this._value=l,this.selectedTimeZoneItem=a,this.calciteInputTimeZoneChange.emit())}onComboboxClose(e){e.stopPropagation(),this.open=!1,this.calciteInputTimeZoneClose.emit()}onComboboxOpen(e){this.open=!0,e.stopPropagation(),this.calciteInputTimeZoneOpen.emit()}findTimeZoneItem(e){return X(this.timeZoneItems,"value",e)}findTimeZoneItemByLabel(e){return X(this.timeZoneItems,"label",e)}async updateTimeZoneItems(){this.timeZoneItems=await this.createTimeZoneItems()}updateTimeZoneSelection(){if(this.value===""&&this.clearable){this.selectedTimeZoneItem=null;return}let e=this.mode==="offset"?ae():ie(),o=this.value===""||!this.value?e:this.value;this.selectedTimeZoneItem=this.findTimeZoneItem(o)||this.findTimeZoneItem(e)}async createTimeZoneItems(){return!this.messages._lang||!this.messages?[]:le(this.messages._lang,this.messages,this.mode,this.referenceDate instanceof Date?this.referenceDate:new Date(this.referenceDate??Date.now()),this.offsetStyle)}normalizeValue(e){return e=e===void 0?"":e,e&&this.normalizer(e)}getItemLabel(e,o=this.open){let s=this.selectedTimeZoneItem===e,{label:a,metadata:l}=e;return!l.country||o||!s?a:re(a,l.country,this.messages)}render(){return N({disabled:this.disabled,children:I`<calcite-combobox .clearDisabled=${!this.clearable} .disabled=${this.disabled} .label=${this.messages.chooseTimeZone} lang=${this.messages._lang??y} .maxItems=${this.maxItems} @calciteComboboxBeforeClose=${this.onComboboxBeforeClose} @calciteComboboxBeforeOpen=${this.onComboboxBeforeOpen} @calciteComboboxChange=${this.onComboboxChange} @calciteComboboxClose=${this.onComboboxClose} @calciteComboboxOpen=${this.onComboboxOpen} .overlayPositioning=${this.overlayPositioning} .placeholder=${this.mode==="name"?this.messages.namePlaceholder:this.mode==="offset"?this.messages.offsetPlaceholder:this.messages.regionPlaceholder} placeholder-icon=search .readOnly=${this.readOnly} .scale=${this.scale} .selectionMode=${this.clearable?"single":"single-persist"} .status=${this.status} .validationIcon=${this.validationIcon} .validationMessage=${this.validationMessage} ${z(this.setComboboxRef)}>${this.renderItems()}</calcite-combobox>${J({component:this})}`})}renderItems(){return this.mode==="region"?this.renderRegionItems():$(this.timeZoneItems,({label:e})=>e,e=>{let o=this.selectedTimeZoneItem===e,{label:s,metadata:a,value:l}=e;return I`<calcite-combobox-item data-label=${s??y} .metadata=${a} .selected=${o} .textLabel=${s} .value=${l}></calcite-combobox-item>`})}renderRegionItems(){return this.timeZoneItems.flatMap(({label:e,items:o})=>V(e,I`<calcite-combobox-item-group .label=${e}>${$(o,({label:s})=>s,s=>{let a=this.selectedTimeZoneItem===s,{label:l,metadata:f,value:C}=s,Z=this.getItemLabel(s);return I`<calcite-combobox-item data-label=${l??y} .description=${f.country} .metadata=${f} .selected=${a} .textLabel=${Z} .value=${C}><span class=${M(te.offset)} slot=content-end>${f.offset}</span></calcite-combobox-item>`})}</calcite-combobox-item-group>`))}};k("calcite-input-time-zone",L);export{L as InputTimeZone};
|
|
3
|
+
v3.3.0-next.64 */
|
|
4
|
+
import{l as H}from"./YNQZEVSF.js";import{a as $}from"./LXCQQJXR.js";import{c as j,e as A,f as K,h as J}from"./E6NXYM3P.js";import{c as q,d as W}from"./XNA6U4F7.js";import{a as U,b as N}from"./N3WZSQC2.js";import{a as V}from"./JVQSSJ4H.js";import"./74KZUTUN.js";import{a as G}from"./V5LKVIXY.js";import{a as _}from"./2OPYQDKQ.js";import"./R3GOL3TM.js";import"./J2ZX63CE.js";import"./DDXIYENY.js";import"./HNO3DPEZ.js";import"./EQGJYJ5R.js";import{C as z,D as E,E as M,I as R,Q as k,g as P,h as I,l as y,o as b}from"./IZ433VC7.js";var te={offset:"offset"},oe=60;function O(t){return t.replace(":15",".25").replace(":30",".5").replace(":45",".75").replace("\u2212","-")}function se(t,e){let o=w(t,"en-US",e).replace("GMT","");return o===""?0:Number(O(o))*oe}function ae(){return new Date().getTimezoneOffset()*-1}function ie(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}async function ne(t){if(t==="offset")return o=>o;let{normalize:e}=await import("./DMEUM5FZ.js");return e}async function le(t,e,o,s,a){if(o==="name"){let{groupByName:i}=await import("./4M2WQ23M.js");return(await i()).map(({label:n})=>({label:n,value:n,metadata:{filterValue:n}})).filter(n=>!!n).sort()}let l=a==="user"?t:a==="utc"?"fr":"en-GB",f=s.getTime();if(o==="region"){let[{groupByRegion:i},{getCountry:c,global:n}]=await Promise.all([import("./QWX46QTJ.js"),import("./PO2R4OGJ.js")]);return(await i()).map(({label:m,tzs:d})=>(d.sort((u,h)=>{let v=T(u,e),x=T(h,e),p="Etc/GMT";if(u.startsWith(p)&&h.startsWith(p)){let g=u.substring(p.length),D=h.substring(p.length),ee=g===""?0:parseInt(g);return(D===""?0:parseInt(D))-ee}return v.localeCompare(x)}),{label:S(e,m),items:d.map(u=>{let h=O(w(u,l,f)),v=T(u,e),x=m===n?`${T(n,e)} Etc`:Q(u),p=c(u),g=S(e,p);return{label:v,value:u,metadata:{country:g===v?void 0:g,filterValue:x,offset:h}}})})).sort((m,d)=>m.label===n?-1:d.label===n?1:m.label.localeCompare(d.label))}let[{groupByOffset:C},{DateEngine:Z}]=await Promise.all([import("./6L7MSOC7.js"),import("./XW2IJAZJ.js")]),B=await C({dateEngine:new Z,groupDateRange:1,startDate:new Date(f).toISOString()}),Y=new Intl.ListFormat(t,{style:"long",type:"conjunction"}),F=["Factory","Etc/UTC"];return B.forEach(i=>{let c=[],n=0;i.tzs.forEach((r,m)=>{F.includes(r)&&n++,c[m]=n}),i.tzs=i.tzs.filter(r=>!F.includes(r)),i.labelTzIdx=i.labelTzIdx.map(r=>r-c[r]).filter(r=>r>=0&&r<i.tzs.length)}),B.map(({labelTzIdx:i,tzs:c})=>{let n=c[0],r=O(w(n,l,f)),m=se(n,f),d=i.map(h=>T(c[h],e));return{label:me(e,r,Y.format(d)),value:m,metadata:{filterValue:c.map(h=>Q(h))}}}).filter(i=>!!i).sort((i,c)=>i.value-c.value)}function T(t,e){return e[t]||ce(t)}function re(t,e,o){return o.timeZoneRegionLabel.replace("{city}",t).replace("{country}",S(o,e))}function S(t,e){return t[e]||e}function ce(t){return t.split("/").pop()}function Q(t){return t.replace(/_/g," ")}function me(t,e,o){return t.timeZoneLabel.replace("{offset}",e).replace("{cities}",o)}function w(t,e,o=Date.now()){return t==="Factory"&&(t="Etc/GMT"),H(e,{timeZone:t,timeZoneName:"shortOffset"}).formatToParts(o).find(({type:l})=>l==="timeZoneName").value}function ue(t){return t[0].items!==void 0}function he(t){return ue(t)?t.flatMap(e=>e.items):t}function X(t,e,o){return o==null?null:he(t).find(s=>s[e]==o)}var fe=P`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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:block}.offset{white-space:nowrap}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}::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}`,L=class extends E{constructor(){super(...arguments),this.messages=G({blocking:!0}),this.focusSetter=_()(this),this.clearable=!1,this.disabled=!1,this.maxItems=0,this.mode="offset",this.offsetStyle="user",this.open=!1,this.overlayPositioning="absolute",this.readOnly=!1,this.required=!1,this.scale="m",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.calciteInputTimeZoneBeforeClose=b({cancelable:!1}),this.calciteInputTimeZoneBeforeOpen=b({cancelable:!1}),this.calciteInputTimeZoneChange=b({cancelable:!1}),this.calciteInputTimeZoneClose=b({cancelable:!1}),this.calciteInputTimeZoneOpen=b({cancelable:!1})}static{this.properties={clearable:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],mode:[3,{},{reflect:!0}],name:[3,{},{reflect:!0}],offsetStyle:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],referenceDate:1,required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:R},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=fe}get value(){return this._value}set value(e){this._value=e}async setFocus(e){return this.focusSetter(()=>this.comboboxEl,e)}connectedCallback(){super.connectedCallback(),j(this),q(this)}async load(){this.normalizer=await ne(this.mode),await this.updateTimeZoneItems();let e=this.value,o=this.normalizeValue(e);this.value=o||(e===""?o:void 0),this.updateTimeZoneSelection();let s=this.selectedTimeZoneItem?`${this.selectedTimeZoneItem.value}`:"";K(this,s),this.value=s}willUpdate(e){e.has("value")&&this.hasUpdated&&this.handleValueChange(this.value,e.get("value")),(e.has("messages")||e.has("mode")&&(this.hasUpdated||this.mode!=="offset")||e.has("referenceDate"))&&this.handleTimeZoneItemPropsChange(),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openChanged()}updated(){U(this)}loaded(){this.openChanged()}disconnectedCallback(){super.disconnectedCallback(),A(this),W(this)}async handleTimeZoneItemPropsChange(){!this.timeZoneItems||!this.hasUpdated||(await this.updateTimeZoneItems(),this.updateTimeZoneSelection())}openChanged(){this.comboboxEl&&(this.comboboxEl.open=this.open)}async handleValueChange(e,o){let s=this.normalizeValue(e);if(!s){if(this.clearable){this._value=s,this.selectedTimeZoneItem=null;return}this._value=o,this.selectedTimeZoneItem=this.findTimeZoneItem(o);return}let a=this.findTimeZoneItem(s);if(!a){this._value=o;return}this._value=s,this.selectedTimeZoneItem=a}onLabelClick(){this.setFocus()}setComboboxRef(e){this.comboboxEl=e}overrideSelectedLabelForRegion(e){this.mode!=="region"||!this.selectedTimeZoneItem||(this.comboboxEl.selectedItems[0].textLabel=this.getItemLabel(this.selectedTimeZoneItem,e))}onComboboxBeforeClose(e){e.stopPropagation(),this.overrideSelectedLabelForRegion(!1),this.calciteInputTimeZoneBeforeClose.emit()}onComboboxBeforeOpen(e){e.stopPropagation(),this.overrideSelectedLabelForRegion(!0),this.calciteInputTimeZoneBeforeOpen.emit()}onComboboxChange(e){e.stopPropagation();let s=e.target.selectedItems[0];if(!s){this._value="",this.selectedTimeZoneItem=null,this.calciteInputTimeZoneChange.emit();return}let a=this.findTimeZoneItemByLabel(s.getAttribute("data-label")),l=`${a.value}`;this.value===l&&a.label===this.selectedTimeZoneItem.label||(this._value=l,this.selectedTimeZoneItem=a,this.calciteInputTimeZoneChange.emit())}onComboboxClose(e){e.stopPropagation(),this.open=!1,this.calciteInputTimeZoneClose.emit()}onComboboxOpen(e){this.open=!0,e.stopPropagation(),this.calciteInputTimeZoneOpen.emit()}findTimeZoneItem(e){return X(this.timeZoneItems,"value",e)}findTimeZoneItemByLabel(e){return X(this.timeZoneItems,"label",e)}async updateTimeZoneItems(){this.timeZoneItems=await this.createTimeZoneItems()}updateTimeZoneSelection(){if(this.value===""&&this.clearable){this.selectedTimeZoneItem=null;return}let e=this.mode==="offset"?ae():ie(),o=this.value===""||!this.value?e:this.value;this.selectedTimeZoneItem=this.findTimeZoneItem(o)||this.findTimeZoneItem(e)}async createTimeZoneItems(){return!this.messages._lang||!this.messages?[]:le(this.messages._lang,this.messages,this.mode,this.referenceDate instanceof Date?this.referenceDate:new Date(this.referenceDate??Date.now()),this.offsetStyle)}normalizeValue(e){return e=e===void 0?"":e,e&&this.normalizer(e)}getItemLabel(e,o=this.open){let s=this.selectedTimeZoneItem===e,{label:a,metadata:l}=e;return!l.country||o||!s?a:re(a,l.country,this.messages)}render(){return N({disabled:this.disabled,children:I`<calcite-combobox .clearDisabled=${!this.clearable} .disabled=${this.disabled} .label=${this.messages.chooseTimeZone} lang=${this.messages._lang??y} .maxItems=${this.maxItems} @calciteComboboxBeforeClose=${this.onComboboxBeforeClose} @calciteComboboxBeforeOpen=${this.onComboboxBeforeOpen} @calciteComboboxChange=${this.onComboboxChange} @calciteComboboxClose=${this.onComboboxClose} @calciteComboboxOpen=${this.onComboboxOpen} .overlayPositioning=${this.overlayPositioning} .placeholder=${this.mode==="name"?this.messages.namePlaceholder:this.mode==="offset"?this.messages.offsetPlaceholder:this.messages.regionPlaceholder} placeholder-icon=search .readOnly=${this.readOnly} .scale=${this.scale} .selectionMode=${this.clearable?"single":"single-persist"} .status=${this.status} .validationIcon=${this.validationIcon} .validationMessage=${this.validationMessage} ${z(this.setComboboxRef)}>${this.renderItems()}</calcite-combobox>${J({component:this})}`})}renderItems(){return this.mode==="region"?this.renderRegionItems():$(this.timeZoneItems,({label:e})=>e,e=>{let o=this.selectedTimeZoneItem===e,{label:s,metadata:a,value:l}=e;return I`<calcite-combobox-item data-label=${s??y} .metadata=${a} .selected=${o} .textLabel=${s} .value=${l}></calcite-combobox-item>`})}renderRegionItems(){return this.timeZoneItems.flatMap(({label:e,items:o})=>V(e,I`<calcite-combobox-item-group .label=${e}>${$(o,({label:s})=>s,s=>{let a=this.selectedTimeZoneItem===s,{label:l,metadata:f,value:C}=s,Z=this.getItemLabel(s);return I`<calcite-combobox-item data-label=${l??y} .description=${f.country} .metadata=${f} .selected=${a} .textLabel=${Z} .value=${C}><span class=${M(te.offset)} slot=content-end>${f.offset}</span></calcite-combobox-item>`})}</calcite-combobox-item-group>`))}};k("calcite-input-time-zone",L);export{L as InputTimeZone};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v3.3.0-next.
|
|
4
|
-
import{C as n,E as o,h as a,l as t}from"./
|
|
3
|
+
v3.3.0-next.64 */
|
|
4
|
+
import{C as n,E as o,h as a,l as t}from"./IZ433VC7.js";var m={validationContainer:"validation-container"},d=()=>{},$=({scale:e,status:s,id:r,icon:l,message:c,ref:i})=>a`<div class=${o(m.validationContainer)} ${n(i||d)}><calcite-input-message aria-live=polite .icon=${l} id=${r??t} .scale=${e} .status=${s}>${c}</calcite-input-message></div>`;export{$ as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v3.3.0-next.
|
|
4
|
-
import{a as h,b as u}from"./
|
|
3
|
+
v3.3.0-next.64 */
|
|
4
|
+
import{a as h,b as u}from"./N3WZSQC2.js";import{a as p}from"./2OPYQDKQ.js";import"./R3GOL3TM.js";import"./J2ZX63CE.js";import"./DDXIYENY.js";import"./HNO3DPEZ.js";import"./EQGJYJ5R.js";import{D as c,E as t,I as s,Q as d,g as o,h as l,o as a}from"./IZ433VC7.js";var n={container:"container",dividerContainer:"divider-container",divider:"divider"},b={trigger:"trigger"},e={chevronDown:"chevronDown",caretDown:"caretDown",ellipsis:"ellipsis",handleVertical:"handle-vertical"},v=o`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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:inline-block}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([kind=brand]){--calcite-internal-split-button-background: var(--calcite-color-brand);--calcite-internal-split-button-divider: var(--calcite-color-foreground-1)}:host([kind=danger]){--calcite-internal-split-button-background: var(--calcite-color-status-danger);--calcite-internal-split-button-divider: var(--calcite-color-foreground-1)}:host([kind=neutral]){--calcite-internal-split-button-background: var(--calcite-color-foreground-3);--calcite-internal-split-button-divider: var(--calcite-color-text-1)}:host([kind=inverse]){--calcite-internal-split-button-background: var(--calcite-color-inverse);--calcite-internal-split-button-divider: var(--calcite-color-foreground-1)}:host([appearance=transparent]){--calcite-internal-split-button-background: transparent}:host([appearance=transparent]):host([kind=brand]){--calcite-internal-split-button-divider: var(--calcite-color-brand)}:host([appearance=transparent]):host([kind=danger]){--calcite-internal-split-button-divider: var(--calcite-color-status-danger)}:host([appearance=transparent]):host([kind=neutral]){--calcite-internal-split-button-divider: var(--calcite-color-text-1)}:host([appearance=transparent]):host([kind=inverse]){--calcite-internal-split-button-divider: var(--calcite-color-foreground-1)}:host([appearance=outline]):host([kind=brand]),:host([appearance=outline]):host([kind=danger]),:host([appearance=outline]):host([kind=neutral]),:host([appearance=outline]):host([kind=inverse]){--calcite-internal-split-button-background: transparent}:host([appearance=outline-fill]):host([kind=brand]),:host([appearance=outline-fill]):host([kind=danger]),:host([appearance=outline-fill]):host([kind=neutral]),:host([appearance=outline-fill]):host([kind=inverse]){--calcite-internal-split-button-background: var(--calcite-color-background)}:host([appearance=outline]):host([kind=brand]),:host([appearance=outline-fill]):host([kind=brand]){--calcite-internal-split-button-divider: var(--calcite-color-brand)}:host([appearance=outline]):host([kind=danger]),:host([appearance=outline-fill]):host([kind=danger]){--calcite-internal-split-button-divider: var(--calcite-color-status-danger)}:host([appearance=outline]):host([kind=neutral]),:host([appearance=outline-fill]):host([kind=neutral]){--calcite-internal-split-button-divider: var(--calcite-color-border-1)}:host([appearance=outline]):host([kind=inverse]),:host([appearance=outline-fill]):host([kind=inverse]){--calcite-internal-split-button-divider: var(--calcite-color-inverse)}.container{display:flex;align-items:stretch}.container>calcite-dropdown>calcite-button{block-size:100%;vertical-align:top}.divider-container{display:flex;inline-size:1px;align-items:stretch;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;background-color:var(--calcite-internal-split-button-background)}.divider{margin-block:.25rem;display:inline-block;inline-size:1px;background-color:var(--calcite-internal-split-button-divider)}:host([appearance=outline-fill]) .divider-container,:host([appearance=outline]) .divider-container{border-block:1px solid var(--calcite-internal-split-button-divider)}:host([appearance=outline-fill]):hover .divider-container,:host([appearance=outline]):hover .divider-container{background-color:var(--calcite-internal-split-button-divider)}:host([appearance=outline-fill]:hover) .divider-container,:host([appearance=outline]:hover) .divider-container{background-color:var(--calcite-internal-split-button-divider)}:host([appearance=outline-fill]:focus-within):host([kind=brand]),:host([appearance=outline]:focus-within):host([kind=brand]){--calcite-internal-split-button-divider: var(--calcite-color-brand-press)}:host([appearance=outline-fill]:focus-within):host([kind=danger]),:host([appearance=outline]:focus-within):host([kind=danger]){--calcite-internal-split-button-divider: var(--calcite-color-status-danger-press)}:host([appearance=outline-fill]:focus-within) .divider-container,:host([appearance=outline]:focus-within) .divider-container{background-color:var(--calcite-internal-split-button-divider)}:host([disabled]) calcite-dropdown>calcite-button{pointer-events:none}:host([disabled]):host([appearance=outline-fill]) .divider-container{background-color:var(--calcite-color-background)}:host([disabled]):host([appearance=outline]) .divider-container{background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,r=class extends c{constructor(){super(...arguments),this.focusSetter=p()(this),this.active=!1,this.appearance="solid",this.disabled=!1,this.download=!1,this.dropdownIconType="chevron",this.kind="brand",this.loading=!1,this.overlayPositioning="absolute",this.placement="bottom-end",this.scale="m",this.width="auto",this.calciteSplitButtonPrimaryClick=a({cancelable:!1}),this.calciteSplitButtonSecondaryClick=a({cancelable:!1})}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],download:[3,{converter:s},{reflect:!0}],dropdownIconType:[3,{},{reflect:!0}],dropdownLabel:[3,{},{reflect:!0}],flipPlacements:[0,{},{attribute:!1}],href:[3,{},{reflect:!0}],kind:[3,{},{reflect:!0}],loading:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],rel:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],primaryIconEnd:[3,{},{reflect:!0}],primaryIconFlipRtl:[3,{},{reflect:!0}],primaryIconStart:[3,{},{reflect:!0}],primaryLabel:[3,{},{reflect:!0}],primaryText:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=v}get dropdownIcon(){return this.dropdownIconType==="chevron"?e.chevronDown:this.dropdownIconType==="caret"?e.caretDown:this.dropdownIconType==="ellipsis"?e.ellipsis:e.handleVertical}async setFocus(i){return this.focusSetter(()=>this.el,i)}updated(){h(this)}calciteSplitButtonPrimaryClickHandler(){this.calciteSplitButtonPrimaryClick.emit()}calciteSplitButtonSecondaryClickHandler(){this.calciteSplitButtonSecondaryClick.emit()}render(){let i=this.width==="auto"?"auto":"full";return u({disabled:this.disabled,children:l`<div class=${t(n.container)}><calcite-button .appearance=${this.appearance} .disabled=${this.disabled} .download=${this.download} .href=${this.href} .iconEnd=${this.primaryIconEnd?this.primaryIconEnd:null} .iconFlipRtl=${this.primaryIconFlipRtl?this.primaryIconFlipRtl:null} .iconStart=${this.primaryIconStart?this.primaryIconStart:null} .kind=${this.kind} .label=${this.primaryLabel} .loading=${this.loading} @click=${this.calciteSplitButtonPrimaryClickHandler} .rel=${this.rel} .scale=${this.scale} split-child=primary .target=${this.target} type=button .width=${i}>${this.primaryText}</calcite-button><div class=${t(n.dividerContainer)}><div class=${t(n.divider)}></div></div><calcite-dropdown .disabled=${this.disabled} .flipPlacements=${this.flipPlacements} @click=${this.calciteSplitButtonSecondaryClickHandler} .open=${this.active} .overlayPositioning=${this.overlayPositioning} .placement=${this.placement} .scale=${this.scale} .widthScale=${this.scale}><calcite-button .appearance=${this.appearance} .disabled=${this.disabled} .iconStart=${this.dropdownIcon} .kind=${this.kind} .label=${this.dropdownLabel} .scale=${this.scale} slot=${b.trigger} split-child=secondary type=button></calcite-button><slot></slot></calcite-dropdown></div>`})}};d("calcite-split-button",r);export{r as SplitButton};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v3.3.0-next.
|
|
4
|
-
import{c as s}from"./KCDGUTQD.js";import{a as I,s as p}from"./ZYTOX3I3.js";import"./BHMBRRRZ.js";import{a as z,b as k}from"./4LDSXFQW.js";import{a as y}from"./3RUAUOGX.js";import{a as x}from"./KN5DRBMX.js";import"./KC2OT7YP.js";import"./N243526J.js";import"./TIHWCMZN.js";import{t as C}from"./QVOHFRXW.js";import"./IG5ZDCFZ.js";import{B as m,C as S,D as $,E as a,Q as b,g as f,h as l,i as o,l as n,o as d}from"./RSMIW2TD.js";var t={imageContainer:"image-container",container:"container",selectable:"selectable",nonInteractive:"non-interactive",selected:"selected",internalSvgContainer:"internal-svg-container",internalSvgDisabled:"internal-svg-disabled",internalSvgEmpty:"internal-svg-empty",swatch:"swatch",checker:"checker",noColorSwatch:"swatch--no-color"},M={image:"image"},g={checker:"checker",shape:"shape",swatchRect:"swatch-rect"},D=f`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:block;--calcite-internal-swatch-inset: var(--calcite-spacing-xxs)}:host([scale=s]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xl)}:host([scale=m]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xxl)}:host([scale=l]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xxxl)}.container{position:relative;box-sizing:border-box;justify-content:center;overflow:hidden;outline-color:transparent;font-size:var(--calcite-internal-swatch-font-size, var(--calcite-font-size));block-size:var(--calcite-internal-swatch-size, auto);inline-size:var(--calcite-internal-swatch-size, auto);min-inline-size:var(--calcite-internal-swatch-size, auto);border-radius:var(--calcite-swatch-corner-radius, 0)}.container:not(.non-interactive):hover{cursor:pointer;box-shadow:0 0 0 var(--calcite-border-width-md) var(--calcite-color-border-2)}.container.selectable{cursor:pointer}.container:not(.non-interactive):focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.swatch{position:absolute;display:inline-flex;overflow:hidden;z-index:calc(var(--calcite-z-index) + 1);block-size:var(--calcite-internal-swatch-size, auto);inline-size:var(--calcite-internal-swatch-size, auto);min-inline-size:var(--calcite-internal-swatch-size, auto);border-radius:var(--calcite-swatch-corner-radius, 0)}:host([selected]) .swatch{inset:var(--calcite-internal-swatch-inset);block-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset));inline-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset));min-inline-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset))}:host([selected]) .container{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-color-text-1),inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-color-foreground-1)}:host([selected]) .image-container{inset:var(--calcite-internal-swatch-inset)}.image-container{position:absolute;display:inline-flex;overflow:hidden;z-index:calc(var(--calcite-z-index) + 2);inset:var(--calcite-spacing-px);display:flex;align-items:center;justify-content:center;pointer-events:none;border-radius:var(--calcite-swatch-corner-radius, 0)}.internal-svg-container{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:calc(var(--calcite-z-index) + 2)}.swatch{overflow:hidden;block-size:inherit;inline-size:inherit}.swatch--no-color rect{fill:var(--calcite-color-foreground-1)}:host([selected]) #swatch-rect{stroke-width:0}#swatch-rect{stroke:var(--calcite-color-text-1);stroke-width:var(--calcite-border-width-md);stroke-opacity:.3}.internal-svg-disabled{stroke:#6a6a6a;fill:#fff}.internal-svg-empty{stroke:var(--calcite-color-status-danger);stroke-width:3}.checker{fill:#cacaca}:host([hidden]){display:none}[hidden]{display:none}`,u=class extends ${constructor(){super(),this.containerEl=m(),this.focusSetter=x()(this),this.hasImage=!1,this.disabled=!1,this.interactive=!1,this.scale="m",this.selected=!1,this.selectionMode="none",this.calciteInternalSwatchKeyEvent=d({cancelable:!1}),this.calciteInternalSwatchSelect=d({cancelable:!1}),this.calciteInternalSyncSelectedSwatches=d({cancelable:!1}),this.calciteSwatchSelect=d({cancelable:!1}),this.listen("keydown",this.keyDownHandler)}static{this.properties={hasImage:[16,{},{state:!0}],color:1,disabled:[7,{},{reflect:!0,type:Boolean}],interactive:[5,{},{type:Boolean}],label:1,parentSwatchGroup:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:1,value:1}}static{this.styles=D}async setFocus(e){return this.focusSetter(()=>this.el,e)}async load(){this.handleColorChange(this.color)}willUpdate(e){e.has("selected")&&this.hasUpdated&&this.watchSelected(this.selected),e.has("color")&&this.handleColorChange(this.color)}updated(){z(this)}loaded(){this.selectionMode!=="none"&&this.interactive&&this.selected&&this.handleSelectionPropertyChange(this.selected)}watchSelected(e){this.selectionMode!=="none"&&this.handleSelectionPropertyChange(e)}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.handleEmittingEvent(),e.preventDefault();break;case"ArrowRight":case"ArrowLeft":case"Home":case"End":this.calciteInternalSwatchKeyEvent.emit(e),e.preventDefault();break}}handleSlotImageChange(e){this.hasImage=C(e)}handleEmittingEvent(){this.interactive&&this.calciteSwatchSelect.emit()}handleSelectionPropertyChange(e){this.selectionMode==="single"&&this.calciteInternalSyncSelectedSwatches.emit(),!this.parentSwatchGroup.selectedItems.includes(this.el)&&e&&this.selectionMode!=="multiple"&&this.calciteInternalSwatchSelect.emit(),this.selectionMode!=="single"&&this.calciteInternalSyncSelectedSwatches.emit()}handleColorChange(e){this.internalColor=e?I(e):null}renderSwatchImage(){return l`<div class=${a(t.imageContainer)}><slot name=${M.image} @slotchange=${this.handleSlotImageChange}></slot></div>`}renderEmptyDisplay(){let e=this.scale==="s"?"12":this.scale==="m"?"16":"20";return l`<div class=${a(t.internalSvgContainer)}><svg fill=none height=${e} viewBox=${`0 0 ${e} ${e}`} width=${e} xmlns=http://www.w3.org/2000/svg>${o`<path class=${a(t.internalSvgEmpty)} d=${`M${e} 0L0 ${e}`} />`}</svg></div>`}renderDisabledDisplay(){let e=l`<svg fill=none height=14 viewBox="0 0 14 14" width=14 xmlns=http://www.w3.org/2000/svg>${o`<path class=${a(t.internalSvgDisabled)} d="M7 0.5C10.5899 0.5 13.5 3.41015 13.5 7C13.5 10.5899 10.5899 13.5 7 13.5C3.41015 13.5 0.5 10.5899 0.5 7C0.5 3.41015 3.41015 0.5 7 0.5ZM4.78906 10.917C5.44221 11.2866 6.19529 11.5 7 11.5C9.48528 11.5 11.5 9.48528 11.5 7C11.5 6.19529 11.2866 5.44221 10.917 4.78906L4.78906 10.917ZM7 2.5C4.51472 2.5 2.5 4.51472 2.5 7C2.5 7.95644 2.79808 8.84235 3.30664 9.57129L9.57129 3.30664C8.84235 2.79808 7.95644 2.5 7 2.5Z" />`}</svg>`,i=l`<svg fill=none height=18 viewBox="0 0 18 18" width=18 xmlns=http://www.w3.org/2000/svg>${o`<path class=${a(t.internalSvgDisabled)} d="M9 0.5C13.6944 0.5 17.5 4.30558 17.5 9C17.5 13.6944 13.6944 17.5 9 17.5C4.30558 17.5 0.5 13.6944 0.5 9C0.5 4.30558 4.30558 0.5 9 0.5ZM5.78125 14.2588C6.71828 14.8337 7.81941 15.167 9 15.167C12.4058 15.167 15.167 12.4058 15.167 9C15.167 7.81941 14.8337 6.71828 14.2588 5.78125L5.78125 14.2588ZM9 2.83301C5.59424 2.83301 2.83301 5.59424 2.83301 9C2.83301 10.3817 3.28731 11.6565 4.05469 12.6846L12.6846 4.05469C11.6565 3.28731 10.3817 2.83301 9 2.83301Z" />`}</svg>`;return l`<div class=${a(t.internalSvgContainer)}>${this.scale==="l"?i:e}</div>`}renderSwatch(){let{internalColor:e}=this,i="0",h=!e,c={height:"100%",rx:i,width:"100%"};if(h)return o`<clipPath id=${g.shape}><rect height=100% rx=${i} width=100% /></clipPath>${this.renderSwatchRect({clipPath:`inset(0 round "${i}")`,...c})}<line clip-path=url(#shape) x1=100% x2=0 y1=0 y2=100% />`;let r=e.alpha(),w=p(e),v=p(e,r<1);return o`<title>${v}</title><defs><pattern height=${s.size} id=${g.checker} patternUnits=userSpaceOnUse width=${s.size} x=0 y=0><rect class=${a(t.checker)} height=${s.squareSize} width=${s.squareSize} x=0 y=0 /><rect class=${a(t.checker)} height=${s.squareSize} width=${s.squareSize} x=${s.squareSize} y=${s.squareSize} /></pattern></defs>${this.renderSwatchRect({fill:"url(#checker)",rx:c.rx,height:c.height,width:c.width})}${this.renderSwatchRect({clipPath:r<1?"polygon(100% 0, 0 0, 0 100%)":`inset(0 round "${i}")`,fill:w,...c})}${r<1?this.renderSwatchRect({clipPath:"polygon(100% 0, 100% 100%, 0 100%)",fill:v,key:"opacity-fill",...c}):null}`}renderSwatchRect({clipPath:e,fill:i,height:h,key:c,rx:r,stroke:w,strokeWidth:v,width:E}){return y(c,o`<rect clip-path=${e??n} fill=${i??n} height=${h??n} id=${g.swatchRect} rx=${r??n} stroke=${w??n} stroke-width=${v??n} width=${E??n} />`)}render(){let{disabled:e}=this,i=e||!e&&!this.interactive,h=this.selectionMode==="multiple"&&this.interactive?"checkbox":this.selectionMode!=="none"&&this.interactive?"radio":this.interactive?"button":"presentation",c=!this.internalColor,r={[t.swatch]:!0,[t.noColorSwatch]:c||this.hasImage&&!this.internalColor};return k({disabled:e,children:l`<div .ariaChecked=${this.selectionMode!=="none"&&this.interactive?this.selected:void 0} .ariaLabel=${h!=="presentation"?this.label:""} class=${a({[t.container]:!0,[t.selectable]:this.selectionMode!=="none",[t.selected]:this.selected,[t.nonInteractive]:!this.interactive})} @click=${this.handleEmittingEvent} .role=${h} .tabIndex=${i?-1:0} ${S(this.containerEl)}>${this.renderSwatchImage()}${!this.internalColor&&!this.hasImage&&this.renderEmptyDisplay()||""}${this.disabled&&this.renderDisabledDisplay()||""}<svg class=${a(r)} role=presentation xmlns=http://www.w3.org/2000/svg>${this.renderSwatch()}</svg></div>`})}};b("calcite-swatch",u);export{u as Swatch};
|
|
3
|
+
v3.3.0-next.64 */
|
|
4
|
+
import{c as s}from"./LQTPJPAU.js";import{a as I,s as p}from"./E2PHKNBO.js";import"./NKVIAQKM.js";import{a as z,b as k}from"./N3WZSQC2.js";import{a as y}from"./JVQSSJ4H.js";import{a as x}from"./2OPYQDKQ.js";import"./R3GOL3TM.js";import"./J2ZX63CE.js";import"./DDXIYENY.js";import{t as C}from"./HNO3DPEZ.js";import"./EQGJYJ5R.js";import{B as m,C as S,D as $,E as a,Q as b,g as f,h as l,i as o,l as n,o as d}from"./IZ433VC7.js";var t={imageContainer:"image-container",container:"container",selectable:"selectable",nonInteractive:"non-interactive",selected:"selected",internalSvgContainer:"internal-svg-container",internalSvgDisabled:"internal-svg-disabled",internalSvgEmpty:"internal-svg-empty",swatch:"swatch",checker:"checker",noColorSwatch:"swatch--no-color"},M={image:"image"},g={checker:"checker",shape:"shape",swatchRect:"swatch-rect"},D=f`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:block;--calcite-internal-swatch-inset: var(--calcite-spacing-xxs)}:host([scale=s]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xl)}:host([scale=m]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xxl)}:host([scale=l]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xxxl)}.container{position:relative;box-sizing:border-box;justify-content:center;overflow:hidden;outline-color:transparent;font-size:var(--calcite-internal-swatch-font-size, var(--calcite-font-size));block-size:var(--calcite-internal-swatch-size, auto);inline-size:var(--calcite-internal-swatch-size, auto);min-inline-size:var(--calcite-internal-swatch-size, auto);border-radius:var(--calcite-swatch-corner-radius, 0)}.container:not(.non-interactive):hover{cursor:pointer;box-shadow:0 0 0 var(--calcite-border-width-md) var(--calcite-color-border-2)}.container.selectable{cursor:pointer}.container:not(.non-interactive):focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.swatch{position:absolute;display:inline-flex;overflow:hidden;z-index:calc(var(--calcite-z-index) + 1);block-size:var(--calcite-internal-swatch-size, auto);inline-size:var(--calcite-internal-swatch-size, auto);min-inline-size:var(--calcite-internal-swatch-size, auto);border-radius:var(--calcite-swatch-corner-radius, 0)}:host([selected]) .swatch{inset:var(--calcite-internal-swatch-inset);block-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset));inline-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset));min-inline-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset))}:host([selected]) .container{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-color-text-1),inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-color-foreground-1)}:host([selected]) .image-container{inset:var(--calcite-internal-swatch-inset)}.image-container{position:absolute;display:inline-flex;overflow:hidden;z-index:calc(var(--calcite-z-index) + 2);inset:var(--calcite-spacing-px);display:flex;align-items:center;justify-content:center;pointer-events:none;border-radius:var(--calcite-swatch-corner-radius, 0)}.internal-svg-container{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:calc(var(--calcite-z-index) + 2)}.swatch{overflow:hidden;block-size:inherit;inline-size:inherit}.swatch--no-color rect{fill:var(--calcite-color-foreground-1)}:host([selected]) #swatch-rect{stroke-width:0}#swatch-rect{stroke:var(--calcite-color-text-1);stroke-width:var(--calcite-border-width-md);stroke-opacity:.3}.internal-svg-disabled{stroke:#6a6a6a;fill:#fff}.internal-svg-empty{stroke:var(--calcite-color-status-danger);stroke-width:3}.checker{fill:#cacaca}:host([hidden]){display:none}[hidden]{display:none}`,u=class extends ${constructor(){super(),this.containerEl=m(),this.focusSetter=x()(this),this.hasImage=!1,this.disabled=!1,this.interactive=!1,this.scale="m",this.selected=!1,this.selectionMode="none",this.calciteInternalSwatchKeyEvent=d({cancelable:!1}),this.calciteInternalSwatchSelect=d({cancelable:!1}),this.calciteInternalSyncSelectedSwatches=d({cancelable:!1}),this.calciteSwatchSelect=d({cancelable:!1}),this.listen("keydown",this.keyDownHandler)}static{this.properties={hasImage:[16,{},{state:!0}],color:1,disabled:[7,{},{reflect:!0,type:Boolean}],interactive:[5,{},{type:Boolean}],label:1,parentSwatchGroup:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:1,value:1}}static{this.styles=D}async setFocus(e){return this.focusSetter(()=>this.el,e)}async load(){this.handleColorChange(this.color)}willUpdate(e){e.has("selected")&&this.hasUpdated&&this.watchSelected(this.selected),e.has("color")&&this.handleColorChange(this.color)}updated(){z(this)}loaded(){this.selectionMode!=="none"&&this.interactive&&this.selected&&this.handleSelectionPropertyChange(this.selected)}watchSelected(e){this.selectionMode!=="none"&&this.handleSelectionPropertyChange(e)}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.handleEmittingEvent(),e.preventDefault();break;case"ArrowRight":case"ArrowLeft":case"Home":case"End":this.calciteInternalSwatchKeyEvent.emit(e),e.preventDefault();break}}handleSlotImageChange(e){this.hasImage=C(e)}handleEmittingEvent(){this.interactive&&this.calciteSwatchSelect.emit()}handleSelectionPropertyChange(e){this.selectionMode==="single"&&this.calciteInternalSyncSelectedSwatches.emit(),!this.parentSwatchGroup.selectedItems.includes(this.el)&&e&&this.selectionMode!=="multiple"&&this.calciteInternalSwatchSelect.emit(),this.selectionMode!=="single"&&this.calciteInternalSyncSelectedSwatches.emit()}handleColorChange(e){this.internalColor=e?I(e):null}renderSwatchImage(){return l`<div class=${a(t.imageContainer)}><slot name=${M.image} @slotchange=${this.handleSlotImageChange}></slot></div>`}renderEmptyDisplay(){let e=this.scale==="s"?"12":this.scale==="m"?"16":"20";return l`<div class=${a(t.internalSvgContainer)}><svg fill=none height=${e} viewBox=${`0 0 ${e} ${e}`} width=${e} xmlns=http://www.w3.org/2000/svg>${o`<path class=${a(t.internalSvgEmpty)} d=${`M${e} 0L0 ${e}`} />`}</svg></div>`}renderDisabledDisplay(){let e=l`<svg fill=none height=14 viewBox="0 0 14 14" width=14 xmlns=http://www.w3.org/2000/svg>${o`<path class=${a(t.internalSvgDisabled)} d="M7 0.5C10.5899 0.5 13.5 3.41015 13.5 7C13.5 10.5899 10.5899 13.5 7 13.5C3.41015 13.5 0.5 10.5899 0.5 7C0.5 3.41015 3.41015 0.5 7 0.5ZM4.78906 10.917C5.44221 11.2866 6.19529 11.5 7 11.5C9.48528 11.5 11.5 9.48528 11.5 7C11.5 6.19529 11.2866 5.44221 10.917 4.78906L4.78906 10.917ZM7 2.5C4.51472 2.5 2.5 4.51472 2.5 7C2.5 7.95644 2.79808 8.84235 3.30664 9.57129L9.57129 3.30664C8.84235 2.79808 7.95644 2.5 7 2.5Z" />`}</svg>`,i=l`<svg fill=none height=18 viewBox="0 0 18 18" width=18 xmlns=http://www.w3.org/2000/svg>${o`<path class=${a(t.internalSvgDisabled)} d="M9 0.5C13.6944 0.5 17.5 4.30558 17.5 9C17.5 13.6944 13.6944 17.5 9 17.5C4.30558 17.5 0.5 13.6944 0.5 9C0.5 4.30558 4.30558 0.5 9 0.5ZM5.78125 14.2588C6.71828 14.8337 7.81941 15.167 9 15.167C12.4058 15.167 15.167 12.4058 15.167 9C15.167 7.81941 14.8337 6.71828 14.2588 5.78125L5.78125 14.2588ZM9 2.83301C5.59424 2.83301 2.83301 5.59424 2.83301 9C2.83301 10.3817 3.28731 11.6565 4.05469 12.6846L12.6846 4.05469C11.6565 3.28731 10.3817 2.83301 9 2.83301Z" />`}</svg>`;return l`<div class=${a(t.internalSvgContainer)}>${this.scale==="l"?i:e}</div>`}renderSwatch(){let{internalColor:e}=this,i="0",h=!e,c={height:"100%",rx:i,width:"100%"};if(h)return o`<clipPath id=${g.shape}><rect height=100% rx=${i} width=100% /></clipPath>${this.renderSwatchRect({clipPath:`inset(0 round "${i}")`,...c})}<line clip-path=url(#shape) x1=100% x2=0 y1=0 y2=100% />`;let r=e.alpha(),w=p(e),v=p(e,r<1);return o`<title>${v}</title><defs><pattern height=${s.size} id=${g.checker} patternUnits=userSpaceOnUse width=${s.size} x=0 y=0><rect class=${a(t.checker)} height=${s.squareSize} width=${s.squareSize} x=0 y=0 /><rect class=${a(t.checker)} height=${s.squareSize} width=${s.squareSize} x=${s.squareSize} y=${s.squareSize} /></pattern></defs>${this.renderSwatchRect({fill:"url(#checker)",rx:c.rx,height:c.height,width:c.width})}${this.renderSwatchRect({clipPath:r<1?"polygon(100% 0, 0 0, 0 100%)":`inset(0 round "${i}")`,fill:w,...c})}${r<1?this.renderSwatchRect({clipPath:"polygon(100% 0, 100% 100%, 0 100%)",fill:v,key:"opacity-fill",...c}):null}`}renderSwatchRect({clipPath:e,fill:i,height:h,key:c,rx:r,stroke:w,strokeWidth:v,width:E}){return y(c,o`<rect clip-path=${e??n} fill=${i??n} height=${h??n} id=${g.swatchRect} rx=${r??n} stroke=${w??n} stroke-width=${v??n} width=${E??n} />`)}render(){let{disabled:e}=this,i=e||!e&&!this.interactive,h=this.selectionMode==="multiple"&&this.interactive?"checkbox":this.selectionMode!=="none"&&this.interactive?"radio":this.interactive?"button":"presentation",c=!this.internalColor,r={[t.swatch]:!0,[t.noColorSwatch]:c||this.hasImage&&!this.internalColor};return k({disabled:e,children:l`<div .ariaChecked=${this.selectionMode!=="none"&&this.interactive?this.selected:void 0} .ariaLabel=${h!=="presentation"?this.label:""} class=${a({[t.container]:!0,[t.selectable]:this.selectionMode!=="none",[t.selected]:this.selected,[t.nonInteractive]:!this.interactive})} @click=${this.handleEmittingEvent} .role=${h} .tabIndex=${i?-1:0} ${S(this.containerEl)}>${this.renderSwatchImage()}${!this.internalColor&&!this.hasImage&&this.renderEmptyDisplay()||""}${this.disabled&&this.renderDisabledDisplay()||""}<svg class=${a(r)} role=presentation xmlns=http://www.w3.org/2000/svg>${this.renderSwatch()}</svg></div>`})}};b("calcite-swatch",u);export{u as Swatch};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v3.3.0-next.
|
|
4
|
-
import{a as n}from"./
|
|
3
|
+
v3.3.0-next.64 */
|
|
4
|
+
import{a as n}from"./R3GOL3TM.js";var s=()=>n((a,o)=>{let e=new Set;return o.onDisconnected(()=>{e.forEach(r=>r.cancel())}),{add:r=>{[r].flat().forEach(c=>e.add(c))},resources:e}});export{s as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v3.3.0-next.
|
|
4
|
-
import{a as l}from"./
|
|
3
|
+
v3.3.0-next.64 */
|
|
4
|
+
import{a as l}from"./JVQSSJ4H.js";import{a as h}from"./DDXIYENY.js";import{u as d}from"./HNO3DPEZ.js";import"./EQGJYJ5R.js";import{D as n,E as a,Q as c,g as s,h as o}from"./IZ433VC7.js";var p={actionBarContainer:"action-bar-container",content:"content"},m={actionBar:"action-bar"},f=s`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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{z-index:var(--calcite-z-index);display:flex;flex:1 1 auto;overflow:hidden;background-color:transparent}.content{margin:0;display:flex;block-size:100%;inline-size:100%;overflow:hidden;flex:1 0 0}.action-bar-container{display:flex}:host([detached]){margin-inline:.5rem;margin-block:.5rem 1.5rem}@keyframes in-up{0%{opacity:0;transform:translate3D(0,5px,0)}to{opacity:1;transform:translateZ(0)}}:host([detached]){animation:in-up var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:.25rem;border-width:0px;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:host([position=end]){align-self:flex-end}:host([position=start]){align-self:flex-start}:host([height-scale=s]){block-size:33.333333%}:host([height-scale=m]){block-size:70%}:host([height-scale=l]){block-size:100%}:host([height-scale=l][detached]){block-size:calc(100% - 2rem)}::slotted(calcite-panel){block-size:100%;inline-size:100%}::slotted(calcite-action-bar),::slotted(calcite-action-bar[position=end]){border-inline-end:1px solid;border-color:var(--calcite-color-border-3)}:host([hidden]){display:none}[hidden]{display:none}`,i=class extends n{constructor(){super(...arguments),this.detached=!1,this.heightScale="s",this.position="end"}static{this.properties={actionBar:[16,{},{state:!0}],detached:[7,{},{reflect:!0,type:Boolean}],heightScale:[3,{},{reflect:!0}],position:[3,{},{reflect:!0}]}}static{this.styles=f}load(){h.deprecated("component",{name:"shell-center-row",removalVersion:4,suggested:"shell-panel"})}loaded(){this.actionBar?.position==="end"&&this.requestUpdate()}handleActionBarSlotChange(t){this.actionBar=d(t).filter(e=>e.matches("calcite-action-bar"))[0]}render(){let{actionBar:t}=this,e=o`<div class=${a(p.content)}><slot></slot></div>`,r=[l("action-bar",o`<div class=${a(p.actionBarContainer)} .hidden=${!this.actionBar}><slot name=${m.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`),e];return t?.position==="end"&&r.reverse(),r}};c("calcite-shell-center-row",i);export{i as ShellCenterRow};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v3.3.0-next.
|
|
4
|
-
import{h as M,k as L}from"./YFJBESJU.js";import{c as F,e as R,f as O}from"./IP7OBNPO.js";import{a as v}from"./3RUAUOGX.js";import"./D4YNGMQ4.js";import{a as T}from"./3KDX4RYN.js";import{a as S}from"./4BLBMXP4.js";import"./KC2OT7YP.js";import{p as V}from"./QVOHFRXW.js";import"./IG5ZDCFZ.js";import{B as d,C as m,D as k,E as b,F as p,Q as C,g as z,h}from"./RSMIW2TD.js";var r={container:"container",fill:"fill",stepLine:"step-line",label:"label",labelHidden:"label-hidden",labelRange:"label-range",labelValue:"label-value",unitLabel:"unit-label",stepsVisible:"steps-visible",valueVisible:"value-visible",success:"fill-success",warning:"fill-warning",danger:"fill-danger"},U=z`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host{display:flex;--calcite-internal-meter-space: var(--calcite-spacing-base);--calcite-internal-meter-height: var(--calcite-spacing-lg);--calcite-internal-meter-font-size: var(--calcite-font-size--1);--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-brand));--calcite-internal-meter-background-color: var(--calcite-meter-background-color, var(--calcite-color-foreground-2));--calcite-internal-meter-border-color: var(--calcite-meter-border-color, var(--calcite-color-border-3));--calcite-internal-meter-shadow: var(--calcite-meter-shadow, var(--calcite-shadow-none));--calcite-internal-meter-corner-radius: var(--calcite-meter-corner-radius, 9999px);--calcite-internal-meter-value-text-color: var(--calcite-meter-value-text-color, var(--calcite-color-text-1));--calcite-internal-meter-range-text-color: var(--calcite-meter-range-text-color, var(--calcite-color-text-3))}:host([scale=s]){--calcite-internal-meter-height: var(--calcite-spacing-md);--calcite-internal-meter-font-size: var(--calcite-font-size--2)}:host([scale=l]){--calcite-internal-meter-height: var(--calcite-spacing-xxl);--calcite-internal-meter-font-size: var(--calcite-font-size-0)}:host([appearance=solid]){--calcite-internal-meter-border-color: var(--calcite-color-foreground-3);--calcite-internal-meter-background-color: var(--calcite-color-foreground-3)}:host([appearance=outline]){--calcite-internal-meter-background-color: transparent}.fill{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-brand))}.fill-danger{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-danger))}.fill-success{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-success))}.fill-warning{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-warning))}.container{position:relative;display:flex;align-items:center;margin:0;inline-size:var(--calcite-container-size-content-fluid);block-size:var(--calcite-internal-meter-height);background-color:var(--calcite-internal-meter-background-color);border:var(--calcite-border-width-sm) solid var(--calcite-internal-meter-border-color);border-radius:var(--calcite-internal-meter-corner-radius);box-shadow:var(--calcite-internal-meter-shadow)}.value-visible{margin-block-start:var(--calcite-spacing-xxl)}.steps-visible{margin-block-end:var(--calcite-spacing-xxl)}.step-line{position:absolute;inset-block:0px;display:block;inline-size:var(--calcite-internal-meter-space);background-color:var(--calcite-internal-meter-border-color)}.label{position:absolute;font-size:var(--calcite-internal-meter-font-size)}.label-hidden{visibility:hidden;opacity:0}.label-value{inset-block-end:calc(100% + .5em);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-internal-meter-value-text-color)}.label-range{color:var(--calcite-internal-meter-range-text-color);inset-block-start:calc(100% + .5em)}.label-range .unit-label{font-weight:var(--calcite-font-weight-medium)}.fill{position:absolute;z-index:var(--calcite-z-index);display:block;transition-timing-function:cubic-bezier(.4,0,.2,1);inset-inline-start:var(--calcite-internal-meter-space);inset-block:var(--calcite-internal-meter-space);border-radius:var(--calcite-internal-meter-corner-radius);max-inline-size:calc(100% - var(--calcite-internal-meter-space) * 2);min-inline-size:calc(var(--calcite-internal-meter-height) - var(--calcite-internal-meter-space) * 2);background-color:var(--calcite-internal-meter-fill-color);transition-property:inline-size,background-color,box-shadow}.solid .fill{inset-block:0;inset-inline-start:0;max-inline-size:100%;min-inline-size:calc(var(--calcite-internal-meter-height));box-shadow:0 0 0 1px var(--calcite-internal-meter-fill-color)}`,y=class extends k{constructor(){super(...arguments),this.highLabelEl=d(),this.labelFlipMax=.8,this.labelFlipProximity=.15,this.lowLabelEl=d(),this.maxLabelEl=d(),this.maxPercent=100,this.messages=S({name:null}),this.meterContainerEl=d(),this.minLabelEl=d(),this.minPercent=0,this.resizeObserver=T("resize",()=>this.resizeHandler()),this.valueLabelEl=d(),this.appearance="outline-fill",this.disabled=!1,this.fillType="range",this.groupSeparator=!1,this.max=100,this.min=0,this.rangeLabelType="percent",this.rangeLabels=!1,this.scale="m",this.unitLabel="",this.valueLabel=!1,this.valueLabelType="percent"}static{this.properties={currentPercent:[16,{},{state:!0}],highActive:[16,{},{state:!0}],highPercent:[16,{},{state:!0}],lowActive:[16,{},{state:!0}],lowPercent:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],fillType:[3,{},{reflect:!0}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],high:[11,{},{reflect:!0,type:Number}],label:1,low:[11,{},{reflect:!0,type:Number}],max:[11,{},{reflect:!0,type:Number}],min:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],numberingSystem:1,rangeLabelType:[3,{},{reflect:!0}],rangeLabels:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],unitLabel:1,value:[9,{},{type:Number}],valueLabel:[7,{},{reflect:!0,type:Boolean}],valueLabelType:[3,{},{reflect:!0}]}}static{this.styles=U}connectedCallback(){super.connectedCallback(),F(this),this.resizeObserver?.observe(this.el)}load(){this.calculateValues(),O(this,this.value)}willUpdate(e){(e.has("min")&&(this.hasUpdated||this.min!==0)||e.has("max")&&(this.hasUpdated||this.max!==100)||e.has("low")||e.has("high")||e.has("value"))&&this.handleRangeChange(),(e.has("rangeLabels")&&(this.hasUpdated||this.rangeLabels!==!1)||e.has("rangeLabelType")&&(this.hasUpdated||this.rangeLabelType!=="percent")||e.has("unitLabel")&&(this.hasUpdated||this.unitLabel!=="")||e.has("valueLabel")&&(this.hasUpdated||this.valueLabel!==!1)||e.has("valueLabelType")&&(this.hasUpdated||this.valueLabelType!=="percent"))&&this.updateLabels()}loaded(){this.updateLabels()}disconnectedCallback(){super.disconnectedCallback(),R(this),this.resizeObserver?.disconnect()}handleRangeChange(){this.calculateValues(),this.updateLabels()}resizeHandler(){this.updateLabels()}updateLabels(){this.valueLabelEl.value&&this.determineValueLabelPosition(),this.rangeLabels&&this.determineVisibleLabels()}calculateValues(){let{min:e,max:l,low:t,high:a,value:i}=this,n=100*(t-e)/(l-e),s=100*(a-e)/(l-e),c=100*(i-e)/(l-e);(!t||t<e||t>a||t>l)&&(this.low=e),(!a||a>l||a<t||a<e)&&(this.high=l),i||(this.value=e),this.lowPercent=n,this.highPercent=s,this.currentPercent=i?c:0,this.lowActive=!!t&&t>e&&(!i||t>i)&&(!a||t<a),this.highActive=!!a&&e<=a&&a<l&&(!i||a>i)&&(!t||a>t)}formatLabel(e,l){if(l==="percent"){if(!this.percentFormatting){let t=M(this.messages._lang),a=new Intl.NumberFormat(t,{useGrouping:this.groupSeparator,style:"percent"});this.percentFormatting={formatter:a,locale:t}}return this.percentFormatting.formatter.format(e)}else return L.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},L.localize(e.toString())}getMeterKindCssClass(){let{low:e,high:l,min:t,max:a,value:i}=this,n=e||t,s=l||a,c=i>=n,u=i<n,g=i>=s,o=i<s;return!i||!e&&o||u?r.success:c&&o?r.warning:g?r.danger:r.success}intersects(e,l){return e&&l&&V(e.getBoundingClientRect(),l.getBoundingClientRect())}determineVisibleLabels(){let{minLabelEl:{value:e},lowLabelEl:{value:l},highLabelEl:{value:t},maxLabelEl:{value:a}}=this,i=this.intersects(t,a),n=this.intersects(l,t),s=this.intersects(l,a),c=this.intersects(e,t),u=this.intersects(e,l),g=this.intersects(e,a),o=r.labelHidden;l&&(u||s||n?l.classList.add(o):l.classList.remove(o)),t&&(c||s||i?t.classList.add(o):t.classList.remove(o)),e&&a&&(g?a.classList.add(o):a.classList.remove(o))}determineValueLabelPosition(){let{valueLabelEl:{value:e},meterContainerEl:{value:l},currentPercent:t}=this,a=t>100?100:t>0?t:0,i=e.getBoundingClientRect().width,n=l.getBoundingClientRect().width,s=100*(i-0)/(n-0);a+s>=100?(e.style.insetInlineEnd="0%",e.style.removeProperty("inset-inline-start")):(e.style.insetInlineStart=`${a}% `,e.style.removeProperty("inset-inline-end"))}renderMeterFill(){let{currentPercent:e,fillType:l}=this,t=this.getMeterKindCssClass();return h`<div class=${b({[r.fill]:!0,[t]:l!=="single"})} style=${p({width:`${e}%`})}></div>`}renderRangeLine(e){let l={insetInlineStart:`${e}%`};return h`<div class=${b(r.stepLine)} style=${p(l)}></div>`}renderValueLabel(){let{currentPercent:e,valueLabelType:l,unitLabel:t,value:a}=this,i=this.formatLabel(l==="percent"?e/100:a||0,l);return v("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelValue]:!0})} ${m(this.valueLabelEl)}>${i}${t&&l!=="percent"&&h`<span class=${b(r.unitLabel)}> ${t}</span>`||""}</div>`)}renderMinLabel(){let{rangeLabelType:e,min:l,minPercent:t,unitLabel:a}=this,i={insetInlineStart:`${t}%`},n=this.formatLabel(e==="percent"?t:l,e);return v("min-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(i)} ${m(this.minLabelEl)}>${n}${a&&e!=="percent"&&h`<span class=${b(r.unitLabel)}> ${a}</span>`||""}</div>`)}renderLowLabel(){let{rangeLabelType:e,low:l,lowPercent:t,highPercent:a,labelFlipProximity:i}=this,n=l?this.formatLabel(e==="percent"?t/100:l,e):"",s={insetInlineStart:`${t}%`},c={insetInlineEnd:`${100-t}%`},u=(a-t)/100<i?c:s;return v("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(u)} ${m(this.lowLabelEl)}>${n}</div>`)}renderHighLabel(){let{rangeLabelType:e,high:l,highPercent:t,labelFlipMax:a}=this,i=l?this.formatLabel(e==="percent"?t/100:l,e):"",n={insetInlineStart:`${t}%`},s={insetInlineEnd:`${100-t}%`},c=t/100>=a?s:n;return v("high-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(c)} ${m(this.highLabelEl)}>${i}</div>`)}renderMaxLabel(){let{rangeLabelType:e,max:l,maxPercent:t}=this,a={insetInlineEnd:`${100-t}%`},i=this.formatLabel(e==="percent"?t/100:l,e);return v("max-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(a)} ${m(this.maxLabelEl)}>${i}</div>`)}render(){let{appearance:e,currentPercent:l,highActive:t,highPercent:a,label:i,lowActive:n,lowPercent:s,max:c,maxPercent:u,min:g,minPercent:o,rangeLabels:f,rangeLabelType:x,unitLabel:$,value:w,valueLabel:P,valueLabelType:E}=this,H=this.formatLabel(l/100,"percent"),I=`${w} ${$}`;return h`<div .ariaLabel=${i} .ariaValueMax=${x==="percent"?u:c} .ariaValueMin=${x==="percent"?o:g} .ariaValueNow=${E==="percent"?l:w} .ariaValueText=${E==="percent"?H:$?I:void 0} class=${b({[r.container]:!0,[r.stepsVisible]:f,[r.valueVisible]:P,[e]:e!=="outline-fill"})} role=meter ${m(this.meterContainerEl)}>${this.renderMeterFill()}${P&&this.renderValueLabel()||""}${n&&this.renderRangeLine(s)||""}${t&&this.renderRangeLine(a)||""}${f&&this.renderMinLabel()||""}${f&&n&&this.renderLowLabel()||""}${f&&t&&this.renderHighLabel()||""}${f&&this.renderMaxLabel()||""}</div>`}};C("calcite-meter",y);export{y as Meter};
|
|
3
|
+
v3.3.0-next.64 */
|
|
4
|
+
import{h as M,k as L}from"./YNQZEVSF.js";import{c as F,e as R,f as O}from"./E6NXYM3P.js";import{a as v}from"./JVQSSJ4H.js";import"./74KZUTUN.js";import{a as T}from"./ESGMYRWF.js";import{a as S}from"./V5LKVIXY.js";import"./R3GOL3TM.js";import{p as V}from"./HNO3DPEZ.js";import"./EQGJYJ5R.js";import{B as d,C as m,D as k,E as b,F as p,Q as C,g as z,h}from"./IZ433VC7.js";var r={container:"container",fill:"fill",stepLine:"step-line",label:"label",labelHidden:"label-hidden",labelRange:"label-range",labelValue:"label-value",unitLabel:"unit-label",stepsVisible:"steps-visible",valueVisible:"value-visible",success:"fill-success",warning:"fill-warning",danger:"fill-danger"},U=z`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host{display:flex;--calcite-internal-meter-space: var(--calcite-spacing-base);--calcite-internal-meter-height: var(--calcite-spacing-lg);--calcite-internal-meter-font-size: var(--calcite-font-size--1);--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-brand));--calcite-internal-meter-background-color: var(--calcite-meter-background-color, var(--calcite-color-foreground-2));--calcite-internal-meter-border-color: var(--calcite-meter-border-color, var(--calcite-color-border-3));--calcite-internal-meter-shadow: var(--calcite-meter-shadow, var(--calcite-shadow-none));--calcite-internal-meter-corner-radius: var(--calcite-meter-corner-radius, 9999px);--calcite-internal-meter-value-text-color: var(--calcite-meter-value-text-color, var(--calcite-color-text-1));--calcite-internal-meter-range-text-color: var(--calcite-meter-range-text-color, var(--calcite-color-text-3))}:host([scale=s]){--calcite-internal-meter-height: var(--calcite-spacing-md);--calcite-internal-meter-font-size: var(--calcite-font-size--2)}:host([scale=l]){--calcite-internal-meter-height: var(--calcite-spacing-xxl);--calcite-internal-meter-font-size: var(--calcite-font-size-0)}:host([appearance=solid]){--calcite-internal-meter-border-color: var(--calcite-color-foreground-3);--calcite-internal-meter-background-color: var(--calcite-color-foreground-3)}:host([appearance=outline]){--calcite-internal-meter-background-color: transparent}.fill{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-brand))}.fill-danger{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-danger))}.fill-success{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-success))}.fill-warning{--calcite-internal-meter-fill-color: var(--calcite-meter-fill-color, var(--calcite-color-status-warning))}.container{position:relative;display:flex;align-items:center;margin:0;inline-size:var(--calcite-container-size-content-fluid);block-size:var(--calcite-internal-meter-height);background-color:var(--calcite-internal-meter-background-color);border:var(--calcite-border-width-sm) solid var(--calcite-internal-meter-border-color);border-radius:var(--calcite-internal-meter-corner-radius);box-shadow:var(--calcite-internal-meter-shadow)}.value-visible{margin-block-start:var(--calcite-spacing-xxl)}.steps-visible{margin-block-end:var(--calcite-spacing-xxl)}.step-line{position:absolute;inset-block:0px;display:block;inline-size:var(--calcite-internal-meter-space);background-color:var(--calcite-internal-meter-border-color)}.label{position:absolute;font-size:var(--calcite-internal-meter-font-size)}.label-hidden{visibility:hidden;opacity:0}.label-value{inset-block-end:calc(100% + .5em);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-internal-meter-value-text-color)}.label-range{color:var(--calcite-internal-meter-range-text-color);inset-block-start:calc(100% + .5em)}.label-range .unit-label{font-weight:var(--calcite-font-weight-medium)}.fill{position:absolute;z-index:var(--calcite-z-index);display:block;transition-timing-function:cubic-bezier(.4,0,.2,1);inset-inline-start:var(--calcite-internal-meter-space);inset-block:var(--calcite-internal-meter-space);border-radius:var(--calcite-internal-meter-corner-radius);max-inline-size:calc(100% - var(--calcite-internal-meter-space) * 2);min-inline-size:calc(var(--calcite-internal-meter-height) - var(--calcite-internal-meter-space) * 2);background-color:var(--calcite-internal-meter-fill-color);transition-property:inline-size,background-color,box-shadow}.solid .fill{inset-block:0;inset-inline-start:0;max-inline-size:100%;min-inline-size:calc(var(--calcite-internal-meter-height));box-shadow:0 0 0 1px var(--calcite-internal-meter-fill-color)}`,y=class extends k{constructor(){super(...arguments),this.highLabelEl=d(),this.labelFlipMax=.8,this.labelFlipProximity=.15,this.lowLabelEl=d(),this.maxLabelEl=d(),this.maxPercent=100,this.messages=S({name:null}),this.meterContainerEl=d(),this.minLabelEl=d(),this.minPercent=0,this.resizeObserver=T("resize",()=>this.resizeHandler()),this.valueLabelEl=d(),this.appearance="outline-fill",this.disabled=!1,this.fillType="range",this.groupSeparator=!1,this.max=100,this.min=0,this.rangeLabelType="percent",this.rangeLabels=!1,this.scale="m",this.unitLabel="",this.valueLabel=!1,this.valueLabelType="percent"}static{this.properties={currentPercent:[16,{},{state:!0}],highActive:[16,{},{state:!0}],highPercent:[16,{},{state:!0}],lowActive:[16,{},{state:!0}],lowPercent:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],fillType:[3,{},{reflect:!0}],form:[3,{},{reflect:!0}],groupSeparator:[7,{},{reflect:!0,type:Boolean}],high:[11,{},{reflect:!0,type:Number}],label:1,low:[11,{},{reflect:!0,type:Number}],max:[11,{},{reflect:!0,type:Number}],min:[11,{},{reflect:!0,type:Number}],name:[3,{},{reflect:!0}],numberingSystem:1,rangeLabelType:[3,{},{reflect:!0}],rangeLabels:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],unitLabel:1,value:[9,{},{type:Number}],valueLabel:[7,{},{reflect:!0,type:Boolean}],valueLabelType:[3,{},{reflect:!0}]}}static{this.styles=U}connectedCallback(){super.connectedCallback(),F(this),this.resizeObserver?.observe(this.el)}load(){this.calculateValues(),O(this,this.value)}willUpdate(e){(e.has("min")&&(this.hasUpdated||this.min!==0)||e.has("max")&&(this.hasUpdated||this.max!==100)||e.has("low")||e.has("high")||e.has("value"))&&this.handleRangeChange(),(e.has("rangeLabels")&&(this.hasUpdated||this.rangeLabels!==!1)||e.has("rangeLabelType")&&(this.hasUpdated||this.rangeLabelType!=="percent")||e.has("unitLabel")&&(this.hasUpdated||this.unitLabel!=="")||e.has("valueLabel")&&(this.hasUpdated||this.valueLabel!==!1)||e.has("valueLabelType")&&(this.hasUpdated||this.valueLabelType!=="percent"))&&this.updateLabels()}loaded(){this.updateLabels()}disconnectedCallback(){super.disconnectedCallback(),R(this),this.resizeObserver?.disconnect()}handleRangeChange(){this.calculateValues(),this.updateLabels()}resizeHandler(){this.updateLabels()}updateLabels(){this.valueLabelEl.value&&this.determineValueLabelPosition(),this.rangeLabels&&this.determineVisibleLabels()}calculateValues(){let{min:e,max:l,low:t,high:a,value:i}=this,n=100*(t-e)/(l-e),s=100*(a-e)/(l-e),c=100*(i-e)/(l-e);(!t||t<e||t>a||t>l)&&(this.low=e),(!a||a>l||a<t||a<e)&&(this.high=l),i||(this.value=e),this.lowPercent=n,this.highPercent=s,this.currentPercent=i?c:0,this.lowActive=!!t&&t>e&&(!i||t>i)&&(!a||t<a),this.highActive=!!a&&e<=a&&a<l&&(!i||a>i)&&(!t||a>t)}formatLabel(e,l){if(l==="percent"){if(!this.percentFormatting){let t=M(this.messages._lang),a=new Intl.NumberFormat(t,{useGrouping:this.groupSeparator,style:"percent"});this.percentFormatting={formatter:a,locale:t}}return this.percentFormatting.formatter.format(e)}else return L.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},L.localize(e.toString())}getMeterKindCssClass(){let{low:e,high:l,min:t,max:a,value:i}=this,n=e||t,s=l||a,c=i>=n,u=i<n,g=i>=s,o=i<s;return!i||!e&&o||u?r.success:c&&o?r.warning:g?r.danger:r.success}intersects(e,l){return e&&l&&V(e.getBoundingClientRect(),l.getBoundingClientRect())}determineVisibleLabels(){let{minLabelEl:{value:e},lowLabelEl:{value:l},highLabelEl:{value:t},maxLabelEl:{value:a}}=this,i=this.intersects(t,a),n=this.intersects(l,t),s=this.intersects(l,a),c=this.intersects(e,t),u=this.intersects(e,l),g=this.intersects(e,a),o=r.labelHidden;l&&(u||s||n?l.classList.add(o):l.classList.remove(o)),t&&(c||s||i?t.classList.add(o):t.classList.remove(o)),e&&a&&(g?a.classList.add(o):a.classList.remove(o))}determineValueLabelPosition(){let{valueLabelEl:{value:e},meterContainerEl:{value:l},currentPercent:t}=this,a=t>100?100:t>0?t:0,i=e.getBoundingClientRect().width,n=l.getBoundingClientRect().width,s=100*(i-0)/(n-0);a+s>=100?(e.style.insetInlineEnd="0%",e.style.removeProperty("inset-inline-start")):(e.style.insetInlineStart=`${a}% `,e.style.removeProperty("inset-inline-end"))}renderMeterFill(){let{currentPercent:e,fillType:l}=this,t=this.getMeterKindCssClass();return h`<div class=${b({[r.fill]:!0,[t]:l!=="single"})} style=${p({width:`${e}%`})}></div>`}renderRangeLine(e){let l={insetInlineStart:`${e}%`};return h`<div class=${b(r.stepLine)} style=${p(l)}></div>`}renderValueLabel(){let{currentPercent:e,valueLabelType:l,unitLabel:t,value:a}=this,i=this.formatLabel(l==="percent"?e/100:a||0,l);return v("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelValue]:!0})} ${m(this.valueLabelEl)}>${i}${t&&l!=="percent"&&h`<span class=${b(r.unitLabel)}> ${t}</span>`||""}</div>`)}renderMinLabel(){let{rangeLabelType:e,min:l,minPercent:t,unitLabel:a}=this,i={insetInlineStart:`${t}%`},n=this.formatLabel(e==="percent"?t:l,e);return v("min-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(i)} ${m(this.minLabelEl)}>${n}${a&&e!=="percent"&&h`<span class=${b(r.unitLabel)}> ${a}</span>`||""}</div>`)}renderLowLabel(){let{rangeLabelType:e,low:l,lowPercent:t,highPercent:a,labelFlipProximity:i}=this,n=l?this.formatLabel(e==="percent"?t/100:l,e):"",s={insetInlineStart:`${t}%`},c={insetInlineEnd:`${100-t}%`},u=(a-t)/100<i?c:s;return v("low-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(u)} ${m(this.lowLabelEl)}>${n}</div>`)}renderHighLabel(){let{rangeLabelType:e,high:l,highPercent:t,labelFlipMax:a}=this,i=l?this.formatLabel(e==="percent"?t/100:l,e):"",n={insetInlineStart:`${t}%`},s={insetInlineEnd:`${100-t}%`},c=t/100>=a?s:n;return v("high-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(c)} ${m(this.highLabelEl)}>${i}</div>`)}renderMaxLabel(){let{rangeLabelType:e,max:l,maxPercent:t}=this,a={insetInlineEnd:`${100-t}%`},i=this.formatLabel(e==="percent"?t/100:l,e);return v("max-label-line",h`<div class=${b({[r.label]:!0,[r.labelRange]:!0})} style=${p(a)} ${m(this.maxLabelEl)}>${i}</div>`)}render(){let{appearance:e,currentPercent:l,highActive:t,highPercent:a,label:i,lowActive:n,lowPercent:s,max:c,maxPercent:u,min:g,minPercent:o,rangeLabels:f,rangeLabelType:x,unitLabel:$,value:w,valueLabel:P,valueLabelType:E}=this,H=this.formatLabel(l/100,"percent"),I=`${w} ${$}`;return h`<div .ariaLabel=${i} .ariaValueMax=${x==="percent"?u:c} .ariaValueMin=${x==="percent"?o:g} .ariaValueNow=${E==="percent"?l:w} .ariaValueText=${E==="percent"?H:$?I:void 0} class=${b({[r.container]:!0,[r.stepsVisible]:f,[r.valueVisible]:P,[e]:e!=="outline-fill"})} role=meter ${m(this.meterContainerEl)}>${this.renderMeterFill()}${P&&this.renderValueLabel()||""}${n&&this.renderRangeLine(s)||""}${t&&this.renderRangeLine(a)||""}${f&&this.renderMinLabel()||""}${f&&n&&this.renderLowLabel()||""}${f&&t&&this.renderHighLabel()||""}${f&&this.renderMaxLabel()||""}</div>`}};C("calcite-meter",y);export{y as Meter};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v3.3.0-next.
|
|
4
|
-
import{a as oe}from"./
|
|
3
|
+
v3.3.0-next.64 */
|
|
4
|
+
import{a as oe}from"./R3GOL3TM.js";import{a as ne,l as ie}from"./HNO3DPEZ.js";import{N as re}from"./IZ433VC7.js";var se=["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=se.join(","),ce=typeof Element>"u",D=ce?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,K=!ce&&Element.prototype.getRootNode?function(a){var e;return a==null||(e=a.getRootNode)===null||e===void 0?void 0:e.call(a)}:function(a){return a?.ownerDocument},j=function a(e,t){var r;t===void 0&&(t=!0);var u=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=u===""||u==="true",n=s||t&&e&&a(e.parentNode);return n},Se=function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"},le=function(e,t,r){if(j(e))return[];var u=Array.prototype.slice.apply(e.querySelectorAll(B));return t&&D.call(e,B)&&u.unshift(e),u=u.filter(r),u},fe=function a(e,t,r){for(var u=[],s=Array.from(e);s.length;){var n=s.shift();if(!j(n,!1))if(n.tagName==="SLOT"){var d=n.assignedElements(),l=d.length?d:n.children,y=a(l,!0,r);r.flatten?u.push.apply(u,y):u.push({scopeParent:n,candidates:y})}else{var T=D.call(n,B);T&&r.filter(n)&&(t||!e.includes(n))&&u.push(n);var w=n.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(n),S=!j(w,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(n));if(w&&S){var O=a(w===!0?n.children:w.children,!0,r);r.flatten?u.push.apply(u,O):u.push({scopeParent:n,candidates:O})}else s.unshift.apply(s,n.children)}}return u},de=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)||Se(e))&&!de(e)?0:e.tabIndex},ke=function(e,t){var r=E(e);return r<0&&t&&!de(e)?0:r},De=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ve=function(e){return e.tagName==="INPUT"},Re=function(e){return ve(e)&&e.type==="hidden"},Oe=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},Ce=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]},Ae=function(e){if(!e.name)return!0;var t=e.form||K(e),r=function(d){return t.querySelectorAll('input[type="radio"][name="'+d+'"]')},u;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")u=r(window.CSS.escape(e.name));else try{u=r(e.name)}catch(n){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",n.message),!1}var s=Ce(u,e.form);return!s||s===e},Ie=function(e){return ve(e)&&e.type==="radio"},Pe=function(e){return Ie(e)&&!Ae(e)},xe=function(e){var t,r=e&&K(e),u=(t=r)===null||t===void 0?void 0:t.host,s=!1;if(r&&r!==e){var n,d,l;for(s=!!((n=u)!==null&&n!==void 0&&(d=n.ownerDocument)!==null&&d!==void 0&&d.contains(u)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&u;){var y,T,w;r=K(u),u=(y=r)===null||y===void 0?void 0:y.host,s=!!((T=u)!==null&&T!==void 0&&(w=T.ownerDocument)!==null&&w!==void 0&&w.contains(u))}}return s},ue=function(e){var t=e.getBoundingClientRect(),r=t.width,u=t.height;return r===0&&u===0},Le=function(e,t){var r=t.displayCheck,u=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=D.call(e,"details>summary:first-of-type"),n=s?e.parentElement:e;if(D.call(n,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof u=="function"){for(var d=e;e;){var l=e.parentElement,y=K(e);if(l&&!l.shadowRoot&&u(l)===!0)return ue(e);e.assignedSlot?e=e.assignedSlot:!l&&y!==e.ownerDocument?e=y.host:e=l}e=d}if(xe(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ue(e);return!1},Be=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var r=0;r<t.children.length;r++){var u=t.children.item(r);if(u.tagName==="LEGEND")return D.call(t,"fieldset[disabled] *")?!0:!u.contains(e)}return!0}t=t.parentElement}return!1},M=function(e,t){return!(t.disabled||j(t)||Re(t)||Le(t,e)||Oe(t)||Be(t))},$=function(e,t){return!(Pe(t)||E(t)<0||!M(e,t))},Ke=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},je=function a(e){var t=[],r=[];return e.forEach(function(u,s){var n=!!u.scopeParent,d=n?u.scopeParent:u,l=ke(d,n),y=n?a(u.candidates):d;l===0?n?t.push.apply(t,y):t.push(d):r.push({documentOrder:s,tabIndex:l,item:u,isScope:n,content:y})}),r.sort(De).reduce(function(u,s){return s.isScope?u.push.apply(u,s.content):u.push(s.content),u},[]).concat(t)},be=function(e,t){t=t||{};var r;return t.getShadowRoot?r=fe([e],t.includeContainer,{filter:$.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ke}):r=le(e,t.includeContainer,$.bind(null,t)),je(r)},he=function(e,t){t=t||{};var r;return t.getShadowRoot?r=fe([e],t.includeContainer,{filter:M.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):r=le(e,t.includeContainer,M.bind(null,t)),r},R=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return D.call(e,B)===!1?!1:$(t,e)},Me=se.concat("iframe").join(","),G=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return D.call(e,Me)===!1?!1:M(t,e)};function Y(a,e){(e==null||e>a.length)&&(e=a.length);for(var t=0,r=Array(e);t<e;t++)r[t]=a[t];return r}function Ge(a){if(Array.isArray(a))return Y(a)}function qe(a,e,t){return(e=$e(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function Ue(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function Ve(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
5
5
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pe(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(a,u).enumerable})),t.push.apply(t,r)}return t}function ye(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?pe(Object(t),!0).forEach(function(r){qe(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):pe(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function _e(a){return Ge(a)||Ue(a)||Ye(a)||Ve()}function We(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function $e(a){var e=We(a,"string");return typeof e=="symbol"?e:e+""}function Ye(a,e){if(a){if(typeof a=="string")return Y(a,e);var t={}.toString.call(a).slice(8,-1);return t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set"?Array.from(a):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Y(a,e):void 0}}var ge={activateTrap:function(e,t){if(e.length>0){var r=e[e.length-1];r!==t&&r._setPausedState(!0)}var u=e.indexOf(t);u===-1||e.splice(u,1),e.push(t)},deactivateTrap:function(e,t){var r=e.indexOf(t);r!==-1&&e.splice(r,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)}},Ze=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},ze=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},x=function(e){return e?.key==="Tab"||e?.keyCode===9},Xe=function(e){return x(e)&&!e.shiftKey},He=function(e){return x(e)&&e.shiftKey},me=function(e){return setTimeout(e,0)},P=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),u=1;u<t;u++)r[u-1]=arguments[u];return typeof e=="function"?e.apply(void 0,r):e},q=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Je=[],we=function(e,t){var r=t?.document||document,u=t?.trapStack||Je,s=ye({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Xe,isKeyBackward:He},t),n={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},d,l=function(i,o,c){return i&&i[o]!==void 0?i[o]:s[c||o]},y=function(i,o){var c=typeof o?.composedPath=="function"?o.composedPath():void 0;return n.containerGroups.findIndex(function(v){var b=v.container,p=v.tabbableNodes;return b.contains(i)||c?.includes(b)||p.find(function(f){return f===i})})},T=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=o.hasFallback,v=c===void 0?!1:c,b=o.params,p=b===void 0?[]:b,f=s[i];if(typeof f=="function"&&(f=f.apply(void 0,_e(p))),f===!0&&(f=void 0),!f){if(f===void 0||f===!1)return f;throw new Error("`".concat(i,"` was specified but was not a node, or did not return a node"))}var g=f;if(typeof f=="string"){try{g=r.querySelector(f)}catch(m){throw new Error("`".concat(i,'` appears to be an invalid selector; error="').concat(m.message,'"'))}if(!g&&!v)throw new Error("`".concat(i,"` as selector refers to no known node"))}return g},w=function(){var i=T("initialFocus",{hasFallback:!0});if(i===!1)return!1;if(i===void 0||i&&!G(i,s.tabbableOptions))if(y(r.activeElement)>=0)i=r.activeElement;else{var o=n.tabbableGroups[0],c=o&&o.firstTabbableNode;i=c||T("fallbackFocus")}else i===null&&(i=T("fallbackFocus"));if(!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i},S=function(){if(n.containerGroups=n.containers.map(function(i){var o=be(i,s.tabbableOptions),c=he(i,s.tabbableOptions),v=o.length>0?o[0]:void 0,b=o.length>0?o[o.length-1]:void 0,p=c.find(function(m){return R(m)}),f=c.slice().reverse().find(function(m){return R(m)}),g=!!o.find(function(m){return E(m)>0});return{container:i,tabbableNodes:o,focusableNodes:c,posTabIndexesFound:g,firstTabbableNode:v,lastTabbableNode:b,firstDomTabbableNode:p,lastDomTabbableNode:f,nextTabbableNode:function(k){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,N=o.indexOf(k);return N<0?A?c.slice(c.indexOf(k)+1).find(function(I){return R(I)}):c.slice(0,c.indexOf(k)).reverse().find(function(I){return R(I)}):o[N+(A?1:-1)]}}}),n.tabbableGroups=n.containerGroups.filter(function(i){return i.tabbableNodes.length>0}),n.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(n.containerGroups.find(function(i){return i.posTabIndexesFound})&&n.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.")},O=function(i){var o=i.activeElement;if(o)return o.shadowRoot&&o.shadowRoot.activeElement!==null?O(o.shadowRoot):o},F=function(i){if(i!==!1&&i!==O(document)){if(!i||!i.focus){F(w());return}i.focus({preventScroll:!!s.preventScroll}),n.mostRecentlyFocusedNode=i,Ze(i)&&i.select()}},Z=function(i){var o=T("setReturnFocus",{params:[i]});return o||(o===!1?!1:i)},z=function(i){var o=i.target,c=i.event,v=i.isBackward,b=v===void 0?!1:v;o=o||q(c),S();var p=null;if(n.tabbableGroups.length>0){var f=y(o,c),g=f>=0?n.containerGroups[f]:void 0;if(f<0)b?p=n.tabbableGroups[n.tabbableGroups.length-1].lastTabbableNode:p=n.tabbableGroups[0].firstTabbableNode;else if(b){var m=n.tabbableGroups.findIndex(function(_){var W=_.firstTabbableNode;return o===W});if(m<0&&(g.container===o||G(o,s.tabbableOptions)&&!R(o,s.tabbableOptions)&&!g.nextTabbableNode(o,!1))&&(m=f),m>=0){var k=m===0?n.tabbableGroups.length-1:m-1,A=n.tabbableGroups[k];p=E(o)>=0?A.lastTabbableNode:A.lastDomTabbableNode}else x(c)||(p=g.nextTabbableNode(o,!1))}else{var N=n.tabbableGroups.findIndex(function(_){var W=_.lastTabbableNode;return o===W});if(N<0&&(g.container===o||G(o,s.tabbableOptions)&&!R(o,s.tabbableOptions)&&!g.nextTabbableNode(o))&&(N=f),N>=0){var I=N===n.tabbableGroups.length-1?0:N+1,ae=n.tabbableGroups[I];p=E(o)>=0?ae.firstTabbableNode:ae.firstDomTabbableNode}else x(c)||(p=g.nextTabbableNode(o))}}else p=T("fallbackFocus");return p},L=function(i){var o=q(i);if(!(y(o,i)>=0)){if(P(s.clickOutsideDeactivates,i)){d.deactivate({returnFocus:s.returnFocusOnDeactivate});return}P(s.allowOutsideClick,i)||i.preventDefault()}},X=function(i){var o=q(i),c=y(o,i)>=0;if(c||o instanceof Document)c&&(n.mostRecentlyFocusedNode=o);else{i.stopImmediatePropagation();var v,b=!0;if(n.mostRecentlyFocusedNode)if(E(n.mostRecentlyFocusedNode)>0){var p=y(n.mostRecentlyFocusedNode),f=n.containerGroups[p].tabbableNodes;if(f.length>0){var g=f.findIndex(function(m){return m===n.mostRecentlyFocusedNode});g>=0&&(s.isKeyForward(n.recentNavEvent)?g+1<f.length&&(v=f[g+1],b=!1):g-1>=0&&(v=f[g-1],b=!1))}}else n.containerGroups.some(function(m){return m.tabbableNodes.some(function(k){return E(k)>0})})||(b=!1);else b=!1;b&&(v=z({target:n.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(n.recentNavEvent)})),F(v||n.mostRecentlyFocusedNode||w())}n.recentNavEvent=void 0},Ne=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n.recentNavEvent=i;var c=z({event:i,isBackward:o});c&&(x(i)&&i.preventDefault(),F(c))},H=function(i){(s.isKeyForward(i)||s.isKeyBackward(i))&&Ne(i,s.isKeyBackward(i))},J=function(i){ze(i)&&P(s.escapeDeactivates,i)!==!1&&(i.preventDefault(),d.deactivate())},Q=function(i){var o=q(i);y(o,i)>=0||P(s.clickOutsideDeactivates,i)||P(s.allowOutsideClick,i)||(i.preventDefault(),i.stopImmediatePropagation())},ee=function(){if(n.active)return ge.activateTrap(u,d),n.delayInitialFocusTimer=s.delayInitialFocus?me(function(){F(w())}):F(w()),r.addEventListener("focusin",X,!0),r.addEventListener("mousedown",L,{capture:!0,passive:!1}),r.addEventListener("touchstart",L,{capture:!0,passive:!1}),r.addEventListener("click",Q,{capture:!0,passive:!1}),r.addEventListener("keydown",H,{capture:!0,passive:!1}),r.addEventListener("keydown",J),d},te=function(){if(n.active)return r.removeEventListener("focusin",X,!0),r.removeEventListener("mousedown",L,!0),r.removeEventListener("touchstart",L,!0),r.removeEventListener("click",Q,!0),r.removeEventListener("keydown",H,!0),r.removeEventListener("keydown",J),d},Ee=function(i){var o=i.some(function(c){var v=Array.from(c.removedNodes);return v.some(function(b){return b===n.mostRecentlyFocusedNode})});o&&F(w())},V=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(Ee):void 0,C=function(){V&&(V.disconnect(),n.active&&!n.paused&&n.containers.map(function(i){V.observe(i,{subtree:!0,childList:!0})}))};return d={get active(){return n.active},get paused(){return n.paused},activate:function(i){if(n.active)return this;var o=l(i,"onActivate"),c=l(i,"onPostActivate"),v=l(i,"checkCanFocusTrap");v||S(),n.active=!0,n.paused=!1,n.nodeFocusedBeforeActivation=O(r),o?.();var b=function(){v&&S(),ee(),C(),c?.()};return v?(v(n.containers.concat()).then(b,b),this):(b(),this)},deactivate:function(i){if(!n.active)return this;var o=ye({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},i);clearTimeout(n.delayInitialFocusTimer),n.delayInitialFocusTimer=void 0,te(),n.active=!1,n.paused=!1,C(),ge.deactivateTrap(u,d);var c=l(o,"onDeactivate"),v=l(o,"onPostDeactivate"),b=l(o,"checkCanReturnFocus"),p=l(o,"returnFocus","returnFocusOnDeactivate");c?.();var f=function(){me(function(){p&&F(Z(n.nodeFocusedBeforeActivation)),v?.()})};return p&&b?(b(Z(n.nodeFocusedBeforeActivation)).then(f,f),this):(f(),this)},pause:function(i){return n.active?(n.manuallyPaused=!0,this._setPausedState(!0,i)):this},unpause:function(i){return n.active?(n.manuallyPaused=!1,u[u.length-1]!==this?this:this._setPausedState(!1,i)):this},updateContainerElements:function(i){var o=[].concat(i).filter(Boolean);return n.containers=o.map(function(c){return typeof c=="string"?r.querySelector(c):c}),n.active&&S(),C(),this}},Object.defineProperties(d,{_isManuallyPaused:{value:function(){return n.manuallyPaused}},_setPausedState:{value:function(i,o){if(n.paused===i)return this;if(n.paused=i,i){var c=l(o,"onPause"),v=l(o,"onPostPause");c?.(),te(),C(),v?.()}else{var b=l(o,"onUnpause"),p=l(o,"onPostUnpause");b?.(),S(),ee(),C(),p?.()}return this}}}),d.updateContainerElements(e),d};var U=new WeakSet;function Qe(a,e){return U.has(a)||ie(e),!1}function et(a,e){let t=e?.fallbackFocus||a,r=e?.clickOutsideDeactivates??!0;return{fallbackFocus:t,...e,document:a.ownerDocument,tabbableOptions:ne,trapStack:re,clickOutsideDeactivates:u=>(U.has(a)||U.add(a),typeof r=="function"?r(u):r),onPostDeactivate:()=>{U.delete(a)},setReturnFocus:u=>{let s=typeof e?.setReturnFocus=="function"?e.setReturnFocus(u):e?.setReturnFocus;return s===void 0?Qe(a,u):s}}}function Te(a,{focusTrapOptions:e},t){return!e?.extraContainers&&!t?a:[a,...Fe(e?.extraContainers),...Fe(t)]}function Fe(a=[]){return Array.isArray(a)?a:[a]}var st=a=>oe((e,t)=>{let r,u,s,n=a.focusTrapOptions;t.onConnected(()=>{e[a.triggerProp]&&r&&d.activate()}),t.onUpdate(l=>{e.hasUpdated&&l.has("focusTrapDisabled")&&(e.focusTrapDisabled?d.deactivate():d.activate())}),t.onDisconnected(()=>d.deactivate());let d={activate:()=>{let l=u||e.el;if(l.isConnected){if(!r){let y={...n,...e.focusTrapOptions};s||=Te(l,e),r=we(s,et(l,y))}(typeof e.focusTrapDisabledOverride=="function"?!e.focusTrapDisabledOverride():!e.focusTrapDisabled)&&r.activate()}},deactivate:()=>r?.deactivate(),overrideFocusTrapEl:l=>{if(r)throw new Error("Focus trap already created");u=l},setExtraContainers:l=>{let y=u||e.el;s=Te(y,e,l)},updateContainerElements:()=>r?.updateContainerElements(s)};return d});export{st as a};
|