@esri/calcite-components 3.0.0 → 3.0.1
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/{FCN5RMLA.js → 2AP6YLXQ.js} +2 -2
- package/dist/calcite/{C46JYVUP.js → 2M5DP5VS.js} +2 -2
- package/dist/calcite/{D36VWSDW.js → 2MTW4RBX.js} +2 -2
- package/dist/calcite/{WPAMFFBY.js → 2TEERBTI.js} +2 -2
- package/dist/calcite/{WWUBU6N5.js → 3BOJE7XV.js} +2 -2
- package/dist/calcite/{SYEQSDHG.js → 3EQ32UON.js} +2 -2
- package/dist/calcite/{QK2H5T7J.js → 3LOOBSHJ.js} +2 -2
- package/dist/calcite/{4SEPDFCP.js → 3LXK5OEB.js} +2 -2
- package/dist/calcite/{7KSGVDSR.js → 3NJWAHVN.js} +2 -2
- package/dist/calcite/{24SER2VV.js → 3TGA6ACB.js} +2 -2
- package/dist/calcite/{6ZTWHW63.js → 3TJZ3VMN.js} +2 -2
- package/dist/calcite/{OE2AH2NC.js → 3U4EUW42.js} +2 -2
- package/dist/calcite/{JCWM5Z43.js → 45R3L3J2.js} +2 -2
- package/dist/calcite/{RVQMJBNS.js → 45YXH4D4.js} +2 -2
- package/dist/calcite/{6XTYGXNG.js → 46ICVIVW.js} +2 -2
- package/dist/calcite/{G3ZJ2KQT.js → 47FXQ37G.js} +2 -2
- package/dist/calcite/{KW57BHXD.js → 4GUL5QXY.js} +2 -2
- package/dist/calcite/{345Q4UHX.js → 4PKLCHA5.js} +2 -2
- package/dist/calcite/{GKKCWEZX.js → 4QSXDJ3I.js} +2 -2
- package/dist/calcite/{7SX3RD7P.js → 4TLHW2N3.js} +2 -2
- package/dist/calcite/{KBNS3CCT.js → 54O5ASY6.js} +2 -2
- package/dist/calcite/{NVBNX55L.js → 57MQUGHN.js} +2 -2
- package/dist/calcite/{CFRBQXK4.js → 5FYVM4AX.js} +2 -2
- package/dist/calcite/{CBSMKHOY.js → 5KCZZJGZ.js} +2 -2
- package/dist/calcite/{6LW27BEV.js → 5OWSKBSV.js} +2 -2
- package/dist/calcite/{AI3R3SU6.js → 5X666Z33.js} +2 -2
- package/dist/calcite/{UELGJSYH.js → 5YBMD5MK.js} +1 -1
- package/dist/calcite/{QYGED6CL.js → 5ZA467A4.js} +2 -2
- package/dist/calcite/{XXZIOSXQ.js → 62M3DNDT.js} +2 -2
- package/dist/calcite/{7PWETOIU.js → 6AN3H3R6.js} +2 -2
- package/dist/calcite/{I32TMNTO.js → 6GK2OTHZ.js} +1 -1
- package/dist/calcite/{U3WK4DZT.js → 6HEZO2KI.js} +2 -2
- package/dist/calcite/{7D3VEEUX.js → 6KFLYQ3F.js} +2 -2
- package/dist/calcite/{GN5CPLSJ.js → 6OPQR7PL.js} +2 -2
- package/dist/calcite/{DBVNMM6Q.js → 6ZNTK2O2.js} +2 -2
- package/dist/calcite/{ZV442E6X.js → 7C3Y7SM7.js} +2 -2
- package/dist/calcite/{GOOHYN3D.js → 7C4KHH7U.js} +2 -2
- package/dist/calcite/{AYZ73RWQ.js → 7COKCZTB.js} +2 -2
- package/dist/calcite/{OLMX7G3J.js → 7CQS22FK.js} +1 -1
- package/dist/calcite/{PT2XMADA.js → 7NLQECEF.js} +1 -1
- package/dist/calcite/{6X2SD2PW.js → 7SVWZ5TZ.js} +2 -2
- package/dist/calcite/{QAYSDI3M.js → 7URHQAUN.js} +1 -1
- package/dist/calcite/{BRTDMTZ3.js → ACFEDJWV.js} +2 -2
- package/dist/calcite/{Y6VF7HSM.js → AFJ2UDEO.js} +2 -2
- package/dist/calcite/{MIKGJ3NM.js → AQANFQEK.js} +2 -2
- package/dist/calcite/{RAQWKUOJ.js → AZPKU6ON.js} +2 -2
- package/dist/calcite/{Z6GA347Y.js → B2GDIYRL.js} +2 -2
- package/dist/calcite/{JEX42CPR.js → BETB6YPW.js} +2 -2
- package/dist/calcite/{G2KHDAZD.js → BJQEZXFS.js} +2 -2
- package/dist/calcite/{XBZLGRRI.js → BKB5MWFT.js} +2 -2
- package/dist/calcite/{D2HDFE7S.js → BYRVP24K.js} +2 -2
- package/dist/calcite/{FNM4DZZH.js → C3XHCMBP.js} +1 -1
- package/dist/calcite/{LILDCWFX.js → C52QQAFR.js} +2 -2
- package/dist/calcite/{QLKHJI4P.js → CE3TSSYN.js} +1 -1
- package/dist/calcite/{DT67ZFPX.js → CHVHH4L7.js} +2 -2
- package/dist/calcite/{GNUSLZWJ.js → CNTBFQBL.js} +2 -2
- package/dist/calcite/{KULDQOV2.js → CPH3OCUO.js} +2 -2
- package/dist/calcite/{XOVG6UH3.js → CWBUDJKG.js} +2 -2
- package/dist/calcite/{MUWK32IE.js → CWJKJUCU.js} +2 -2
- package/dist/calcite/{T6HODD4B.js → CYKAIRKP.js} +2 -2
- package/dist/calcite/{KVSCG5E3.js → D7X7U5LL.js} +2 -2
- package/dist/calcite/{RLSQLIV6.js → DH73QGXJ.js} +2 -2
- package/dist/calcite/{DTL2LM6T.js → DJU4LSIS.js} +2 -2
- package/dist/calcite/{7U7FF3Y4.js → DNKJTXCY.js} +2 -2
- package/dist/calcite/{FHBFGCTR.js → DO7AVVBP.js} +2 -2
- package/dist/calcite/{2YAXZHP2.js → DVFRWPOF.js} +2 -2
- package/dist/calcite/{JUNCR7R2.js → DX5LTGNX.js} +2 -2
- package/dist/calcite/{N2BVYYYP.js → DYHX5C6J.js} +2 -2
- package/dist/calcite/{KI2NOBMU.js → E6LODM5C.js} +2 -2
- package/dist/calcite/{VJD4CRQ3.js → EB432BS5.js} +2 -2
- package/dist/calcite/{YTRT5XZT.js → EFUCITW3.js} +2 -2
- package/dist/calcite/{R6GNPMSV.js → ETK7F3KI.js} +2 -2
- package/dist/calcite/{TQTAM3XB.js → EWAQVZXY.js} +2 -2
- package/dist/calcite/{36DMRAV2.js → EWBW2GOP.js} +2 -2
- package/dist/calcite/{G7WFYVUC.js → F52GIETG.js} +2 -2
- package/dist/calcite/{4BSCJ722.js → F6CK7P7G.js} +2 -2
- package/dist/calcite/{TQIVV2F7.js → FA3DOLYY.js} +2 -2
- package/dist/calcite/{CY6C2FDZ.js → FBUTQVLY.js} +2 -2
- package/dist/calcite/{UJL3BWDH.js → FF2SNYC6.js} +2 -2
- package/dist/calcite/{IH4RXHJJ.js → FGCSO5KT.js} +2 -2
- package/dist/calcite/{F6EGRKXW.js → FJLPIBCZ.js} +2 -2
- package/dist/calcite/{GFC7NS6P.js → FL63KFPW.js} +2 -2
- package/dist/calcite/{A5GGYTUQ.js → FMALNIBL.js} +2 -2
- package/dist/calcite/{RAFCSOOQ.js → FNTHRMT3.js} +2 -2
- package/dist/calcite/{66B2H27W.js → FOFSX3FY.js} +2 -2
- package/dist/calcite/{7QHUEK5R.js → FSQRHBBB.js} +2 -2
- package/dist/calcite/{OTHVFLNW.js → FYCT4FES.js} +2 -2
- package/dist/calcite/{KBDXI6DJ.js → FYUK2GME.js} +2 -2
- package/dist/calcite/{DH4ISGHV.js → G4CQ5QPF.js} +2 -2
- package/dist/calcite/{KSNEQFZX.js → G5AYPPXM.js} +2 -2
- package/dist/calcite/{IJCTXZQB.js → GGNAK2N6.js} +2 -2
- package/dist/calcite/{RMGYRZXR.js → GKVYSG3G.js} +2 -2
- package/dist/calcite/{O4O3TSE5.js → GR3JRBW6.js} +2 -2
- package/dist/calcite/{TNR5VZG2.js → GS4K4IEJ.js} +2 -2
- package/dist/calcite/{3DGJ6ZQI.js → GZBMMB2V.js} +2 -2
- package/dist/calcite/{US3PQV6O.js → HD2NABQD.js} +2 -2
- package/dist/calcite/{G3LH75CQ.js → HEVM6SRJ.js} +2 -2
- package/dist/calcite/{3IV6JSC2.js → HMZA4X6S.js} +2 -2
- package/dist/calcite/{VG7BJBFG.js → HPFCIR5F.js} +2 -2
- package/dist/calcite/{EHZCT5YZ.js → HRDRO2MA.js} +2 -2
- package/dist/calcite/{JFYDLHH7.js → I54F3V4F.js} +2 -2
- package/dist/calcite/{V4JZRN7T.js → IBLJGOPM.js} +2 -2
- package/dist/calcite/{T3NRBBZP.js → IGQGPBGN.js} +2 -2
- package/dist/calcite/{S76CXQTI.js → IITTEDPS.js} +2 -2
- package/dist/calcite/{FE3A3YUN.js → IJOUQRZG.js} +2 -2
- package/dist/calcite/{RESHLE2Y.js → IKHZ7MAG.js} +2 -2
- package/dist/calcite/{EOHVH6PN.js → J3ZEXA7Z.js} +2 -2
- package/dist/calcite/{5EPP4MG3.js → J6ES4ZTD.js} +2 -2
- package/dist/calcite/{22RQB3WE.js → J6V2OKQD.js} +1 -1
- package/dist/calcite/{FDIM6DYL.js → JHWO2CVD.js} +2 -2
- package/dist/calcite/{RSAEDAEX.js → JUW7VCPP.js} +2 -2
- package/dist/calcite/{OOSULFCY.js → KAZVOPHR.js} +2 -2
- package/dist/calcite/{WSGL37LB.js → KCA2V6ZH.js} +2 -2
- package/dist/calcite/{GE63ETFI.js → KJYAPBB2.js} +2 -2
- package/dist/calcite/{MPAVJ7UH.js → KLG62CS4.js} +2 -2
- package/dist/calcite/{RUTUU2EH.js → KOPH76Z4.js} +2 -2
- package/dist/calcite/{ZGXTLCGJ.js → KP4G4VQ3.js} +2 -2
- package/dist/calcite/{ATHBUWBY.js → KPJGFWME.js} +2 -2
- package/dist/calcite/{4YZ27QWL.js → KPP5CUG6.js} +2 -2
- package/dist/calcite/{GAAXSGWK.js → KT3W2WN7.js} +2 -2
- package/dist/calcite/{E4NMFIKN.js → KW4WGJWX.js} +2 -2
- package/dist/calcite/{4TQLSUKH.js → LAE3F72I.js} +1 -1
- package/dist/calcite/{KSVYAIHK.js → LDJND26G.js} +2 -2
- package/dist/calcite/{L5FDXQMT.js → LWAXFXVK.js} +1 -1
- package/dist/calcite/{VMRLYKNI.js → LWKIGIQ7.js} +1 -1
- package/dist/calcite/{AXXJNFKZ.js → M5RSVI77.js} +2 -2
- package/dist/calcite/{DDJ75RTI.js → M6GGWFWP.js} +2 -2
- package/dist/calcite/{OHOS32IT.js → MCYHITP5.js} +2 -2
- package/dist/calcite/{YYJSHQR3.js → MCZED6UJ.js} +1 -1
- package/dist/calcite/{JLZYAYOL.js → MD4KKJXR.js} +2 -2
- package/dist/calcite/{OTUG3NVT.js → MFGDUWWU.js} +2 -2
- package/dist/calcite/{ZA76CHET.js → MGC5QBVT.js} +2 -2
- package/dist/calcite/{4Z7JRTON.js → MKMTLSBP.js} +2 -2
- package/dist/calcite/{X2UHFJHG.js → MRRSD5GQ.js} +2 -2
- package/dist/calcite/{3TOVZEQB.js → MUYFLMXN.js} +2 -2
- package/dist/calcite/{TSJJLMPA.js → MVBR6FNF.js} +1 -1
- package/dist/calcite/{NODC2JA6.js → MYXXA6E5.js} +2 -2
- package/dist/calcite/{URM3R65T.js → N2AFATQQ.js} +2 -2
- package/dist/calcite/{46U4MKUU.js → N2Q46D75.js} +2 -2
- package/dist/calcite/{6OZRZ36X.js → NBX4LUWL.js} +2 -2
- package/dist/calcite/{CMO3X257.js → NLK3OCCK.js} +2 -2
- package/dist/calcite/{CNO6NFH5.js → NPTN6OGZ.js} +2 -2
- package/dist/calcite/{NWVCPRVB.js → NQPJICFQ.js} +1 -1
- package/dist/calcite/{EAML4EDI.js → NWTXX6JY.js} +2 -2
- package/dist/calcite/{N4MN6VQ7.js → O627WVJG.js} +2 -2
- package/dist/calcite/{HMVKZP47.js → O6BU5DYY.js} +2 -2
- package/dist/calcite/{EFI2G5WL.js → OAD7JJOE.js} +2 -2
- package/dist/calcite/{MZRO54UT.js → OEK7OZTX.js} +2 -2
- package/dist/calcite/{K3ZBW4GY.js → OENBCW7D.js} +2 -2
- package/dist/calcite/{I2OIH73C.js → OLP7ABVK.js} +1 -1
- package/dist/calcite/{2BGMAPSV.js → OOHSVUO2.js} +2 -2
- package/dist/calcite/{CJYTY62F.js → OOWC3DHW.js} +2 -2
- package/dist/calcite/{U725E4ID.js → OREMH3DL.js} +2 -2
- package/dist/calcite/{C54C5E23.js → OUKBJ6J3.js} +2 -2
- package/dist/calcite/{SBZ6VJ75.js → PA6PSCEP.js} +1 -1
- package/dist/calcite/{ZQO6E4FO.js → PFRWMYU6.js} +2 -2
- package/dist/calcite/{OPBQNK7J.js → PPMXW2CH.js} +2 -2
- package/dist/calcite/{BSRMWMHQ.js → PU7HI4RM.js} +2 -2
- package/dist/calcite/{LHSAAMYQ.js → PV7FS57L.js} +2 -2
- package/dist/calcite/{CK6HQQX6.js → PYT6F7XN.js} +1 -1
- package/dist/calcite/{HFIRIAQA.js → QGSMNFLV.js} +2 -2
- package/dist/calcite/{MQYH4ONZ.js → QLL7IT53.js} +1 -1
- package/dist/calcite/{QU33PBBI.js → QV6PXGLB.js} +2 -2
- package/dist/calcite/{N55N67N5.js → QZ4S4NPD.js} +2 -2
- package/dist/calcite/{Z7VNUC77.js → R5GIKUFX.js} +2 -2
- package/dist/calcite/{ECEZ4R6E.js → RD2YKJMP.js} +2 -2
- package/dist/calcite/{HGTV36FX.js → RI6ANEBM.js} +2 -2
- package/dist/calcite/{WKTGTKRJ.js → RIXZG4AD.js} +2 -2
- package/dist/calcite/{RJLKHCRB.js → RIYYUHQ7.js} +2 -2
- package/dist/calcite/{GPUFLCIT.js → RRNZ4FU5.js} +2 -2
- package/dist/calcite/{BAHIPAHM.js → RRPMD5OW.js} +2 -2
- package/dist/calcite/{ARHYATTG.js → RSI5VQHT.js} +2 -2
- package/dist/calcite/{7E342YOK.js → RYQPXZK6.js} +2 -2
- package/dist/calcite/{GGO5TMB4.js → S3TERCKZ.js} +2 -2
- package/dist/calcite/{XT32TCZG.js → S6DJKPG5.js} +1 -1
- package/dist/calcite/{VCSXFNPO.js → S6SBHJIV.js} +2 -2
- package/dist/calcite/{7WG5I3MP.js → SM6GCEH6.js} +2 -2
- package/dist/calcite/{T5UPGHU3.js → STCRUA4G.js} +2 -2
- package/dist/calcite/{SKDMJE3X.js → SVTZCS25.js} +1 -1
- package/dist/calcite/{E3R5SMVW.js → T246IHBX.js} +2 -2
- package/dist/calcite/{ESBOJTBS.js → T5I34CKY.js} +2 -2
- package/dist/calcite/{BZKF5ZXQ.js → TC73OO6B.js} +2 -2
- package/dist/calcite/{DNYBIAUI.js → TFRMRELY.js} +2 -2
- package/dist/calcite/{CIV3PH3Z.js → TTARWRVZ.js} +2 -2
- package/dist/calcite/{VST65PDC.js → TTPB5NUF.js} +1 -1
- package/dist/calcite/{IXRMDUEL.js → TV2JMAEX.js} +2 -2
- package/dist/calcite/{LLSB73WA.js → U3A4ZFDA.js} +2 -2
- package/dist/calcite/{VNQNKQ2J.js → U3J436K5.js} +2 -2
- package/dist/calcite/{I62DUDHI.js → U4KFLUXN.js} +2 -2
- package/dist/calcite/{IYDN67SF.js → U5LWIQFM.js} +2 -2
- package/dist/calcite/{YA5A7PJR.js → UAPP5RN3.js} +2 -2
- package/dist/calcite/{YMRTHS5X.js → UJ2DNCBI.js} +2 -2
- package/dist/calcite/{45GA6INB.js → UVQWXGAE.js} +2 -2
- package/dist/calcite/{LB5ATL5Q.js → V7P5NO5D.js} +2 -2
- package/dist/calcite/{FNFWOOMR.js → VGKMOO66.js} +1 -1
- package/dist/calcite/{LH7KSBQC.js → VIVZTWDT.js} +2 -2
- package/dist/calcite/{MCSX2S5T.js → VLUVMJLJ.js} +2 -2
- package/dist/calcite/{R3HMG2D6.js → VPCQX3JS.js} +2 -2
- package/dist/calcite/{CWPRBG3T.js → VQZMYHUR.js} +2 -2
- package/dist/calcite/{2M4WCGKG.js → VRJOLF5U.js} +2 -2
- package/dist/calcite/{3GICXOBQ.js → VSACPVTO.js} +2 -2
- package/dist/calcite/{KWOOGTG2.js → VSVGJIKO.js} +2 -2
- package/dist/calcite/{MBQZPRQ5.js → W2IMTPXZ.js} +2 -2
- package/dist/calcite/{JVNEJ36Z.js → W35EGCBV.js} +2 -2
- package/dist/calcite/{TVDZM7WT.js → W7BTFAAV.js} +2 -2
- package/dist/calcite/{MPX2M2VX.js → WB2APVPE.js} +2 -2
- package/dist/calcite/{OGED6PPP.js → WODNJF5Z.js} +2 -2
- package/dist/calcite/{LOZEGKG2.js → X6EDNQN2.js} +2 -2
- package/dist/calcite/{GSXEMGSW.js → X7JJZRMI.js} +2 -2
- package/dist/calcite/{R4RMVIKH.js → XDEHQTPQ.js} +2 -2
- package/dist/calcite/{QQ67AVDV.js → XFRASDZI.js} +2 -2
- package/dist/calcite/{SJKTCGW6.js → XK4FISIX.js} +2 -2
- package/dist/calcite/{RVMVJW6K.js → XL665FTR.js} +2 -2
- package/dist/calcite/{GYQTRH4V.js → XPMURWBT.js} +2 -2
- package/dist/calcite/{PNHR5K2L.js → XUCTBMBM.js} +2 -2
- package/dist/calcite/{BRTESQOJ.js → Y3MFFLOP.js} +2 -2
- package/dist/calcite/YHIHWSGP.js +4 -0
- package/dist/calcite/{HKHPJJ34.js → YJWS4TZW.js} +2 -2
- package/dist/calcite/{SMUXJLDL.js → YUYVD6B5.js} +2 -2
- package/dist/calcite/{5AVZLE2Q.js → YW6YWFXE.js} +2 -2
- package/dist/calcite/{QCGLMLKW.js → YW7G4LA7.js} +2 -2
- package/dist/calcite/{QHASLHZN.js → YXYKAROM.js} +2 -2
- package/dist/calcite/{YXLQFMOA.js → Z7RQIFXO.js} +2 -2
- package/dist/calcite/{2JKKAEPM.js → ZYBMEVEB.js} +2 -2
- package/dist/calcite/calcite.esm.js +2 -2
- package/dist/chunks/ExpandToggle.js +1 -1
- package/dist/chunks/FloatingArrow.js +1 -1
- package/dist/chunks/Heading.js +1 -1
- package/dist/chunks/Validation.js +1 -1
- package/dist/chunks/_commonjsHelpers.js +1 -1
- package/dist/chunks/array.js +1 -1
- package/dist/chunks/component.js +1 -1
- package/dist/chunks/core.js +1 -1
- package/dist/chunks/date.js +1 -1
- package/dist/chunks/dom.js +1 -1
- package/dist/chunks/dynamicClasses.js +1 -1
- package/dist/chunks/filter.js +1 -1
- package/dist/chunks/floating-ui.js +1 -1
- package/dist/chunks/focusTrapComponent.js +1 -1
- package/dist/chunks/form.js +1 -1
- package/dist/chunks/global.js +1 -1
- package/dist/chunks/guid.js +1 -1
- package/dist/chunks/input.js +1 -1
- package/dist/chunks/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/loadable.js +1 -1
- package/dist/chunks/locale.js +1 -1
- package/dist/chunks/logger.js +1 -1
- package/dist/chunks/math.js +1 -1
- package/dist/chunks/observers.js +1 -1
- package/dist/chunks/openCloseComponent.js +1 -1
- package/dist/chunks/resources.js +1 -1
- package/dist/chunks/resources2.js +1 -1
- package/dist/chunks/resources3.js +1 -1
- package/dist/chunks/resources4.js +1 -1
- package/dist/chunks/resources5.js +1 -1
- package/dist/chunks/resources6.js +1 -1
- package/dist/chunks/resources7.js +1 -1
- package/dist/chunks/responsive.js +1 -1
- package/dist/chunks/runtime.js +3 -3
- package/dist/chunks/sortableComponent.js +1 -1
- package/dist/chunks/text.js +1 -1
- package/dist/chunks/time.js +1 -1
- package/dist/chunks/useFocusTrap.js +23 -25
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utils.js +1 -1
- package/dist/chunks/utils2.js +1 -1
- package/dist/chunks/utils3.js +1 -1
- package/dist/chunks/utils4.js +1 -1
- package/dist/components/calcite-accordion/customElement.js +1 -1
- package/dist/components/calcite-accordion-item/customElement.js +1 -1
- package/dist/components/calcite-action/customElement.js +24 -24
- 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 +2 -2
- package/dist/components/calcite-block-section/customElement.js +1 -1
- package/dist/components/calcite-button/customElement.js +1 -1
- package/dist/components/calcite-card/customElement.js +1 -1
- package/dist/components/calcite-card-group/customElement.js +1 -1
- package/dist/components/calcite-carousel/customElement.js +1 -1
- package/dist/components/calcite-carousel-item/customElement.js +1 -1
- package/dist/components/calcite-checkbox/customElement.js +1 -1
- package/dist/components/calcite-chip/customElement.js +1 -1
- package/dist/components/calcite-chip-group/customElement.js +1 -1
- package/dist/components/calcite-color-picker/customElement.js +1 -1
- package/dist/components/calcite-color-picker-hex-input/customElement.js +1 -1
- package/dist/components/calcite-color-picker-swatch/customElement.js +1 -1
- package/dist/components/calcite-combobox/customElement.js +1 -1
- package/dist/components/calcite-combobox-item/customElement.js +1 -1
- package/dist/components/calcite-combobox-item-group/customElement.js +1 -1
- package/dist/components/calcite-date-picker/customElement.js +1 -1
- package/dist/components/calcite-date-picker-day/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
- package/dist/components/calcite-dialog/customElement.js +2 -2
- package/dist/components/calcite-dropdown/customElement.js +1 -1
- package/dist/components/calcite-dropdown-group/customElement.js +1 -1
- package/dist/components/calcite-dropdown-item/customElement.js +1 -1
- package/dist/components/calcite-fab/customElement.js +1 -1
- package/dist/components/calcite-filter/customElement.js +1 -1
- package/dist/components/calcite-flow/customElement.js +1 -1
- package/dist/components/calcite-flow-item/customElement.js +1 -1
- package/dist/components/calcite-graph/customElement.js +1 -1
- package/dist/components/calcite-handle/customElement.js +1 -1
- package/dist/components/calcite-icon/customElement.js +1 -1
- package/dist/components/calcite-inline-editable/customElement.js +1 -1
- package/dist/components/calcite-input/customElement.js +1 -1
- package/dist/components/calcite-input-date-picker/customElement.js +1 -1
- package/dist/components/calcite-input-message/customElement.js +1 -1
- package/dist/components/calcite-input-number/customElement.js +1 -1
- package/dist/components/calcite-input-text/customElement.js +1 -1
- package/dist/components/calcite-input-time-picker/customElement.js +1 -1
- package/dist/components/calcite-input-time-zone/customElement.js +1 -1
- package/dist/components/calcite-label/customElement.js +1 -1
- package/dist/components/calcite-link/customElement.js +1 -1
- package/dist/components/calcite-list/customElement.js +2 -2
- 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.d.ts +2 -2
- 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 +8 -8
- 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 +2 -2
- package/dist/components/calcite-shell/customElement.js +1 -1
- package/dist/components/calcite-shell-center-row/customElement.js +1 -1
- package/dist/components/calcite-shell-panel/customElement.js +1 -1
- package/dist/components/calcite-slider/customElement.js +1 -1
- package/dist/components/calcite-sort-handle/customElement.js +1 -1
- package/dist/components/calcite-sortable-list/customElement.js +1 -1
- package/dist/components/calcite-split-button/customElement.js +1 -1
- package/dist/components/calcite-stack/customElement.js +1 -1
- package/dist/components/calcite-stepper/customElement.js +1 -1
- package/dist/components/calcite-stepper-item/customElement.js +1 -1
- package/dist/components/calcite-switch/customElement.js +1 -1
- package/dist/components/calcite-tab/customElement.js +1 -1
- package/dist/components/calcite-tab-nav/customElement.js +1 -1
- package/dist/components/calcite-tab-title/customElement.js +1 -1
- package/dist/components/calcite-table/customElement.js +1 -1
- package/dist/components/calcite-table-cell/customElement.js +1 -1
- package/dist/components/calcite-table-header/customElement.js +1 -1
- package/dist/components/calcite-table-row/customElement.js +1 -1
- package/dist/components/calcite-tabs/customElement.js +1 -1
- package/dist/components/calcite-text-area/customElement.js +1 -1
- package/dist/components/calcite-tile/customElement.js +1 -1
- package/dist/components/calcite-tile-group/customElement.js +1 -1
- package/dist/components/calcite-tile-select/customElement.js +1 -1
- package/dist/components/calcite-tile-select-group/customElement.js +1 -1
- package/dist/components/calcite-time-picker/customElement.js +1 -1
- package/dist/components/calcite-tip/customElement.js +1 -1
- package/dist/components/calcite-tip-group/customElement.js +1 -1
- package/dist/components/calcite-tip-manager/customElement.js +1 -1
- package/dist/components/calcite-tooltip/customElement.js +1 -1
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +1 -1
- package/dist/controllers/useFocusTrap.d.ts +6 -2
- package/dist/docs/api.json +13 -13
- package/dist/docs/docs.json +11 -11
- package/dist/docs/supported-browsers.json +1 -1
- package/dist/docs/vscode.css-custom-data.json +7 -7
- package/dist/docs/vscode.html-custom-data.json +3 -3
- package/dist/docs/web-types.json +13 -13
- package/dist/extras/vscode-data.json +3 -3
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/package.json +5 -5
- package/readme.md +2 -2
- package/dist/calcite/PZLVQQMT.js +0 -4
|
@@ -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.0.
|
|
4
|
-
import{a as S,b as O,d as T}from"./DTL2LM6T.js";import{c as $,d as C,e as E}from"./G3LH75CQ.js";import{b as l,c as R}from"./G7WFYVUC.js";import{a as w,b as y}from"./LOZEGKG2.js";import{a as i}from"./3IV6JSC2.js";import"./KW57BHXD.js";import{a as r}from"./CNO6NFH5.js";import{a as z}from"./ARHYATTG.js";import{a as f,b as c}from"./QU33PBBI.js";import{t as m}from"./CMO3X257.js";import{b as x}from"./GN5CPLSJ.js";import"./I2OIH73C.js";import{B as v,G as g,J as k,c as b,e as p,f as o,w as h,x as a,z as e}from"./KVSCG5E3.js";var n={buttonLoader:"calcite-button--loader",content:"content",contentSlotted:"content--slotted",icon:"icon",iconStart:"icon--start",iconEnd:"icon--end",loadingIn:"loading-in",loadingOut:"loading-out",iconStartEmpty:"icon-start-empty",iconEndEmpty:"icon-end-empty",buttonPadding:"button-padding",buttonPaddingShrunk:"button-padding--shrunk"},P=p`: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;inline-size:auto;vertical-align:middle;border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0))}:host a,:host button{--calcite-internal-button-content-margin: .5rem;--calcite-internal-button-padding-x: 7px;--calcite-internal-button-padding-y-internal: 3px;position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-user-select:none;user-select:none;appearance:none;align-items:center;justify-content:center;border-style:none;text-align:center;font-family:inherit;font-weight:var(--calcite-font-weight-normal);text-decoration-line:none;outline-color:transparent;background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color, var(--calcite-color-transparent)));border-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent)));border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0));color:var(--calcite-button-text-color, var(--calcite-internal-button-text-color, currentColor));padding-block:var(--calcite-internal-button-padding-y-internal);padding-inline:var(--calcite-internal-button-padding-x);transition:color var(--calcite-animation-timing) ease-in-out,background-color var(--calcite-animation-timing) ease-in-out,box-shadow var(--calcite-animation-timing) ease-in-out,outline-color var(--calcite-internal-animation-timing-fast) ease-in-out}:host a:hover,:host button:hover{text-decoration-line:none}:host a:focus,:host button:focus{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host a span,:host button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host a calcite-loader,:host button calcite-loader{color:var(--calcite-button-loader-color, var(--calcite-internal-button-loader-color, currentColor))}:host([round]){--calcite-internal-button-corner-radius: 50px}.content{margin-inline:var(--calcite-internal-button-content-margin)}.icon-start-empty .content{margin-inline-start:unset}.icon-end-empty .content{margin-inline-end:unset}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-content-margin: .75rem}:host([scale=l]) button,:host([scale=l]) a{--calcite-internal-button-content-margin: 1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([alignment=center]:not([width=auto])) a,:host([alignment=center]:not([width=auto])) button{justify-content:center}:host([alignment=start]:not([width=auto])) a,:host([alignment=start]:not([width=auto])) button{justify-content:flex-start}:host([alignment=end]:not([width=auto])) a,:host([alignment=end]:not([width=auto])) button{justify-content:flex-end}:host([alignment*=space-between]:not([width=auto])) a,:host([alignment*=space-between]:not([width=auto])) button{justify-content:space-between}:host([alignment=icon-start-space-between]:not([width=auto])) .icon--start{margin-inline-end:auto}:host([alignment=icon-start-space-between]:not([width=auto])) a,:host([alignment=icon-start-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-end-space-between]:not([width=auto])) .icon--end{margin-inline-start:auto}:host([alignment=icon-end-space-between]:not([width=auto])) a,:host([alignment=icon-end-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=center]) a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) button:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:var(--calcite-internal-button-content-margin)}.icon{position:relative;margin:0;display:inline-flex;font-weight:var(--calcite-font-weight-normal);line-height:inherit}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}@keyframes loader-in{0%{inline-size:0;opacity:0;transform:scale(.5)}to{inline-size:1em;opacity:1;transform:scale(1)}}@keyframes loader-out{0%{inline-size:1em;opacity:1;transform:scale(1)}to{inline-size:0;opacity:0;transform:scale(.5)}}.calcite-button--loader{display:flex}.calcite-button--loader calcite-loader{margin:0}:host([loading]) button.content--slotted .calcite-button--loader calcite-loader,:host([loading]) a.content--slotted .calcite-button--loader calcite-loader{margin-inline-end:var(--calcite-internal-button-content-margin)}:host([loading]) button:not(.content--slotted) .icon--start,:host([loading]) button:not(.content--slotted) .icon--end,:host([loading]) a:not(.content--slotted) .icon--start,:host([loading]) a:not(.content--slotted) .icon--end{display:none}:host([appearance]) button,:host([appearance]) a{--calcite-internal-button-border-color: var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([kind=brand]) button,:host([kind=brand]) a{--calcite-internal-button-text-color: var(--calcite-color-text-inverse);--calcite-internal-button-background-color: var(--calcite-color-brand)}:host([kind=brand]) button:hover,:host([kind=brand]) button:focus,:host([kind=brand]) a:hover,:host([kind=brand]) a:focus{--calcite-internal-button-background-color: var(--calcite-color-brand-hover)}:host([kind=brand]) button:active,:host([kind=brand]) a:active{--calcite-internal-button-background-color: var(--calcite-color-brand-press)}:host([kind=danger]) button,:host([kind=danger]) a{--calcite-internal-button-text-color: var(--calcite-color-text-inverse);--calcite-internal-button-background-color: var(--calcite-color-status-danger)}:host([kind=danger]) button:hover,:host([kind=danger]) button:focus,:host([kind=danger]) a:hover,:host([kind=danger]) a:focus{--calcite-internal-button-background-color: var(--calcite-color-status-danger-hover)}:host([kind=danger]) button:active,:host([kind=danger]) a:active{--calcite-internal-button-background-color: var(--calcite-color-status-danger-press)}:host([kind=neutral]) button,:host([kind=neutral]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-background-color: var(--calcite-color-foreground-3)}:host([kind=neutral]) button:hover,:host([kind=neutral]) button:focus,:host([kind=neutral]) a:hover,:host([kind=neutral]) a:focus{--calcite-internal-button-background-color: var(--calcite-color-foreground-2)}:host([kind=neutral]) button:active,:host([kind=neutral]) a:active{--calcite-internal-button-background-color: var(--calcite-color-foreground-1)}:host([kind=inverse]) button,:host([kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-inverse);--calcite-internal-button-background-color: var(--calcite-color-inverse)}:host([kind=inverse]) button:hover,:host([kind=inverse]) button:focus,:host([kind=inverse]) a:hover,:host([kind=inverse]) a:focus{--calcite-internal-button-background-color: var(--calcite-color-inverse-hover)}:host([kind=inverse]) button:active,:host([kind=inverse]) a:active{--calcite-internal-button-background-color: var(--calcite-color-inverse-press)}:host([appearance=outline-fill]) a,:host([appearance=outline-fill]) button,:host([appearance=outline]) a,:host([appearance=outline]) button{box-shadow:inset 0 0 0 1px var(--calcite-button-shadow-color, var(--calcite-internal-button-shadow-color, transparent))}:host([appearance=outline-fill]) a:hover,:host([appearance=outline-fill]) button:hover,:host([appearance=outline]) a:hover,:host([appearance=outline]) button:hover{box-shadow:inset 0 0 0 1px var(--calcite-button-shadow-color, var(--calcite-internal-button-shadow-color, var(--calcite-color-foreground-3)))}:host([appearance=outline-fill]) a:focus,:host([appearance=outline-fill]) a:active,:host([appearance=outline-fill]) button:focus,:host([appearance=outline-fill]) button:active,:host([appearance=outline]) a:focus,:host([appearance=outline]) a:active,:host([appearance=outline]) button:focus,:host([appearance=outline]) button:active{box-shadow:inset 0 0 0 2px var(--calcite-button-shadow-color, var(--calcite-internal-button-shadow-color, var(--calcite-color-foreground-3)))}:host([appearance=outline-fill]) button,:host([appearance=outline-fill]) a{--calcite-internal-button-background-color: var(--calcite-color-foreground-1);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline-fill][kind=brand]) button,:host([appearance=outline-fill][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-background-color: var(--calcite-color-foreground-1)}:host([appearance=outline-fill][kind=brand]) button:hover,:host([appearance=outline-fill][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover);--calcite-internal-button-shadow-color: var(--calcite-color-brand-hover)}:host([appearance=outline-fill][kind=brand]) button:focus,:host([appearance=outline-fill][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-shadow-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:active,:host([appearance=outline-fill][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press);--calcite-internal-button-shadow-color: var(--calcite-color-brand-press)}:host([appearance=outline-fill][kind=brand]) button calcite-loader,:host([appearance=outline-fill][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=danger]) button,:host([appearance=outline-fill][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-background-color: var(--calcite-color-foreground-1);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:hover,:host([appearance=outline-fill][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-shadow-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline-fill][kind=danger]) button:focus,:host([appearance=outline-fill][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-shadow-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:active,:host([appearance=outline-fill][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press);--calcite-internal-button-shadow-color: var(--calcite-color-status-danger-press)}:host([appearance=outline-fill][kind=danger]) button calcite-loader,:host([appearance=outline-fill][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=neutral]) button,:host([appearance=outline-fill][kind=neutral]) a{--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-background-color: var(--calcite-color-foreground-1)}:host([appearance=outline-fill][kind=neutral]) button:hover,:host([appearance=outline-fill][kind=neutral]) a:hover{--calcite-internal-button-shadow-color: var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:focus,:host([appearance=outline-fill][kind=neutral]) a:focus{--calcite-internal-button-shadow-color: var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:active,:host([appearance=outline-fill][kind=neutral]) a:active{--calcite-internal-button-shadow-color: var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=inverse]) button,:host([appearance=outline-fill][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-background-color: var(--calcite-color-foreground-1);--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline-fill][kind=inverse]) button:hover,:host([appearance=outline-fill][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover);--calcite-internal-button-shadow-color: var(--calcite-color-inverse-hover)}:host([appearance=outline-fill][kind=inverse]) button:focus,:host([appearance=outline-fill][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-shadow-color: var(--calcite-color-inverse)}:host([appearance=outline-fill][kind=inverse]) button:active,:host([appearance=outline-fill][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press);--calcite-internal-button-shadow-color: var(--calcite-color-inverse-press)}:host([appearance=outline]) button,:host([appearance=outline]) a{--calcite-internal-button-background-color: var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline][kind=brand]) button,:host([appearance=outline][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-background-color: var(--calcite-color-transparent)}:host([appearance=outline][kind=brand]) button:hover,:host([appearance=outline][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover);--calcite-internal-button-shadow-color: var(--calcite-color-brand-hover)}:host([appearance=outline][kind=brand]) button:focus,:host([appearance=outline][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-shadow-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:active,:host([appearance=outline][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press);--calcite-internal-button-shadow-color: var(--calcite-color-brand-press)}:host([appearance=outline][kind=brand]) button calcite-loader,:host([appearance=outline][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=danger]) button,:host([appearance=outline][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-background-color: var(--calcite-color-transparent)}:host([appearance=outline][kind=danger]) button:hover,:host([appearance=outline][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-shadow-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline][kind=danger]) button:focus,:host([appearance=outline][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-shadow-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:active,:host([appearance=outline][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press);--calcite-internal-button-shadow-color: var(--calcite-color-status-danger-press)}:host([appearance=outline][kind=danger]) button calcite-loader,:host([appearance=outline][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=neutral]) button,:host([appearance=outline][kind=neutral]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-background-color: var(--calcite-color-transparent);--calcite-internal-button-border-color: var(--calcite-color-border-1)}:host([appearance=outline][kind=neutral]) button:hover,:host([appearance=outline][kind=neutral]) a:hover{--calcite-internal-button-shadow-color: var(--calcite-color-foreground-3)}:host([appearance=outline][kind=neutral]) button:focus,:host([appearance=outline][kind=neutral]) a:focus{--calcite-internal-button-shadow-color: var(--calcite-color-foreground-3)}:host([appearance=outline][kind=neutral]) button:active,:host([appearance=outline][kind=neutral]) a:active{--calcite-internal-button-shadow-color: var(--calcite-color-foreground-3)}:host([appearance=outline][kind=inverse]) button,:host([appearance=outline][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-background-color: var(--calcite-color-transparent);--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline][kind=inverse]) button:hover,:host([appearance=outline][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover);--calcite-internal-button-shadow-color: var(--calcite-color-inverse-hover)}:host([appearance=outline][kind=inverse]) button:focus,:host([appearance=outline][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-shadow-color: var(--calcite-color-inverse)}:host([appearance=outline][kind=inverse]) button:active,:host([appearance=outline][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press);--calcite-internal-button-shadow-color: var(--calcite-color-inverse-press)}:host([appearance=outline-fill][split-child=primary]) button,:host([appearance=outline][split-child=primary]) button{border-inline-end-width:0;border-inline-start-width:1px}:host([appearance=outline-fill][split-child=secondary]) button,:host([appearance=outline][split-child=secondary]) button{border-inline-start-width:0;border-inline-end-width:1px}:host([appearance=transparent]:not(.enable-editing-button)) button,:host([appearance=transparent]:not(.enable-editing-button)) a{background-color:var(--calcite-color-transparent)}:host([appearance=transparent]:not(.enable-editing-button)) button:hover,:host([appearance=transparent]:not(.enable-editing-button)) button:focus,:host([appearance=transparent]:not(.enable-editing-button)) a:hover,:host([appearance=transparent]:not(.enable-editing-button)) a:focus{background-color:var(--calcite-color-transparent-hover)}:host([appearance=transparent]:not(.enable-editing-button)) button:active,:host([appearance=transparent]:not(.enable-editing-button)) a:active{background-color:var(--calcite-color-transparent-press)}:host([appearance=transparent][kind=brand]) button,:host([appearance=transparent][kind=brand]) a{--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:hover,:host([appearance=transparent][kind=brand]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=transparent][kind=brand]) button:focus,:host([appearance=transparent][kind=brand]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:active,:host([appearance=transparent][kind=brand]) a:active{--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=transparent][kind=brand]) button calcite-loader,:host([appearance=transparent][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=danger]) button,:host([appearance=transparent][kind=danger]) a{--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:hover,:host([appearance=transparent][kind=danger]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=transparent][kind=danger]) button:focus,:host([appearance=transparent][kind=danger]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:active,:host([appearance=transparent][kind=danger]) a:active{--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=transparent][kind=danger]) button calcite-loader,:host([appearance=transparent][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) button,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) a,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-1)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button{--calcite-internal-button-text-color: var(--calcite-color-text-3);border-block-start-width:1px;border-block-end-width:1px;color:var(--calcite-color-text-3);border-block-start-color:var(--calcite-color-border-input);border-block-end-color:var(--calcite-color-border-input);border-block-style:solid}:host([appearance=transparent][kind=neutral].cancel-editing-button) button:not(.content--slotted){--calcite-internal-button-padding-y-internal: 0}:host([appearance=transparent][kind=neutral].cancel-editing-button) button:hover{--calcite-internal-button-text-color: var(--calcite-color-text-1)}:host([appearance=transparent][kind=neutral].enable-editing-button) button{background-color:transparent}:host(.confirm-changes-button) button:focus,:host(.cancel-editing-button) button:focus,:host(.enable-editing-button) button:focus{outline-offset:-2px}:host([appearance=transparent][kind=inverse]) button,:host([appearance=transparent][kind=inverse]) a,:host([appearance=transparent][kind=inverse]) calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([scale=s]) button.content--slotted,:host([scale=s]) a.content--slotted{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s][appearance=transparent]) button.content--slotted,:host([scale=s][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .5rem}:host([scale=s]) button,:host([scale=s]) a{--calcite-internal-button-padding-y-internal: 3px}:host([scale=m]) button.content--slotted,:host([scale=m]) a.content--slotted{--calcite-internal-button-padding-x: 11px;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-padding-y-internal: 7px}:host([scale=m][appearance=transparent]) button.content--slotted,:host([scale=m][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .75rem}:host([scale=l]) button.content--slotted,:host([scale=l]) a.content--slotted{--calcite-internal-button-padding-x: 15px;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .button-padding{--calcite-internal-button-padding-x: 1rem;--calcite-internal-button-padding-y-internal: 11px}:host([scale=l]) .button-padding--shrunk{--calcite-internal-button-padding-y-internal: 9px}:host([scale=s]) button:not(.content--slotted),:host([scale=s]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y-internal: 3px;inline-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:1.5rem}:host([scale=m]) button:not(.content--slotted),:host([scale=m]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y-internal: 7px;inline-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2rem}:host([scale=l]) button:not(.content--slotted),:host([scale=l]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y-internal: 9px;inline-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2.75rem}:host(:is([scale=s],[scale=m],[scale=l])[width=full]) a:not(.content--slotted),:host(:is([scale=s],[scale=m],[scale=l])[width=full]) button:not(.content--slotted){inline-size:var(--calcite-container-size-content-fluid)}:host([scale=l][appearance=transparent]) button:not(.content--slotted),:host([scale=l][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-y-internal: .625rem}:host([scale=s][icon-start][icon-end]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 23px;block-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=s][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 1.5rem}:host([scale=m][icon-start][icon-end]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2rem;block-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=m][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 33px}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 43px;block-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted) .icon--start+.icon--end,:host([scale=l][icon-start][icon-end]) a:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:1rem}:host([scale=l][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2.75rem}:host([hidden]){display:none}[hidden]{display:none}`,s=class extends h{constructor(){super(...arguments),this.attributeWatch=b(["aria-expanded"],this.handleGlobalAttributesChanged),this.contentEl=f(),this.mutationObserver=r("mutation",()=>this.updateHasContent()),this.resizeObserver=r("resize",()=>this.setTooltipText()),this.hasContent=!1,this.alignment="center",this.appearance="solid",this.disabled=!1,this.download=!1,this.kind="brand",this.loading=!1,this.messages=z(),this.round=!1,this.scale="m",this.splitChild=!1,this.type="button",this.width="auto"}static{this.properties={hasContent:16,tooltipText:16,alignment:3,appearance:3,disabled:7,download:[3,{converter:v}],form:3,href:3,iconEnd:3,iconFlipRtl:3,iconStart:3,kind:3,label:1,loading:7,messageOverrides:0,name:3,rel:3,round:7,scale:3,splitChild:3,target:3,type:3,width:3}}static{this.styles=P}async setFocus(){await x(this),this.childEl?.focus()}connectedCallback(){super.connectedCallback(),this.setupTextContentObserver(),$(this),this.formEl=T(this)}async load(){g()&&this.updateHasContent()}updated(){w(this)}loaded(){this.setTooltipText()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),C(this),this.resizeObserver?.disconnect(),this.formEl=null}handleGlobalAttributesChanged(){this.requestUpdate()}updateHasContent(){this.hasContent=m(this.el)}setupTextContentObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}onLabelClick(){this.handleClick(),this.setFocus()}handleClick(){let{type:t}=this;this.href||(t==="submit"?S(this):t==="reset"&&O(this))}setTooltipText(){let{contentEl:{value:t}}=this;t&&(this.tooltipText=t.offsetWidth<t.scrollWidth&&this.el.innerText||null)}setChildEl(t){this.childEl=t,t&&this.resizeObserver?.observe(t)}render(){let t=this.href?"a":"button",d=this.href?l`a`:l`button`,F=this.loading?o`<div class=${a(n.buttonLoader)}><calcite-loader class=${a(this.loading?n.loadingIn:n.loadingOut)} inline .label=${this.messages.loading} .scale=${this.scale==="l"?"m":"s"}></calcite-loader></div>`:null,u=!this.iconStart&&!this.iconEnd,L=o`<calcite-icon class=${a({[n.icon]:!0,[n.iconStart]:!0})} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${i(this.scale)}></calcite-icon>`,j=o`<calcite-icon class=${a({[n.icon]:!0,[n.iconEnd]:!0})} .flipRtl=${this.iconFlipRtl==="end"||this.iconFlipRtl==="both"} .icon=${this.iconEnd} .scale=${i(this.scale)}></calcite-icon>`,I=o`<span class=${a(n.content)} ${c(this.contentEl)}><slot></slot></span>`;return y({disabled:this.disabled,children:R`<${d} .ariaBusy=${this.loading} .ariaExpanded=${this.el.ariaExpanded?this.el.ariaExpanded:null} .ariaLabel=${this.loading?this.messages.loading:E(this)} aria-live=polite class=${a({[n.buttonPadding]:u,[n.buttonPaddingShrunk]:!u,[n.contentSlotted]:this.hasContent,[n.iconStartEmpty]:!this.iconStart,[n.iconEndEmpty]:!this.iconEnd})} .disabled=${t==="button"?this.disabled:null} download=${(t==="a"?this.download===!0||this.download===""?"":this.download||null:null)??e} href=${(t==="a"&&this.href)??e} name=${(t==="button"&&this.name)??e} @click=${this.handleClick} rel=${(t==="a"&&this.rel)??e} tabindex=${(this.disabled?-1:null)??e} target=${(t==="a"&&this.target)??e} title=${this.tooltipText??e} type=${(t==="button"?this.type:null)??e} ${c(this.setChildEl)}>${F}${this.iconStart?L:null}${this.hasContent?I:null}${this.iconEnd?j:null}</${d}>`})}};k("calcite-button",s);export{s as Button};
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{a as S,b as O,d as T}from"./DJU4LSIS.js";import{c as $,d as C,e as E}from"./HEVM6SRJ.js";import{b as l,c as R}from"./F52GIETG.js";import{a as w,b as y}from"./X6EDNQN2.js";import{a as i}from"./HMZA4X6S.js";import"./4GUL5QXY.js";import{a as r}from"./NPTN6OGZ.js";import{a as z}from"./RSI5VQHT.js";import{a as f,b as c}from"./QV6PXGLB.js";import{t as m}from"./NLK3OCCK.js";import{b as x}from"./6OPQR7PL.js";import"./OLP7ABVK.js";import{B as v,G as g,J as k,c as b,e as p,f as o,w as h,x as a,z as e}from"./D7X7U5LL.js";var n={buttonLoader:"calcite-button--loader",content:"content",contentSlotted:"content--slotted",icon:"icon",iconStart:"icon--start",iconEnd:"icon--end",loadingIn:"loading-in",loadingOut:"loading-out",iconStartEmpty:"icon-start-empty",iconEndEmpty:"icon-end-empty",buttonPadding:"button-padding",buttonPaddingShrunk:"button-padding--shrunk"},P=p`: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;inline-size:auto;vertical-align:middle;border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0))}:host a,:host button{--calcite-internal-button-content-margin: .5rem;--calcite-internal-button-padding-x: 7px;--calcite-internal-button-padding-y-internal: 3px;position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-user-select:none;user-select:none;appearance:none;align-items:center;justify-content:center;border-style:none;text-align:center;font-family:inherit;font-weight:var(--calcite-font-weight-normal);text-decoration-line:none;outline-color:transparent;background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color, var(--calcite-color-transparent)));border-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent)));border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0));color:var(--calcite-button-text-color, var(--calcite-internal-button-text-color, currentColor));padding-block:var(--calcite-internal-button-padding-y-internal);padding-inline:var(--calcite-internal-button-padding-x);transition:color var(--calcite-animation-timing) ease-in-out,background-color var(--calcite-animation-timing) ease-in-out,box-shadow var(--calcite-animation-timing) ease-in-out,outline-color var(--calcite-internal-animation-timing-fast) ease-in-out}:host a:hover,:host button:hover{text-decoration-line:none}:host a:focus,:host button:focus{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host a span,:host button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host a calcite-loader,:host button calcite-loader{color:var(--calcite-button-loader-color, var(--calcite-internal-button-loader-color, currentColor))}:host([round]){--calcite-internal-button-corner-radius: 50px}.content{margin-inline:var(--calcite-internal-button-content-margin)}.icon-start-empty .content{margin-inline-start:unset}.icon-end-empty .content{margin-inline-end:unset}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-content-margin: .75rem}:host([scale=l]) button,:host([scale=l]) a{--calcite-internal-button-content-margin: 1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([alignment=center]:not([width=auto])) a,:host([alignment=center]:not([width=auto])) button{justify-content:center}:host([alignment=start]:not([width=auto])) a,:host([alignment=start]:not([width=auto])) button{justify-content:flex-start}:host([alignment=end]:not([width=auto])) a,:host([alignment=end]:not([width=auto])) button{justify-content:flex-end}:host([alignment*=space-between]:not([width=auto])) a,:host([alignment*=space-between]:not([width=auto])) button{justify-content:space-between}:host([alignment=icon-start-space-between]:not([width=auto])) .icon--start{margin-inline-end:auto}:host([alignment=icon-start-space-between]:not([width=auto])) a,:host([alignment=icon-start-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-end-space-between]:not([width=auto])) .icon--end{margin-inline-start:auto}:host([alignment=icon-end-space-between]:not([width=auto])) a,:host([alignment=icon-end-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=center]) a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) button:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:var(--calcite-internal-button-content-margin)}.icon{position:relative;margin:0;display:inline-flex;font-weight:var(--calcite-font-weight-normal);line-height:inherit}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}@keyframes loader-in{0%{inline-size:0;opacity:0;transform:scale(.5)}to{inline-size:1em;opacity:1;transform:scale(1)}}@keyframes loader-out{0%{inline-size:1em;opacity:1;transform:scale(1)}to{inline-size:0;opacity:0;transform:scale(.5)}}.calcite-button--loader{display:flex}.calcite-button--loader calcite-loader{margin:0}:host([loading]) button.content--slotted .calcite-button--loader calcite-loader,:host([loading]) a.content--slotted .calcite-button--loader calcite-loader{margin-inline-end:var(--calcite-internal-button-content-margin)}:host([loading]) button:not(.content--slotted) .icon--start,:host([loading]) button:not(.content--slotted) .icon--end,:host([loading]) a:not(.content--slotted) .icon--start,:host([loading]) a:not(.content--slotted) .icon--end{display:none}:host([appearance]) button,:host([appearance]) a{--calcite-internal-button-border-color: var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([kind=brand]) button,:host([kind=brand]) a{--calcite-internal-button-text-color: var(--calcite-color-text-inverse);--calcite-internal-button-background-color: var(--calcite-color-brand)}:host([kind=brand]) button:hover,:host([kind=brand]) button:focus,:host([kind=brand]) a:hover,:host([kind=brand]) a:focus{--calcite-internal-button-background-color: var(--calcite-color-brand-hover)}:host([kind=brand]) button:active,:host([kind=brand]) a:active{--calcite-internal-button-background-color: var(--calcite-color-brand-press)}:host([kind=danger]) button,:host([kind=danger]) a{--calcite-internal-button-text-color: var(--calcite-color-text-inverse);--calcite-internal-button-background-color: var(--calcite-color-status-danger)}:host([kind=danger]) button:hover,:host([kind=danger]) button:focus,:host([kind=danger]) a:hover,:host([kind=danger]) a:focus{--calcite-internal-button-background-color: var(--calcite-color-status-danger-hover)}:host([kind=danger]) button:active,:host([kind=danger]) a:active{--calcite-internal-button-background-color: var(--calcite-color-status-danger-press)}:host([kind=neutral]) button,:host([kind=neutral]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-background-color: var(--calcite-color-foreground-3)}:host([kind=neutral]) button:hover,:host([kind=neutral]) button:focus,:host([kind=neutral]) a:hover,:host([kind=neutral]) a:focus{--calcite-internal-button-background-color: var(--calcite-color-foreground-2)}:host([kind=neutral]) button:active,:host([kind=neutral]) a:active{--calcite-internal-button-background-color: var(--calcite-color-foreground-1)}:host([kind=inverse]) button,:host([kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-inverse);--calcite-internal-button-background-color: var(--calcite-color-inverse)}:host([kind=inverse]) button:hover,:host([kind=inverse]) button:focus,:host([kind=inverse]) a:hover,:host([kind=inverse]) a:focus{--calcite-internal-button-background-color: var(--calcite-color-inverse-hover)}:host([kind=inverse]) button:active,:host([kind=inverse]) a:active{--calcite-internal-button-background-color: var(--calcite-color-inverse-press)}:host([appearance=outline-fill]) a,:host([appearance=outline-fill]) button,:host([appearance=outline]) a,:host([appearance=outline]) button{box-shadow:inset 0 0 0 1px var(--calcite-button-shadow-color, var(--calcite-internal-button-shadow-color, transparent))}:host([appearance=outline-fill]) a:hover,:host([appearance=outline-fill]) button:hover,:host([appearance=outline]) a:hover,:host([appearance=outline]) button:hover{box-shadow:inset 0 0 0 1px var(--calcite-button-shadow-color, var(--calcite-internal-button-shadow-color, var(--calcite-color-foreground-3)))}:host([appearance=outline-fill]) a:focus,:host([appearance=outline-fill]) a:active,:host([appearance=outline-fill]) button:focus,:host([appearance=outline-fill]) button:active,:host([appearance=outline]) a:focus,:host([appearance=outline]) a:active,:host([appearance=outline]) button:focus,:host([appearance=outline]) button:active{box-shadow:inset 0 0 0 2px var(--calcite-button-shadow-color, var(--calcite-internal-button-shadow-color, var(--calcite-color-foreground-3)))}:host([appearance=outline-fill]) button,:host([appearance=outline-fill]) a{--calcite-internal-button-background-color: var(--calcite-color-foreground-1);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline-fill][kind=brand]) button,:host([appearance=outline-fill][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-background-color: var(--calcite-color-foreground-1)}:host([appearance=outline-fill][kind=brand]) button:hover,:host([appearance=outline-fill][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover);--calcite-internal-button-shadow-color: var(--calcite-color-brand-hover)}:host([appearance=outline-fill][kind=brand]) button:focus,:host([appearance=outline-fill][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-shadow-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:active,:host([appearance=outline-fill][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press);--calcite-internal-button-shadow-color: var(--calcite-color-brand-press)}:host([appearance=outline-fill][kind=brand]) button calcite-loader,:host([appearance=outline-fill][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=danger]) button,:host([appearance=outline-fill][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-background-color: var(--calcite-color-foreground-1);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:hover,:host([appearance=outline-fill][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-shadow-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline-fill][kind=danger]) button:focus,:host([appearance=outline-fill][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-shadow-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:active,:host([appearance=outline-fill][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press);--calcite-internal-button-shadow-color: var(--calcite-color-status-danger-press)}:host([appearance=outline-fill][kind=danger]) button calcite-loader,:host([appearance=outline-fill][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=neutral]) button,:host([appearance=outline-fill][kind=neutral]) a{--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-background-color: var(--calcite-color-foreground-1)}:host([appearance=outline-fill][kind=neutral]) button:hover,:host([appearance=outline-fill][kind=neutral]) a:hover{--calcite-internal-button-shadow-color: var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:focus,:host([appearance=outline-fill][kind=neutral]) a:focus{--calcite-internal-button-shadow-color: var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:active,:host([appearance=outline-fill][kind=neutral]) a:active{--calcite-internal-button-shadow-color: var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=inverse]) button,:host([appearance=outline-fill][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-background-color: var(--calcite-color-foreground-1);--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline-fill][kind=inverse]) button:hover,:host([appearance=outline-fill][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover);--calcite-internal-button-shadow-color: var(--calcite-color-inverse-hover)}:host([appearance=outline-fill][kind=inverse]) button:focus,:host([appearance=outline-fill][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-shadow-color: var(--calcite-color-inverse)}:host([appearance=outline-fill][kind=inverse]) button:active,:host([appearance=outline-fill][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press);--calcite-internal-button-shadow-color: var(--calcite-color-inverse-press)}:host([appearance=outline]) button,:host([appearance=outline]) a{--calcite-internal-button-background-color: var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline][kind=brand]) button,:host([appearance=outline][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-background-color: var(--calcite-color-transparent)}:host([appearance=outline][kind=brand]) button:hover,:host([appearance=outline][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover);--calcite-internal-button-shadow-color: var(--calcite-color-brand-hover)}:host([appearance=outline][kind=brand]) button:focus,:host([appearance=outline][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-shadow-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:active,:host([appearance=outline][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press);--calcite-internal-button-shadow-color: var(--calcite-color-brand-press)}:host([appearance=outline][kind=brand]) button calcite-loader,:host([appearance=outline][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=danger]) button,:host([appearance=outline][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-background-color: var(--calcite-color-transparent)}:host([appearance=outline][kind=danger]) button:hover,:host([appearance=outline][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-shadow-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline][kind=danger]) button:focus,:host([appearance=outline][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-shadow-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:active,:host([appearance=outline][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press);--calcite-internal-button-shadow-color: var(--calcite-color-status-danger-press)}:host([appearance=outline][kind=danger]) button calcite-loader,:host([appearance=outline][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=neutral]) button,:host([appearance=outline][kind=neutral]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-background-color: var(--calcite-color-transparent);--calcite-internal-button-border-color: var(--calcite-color-border-1)}:host([appearance=outline][kind=neutral]) button:hover,:host([appearance=outline][kind=neutral]) a:hover{--calcite-internal-button-shadow-color: var(--calcite-color-foreground-3)}:host([appearance=outline][kind=neutral]) button:focus,:host([appearance=outline][kind=neutral]) a:focus{--calcite-internal-button-shadow-color: var(--calcite-color-foreground-3)}:host([appearance=outline][kind=neutral]) button:active,:host([appearance=outline][kind=neutral]) a:active{--calcite-internal-button-shadow-color: var(--calcite-color-foreground-3)}:host([appearance=outline][kind=inverse]) button,:host([appearance=outline][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-background-color: var(--calcite-color-transparent);--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline][kind=inverse]) button:hover,:host([appearance=outline][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover);--calcite-internal-button-shadow-color: var(--calcite-color-inverse-hover)}:host([appearance=outline][kind=inverse]) button:focus,:host([appearance=outline][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-shadow-color: var(--calcite-color-inverse)}:host([appearance=outline][kind=inverse]) button:active,:host([appearance=outline][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press);--calcite-internal-button-shadow-color: var(--calcite-color-inverse-press)}:host([appearance=outline-fill][split-child=primary]) button,:host([appearance=outline][split-child=primary]) button{border-inline-end-width:0;border-inline-start-width:1px}:host([appearance=outline-fill][split-child=secondary]) button,:host([appearance=outline][split-child=secondary]) button{border-inline-start-width:0;border-inline-end-width:1px}:host([appearance=transparent]:not(.enable-editing-button)) button,:host([appearance=transparent]:not(.enable-editing-button)) a{background-color:var(--calcite-color-transparent)}:host([appearance=transparent]:not(.enable-editing-button)) button:hover,:host([appearance=transparent]:not(.enable-editing-button)) button:focus,:host([appearance=transparent]:not(.enable-editing-button)) a:hover,:host([appearance=transparent]:not(.enable-editing-button)) a:focus{background-color:var(--calcite-color-transparent-hover)}:host([appearance=transparent]:not(.enable-editing-button)) button:active,:host([appearance=transparent]:not(.enable-editing-button)) a:active{background-color:var(--calcite-color-transparent-press)}:host([appearance=transparent][kind=brand]) button,:host([appearance=transparent][kind=brand]) a{--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:hover,:host([appearance=transparent][kind=brand]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=transparent][kind=brand]) button:focus,:host([appearance=transparent][kind=brand]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:active,:host([appearance=transparent][kind=brand]) a:active{--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=transparent][kind=brand]) button calcite-loader,:host([appearance=transparent][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=danger]) button,:host([appearance=transparent][kind=danger]) a{--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:hover,:host([appearance=transparent][kind=danger]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=transparent][kind=danger]) button:focus,:host([appearance=transparent][kind=danger]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:active,:host([appearance=transparent][kind=danger]) a:active{--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=transparent][kind=danger]) button calcite-loader,:host([appearance=transparent][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) button,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) a,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-1)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button{--calcite-internal-button-text-color: var(--calcite-color-text-3);border-block-start-width:1px;border-block-end-width:1px;color:var(--calcite-color-text-3);border-block-start-color:var(--calcite-color-border-input);border-block-end-color:var(--calcite-color-border-input);border-block-style:solid}:host([appearance=transparent][kind=neutral].cancel-editing-button) button:not(.content--slotted){--calcite-internal-button-padding-y-internal: 0}:host([appearance=transparent][kind=neutral].cancel-editing-button) button:hover{--calcite-internal-button-text-color: var(--calcite-color-text-1)}:host([appearance=transparent][kind=neutral].enable-editing-button) button{background-color:transparent}:host(.confirm-changes-button) button:focus,:host(.cancel-editing-button) button:focus,:host(.enable-editing-button) button:focus{outline-offset:-2px}:host([appearance=transparent][kind=inverse]) button,:host([appearance=transparent][kind=inverse]) a,:host([appearance=transparent][kind=inverse]) calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([scale=s]) button.content--slotted,:host([scale=s]) a.content--slotted{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s][appearance=transparent]) button.content--slotted,:host([scale=s][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .5rem}:host([scale=s]) button,:host([scale=s]) a{--calcite-internal-button-padding-y-internal: 3px}:host([scale=m]) button.content--slotted,:host([scale=m]) a.content--slotted{--calcite-internal-button-padding-x: 11px;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-padding-y-internal: 7px}:host([scale=m][appearance=transparent]) button.content--slotted,:host([scale=m][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .75rem}:host([scale=l]) button.content--slotted,:host([scale=l]) a.content--slotted{--calcite-internal-button-padding-x: 15px;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .button-padding{--calcite-internal-button-padding-x: 1rem;--calcite-internal-button-padding-y-internal: 11px}:host([scale=l]) .button-padding--shrunk{--calcite-internal-button-padding-y-internal: 9px}:host([scale=s]) button:not(.content--slotted),:host([scale=s]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y-internal: 3px;inline-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:1.5rem}:host([scale=m]) button:not(.content--slotted),:host([scale=m]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y-internal: 7px;inline-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2rem}:host([scale=l]) button:not(.content--slotted),:host([scale=l]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y-internal: 9px;inline-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2.75rem}:host(:is([scale=s],[scale=m],[scale=l])[width=full]) a:not(.content--slotted),:host(:is([scale=s],[scale=m],[scale=l])[width=full]) button:not(.content--slotted){inline-size:var(--calcite-container-size-content-fluid)}:host([scale=l][appearance=transparent]) button:not(.content--slotted),:host([scale=l][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-y-internal: .625rem}:host([scale=s][icon-start][icon-end]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 23px;block-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=s][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 1.5rem}:host([scale=m][icon-start][icon-end]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2rem;block-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=m][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 33px}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 43px;block-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted) .icon--start+.icon--end,:host([scale=l][icon-start][icon-end]) a:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:1rem}:host([scale=l][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2.75rem}:host([hidden]){display:none}[hidden]{display:none}`,s=class extends h{constructor(){super(...arguments),this.attributeWatch=b(["aria-expanded"],this.handleGlobalAttributesChanged),this.contentEl=f(),this.mutationObserver=r("mutation",()=>this.updateHasContent()),this.resizeObserver=r("resize",()=>this.setTooltipText()),this.hasContent=!1,this.alignment="center",this.appearance="solid",this.disabled=!1,this.download=!1,this.kind="brand",this.loading=!1,this.messages=z(),this.round=!1,this.scale="m",this.splitChild=!1,this.type="button",this.width="auto"}static{this.properties={hasContent:16,tooltipText:16,alignment:3,appearance:3,disabled:7,download:[3,{converter:v}],form:3,href:3,iconEnd:3,iconFlipRtl:3,iconStart:3,kind:3,label:1,loading:7,messageOverrides:0,name:3,rel:3,round:7,scale:3,splitChild:3,target:3,type:3,width:3}}static{this.styles=P}async setFocus(){await x(this),this.childEl?.focus()}connectedCallback(){super.connectedCallback(),this.setupTextContentObserver(),$(this),this.formEl=T(this)}async load(){g()&&this.updateHasContent()}updated(){w(this)}loaded(){this.setTooltipText()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),C(this),this.resizeObserver?.disconnect(),this.formEl=null}handleGlobalAttributesChanged(){this.requestUpdate()}updateHasContent(){this.hasContent=m(this.el)}setupTextContentObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}onLabelClick(){this.handleClick(),this.setFocus()}handleClick(){let{type:t}=this;this.href||(t==="submit"?S(this):t==="reset"&&O(this))}setTooltipText(){let{contentEl:{value:t}}=this;t&&(this.tooltipText=t.offsetWidth<t.scrollWidth&&this.el.innerText||null)}setChildEl(t){this.childEl=t,t&&this.resizeObserver?.observe(t)}render(){let t=this.href?"a":"button",d=this.href?l`a`:l`button`,F=this.loading?o`<div class=${a(n.buttonLoader)}><calcite-loader class=${a(this.loading?n.loadingIn:n.loadingOut)} inline .label=${this.messages.loading} .scale=${this.scale==="l"?"m":"s"}></calcite-loader></div>`:null,u=!this.iconStart&&!this.iconEnd,L=o`<calcite-icon class=${a({[n.icon]:!0,[n.iconStart]:!0})} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${i(this.scale)}></calcite-icon>`,j=o`<calcite-icon class=${a({[n.icon]:!0,[n.iconEnd]:!0})} .flipRtl=${this.iconFlipRtl==="end"||this.iconFlipRtl==="both"} .icon=${this.iconEnd} .scale=${i(this.scale)}></calcite-icon>`,I=o`<span class=${a(n.content)} ${c(this.contentEl)}><slot></slot></span>`;return y({disabled:this.disabled,children:R`<${d} .ariaBusy=${this.loading} .ariaExpanded=${this.el.ariaExpanded?this.el.ariaExpanded:null} .ariaLabel=${this.loading?this.messages.loading:E(this)} aria-live=polite class=${a({[n.buttonPadding]:u,[n.buttonPaddingShrunk]:!u,[n.contentSlotted]:this.hasContent,[n.iconStartEmpty]:!this.iconStart,[n.iconEndEmpty]:!this.iconEnd})} .disabled=${t==="button"?this.disabled:null} download=${(t==="a"?this.download===!0||this.download===""?"":this.download||null:null)??e} href=${(t==="a"&&this.href)??e} name=${(t==="button"&&this.name)??e} @click=${this.handleClick} rel=${(t==="a"&&this.rel)??e} tabindex=${(this.disabled?-1:null)??e} target=${(t==="a"&&this.target)??e} title=${this.tooltipText??e} type=${(t==="button"?this.type:null)??e} ${c(this.setChildEl)}>${F}${this.iconStart?L:null}${this.hasContent?I:null}${this.iconEnd?j:null}</${d}>`})}};k("calcite-button",s);export{s as Button};
|
|
@@ -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.0.
|
|
3
|
+
v3.0.1 */
|
|
4
4
|
var t={container:"container",actionsStart:"actions-start",contentStart:"content-start",content:"content",contentEnd:"content-end",actionsEnd:"actions-end"},n={actionsStart:"actions-start",contentStart:"content-start",contentEnd:"content-end",actionsEnd:"actions-end"};export{t as a,n as b};
|
|
@@ -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.0.
|
|
4
|
-
import{j as c,l as $,m as d,n as f,o as A}from"./
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{j as c,l as $,m as d,n as f,o as A}from"./D7X7U5LL.js";var o=(t,e)=>{let s=t._$AN;if(s===void 0)return!1;for(let i of s)i._$AO?.(e,!1),o(i,e);return!0},n=t=>{let e,s;do{if((e=t._$AM)===void 0)break;s=e._$AN,s.delete(t),t=e}while(s?.size===0)},v=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(s===void 0)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),m(e)}};function p(t){this._$AN!==void 0?(n(this),this._$AM=t,v(this)):this._$AM=t}function u(t,e=!1,s=0){let i=this._$AH,_=this._$AN;if(_!==void 0&&_.size!==0)if(e)if(Array.isArray(i))for(let h=s;h<i.length;h++)o(i[h],!1),n(i[h]);else i!=null&&(o(i,!1),n(i));else o(this,t)}var m=t=>{t.type==$.CHILD&&(t._$AP??=u,t._$AQ??=p)},r=class extends f{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,s,i){super._$AT(e,s,i),v(this),this.isConnected=e._$AU}_$AO(e,s=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),s&&(o(this,e),n(this))}setValue(e){if(A(this._$Ct))this._$Ct._$AI(e,this);else{let s=[...this._$Ct._$AH];s[this._$Ci]=e,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}};var T=()=>new l,l=class{},a=new WeakMap,w=d(class extends r{render(t){return c}update(t,[e]){let s=e!==this.Y;return s&&this.Y!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.Y=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),c}rt(t){if(this.isConnected||(t=void 0),typeof this.Y=="function"){let e=this.ht??globalThis,s=a.get(e);s===void 0&&(s=new WeakMap,a.set(e,s)),s.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),s.set(this.Y,t),t!==void 0&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){return typeof this.Y=="function"?a.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});export{T as a,w as b};
|
|
@@ -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.0.
|
|
4
|
-
import{b as e}from"./
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{b as e}from"./EB432BS5.js";import"./MCZED6UJ.js";var a={name:"lv",weekdays:"sv\u0113tdiena_pirmdiena_otrdiena_tre\u0161diena_ceturtdiena_piektdiena_sestdiena".split("_"),months:"janv\u0101ris_febru\u0101ris_marts_apr\u012Blis_maijs_j\u016Bnijs_j\u016Blijs_augusts_septembris_oktobris_novembris_decembris".split("_"),weekStart:1,weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),monthsShort:"jan_feb_mar_apr_mai_j\u016Bn_j\u016Bl_aug_sep_okt_nov_dec".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},relativeTime:{future:"p\u0113c %s",past:"pirms %s",s:"da\u017E\u0101m sekund\u0113m",m:"min\u016Btes",mm:"%d min\u016Bt\u0113m",h:"stundas",hh:"%d stund\u0101m",d:"dienas",dd:"%d dien\u0101m",M:"m\u0113ne\u0161a",MM:"%d m\u0113ne\u0161iem",y:"gada",yy:"%d gadiem"}};e.locale(a,null,!0);var i=a;export{i as default};
|
|
@@ -1,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.0.
|
|
4
|
-
import{b as p}from"./
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{b as p}from"./QV6PXGLB.js";import{v as m,w as u}from"./NLK3OCCK.js";import"./OLP7ABVK.js";import{J as b,e as c,f as n,w as h}from"./D7X7U5LL.js";var f={titleGroup:"title-group"},g=c`:host{display:flex;flex-direction:column}:host([bordered]){box-shadow:inset 0 1px 0 var(--calcite-color-border-1);background-color:var(--calcite-color-foreground-1)}:host([bordered]) section{border-width:1px;border-style:solid;border-color:var(--calcite-color-border-1)}:host([bordered][position=bottom]){box-shadow:inset 0 1px 0 var(--calcite-color-border-1),inset 0 -1px 0 var(--calcite-color-border-1)}:host([bordered]:not([position=bottom])) ::slotted(calcite-tab-nav){margin-block-end:-1px}:host([bordered][scale=s]) section{padding:.75rem}:host([bordered][scale=m]) section{padding:.5rem}:host([bordered][scale=l]) section{padding:1rem}:host([position=bottom]){flex-direction:column-reverse}section{display:flex;flex-grow:1;overflow:hidden;border-block-start-width:1px;border-block-start-color:var(--calcite-color-border-1);border-block-start-style:solid}:host([position=bottom]) section{flex-direction:column-reverse;border-block-start-width:0px;border-block-end-width:1px;border-block-end-color:var(--calcite-color-border-1)}:host([position=bottom]:not([bordered])) section{border-block-end-style:solid}@media (forced-colors: active){:host([bordered]) section{border-block-start-width:0px;border-block-end-width:1px}:host([position=bottom][bordered]) section{border-block-start-width:1px;border-block-end-width:0px}}:host([hidden]){display:none}[hidden]{display:none}`,d=class extends h{constructor(){super(),this.tabs=[],this.titles=[],this.bordered=!1,this.layout="inline",this.position="top",this.scale="m",this.listen("calciteInternalTabNavSlotChange",this.calciteInternalTabNavSlotChangeHandler)}static{this.properties={tabs:16,titles:16,bordered:5,layout:3,position:3,scale:3}}static{this.styles=g}connectedCallback(){super.connectedCallback(),this.updateItems()}load(){this.updateItems()}willUpdate(e){(e.has("position")&&(this.hasUpdated||this.position!=="top")||e.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.updateItems(),(e.has("titles")||e.has("tabs"))&&this.hasUpdated&&this.titles?.length>0&&this.tabs?.length>0&&(this.updateAriaSettings(),this.updateItems())}calciteInternalTabNavSlotChangeHandler(e){e.stopPropagation(),e.detail.length!==this.titles.length&&(this.titles=e.detail)}defaultSlotChangeHandler(e){this.tabs=m(e,"calcite-tab")}async updateAriaSettings(){await this.componentOnReady();let e,i,o=u(this.slotEl,"calcite-tab");if(o.some(t=>t.tab)||this.titles.some(t=>t.tab))e=o.sort((t,a)=>t.tab.localeCompare(a.tab)).map(t=>t.id),i=this.titles.sort((t,a)=>t.tab.localeCompare(a.tab)).map(t=>t.id);else{let t=await Promise.all(o.map(s=>s.getTabIndex())),a=await Promise.all(this.titles.map(s=>s.getTabIndex()));e=t.reduce((s,r,l)=>(s[r]=o[l].id,s),[]),i=a.reduce((s,r,l)=>(s[r]=this.titles[l].id,s),[])}o.forEach(t=>t._updateAriaInfo(e,i)),this.titles.forEach(t=>t._updateAriaInfo(e,i))}updateItems(){let{position:e,scale:i}=this,o=this.el.querySelector("calcite-tab-nav");o&&(o.position=e,o.scale=i),Array.from(this.el.querySelectorAll("calcite-tab")).forEach(t=>{t.parentElement===this.el&&(t.scale=i)}),Array.from(this.el.querySelectorAll("calcite-tab-nav > calcite-tab-title")).forEach(t=>{t.position=e,t.scale=i})}setDefaultSlotRef(e){this.slotEl=e}render(){return n`<slot name=${f.titleGroup}></slot><section><slot @slotchange=${this.defaultSlotChangeHandler} ${p(this.setDefaultSlotRef)}></slot></section>`}};b("calcite-tabs",d);export{d as Tabs};
|
|
@@ -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.0.
|
|
4
|
-
import{a as f,b as u}from"./
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{a as f,b as u}from"./FYCT4FES.js";import"./F52GIETG.js";import{a as g}from"./4GUL5QXY.js";import{a as h}from"./TTARWRVZ.js";import{a as p}from"./RSI5VQHT.js";import{u as m}from"./NLK3OCCK.js";import"./OLP7ABVK.js";import{J as d,e as r,f as i,v as l,w as c,x as a}from"./D7X7U5LL.js";var e={container:"container",header:"header",heading:"heading",close:"close",imageFrame:"image-frame",content:"content",info:"info",infoNoThumbnail:"info--no-thumbnail"},$={close:"x"},T={thumbnail:"thumbnail"},z=r`:host{position:relative;margin:1rem;box-sizing:border-box;display:flex;flex-direction:row;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-color-text-2)}:host *{box-sizing:border-box}.container{inline-size:100%;padding:1rem}:host([closed]),:host([closed]) .container{display:none}:host([selected]) .container{margin:0;border-style:none;padding:0}.header{margin:0;display:flex;align-content:space-between;align-items:center;fill:var(--calcite-color-text-2);color:var(--calcite-color-text-2)}.heading{margin:0;padding:0;font-weight:var(--calcite-font-weight-medium)}.header .heading{flex:1 1 auto;padding:.5rem}.header{margin-block-end:.5rem}.header .heading{padding:0;font-size:var(--calcite-font-size-0);line-height:1.25rem;color:var(--calcite-color-text-1)}.container[hidden]{display:none}.content{display:flex}.info{padding-block:0px;padding-inline:1rem;inline-size:70%}.info--no-thumbnail{inline-size:100%;padding-inline:0px}::slotted(p){margin-block-start:0px}::slotted(a){outline-color:transparent;color:var(--calcite-color-brand)}::slotted(a:focus){outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.image-frame{inline-size:25%}.image-frame img{max-inline-size:100%}::slotted(img){max-inline-size:100%}:host([hidden]){display:none}[hidden]{display:none}`,o=class extends c{constructor(){super(...arguments),this.hasThumbnail=!1,this.closeDisabled=!1,this.closed=!1,this.messages=p(),this.selected=!1,this.calciteTipDismiss=l({cancelable:!1})}static{this.properties={hasThumbnail:16,closeDisabled:7,closed:7,heading:1,headingLevel:11,messageOverrides:0,selected:7}}static{this.styles=z}async load(){g.deprecated("component",{name:"tip",removalVersion:4,suggested:["card","notice","panel","tile"]})}hideTip(){this.closed=!0,this.calciteTipDismiss.emit()}handleThumbnailSlotChange(n){this.hasThumbnail=m(n)}renderHeader(){let{heading:n,headingLevel:t,el:b}=this,s=b.closest("calcite-tip-manager")?.headingLevel,v=s?f(s+1):null,x=t||v;return n?i`<header class=${a(e.header)}>${u({class:e.heading,level:x,children:n})}</header>`:null}renderDismissButton(){let{closeDisabled:n,hideTip:t}=this;return n?null:i`<calcite-action class=${a(e.close)} .icon=${$.close} @click=${t} scale=l .text=${this.messages.close}></calcite-action>`}renderImageFrame(){return h("thumbnail",i`<div class=${a(e.imageFrame)} .hidden=${!this.hasThumbnail}><slot name=${T.thumbnail} @slotchange=${this.handleThumbnailSlotChange}></slot></div>`)}renderInfoNode(){return i`<div class=${a({[e.info]:!0,[e.infoNoThumbnail]:!this.hasThumbnail})}><slot></slot></div>`}renderContent(){return i`<div class=${a(e.content)}>${this.renderImageFrame()}${this.renderInfoNode()}</div>`}render(){return i`<article class=${a(e.container)}>${this.renderHeader()}${this.renderContent()}</article>${this.renderDismissButton()}`}};d("calcite-tip",o);export{o as Tip};
|
|
@@ -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.0.
|
|
4
|
-
import{b as _}from"./
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{b as _}from"./EB432BS5.js";import"./MCZED6UJ.js";var a={name:"en-ca",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ordinal:function(e){return e},formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}};_.locale(a,null,!0);var s=a;export{s as default};
|
|
@@ -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.0.
|
|
4
|
-
import{a as G}from"./
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{a as G}from"./NQPJICFQ.js";import{a as C,b as H,c as O,d as $,e as B,f as T}from"./S6SBHJIV.js";import{a as p}from"./NPTN6OGZ.js";import"./LWKIGIQ7.js";import{a as D}from"./RSI5VQHT.js";import"./QV6PXGLB.js";import"./TTPB5NUF.js";import{n as w,u,v as z}from"./NLK3OCCK.js";import{b as E}from"./6OPQR7PL.js";import"./OLP7ABVK.js";import{D as A,J as y,e as m,f as d,v,w as f,x}from"./D7X7U5LL.js";var P={actionGroupEnd:"action-group--end"},b={actionsEnd:"actions-end",bottomActions:"bottom-actions",expandTooltip:"expand-tooltip"},M=m`: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{pointer-events:auto;display:inline-flex;align-self:stretch;gap:var(--calcite-action-bar-items-space, 0)}:host([layout=vertical]){flex-direction:column}:host([layout=vertical]):host([overflow-actions-disabled]){overflow-y:auto}:host([layout=vertical]):host([expanded]){max-inline-size:var(--calcite-action-bar-expanded-max-width, auto)}:host([layout=vertical]) .action-group--end{margin-block-start:auto}:host([layout=vertical]) ::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm)}:host([layout=horizontal]){flex-direction:row}:host([layout=horizontal]):host([overflow-actions-disabled]){overflow-x:auto}:host([layout=horizontal]) .action-group--end{margin-inline-start:auto}:host([layout=horizontal]) ::slotted(calcite-action-group:not(:last-of-type)){border-inline-end-width:var(--calcite-border-width-sm)}.action-group--end{justify-content:flex-end}:host([hidden]){display:none}[hidden]{display:none}`,g=class extends f{constructor(){super(),this.mutationObserver=p("mutation",()=>this.mutationObserverHandler()),this.resize=G(({width:t,height:o})=>{let{el:e,expanded:l,expandDisabled:n,layout:i,overflowActionsDisabled:r,actionGroups:s}=this;if(r||i==="vertical"&&!o||i==="horizontal"&&!t)return;let a=O(e),c=n?a.length:a.length+1;this.updateGroups();let h=this.hasActionsEnd||this.hasBottomActions||!n?s.length+1:s.length,{actionHeight:L,actionWidth:S}=C(a),k=H({layout:i,actionCount:c,actionHeight:L,actionWidth:S,height:o,width:t,groupCount:h});$({actionGroups:s,expanded:l,overflowCount:k})},A.resize),this.resizeHandler=t=>{let{width:o,height:e}=t.contentRect;this.resize({width:o,height:e})},this.resizeObserver=p("resize",t=>this.resizeHandlerEntries(t)),this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionBarToggle.emit()},this.hasActionsEnd=!1,this.hasBottomActions=!1,this.expandDisabled=!1,this.expanded=!1,this.layout="vertical",this.messages=D(),this.overflowActionsDisabled=!1,this.overlayPositioning="absolute",this.scale="m",this.calciteActionBarToggle=v({cancelable:!1}),this.listen("calciteActionMenuOpen",this.actionMenuOpenHandler)}static{this.properties={expandTooltip:16,hasActionsEnd:16,hasBottomActions:16,actionsEndGroupLabel:1,expandDisabled:7,expanded:7,layout:3,messageOverrides:0,overflowActionsDisabled:7,overlayPositioning:3,position:3,scale:3}}static{this.styles=M}async overflowActions(){this.resize({width:this.el.clientWidth,height:this.el.clientHeight})}async setFocus(){await E(this),w(this.el)}connectedCallback(){super.connectedCallback(),this.updateGroups(),this.overflowActions(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.overflowActionsDisabledHandler(this.overflowActionsDisabled)}async load(){}willUpdate(t){t.has("expandDisabled")&&(this.hasUpdated||this.expandDisabled!==!1)&&this.overflowActions(),t.has("expanded")&&this.hasUpdated&&this.expandedHandler(),t.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&this.updateGroups(),t.has("overflowActionsDisabled")&&(this.hasUpdated||this.overflowActionsDisabled!==!1)&&this.overflowActionsDisabledHandler(this.overflowActionsDisabled)}loaded(){this.overflowActions()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect()}expandedHandler(){let{el:t,expanded:o}=this;B({el:t,expanded:o}),this.overflowActions()}overflowActionsDisabledHandler(t){if(t){this.resizeObserver?.disconnect();return}this.resizeObserver?.observe(this.el),this.overflowActions()}actionMenuOpenHandler(t){if(t.target.menuOpen){let o=t.composedPath();this.actionGroups?.forEach(e=>{o.includes(e)||(e.menuOpen=!1)})}}mutationObserverHandler(){this.updateGroups(),this.overflowActions()}resizeHandlerEntries(t){t.forEach(this.resizeHandler)}updateGroups(){let t=Array.from(this.el.querySelectorAll("calcite-action-group"));this.actionGroups=t,this.setGroupLayout(t)}setGroupLayout(t){t.forEach(o=>o.layout=this.layout)}handleDefaultSlotChange(){this.updateGroups()}handleActionsEndSlotChange(t){this.hasActionsEnd=u(t)}handleBottomActionsSlotChange(t){this.hasBottomActions=u(t)}handleTooltipSlotChange(t){let o=z(t).filter(e=>e?.matches("calcite-tooltip"));this.expandTooltip=o[0]}renderBottomActionGroup(){let{expanded:t,expandDisabled:o,el:e,position:l,toggleExpand:n,scale:i,layout:r,messages:s,actionsEndGroupLabel:a,overlayPositioning:c}=this,h=o?null:T({collapseLabel:s.collapseLabel,collapseText:s.collapse,el:e,expandLabel:s.expandLabel,expandText:s.expand,expanded:t,position:l,scale:i,toggle:n,tooltip:this.expandTooltip});return d`<calcite-action-group class=${x(P.actionGroupEnd)} .hidden=${this.expandDisabled&&!(this.hasActionsEnd||this.hasBottomActions)} .label=${a} .layout=${r} .overlayPositioning=${c} .scale=${i}><slot name=${b.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot><slot name=${b.bottomActions} @slotchange=${this.handleBottomActionsSlotChange}></slot><slot name=${b.expandTooltip} @slotchange=${this.handleTooltipSlotChange}></slot>${h}</calcite-action-group>`}render(){return d`<slot @slotchange=${this.handleDefaultSlotChange}></slot>${this.renderBottomActionGroup()}`}};y("calcite-action-bar",g);export{g as ActionBar};
|
|
@@ -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.0.
|
|
4
|
-
import{a as b}from"./QK2H5T7J.js";import{a as B}from"./VG7BJBFG.js";import"./L5FDXQMT.js";import{a as M,b as U}from"./LOZEGKG2.js";import{a as I}from"./SBZ6VJ75.js";import{a as H}from"./CNO6NFH5.js";import{a as W}from"./ARHYATTG.js";import{b as y}from"./QU33PBBI.js";import{B as L,e as F,v as A,z as g}from"./CMO3X257.js";import{b as E}from"./GN5CPLSJ.js";import{a as O}from"./I2OIH73C.js";import{J as z,e as P,f as d,j as r,v as h,w as S,x as s}from"./KVSCG5E3.js";var G=6e3,a={container:"container",containerOverlaid:"container--overlaid",containerEdged:"container--edged",itemContainer:"item-container",itemContainerForward:"item-container--forward",itemContainerBackward:"item-container--backward",pagination:"pagination",paginationItems:"pagination-items",paginationItem:"pagination-item",paginationItemIndividual:"pagination-item--individual",paginationItemVisible:"pagination-item--visible",paginationItemOutOfRange:"pagination-item--out-of-range",paginationItemSelected:"pagination-item--selected",paginationItemRangeEdge:"pagination-item--range-edge",pageNext:"page-next",pagePrevious:"page-previous",autoplayControl:"autoplay-control",autoplayProgress:"autoplay-progress"},p={chevronLeft:"chevron-left",chevronRight:"chevron-right",inactive:"bullet-point",active:"bullet-point-large",pause:"pause-f",play:"play-f"},v={medium:7,small:5,xsmall:3,xxsmall:1},Y=P`: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;inline-size:100%;--calcite-internal-internal-carousel-item-space: 1.5rem;--calcite-internal-internal-carousel-item-space-wide: 3.5rem;--calcite-internal-internal-carousel-item-background-color: var( --calcite-internal-carousel-item-background-color, var(--calcite-color-foreground-1) );--calcite-internal-internal-carousel-item-background-color-hover: var( --calcite-internal-carousel-item-background-color-hover, var(--calcite-color-foreground-2) );--calcite-internal-internal-carousel-item-background-color-active: var( --calcite-internal-carousel-item-background-color-active, var(--calcite-color-foreground-2) );--calcite-internal-internal-carousel-item-background-color-selected: var( --calcite-internal-carousel-item-background-color-selected, var(--calcite-color-foreground-1) );--calcite-internal-internal-carousel-item-icon-color-hover: var( --calcite-internal-carousel-item-icon-color-hover, var(--calcite-color-text-1) );--calcite-internal-internal-carousel-item-icon-color: var( --calcite-internal-carousel-item-icon-color, var(--calcite-color-border-1) );--calcite-internal-internal-carousel-item-icon-color-selected: var( --calcite-internal-carousel-item-icon-color-selected, var(--calcite-color-brand) );--calcite-internal-internal-carousel-control-color-hover: var( --calcite-internal-carousel-control-color-hover, var(--calcite-color-text-1) );--calcite-internal-internal-carousel-control-color: var( --calcite-internal-carousel-item-icon-color, var(--calcite-color-text-3) );--calcite-internal-internal-carousel-autoplay-progress-background-color: var( --calcite-internal-carousel-autoplay-progress-background-color, var(--calcite-color-border-3) );--calcite-internal-internal-carousel-autoplay-progress-fill-color: var( --calcite-internal-carousel-autoplay-progress-fill-color, var(--calcite-color-brand) )}.container{position:relative;display:flex;inline-size:100%;flex-direction:column;overflow:hidden;font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-color-text-2);outline-color:transparent}.container:focus{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.container--edged:not(.container--overlaid){padding-inline:var(--calcite-internal-internal-carousel-item-space-wide);inline-size:calc(100% - var(--calcite-internal-internal-carousel-item-space-wide) * 2)}.item-container{display:flex;flex:1 1 auto;align-items:flex-start;justify-content:center;overflow:auto;padding:.25rem;animation-name:none;animation-duration:var(--calcite-animation-timing)}.container--overlaid .item-container{padding:0}.item-container--forward{animation-name:item-forward}.item-container--backward{animation-name:item-backward}calcite-carousel-item:not([selected]){opacity:0}.pagination{margin:.75rem;display:flex;flex-direction:row;align-items:center;justify-content:center;inline-size:auto}.pagination-items{display:flex;flex-direction:row;align-items:center}.container--overlaid .pagination{position:absolute}.pagination-item.page-next,.pagination-item.page-previous{color:var(--calcite-internal-internal-carousel-control-color)}.pagination-item.page-next:hover,.pagination-item.page-previous:hover{color:var(--calcite-internal-internal-carousel-control-color-hover)}.container--edged .page-next,.container--edged .page-previous{block-size:3rem;inline-size:3rem;position:absolute;inset-block-start:50%;transform:translateY(-50%)}.container--edged .page-next{inset-inline-end:0}.container--edged .page-previous{inset-inline-start:0}.container--overlaid .pagination{inset-block-start:unset;inset-block-end:0;inset-inline:0}.pagination-item.autoplay-control{position:relative;color:var(--calcite-internal-internal-carousel-control-color);--calcite-progress-fill-color: var(--calcite-internal-internal-carousel-autoplay-progress-fill-color);--calcite-progress-background-color: var(--calcite-internal-internal-carousel-autoplay-progress-background-color)}.autoplay-control:focus .autoplay-progress{inset-block-end:4px;inset-inline:2px;inline-size:calc(100% - 4px)}.autoplay-progress{position:absolute;inset-block-end:2px;inset-inline:0;inline-size:100%}.pagination-item{margin:0;block-size:2rem;inline-size:2rem;cursor:pointer;align-items:center;border-style:none;background-color:transparent;outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;-webkit-appearance:none;display:flex;align-content:center;justify-content:center;--calcite-color-foreground-1: var(--calcite-internal-internal-carousel-item-background-color);color:var(--calcite-internal-internal-carousel-item-icon-color)}.pagination-item:hover{background-color:var(--calcite-internal-internal-carousel-item-background-color-hover);color:var(--calcite-internal-internal-carousel-item-icon-color-hover)}.pagination-item:focus{background-color:var(--calcite-internal-internal-carousel-item-background-color-active);outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.pagination-item:active{background-color:var(--calcite-internal-internal-carousel-item-background-color-active);color:var(--calcite-internal-internal-carousel-item-icon-color-hover)}.pagination-item calcite-icon{color:inherit;pointer-events:none}.pagination-item.pagination-item--selected{--calcite-color-foreground-1: var(--calcite-internal-internal-carousel-item-background-color-selected);--calcite-color-foreground-3: var(--calcite-internal-internal-carousel-item-background-color-selected);color:var(--calcite-internal-internal-carousel-item-icon-color-selected)}.pagination-item--individual{pointer-events:none;inline-size:0px;padding:0;opacity:0;visibility:hidden;transition:var(--calcite-animation-timing) ease-in-out inline-size,var(--calcite-animation-timing) ease-in-out padding,var(--calcite-animation-timing) ease-in-out opacity}.pagination-item--individual.pagination-item--visible{pointer-events:auto;inline-size:2rem;opacity:1;visibility:visible}.pagination-item--range-edge calcite-icon{scale:.75;transition:var(--calcite-animation-timing) ease-in-out scale}.container--overlaid .pagination-item{background-color:var(--calcite-internal-internal-carousel-item-background-color)}.container--overlaid .pagination-item:hover{background-color:var(--calcite-internal-internal-carousel-item-background-color-hover)}.container--overlaid .pagination-item:focus{background-color:var(--calcite-internal-internal-carousel-item-background-color-active)}.container--overlaid .pagination-item:active{background-color:var(--calcite-internal-internal-carousel-item-background-color-active)}@keyframes item-forward{0%{transform:translate3d(100px,0,0)}to{transform:translateZ(0)}}@keyframes item-backward{0%{transform:translate3d(-100px,0,0)}to{transform:translateZ(0)}}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,k=class extends S{constructor(){super(...arguments),this.autoplayHandler=()=>{this.clearIntervals(),this.slideDurationInterval=setInterval(this.timer,this.autoplayDuration/100)},this.containerId=`calcite-carousel-container-${O()}`,this.resizeHandler=({contentRect:{width:e}})=>{this.setMaxItemsToBreakpoint(e)},this.resizeObserver=H("resize",e=>e.forEach(this.resizeHandler)),this.slideDurationInterval=null,this.slideInterval=null,this.timer=()=>{let e=this.slideDurationRemaining;(!this.suspendedDueToFocus&&!this.suspendedDueToHover||this.userPreventsSuspend)&&(e<=.01?(e=1,this.direction="forward",this.nextItem(!1)):e=e-.01),e>0&&(this.slideDurationRemaining=e)},this.direction="standby",this.items=[],this.maxItems=v.xxsmall,this.playing=!1,this.slideDurationRemaining=1,this.suspendedDueToFocus=!1,this.suspendedDueToHover=!1,this.suspendedSlideDurationRemaining=1,this.userPreventsSuspend=!1,this.arrowType="inline",this.autoplay=!1,this.autoplayDuration=G,this.controlOverlay=!1,this.disabled=!1,this.messages=W(),this.calciteCarouselChange=h({cancelable:!1}),this.calciteCarouselPause=h({cancelable:!1}),this.calciteCarouselPlay=h({cancelable:!1}),this.calciteCarouselResume=h({cancelable:!1}),this.calciteCarouselStop=h({cancelable:!1})}static{this.properties={direction:16,items:16,maxItems:16,playing:16,selectedIndex:16,slideDurationRemaining:16,suspendedDueToFocus:16,suspendedDueToHover:16,suspendedSlideDurationRemaining:16,userPreventsSuspend:16,arrowType:3,autoplay:3,autoplayDuration:11,controlOverlay:7,disabled:7,label:1,messageOverrides:0,paused:5,selectedItem:0}}static{this.styles=Y}async play(){this.playing||this.autoplay!==""&&!this.autoplay&&this.autoplay!=="paused"||this.handlePlay(!0)}async setFocus(){await E(this),this.container?.focus()}async stop(){this.playing&&this.handlePause(!0)}connectedCallback(){super.connectedCallback(),this.resizeObserver?.observe(this.el)}async load(){(this.autoplay===""||this.autoplay)&&this.autoplay!=="paused"?this.handlePlay(!1):this.autoplay==="paused"&&(this.paused=!0)}willUpdate(e){e.has("autoplay")&&this.hasUpdated&&this.autoplayWatcher(this.autoplay),e.has("direction")&&(this.hasUpdated||this.direction!=="standby")&&this.directionWatcher(this.direction),e.has("playing")&&(this.hasUpdated||this.playing!==!1)&&(this.paused=!this.playing),(e.has("suspendedDueToFocus")&&(this.hasUpdated||this.suspendedDueToFocus!==!1)||e.has("suspendedDueToHover")&&(this.hasUpdated||this.suspendedDueToHover!==!1))&&this.suspendWatcher()}updated(){M(this)}loaded(){}disconnectedCallback(){super.disconnectedCallback(),this.clearIntervals(),this.resizeObserver?.disconnect()}autoplayWatcher(e){e||this.handlePause(!1)}async directionWatcher(e){e!=="standby"&&(await L(this.itemContainer,e==="forward"?"item-forward":"item-backward"),this.direction="standby")}suspendWatcher(){!this.suspendedDueToFocus&&!this.suspendedDueToHover?this.suspendEnd():this.suspendStart()}setMaxItemsToBreakpoint(e){if(e){if(e>=b.width.small){this.maxItems=v.medium;return}if(e>=b.width.xsmall){this.maxItems=v.small;return}if(e>=b.width.xxsmall){this.maxItems=v.xsmall;return}this.maxItems=v.xxsmall}}clearIntervals(){clearInterval(this.slideDurationInterval),clearInterval(this.slideInterval)}nextItem(e){this.playing&&e&&(this.playing=!1);let t=I(this.selectedIndex+1,this.items.length);this.setSelectedItem(t,e)}previousItem(){this.playing=!1;let e=I(Math.max(this.selectedIndex-1,-1),this.items.length);this.setSelectedItem(e,!0)}handlePlay(e){this.playing=!0,this.autoplayHandler(),this.slideInterval=setInterval(this.autoplayHandler,this.autoplayDuration),e&&this.calciteCarouselPlay.emit()}handlePause(e){this.playing=!1,this.clearIntervals(),this.slideDurationRemaining=1,this.suspendedSlideDurationRemaining=1,e&&this.calciteCarouselStop.emit()}suspendStart(){this.suspendedSlideDurationRemaining=this.slideDurationRemaining}suspendEnd(){this.slideDurationRemaining=this.suspendedSlideDurationRemaining}handleSlotChange(e){let t=A(e);if(t.length<1)return;let i=t.findIndex(c=>c.selected),l=i>-1?i:0;this.items=t,this.setSelectedItem(l,!1)}setSelectedItem(e,t){let i=this.selectedIndex;this.items.forEach((l,c)=>{let o=e===c;l.selected=o,o&&(this.selectedItem=l,this.selectedIndex=c)}),t&&(this.playing=!1,i!==this.selectedIndex&&this.calciteCarouselChange.emit())}handleArrowClick(e){let t=e.target.dataset.direction;this.playing&&this.handlePause(!0),t==="next"?(this.direction="forward",this.nextItem(!0)):t==="previous"&&(this.direction="backward",this.previousItem())}handleItemSelection(e){let t=e.target,i=parseInt(t.dataset.index);i!==this.selectedIndex&&(this.playing&&this.handlePause(!0),this.direction=i>this.selectedIndex?"forward":"backward",this.setSelectedItem(i,!0))}toggleRotation(){this.userPreventsSuspend=!0,this.playing?this.handlePause(!0):this.handlePlay(!0)}handleFocusIn(){let e=this.playing;e&&(this.suspendedDueToFocus=!0),(!this.suspendedDueToFocus||!this.suspendedDueToHover)&&e&&this.calciteCarouselPause.emit()}handleMouseIn(){let e=this.playing;e&&(this.suspendedDueToHover=!0),(!this.suspendedDueToFocus||!this.suspendedDueToHover)&&e&&this.calciteCarouselPause.emit()}handleMouseOut(e){let t=!this.el.contains(e.relatedTarget),i=this.playing;t&&i&&(this.suspendedDueToHover=!1),t&&i&&!this.suspendedDueToFocus&&(this.userPreventsSuspend=!1,this.calciteCarouselResume.emit())}handleFocusOut(e){let t=!e.composedPath().includes(e.relatedTarget),i=this.playing;t&&i&&(this.suspendedDueToFocus=!1),t&&i&&!this.suspendedDueToHover&&(this.userPreventsSuspend=!1,this.calciteCarouselResume.emit())}containerKeyDownHandler(e){if(e.target!==this.container)return;let t=this.items.length-1;switch(e.key){case" ":case"Enter":e.preventDefault(),(this.autoplay===""||this.autoplay||this.autoplay==="paused")&&this.toggleRotation();break;case"ArrowRight":e.preventDefault(),this.direction="forward",this.nextItem(!0);break;case"ArrowLeft":e.preventDefault(),this.direction="backward",this.previousItem();break;case"Home":if(e.preventDefault(),this.selectedIndex===0)return;this.direction="backward",this.setSelectedItem(0,!0);break;case"End":if(e.preventDefault(),this.selectedIndex===t)return;this.direction="forward",this.setSelectedItem(t,!0);break}}tabListKeyDownHandler(e){let t=Array(...this.tabList.querySelectorAll(`button:not(.${a.paginationItemOutOfRange})`)),i=e.target;switch(e.key){case"ArrowRight":g(t,i,"next");break;case"ArrowLeft":g(t,i,"previous");break;case"Home":e.preventDefault(),g(t,i,"first");break;case"End":e.preventDefault(),g(t,i,"last");break}}storeTabListRef(e){this.tabList=e}storeContainerRef(e){this.container=e}storeItemContainerRef(e){this.itemContainer=e}renderRotationControl(){let e=this.playing?this.messages.pause:this.messages.play,t=this.slideDurationRemaining*100;return d`<button .ariaLabel=${e} class=${s({[a.paginationItem]:!0,[a.autoplayControl]:!0})} @click=${this.toggleRotation} title=${e??r}><calcite-icon .icon=${this.playing?p.pause:p.play} scale=s></calcite-icon>${this.playing&&d`<calcite-progress class=${s(a.autoplayProgress)} .label=${this.messages.carouselItemProgress} .value=${t}></calcite-progress>`||""}</button>`}renderPaginationArea(){return d`<div class=${s({[a.pagination]:!0,[a.containerOverlaid]:this.controlOverlay})} @keydown=${this.tabListKeyDownHandler} ${y(this.storeTabListRef)}>${(this.playing||this.autoplay===""||this.autoplay||this.autoplay==="paused")&&this.renderRotationControl()||""}${this.arrowType==="inline"&&this.renderArrow("previous")||""}${this.renderPaginationItems()}${this.arrowType==="inline"&&this.renderArrow("next")||""}</div>`}renderPaginationItems(){let{selectedIndex:e,maxItems:t,items:i,label:l,handleItemSelection:c}=this;return d`<div .ariaLabel=${l} class=${s(a.paginationItems)} role=tablist>${B(i,o=>o.id,(o,n)=>{let m=i.length,u=n===e,K=n===0,j=n===m-1,x=m-t-1,f=e<t,w=e>=x,D=f?0:e-Math.floor(t/2),N=w?m:D+t,$=f?0:w?x:D,C=f?t+1:N,V=!K&&!j&&!u&&(n===$-1||n===C),R=u||n<=C&&n>=$-1,T=m-1<=t,q=u?p.active:p.inactive;return d`<button aria-controls=${(u?void 0:o.id)??r} .ariaSelected=${u} class=${s({[a.paginationItem]:!0,[a.paginationItemIndividual]:!0,[a.paginationItemSelected]:u,[a.paginationItemRangeEdge]:m-1>t&&V,[a.paginationItemOutOfRange]:!(T||R),[a.paginationItemVisible]:T||R})} data-index=${n??r} @click=${c} role=tab title=${o.label??r}><calcite-icon .icon=${q} scale=l></calcite-icon></button>`})}</div>`}renderArrow(e){let t=e==="previous",i=F(this.el),l=this.arrowType==="edge"?"m":"s",c=t?a.pagePrevious:a.pageNext,o=t?this.messages.previous:this.messages.next,n=t?p.chevronLeft:p.chevronRight;return d`<button aria-controls=${this.containerId??r} class=${s({[a.paginationItem]:!0,[c]:!0})} data-direction=${e??r} @click=${this.handleArrowClick} title=${o??r}><calcite-icon .flipRtl=${i==="rtl"} .icon=${n} .scale=${l}></calcite-icon></button>`}render(){let{direction:e}=this;return U({disabled:this.disabled,children:d`<div .ariaLabel=${this.label} .ariaLive=${this.playing?"off":"polite"} .ariaRoleDescription=${this.messages.carousel} class=${s({[a.container]:!0,[a.containerOverlaid]:this.controlOverlay,[a.containerEdged]:this.arrowType==="edge"})} @focusin=${this.handleFocusIn} @focusout=${this.handleFocusOut} @keydown=${this.containerKeyDownHandler} @mouseenter=${this.handleMouseIn} @mouseleave=${this.handleMouseOut} role=group tabindex=0 ${y(this.storeContainerRef)}><section class=${s({[a.itemContainer]:!0,[a.itemContainerForward]:e==="forward",[a.itemContainerBackward]:e==="backward"})} id=${this.containerId??r} ${y(this.storeItemContainerRef)}><slot @slotchange=${this.handleSlotChange}></slot></section>${this.items.length>1&&this.renderPaginationArea()||""}${this.arrowType==="edge"&&this.renderArrow("previous")||""}${this.arrowType==="edge"&&this.renderArrow("next")||""}</div>`})}};z("calcite-carousel",k);export{k as Carousel};
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{a as b}from"./3LOOBSHJ.js";import{a as B}from"./HPFCIR5F.js";import"./LWAXFXVK.js";import{a as M,b as U}from"./X6EDNQN2.js";import{a as I}from"./PA6PSCEP.js";import{a as H}from"./NPTN6OGZ.js";import{a as W}from"./RSI5VQHT.js";import{b as y}from"./QV6PXGLB.js";import{B as L,e as F,v as A,z as g}from"./NLK3OCCK.js";import{b as E}from"./6OPQR7PL.js";import{a as O}from"./OLP7ABVK.js";import{J as z,e as P,f as d,j as r,v as h,w as S,x as s}from"./D7X7U5LL.js";var G=6e3,a={container:"container",containerOverlaid:"container--overlaid",containerEdged:"container--edged",itemContainer:"item-container",itemContainerForward:"item-container--forward",itemContainerBackward:"item-container--backward",pagination:"pagination",paginationItems:"pagination-items",paginationItem:"pagination-item",paginationItemIndividual:"pagination-item--individual",paginationItemVisible:"pagination-item--visible",paginationItemOutOfRange:"pagination-item--out-of-range",paginationItemSelected:"pagination-item--selected",paginationItemRangeEdge:"pagination-item--range-edge",pageNext:"page-next",pagePrevious:"page-previous",autoplayControl:"autoplay-control",autoplayProgress:"autoplay-progress"},p={chevronLeft:"chevron-left",chevronRight:"chevron-right",inactive:"bullet-point",active:"bullet-point-large",pause:"pause-f",play:"play-f"},v={medium:7,small:5,xsmall:3,xxsmall:1},Y=P`: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;inline-size:100%;--calcite-internal-internal-carousel-item-space: 1.5rem;--calcite-internal-internal-carousel-item-space-wide: 3.5rem;--calcite-internal-internal-carousel-item-background-color: var( --calcite-internal-carousel-item-background-color, var(--calcite-color-foreground-1) );--calcite-internal-internal-carousel-item-background-color-hover: var( --calcite-internal-carousel-item-background-color-hover, var(--calcite-color-foreground-2) );--calcite-internal-internal-carousel-item-background-color-active: var( --calcite-internal-carousel-item-background-color-active, var(--calcite-color-foreground-2) );--calcite-internal-internal-carousel-item-background-color-selected: var( --calcite-internal-carousel-item-background-color-selected, var(--calcite-color-foreground-1) );--calcite-internal-internal-carousel-item-icon-color-hover: var( --calcite-internal-carousel-item-icon-color-hover, var(--calcite-color-text-1) );--calcite-internal-internal-carousel-item-icon-color: var( --calcite-internal-carousel-item-icon-color, var(--calcite-color-border-1) );--calcite-internal-internal-carousel-item-icon-color-selected: var( --calcite-internal-carousel-item-icon-color-selected, var(--calcite-color-brand) );--calcite-internal-internal-carousel-control-color-hover: var( --calcite-internal-carousel-control-color-hover, var(--calcite-color-text-1) );--calcite-internal-internal-carousel-control-color: var( --calcite-internal-carousel-item-icon-color, var(--calcite-color-text-3) );--calcite-internal-internal-carousel-autoplay-progress-background-color: var( --calcite-internal-carousel-autoplay-progress-background-color, var(--calcite-color-border-3) );--calcite-internal-internal-carousel-autoplay-progress-fill-color: var( --calcite-internal-carousel-autoplay-progress-fill-color, var(--calcite-color-brand) )}.container{position:relative;display:flex;inline-size:100%;flex-direction:column;overflow:hidden;font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-color-text-2);outline-color:transparent}.container:focus{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.container--edged:not(.container--overlaid){padding-inline:var(--calcite-internal-internal-carousel-item-space-wide);inline-size:calc(100% - var(--calcite-internal-internal-carousel-item-space-wide) * 2)}.item-container{display:flex;flex:1 1 auto;align-items:flex-start;justify-content:center;overflow:auto;padding:.25rem;animation-name:none;animation-duration:var(--calcite-animation-timing)}.container--overlaid .item-container{padding:0}.item-container--forward{animation-name:item-forward}.item-container--backward{animation-name:item-backward}calcite-carousel-item:not([selected]){opacity:0}.pagination{margin:.75rem;display:flex;flex-direction:row;align-items:center;justify-content:center;inline-size:auto}.pagination-items{display:flex;flex-direction:row;align-items:center}.container--overlaid .pagination{position:absolute}.pagination-item.page-next,.pagination-item.page-previous{color:var(--calcite-internal-internal-carousel-control-color)}.pagination-item.page-next:hover,.pagination-item.page-previous:hover{color:var(--calcite-internal-internal-carousel-control-color-hover)}.container--edged .page-next,.container--edged .page-previous{block-size:3rem;inline-size:3rem;position:absolute;inset-block-start:50%;transform:translateY(-50%)}.container--edged .page-next{inset-inline-end:0}.container--edged .page-previous{inset-inline-start:0}.container--overlaid .pagination{inset-block-start:unset;inset-block-end:0;inset-inline:0}.pagination-item.autoplay-control{position:relative;color:var(--calcite-internal-internal-carousel-control-color);--calcite-progress-fill-color: var(--calcite-internal-internal-carousel-autoplay-progress-fill-color);--calcite-progress-background-color: var(--calcite-internal-internal-carousel-autoplay-progress-background-color)}.autoplay-control:focus .autoplay-progress{inset-block-end:4px;inset-inline:2px;inline-size:calc(100% - 4px)}.autoplay-progress{position:absolute;inset-block-end:2px;inset-inline:0;inline-size:100%}.pagination-item{margin:0;block-size:2rem;inline-size:2rem;cursor:pointer;align-items:center;border-style:none;background-color:transparent;outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;-webkit-appearance:none;display:flex;align-content:center;justify-content:center;--calcite-color-foreground-1: var(--calcite-internal-internal-carousel-item-background-color);color:var(--calcite-internal-internal-carousel-item-icon-color)}.pagination-item:hover{background-color:var(--calcite-internal-internal-carousel-item-background-color-hover);color:var(--calcite-internal-internal-carousel-item-icon-color-hover)}.pagination-item:focus{background-color:var(--calcite-internal-internal-carousel-item-background-color-active);outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.pagination-item:active{background-color:var(--calcite-internal-internal-carousel-item-background-color-active);color:var(--calcite-internal-internal-carousel-item-icon-color-hover)}.pagination-item calcite-icon{color:inherit;pointer-events:none}.pagination-item.pagination-item--selected{--calcite-color-foreground-1: var(--calcite-internal-internal-carousel-item-background-color-selected);--calcite-color-foreground-3: var(--calcite-internal-internal-carousel-item-background-color-selected);color:var(--calcite-internal-internal-carousel-item-icon-color-selected)}.pagination-item--individual{pointer-events:none;inline-size:0px;padding:0;opacity:0;visibility:hidden;transition:var(--calcite-animation-timing) ease-in-out inline-size,var(--calcite-animation-timing) ease-in-out padding,var(--calcite-animation-timing) ease-in-out opacity}.pagination-item--individual.pagination-item--visible{pointer-events:auto;inline-size:2rem;opacity:1;visibility:visible}.pagination-item--range-edge calcite-icon{scale:.75;transition:var(--calcite-animation-timing) ease-in-out scale}.container--overlaid .pagination-item{background-color:var(--calcite-internal-internal-carousel-item-background-color)}.container--overlaid .pagination-item:hover{background-color:var(--calcite-internal-internal-carousel-item-background-color-hover)}.container--overlaid .pagination-item:focus{background-color:var(--calcite-internal-internal-carousel-item-background-color-active)}.container--overlaid .pagination-item:active{background-color:var(--calcite-internal-internal-carousel-item-background-color-active)}@keyframes item-forward{0%{transform:translate3d(100px,0,0)}to{transform:translateZ(0)}}@keyframes item-backward{0%{transform:translate3d(-100px,0,0)}to{transform:translateZ(0)}}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,k=class extends S{constructor(){super(...arguments),this.autoplayHandler=()=>{this.clearIntervals(),this.slideDurationInterval=setInterval(this.timer,this.autoplayDuration/100)},this.containerId=`calcite-carousel-container-${O()}`,this.resizeHandler=({contentRect:{width:e}})=>{this.setMaxItemsToBreakpoint(e)},this.resizeObserver=H("resize",e=>e.forEach(this.resizeHandler)),this.slideDurationInterval=null,this.slideInterval=null,this.timer=()=>{let e=this.slideDurationRemaining;(!this.suspendedDueToFocus&&!this.suspendedDueToHover||this.userPreventsSuspend)&&(e<=.01?(e=1,this.direction="forward",this.nextItem(!1)):e=e-.01),e>0&&(this.slideDurationRemaining=e)},this.direction="standby",this.items=[],this.maxItems=v.xxsmall,this.playing=!1,this.slideDurationRemaining=1,this.suspendedDueToFocus=!1,this.suspendedDueToHover=!1,this.suspendedSlideDurationRemaining=1,this.userPreventsSuspend=!1,this.arrowType="inline",this.autoplay=!1,this.autoplayDuration=G,this.controlOverlay=!1,this.disabled=!1,this.messages=W(),this.calciteCarouselChange=h({cancelable:!1}),this.calciteCarouselPause=h({cancelable:!1}),this.calciteCarouselPlay=h({cancelable:!1}),this.calciteCarouselResume=h({cancelable:!1}),this.calciteCarouselStop=h({cancelable:!1})}static{this.properties={direction:16,items:16,maxItems:16,playing:16,selectedIndex:16,slideDurationRemaining:16,suspendedDueToFocus:16,suspendedDueToHover:16,suspendedSlideDurationRemaining:16,userPreventsSuspend:16,arrowType:3,autoplay:3,autoplayDuration:11,controlOverlay:7,disabled:7,label:1,messageOverrides:0,paused:5,selectedItem:0}}static{this.styles=Y}async play(){this.playing||this.autoplay!==""&&!this.autoplay&&this.autoplay!=="paused"||this.handlePlay(!0)}async setFocus(){await E(this),this.container?.focus()}async stop(){this.playing&&this.handlePause(!0)}connectedCallback(){super.connectedCallback(),this.resizeObserver?.observe(this.el)}async load(){(this.autoplay===""||this.autoplay)&&this.autoplay!=="paused"?this.handlePlay(!1):this.autoplay==="paused"&&(this.paused=!0)}willUpdate(e){e.has("autoplay")&&this.hasUpdated&&this.autoplayWatcher(this.autoplay),e.has("direction")&&(this.hasUpdated||this.direction!=="standby")&&this.directionWatcher(this.direction),e.has("playing")&&(this.hasUpdated||this.playing!==!1)&&(this.paused=!this.playing),(e.has("suspendedDueToFocus")&&(this.hasUpdated||this.suspendedDueToFocus!==!1)||e.has("suspendedDueToHover")&&(this.hasUpdated||this.suspendedDueToHover!==!1))&&this.suspendWatcher()}updated(){M(this)}loaded(){}disconnectedCallback(){super.disconnectedCallback(),this.clearIntervals(),this.resizeObserver?.disconnect()}autoplayWatcher(e){e||this.handlePause(!1)}async directionWatcher(e){e!=="standby"&&(await L(this.itemContainer,e==="forward"?"item-forward":"item-backward"),this.direction="standby")}suspendWatcher(){!this.suspendedDueToFocus&&!this.suspendedDueToHover?this.suspendEnd():this.suspendStart()}setMaxItemsToBreakpoint(e){if(e){if(e>=b.width.small){this.maxItems=v.medium;return}if(e>=b.width.xsmall){this.maxItems=v.small;return}if(e>=b.width.xxsmall){this.maxItems=v.xsmall;return}this.maxItems=v.xxsmall}}clearIntervals(){clearInterval(this.slideDurationInterval),clearInterval(this.slideInterval)}nextItem(e){this.playing&&e&&(this.playing=!1);let t=I(this.selectedIndex+1,this.items.length);this.setSelectedItem(t,e)}previousItem(){this.playing=!1;let e=I(Math.max(this.selectedIndex-1,-1),this.items.length);this.setSelectedItem(e,!0)}handlePlay(e){this.playing=!0,this.autoplayHandler(),this.slideInterval=setInterval(this.autoplayHandler,this.autoplayDuration),e&&this.calciteCarouselPlay.emit()}handlePause(e){this.playing=!1,this.clearIntervals(),this.slideDurationRemaining=1,this.suspendedSlideDurationRemaining=1,e&&this.calciteCarouselStop.emit()}suspendStart(){this.suspendedSlideDurationRemaining=this.slideDurationRemaining}suspendEnd(){this.slideDurationRemaining=this.suspendedSlideDurationRemaining}handleSlotChange(e){let t=A(e);if(t.length<1)return;let i=t.findIndex(c=>c.selected),l=i>-1?i:0;this.items=t,this.setSelectedItem(l,!1)}setSelectedItem(e,t){let i=this.selectedIndex;this.items.forEach((l,c)=>{let o=e===c;l.selected=o,o&&(this.selectedItem=l,this.selectedIndex=c)}),t&&(this.playing=!1,i!==this.selectedIndex&&this.calciteCarouselChange.emit())}handleArrowClick(e){let t=e.target.dataset.direction;this.playing&&this.handlePause(!0),t==="next"?(this.direction="forward",this.nextItem(!0)):t==="previous"&&(this.direction="backward",this.previousItem())}handleItemSelection(e){let t=e.target,i=parseInt(t.dataset.index);i!==this.selectedIndex&&(this.playing&&this.handlePause(!0),this.direction=i>this.selectedIndex?"forward":"backward",this.setSelectedItem(i,!0))}toggleRotation(){this.userPreventsSuspend=!0,this.playing?this.handlePause(!0):this.handlePlay(!0)}handleFocusIn(){let e=this.playing;e&&(this.suspendedDueToFocus=!0),(!this.suspendedDueToFocus||!this.suspendedDueToHover)&&e&&this.calciteCarouselPause.emit()}handleMouseIn(){let e=this.playing;e&&(this.suspendedDueToHover=!0),(!this.suspendedDueToFocus||!this.suspendedDueToHover)&&e&&this.calciteCarouselPause.emit()}handleMouseOut(e){let t=!this.el.contains(e.relatedTarget),i=this.playing;t&&i&&(this.suspendedDueToHover=!1),t&&i&&!this.suspendedDueToFocus&&(this.userPreventsSuspend=!1,this.calciteCarouselResume.emit())}handleFocusOut(e){let t=!e.composedPath().includes(e.relatedTarget),i=this.playing;t&&i&&(this.suspendedDueToFocus=!1),t&&i&&!this.suspendedDueToHover&&(this.userPreventsSuspend=!1,this.calciteCarouselResume.emit())}containerKeyDownHandler(e){if(e.target!==this.container)return;let t=this.items.length-1;switch(e.key){case" ":case"Enter":e.preventDefault(),(this.autoplay===""||this.autoplay||this.autoplay==="paused")&&this.toggleRotation();break;case"ArrowRight":e.preventDefault(),this.direction="forward",this.nextItem(!0);break;case"ArrowLeft":e.preventDefault(),this.direction="backward",this.previousItem();break;case"Home":if(e.preventDefault(),this.selectedIndex===0)return;this.direction="backward",this.setSelectedItem(0,!0);break;case"End":if(e.preventDefault(),this.selectedIndex===t)return;this.direction="forward",this.setSelectedItem(t,!0);break}}tabListKeyDownHandler(e){let t=Array(...this.tabList.querySelectorAll(`button:not(.${a.paginationItemOutOfRange})`)),i=e.target;switch(e.key){case"ArrowRight":g(t,i,"next");break;case"ArrowLeft":g(t,i,"previous");break;case"Home":e.preventDefault(),g(t,i,"first");break;case"End":e.preventDefault(),g(t,i,"last");break}}storeTabListRef(e){this.tabList=e}storeContainerRef(e){this.container=e}storeItemContainerRef(e){this.itemContainer=e}renderRotationControl(){let e=this.playing?this.messages.pause:this.messages.play,t=this.slideDurationRemaining*100;return d`<button .ariaLabel=${e} class=${s({[a.paginationItem]:!0,[a.autoplayControl]:!0})} @click=${this.toggleRotation} title=${e??r}><calcite-icon .icon=${this.playing?p.pause:p.play} scale=s></calcite-icon>${this.playing&&d`<calcite-progress class=${s(a.autoplayProgress)} .label=${this.messages.carouselItemProgress} .value=${t}></calcite-progress>`||""}</button>`}renderPaginationArea(){return d`<div class=${s({[a.pagination]:!0,[a.containerOverlaid]:this.controlOverlay})} @keydown=${this.tabListKeyDownHandler} ${y(this.storeTabListRef)}>${(this.playing||this.autoplay===""||this.autoplay||this.autoplay==="paused")&&this.renderRotationControl()||""}${this.arrowType==="inline"&&this.renderArrow("previous")||""}${this.renderPaginationItems()}${this.arrowType==="inline"&&this.renderArrow("next")||""}</div>`}renderPaginationItems(){let{selectedIndex:e,maxItems:t,items:i,label:l,handleItemSelection:c}=this;return d`<div .ariaLabel=${l} class=${s(a.paginationItems)} role=tablist>${B(i,o=>o.id,(o,n)=>{let m=i.length,u=n===e,K=n===0,j=n===m-1,x=m-t-1,f=e<t,w=e>=x,D=f?0:e-Math.floor(t/2),N=w?m:D+t,$=f?0:w?x:D,C=f?t+1:N,V=!K&&!j&&!u&&(n===$-1||n===C),R=u||n<=C&&n>=$-1,T=m-1<=t,q=u?p.active:p.inactive;return d`<button aria-controls=${(u?void 0:o.id)??r} .ariaSelected=${u} class=${s({[a.paginationItem]:!0,[a.paginationItemIndividual]:!0,[a.paginationItemSelected]:u,[a.paginationItemRangeEdge]:m-1>t&&V,[a.paginationItemOutOfRange]:!(T||R),[a.paginationItemVisible]:T||R})} data-index=${n??r} @click=${c} role=tab title=${o.label??r}><calcite-icon .icon=${q} scale=l></calcite-icon></button>`})}</div>`}renderArrow(e){let t=e==="previous",i=F(this.el),l=this.arrowType==="edge"?"m":"s",c=t?a.pagePrevious:a.pageNext,o=t?this.messages.previous:this.messages.next,n=t?p.chevronLeft:p.chevronRight;return d`<button aria-controls=${this.containerId??r} class=${s({[a.paginationItem]:!0,[c]:!0})} data-direction=${e??r} @click=${this.handleArrowClick} title=${o??r}><calcite-icon .flipRtl=${i==="rtl"} .icon=${n} .scale=${l}></calcite-icon></button>`}render(){let{direction:e}=this;return U({disabled:this.disabled,children:d`<div .ariaLabel=${this.label} .ariaLive=${this.playing?"off":"polite"} .ariaRoleDescription=${this.messages.carousel} class=${s({[a.container]:!0,[a.containerOverlaid]:this.controlOverlay,[a.containerEdged]:this.arrowType==="edge"})} @focusin=${this.handleFocusIn} @focusout=${this.handleFocusOut} @keydown=${this.containerKeyDownHandler} @mouseenter=${this.handleMouseIn} @mouseleave=${this.handleMouseOut} role=group tabindex=0 ${y(this.storeContainerRef)}><section class=${s({[a.itemContainer]:!0,[a.itemContainerForward]:e==="forward",[a.itemContainerBackward]:e==="backward"})} id=${this.containerId??r} ${y(this.storeItemContainerRef)}><slot @slotchange=${this.handleSlotChange}></slot></section>${this.items.length>1&&this.renderPaginationArea()||""}${this.arrowType==="edge"&&this.renderArrow("previous")||""}${this.arrowType==="edge"&&this.renderArrow("next")||""}</div>`})}};z("calcite-carousel",k);export{k as Carousel};
|
|
@@ -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.0.
|
|
4
|
-
import{a}from"./
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{a}from"./MCZED6UJ.js";export{a as default};
|
|
@@ -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.0.
|
|
4
|
-
import{b as e}from"./
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{b as e}from"./EB432BS5.js";import"./MCZED6UJ.js";var _={name:"id",weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),weekStart:1,formats:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},ordinal:function(a){return a+"."}};e.locale(_,null,!0);var i=_;export{i as default};
|
|
@@ -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.0.
|
|
4
|
-
import{K as r,d as o}from"./
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{K as r,d as o}from"./D7X7U5LL.js";var s=o(r);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.0.
|
|
4
|
-
import{a as R}from"./N2BVYYYP.js";import{a as D}from"./VG7BJBFG.js";import{a as H,c as M,e as S,f as L,h as U}from"./DTL2LM6T.js";import{c as B,d as F}from"./G3LH75CQ.js";import{a as v,c as b,e as P,g as p,h as V}from"./V4JZRN7T.js";import"./PT2XMADA.js";import{a as z}from"./SMUXJLDL.js";import{a as A,b as E}from"./LOZEGKG2.js";import{a as T,b as O}from"./NWVCPRVB.js";import{a as g}from"./CNO6NFH5.js";import{a as w}from"./ARHYATTG.js";import{b as d}from"./QU33PBBI.js";import{u as f}from"./CMO3X257.js";import{a as k}from"./I2OIH73C.js";import{B as m,J as C,c as I,e as $,f as u,j as o,v as c,w as y,x as r}from"./KVSCG5E3.js";var q=$`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}.input-container{position:relative;display:flex;flex:1 1 auto;flex-wrap:nowrap}.input{width:100%;--calcite-input-prefix-size: var(--calcite-autocomplete-input-prefix-size);--calcite-input-suffix-size: var(--calcite-autocomplete-input-suffix-size);--calcite-input-background-color: var(--calcite-autocomplete-input-background-color);--calcite-input-border-color: var(--calcite-autocomplete-input-border-color);--calcite-input-corner-radius: var(--calcite-autocomplete-input-corner-radius);--calcite-input-shadow: var(--calcite-autocomplete-input-shadow);--calcite-input-icon-color: var(--calcite-autocomplete-input-icon-color);--calcite-input-text-color: var(--calcite-autocomplete-input-text-color);--calcite-input-placeholder-text-color: var(--calcite-autocomplete-input-placeholder-text-color);--calcite-input-actions-background-color: var(--calcite-autocomplete-input-actions-background-color);--calcite-input-actions-background-color-hover: var(--calcite-autocomplete-input-actions-background-color-hover);--calcite-input-actions-background-color-press: var(--calcite-autocomplete-input-actions-background-color-press);--calcite-input-actions-icon-color: var(--calcite-autocomplete-input-actions-icon-color);--calcite-input-actions-icon-color-hover: var(--calcite-autocomplete-input-actions-icon-color-hover);--calcite-input-actions-icon-color-press: var(--calcite-autocomplete-input-actions-icon-color-press);--calcite-input-loading-background-color: var(--calcite-autocomplete-input-loading-background-color);--calcite-input-loading-fill-color: var(--calcite-autocomplete-input-loading-fill-color);--calcite-input-prefix-background-color: var(--calcite-autocomplete-input-prefix-background-color);--calcite-input-prefix-text-color: var(--calcite-autocomplete-input-prefix-text-color);--calcite-input-suffix-background-color: var(--calcite-autocomplete-input-suffix-background-color);--calcite-input-suffix-text-color: var(--calcite-autocomplete-input-suffix-text-color)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.content-container{box-sizing:border-box;width:100%}.floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown);inline-size:max-content;display:none;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);transition-property:inset,left,opacity;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}.content-container .calcite-floating-ui-anim{max-height:45vh;width:100%;overflow-y:auto;color:var(--calcite-autocomplete-text-color, var(--calcite-color-text-1));background-color:var(--calcite-autocomplete-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-autocomplete-corner-radius, var(--calcite-corner-radius-round))}.content--hidden{display:none}@media (forced-colors: active){.floating-ui-container--active{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,G={contentBottom:"content-bottom",contentTop:"content-top"},l={inputContainer:"input-container",input:"input",contentContainer:"content-container",contentAnimation:"content-animation",content:"content",contentHidden:"content--hidden",floatingUIContainer:"floating-ui-container",floatingUIContainerActive:"floating-ui-container--active",screenReadersOnly:"screen-readers-only"},W={validationMessage:"autocompleteValidationMessage"},K="calcite-autocomplete-item-group",J="calcite-autocomplete-item",x=class extends y{constructor(){super(),this.guid=k(),this.attributeWatch=I(["autofocus","enterkeyhint","inputmode"],this.handleGlobalAttributesChanged),this.inputId=`autocomplete-input-${this.guid}`,this.listId=`autocomplete-list-${this.guid}`,this.messages=w(),this.transitionProp="opacity",this.activeDescendant="",this.activeIndex=-1,this.hasContentBottom=!1,this.hasContentTop=!1,this.items=[],this.groups=[],this.alignment="start",this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.open=!1,this.overlayPositioning="absolute",this.placement=v,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.value="",this.calciteAutocompleteBeforeClose=c({cancelable:!1}),this.calciteAutocompleteBeforeOpen=c({cancelable:!1}),this.calciteAutocompleteChange=c({cancelable:!1}),this.calciteAutocompleteClose=c({cancelable:!1}),this.calciteAutocompleteOpen=c({cancelable:!1}),this.calciteAutocompleteTextChange=c({cancelable:!1}),this.calciteAutocompleteTextInput=c({cancelable:!1}),this.mutationObserver=g("mutation",()=>this.getAllItemsDebounced()),this.resizeObserver=g("resize",()=>{this.setFloatingElSize()}),this.getAllItemsDebounced=T(this.getAllItems,0),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteInternalAutocompleteItemSelect",this.handleInternalAutocompleteItemSelect)}static{this.properties={activeDescendant:16,activeIndex:16,hasContentBottom:16,hasContentTop:16,items:16,groups:16,isOpen:16,enabledItems:16,alignment:3,autocomplete:0,disabled:7,flipPlacements:0,form:3,icon:[3,{converter:m}],iconFlipRtl:7,inputValue:1,label:1,loading:7,maxLength:11,messageOverrides:0,minLength:11,name:3,open:7,overlayPositioning:3,pattern:1,placeholder:1,placement:3,prefixText:1,readOnly:7,required:7,scale:3,status:3,suffixText:1,validationIcon:[3,{converter:m}],validationMessage:1,validity:0,value:1}}static{this.styles=q}get isOpen(){return this.open&&(this.hasContentTop||this.hasContentBottom||this.items.length>0)}get enabledItems(){return this.items.filter(t=>!t.disabled)}async reposition(t=!1){let{floatingEl:e,referenceEl:s,placement:i,overlayPositioning:n,flipPlacements:a}=this;return P(this,{floatingEl:e,referenceEl:s,overlayPositioning:n,placement:i,flipPlacements:a,type:"menu"},t)}async scrollContentTo(t){this.transitionEl?.scrollTo(t)}async selectText(){return this.referenceEl.selectText()}async setFocus(){return this.referenceEl.setFocus()}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),B(this),M(this),this.defaultInputValue=this.inputValue||"",this.getAllItemsDebounced(),p(this)}async load(){this.getAllItemsDebounced()}willUpdate(t){t.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),t.has("flipPlacements")&&this.reposition(!0),t.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),t.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")&&this.reposition(!0),t.has("placement")&&(this.hasUpdated||this.placement!==v)&&this.reposition(!0);let e=!1;t.has("inputValue")&&(this.hasUpdated||this.inputValue)&&(this.inputValueMatchPattern=this.inputValue&&new RegExp(`(${O(this.inputValue)})`,"i"),this.updateItems(),this.updateGroups(),e=!0),!e&&t.has("scale")&&(this.hasUpdated||this.scale!=="m")&&(this.updateItems(),this.updateGroups(),e=!0),!e&&t.has("activeIndex")&&(this.hasUpdated||this.activeIndex!==-1)&&this.updateItems()}updated(){A(this)}loaded(){L(this,this.value||""),this.defaultInputValue=this.inputValue||"",p(this)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),F(this),S(this),V(this)}setFloatingElSize(){let{referenceEl:t,floatingEl:e}=this;!t||!e||(e.style.inlineSize=`${t.clientWidth}px`)}handleGlobalAttributesChanged(){this.requestUpdate()}handleDisabledChange(t){t||(this.open=!1)}openHandler(){if(z(this),this.open||(this.activeIndex=-1),this.disabled){this.open=!1;return}this.setFloatingElSize(),this.reposition(!0)}async documentClickHandler(t){this.disabled||t.composedPath().includes(this.el)||(this.open=!1)}async handleInternalAutocompleteItemSelect(t){this.value=t.target.value,t.stopPropagation(),this.emitChange(),await this.setFocus(),this.open=!1}onLabelClick(){this.setFocus()}onFormReset(){this.inputValue=this.defaultInputValue}onBeforeOpen(){this.calciteAutocompleteBeforeOpen.emit()}onOpen(){this.calciteAutocompleteOpen.emit()}onBeforeClose(){this.calciteAutocompleteBeforeClose.emit()}onClose(){this.calciteAutocompleteClose.emit()}emitChange(){this.calciteAutocompleteChange.emit()}updateGroups(){this.groups.forEach((t,e,s)=>{t.scale=this.scale,e===0&&(t.disableSpacing=!0);let i=s[e+1];i&&(i.disableSpacing=t.children.length===0)})}updateItems(){let t=null;this.items.forEach(e=>{e.scale=this.scale,e.inputValueMatchPattern=this.inputValueMatchPattern}),this.enabledItems.forEach((e,s)=>{let i=s===this.activeIndex;i&&(t=e.guid),e.active=i}),this.activeDescendant=t}handleInputFocus(){this.open=!0}handleContentTopSlotChange(t){this.hasContentTop=f(t)}handleContentBottomSlotChange(t){this.hasContentBottom=f(t)}getAllItems(){let{el:t}=this;this.groups=Array.from(t.querySelectorAll(K)),this.items=Array.from(t.querySelectorAll(J)),this.updateItems(),this.updateGroups()}setReferenceEl(t){this.referenceEl=t,t&&(this.resizeObserver?.observe(t),p(this))}keyDownHandler(t){let{defaultPrevented:e,key:s}=t;if(e)return;let{open:i,activeIndex:n,enabledItems:a}=this,h=a.length&&n>-1?a[n]:null;switch(s){case"Escape":i&&(this.open=!1,t.preventDefault());break;case"Tab":this.open=!1;break;case"Enter":i&&h?(this.value=h.value,this.emitChange(),this.open=!1,t.preventDefault()):t.defaultPrevented||H(this)&&t.preventDefault();break;case"ArrowDown":a.length&&(this.open=!0,this.activeIndex=n!==-1?Math.min(n+1,a.length-1):0,this.scrollToActiveItem(),t.preventDefault());break;case"ArrowUp":a.length&&(this.open=!0,this.activeIndex=n!==-1?Math.max(n-1,0):a.length-1,this.scrollToActiveItem(),t.preventDefault());break;case"Home":a.length&&(this.open=!0,this.activeIndex=0,this.scrollToActiveItem(),t.preventDefault());break;case"End":a.length&&(this.open=!0,this.activeIndex=a.length-1,this.scrollToActiveItem(),t.preventDefault());break}}scrollToActiveItem(){this.enabledItems[this.activeIndex]?.scrollIntoView({block:"nearest"})}changeHandler(t){t.stopPropagation(),this.inputValue=t.target.value,this.calciteAutocompleteTextChange.emit()}inputClickHandler(t){t.defaultPrevented||(this.open=!0)}inputHandler(t){t.stopPropagation(),this.inputValue=t.target.value,this.calciteAutocompleteTextInput.emit()}setFloatingEl(t){this.floatingEl=t,p(this)}setTransitionEl(t){this.transitionEl=t}render(){let{disabled:t,listId:e,inputId:s,isOpen:i}=this,n=this.el.autofocus,a=this.el.enterKeyHint,h=this.el.inputMode;return E({disabled:t,children:u`<div class=${r(l.inputContainer)}><calcite-input .alignment=${this.alignment} aria-activedescendant=${this.activeDescendant??o} aria-controls=${e??o} aria-owns=${e??o} aria-autocomplete=list .ariaExpanded=${i} aria-haspopup=listbox .autocomplete=${this.autocomplete} .autofocus=${n} class=${r(l.input)} clearable .disabled=${t} enterkeyhint=${a??o} .form=${this.form} .icon=${this.icon??!0} .iconFlipRtl=${this.iconFlipRtl} id=${s??o} inputmode=${h??o} .label=${this.label} .loading=${this.loading} .maxLength=${this.maxLength} .messageOverrides=${this.messages} .minLength=${this.minLength} .name=${this.name} @click=${this.inputClickHandler} @keydown=${this.keyDownHandler} @calciteInputChange=${this.changeHandler} @calciteInputInput=${this.inputHandler} @calciteInternalInputFocus=${this.handleInputFocus} .pattern=${this.pattern} .placeholder=${this.placeholder} .prefixText=${this.prefixText} .readOnly=${this.readOnly} role=combobox .scale=${this.scale} .status=${this.status} .suffixText=${this.suffixText} type=search .value=${this.inputValue} ${d(this.setReferenceEl)}></calcite-input>${this.renderListBox()}<div class=${r({[l.contentContainer]:!0,[l.floatingUIContainer]:!0,[l.floatingUIContainerActive]:i})} ${d(this.setFloatingEl)}><div class=${r({[l.contentAnimation]:!0,[b.animation]:!0,[b.animationActive]:i})} ${d(this.setTransitionEl)}><div class=${r({[l.content]:!0,[l.contentHidden]:!i})}><slot name=${G.contentTop} @slotchange=${this.handleContentTopSlotChange}></slot><slot aria-hidden=true></slot><slot name=${G.contentBottom} @slotchange=${this.handleContentBottomSlotChange}></slot></div></div></div></div>${U({component:this})}${this.validationMessage&&this.status==="invalid"?R({icon:this.validationIcon,id:W.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderListBox(){return u`<ul aria-labelledby=${this.inputId??o} class=${r(l.screenReadersOnly)} id=${this.listId??o} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>`}renderListBoxOptions(){return D(this.items.filter(t=>!!(t.label||t.heading)),t=>t.guid,t=>u`<li .ariaDisabled=${t.disabled} .ariaLabel=${t.label} id=${t.guid??o} role=option tabindex=-1>${t.heading}${t.description}</li>`)}};C("calcite-autocomplete",x);export{x as Autocomplete};
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{a as R}from"./DYHX5C6J.js";import{a as D}from"./HPFCIR5F.js";import{a as H,c as M,e as S,f as L,h as U}from"./DJU4LSIS.js";import{c as B,d as F}from"./HEVM6SRJ.js";import{a as v,c as b,e as P,g as p,h as V}from"./IBLJGOPM.js";import"./7NLQECEF.js";import{a as z}from"./YUYVD6B5.js";import{a as A,b as E}from"./X6EDNQN2.js";import{a as T,b as O}from"./NQPJICFQ.js";import{a as g}from"./NPTN6OGZ.js";import{a as w}from"./RSI5VQHT.js";import{b as d}from"./QV6PXGLB.js";import{u as f}from"./NLK3OCCK.js";import{a as k}from"./OLP7ABVK.js";import{B as m,J as C,c as I,e as $,f as u,j as o,v as c,w as y,x as r}from"./D7X7U5LL.js";var q=$`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}.input-container{position:relative;display:flex;flex:1 1 auto;flex-wrap:nowrap}.input{width:100%;--calcite-input-prefix-size: var(--calcite-autocomplete-input-prefix-size);--calcite-input-suffix-size: var(--calcite-autocomplete-input-suffix-size);--calcite-input-background-color: var(--calcite-autocomplete-input-background-color);--calcite-input-border-color: var(--calcite-autocomplete-input-border-color);--calcite-input-corner-radius: var(--calcite-autocomplete-input-corner-radius);--calcite-input-shadow: var(--calcite-autocomplete-input-shadow);--calcite-input-icon-color: var(--calcite-autocomplete-input-icon-color);--calcite-input-text-color: var(--calcite-autocomplete-input-text-color);--calcite-input-placeholder-text-color: var(--calcite-autocomplete-input-placeholder-text-color);--calcite-input-actions-background-color: var(--calcite-autocomplete-input-actions-background-color);--calcite-input-actions-background-color-hover: var(--calcite-autocomplete-input-actions-background-color-hover);--calcite-input-actions-background-color-press: var(--calcite-autocomplete-input-actions-background-color-press);--calcite-input-actions-icon-color: var(--calcite-autocomplete-input-actions-icon-color);--calcite-input-actions-icon-color-hover: var(--calcite-autocomplete-input-actions-icon-color-hover);--calcite-input-actions-icon-color-press: var(--calcite-autocomplete-input-actions-icon-color-press);--calcite-input-loading-background-color: var(--calcite-autocomplete-input-loading-background-color);--calcite-input-loading-fill-color: var(--calcite-autocomplete-input-loading-fill-color);--calcite-input-prefix-background-color: var(--calcite-autocomplete-input-prefix-background-color);--calcite-input-prefix-text-color: var(--calcite-autocomplete-input-prefix-text-color);--calcite-input-suffix-background-color: var(--calcite-autocomplete-input-suffix-background-color);--calcite-input-suffix-text-color: var(--calcite-autocomplete-input-suffix-text-color)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.content-container{box-sizing:border-box;width:100%}.floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown);inline-size:max-content;display:none;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);transition-property:inset,left,opacity;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}.content-container .calcite-floating-ui-anim{max-height:45vh;width:100%;overflow-y:auto;color:var(--calcite-autocomplete-text-color, var(--calcite-color-text-1));background-color:var(--calcite-autocomplete-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-autocomplete-corner-radius, var(--calcite-corner-radius-round))}.content--hidden{display:none}@media (forced-colors: active){.floating-ui-container--active{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,G={contentBottom:"content-bottom",contentTop:"content-top"},l={inputContainer:"input-container",input:"input",contentContainer:"content-container",contentAnimation:"content-animation",content:"content",contentHidden:"content--hidden",floatingUIContainer:"floating-ui-container",floatingUIContainerActive:"floating-ui-container--active",screenReadersOnly:"screen-readers-only"},W={validationMessage:"autocompleteValidationMessage"},K="calcite-autocomplete-item-group",J="calcite-autocomplete-item",x=class extends y{constructor(){super(),this.guid=k(),this.attributeWatch=I(["autofocus","enterkeyhint","inputmode"],this.handleGlobalAttributesChanged),this.inputId=`autocomplete-input-${this.guid}`,this.listId=`autocomplete-list-${this.guid}`,this.messages=w(),this.transitionProp="opacity",this.activeDescendant="",this.activeIndex=-1,this.hasContentBottom=!1,this.hasContentTop=!1,this.items=[],this.groups=[],this.alignment="start",this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.open=!1,this.overlayPositioning="absolute",this.placement=v,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.value="",this.calciteAutocompleteBeforeClose=c({cancelable:!1}),this.calciteAutocompleteBeforeOpen=c({cancelable:!1}),this.calciteAutocompleteChange=c({cancelable:!1}),this.calciteAutocompleteClose=c({cancelable:!1}),this.calciteAutocompleteOpen=c({cancelable:!1}),this.calciteAutocompleteTextChange=c({cancelable:!1}),this.calciteAutocompleteTextInput=c({cancelable:!1}),this.mutationObserver=g("mutation",()=>this.getAllItemsDebounced()),this.resizeObserver=g("resize",()=>{this.setFloatingElSize()}),this.getAllItemsDebounced=T(this.getAllItems,0),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteInternalAutocompleteItemSelect",this.handleInternalAutocompleteItemSelect)}static{this.properties={activeDescendant:16,activeIndex:16,hasContentBottom:16,hasContentTop:16,items:16,groups:16,isOpen:16,enabledItems:16,alignment:3,autocomplete:0,disabled:7,flipPlacements:0,form:3,icon:[3,{converter:m}],iconFlipRtl:7,inputValue:1,label:1,loading:7,maxLength:11,messageOverrides:0,minLength:11,name:3,open:7,overlayPositioning:3,pattern:1,placeholder:1,placement:3,prefixText:1,readOnly:7,required:7,scale:3,status:3,suffixText:1,validationIcon:[3,{converter:m}],validationMessage:1,validity:0,value:1}}static{this.styles=q}get isOpen(){return this.open&&(this.hasContentTop||this.hasContentBottom||this.items.length>0)}get enabledItems(){return this.items.filter(t=>!t.disabled)}async reposition(t=!1){let{floatingEl:e,referenceEl:s,placement:i,overlayPositioning:n,flipPlacements:a}=this;return P(this,{floatingEl:e,referenceEl:s,overlayPositioning:n,placement:i,flipPlacements:a,type:"menu"},t)}async scrollContentTo(t){this.transitionEl?.scrollTo(t)}async selectText(){return this.referenceEl.selectText()}async setFocus(){return this.referenceEl.setFocus()}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),B(this),M(this),this.defaultInputValue=this.inputValue||"",this.getAllItemsDebounced(),p(this)}async load(){this.getAllItemsDebounced()}willUpdate(t){t.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),t.has("flipPlacements")&&this.reposition(!0),t.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),t.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")&&this.reposition(!0),t.has("placement")&&(this.hasUpdated||this.placement!==v)&&this.reposition(!0);let e=!1;t.has("inputValue")&&(this.hasUpdated||this.inputValue)&&(this.inputValueMatchPattern=this.inputValue&&new RegExp(`(${O(this.inputValue)})`,"i"),this.updateItems(),this.updateGroups(),e=!0),!e&&t.has("scale")&&(this.hasUpdated||this.scale!=="m")&&(this.updateItems(),this.updateGroups(),e=!0),!e&&t.has("activeIndex")&&(this.hasUpdated||this.activeIndex!==-1)&&this.updateItems()}updated(){A(this)}loaded(){L(this,this.value||""),this.defaultInputValue=this.inputValue||"",p(this)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),F(this),S(this),V(this)}setFloatingElSize(){let{referenceEl:t,floatingEl:e}=this;!t||!e||(e.style.inlineSize=`${t.clientWidth}px`)}handleGlobalAttributesChanged(){this.requestUpdate()}handleDisabledChange(t){t||(this.open=!1)}openHandler(){if(z(this),this.open||(this.activeIndex=-1),this.disabled){this.open=!1;return}this.setFloatingElSize(),this.reposition(!0)}async documentClickHandler(t){this.disabled||t.composedPath().includes(this.el)||(this.open=!1)}async handleInternalAutocompleteItemSelect(t){this.value=t.target.value,t.stopPropagation(),this.emitChange(),await this.setFocus(),this.open=!1}onLabelClick(){this.setFocus()}onFormReset(){this.inputValue=this.defaultInputValue}onBeforeOpen(){this.calciteAutocompleteBeforeOpen.emit()}onOpen(){this.calciteAutocompleteOpen.emit()}onBeforeClose(){this.calciteAutocompleteBeforeClose.emit()}onClose(){this.calciteAutocompleteClose.emit()}emitChange(){this.calciteAutocompleteChange.emit()}updateGroups(){this.groups.forEach((t,e,s)=>{t.scale=this.scale,e===0&&(t.disableSpacing=!0);let i=s[e+1];i&&(i.disableSpacing=t.children.length===0)})}updateItems(){let t=null;this.items.forEach(e=>{e.scale=this.scale,e.inputValueMatchPattern=this.inputValueMatchPattern}),this.enabledItems.forEach((e,s)=>{let i=s===this.activeIndex;i&&(t=e.guid),e.active=i}),this.activeDescendant=t}handleInputFocus(){this.open=!0}handleContentTopSlotChange(t){this.hasContentTop=f(t)}handleContentBottomSlotChange(t){this.hasContentBottom=f(t)}getAllItems(){let{el:t}=this;this.groups=Array.from(t.querySelectorAll(K)),this.items=Array.from(t.querySelectorAll(J)),this.updateItems(),this.updateGroups()}setReferenceEl(t){this.referenceEl=t,t&&(this.resizeObserver?.observe(t),p(this))}keyDownHandler(t){let{defaultPrevented:e,key:s}=t;if(e)return;let{open:i,activeIndex:n,enabledItems:a}=this,h=a.length&&n>-1?a[n]:null;switch(s){case"Escape":i&&(this.open=!1,t.preventDefault());break;case"Tab":this.open=!1;break;case"Enter":i&&h?(this.value=h.value,this.emitChange(),this.open=!1,t.preventDefault()):t.defaultPrevented||H(this)&&t.preventDefault();break;case"ArrowDown":a.length&&(this.open=!0,this.activeIndex=n!==-1?Math.min(n+1,a.length-1):0,this.scrollToActiveItem(),t.preventDefault());break;case"ArrowUp":a.length&&(this.open=!0,this.activeIndex=n!==-1?Math.max(n-1,0):a.length-1,this.scrollToActiveItem(),t.preventDefault());break;case"Home":a.length&&(this.open=!0,this.activeIndex=0,this.scrollToActiveItem(),t.preventDefault());break;case"End":a.length&&(this.open=!0,this.activeIndex=a.length-1,this.scrollToActiveItem(),t.preventDefault());break}}scrollToActiveItem(){this.enabledItems[this.activeIndex]?.scrollIntoView({block:"nearest"})}changeHandler(t){t.stopPropagation(),this.inputValue=t.target.value,this.calciteAutocompleteTextChange.emit()}inputClickHandler(t){t.defaultPrevented||(this.open=!0)}inputHandler(t){t.stopPropagation(),this.inputValue=t.target.value,this.calciteAutocompleteTextInput.emit()}setFloatingEl(t){this.floatingEl=t,p(this)}setTransitionEl(t){this.transitionEl=t}render(){let{disabled:t,listId:e,inputId:s,isOpen:i}=this,n=this.el.autofocus,a=this.el.enterKeyHint,h=this.el.inputMode;return E({disabled:t,children:u`<div class=${r(l.inputContainer)}><calcite-input .alignment=${this.alignment} aria-activedescendant=${this.activeDescendant??o} aria-controls=${e??o} aria-owns=${e??o} aria-autocomplete=list .ariaExpanded=${i} aria-haspopup=listbox .autocomplete=${this.autocomplete} .autofocus=${n} class=${r(l.input)} clearable .disabled=${t} enterkeyhint=${a??o} .form=${this.form} .icon=${this.icon??!0} .iconFlipRtl=${this.iconFlipRtl} id=${s??o} inputmode=${h??o} .label=${this.label} .loading=${this.loading} .maxLength=${this.maxLength} .messageOverrides=${this.messages} .minLength=${this.minLength} .name=${this.name} @click=${this.inputClickHandler} @keydown=${this.keyDownHandler} @calciteInputChange=${this.changeHandler} @calciteInputInput=${this.inputHandler} @calciteInternalInputFocus=${this.handleInputFocus} .pattern=${this.pattern} .placeholder=${this.placeholder} .prefixText=${this.prefixText} .readOnly=${this.readOnly} role=combobox .scale=${this.scale} .status=${this.status} .suffixText=${this.suffixText} type=search .value=${this.inputValue} ${d(this.setReferenceEl)}></calcite-input>${this.renderListBox()}<div class=${r({[l.contentContainer]:!0,[l.floatingUIContainer]:!0,[l.floatingUIContainerActive]:i})} ${d(this.setFloatingEl)}><div class=${r({[l.contentAnimation]:!0,[b.animation]:!0,[b.animationActive]:i})} ${d(this.setTransitionEl)}><div class=${r({[l.content]:!0,[l.contentHidden]:!i})}><slot name=${G.contentTop} @slotchange=${this.handleContentTopSlotChange}></slot><slot aria-hidden=true></slot><slot name=${G.contentBottom} @slotchange=${this.handleContentBottomSlotChange}></slot></div></div></div></div>${U({component:this})}${this.validationMessage&&this.status==="invalid"?R({icon:this.validationIcon,id:W.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderListBox(){return u`<ul aria-labelledby=${this.inputId??o} class=${r(l.screenReadersOnly)} id=${this.listId??o} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>`}renderListBoxOptions(){return D(this.items.filter(t=>!!(t.label||t.heading)),t=>t.guid,t=>u`<li .ariaDisabled=${t.disabled} .ariaLabel=${t.label} id=${t.guid??o} role=option tabindex=-1>${t.heading}${t.description}</li>`)}};C("calcite-autocomplete",x);export{x as Autocomplete};
|
|
@@ -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.0.
|
|
4
|
-
import{l as G}from"./KBDXI6DJ.js";import{a as C}from"./VG7BJBFG.js";import{c as W,e as j,f as A,h as H}from"./DTL2LM6T.js";import{c as N,d as q}from"./G3LH75CQ.js";import{a as k,b as U}from"./LOZEGKG2.js";import{a as F}from"./CIV3PH3Z.js";import"./UELGJSYH.js";import{a as V}from"./ARHYATTG.js";import{b as R}from"./QU33PBBI.js";import"./CMO3X257.js";import{b as _}from"./GN5CPLSJ.js";import"./I2OIH73C.js";import{B as S,J as M,e as D,f as g,j as T,v as b,w as E,x as L}from"./KVSCG5E3.js";var ee={offset:"offset"},te=60;function x(o){return o.replace(":15",".25").replace(":30",".5").replace(":45",".75").replace("\u2212","-")}function oe(o,e){let t=w(o,"en-US",e).replace("GMT","");return t===""?0:Number(x(t))*te}function ie(){return new Date().getTimezoneOffset()*-1}function se(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}async function ae(o){if(o==="offset")return t=>t;let{normalize:e}=await import("./SYEQSDHG.js");return e}async function ne(o,e,t,i,l){if(t==="name"){let{groupByName:a}=await import("./7WG5I3MP.js");return(await a()).map(({label:n})=>({label:n,value:n,metadata:{filterValue:n}})).filter(n=>!!n).sort()}let u=l==="user"?o:l==="utc"?"fr":"en-GB",d=i.getTime();if(t==="region"){let[{groupByRegion:a},{getCountry:n,global:m}]=await Promise.all([import("./DNYBIAUI.js"),import("./TNR5VZG2.js")]);return(await a()).map(({label:s,tzs:c})=>(c.sort((r,h)=>{let v=I(r,e),y=I(h,e),p="Etc/GMT";if(r.startsWith(p)&&h.startsWith(p)){let f=r.substring(p.length),P=h.substring(p.length),Y=f===""?0:parseInt(f);return(P===""?0:parseInt(P))-Y}return v.localeCompare(y)}),{label:$(e,s),items:c.map(r=>{let h=x(w(r,u,d)),v=I(r,e),y=s===m?`${I(m,e)} Etc`:J(r),p=n(r),f=$(e,p);return{label:v,value:r,metadata:{country:f===v?void 0:f,filterValue:y,offset:h}}})})).sort((s,c)=>s.label===m?-1:c.label===m?1:s.label.localeCompare(c.label))}let[{groupByOffset:Z},{DateEngine:Q}]=await Promise.all([import("./LHSAAMYQ.js"),import("./SKDMJE3X.js")]),z=await Z({dateEngine:new Q,groupDateRange:1,startDate:new Date(d).toISOString()}),X=new Intl.ListFormat(o,{style:"long",type:"conjunction"}),B=["Factory","Etc/UTC"];return z.forEach(a=>{let n=[],m=0;a.tzs.forEach((s,c)=>{B.includes(s)&&m++,n[c]=m}),a.tzs=a.tzs.filter(s=>!B.includes(s)),a.labelTzIdx=a.labelTzIdx.map(s=>s-n[s]).filter(s=>s>=0&&s<a.tzs.length)}),z.map(({labelTzIdx:a,tzs:n})=>{let m=n[0],s=x(w(m,u,d)),c=oe(m,d),r=a.map(h=>I(n[h],e));return{label:me(e,s,X.format(r)),value:c,metadata:{filterValue:n.map(h=>J(h))}}}).filter(a=>!!a).sort((a,n)=>a.value-n.value)}function I(o,e){return e[o]||re(o)}function le(o,e,t){return t.timeZoneRegionLabel.replace("{city}",o).replace("{country}",$(t,e))}function $(o,e){return o[e]||e}function re(o){return o.split("/").pop()}function J(o){return o.replace(/_/g," ")}function me(o,e,t){return o.timeZoneLabel.replace("{offset}",e).replace("{cities}",t)}function w(o,e,t=Date.now()){return o==="Factory"&&(o="Etc/GMT"),G(e,{timeZone:o,timeZoneName:"shortOffset"}).formatToParts(t).find(({type:i})=>i==="timeZoneName").value}function ce(o){return o.items!==void 0}function he(o){return ce(o[0])?o.flatMap(e=>e.items):o}function K(o,e,t){return t==null?null:he(o).find(i=>i[e]==t)}var de=D`: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}`,O=class extends E{constructor(){super(...arguments),this.clearable=!1,this.disabled=!1,this.maxItems=0,this.messages=V({blocking:!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,disabled:7,form:3,maxItems:11,messageOverrides:0,mode:3,name:3,offsetStyle:3,open:7,overlayPositioning:3,readOnly:7,referenceDate:1,required:7,scale:3,status:3,validationIcon:[3,{converter:S}],validationMessage:1,validity:0,value:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=de}get value(){return this._value}set value(e){this._value=e}async setFocus(){await _(this),await this.comboboxEl.setFocus()}connectedCallback(){super.connectedCallback(),W(this),N(this)}async load(){this.normalizer=await ae(this.mode),await this.updateTimeZoneItems();let e=this.value,t=this.normalizeValue(e);this.value=t||(e===""?t:void 0),this.updateTimeZoneSelection();let i=this.selectedTimeZoneItem?`${this.selectedTimeZoneItem.value}`:"";A(this,i),this.value=i}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(){k(this)}loaded(){this.overrideSelectedLabelForRegion(this.open),this.openChanged()}disconnectedCallback(){super.disconnectedCallback(),j(this),q(this)}async handleTimeZoneItemPropsChange(){!this.timeZoneItems||!this.hasUpdated||(await this.updateTimeZoneItems(),this.updateTimeZoneSelection())}openChanged(){this.comboboxEl&&(this.comboboxEl.open=this.open)}async handleValueChange(e,t){let i=this.normalizeValue(e);if(!i){if(this.clearable){this._value=i,this.selectedTimeZoneItem=null;return}this._value=t,this.selectedTimeZoneItem=this.findTimeZoneItem(t);return}let l=this.findTimeZoneItem(i);if(!l){this._value=t;return}this._value=i,this.selectedTimeZoneItem=l,i!==e&&(await this.updateComplete,this.overrideSelectedLabelForRegion(this.open))}onLabelClick(){this.setFocus()}setComboboxRef(e){this.comboboxEl=e}overrideSelectedLabelForRegion(e){if(this.mode!=="region"||!this.selectedTimeZoneItem)return;let{label:t,metadata:i}=this.selectedTimeZoneItem;this.comboboxEl.selectedItems[0].textLabel=!i.country||e?t:le(t,i.country,this.messages)}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 t=e.target.selectedItems[0];if(!t){this._value="",this.selectedTimeZoneItem=null,this.calciteInputTimeZoneChange.emit();return}let i=this.findTimeZoneItemByLabel(t.getAttribute("data-label")),l=`${i.value}`;this.value===l&&i.label===this.selectedTimeZoneItem.label||(this._value=l,this.selectedTimeZoneItem=i,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 K(this.timeZoneItems,"value",e)}findTimeZoneItemByLabel(e){return K(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"?ie():se(),t=this.value===""||!this.value?e:this.value;this.selectedTimeZoneItem=this.findTimeZoneItem(t)||this.findTimeZoneItem(e)}async createTimeZoneItems(){return!this.messages._lang||!this.messages?[]:ne(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)}render(){return U({disabled:this.disabled,children:g`<calcite-combobox .clearDisabled=${!this.clearable} .disabled=${this.disabled} .label=${this.messages.chooseTimeZone} lang=${this.messages._lang??T} .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} ${R(this.setComboboxRef)}>${this.renderItems()}</calcite-combobox>${H({component:this})}`})}renderItems(){return this.mode==="region"?this.renderRegionItems():C(this.timeZoneItems,({label:e})=>e,e=>{let t=this.selectedTimeZoneItem===e,{label:i,metadata:l,value:u}=e;return g`<calcite-combobox-item data-label=${i??T} .metadata=${l} .selected=${t} .textLabel=${i} .value=${u}></calcite-combobox-item>`})}renderRegionItems(){return this.timeZoneItems.flatMap(({label:e,items:t})=>F(e,g`<calcite-combobox-item-group .label=${e}>${C(t,({label:i})=>i,i=>{let l=this.selectedTimeZoneItem===i,{label:u,metadata:d,value:Z}=i;return g`<calcite-combobox-item data-label=${u??T} .description=${d.country} .metadata=${d} .selected=${l} .textLabel=${u} .value=${Z}><span class=${L(ee.offset)} slot=content-end>${d.offset}</span></calcite-combobox-item>`})}</calcite-combobox-item-group>`))}};M("calcite-input-time-zone",O);export{O as InputTimeZone};
|
|
3
|
+
v3.0.1 */
|
|
4
|
+
import{l as G}from"./FYUK2GME.js";import{a as C}from"./HPFCIR5F.js";import{c as W,e as j,f as A,h as H}from"./DJU4LSIS.js";import{c as N,d as q}from"./HEVM6SRJ.js";import{a as k,b as U}from"./X6EDNQN2.js";import{a as F}from"./TTARWRVZ.js";import"./5YBMD5MK.js";import{a as V}from"./RSI5VQHT.js";import{b as R}from"./QV6PXGLB.js";import"./NLK3OCCK.js";import{b as _}from"./6OPQR7PL.js";import"./OLP7ABVK.js";import{B as S,J as M,e as D,f as g,j as T,v as b,w as E,x as L}from"./D7X7U5LL.js";var ee={offset:"offset"},te=60;function x(o){return o.replace(":15",".25").replace(":30",".5").replace(":45",".75").replace("\u2212","-")}function oe(o,e){let t=w(o,"en-US",e).replace("GMT","");return t===""?0:Number(x(t))*te}function ie(){return new Date().getTimezoneOffset()*-1}function se(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}async function ae(o){if(o==="offset")return t=>t;let{normalize:e}=await import("./3EQ32UON.js");return e}async function ne(o,e,t,i,l){if(t==="name"){let{groupByName:a}=await import("./SM6GCEH6.js");return(await a()).map(({label:n})=>({label:n,value:n,metadata:{filterValue:n}})).filter(n=>!!n).sort()}let u=l==="user"?o:l==="utc"?"fr":"en-GB",d=i.getTime();if(t==="region"){let[{groupByRegion:a},{getCountry:n,global:m}]=await Promise.all([import("./TFRMRELY.js"),import("./GS4K4IEJ.js")]);return(await a()).map(({label:s,tzs:c})=>(c.sort((r,h)=>{let v=I(r,e),y=I(h,e),p="Etc/GMT";if(r.startsWith(p)&&h.startsWith(p)){let f=r.substring(p.length),P=h.substring(p.length),Y=f===""?0:parseInt(f);return(P===""?0:parseInt(P))-Y}return v.localeCompare(y)}),{label:$(e,s),items:c.map(r=>{let h=x(w(r,u,d)),v=I(r,e),y=s===m?`${I(m,e)} Etc`:J(r),p=n(r),f=$(e,p);return{label:v,value:r,metadata:{country:f===v?void 0:f,filterValue:y,offset:h}}})})).sort((s,c)=>s.label===m?-1:c.label===m?1:s.label.localeCompare(c.label))}let[{groupByOffset:Z},{DateEngine:Q}]=await Promise.all([import("./PV7FS57L.js"),import("./SVTZCS25.js")]),z=await Z({dateEngine:new Q,groupDateRange:1,startDate:new Date(d).toISOString()}),X=new Intl.ListFormat(o,{style:"long",type:"conjunction"}),B=["Factory","Etc/UTC"];return z.forEach(a=>{let n=[],m=0;a.tzs.forEach((s,c)=>{B.includes(s)&&m++,n[c]=m}),a.tzs=a.tzs.filter(s=>!B.includes(s)),a.labelTzIdx=a.labelTzIdx.map(s=>s-n[s]).filter(s=>s>=0&&s<a.tzs.length)}),z.map(({labelTzIdx:a,tzs:n})=>{let m=n[0],s=x(w(m,u,d)),c=oe(m,d),r=a.map(h=>I(n[h],e));return{label:me(e,s,X.format(r)),value:c,metadata:{filterValue:n.map(h=>J(h))}}}).filter(a=>!!a).sort((a,n)=>a.value-n.value)}function I(o,e){return e[o]||re(o)}function le(o,e,t){return t.timeZoneRegionLabel.replace("{city}",o).replace("{country}",$(t,e))}function $(o,e){return o[e]||e}function re(o){return o.split("/").pop()}function J(o){return o.replace(/_/g," ")}function me(o,e,t){return o.timeZoneLabel.replace("{offset}",e).replace("{cities}",t)}function w(o,e,t=Date.now()){return o==="Factory"&&(o="Etc/GMT"),G(e,{timeZone:o,timeZoneName:"shortOffset"}).formatToParts(t).find(({type:i})=>i==="timeZoneName").value}function ce(o){return o.items!==void 0}function he(o){return ce(o[0])?o.flatMap(e=>e.items):o}function K(o,e,t){return t==null?null:he(o).find(i=>i[e]==t)}var de=D`: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}`,O=class extends E{constructor(){super(...arguments),this.clearable=!1,this.disabled=!1,this.maxItems=0,this.messages=V({blocking:!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,disabled:7,form:3,maxItems:11,messageOverrides:0,mode:3,name:3,offsetStyle:3,open:7,overlayPositioning:3,readOnly:7,referenceDate:1,required:7,scale:3,status:3,validationIcon:[3,{converter:S}],validationMessage:1,validity:0,value:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=de}get value(){return this._value}set value(e){this._value=e}async setFocus(){await _(this),await this.comboboxEl.setFocus()}connectedCallback(){super.connectedCallback(),W(this),N(this)}async load(){this.normalizer=await ae(this.mode),await this.updateTimeZoneItems();let e=this.value,t=this.normalizeValue(e);this.value=t||(e===""?t:void 0),this.updateTimeZoneSelection();let i=this.selectedTimeZoneItem?`${this.selectedTimeZoneItem.value}`:"";A(this,i),this.value=i}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(){k(this)}loaded(){this.overrideSelectedLabelForRegion(this.open),this.openChanged()}disconnectedCallback(){super.disconnectedCallback(),j(this),q(this)}async handleTimeZoneItemPropsChange(){!this.timeZoneItems||!this.hasUpdated||(await this.updateTimeZoneItems(),this.updateTimeZoneSelection())}openChanged(){this.comboboxEl&&(this.comboboxEl.open=this.open)}async handleValueChange(e,t){let i=this.normalizeValue(e);if(!i){if(this.clearable){this._value=i,this.selectedTimeZoneItem=null;return}this._value=t,this.selectedTimeZoneItem=this.findTimeZoneItem(t);return}let l=this.findTimeZoneItem(i);if(!l){this._value=t;return}this._value=i,this.selectedTimeZoneItem=l,i!==e&&(await this.updateComplete,this.overrideSelectedLabelForRegion(this.open))}onLabelClick(){this.setFocus()}setComboboxRef(e){this.comboboxEl=e}overrideSelectedLabelForRegion(e){if(this.mode!=="region"||!this.selectedTimeZoneItem)return;let{label:t,metadata:i}=this.selectedTimeZoneItem;this.comboboxEl.selectedItems[0].textLabel=!i.country||e?t:le(t,i.country,this.messages)}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 t=e.target.selectedItems[0];if(!t){this._value="",this.selectedTimeZoneItem=null,this.calciteInputTimeZoneChange.emit();return}let i=this.findTimeZoneItemByLabel(t.getAttribute("data-label")),l=`${i.value}`;this.value===l&&i.label===this.selectedTimeZoneItem.label||(this._value=l,this.selectedTimeZoneItem=i,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 K(this.timeZoneItems,"value",e)}findTimeZoneItemByLabel(e){return K(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"?ie():se(),t=this.value===""||!this.value?e:this.value;this.selectedTimeZoneItem=this.findTimeZoneItem(t)||this.findTimeZoneItem(e)}async createTimeZoneItems(){return!this.messages._lang||!this.messages?[]:ne(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)}render(){return U({disabled:this.disabled,children:g`<calcite-combobox .clearDisabled=${!this.clearable} .disabled=${this.disabled} .label=${this.messages.chooseTimeZone} lang=${this.messages._lang??T} .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} ${R(this.setComboboxRef)}>${this.renderItems()}</calcite-combobox>${H({component:this})}`})}renderItems(){return this.mode==="region"?this.renderRegionItems():C(this.timeZoneItems,({label:e})=>e,e=>{let t=this.selectedTimeZoneItem===e,{label:i,metadata:l,value:u}=e;return g`<calcite-combobox-item data-label=${i??T} .metadata=${l} .selected=${t} .textLabel=${i} .value=${u}></calcite-combobox-item>`})}renderRegionItems(){return this.timeZoneItems.flatMap(({label:e,items:t})=>F(e,g`<calcite-combobox-item-group .label=${e}>${C(t,({label:i})=>i,i=>{let l=this.selectedTimeZoneItem===i,{label:u,metadata:d,value:Z}=i;return g`<calcite-combobox-item data-label=${u??T} .description=${d.country} .metadata=${d} .selected=${l} .textLabel=${u} .value=${Z}><span class=${L(ee.offset)} slot=content-end>${d.offset}</span></calcite-combobox-item>`})}</calcite-combobox-item-group>`))}};M("calcite-input-time-zone",O);export{O 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.0.
|
|
3
|
+
v3.0.1 */
|
|
4
4
|
var n={wrapper:"wrapper",wrapperBordered:"wrapper--bordered",container:"container",containerHover:"container--hover",containerBorder:"container--border",containerBorderSelected:"container--border-selected",containerBorderUnselected:"container--border-unselected",contentContainerWrapper:"content-container-wrapper",contentContainerWrapperBordered:"content-container-wrapper--bordered",contentContainer:"content-container",contentContainerUnavailable:"content-container--unavailable",contentContainerSelectable:"content-container--selectable",contentContainerHasCenterContent:"content-container--has-center-content",nestedContainer:"nested-container",nestedContainerOpen:"nested-container--open",content:"content",row:"row",gridCell:"grid-cell",customContent:"custom-content",actionsStart:"actions-start",contentStart:"content-start",label:"label",description:"description",contentEnd:"content-end",contentBottom:"content-bottom",actionsEnd:"actions-end",selectionContainer:"selection-container",selectionContainerSingle:"selection-container--single",openContainer:"open-container",dragContainer:"drag-container",close:"close",icon:"icon"},e={actionsStart:"actions-start",contentStart:"content-start",content:"content",contentBottom:"content-bottom",contentEnd:"content-end",actionsEnd:"actions-end"},t=0,o={selectedMultiple:"check-square-f",selectedSingle:"circle-inset-large",unselectedMultiple:"square",unselectedSingle:"circle",closedLTR:"chevron-right",closedRTL:"chevron-left",open:"chevron-down",blank:"blank",close:"x"},r="data-test-active";export{n as a,e as b,t as c,o as d,r as e};
|