@esri/calcite-components 3.0.0 → 3.1.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/calcite/{45GA6INB.js → 23MOV6NG.js} +2 -2
- package/dist/calcite/{U725E4ID.js → 2OOLECPX.js} +2 -2
- package/dist/calcite/{GOOHYN3D.js → 34MV5U4O.js} +2 -2
- package/dist/calcite/{U3WK4DZT.js → 373CZCGO.js} +2 -2
- package/dist/calcite/{WWUBU6N5.js → 3AXOI2C3.js} +2 -2
- package/dist/calcite/{HFIRIAQA.js → 3B2PP7OF.js} +2 -2
- package/dist/calcite/{FNM4DZZH.js → 3SGAAJUZ.js} +1 -1
- package/dist/calcite/{6ZTWHW63.js → 3WJNCOPC.js} +2 -2
- package/dist/calcite/{2M4WCGKG.js → 4OCELM2X.js} +2 -2
- package/dist/calcite/{EOHVH6PN.js → 4UTJZXPD.js} +2 -2
- package/dist/calcite/{7PWETOIU.js → 4YQ5JTFA.js} +2 -2
- package/dist/calcite/{BRTESQOJ.js → 5FHBAB7Y.js} +2 -2
- package/dist/calcite/{T6HODD4B.js → 5M6HCNZZ.js} +2 -2
- package/dist/calcite/{V4JZRN7T.js → 5V63WOMD.js} +2 -2
- package/dist/calcite/{MPX2M2VX.js → 5WY3RA4V.js} +2 -2
- package/dist/calcite/{L5FDXQMT.js → 62IMSXF5.js} +1 -1
- package/dist/calcite/{RMGYRZXR.js → 6D6N2CCC.js} +2 -2
- package/dist/calcite/{KBDXI6DJ.js → 6I7N4DJM.js} +2 -2
- package/dist/calcite/{RLSQLIV6.js → 6IFDRSQV.js} +2 -2
- package/dist/calcite/{DBVNMM6Q.js → 6MMOWRSM.js} +2 -2
- package/dist/calcite/{DDJ75RTI.js → 6QGNNBZ5.js} +2 -2
- package/dist/calcite/{PZLVQQMT.js → 6R5C57P5.js} +2 -2
- package/dist/calcite/{GNUSLZWJ.js → 6T6UMXEG.js} +2 -2
- package/dist/calcite/{MIKGJ3NM.js → 6WT3NQTF.js} +2 -2
- package/dist/calcite/{LHSAAMYQ.js → 6XUNN5BD.js} +2 -2
- package/dist/calcite/{DH4ISGHV.js → 73JHMQAR.js} +2 -2
- package/dist/calcite/{XXZIOSXQ.js → 75U2CEI2.js} +2 -2
- package/dist/calcite/{GSXEMGSW.js → 77VX6TWS.js} +2 -2
- package/dist/calcite/{CWPRBG3T.js → 7A7OCUYH.js} +2 -2
- package/dist/calcite/{MQYH4ONZ.js → 7HBBL4ZM.js} +1 -1
- package/dist/calcite/{AXXJNFKZ.js → 7IHFMVXN.js} +2 -2
- package/dist/calcite/{I2OIH73C.js → 7LGBDOYP.js} +1 -1
- package/dist/calcite/{WPAMFFBY.js → 7OPWGOIH.js} +2 -2
- package/dist/calcite/{GN5CPLSJ.js → 7VOKVNOX.js} +2 -2
- package/dist/calcite/{RESHLE2Y.js → A3KUHAYH.js} +2 -2
- package/dist/calcite/{VJD4CRQ3.js → A77PTXQI.js} +2 -2
- package/dist/calcite/{US3PQV6O.js → A7BIZKUQ.js} +2 -2
- package/dist/calcite/{ECEZ4R6E.js → A7KPG75H.js} +2 -2
- package/dist/calcite/{4SEPDFCP.js → A7WWDVJQ.js} +2 -2
- package/dist/calcite/{YYJSHQR3.js → AFBGRNF3.js} +1 -1
- package/dist/calcite/{DNYBIAUI.js → AFI5OSXD.js} +2 -2
- package/dist/calcite/{7U7FF3Y4.js → AFQ7CFQT.js} +2 -2
- package/dist/calcite/{YA5A7PJR.js → AIRWHAUT.js} +2 -2
- package/dist/calcite/{TVDZM7WT.js → AM6UJWJO.js} +2 -2
- package/dist/calcite/{OLMX7G3J.js → ARAAYSPA.js} +1 -1
- package/dist/calcite/{GYQTRH4V.js → B22OHVZA.js} +2 -2
- package/dist/calcite/{6X2SD2PW.js → B5JXHWI4.js} +2 -2
- package/dist/calcite/{G3LH75CQ.js → BAWLIDLU.js} +2 -2
- package/dist/calcite/{R3HMG2D6.js → BB5G2FKE.js} +2 -2
- package/dist/calcite/{O4O3TSE5.js → BCUBPURC.js} +2 -2
- package/dist/calcite/{ZA76CHET.js → BECCYK7I.js} +2 -2
- package/dist/calcite/{QCGLMLKW.js → BGBHXXSC.js} +2 -2
- package/dist/calcite/{URM3R65T.js → BHOEIDXT.js} +2 -2
- package/dist/calcite/{QK2H5T7J.js → BOLBKIM3.js} +2 -2
- package/dist/calcite/{OTHVFLNW.js → BUB7E4GE.js} +2 -2
- package/dist/calcite/{2JKKAEPM.js → BUHVYEME.js} +2 -2
- package/dist/calcite/{YMRTHS5X.js → BY2VIVYE.js} +2 -2
- package/dist/calcite/{VCSXFNPO.js → CHQYILCK.js} +2 -2
- package/dist/calcite/{7SX3RD7P.js → CKLM3NH3.js} +2 -2
- package/dist/calcite/{KWOOGTG2.js → CPLZSNMW.js} +2 -2
- package/dist/calcite/{2YAXZHP2.js → CPWCVFVX.js} +2 -2
- package/dist/calcite/{CIV3PH3Z.js → CQ5FVCCX.js} +2 -2
- package/dist/calcite/{KSNEQFZX.js → CU6QKL4W.js} +2 -2
- package/dist/calcite/{PT2XMADA.js → CVPHYVRS.js} +1 -1
- package/dist/calcite/{4Z7JRTON.js → CYK3MWM4.js} +2 -2
- package/dist/calcite/{SMUXJLDL.js → D2PRGKAG.js} +2 -2
- package/dist/calcite/{LB5ATL5Q.js → D44V6PEO.js} +2 -2
- package/dist/calcite/{CBSMKHOY.js → DSNK4E4G.js} +2 -2
- package/dist/calcite/{QQ67AVDV.js → DUM56X2O.js} +2 -2
- package/dist/calcite/{ESBOJTBS.js → DXGYOB2C.js} +2 -2
- package/dist/calcite/{XBZLGRRI.js → DY75E5TM.js} +2 -2
- package/dist/calcite/{MBQZPRQ5.js → E7MBDJGE.js} +2 -2
- package/dist/calcite/{6XTYGXNG.js → EBHSG7RJ.js} +2 -2
- package/dist/calcite/{XT32TCZG.js → EEUCEFXG.js} +1 -1
- package/dist/calcite/{G3ZJ2KQT.js → EKQYW7GE.js} +2 -2
- package/dist/calcite/{NWVCPRVB.js → ERNMRUWX.js} +1 -1
- package/dist/calcite/{CY6C2FDZ.js → EY2PLOMF.js} +2 -2
- package/dist/calcite/{66B2H27W.js → F3Y2S6BF.js} +2 -2
- package/dist/calcite/{TQIVV2F7.js → F7CJI6MB.js} +2 -2
- package/dist/calcite/{CMO3X257.js → FE2QRVI7.js} +2 -2
- package/dist/calcite/{CFRBQXK4.js → FF4V4NT7.js} +2 -2
- package/dist/calcite/{JUNCR7R2.js → FSSFZBVO.js} +2 -2
- package/dist/calcite/{BSRMWMHQ.js → FZJ3BTYV.js} +2 -2
- package/dist/calcite/{IJCTXZQB.js → GK5DGLYC.js} +2 -2
- package/dist/calcite/{4BSCJ722.js → H4E2N4X2.js} +2 -2
- package/dist/calcite/{KI2NOBMU.js → H7E2HITF.js} +2 -2
- package/dist/calcite/{WKTGTKRJ.js → H7RTEVRM.js} +2 -2
- package/dist/calcite/{7WG5I3MP.js → HBNQRYUU.js} +2 -2
- package/dist/calcite/{LILDCWFX.js → HD5RZV7I.js} +2 -2
- package/dist/calcite/{JVNEJ36Z.js → HIRSIKVC.js} +2 -2
- package/dist/calcite/{VMRLYKNI.js → HLORIHBB.js} +1 -1
- package/dist/calcite/{MZRO54UT.js → HSU2J7U7.js} +2 -2
- package/dist/calcite/{N4MN6VQ7.js → HTI57FLV.js} +2 -2
- package/dist/calcite/{MUWK32IE.js → HU25GIR3.js} +2 -2
- package/dist/calcite/{CK6HQQX6.js → HX44FXR7.js} +1 -1
- package/dist/calcite/{XOVG6UH3.js → I2OX63UC.js} +2 -2
- package/dist/calcite/{D36VWSDW.js → I2YUGRNE.js} +2 -2
- package/dist/calcite/IJV4X7J7.js +4 -0
- package/dist/calcite/{4YZ27QWL.js → IOPDSOMP.js} +2 -2
- package/dist/calcite/{KVSCG5E3.js → IPEYLL4T.js} +2 -2
- package/dist/calcite/{JFYDLHH7.js → IRMEFP5V.js} +2 -2
- package/dist/calcite/{TSJJLMPA.js → ISKYJPVP.js} +1 -1
- package/dist/calcite/{A5GGYTUQ.js → IUOGAZKX.js} +2 -2
- package/dist/calcite/{GPUFLCIT.js → JAPR4FNO.js} +2 -2
- package/dist/calcite/{SJKTCGW6.js → JHE67SX5.js} +2 -2
- package/dist/calcite/{NODC2JA6.js → JM3OLLIG.js} +2 -2
- package/dist/calcite/{ZGXTLCGJ.js → JQIN4FNX.js} +2 -2
- package/dist/calcite/{QHASLHZN.js → K72IV53Z.js} +2 -2
- package/dist/calcite/{JEX42CPR.js → KFZDQQV4.js} +2 -2
- package/dist/calcite/{SBZ6VJ75.js → KLBMM5PO.js} +1 -1
- package/dist/calcite/{MCSX2S5T.js → KM6NLV33.js} +2 -2
- package/dist/calcite/{IYDN67SF.js → KQUGBIWA.js} +2 -2
- package/dist/calcite/{RVQMJBNS.js → LEH7GP3V.js} +2 -2
- package/dist/calcite/{GKKCWEZX.js → LN56JZD3.js} +2 -2
- package/dist/calcite/{KSVYAIHK.js → LONQYMAY.js} +2 -2
- package/dist/calcite/{N55N67N5.js → M2BP427U.js} +2 -2
- package/dist/calcite/{HMVKZP47.js → M7GV7Q4M.js} +2 -2
- package/dist/calcite/{BZKF5ZXQ.js → MBZP2G7S.js} +2 -2
- package/dist/calcite/{7KSGVDSR.js → MGMKRHPK.js} +2 -2
- package/dist/calcite/{BRTDMTZ3.js → MJPRNCRR.js} +2 -2
- package/dist/calcite/{3DGJ6ZQI.js → MKSN35K2.js} +2 -2
- package/dist/calcite/{WSGL37LB.js → MM3U5UFW.js} +2 -2
- package/dist/calcite/{R4RMVIKH.js → MNKK2ILQ.js} +2 -2
- package/dist/calcite/{I32TMNTO.js → MRYPQXG2.js} +1 -1
- package/dist/calcite/{SKDMJE3X.js → MW55GFZV.js} +1 -1
- package/dist/calcite/{ARHYATTG.js → MYKRE5QO.js} +2 -2
- package/dist/calcite/{BAHIPAHM.js → N6OZM4AJ.js} +2 -2
- package/dist/calcite/{IH4RXHJJ.js → NBCCD7Z4.js} +2 -2
- package/dist/calcite/{KBNS3CCT.js → NEZR6N4L.js} +2 -2
- package/dist/calcite/{QAYSDI3M.js → NKVV542U.js} +1 -1
- package/dist/calcite/{HGTV36FX.js → NTQTXOKH.js} +2 -2
- package/dist/calcite/{Z6GA347Y.js → NW2QKL4A.js} +2 -2
- package/dist/calcite/{GFC7NS6P.js → O6U5C56E.js} +2 -2
- package/dist/calcite/{I62DUDHI.js → OKSDNORT.js} +2 -2
- package/dist/calcite/{G7WFYVUC.js → OLXJRGIR.js} +2 -2
- package/dist/calcite/{AI3R3SU6.js → OQYQHRZJ.js} +2 -2
- package/dist/calcite/{PNHR5K2L.js → P2EJXRHM.js} +2 -2
- package/dist/calcite/{X2UHFJHG.js → P37UOGXI.js} +2 -2
- package/dist/calcite/PC7WLS5Q.js +4 -0
- package/dist/calcite/{5AVZLE2Q.js → PD3WNH5L.js} +2 -2
- package/dist/calcite/{YTRT5XZT.js → PER743YE.js} +2 -2
- package/dist/calcite/{OE2AH2NC.js → PMGM7JNH.js} +2 -2
- package/dist/calcite/{S76CXQTI.js → PUMTLS4E.js} +2 -2
- package/dist/calcite/{RJLKHCRB.js → Q3M6KGKZ.js} +2 -2
- package/dist/calcite/{VNQNKQ2J.js → Q4MKOMJK.js} +2 -2
- package/dist/calcite/{GAAXSGWK.js → Q52B4SR4.js} +2 -2
- package/dist/calcite/{Z7VNUC77.js → QC3KYLNZ.js} +2 -2
- package/dist/calcite/{EFI2G5WL.js → QFOLYCWD.js} +2 -2
- package/dist/calcite/{F6EGRKXW.js → QGOU2BEZ.js} +2 -2
- package/dist/calcite/{ZV442E6X.js → QI2ELYU3.js} +2 -2
- package/dist/calcite/{R6GNPMSV.js → QIZGHNZY.js} +2 -2
- package/dist/calcite/{D2HDFE7S.js → QJRMWXHQ.js} +2 -2
- package/dist/calcite/{OTUG3NVT.js → QQR6TKYE.js} +2 -2
- package/dist/calcite/{EAML4EDI.js → QR6G6AB2.js} +2 -2
- package/dist/calcite/{LH7KSBQC.js → QUUKOZWD.js} +2 -2
- package/dist/calcite/{KULDQOV2.js → R3EBVVN3.js} +2 -2
- package/dist/calcite/{CNO6NFH5.js → R3FLP5QS.js} +2 -2
- package/dist/calcite/{C46JYVUP.js → R6M6HES6.js} +2 -2
- package/dist/calcite/{LOZEGKG2.js → RAA7AM6M.js} +2 -2
- package/dist/calcite/{EHZCT5YZ.js → RDOVN276.js} +2 -2
- package/dist/calcite/{OGED6PPP.js → RFATQCOE.js} +2 -2
- package/dist/calcite/{QLKHJI4P.js → RHR5F4HO.js} +1 -1
- package/dist/calcite/{DT67ZFPX.js → RISOP66W.js} +2 -2
- package/dist/calcite/{KW57BHXD.js → RSMRASRN.js} +2 -2
- package/dist/calcite/{NVBNX55L.js → RTH7YVQR.js} +2 -2
- package/dist/calcite/{JCWM5Z43.js → RWRS2NU2.js} +2 -2
- package/dist/calcite/{AYZ73RWQ.js → S23GFP6K.js} +2 -2
- package/dist/calcite/{YXLQFMOA.js → S6HVF75Y.js} +2 -2
- package/dist/calcite/{GGO5TMB4.js → S74LMG36.js} +2 -2
- package/dist/calcite/{7QHUEK5R.js → SADM47KH.js} +2 -2
- package/dist/calcite/{OOSULFCY.js → SLKTWE3W.js} +2 -2
- package/dist/calcite/{ATHBUWBY.js → SLTDIENT.js} +2 -2
- package/dist/calcite/{K3ZBW4GY.js → SYGGMDPD.js} +2 -2
- package/dist/calcite/{VST65PDC.js → T4MBSEJN.js} +1 -1
- package/dist/calcite/{6LW27BEV.js → TCIPD6BI.js} +2 -2
- package/dist/calcite/{22RQB3WE.js → TD2M3HXH.js} +1 -1
- package/dist/calcite/{TNR5VZG2.js → TFDQPWTN.js} +2 -2
- package/dist/calcite/{GE63ETFI.js → TO5FCIUA.js} +2 -2
- package/dist/calcite/{VG7BJBFG.js → TX2VI5MW.js} +2 -2
- package/dist/calcite/{46U4MKUU.js → U3HEL4RD.js} +2 -2
- package/dist/calcite/{ZQO6E4FO.js → UELJS6PF.js} +2 -2
- package/dist/calcite/{N2BVYYYP.js → UFYDUU52.js} +2 -2
- package/dist/calcite/{IXRMDUEL.js → UP7SL3CK.js} +2 -2
- package/dist/calcite/{LLSB73WA.js → UT6FICQ3.js} +2 -2
- package/dist/calcite/{FHBFGCTR.js → V6AMPSCT.js} +2 -2
- package/dist/calcite/{G2KHDAZD.js → VEJRRMKU.js} +2 -2
- package/dist/calcite/{HKHPJJ34.js → VFVGGH4O.js} +2 -2
- package/dist/calcite/{36DMRAV2.js → VQ4LSZKF.js} +2 -2
- package/dist/calcite/{JLZYAYOL.js → VW4FPITC.js} +2 -2
- package/dist/calcite/{QU33PBBI.js → WACTC6C2.js} +2 -2
- package/dist/calcite/{RVMVJW6K.js → WFNPLZZD.js} +2 -2
- package/dist/calcite/{FE3A3YUN.js → WOZ3YSMM.js} +2 -2
- package/dist/calcite/{3IV6JSC2.js → WQI63ENU.js} +2 -2
- package/dist/calcite/{SYEQSDHG.js → WX25GXOJ.js} +2 -2
- package/dist/calcite/{E3R5SMVW.js → X2CKUJNY.js} +2 -2
- package/dist/calcite/{24SER2VV.js → X3XUDYZK.js} +2 -2
- package/dist/calcite/{3TOVZEQB.js → X4HIU64B.js} +2 -2
- package/dist/calcite/{RAQWKUOJ.js → X6MOGC7A.js} +2 -2
- package/dist/calcite/{345Q4UHX.js → XBMJE2HA.js} +2 -2
- package/dist/calcite/{RUTUU2EH.js → XEB3PVUL.js} +2 -2
- package/dist/calcite/{Y6VF7HSM.js → XENH6L4X.js} +2 -2
- package/dist/calcite/{5EPP4MG3.js → XJJ7H5YN.js} +2 -2
- package/dist/calcite/{C54C5E23.js → XPXLWH7X.js} +2 -2
- package/dist/calcite/{QYGED6CL.js → XRGQWCOT.js} +2 -2
- package/dist/calcite/{E4NMFIKN.js → XU4G32CA.js} +2 -2
- package/dist/calcite/{FDIM6DYL.js → XYTAOAJQ.js} +2 -2
- package/dist/calcite/{FNFWOOMR.js → XZVQKECK.js} +1 -1
- package/dist/calcite/{4TQLSUKH.js → YBPOJHA7.js} +1 -1
- package/dist/calcite/{3GICXOBQ.js → YCJABBGV.js} +2 -2
- package/dist/calcite/{OPBQNK7J.js → YDLXSG4W.js} +2 -2
- package/dist/calcite/{2BGMAPSV.js → YICY6VCM.js} +2 -2
- package/dist/calcite/{T3NRBBZP.js → YLJ43EVG.js} +2 -2
- package/dist/calcite/{OHOS32IT.js → YMHBAMWI.js} +2 -2
- package/dist/calcite/{UELGJSYH.js → YSGHAVSA.js} +1 -1
- package/dist/calcite/{7D3VEEUX.js → YUGL6WTS.js} +2 -2
- package/dist/calcite/{6OZRZ36X.js → YWEFWGI7.js} +2 -2
- package/dist/calcite/{DTL2LM6T.js → YYWIZXXK.js} +2 -2
- package/dist/calcite/{CJYTY62F.js → Z6W6VEP2.js} +2 -2
- package/dist/calcite/{RAFCSOOQ.js → Z7SGWG6G.js} +2 -2
- package/dist/calcite/{TQTAM3XB.js → ZBOL56TZ.js} +2 -2
- package/dist/calcite/{RSAEDAEX.js → ZCCUSDNB.js} +2 -2
- package/dist/calcite/{UJL3BWDH.js → ZFTPOTKI.js} +2 -2
- package/dist/calcite/{7E342YOK.js → ZTKKB3EW.js} +2 -2
- package/dist/calcite/{FCN5RMLA.js → ZUF4UFWX.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 +10 -10
- 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 +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utils.js +1 -1
- package/dist/chunks/utils2.js +1 -1
- package/dist/chunks/utils3.js +1 -1
- package/dist/chunks/utils4.js +1 -1
- package/dist/components/calcite-accordion/customElement.js +1 -1
- package/dist/components/calcite-accordion-item/customElement.js +1 -1
- package/dist/components/calcite-action/customElement.js +2 -2
- package/dist/components/calcite-action-bar/customElement.js +1 -1
- package/dist/components/calcite-action-group/customElement.js +1 -1
- package/dist/components/calcite-action-menu/customElement.js +1 -1
- package/dist/components/calcite-action-pad/customElement.js +1 -1
- package/dist/components/calcite-alert/customElement.js +1 -1
- package/dist/components/calcite-autocomplete/customElement.js +1 -1
- package/dist/components/calcite-autocomplete-item/customElement.js +1 -1
- package/dist/components/calcite-autocomplete-item-group/customElement.js +1 -1
- package/dist/components/calcite-avatar/customElement.js +1 -1
- package/dist/components/calcite-block/customElement.js +1 -1
- package/dist/components/calcite-block-group/customElement.js +1 -1
- package/dist/components/calcite-block-section/customElement.js +1 -1
- package/dist/components/calcite-button/customElement.js +1 -1
- package/dist/components/calcite-card/customElement.js +1 -1
- package/dist/components/calcite-card-group/customElement.js +1 -1
- package/dist/components/calcite-carousel/customElement.js +1 -1
- package/dist/components/calcite-carousel-item/customElement.js +1 -1
- package/dist/components/calcite-checkbox/customElement.js +1 -1
- package/dist/components/calcite-chip/customElement.js +1 -1
- package/dist/components/calcite-chip-group/customElement.js +1 -1
- package/dist/components/calcite-color-picker/customElement.js +1 -1
- package/dist/components/calcite-color-picker-hex-input/customElement.js +1 -1
- package/dist/components/calcite-color-picker-swatch/customElement.js +1 -1
- package/dist/components/calcite-combobox/customElement.js +1 -1
- package/dist/components/calcite-combobox-item/customElement.js +1 -1
- package/dist/components/calcite-combobox-item-group/customElement.js +1 -1
- package/dist/components/calcite-date-picker/customElement.js +1 -1
- package/dist/components/calcite-date-picker-day/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
- package/dist/components/calcite-dialog/customElement.js +1 -1
- package/dist/components/calcite-dropdown/customElement.js +1 -1
- package/dist/components/calcite-dropdown-group/customElement.js +1 -1
- package/dist/components/calcite-dropdown-item/customElement.js +1 -1
- package/dist/components/calcite-fab/customElement.js +1 -1
- package/dist/components/calcite-filter/customElement.js +1 -1
- package/dist/components/calcite-flow/customElement.js +1 -1
- package/dist/components/calcite-flow-item/customElement.js +1 -1
- package/dist/components/calcite-graph/customElement.js +1 -1
- package/dist/components/calcite-handle/customElement.js +1 -1
- package/dist/components/calcite-icon/customElement.js +1 -1
- package/dist/components/calcite-inline-editable/customElement.js +1 -1
- package/dist/components/calcite-input/customElement.js +1 -1
- package/dist/components/calcite-input-date-picker/customElement.js +1 -1
- package/dist/components/calcite-input-message/customElement.js +1 -1
- package/dist/components/calcite-input-number/customElement.js +1 -1
- package/dist/components/calcite-input-text/customElement.js +1 -1
- package/dist/components/calcite-input-time-picker/customElement.js +1 -1
- package/dist/components/calcite-input-time-zone/customElement.js +1 -1
- package/dist/components/calcite-label/customElement.js +1 -1
- package/dist/components/calcite-link/customElement.js +1 -1
- package/dist/components/calcite-list/customElement.js +1 -1
- package/dist/components/calcite-list-item/customElement.js +1 -1
- package/dist/components/calcite-list-item-group/customElement.js +1 -1
- package/dist/components/calcite-loader/customElement.js +1 -1
- package/dist/components/calcite-menu/customElement.js +1 -1
- package/dist/components/calcite-menu-item/customElement.js +1 -1
- package/dist/components/calcite-meter/customElement.js +1 -1
- package/dist/components/calcite-modal/customElement.js +1 -1
- package/dist/components/calcite-navigation/customElement.js +1 -1
- package/dist/components/calcite-navigation-logo/customElement.js +1 -1
- package/dist/components/calcite-navigation-user/customElement.js +1 -1
- package/dist/components/calcite-notice/customElement.js +1 -1
- package/dist/components/calcite-option/customElement.js +1 -1
- package/dist/components/calcite-option-group/customElement.js +1 -1
- package/dist/components/calcite-pagination/customElement.js +1 -1
- package/dist/components/calcite-panel/customElement.js +1 -1
- package/dist/components/calcite-popover/customElement.js +1 -1
- package/dist/components/calcite-progress/customElement.js +1 -1
- package/dist/components/calcite-radio-button/customElement.js +1 -1
- package/dist/components/calcite-radio-button-group/customElement.js +1 -1
- package/dist/components/calcite-rating/customElement.js +1 -1
- package/dist/components/calcite-scrim/customElement.js +1 -1
- package/dist/components/calcite-segmented-control/customElement.js +1 -1
- package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
- package/dist/components/calcite-select/customElement.js +1 -1
- package/dist/components/calcite-sheet/customElement.js +1 -1
- package/dist/components/calcite-shell/customElement.js +1 -1
- package/dist/components/calcite-shell-center-row/customElement.js +1 -1
- package/dist/components/calcite-shell-panel/customElement.js +1 -1
- package/dist/components/calcite-slider/customElement.js +1 -1
- package/dist/components/calcite-sort-handle/customElement.js +1 -1
- package/dist/components/calcite-sortable-list/customElement.js +1 -1
- package/dist/components/calcite-split-button/customElement.js +1 -1
- package/dist/components/calcite-stack/customElement.js +1 -1
- package/dist/components/calcite-stepper/customElement.js +1 -1
- package/dist/components/calcite-stepper-item/customElement.js +1 -1
- package/dist/components/calcite-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 +6 -6
- package/dist/components/calcite-table/customElement.js +1 -1
- package/dist/components/calcite-table-cell/customElement.js +1 -1
- package/dist/components/calcite-table-header/customElement.js +1 -1
- package/dist/components/calcite-table-row/customElement.js +1 -1
- package/dist/components/calcite-tabs/customElement.js +1 -1
- package/dist/components/calcite-text-area/customElement.js +1 -1
- package/dist/components/calcite-tile/customElement.js +1 -1
- package/dist/components/calcite-tile-group/customElement.js +1 -1
- package/dist/components/calcite-tile-select/customElement.js +1 -1
- package/dist/components/calcite-tile-select-group/customElement.js +1 -1
- package/dist/components/calcite-time-picker/customElement.js +1 -1
- package/dist/components/calcite-tip/customElement.js +1 -1
- package/dist/components/calcite-tip-group/customElement.js +1 -1
- package/dist/components/calcite-tip-manager/customElement.js +1 -1
- package/dist/components/calcite-tooltip/customElement.js +1 -1
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/supported-browsers.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/package.json +5 -5
- package/dist/calcite/MPAVJ7UH.js +0 -4
- package/dist/calcite/T5UPGHU3.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.0 */
|
|
4
|
-
import{b as G}from"./OLMX7G3J.js";import{e as R,f as _,g as I}from"./L5FDXQMT.js";var W={exports:{}},X={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},P={exports:{}},ne=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")},te=ne,oe=Array.prototype.concat,ae=Array.prototype.slice,q=P.exports=function(e){for(var r=[],n=0,t=e.length;n<t;n++){var o=e[n];te(o)?r=oe.call(r,ae.call(o)):r.push(o)}return r};q.wrap=function(e){return function(){return e(q(arguments))}};var se=P.exports,x=X,H=se,U=Object.hasOwnProperty,D=Object.create(null);for(C in x)U.call(x,C)&&(D[x[C]]=C);var C,y=W.exports={to:{},get:{}};y.get=function(e){var r=e.substring(0,3).toLowerCase(),n,t;switch(r){case"hsl":n=y.get.hsl(e),t="hsl";break;case"hwb":n=y.get.hwb(e),t="hwb";break;default:n=y.get.rgb(e),t="rgb";break}return n?{model:t,value:n}:null};y.get.rgb=function(e){if(!e)return null;var r=/^#([a-f0-9]{3,4})$/i,n=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,t=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,a=[0,0,0,1],l,i,h;if(l=e.match(n)){for(h=l[2],l=l[1],i=0;i<3;i++){var p=i*2;a[i]=parseInt(l.slice(p,p+2),16)}h&&(a[3]=parseInt(h,16)/255)}else if(l=e.match(r)){for(l=l[1],h=l[3],i=0;i<3;i++)a[i]=parseInt(l[i]+l[i],16);h&&(a[3]=parseInt(h+h,16)/255)}else if(l=e.match(t)){for(i=0;i<3;i++)a[i]=parseInt(l[i+1],0);l[4]&&(l[5]?a[3]=parseFloat(l[4])*.01:a[3]=parseFloat(l[4]))}else if(l=e.match(o)){for(i=0;i<3;i++)a[i]=Math.round(parseFloat(l[i+1])*2.55);l[4]&&(l[5]?a[3]=parseFloat(l[4])*.01:a[3]=parseFloat(l[4]))}else return(l=e.match(s))?l[1]==="transparent"?[0,0,0,0]:U.call(x,l[1])?(a=x[l[1]],a[3]=1,a):null:null;for(i=0;i<3;i++)a[i]=w(a[i],0,255);return a[3]=w(a[3],0,1),a};y.get.hsl=function(e){if(!e)return null;var r=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(r);if(n){var t=parseFloat(n[4]),o=(parseFloat(n[1])%360+360)%360,s=w(parseFloat(n[2]),0,100),a=w(parseFloat(n[3]),0,100),l=w(isNaN(t)?1:t,0,1);return[o,s,a,l]}return null};y.get.hwb=function(e){if(!e)return null;var r=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(r);if(n){var t=parseFloat(n[4]),o=(parseFloat(n[1])%360+360)%360,s=w(parseFloat(n[2]),0,100),a=w(parseFloat(n[3]),0,100),l=w(isNaN(t)?1:t,0,1);return[o,s,a,l]}return null};y.to.hex=function(){var e=H(arguments);return"#"+j(e[0])+j(e[1])+j(e[2])+(e[3]<1?j(Math.round(e[3]*255)):"")};y.to.rgb=function(){var e=H(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};y.to.rgb.percent=function(){var e=H(arguments),r=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),t=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+r+"%, "+n+"%, "+t+"%)":"rgba("+r+"%, "+n+"%, "+t+"%, "+e[3]+")"};y.to.hsl=function(){var e=H(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};y.to.hwb=function(){var e=H(arguments),r="";return e.length>=4&&e[3]!==1&&(r=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+r+")"};y.to.keyword=function(e){return D[e.slice(0,3)]};function w(e,r,n){return Math.min(Math.max(r,e),n)}function j(e){var r=Math.round(e).toString(16).toUpperCase();return r.length<2?"0"+r:r}var le=W.exports,A=X,J={};for(let e of Object.keys(A))J[A[e]]=e;var c={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},K=c;for(let e of Object.keys(c)){if(!("channels"in c[e]))throw new Error("missing channels property: "+e);if(!("labels"in c[e]))throw new Error("missing channel labels property: "+e);if(c[e].labels.length!==c[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:r,labels:n}=c[e];delete c[e].channels,delete c[e].labels,Object.defineProperty(c[e],"channels",{value:r}),Object.defineProperty(c[e],"labels",{value:n})}c.rgb.hsl=function(e){let r=e[0]/255,n=e[1]/255,t=e[2]/255,o=Math.min(r,n,t),s=Math.max(r,n,t),a=s-o,l,i;s===o?l=0:r===s?l=(n-t)/a:n===s?l=2+(t-r)/a:t===s&&(l=4+(r-n)/a),l=Math.min(l*60,360),l<0&&(l+=360);let h=(o+s)/2;return s===o?i=0:h<=.5?i=a/(s+o):i=a/(2-s-o),[l,i*100,h*100]};c.rgb.hsv=function(e){let r,n,t,o,s,a=e[0]/255,l=e[1]/255,i=e[2]/255,h=Math.max(a,l,i),p=h-Math.min(a,l,i),v=function(re){return(h-re)/6/p+1/2};return p===0?(o=0,s=0):(s=p/h,r=v(a),n=v(l),t=v(i),a===h?o=t-n:l===h?o=1/3+r-t:i===h&&(o=2/3+n-r),o<0?o+=1:o>1&&(o-=1)),[o*360,s*100,h*100]};c.rgb.hwb=function(e){let r=e[0],n=e[1],t=e[2],o=c.rgb.hsl(e)[0],s=1/255*Math.min(r,Math.min(n,t));return t=1-1/255*Math.max(r,Math.max(n,t)),[o,s*100,t*100]};c.rgb.cmyk=function(e){let r=e[0]/255,n=e[1]/255,t=e[2]/255,o=Math.min(1-r,1-n,1-t),s=(1-r-o)/(1-o)||0,a=(1-n-o)/(1-o)||0,l=(1-t-o)/(1-o)||0;return[s*100,a*100,l*100,o*100]};function ie(e,r){return(e[0]-r[0])**2+(e[1]-r[1])**2+(e[2]-r[2])**2}c.rgb.keyword=function(e){let r=J[e];if(r)return r;let n=1/0,t;for(let o of Object.keys(A)){let s=A[o],a=ie(e,s);a<n&&(n=a,t=o)}return t};c.keyword.rgb=function(e){return A[e]};c.rgb.xyz=function(e){let r=e[0]/255,n=e[1]/255,t=e[2]/255;r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,t=t>.04045?((t+.055)/1.055)**2.4:t/12.92;let o=r*.4124+n*.3576+t*.1805,s=r*.2126+n*.7152+t*.0722,a=r*.0193+n*.1192+t*.9505;return[o*100,s*100,a*100]};c.rgb.lab=function(e){let r=c.rgb.xyz(e),n=r[0],t=r[1],o=r[2];n/=95.047,t/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,t=t>.008856?t**(1/3):7.787*t+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;let s=116*t-16,a=500*(n-t),l=200*(t-o);return[s,a,l]};c.hsl.rgb=function(e){let r=e[0]/360,n=e[1]/100,t=e[2]/100,o,s,a;if(n===0)return a=t*255,[a,a,a];t<.5?o=t*(1+n):o=t+n-t*n;let l=2*t-o,i=[0,0,0];for(let h=0;h<3;h++)s=r+1/3*-(h-1),s<0&&s++,s>1&&s--,6*s<1?a=l+(o-l)*6*s:2*s<1?a=o:3*s<2?a=l+(o-l)*(2/3-s)*6:a=l,i[h]=a*255;return i};c.hsl.hsv=function(e){let r=e[0],n=e[1]/100,t=e[2]/100,o=n,s=Math.max(t,.01);t*=2,n*=t<=1?t:2-t,o*=s<=1?s:2-s;let a=(t+n)/2,l=t===0?2*o/(s+o):2*n/(t+n);return[r,l*100,a*100]};c.hsv.rgb=function(e){let r=e[0]/60,n=e[1]/100,t=e[2]/100,o=Math.floor(r)%6,s=r-Math.floor(r),a=255*t*(1-n),l=255*t*(1-n*s),i=255*t*(1-n*(1-s));switch(t*=255,o){case 0:return[t,i,a];case 1:return[l,t,a];case 2:return[a,t,i];case 3:return[a,l,t];case 4:return[i,a,t];case 5:return[t,a,l]}};c.hsv.hsl=function(e){let r=e[0],n=e[1]/100,t=e[2]/100,o=Math.max(t,.01),s,a;a=(2-n)*t;let l=(2-n)*o;return s=n*o,s/=l<=1?l:2-l,s=s||0,a/=2,[r,s*100,a*100]};c.hwb.rgb=function(e){let r=e[0]/360,n=e[1]/100,t=e[2]/100,o=n+t,s;o>1&&(n/=o,t/=o);let a=Math.floor(6*r),l=1-t;s=6*r-a,a&1&&(s=1-s);let i=n+s*(l-n),h,p,v;switch(a){default:case 6:case 0:h=l,p=i,v=n;break;case 1:h=i,p=l,v=n;break;case 2:h=n,p=l,v=i;break;case 3:h=n,p=i,v=l;break;case 4:h=i,p=n,v=l;break;case 5:h=l,p=n,v=i;break}return[h*255,p*255,v*255]};c.cmyk.rgb=function(e){let r=e[0]/100,n=e[1]/100,t=e[2]/100,o=e[3]/100,s=1-Math.min(1,r*(1-o)+o),a=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,t*(1-o)+o);return[s*255,a*255,l*255]};c.xyz.rgb=function(e){let r=e[0]/100,n=e[1]/100,t=e[2]/100,o,s,a;return o=r*3.2406+n*-1.5372+t*-.4986,s=r*-.9689+n*1.8758+t*.0415,a=r*.0557+n*-.204+t*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),[o*255,s*255,a*255]};c.xyz.lab=function(e){let r=e[0],n=e[1],t=e[2];r/=95.047,n/=100,t/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,t=t>.008856?t**(1/3):7.787*t+16/116;let o=116*n-16,s=500*(r-n),a=200*(n-t);return[o,s,a]};c.lab.xyz=function(e){let r=e[0],n=e[1],t=e[2],o,s,a;s=(r+16)/116,o=n/500+s,a=s-t/200;let l=s**3,i=o**3,h=a**3;return s=l>.008856?l:(s-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,a=h>.008856?h:(a-16/116)/7.787,o*=95.047,s*=100,a*=108.883,[o,s,a]};c.lab.lch=function(e){let r=e[0],n=e[1],t=e[2],o;o=Math.atan2(t,n)*360/2/Math.PI,o<0&&(o+=360);let s=Math.sqrt(n*n+t*t);return[r,s,o]};c.lch.lab=function(e){let r=e[0],n=e[1],t=e[2]/360*2*Math.PI,o=n*Math.cos(t),s=n*Math.sin(t);return[r,o,s]};c.rgb.ansi16=function(e,r=null){let[n,t,o]=e,s=r===null?c.rgb.hsv(e)[2]:r;if(s=Math.round(s/50),s===0)return 30;let a=30+(Math.round(o/255)<<2|Math.round(t/255)<<1|Math.round(n/255));return s===2&&(a+=60),a};c.hsv.ansi16=function(e){return c.rgb.ansi16(c.hsv.rgb(e),e[2])};c.rgb.ansi256=function(e){let r=e[0],n=e[1],t=e[2];return r===n&&n===t?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(n/255*5)+Math.round(t/255*5)};c.ansi16.rgb=function(e){let r=e%10;if(r===0||r===7)return e>50&&(r+=3.5),r=r/10.5*255,[r,r,r];let n=(~~(e>50)+1)*.5,t=(r&1)*n*255,o=(r>>1&1)*n*255,s=(r>>2&1)*n*255;return[t,o,s]};c.ansi256.rgb=function(e){if(e>=232){let s=(e-232)*10+8;return[s,s,s]}e-=16;let r,n=Math.floor(e/36)/5*255,t=Math.floor((r=e%36)/6)/5*255,o=r%6/5*255;return[n,t,o]};c.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};c.hex.rgb=function(e){let r=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!r)return[0,0,0];let n=r[0];r[0].length===3&&(n=n.split("").map(l=>l+l).join(""));let t=parseInt(n,16),o=t>>16&255,s=t>>8&255,a=t&255;return[o,s,a]};c.rgb.hcg=function(e){let r=e[0]/255,n=e[1]/255,t=e[2]/255,o=Math.max(Math.max(r,n),t),s=Math.min(Math.min(r,n),t),a=o-s,l,i;return a<1?l=s/(1-a):l=0,a<=0?i=0:o===r?i=(n-t)/a%6:o===n?i=2+(t-r)/a:i=4+(r-n)/a,i/=6,i%=1,[i*360,a*100,l*100]};c.hsl.hcg=function(e){let r=e[1]/100,n=e[2]/100,t=n<.5?2*r*n:2*r*(1-n),o=0;return t<1&&(o=(n-.5*t)/(1-t)),[e[0],t*100,o*100]};c.hsv.hcg=function(e){let r=e[1]/100,n=e[2]/100,t=r*n,o=0;return t<1&&(o=(n-t)/(1-t)),[e[0],t*100,o*100]};c.hcg.rgb=function(e){let r=e[0]/360,n=e[1]/100,t=e[2]/100;if(n===0)return[t*255,t*255,t*255];let o=[0,0,0],s=r%1*6,a=s%1,l=1-a,i=0;switch(Math.floor(s)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=a;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=a,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*t,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};c.hcg.hsv=function(e){let r=e[1]/100,n=e[2]/100,t=r+n*(1-r),o=0;return t>0&&(o=r/t),[e[0],o*100,t*100]};c.hcg.hsl=function(e){let r=e[1]/100,n=e[2]/100*(1-r)+.5*r,t=0;return n>0&&n<.5?t=r/(2*n):n>=.5&&n<1&&(t=r/(2*(1-n))),[e[0],t*100,n*100]};c.hcg.hwb=function(e){let r=e[1]/100,n=e[2]/100,t=r+n*(1-r);return[e[0],(t-r)*100,(1-t)*100]};c.hwb.hcg=function(e){let r=e[1]/100,n=1-e[2]/100,t=n-r,o=0;return t<1&&(o=(n-t)/(1-t)),[e[0],t*100,o*100]};c.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};c.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};c.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};c.gray.hsl=function(e){return[0,0,e[0]]};c.gray.hsv=c.gray.hsl;c.gray.hwb=function(e){return[0,100,e[0]]};c.gray.cmyk=function(e){return[0,0,0,e[0]]};c.gray.lab=function(e){return[e[0],0,0]};c.gray.hex=function(e){let r=Math.round(e[0]/100*255)&255,n=((r<<16)+(r<<8)+r).toString(16).toUpperCase();return"000000".substring(n.length)+n};c.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};var O=K;function ce(){let e={},r=Object.keys(O);for(let n=r.length,t=0;t<n;t++)e[r[t]]={distance:-1,parent:null};return e}function he(e){let r=ce(),n=[e];for(r[e].distance=0;n.length;){let t=n.pop(),o=Object.keys(O[t]);for(let s=o.length,a=0;a<s;a++){let l=o[a],i=r[l];i.distance===-1&&(i.distance=r[t].distance+1,i.parent=t,n.unshift(l))}}return r}function ue(e,r){return function(n){return r(e(n))}}function ge(e,r){let n=[r[e].parent,e],t=O[r[e].parent][e],o=r[e].parent;for(;r[o].parent;)n.unshift(r[o].parent),t=ue(O[r[o].parent][o],t),o=r[o].parent;return t.conversion=n,t}var fe=function(e){let r=he(e),n={},t=Object.keys(r);for(let o=t.length,s=0;s<o;s++){let a=t[s];r[a].parent!==null&&(n[a]=ge(a,r))}return n},L=K,be=fe,k={},de=Object.keys(L);function pe(e){let r=function(...n){let t=n[0];return t==null?t:(t.length>1&&(n=t),e(n))};return"conversion"in e&&(r.conversion=e.conversion),r}function me(e){let r=function(...n){let t=n[0];if(t==null)return t;t.length>1&&(n=t);let o=e(n);if(typeof o=="object")for(let s=o.length,a=0;a<s;a++)o[a]=Math.round(o[a]);return o};return"conversion"in e&&(r.conversion=e.conversion),r}de.forEach(e=>{k[e]={},Object.defineProperty(k[e],"channels",{value:L[e].channels}),Object.defineProperty(k[e],"labels",{value:L[e].labels});let r=be(e);Object.keys(r).forEach(n=>{let t=r[n];k[e][n]=me(t),k[e][n].raw=pe(t)})});var ye=k,M=le,m=ye,Q=["keyword","gray","hex"],z={};for(let e of Object.keys(m))z[[...m[e].labels].sort().join("")]=e;var F={};function d(e,r){if(!(this instanceof d))return new d(e,r);if(r&&r in Q&&(r=null),r&&!(r in m))throw new Error("Unknown model: "+r);let n,t;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof d)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){let o=M.get(e);if(o===null)throw new Error("Unable to parse color from string: "+e);this.model=o.model,t=m[this.model].channels,this.color=o.value.slice(0,t),this.valpha=typeof o.value[t]=="number"?o.value[t]:1}else if(e.length>0){this.model=r||"rgb",t=m[this.model].channels;let o=Array.prototype.slice.call(e,0,t);this.color=B(o,t),this.valpha=typeof e[t]=="number"?e[t]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let o=Object.keys(e);"alpha"in e&&(o.splice(o.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);let s=o.sort().join("");if(!(s in z))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=z[s];let{labels:a}=m[this.model],l=[];for(n=0;n<a.length;n++)l.push(e[a[n]]);this.color=B(l)}if(F[this.model])for(t=m[this.model].channels,n=0;n<t;n++){let o=F[this.model][n];o&&(this.color[n]=o(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}d.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let r=this.model in M.to?this:this.rgb();r=r.round(typeof e=="number"?e:1);let n=r.valpha===1?r.color:[...r.color,this.valpha];return M.to[r.model](n)},percentString(e){let r=this.rgb().round(typeof e=="number"?e:1),n=r.valpha===1?r.color:[...r.color,this.valpha];return M.to.rgb.percent(n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:r}=m[this.model],{labels:n}=m[this.model];for(let t=0;t<r;t++)e[n[t]]=this.color[t];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new d([...this.color.map(we(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new d([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:u("rgb",0,b(255)),green:u("rgb",1,b(255)),blue:u("rgb",2,b(255)),hue:u(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:u("hsl",1,b(100)),lightness:u("hsl",2,b(100)),saturationv:u("hsv",1,b(100)),value:u("hsv",2,b(100)),chroma:u("hcg",1,b(100)),gray:u("hcg",2,b(100)),white:u("hwb",1,b(100)),wblack:u("hwb",2,b(100)),cyan:u("cmyk",0,b(100)),magenta:u("cmyk",1,b(100)),yellow:u("cmyk",2,b(100)),black:u("cmyk",3,b(100)),x:u("xyz",0,b(95.047)),y:u("xyz",1,b(100)),z:u("xyz",2,b(108.833)),l:u("lab",0,b(100)),a:u("lab",1),b:u("lab",2),keyword(e){return e!==void 0?new d(e):m[this.model].keyword(this.color)},hex(e){return e!==void 0?new d(e):M.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new d(e);let r=this.rgb().round().color,n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),M.to.hex(r)+n},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,r=[];for(let[n,t]of e.entries()){let o=t/255;r[n]=o<=.04045?o/12.92:((o+.055)/1.055)**2.4}return .2126*r[0]+.7152*r[1]+.0722*r[2]},contrast(e){let r=this.luminosity(),n=e.luminosity();return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)},level(e){let r=this.contrast(e);return r>=7?"AAA":r>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let r=0;r<3;r++)e.color[r]=255-e.color[r];return e},lighten(e){let r=this.hsl();return r.color[2]+=r.color[2]*e,r},darken(e){let r=this.hsl();return r.color[2]-=r.color[2]*e,r},saturate(e){let r=this.hsl();return r.color[1]+=r.color[1]*e,r},desaturate(e){let r=this.hsl();return r.color[1]-=r.color[1]*e,r},whiten(e){let r=this.hwb();return r.color[1]+=r.color[1]*e,r},blacken(e){let r=this.hwb();return r.color[2]+=r.color[2]*e,r},grayscale(){let e=this.rgb().color,r=e[0]*.3+e[1]*.59+e[2]*.11;return d.rgb(r,r,r)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let r=this.hsl(),n=r.color[0];return n=(n+e)%360,n=n<0?360+n:n,r.color[0]=n,r},mix(e,r){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let n=e.rgb(),t=this.rgb(),o=r===void 0?.5:r,s=2*o-1,a=n.alpha()-t.alpha(),l=((s*a===-1?s:(s+a)/(1+s*a))+1)/2,i=1-l;return d.rgb(l*n.red()+i*t.red(),l*n.green()+i*t.green(),l*n.blue()+i*t.blue(),n.alpha()*o+t.alpha()*(1-o))}};for(let e of Object.keys(m)){if(Q.includes(e))continue;let{channels:r}=m[e];d.prototype[e]=function(...n){return this.model===e?new d(this):n.length>0?new d(n,e):new d([...Se(m[this.model][e].raw(this.color)),this.valpha],e)},d[e]=function(...n){let t=n[0];return typeof t=="number"&&(t=B(n,r)),new d(t,e)}}function ve(e,r){return Number(e.toFixed(r))}function we(e){return function(r){return ve(r,e)}}function u(e,r,n){e=Array.isArray(e)?e:[e];for(let t of e)(F[t]||(F[t]=[]))[r]=n;return e=e[0],function(t){let o;return t!==void 0?(n&&(t=n(t)),o=this[e](),o.color[r]=t,o):(o=this[e]().color[r],n&&(o=n(o)),o)}}function b(e){return function(r){return Math.max(0,Math.min(e,r))}}function Se(e){return Array.isArray(e)?e:[e]}function B(e,r){for(let n=0;n<r;n++)typeof e[n]!="number"&&(e[n]=0);return e}var ke=d,Me=G(ke),Be={channel:"channel",channels:"channels",colorField:"color-field",colorFieldScope:"scope--color-field",colorMode:"color-mode",colorModeContainer:"color-mode-container",container:"container",control:"control",controlAndScope:"control-and-scope",controlSection:"control-section",deleteColor:"delete-color",header:"header",hexAndChannelsGroup:"hex-and-channels-group",hexOptions:"color-hex-options",hueScope:"scope--hue",hueSlider:"hue-slider",opacityScope:"scope--opacity",opacitySlider:"opacity-slider",preview:"preview",previewAndSliders:"preview-and-sliders",saveColor:"save-color",savedColor:"saved-color",savedColors:"saved-colors",savedColorsButtons:"saved-colors-buttons",savedColorsSection:"saved-colors-section",scope:"scope",section:"section",slider:"slider",sliders:"sliders",splitSection:"section--split"},Ee=Me("#007AC2"),Ge="calcite-color-",Re={r:255,g:255,b:255},xe={h:360,s:100,v:100},_e=xe.h-1,Ie={min:0,max:100},Ae={s:{gap:parseInt(R),slider:{height:12},thumb:{radius:7},preview:{size:20},minWidth:200},m:{gap:parseInt(_),slider:{height:12},thumb:{radius:7},preview:{size:24},minWidth:240},l:{gap:parseInt(I),slider:{height:12},thumb:{radius:7},preview:{size:32},minWidth:304}},qe=1,Ne=/^[0-9A-F]$/i,He=/^#[0-9A-F]{3}$/i,Ce=/^#[0-9A-F]{6}$/i,je=/^#[0-9A-F]{4}$/i,$e=/^#[0-9A-F]{8}$/i,Ve=e=>Number((e*100).toFixed()),We=e=>Number((e/100).toFixed(2));function T(e,r=!1){return E(e,r)||Oe(e,r)}function Y(e,r,n){return e?e.length===r&&n.test(e):!1}function E(e,r=!1){return Y(e,r?5:4,r?je:He)}function Oe(e,r=!1){return Y(e,r?9:7,r?$e:Ce)}function Xe(e,r=!1,n=!1){if(e=e.toLowerCase(),e.startsWith("#")||(e=`#${e}`),E(e,r))return N(V(e,r));if(r&&n&&T(e,!1)){let t=E(e,!1);return N(V(`${e}${t?"f":"ff"}`,!0))}return e}function Pe(e,r=!1){return r?e.hexa():e.hex()}function N(e){let{r,g:n,b:t}=e,o=$(r),s=$(n),a=$(t),l="a"in e?$(e.a*255):"";return`#${o}${s}${a}${l}`.toLowerCase()}function $(e){return e.toString(16).padStart(2,"0")}function Ue(e){let r={...e,a:e.alpha??1};return delete r.alpha,r}function De(e){let r={...e,alpha:e.a??1};return delete r.a,r}function V(e,r=!1){if(!T(e,r))return null;e=e.replace("#","");let n,t,o,s;if(e.length===3||e.length===4){let[a,l,i,h]=e.split("");n=parseInt(`${a}${a}`,16),t=parseInt(`${l}${l}`,16),o=parseInt(`${i}${i}`,16),s=parseInt(`${h}${h}`,16)/255}else n=parseInt(e.slice(0,2),16),t=parseInt(e.slice(2,4),16),o=parseInt(e.slice(4,6),16),s=parseInt(e.slice(6,8),16)/255;return isNaN(s)?{r:n,g:t,b:o}:{r:n,g:t,b:o,a:s}}var Z=e=>e,g=Z({HEX:"hex",HEXA:"hexa",RGB_CSS:"rgb-css",RGBA_CSS:"rgba-css",HSL_CSS:"hsl-css",HSLA_CSS:"hsla-css"}),f=Z({RGB:"rgb",RGBA:"rgba",HSL:"hsl",HSLA:"hsla",HSV:"hsv",HSVA:"hsva"});function Je(e){if(typeof e=="string"){if(e.startsWith("#")){let{length:r}=e;if(r===4||r===7)return g.HEX;if(r===5||r===9)return g.HEXA}if(e.startsWith("rgba("))return g.RGBA_CSS;if(e.startsWith("rgb("))return g.RGB_CSS;if(e.startsWith("hsl("))return g.HSL_CSS;if(e.startsWith("hsla("))return g.HSLA_CSS}if(typeof e=="object"){if(S(e,"r","g","b"))return S(e,"a")?f.RGBA:f.RGB;if(S(e,"h","s","l"))return S(e,"a")?f.HSLA:f.HSL;if(S(e,"h","s","v"))return S(e,"a")?f.HSVA:f.HSV}return null}function S(e,...r){return r.every(n=>n&&e&&`${n}`in e)}function Ke(e,r){return e?.rgb().array().toString()===r?.rgb().array().toString()}function Qe(e){return e===g.HEXA||e===g.RGBA_CSS||e===g.HSLA_CSS||e===f.RGBA||e===f.HSLA||e===f.HSVA}function Te(e){return e===g.HEX?g.HEXA:e===g.RGB_CSS?g.RGBA_CSS:e===g.HSL_CSS?g.HSLA_CSS:e===f.RGB?f.RGBA:e===f.HSL?f.HSLA:e===f.HSV?f.HSVA:e}function Ye(e){return e===g.HEXA?g.HEX:e===g.RGBA_CSS?g.RGB_CSS:e===g.HSLA_CSS?g.HSL_CSS:e===f.RGBA?f.RGB:e===f.HSLA?f.HSL:e===f.HSVA?f.HSV:e}var Fe=1,ee=Fe*2;function Ze(e,r,n){let t=n?Ae.l.preview.size:r.preview.size,o=e-ee,s=r.gap*3;return Math.max(o-s-t,0)}function er(e){let r=e-ee;return{width:Math.max(r,0),height:Math.max(Math.floor(r/1.8),0)}}export{Me as a,Be as b,Ee as c,Ge as d,Re as e,xe as f,_e as g,Ie as h,Ae as i,qe as j,Ne as k,Ve as l,We as m,T as n,E as o,Oe as p,Xe as q,Pe as r,N as s,Ue as t,De as u,V as v,g as w,Je as x,Ke as y,Qe as z,Te as A,Ye as B,Ze as C,er as D};
|
|
3
|
+
v3.1.0-next.0 */
|
|
4
|
+
import{b as G}from"./ARAAYSPA.js";import{e as R,f as _,g as I}from"./62IMSXF5.js";var W={exports:{}},X={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},P={exports:{}},ne=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")},te=ne,oe=Array.prototype.concat,ae=Array.prototype.slice,q=P.exports=function(e){for(var r=[],n=0,t=e.length;n<t;n++){var o=e[n];te(o)?r=oe.call(r,ae.call(o)):r.push(o)}return r};q.wrap=function(e){return function(){return e(q(arguments))}};var se=P.exports,x=X,H=se,U=Object.hasOwnProperty,D=Object.create(null);for(C in x)U.call(x,C)&&(D[x[C]]=C);var C,y=W.exports={to:{},get:{}};y.get=function(e){var r=e.substring(0,3).toLowerCase(),n,t;switch(r){case"hsl":n=y.get.hsl(e),t="hsl";break;case"hwb":n=y.get.hwb(e),t="hwb";break;default:n=y.get.rgb(e),t="rgb";break}return n?{model:t,value:n}:null};y.get.rgb=function(e){if(!e)return null;var r=/^#([a-f0-9]{3,4})$/i,n=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,t=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,a=[0,0,0,1],l,i,h;if(l=e.match(n)){for(h=l[2],l=l[1],i=0;i<3;i++){var p=i*2;a[i]=parseInt(l.slice(p,p+2),16)}h&&(a[3]=parseInt(h,16)/255)}else if(l=e.match(r)){for(l=l[1],h=l[3],i=0;i<3;i++)a[i]=parseInt(l[i]+l[i],16);h&&(a[3]=parseInt(h+h,16)/255)}else if(l=e.match(t)){for(i=0;i<3;i++)a[i]=parseInt(l[i+1],0);l[4]&&(l[5]?a[3]=parseFloat(l[4])*.01:a[3]=parseFloat(l[4]))}else if(l=e.match(o)){for(i=0;i<3;i++)a[i]=Math.round(parseFloat(l[i+1])*2.55);l[4]&&(l[5]?a[3]=parseFloat(l[4])*.01:a[3]=parseFloat(l[4]))}else return(l=e.match(s))?l[1]==="transparent"?[0,0,0,0]:U.call(x,l[1])?(a=x[l[1]],a[3]=1,a):null:null;for(i=0;i<3;i++)a[i]=w(a[i],0,255);return a[3]=w(a[3],0,1),a};y.get.hsl=function(e){if(!e)return null;var r=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(r);if(n){var t=parseFloat(n[4]),o=(parseFloat(n[1])%360+360)%360,s=w(parseFloat(n[2]),0,100),a=w(parseFloat(n[3]),0,100),l=w(isNaN(t)?1:t,0,1);return[o,s,a,l]}return null};y.get.hwb=function(e){if(!e)return null;var r=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(r);if(n){var t=parseFloat(n[4]),o=(parseFloat(n[1])%360+360)%360,s=w(parseFloat(n[2]),0,100),a=w(parseFloat(n[3]),0,100),l=w(isNaN(t)?1:t,0,1);return[o,s,a,l]}return null};y.to.hex=function(){var e=H(arguments);return"#"+j(e[0])+j(e[1])+j(e[2])+(e[3]<1?j(Math.round(e[3]*255)):"")};y.to.rgb=function(){var e=H(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};y.to.rgb.percent=function(){var e=H(arguments),r=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),t=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+r+"%, "+n+"%, "+t+"%)":"rgba("+r+"%, "+n+"%, "+t+"%, "+e[3]+")"};y.to.hsl=function(){var e=H(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};y.to.hwb=function(){var e=H(arguments),r="";return e.length>=4&&e[3]!==1&&(r=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+r+")"};y.to.keyword=function(e){return D[e.slice(0,3)]};function w(e,r,n){return Math.min(Math.max(r,e),n)}function j(e){var r=Math.round(e).toString(16).toUpperCase();return r.length<2?"0"+r:r}var le=W.exports,A=X,J={};for(let e of Object.keys(A))J[A[e]]=e;var c={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},K=c;for(let e of Object.keys(c)){if(!("channels"in c[e]))throw new Error("missing channels property: "+e);if(!("labels"in c[e]))throw new Error("missing channel labels property: "+e);if(c[e].labels.length!==c[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:r,labels:n}=c[e];delete c[e].channels,delete c[e].labels,Object.defineProperty(c[e],"channels",{value:r}),Object.defineProperty(c[e],"labels",{value:n})}c.rgb.hsl=function(e){let r=e[0]/255,n=e[1]/255,t=e[2]/255,o=Math.min(r,n,t),s=Math.max(r,n,t),a=s-o,l,i;s===o?l=0:r===s?l=(n-t)/a:n===s?l=2+(t-r)/a:t===s&&(l=4+(r-n)/a),l=Math.min(l*60,360),l<0&&(l+=360);let h=(o+s)/2;return s===o?i=0:h<=.5?i=a/(s+o):i=a/(2-s-o),[l,i*100,h*100]};c.rgb.hsv=function(e){let r,n,t,o,s,a=e[0]/255,l=e[1]/255,i=e[2]/255,h=Math.max(a,l,i),p=h-Math.min(a,l,i),v=function(re){return(h-re)/6/p+1/2};return p===0?(o=0,s=0):(s=p/h,r=v(a),n=v(l),t=v(i),a===h?o=t-n:l===h?o=1/3+r-t:i===h&&(o=2/3+n-r),o<0?o+=1:o>1&&(o-=1)),[o*360,s*100,h*100]};c.rgb.hwb=function(e){let r=e[0],n=e[1],t=e[2],o=c.rgb.hsl(e)[0],s=1/255*Math.min(r,Math.min(n,t));return t=1-1/255*Math.max(r,Math.max(n,t)),[o,s*100,t*100]};c.rgb.cmyk=function(e){let r=e[0]/255,n=e[1]/255,t=e[2]/255,o=Math.min(1-r,1-n,1-t),s=(1-r-o)/(1-o)||0,a=(1-n-o)/(1-o)||0,l=(1-t-o)/(1-o)||0;return[s*100,a*100,l*100,o*100]};function ie(e,r){return(e[0]-r[0])**2+(e[1]-r[1])**2+(e[2]-r[2])**2}c.rgb.keyword=function(e){let r=J[e];if(r)return r;let n=1/0,t;for(let o of Object.keys(A)){let s=A[o],a=ie(e,s);a<n&&(n=a,t=o)}return t};c.keyword.rgb=function(e){return A[e]};c.rgb.xyz=function(e){let r=e[0]/255,n=e[1]/255,t=e[2]/255;r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,t=t>.04045?((t+.055)/1.055)**2.4:t/12.92;let o=r*.4124+n*.3576+t*.1805,s=r*.2126+n*.7152+t*.0722,a=r*.0193+n*.1192+t*.9505;return[o*100,s*100,a*100]};c.rgb.lab=function(e){let r=c.rgb.xyz(e),n=r[0],t=r[1],o=r[2];n/=95.047,t/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,t=t>.008856?t**(1/3):7.787*t+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;let s=116*t-16,a=500*(n-t),l=200*(t-o);return[s,a,l]};c.hsl.rgb=function(e){let r=e[0]/360,n=e[1]/100,t=e[2]/100,o,s,a;if(n===0)return a=t*255,[a,a,a];t<.5?o=t*(1+n):o=t+n-t*n;let l=2*t-o,i=[0,0,0];for(let h=0;h<3;h++)s=r+1/3*-(h-1),s<0&&s++,s>1&&s--,6*s<1?a=l+(o-l)*6*s:2*s<1?a=o:3*s<2?a=l+(o-l)*(2/3-s)*6:a=l,i[h]=a*255;return i};c.hsl.hsv=function(e){let r=e[0],n=e[1]/100,t=e[2]/100,o=n,s=Math.max(t,.01);t*=2,n*=t<=1?t:2-t,o*=s<=1?s:2-s;let a=(t+n)/2,l=t===0?2*o/(s+o):2*n/(t+n);return[r,l*100,a*100]};c.hsv.rgb=function(e){let r=e[0]/60,n=e[1]/100,t=e[2]/100,o=Math.floor(r)%6,s=r-Math.floor(r),a=255*t*(1-n),l=255*t*(1-n*s),i=255*t*(1-n*(1-s));switch(t*=255,o){case 0:return[t,i,a];case 1:return[l,t,a];case 2:return[a,t,i];case 3:return[a,l,t];case 4:return[i,a,t];case 5:return[t,a,l]}};c.hsv.hsl=function(e){let r=e[0],n=e[1]/100,t=e[2]/100,o=Math.max(t,.01),s,a;a=(2-n)*t;let l=(2-n)*o;return s=n*o,s/=l<=1?l:2-l,s=s||0,a/=2,[r,s*100,a*100]};c.hwb.rgb=function(e){let r=e[0]/360,n=e[1]/100,t=e[2]/100,o=n+t,s;o>1&&(n/=o,t/=o);let a=Math.floor(6*r),l=1-t;s=6*r-a,a&1&&(s=1-s);let i=n+s*(l-n),h,p,v;switch(a){default:case 6:case 0:h=l,p=i,v=n;break;case 1:h=i,p=l,v=n;break;case 2:h=n,p=l,v=i;break;case 3:h=n,p=i,v=l;break;case 4:h=i,p=n,v=l;break;case 5:h=l,p=n,v=i;break}return[h*255,p*255,v*255]};c.cmyk.rgb=function(e){let r=e[0]/100,n=e[1]/100,t=e[2]/100,o=e[3]/100,s=1-Math.min(1,r*(1-o)+o),a=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,t*(1-o)+o);return[s*255,a*255,l*255]};c.xyz.rgb=function(e){let r=e[0]/100,n=e[1]/100,t=e[2]/100,o,s,a;return o=r*3.2406+n*-1.5372+t*-.4986,s=r*-.9689+n*1.8758+t*.0415,a=r*.0557+n*-.204+t*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),[o*255,s*255,a*255]};c.xyz.lab=function(e){let r=e[0],n=e[1],t=e[2];r/=95.047,n/=100,t/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,t=t>.008856?t**(1/3):7.787*t+16/116;let o=116*n-16,s=500*(r-n),a=200*(n-t);return[o,s,a]};c.lab.xyz=function(e){let r=e[0],n=e[1],t=e[2],o,s,a;s=(r+16)/116,o=n/500+s,a=s-t/200;let l=s**3,i=o**3,h=a**3;return s=l>.008856?l:(s-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,a=h>.008856?h:(a-16/116)/7.787,o*=95.047,s*=100,a*=108.883,[o,s,a]};c.lab.lch=function(e){let r=e[0],n=e[1],t=e[2],o;o=Math.atan2(t,n)*360/2/Math.PI,o<0&&(o+=360);let s=Math.sqrt(n*n+t*t);return[r,s,o]};c.lch.lab=function(e){let r=e[0],n=e[1],t=e[2]/360*2*Math.PI,o=n*Math.cos(t),s=n*Math.sin(t);return[r,o,s]};c.rgb.ansi16=function(e,r=null){let[n,t,o]=e,s=r===null?c.rgb.hsv(e)[2]:r;if(s=Math.round(s/50),s===0)return 30;let a=30+(Math.round(o/255)<<2|Math.round(t/255)<<1|Math.round(n/255));return s===2&&(a+=60),a};c.hsv.ansi16=function(e){return c.rgb.ansi16(c.hsv.rgb(e),e[2])};c.rgb.ansi256=function(e){let r=e[0],n=e[1],t=e[2];return r===n&&n===t?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(n/255*5)+Math.round(t/255*5)};c.ansi16.rgb=function(e){let r=e%10;if(r===0||r===7)return e>50&&(r+=3.5),r=r/10.5*255,[r,r,r];let n=(~~(e>50)+1)*.5,t=(r&1)*n*255,o=(r>>1&1)*n*255,s=(r>>2&1)*n*255;return[t,o,s]};c.ansi256.rgb=function(e){if(e>=232){let s=(e-232)*10+8;return[s,s,s]}e-=16;let r,n=Math.floor(e/36)/5*255,t=Math.floor((r=e%36)/6)/5*255,o=r%6/5*255;return[n,t,o]};c.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};c.hex.rgb=function(e){let r=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!r)return[0,0,0];let n=r[0];r[0].length===3&&(n=n.split("").map(l=>l+l).join(""));let t=parseInt(n,16),o=t>>16&255,s=t>>8&255,a=t&255;return[o,s,a]};c.rgb.hcg=function(e){let r=e[0]/255,n=e[1]/255,t=e[2]/255,o=Math.max(Math.max(r,n),t),s=Math.min(Math.min(r,n),t),a=o-s,l,i;return a<1?l=s/(1-a):l=0,a<=0?i=0:o===r?i=(n-t)/a%6:o===n?i=2+(t-r)/a:i=4+(r-n)/a,i/=6,i%=1,[i*360,a*100,l*100]};c.hsl.hcg=function(e){let r=e[1]/100,n=e[2]/100,t=n<.5?2*r*n:2*r*(1-n),o=0;return t<1&&(o=(n-.5*t)/(1-t)),[e[0],t*100,o*100]};c.hsv.hcg=function(e){let r=e[1]/100,n=e[2]/100,t=r*n,o=0;return t<1&&(o=(n-t)/(1-t)),[e[0],t*100,o*100]};c.hcg.rgb=function(e){let r=e[0]/360,n=e[1]/100,t=e[2]/100;if(n===0)return[t*255,t*255,t*255];let o=[0,0,0],s=r%1*6,a=s%1,l=1-a,i=0;switch(Math.floor(s)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=a;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=a,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*t,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};c.hcg.hsv=function(e){let r=e[1]/100,n=e[2]/100,t=r+n*(1-r),o=0;return t>0&&(o=r/t),[e[0],o*100,t*100]};c.hcg.hsl=function(e){let r=e[1]/100,n=e[2]/100*(1-r)+.5*r,t=0;return n>0&&n<.5?t=r/(2*n):n>=.5&&n<1&&(t=r/(2*(1-n))),[e[0],t*100,n*100]};c.hcg.hwb=function(e){let r=e[1]/100,n=e[2]/100,t=r+n*(1-r);return[e[0],(t-r)*100,(1-t)*100]};c.hwb.hcg=function(e){let r=e[1]/100,n=1-e[2]/100,t=n-r,o=0;return t<1&&(o=(n-t)/(1-t)),[e[0],t*100,o*100]};c.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};c.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};c.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};c.gray.hsl=function(e){return[0,0,e[0]]};c.gray.hsv=c.gray.hsl;c.gray.hwb=function(e){return[0,100,e[0]]};c.gray.cmyk=function(e){return[0,0,0,e[0]]};c.gray.lab=function(e){return[e[0],0,0]};c.gray.hex=function(e){let r=Math.round(e[0]/100*255)&255,n=((r<<16)+(r<<8)+r).toString(16).toUpperCase();return"000000".substring(n.length)+n};c.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};var O=K;function ce(){let e={},r=Object.keys(O);for(let n=r.length,t=0;t<n;t++)e[r[t]]={distance:-1,parent:null};return e}function he(e){let r=ce(),n=[e];for(r[e].distance=0;n.length;){let t=n.pop(),o=Object.keys(O[t]);for(let s=o.length,a=0;a<s;a++){let l=o[a],i=r[l];i.distance===-1&&(i.distance=r[t].distance+1,i.parent=t,n.unshift(l))}}return r}function ue(e,r){return function(n){return r(e(n))}}function ge(e,r){let n=[r[e].parent,e],t=O[r[e].parent][e],o=r[e].parent;for(;r[o].parent;)n.unshift(r[o].parent),t=ue(O[r[o].parent][o],t),o=r[o].parent;return t.conversion=n,t}var fe=function(e){let r=he(e),n={},t=Object.keys(r);for(let o=t.length,s=0;s<o;s++){let a=t[s];r[a].parent!==null&&(n[a]=ge(a,r))}return n},L=K,be=fe,k={},de=Object.keys(L);function pe(e){let r=function(...n){let t=n[0];return t==null?t:(t.length>1&&(n=t),e(n))};return"conversion"in e&&(r.conversion=e.conversion),r}function me(e){let r=function(...n){let t=n[0];if(t==null)return t;t.length>1&&(n=t);let o=e(n);if(typeof o=="object")for(let s=o.length,a=0;a<s;a++)o[a]=Math.round(o[a]);return o};return"conversion"in e&&(r.conversion=e.conversion),r}de.forEach(e=>{k[e]={},Object.defineProperty(k[e],"channels",{value:L[e].channels}),Object.defineProperty(k[e],"labels",{value:L[e].labels});let r=be(e);Object.keys(r).forEach(n=>{let t=r[n];k[e][n]=me(t),k[e][n].raw=pe(t)})});var ye=k,M=le,m=ye,Q=["keyword","gray","hex"],z={};for(let e of Object.keys(m))z[[...m[e].labels].sort().join("")]=e;var F={};function d(e,r){if(!(this instanceof d))return new d(e,r);if(r&&r in Q&&(r=null),r&&!(r in m))throw new Error("Unknown model: "+r);let n,t;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof d)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){let o=M.get(e);if(o===null)throw new Error("Unable to parse color from string: "+e);this.model=o.model,t=m[this.model].channels,this.color=o.value.slice(0,t),this.valpha=typeof o.value[t]=="number"?o.value[t]:1}else if(e.length>0){this.model=r||"rgb",t=m[this.model].channels;let o=Array.prototype.slice.call(e,0,t);this.color=B(o,t),this.valpha=typeof e[t]=="number"?e[t]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let o=Object.keys(e);"alpha"in e&&(o.splice(o.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);let s=o.sort().join("");if(!(s in z))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=z[s];let{labels:a}=m[this.model],l=[];for(n=0;n<a.length;n++)l.push(e[a[n]]);this.color=B(l)}if(F[this.model])for(t=m[this.model].channels,n=0;n<t;n++){let o=F[this.model][n];o&&(this.color[n]=o(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}d.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let r=this.model in M.to?this:this.rgb();r=r.round(typeof e=="number"?e:1);let n=r.valpha===1?r.color:[...r.color,this.valpha];return M.to[r.model](n)},percentString(e){let r=this.rgb().round(typeof e=="number"?e:1),n=r.valpha===1?r.color:[...r.color,this.valpha];return M.to.rgb.percent(n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:r}=m[this.model],{labels:n}=m[this.model];for(let t=0;t<r;t++)e[n[t]]=this.color[t];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new d([...this.color.map(we(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new d([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:u("rgb",0,b(255)),green:u("rgb",1,b(255)),blue:u("rgb",2,b(255)),hue:u(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:u("hsl",1,b(100)),lightness:u("hsl",2,b(100)),saturationv:u("hsv",1,b(100)),value:u("hsv",2,b(100)),chroma:u("hcg",1,b(100)),gray:u("hcg",2,b(100)),white:u("hwb",1,b(100)),wblack:u("hwb",2,b(100)),cyan:u("cmyk",0,b(100)),magenta:u("cmyk",1,b(100)),yellow:u("cmyk",2,b(100)),black:u("cmyk",3,b(100)),x:u("xyz",0,b(95.047)),y:u("xyz",1,b(100)),z:u("xyz",2,b(108.833)),l:u("lab",0,b(100)),a:u("lab",1),b:u("lab",2),keyword(e){return e!==void 0?new d(e):m[this.model].keyword(this.color)},hex(e){return e!==void 0?new d(e):M.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new d(e);let r=this.rgb().round().color,n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),M.to.hex(r)+n},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,r=[];for(let[n,t]of e.entries()){let o=t/255;r[n]=o<=.04045?o/12.92:((o+.055)/1.055)**2.4}return .2126*r[0]+.7152*r[1]+.0722*r[2]},contrast(e){let r=this.luminosity(),n=e.luminosity();return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)},level(e){let r=this.contrast(e);return r>=7?"AAA":r>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let r=0;r<3;r++)e.color[r]=255-e.color[r];return e},lighten(e){let r=this.hsl();return r.color[2]+=r.color[2]*e,r},darken(e){let r=this.hsl();return r.color[2]-=r.color[2]*e,r},saturate(e){let r=this.hsl();return r.color[1]+=r.color[1]*e,r},desaturate(e){let r=this.hsl();return r.color[1]-=r.color[1]*e,r},whiten(e){let r=this.hwb();return r.color[1]+=r.color[1]*e,r},blacken(e){let r=this.hwb();return r.color[2]+=r.color[2]*e,r},grayscale(){let e=this.rgb().color,r=e[0]*.3+e[1]*.59+e[2]*.11;return d.rgb(r,r,r)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let r=this.hsl(),n=r.color[0];return n=(n+e)%360,n=n<0?360+n:n,r.color[0]=n,r},mix(e,r){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let n=e.rgb(),t=this.rgb(),o=r===void 0?.5:r,s=2*o-1,a=n.alpha()-t.alpha(),l=((s*a===-1?s:(s+a)/(1+s*a))+1)/2,i=1-l;return d.rgb(l*n.red()+i*t.red(),l*n.green()+i*t.green(),l*n.blue()+i*t.blue(),n.alpha()*o+t.alpha()*(1-o))}};for(let e of Object.keys(m)){if(Q.includes(e))continue;let{channels:r}=m[e];d.prototype[e]=function(...n){return this.model===e?new d(this):n.length>0?new d(n,e):new d([...Se(m[this.model][e].raw(this.color)),this.valpha],e)},d[e]=function(...n){let t=n[0];return typeof t=="number"&&(t=B(n,r)),new d(t,e)}}function ve(e,r){return Number(e.toFixed(r))}function we(e){return function(r){return ve(r,e)}}function u(e,r,n){e=Array.isArray(e)?e:[e];for(let t of e)(F[t]||(F[t]=[]))[r]=n;return e=e[0],function(t){let o;return t!==void 0?(n&&(t=n(t)),o=this[e](),o.color[r]=t,o):(o=this[e]().color[r],n&&(o=n(o)),o)}}function b(e){return function(r){return Math.max(0,Math.min(e,r))}}function Se(e){return Array.isArray(e)?e:[e]}function B(e,r){for(let n=0;n<r;n++)typeof e[n]!="number"&&(e[n]=0);return e}var ke=d,Me=G(ke),Be={channel:"channel",channels:"channels",colorField:"color-field",colorFieldScope:"scope--color-field",colorMode:"color-mode",colorModeContainer:"color-mode-container",container:"container",control:"control",controlAndScope:"control-and-scope",controlSection:"control-section",deleteColor:"delete-color",header:"header",hexAndChannelsGroup:"hex-and-channels-group",hexOptions:"color-hex-options",hueScope:"scope--hue",hueSlider:"hue-slider",opacityScope:"scope--opacity",opacitySlider:"opacity-slider",preview:"preview",previewAndSliders:"preview-and-sliders",saveColor:"save-color",savedColor:"saved-color",savedColors:"saved-colors",savedColorsButtons:"saved-colors-buttons",savedColorsSection:"saved-colors-section",scope:"scope",section:"section",slider:"slider",sliders:"sliders",splitSection:"section--split"},Ee=Me("#007AC2"),Ge="calcite-color-",Re={r:255,g:255,b:255},xe={h:360,s:100,v:100},_e=xe.h-1,Ie={min:0,max:100},Ae={s:{gap:parseInt(R),slider:{height:12},thumb:{radius:7},preview:{size:20},minWidth:200},m:{gap:parseInt(_),slider:{height:12},thumb:{radius:7},preview:{size:24},minWidth:240},l:{gap:parseInt(I),slider:{height:12},thumb:{radius:7},preview:{size:32},minWidth:304}},qe=1,Ne=/^[0-9A-F]$/i,He=/^#[0-9A-F]{3}$/i,Ce=/^#[0-9A-F]{6}$/i,je=/^#[0-9A-F]{4}$/i,$e=/^#[0-9A-F]{8}$/i,Ve=e=>Number((e*100).toFixed()),We=e=>Number((e/100).toFixed(2));function T(e,r=!1){return E(e,r)||Oe(e,r)}function Y(e,r,n){return e?e.length===r&&n.test(e):!1}function E(e,r=!1){return Y(e,r?5:4,r?je:He)}function Oe(e,r=!1){return Y(e,r?9:7,r?$e:Ce)}function Xe(e,r=!1,n=!1){if(e=e.toLowerCase(),e.startsWith("#")||(e=`#${e}`),E(e,r))return N(V(e,r));if(r&&n&&T(e,!1)){let t=E(e,!1);return N(V(`${e}${t?"f":"ff"}`,!0))}return e}function Pe(e,r=!1){return r?e.hexa():e.hex()}function N(e){let{r,g:n,b:t}=e,o=$(r),s=$(n),a=$(t),l="a"in e?$(e.a*255):"";return`#${o}${s}${a}${l}`.toLowerCase()}function $(e){return e.toString(16).padStart(2,"0")}function Ue(e){let r={...e,a:e.alpha??1};return delete r.alpha,r}function De(e){let r={...e,alpha:e.a??1};return delete r.a,r}function V(e,r=!1){if(!T(e,r))return null;e=e.replace("#","");let n,t,o,s;if(e.length===3||e.length===4){let[a,l,i,h]=e.split("");n=parseInt(`${a}${a}`,16),t=parseInt(`${l}${l}`,16),o=parseInt(`${i}${i}`,16),s=parseInt(`${h}${h}`,16)/255}else n=parseInt(e.slice(0,2),16),t=parseInt(e.slice(2,4),16),o=parseInt(e.slice(4,6),16),s=parseInt(e.slice(6,8),16)/255;return isNaN(s)?{r:n,g:t,b:o}:{r:n,g:t,b:o,a:s}}var Z=e=>e,g=Z({HEX:"hex",HEXA:"hexa",RGB_CSS:"rgb-css",RGBA_CSS:"rgba-css",HSL_CSS:"hsl-css",HSLA_CSS:"hsla-css"}),f=Z({RGB:"rgb",RGBA:"rgba",HSL:"hsl",HSLA:"hsla",HSV:"hsv",HSVA:"hsva"});function Je(e){if(typeof e=="string"){if(e.startsWith("#")){let{length:r}=e;if(r===4||r===7)return g.HEX;if(r===5||r===9)return g.HEXA}if(e.startsWith("rgba("))return g.RGBA_CSS;if(e.startsWith("rgb("))return g.RGB_CSS;if(e.startsWith("hsl("))return g.HSL_CSS;if(e.startsWith("hsla("))return g.HSLA_CSS}if(typeof e=="object"){if(S(e,"r","g","b"))return S(e,"a")?f.RGBA:f.RGB;if(S(e,"h","s","l"))return S(e,"a")?f.HSLA:f.HSL;if(S(e,"h","s","v"))return S(e,"a")?f.HSVA:f.HSV}return null}function S(e,...r){return r.every(n=>n&&e&&`${n}`in e)}function Ke(e,r){return e?.rgb().array().toString()===r?.rgb().array().toString()}function Qe(e){return e===g.HEXA||e===g.RGBA_CSS||e===g.HSLA_CSS||e===f.RGBA||e===f.HSLA||e===f.HSVA}function Te(e){return e===g.HEX?g.HEXA:e===g.RGB_CSS?g.RGBA_CSS:e===g.HSL_CSS?g.HSLA_CSS:e===f.RGB?f.RGBA:e===f.HSL?f.HSLA:e===f.HSV?f.HSVA:e}function Ye(e){return e===g.HEXA?g.HEX:e===g.RGBA_CSS?g.RGB_CSS:e===g.HSLA_CSS?g.HSL_CSS:e===f.RGBA?f.RGB:e===f.HSLA?f.HSL:e===f.HSVA?f.HSV:e}var Fe=1,ee=Fe*2;function Ze(e,r,n){let t=n?Ae.l.preview.size:r.preview.size,o=e-ee,s=r.gap*3;return Math.max(o-s-t,0)}function er(e){let r=e-ee;return{width:Math.max(r,0),height:Math.max(Math.floor(r/1.8),0)}}export{Me as a,Be as b,Ee as c,Ge as d,Re as e,xe as f,_e as g,Ie as h,Ae as i,qe as j,Ne as k,Ve as l,We as m,T as n,E as o,Oe as p,Xe as q,Pe as r,N as s,Ue as t,De as u,V as v,g as w,Je as x,Ke as y,Qe as z,Te as A,Ye as B,Ze as C,er as D};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v3.0.0 */
|
|
4
|
-
import{b as $}from"./
|
|
3
|
+
v3.1.0-next.0 */
|
|
4
|
+
import{b as $}from"./ISKYJPVP.js";import{b as p,f as b,g as x,k as S,l as D}from"./6I7N4DJM.js";var L=5;function d({locale:e,numberingSystem:n,includeSeconds:r=!0,fractionalSecondDigits:t,hour12:o}){let i={hour:"2-digit",minute:"2-digit",timeZone:"UTC",numberingSystem:x(n)};return typeof o=="boolean"&&(i.hour12=o),r&&(i.second="2-digit",t&&(i.fractionalSecondDigits=t)),D(e,i)}function h(e,n){if(e==null)return;let r=e.toString(),t=$(e);if(e<1&&t>0&&t<4){let o=r.replace("0.","");return!n||o.length===n?o:o.length<n?o.padEnd(n,"0"):o}if(e>=0&&e<10)return r.padStart(2,"0");if(e>=10)return r}function k(e){if(!g(e))return null;let{hour:n,minute:r,second:t,fractionalSecond:o}=y(e),i=`${h(parseInt(n))}:${h(parseInt(r))}`;return t&&(i+=`:${h(parseInt(t))}`,o&&(i+=`.${o}`)),i}function z(e){return parseInt((parseFloat(`0.${e}`)/.001).toFixed(3))}function A(e){let n={locale:e};e==="mk"?n.hour12=!1:e.toLowerCase()==="es-mx"&&(n.hour12=!0);let r=d(n).formatToParts(new Date(Date.UTC(0,0,0,0,0,0)));return s("meridiem",r)?"12":"24"}function v(e){return A(e)==="24"?"12":"24"}function M(e,n,r="latn"){let t=d({hour12:!0,locale:e,numberingSystem:r}),o=6,i=18,l=new Date(Date.UTC(0,0,0,n==="AM"?o:i,0)),c=t.formatToParts(l);return s("meridiem",c)}function T(e,n){return S.numberFormatOptions={locale:e,numberingSystem:n},S.localize("1.1").split("")[1]}function H(e,n,r="latn"){let t=d({locale:n,numberingSystem:r}).formatToParts(new Date(Date.UTC(0,0,0,0,0,0)));return s(`${e}Suffix`,t)}function s(e,n){if(!e||!n)return null;if(e==="hourSuffix"){let r=n.indexOf(n.find(({type:i})=>i==="hour")),t=n.indexOf(n.find(({type:i})=>i==="minute")),o=n[r+1];return o&&o.type==="literal"&&t-r===2&&o.value?.trim()||null}if(e==="minuteSuffix"){let r=n.indexOf(n.find(({type:i})=>i==="minute")),t=n.indexOf(n.find(({type:i})=>i==="second")),o=n[r+1];return o&&o.type==="literal"&&t-r===2&&o.value?.trim()||null}if(e==="secondSuffix"){let r=n.indexOf(n.find(({type:o})=>o==="second")),t=n[r+1];return t&&t.type==="literal"&&t.value?.trim()||null}return n.find(({type:r})=>e=="meridiem"?r==="dayPeriod":r===e)?.value||null}function E(e){if(!p(e))return null;let n=parseInt(e);return n>=0&&n<=11?"AM":"PM"}function W(e){let n=M(e,"AM"),r=M(e,"PM"),t=w(e),o=P({hour12:!0,value:"00:00:00",locale:e,numberingSystem:"latn"}),i=o[t===0?1:t-1].type==="hour"||o[t-1]?.type==="second"?"":" ";return e!=="no"&&n===n.toLocaleLowerCase(e)&&r===r.toLocaleLowerCase(e)?t===0?`a${i}`:`${i}a`:t===0?`A${i}`:`${i}A`}function w(e){return P({hour12:!0,value:"00:00:00",locale:e,numberingSystem:"latn"}).findIndex(n=>n.type==="dayPeriod")}function j(e,n){return e===v(n)}function g(e){if(!e||e.startsWith(":")||e.endsWith(":"))return!1;let n=e.split(":");if(!(n.length>1&&n.length<4))return!1;let[r,t,o]=n,i=parseInt(n[0]),l=parseInt(n[1]),c=parseInt(n[2]),f=p(r)&&i>=0&&i<24,u=p(t)&&l>=0&&l<60,m=p(o)&&c>=0&&c<60;if(f&&u&&!o||f&&u&&m)return!0}function C(e,n){if(n==="meridiem")return e==="AM"||e==="PM";if(!p(e))return!1;let r=Number(e);return n==="hour"?r>=0&&r<24:r>=0&&r<60}function O({value:e,part:n,locale:r,numberingSystem:t="latn",hour12:o}){if(n==="fractionalSecond"){let f=T(r,t),u=null;if(e){S.numberFormatOptions={locale:r,numberingSystem:t};let m=S.localize("0");parseInt(e)===0?u="".padStart(e.length,m):(u=S.localize(`0.${e}`).replace(`${m}${f}`,""),u.length<e.length&&(u=u.padEnd(e.length,m)))}return u}if(!C(e,n))return;let i=parseInt(e),l=new Date(Date.UTC(0,0,0,n==="hour"?i:n==="meridiem"?e==="AM"?0:12:0,n==="minute"?i:0,n==="second"?i:0));if(!l)return;let c=d({hour12:o,locale:r,numberingSystem:t}).formatToParts(l);return s(n,c)}function Z({value:e,locale:n,numberingSystem:r="latn",includeSeconds:t=!0,fractionalSecondDigits:o,hour12:i}){if(!g(e))return null;let{hour:l,minute:c,second:f="0",fractionalSecond:u}=y(e),m=new Date(Date.UTC(0,0,0,parseInt(l),parseInt(c),parseInt(f),u&&z(u))),a=d({locale:n,numberingSystem:r,includeSeconds:t,fractionalSecondDigits:o,hour12:i}).format(m)||null;if(a&&n==="bg"&&a.includes(" \u0447.")&&(a=a.replaceAll(" \u0447.","")),n==="bs"||n==="mk"){let I=b.get(n);a.includes("AM")?a=a.replaceAll("AM",I.am):a.includes("PM")&&(a=a.replaceAll("PM",I.pm)),a.indexOf(".")!==a.length-1&&(a=a.replace(".",","))}return a}function q({value:e,locale:n,numberingSystem:r="latn",hour12:t}){if(!g(e))return null;let{hour:o,minute:i,second:l="0",fractionalSecond:c}=y(e),f=new Date(Date.UTC(0,0,0,parseInt(o),parseInt(i),parseInt(l)));if(f){let u=d({locale:n,numberingSystem:r,hour12:t}).formatToParts(f),m=s("meridiem",u);if(t&&(n==="bs"||n==="mk")){let a=b.get(n);m=f.getHours()>11?a.am:a.pm}return{localizedHour:s("hour",u),localizedHourSuffix:s("hourSuffix",u),localizedMinute:s("minute",u),localizedMinuteSuffix:s("minuteSuffix",u),localizedSecond:s("second",u),localizedDecimalSeparator:T(n,r),localizedFractionalSecond:O({value:c,part:"fractionalSecond",locale:n,numberingSystem:r}),localizedSecondSuffix:s("secondSuffix",u),localizedMeridiem:m}}return null}function P({hour12:e,value:n,locale:r,numberingSystem:t}){if(!g(n))return null;let{hour:o,minute:i,second:l="0"}=y(n),c=new Date(Date.UTC(0,0,0,parseInt(o),parseInt(i),parseInt(l)));return c?d({hour12:e,locale:r,numberingSystem:t}).formatToParts(c):null}function y(e){if(g(e)){let[n,r,t]=e.split(":"),o=t,i=null;return t?.includes(".")&&([o,i]=t.split(".")),{fractionalSecond:i,hour:n,minute:r,second:o}}return{fractionalSecond:null,hour:null,minute:null,second:null}}function B(e,n=!0){if(!g(e))return"";let{hour:r,minute:t,second:o,fractionalSecond:i}=y(e),l=`${h(parseInt(r))}:${h(parseInt(t))}`;return n&&(l+=`:${h(parseInt(n&&o||"0"))}`,i&&(l+=`.${i}`)),l}export{L as a,h as b,k as c,A as d,v as e,T as f,H as g,E as h,W as i,w as j,j as k,g as l,O as m,Z as n,q as o,y as p,B as q};
|
|
@@ -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.0 */
|
|
4
|
-
import{a as f,b as g}from"./
|
|
3
|
+
v3.1.0-next.0 */
|
|
4
|
+
import{a as f,b as g}from"./RWRS2NU2.js";import{a as b}from"./F3Y2S6BF.js";import"./NKVV542U.js";var M=new Date,T=M.toISOString(),v=365,y=v,R={groupDateRange:y,startDate:T},S=(t,r,e)=>{let o=[],n=e.create(t);for(let l=0;l<=r;l++)n=e.increase(n),o.push(e.formatToIsoDateString(n));return o},w=(t,r,e,o)=>{let n=new Map,l=S(r,e,o);return t.map(c=>{let{label:s}=c,a=g(s),u=l.map(m=>{let d=`${m}-${s}`,i=n.get(d);return i||(i=o.isoToTimeZone(m,s),n.set(d,i),i)});return{...c,continent:a,isRegularContinent:a!==f,dates:u}})},J=(t,r,e)=>t.length===r.length&&t.every((o,n)=>e.same(o,r[n])),Z=(t,r=5)=>{let e=t.filter(({label:n})=>g(n)!==f);if(e.length===0)return[0];let o=e.map(n=>t.indexOf(n));return x(o,r)};function x(t,r=5){let e=t.length;if(e<=r)return t;let o=Math.min(e-2,r-2),n=(e-1)/(o+1);return[t[0],...Array.from({length:o},(l,c)=>t[Math.round((c+1)*n)]),t[e-1]]}async function G(t){let{groupDateRange:r,startDate:e,dateEngine:o}={...R,...t},n=[];if(!o)throw new Error("dateEngine is required");let l=b.map(s=>({label:s})),c=w(l,e,r,o);for(let s of c){let{label:a,continent:u,dates:m}=s;if(s.visited)continue;s.visited=!0;let d={labelIdx:[],tzs:[{label:a}]};for(let i of c.filter(p=>!p.visited)){let{label:p,continent:h,isRegularContinent:z,dates:D}=i;if((u===h||!z)&&J(m,D,o)){let I={label:p};d.tzs.push(I),i.visited=!0}}n.push(d)}return n.map(s=>(s.tzs=s.tzs.sort((a,u)=>a.label.localeCompare(u.label)),{labelTzIdx:Z(s.tzs,7),tzs:s.tzs.map(a=>a.label)})).sort((s,a)=>a.tzs.length-s.tzs.length)}export{G as groupByOffset};
|
|
@@ -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.0 */
|
|
4
|
-
import{a as b}from"./
|
|
3
|
+
v3.1.0-next.0 */
|
|
4
|
+
import{a as b}from"./CQ5FVCCX.js";import{a as $}from"./YSGHAVSA.js";import{a as f}from"./MYKRE5QO.js";import{n as m}from"./FE2QRVI7.js";import{b as k}from"./7VOKVNOX.js";import"./7LGBDOYP.js";import{J as x,e as h,f as l,v,w as p,x as c,z as u}from"./IPEYLL4T.js";var a={content:"content",toggle:"toggle"},t={chevronIcon:"chevron-icon",content:"content",iconStart:"icon--start",iconEnd:"icon--end",invalid:"invalid",sectionHeader:"section-header",sectionHeaderText:"section-header__text",statusIcon:"status-icon",switch:"switch",toggle:"toggle",toggleSwitch:"toggle--switch",toggleContainer:"toggle-container",toggleSwitchContent:"toggle--switch__content",toggleSwitchText:"toggle--switch__text",valid:"valid"},s={menuOpen:"chevron-up",menuClosed:"chevron-down",valid:"check-circle",invalid:"exclamation-mark-triangle"},y=h`:host{box-sizing:border-box;display:block;font-size:var(--calcite-font-size--1);color:var(--calcite-block-section-header-text-color, var(--calcite-color-text-2));background-color:var(--calcite-block-section-background-color, var(--calcite-color-foreground-1))}:host([open]){border-width:0px;border-block-end-width:1px;border-style:solid;border-block-end-color:var(--calcite-block-section-border-color, var(--calcite-color-border-3))}:host([open]) .toggle{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}:host([open]) .toggle:hover{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}:host([open]) .chevron-icon{color:var(--calcite-block-section-text-color, var(--calcite-color-text-3))}:host([open]) .chevron-icon:hover{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}:host(:last-child){border-block-end-width:0px}.toggle{inline-size:100%;border-width:0px;font-family:var(--calcite-font-family);gap:var(--calcite-spacing-md);color:var(--calcite-block-section-header-text-color, var(--calcite-color-text-2));background-color:var(--calcite-block-section-background-color, transparent);font-weight:var(--calcite-font-weight-normal)}.toggle:hover{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}.toggle--switch,.section-header{margin-inline:0px;margin-block:.25rem;display:flex;cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;padding-inline:0px;padding-block:.5rem;font-size:var(--calcite-font-size--1);outline-color:transparent}.toggle--switch:focus,.section-header: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))))}.toggle--switch:hover,.section-header:hover{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}.section-header__text{margin-block:0px;flex:1 1 auto;text-align:initial;word-wrap:anywhere}.toggle-container{position:relative;display:flex;align-items:center;word-break:break-word;background-color:var(--calcite-block-section-background-color, transparent)}.toggle-container .toggle--switch__content{display:flex;flex:1 1 auto;align-items:center}.toggle-container .icon--end,.toggle-container .icon--start,.toggle-container .chevron-icon{display:flex;align-items:center;color:var(--calcite-block-section-text-color, var(--calcite-color-text-3))}.toggle-container .icon--end:hover,.toggle-container .icon--start:hover,.toggle-container .chevron-icon:hover{color:var(--calcite-block-section-text-color-hover, var(--calcite-color-text-1))}.status-icon{display:flex;align-items:center}.status-icon.valid{color:var(--calcite-color-status-success)}.status-icon.invalid{color:var(--calcite-color-status-danger)}:host([hidden]){display:none}[hidden]{display:none}`,d=class extends p{constructor(){super(...arguments),this.messages=f(),this.open=!1,this.toggleDisplay="button",this.calciteBlockSectionToggle=v({cancelable:!1})}static{this.properties={iconEnd:3,iconFlipRtl:3,iconStart:3,messageOverrides:0,open:7,status:3,text:1,toggleDisplay:3}}static{this.styles=y}async setFocus(){await k(this),m(this.el)}async load(){}loaded(){}handleHeaderKeyDown(e){$(e.key)&&(this.toggleSection(),e.preventDefault(),e.stopPropagation())}toggleSection(){this.open=!this.open,this.calciteBlockSectionToggle.emit()}renderStatusIcon(){let{status:e}=this,o=s[e]??!1,i={[t.statusIcon]:!0,[t.valid]:e=="valid",[t.invalid]:e=="invalid"};return o?l`<calcite-icon class=${c(i)} .icon=${o} scale=s></calcite-icon>`:null}renderIcon(e){let{iconFlipRtl:o}=this;if(e===void 0)return null;let i=o==="both"||o==="start",r=o==="both"||o==="end",n=e===this.iconStart;return b(n?this.iconStart:this.iconEnd,l`<calcite-icon class=${c(n?t.iconStart:t.iconEnd)} .flipRtl=${n?i:r} .icon=${n?this.iconStart:this.iconEnd} scale=s></calcite-icon>`)}render(){let{messages:e,open:o,text:i,toggleDisplay:r}=this,n=o?s.menuOpen:s.menuClosed,g=o?e.collapse:e.expand,w=r==="switch"?l`<div class=${c({[t.toggleContainer]:!0})}><div aria-controls=${a.content} .ariaExpanded=${o} class=${c({[t.toggle]:!0,[t.toggleSwitch]:!0})} id=${a.toggle} @click=${this.toggleSection} @keydown=${this.handleHeaderKeyDown} role=button tabindex=0 title=${g??u}>${this.renderIcon(this.iconStart)}<div class=${c(t.toggleSwitchContent)}><span class=${c(t.toggleSwitchText)}>${i}</span></div>${this.renderIcon(this.iconEnd)}${this.renderStatusIcon()}<calcite-switch .checked=${o} class=${c(t.switch)} inert .label=${g} scale=s></calcite-switch></div></div>`:l`<div class=${c({[t.toggleContainer]:!0})}><button aria-controls=${a.content} .ariaExpanded=${o} class=${c({[t.sectionHeader]:!0,[t.toggle]:!0})} id=${a.toggle} @click=${this.toggleSection}>${this.renderIcon(this.iconStart)}<span class=${c(t.sectionHeaderText)}>${i}</span>${this.renderIcon(this.iconEnd)}${this.renderStatusIcon()}<calcite-icon class=${c(t.chevronIcon)} .icon=${n} scale=s></calcite-icon></button></div>`;return l`${w}<section aria-labelledby=${a.toggle} class=${c(t.content)} .hidden=${!o} id=${a.content}><slot></slot></section>`}};x("calcite-block-section",d);export{d as BlockSection};
|
|
@@ -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.0 */
|
|
4
|
-
import{f as e,x as r}from"./
|
|
3
|
+
v3.1.0-next.0 */
|
|
4
|
+
import{f as e,x as r}from"./IPEYLL4T.js";var c={textMatch:"text-match"};function o({text:a,pattern:s}){if(!s||!a)return a;let t=a.split(s);return t.length>1&&(t[1]=e`<mark class=${r(c.textMatch)}>${t[1]}</mark>`),t}export{o 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.0 */
|
|
4
|
-
import{c as m}from"./
|
|
3
|
+
v3.1.0-next.0 */
|
|
4
|
+
import{c as m}from"./WQI63ENU.js";import"./RSMRASRN.js";import{a as y}from"./R3FLP5QS.js";import{a as z}from"./MYKRE5QO.js";import{b as S}from"./WACTC6C2.js";import{v as A,z as l}from"./FE2QRVI7.js";import{a as I}from"./7LGBDOYP.js";import{J as f,e as b,f as a,g,j as h,v as c,w as v,x as r}from"./IPEYLL4T.js";var p={actionIcon:"action-icon",actionContainer:"action-container",stepBarContainer:"step-bar-container",singleView:"single-view"},o={stepBar:"step-bar",stepBarActive:"step-bar--active",stepBarComplete:"step-bar--complete",stepBarDisabled:"step-bar--disabled",stepBarError:"step-bar--error",stepBarInActive:"step-bar--inactive"},P=({disabled:u,active:e,complete:t,error:i})=>a`<svg class=${r({[o.stepBar]:!0})}>${g`<rect class=${r({[o.stepBarActive]:e,[o.stepBarComplete]:t,[o.stepBarDisabled]:u,[o.stepBarError]:i,[o.stepBarInActive]:!0})} width=100% x=0 y=0 />`}</svg>`,$=b`:host([scale=s]){--calcite-internal-stepper-item-spacing-unit-s: .25rem;--calcite-internal-stepper-action-block-size: 2.75rem;--calcite-internal-stepper-action-inline-size: 2rem;--calcite-internal-step-bar-gap: .25rem}:host([scale=m]){--calcite-internal-stepper-item-spacing-unit-s: .5rem;--calcite-internal-stepper-action-block-size: 3.25rem;--calcite-internal-stepper-action-inline-size: 2.5rem}:host([scale=l]){--calcite-internal-stepper-item-spacing-unit-s: .75rem;--calcite-internal-stepper-action-block-size: 4rem;--calcite-internal-stepper-action-inline-size: 3rem;--calcite-internal-step-bar-gap: .75rem}:host{display:flex}.container{position:relative;display:flex;inline-size:100%;min-inline-size:fit-content;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:space-between}:host([layout=vertical]) .container{flex:1 1 auto;flex-direction:column}:host([layout=horizontal]) .container,:host([layout=horizontal-single]) .container{display:grid;grid-template-areas:"items" "content";gap:.5rem var(--calcite-internal-stepper-item-spacing-unit-s)}:host([layout=horizontal][scale=s]) .container,:host([layout=horizontal-single][scale=s]) .container{gap:.25rem var(--calcite-internal-stepper-item-spacing-unit-s)}:host([layout=horizontal][scale=l]) .container,:host([layout=horizontal-single][scale=l]) .container{gap:.75rem var(--calcite-internal-stepper-item-spacing-unit-s)}:host([layout=horizontal]) .container.single-view{display:flex;grid-template-columns:none}.action-icon{position:relative;display:flex;flex-grow:0;block-size:var(--calcite-internal-stepper-action-block-size);inline-size:var(--calcite-internal-stepper-action-inline-size)}.action-container{position:absolute;display:flex;justify-content:space-between;padding-block:.25rem;inline-size:100%}.step-bar{display:flex;block-size:100%;inline-size:100%}.step-bar-container{position:absolute;display:flex;align-items:flex-start;justify-content:space-between;block-size:.125rem;inline-size:100%;gap:var(--calcite-internal-step-bar-gap, .5rem)}.step-bar--inactive{fill:var(--calcite-color-border-3, #dfdfdf);fill-opacity:1;block-size:100%}.step-bar--active{fill:var(--calcite-color-brand)}.step-bar--complete{fill:var(--calcite-color-brand);fill-opacity:.5}.step-bar--error{fill:var(--calcite-color-status-danger)}.step-bar--disabled{opacity:.5}:host([hidden]){display:none}[hidden]{display:none}`,d=class extends v{constructor(){super(),this.enabledItems=[],this.guid=`calcite-stepper-action-${I()}`,this.itemMap=new Map,this.items=[],this.multipleViewMode=!1,this.mutationObserver=y("mutation",()=>this.updateItems()),this.icon=!1,this.layout="horizontal",this.messages=z(),this.numbered=!1,this.scale="m",this.selectedItem=null,this.calciteInternalStepperItemChange=c({cancelable:!1}),this.calciteStepperChange=c({cancelable:!1}),this.calciteStepperItemChange=c({cancelable:!1}),this.listen("calciteInternalStepperItemKeyEvent",this.calciteInternalStepperItemKeyEvent),this.listen("calciteInternalStepperItemRegister",this.registerItem),this.listen("calciteInternalStepperItemSelect",this.updateItem),this.listen("calciteStepperItemSelect",this.handleItemSelect)}static{this.properties={currentActivePosition:16,icon:7,layout:3,messageOverrides:0,numbered:7,numberingSystem:3,scale:3,selectedItem:0}}static{this.styles=$}async endStep(){let e=this.getEnabledStepIndex(this.items.length-1,"previous");typeof e=="number"&&this.updateStep(e)}async goToStep(e){let t=e-1;this.currentActivePosition!==t&&this.updateStep(t)}async nextStep(){let e=this.getEnabledStepIndex(this.currentActivePosition+1,"next");typeof e=="number"&&this.updateStep(e)}async prevStep(){let e=this.getEnabledStepIndex(this.currentActivePosition-1,"previous");typeof e=="number"&&this.updateStep(e)}async startStep(){let e=this.getEnabledStepIndex(0,"next");typeof e=="number"&&this.updateStep(e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0}),this.updateItems()}willUpdate(e){(e.has("icon")&&(this.hasUpdated||this.icon!==!1)||e.has("layout")&&(this.hasUpdated||this.layout!=="horizontal")||e.has("numbered")&&(this.hasUpdated||this.numbered!==!1)||e.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&(this.updateItems(),this.determineActiveStepper()),e.has("numberingSystem")&&this.setStepperItemNumberingSystem(),e.has("currentActivePosition")&&requestAnimationFrame(()=>{this.determineActiveStepper()})}loaded(){if(typeof this.currentActivePosition!="number"){let e=this.getFirstEnabledStepperPosition();e===0&&(this.currentActivePosition=e),this.calciteInternalStepperItemChange.emit({position:e})}}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}calciteInternalStepperItemKeyEvent(e){let t=e.detail.item,i=e.target;switch(t.key){case"ArrowDown":case"ArrowRight":l(this.enabledItems,i,"next");break;case"ArrowUp":case"ArrowLeft":l(this.enabledItems,i,"previous");break;case"Home":l(this.enabledItems,i,"first");break;case"End":l(this.enabledItems,i,"last");break}e.stopPropagation()}registerItem(e){let t=e.target,{content:i,position:s}=e.detail;this.itemMap.set(t,{position:s,content:i}),this.enabledItems=this.filterItems(),e.stopPropagation()}updateItem(e){let{position:t}=e.detail;typeof t=="number"&&(this.currentActivePosition=t,this.selectedItem=e.target),this.calciteInternalStepperItemChange.emit({position:t})}handleItemSelect(){this.emitItemSelect()}emitItemSelect(){this.calciteStepperItemChange.emit(),this.calciteStepperChange.emit()}updateItems(){this.el.querySelectorAll("calcite-stepper-item").forEach(e=>{e.icon=this.icon,e.numbered=this.numbered,e.layout=this.layout,e.scale=this.scale})}determineActiveStepper(){let{items:e}=this;if(e.length<2)return;let{currentActivePosition:t,layout:i}=this;this.multipleViewMode=i!=="horizontal-single",e.forEach((s,n)=>{s.itemHidden=i==="horizontal-single"&&n!==(t||0)})}getEnabledStepIndex(e,t="next"){let{items:i,currentActivePosition:s}=this,n=e;for(;i[n]?.disabled&&this.layout!=="horizontal-single";)n=n+(t==="previous"?-1:1);return n!==s&&n<i.length&&n>=0?n:null}updateStep(e){this.currentActivePosition=e,this.calciteInternalStepperItemChange.emit({position:e})}filterItems(){return this.items.filter(e=>!e.disabled&&!m(e))}setStepperItemNumberingSystem(){this.items.forEach(e=>{e.numberingSystem=this.numberingSystem})}handleActionClick(e){let t=this.currentActivePosition;e.target.getAttribute("data-position")==="start"?this.prevStep():this.nextStep(),typeof this.currentActivePosition=="number"&&t!==this.currentActivePosition&&!this.items[this.currentActivePosition].disabled&&this.emitItemSelect()}getFirstEnabledStepperPosition(){let e=this.items.findIndex(t=>!t.disabled);return e>-1?e:0}setContainerEl(e){this.containerEl=e}handleDefaultSlotChange(e){let t=A(e).filter(s=>s?.tagName==="CALCITE-STEPPER-ITEM"&&!m(s));this.items=t;let i=Array(t.length).fill("1fr").join(" ");this.containerEl.style.gridTemplateAreas=i,this.containerEl.style.gridTemplateColumns=i,this.setStepperItemNumberingSystem()}render(){return this.el.ariaLabel=this.messages.label,this.el.role="region",a`<div class=${r({container:!0,[p.singleView]:this.layout==="horizontal-single"})} ${S(this.setContainerEl)}>${this.layout==="horizontal-single"&&a`<div class=${r({[p.stepBarContainer]:!0})}>${this.items.map((e,t)=>P({active:t===this.currentActivePosition,complete:e.complete&&t!==this.currentActivePosition&&!e.error,disabled:e.disabled&&t!==this.currentActivePosition,error:e.error&&t!==this.currentActivePosition}))}</div>`||""}${this.layout==="horizontal-single"&&a`<div class=${r({[p.actionContainer]:!0})}>${this.renderAction("start")}${this.renderAction("end")}</div>`||""}<slot @slotchange=${this.handleDefaultSlotChange}></slot></div>`}renderAction(e){let t=e==="start",i=t?"chevron-left":"chevron-right",{currentActivePosition:s,multipleViewMode:n,layout:x}=this,C=this.items.length,E=`${this.guid}-${t?"start":"end"}`;return x==="horizontal-single"&&!n?a`<calcite-action alignment=center appearance=transparent class=${r({[p.actionIcon]:!0})} compact data-position=${e??h} .disabled=${s===0&&t||s===C-1&&!t} .icon=${i} icon-flip-rtl id=${E??h} @click=${this.handleActionClick} .scale=${this.scale} .text=${t?this.messages.previousStep:this.messages.nextStep}></calcite-action>`:null}};f("calcite-stepper",d);export{d as Stepper};
|
|
@@ -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.0 */
|
|
4
|
-
import{a as v}from"./BSRMWMHQ.js";import{a as R}from"./PZLVQQMT.js";import{d as c}from"./22RQB3WE.js";import"./4SEPDFCP.js";import{a as B}from"./FNFWOOMR.js";import"./OLMX7G3J.js";import{a as M}from"./SMUXJLDL.js";import{a as T}from"./CIV3PH3Z.js";import{a as O}from"./CNO6NFH5.js";import{a as A}from"./ARHYATTG.js";import{a as S,b as y}from"./QU33PBBI.js";import{D as f,n as P}from"./CMO3X257.js";import{b as I}from"./GN5CPLSJ.js";import"./I2OIH73C.js";import{J as E,e as D,f as w,v as g,w as C,x as b}from"./KVSCG5E3.js";var p={dialog:"dialog",panel:"panel",scrim:"scrim",container:"container",containerOpen:"container--open",containerEmbedded:"container--embedded",assistiveText:"assistive-text",openingActive:"dialog--opening-active"},n={actionBar:"action-bar",alerts:"alerts",content:"content",customContent:"custom-content",contentTop:"content-top",contentBottom:"content-bottom",headerActionsStart:"header-actions-start",headerActionsEnd:"header-actions-end",headerMenuActions:"header-menu-actions",headerContent:"header-content",fab:"fab",footer:"footer",footerStart:"footer-start",footerEnd:"footer-end"},m=25,x=25,L={x:0,y:0},U={top:0,right:0,bottom:0,left:0},F=D`:host{--calcite-dialog-scrim-background-color: rgba(0, 0, 0, .85);pointer-events:none;inset:0;z-index:var(--calcite-z-index-overlay);display:flex;--calcite-internal-dialog-animation-offset: 20px}:host([modal]){position:absolute}.container{pointer-events:auto;position:fixed;inset:0;z-index:var(--calcite-z-index-overlay);display:flex;align-items:center;justify-content:center;overflow:hidden;color:var(--calcite-color-text-2);opacity:0;visibility:hidden;transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow),opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(.215,.44,.42,.88)}:host([placement=top]) .container{align-items:flex-start;justify-content:center}:host([placement=top-start]) .container{align-items:flex-start;justify-content:flex-start}:host([placement=top-end]) .container{align-items:flex-start;justify-content:flex-end}:host([placement=bottom]) .container{align-items:flex-end;justify-content:center}:host([placement=bottom-start]) .container{align-items:flex-end;justify-content:flex-start}:host([placement=bottom-end]) .container{align-items:flex-end;justify-content:flex-end}:host(:not([modal])) .container{pointer-events:none}:host([scale=s]){--calcite-internal-dialog-content-padding: var(--calcite-dialog-content-space, var(--calcite-spacing-sm));--calcite-internal-dialog-min-size-x: 198px;--calcite-internal-dialog-min-size-y: 140px}:host([scale=m]){--calcite-internal-dialog-content-padding: var(--calcite-dialog-content-space, var(--calcite-spacing-md));--calcite-internal-dialog-min-size-x: 288px;--calcite-internal-dialog-min-size-y: 180px}:host([scale=l]){--calcite-internal-dialog-content-padding: var(--calcite-dialog-content-space, var(--calcite-spacing-md-plus));--calcite-internal-dialog-min-size-x: 388px;--calcite-internal-dialog-min-size-y: 220px}.scrim{--calcite-scrim-background: var(--calcite-dialog-scrim-background-color, var(--calcite-color-transparent-scrim));--calcite-scrim-background-color: var( --calcite-dialog-scrim-background-color, var(--calcite-color-transparent-scrim) );position:fixed;inset:0;display:flex;overflow-y:hidden}calcite-panel{--calcite-panel-content-space: var(--calcite-dialog-content-space, var(--calcite-internal-dialog-content-padding));--calcite-panel-footer-space: var(--calcite-dialog-footer-space);--calcite-panel-border-color: var(--calcite-dialog-border-color);--calcite-panel-background-color: var(--calcite-dialog-background-color, var(--calcite-color-foreground-1))}::slotted(*){--calcite-panel-background-color: initial}.dialog{pointer-events:none;position:relative;z-index:var(--calcite-z-index-modal);margin:1.5rem;box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;border-radius:.25rem;opacity:0;--tw-shadow: 0 2px 12px -4px rgba(0, 0, 0, .2), 0 2px 4px -2px rgba(0, 0, 0, .16);--tw-shadow-colored: 0 2px 12px -4px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);-webkit-overflow-scrolling:touch;visibility:hidden;transition:inset-block var(--calcite-internal-animation-timing-slow) cubic-bezier(.215,.44,.42,.88),opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(.215,.44,.42,.88);min-inline-size:var(--calcite-dialog-min-size-x, var(--calcite-internal-dialog-min-size-x));max-inline-size:var(--calcite-dialog-max-size-x, 100%);min-block-size:var(--calcite-dialog-min-size-y, var(--calcite-internal-dialog-min-size-y));max-block-size:var(--calcite-dialog-max-size-y, 100%);--calcite-internal-dialog-hidden-position: calc( var(--calcite-dialog-offset-y, 0px) + var(--calcite-internal-dialog-animation-offset) );--calcite-internal-dialog-shown-position: var(--calcite-dialog-offset-y, 0);inset-inline-start:var(--calcite-dialog-offset-x, 0);inset-block-start:var(--calcite-internal-dialog-hidden-position)}.dialog--opening-active{inset-block-start:var(--calcite-internal-dialog-shown-position)}:host([menu-open]) .dialog{transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow),opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(.215,.44,.42,.88)}.panel{border-radius:.25rem}.container--open{opacity:1;visibility:visible;transition-delay:0ms}.container--open .dialog{pointer-events:auto;visibility:visible;opacity:1;transition:inset-block var(--calcite-internal-animation-timing-slow) cubic-bezier(.215,.44,.42,.88),opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(.215,.44,.42,.88);transition-delay:0ms}.width-s{inline-size:auto;inline-size:var(--calcite-dialog-size-x, 32rem);block-size:var(--calcite-dialog-size-y, auto)}@media screen and (max-width: 35rem){.width-s{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;inset-inline-start:0;inset-block-start:var(--calcite-internal-dialog-animation-offset)}.width-s.dialog--opening-active{inset-block-start:0}}.width-m{inline-size:var(--calcite-dialog-size-x, 48rem);block-size:var(--calcite-dialog-size-y, auto)}@media screen and (max-width: 51rem){.width-m{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;inset-inline-start:0;inset-block-start:var(--calcite-internal-dialog-animation-offset)}.width-m.dialog--opening-active{inset-block-start:0}}.width-l{inline-size:var(--calcite-dialog-size-x, 94rem);block-size:var(--calcite-dialog-size-y, auto)}@media screen and (max-width: 97rem){.width-l{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;inset-inline-start:0;inset-block-start:var(--calcite-internal-dialog-animation-offset)}.width-l.dialog--opening-active{inset-block-start:0}}:host([placement=cover]) .dialog{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0}:host([placement=cover]) .panel{border-radius:0}:host([kind]) .panel{border-start-start-radius:0px;border-start-end-radius:0px}:host([kind=brand]) .dialog{border-color:var(--calcite-color-brand)}:host([kind=danger]) .dialog{border-color:var(--calcite-color-status-danger)}:host([kind=info]) .dialog{border-color:var(--calcite-color-status-info)}:host([kind=success]) .dialog{border-color:var(--calcite-color-status-success)}:host([kind=warning]) .dialog{border-color:var(--calcite-color-status-warning)}:host([kind=brand][open]) .dialog,:host([kind=danger][open]) .dialog,:host([kind=info][open]) .dialog,:host([kind=success][open]) .dialog,:host([kind=warning][open]) .dialog{border-width:0px;border-block-start-width:4px;border-style:solid}.container--embedded{position:absolute;pointer-events:auto}.container--embedded calcite-scrim{position:absolute}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}`,k=0,j="",$=class extends C{constructor(){super(...arguments),this.dragPosition={...L},this.focusTrap=R({triggerProp:"open",focusTrapOptions:{clickOutsideDeactivates:()=>!this.modal,escapeDeactivates:e=>(!e.defaultPrevented&&!this.escapeDisabled&&(this.open=!1,e.preventDefault()),!1)}})(this),this.ignoreOpenChange=!1,this.mutationObserver=O("mutation",()=>this.handleMutationObserver()),this._open=!1,this.openEnd=()=>{this.setFocus(),this.el.removeEventListener("calciteDialogOpen",this.openEnd)},this.openProp="opened",this.transitionProp="opacity",this.panelEl=S(),this.resizePosition={...U},this.assistiveText=null,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasFooter=!0,this.opened=!1,this.closeDisabled=!1,this.dragEnabled=!1,this.embedded=!1,this.escapeDisabled=!1,this.loading=!1,this.menuOpen=!1,this.messages=A(),this.modal=!1,this.focusTrapDisabled=!1,this.outsideCloseDisabled=!1,this.overlayPositioning="absolute",this.placement="center",this.resizable=!1,this.scale="m",this.widthScale="m",this.calciteDialogBeforeClose=g({cancelable:!1}),this.calciteDialogBeforeOpen=g({cancelable:!1}),this.calciteDialogClose=g({cancelable:!1}),this.calciteDialogOpen=g({cancelable:!1}),this.calciteDialogScroll=g({cancelable:!1})}static{this.properties={assistiveText:16,hasContentBottom:16,hasContentTop:16,hasFooter:16,opened:16,beforeClose:0,closeDisabled:7,description:1,dragEnabled:7,embedded:5,escapeDisabled:7,focusTrapOptions:0,heading:1,headingLevel:11,kind:3,loading:7,menuOpen:7,messageOverrides:0,modal:7,focusTrapDisabled:7,open:7,outsideCloseDisabled:7,overlayPositioning:3,placement:3,resizable:7,scale:3,widthScale:3,width:3}}static{this.styles=F}get open(){return this._open}set open(e){let t=this._open;e!==t&&(this._open=e,this.toggleDialog(e))}async scrollContentTo(e){await this.panelEl.value?.scrollContentTo(e)}async setFocus(){return await I(this),this.panelEl.value?.setFocus()??P(this.el)}async updateFocusTrapElements(e){this.focusTrap.updateContainerElements(e)}focusTrapDisabledOverride(){return!this.modal&&this.focusTrapDisabled}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setupInteractions()}async load(){}willUpdate(e){e.has("modal")&&(this.hasUpdated||this.modal!==!1)&&this.updateOverflowHiddenClass(),(e.has("open")&&(this.hasUpdated||this.open!==!1)||e.has("placement")&&(this.hasUpdated||this.placement!=="center")||e.has("resizable")&&(this.hasUpdated||this.resizable!==!1)||e.has("dragEnabled")&&(this.hasUpdated||this.dragEnabled!==!1))&&this.setupInteractions(),(e.has("messages")||e.has("dragEnabled")&&(this.hasUpdated||this.dragEnabled!==!1)||e.has("resizable")&&(this.hasUpdated||this.resizable!==!1))&&this.updateAssistiveText(),e.has("opened")&&(this.hasUpdated||this.opened!==!1)&&this.handleOpenedChange(this.opened)}loaded(){}disconnectedCallback(){super.disconnectedCallback(),this.removeOverflowHiddenClass(),this.mutationObserver?.disconnect(),this.embedded=!1,this.cleanupInteractions()}updateAssistiveText(){let{messages:e}=this;this.assistiveText=e&&(this.dragEnabled||this.resizable)?`${this.dragEnabled?e.dragEnabled:""} ${this.resizable?e.resizeEnabled:""}`:null}onBeforeOpen(){this.calciteDialogBeforeOpen.emit()}onOpen(){this.calciteDialogOpen.emit(),this.focusTrap.activate()}onBeforeClose(){this.calciteDialogBeforeClose.emit()}onClose(){this.calciteDialogClose.emit(),this.focusTrap.deactivate()}toggleDialog(e){this.ignoreOpenChange||(e?this.openDialog():this.closeDialog())}handleOpenedChange(e){let{transitionEl:t}=this;t&&(t.classList.toggle(p.openingActive,e),M(this))}async triggerInteractModifiers(){let{interaction:e}=this;e&&(await e.reflow({name:"drag"}),await e.reflow({name:"resize"}))}getTransitionElDOMRect(){return this.transitionEl.getBoundingClientRect()}handleKeyDown(e){let{key:t,shiftKey:i,defaultPrevented:a}=e,{dragEnabled:s,resizable:l,resizePosition:r,dragPosition:o,transitionEl:d}=this;if(!(a||!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t)))switch(t){case"ArrowUp":i&&l&&d?(this.updateSize({size:this.getTransitionElDOMRect().height-m,type:"blockSize"}),r.bottom-=m,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()):s&&(o.y-=x,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break;case"ArrowDown":i&&l&&d?(this.updateSize({size:this.getTransitionElDOMRect().height+m,type:"blockSize"}),r.bottom+=m,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()):s&&(o.y+=x,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break;case"ArrowLeft":i&&l&&d?(this.updateSize({size:this.getTransitionElDOMRect().width-m,type:"inlineSize"}),r.right-=m,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()):s&&(o.x-=x,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break;case"ArrowRight":i&&l&&d?(this.updateSize({size:this.getTransitionElDOMRect().width+m,type:"inlineSize"}),r.right+=m,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()):s&&(o.x+=x,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break}}updateTransform(){let{dragPosition:{x:e,y:t},resizePosition:i,transitionEl:a,dragEnabled:s,resizable:l}=this;if(!a)return;if(!s&&!l){a.style.transform=null;return}let{top:r,right:o,bottom:d,left:z}=this.getAdjustedResizePosition(i),u=Math.round(e+z+o),h=Math.round(t+r+d);a.style.transform=u||h?`translate(${u}px, ${h}px)`:null}updateSize({type:e,size:t}){let{transitionEl:i}=this;i&&(i.style[e]=t!==null?`${Math.round(t)}px`:null)}cleanupInteractions(){this.interaction?.unset(),this.updateSize({size:null,type:"inlineSize"}),this.updateSize({size:null,type:"blockSize"}),this.dragPosition={...L},this.resizePosition={...U},this.updateTransform()}setupInteractions(){this.cleanupInteractions();let{el:e,transitionEl:t,resizable:i,dragEnabled:a,resizePosition:s,dragPosition:l}=this;if(!(!t||!this.open)){if((i||a)&&(this.interaction=v(t,{context:e.ownerDocument})),i){let{minInlineSize:r,minBlockSize:o,maxInlineSize:d,maxBlockSize:z}=window.getComputedStyle(t);this.interaction.resizable({edges:{top:!0,right:!0,bottom:!0,left:!0},modifiers:[v.modifiers.restrictSize({min:{width:f(r)?parseInt(r):0,height:f(o)?parseInt(o):0},max:{width:f(d)?parseInt(d):window.innerWidth,height:f(z)?parseInt(z):window.innerHeight}}),v.modifiers.restrict({restriction:"parent"})],listeners:{move:({rect:u,deltaRect:h})=>{h&&(s.top+=h.top,s.right+=h.right,s.bottom+=h.bottom,s.left+=h.left),this.updateSize({size:u.width,type:"inlineSize"}),this.updateSize({size:u.height,type:"blockSize"}),this.updateTransform()}}})}a&&this.interaction.draggable({modifiers:[v.modifiers.restrictRect({restriction:"parent"})],listeners:{move:({dx:r,dy:o})=>{l.x+=r,l.y+=o,this.updateTransform()}}})}}getAdjustedResizePosition({top:e,right:t,bottom:i,left:a}){let s=e/2,l=t/2,r=i/2,o=a/2;switch(this.placement){case"top":return{top:e,right:l,bottom:0,left:o};case"top-start":return{top:e,right:0,bottom:0,left:a};case"top-end":return{top:e,right:t,bottom:0,left:0};case"bottom":return{top:0,right:l,bottom:i,left:o};case"bottom-start":return{top:0,right:0,bottom:i,left:a};case"bottom-end":return{top:0,right:t,bottom:i,left:0};case"cover":case"center":default:return{top:s,right:l,bottom:r,left:o}}}setTransitionEl(e){this.transitionEl=e,this.setupInteractions()}handleInternalPanelScroll(e){e.target===this.panelEl.value&&(e.stopPropagation(),this.calciteDialogScroll.emit())}handleInternalPanelCloseClick(e){e.target===this.panelEl.value&&(e.stopPropagation(),this.open=!1)}handlePanelKeyDown(e){this.escapeDisabled&&e.key==="Escape"&&e.preventDefault()}async openDialog(){await this.componentOnReady(),this.el.addEventListener("calciteDialogOpen",this.openEnd),this.opened=!0,this.updateOverflowHiddenClass()}handleOutsideClose(){this.outsideCloseDisabled||(this.open=!1)}async closeDialog(){if(this.beforeClose)try{await this.beforeClose()}catch{requestAnimationFrame(()=>{this.ignoreOpenChange=!0,this.open=!0,this.ignoreOpenChange=!1});return}k--,this.opened=!1,this.updateOverflowHiddenClass()}updateOverflowHiddenClass(){this.opened&&!this.embedded&&this.modal?this.addOverflowHiddenClass():this.removeOverflowHiddenClass()}addOverflowHiddenClass(){k===0&&(j=document.documentElement.style.overflow),k++,document.documentElement.style.setProperty("overflow","hidden")}removeOverflowHiddenClass(){document.documentElement.style.setProperty("overflow",j)}handleMutationObserver(){this.updateFocusTrapElements()}render(){let{assistiveText:e,description:t,heading:i,opened:a}=this;return w`<div class=${b({[p.container]:!0,[p.containerOpen]:a,[p.containerEmbedded]:this.embedded})}>${this.modal?w`<calcite-scrim class=${b(p.scrim)} @click=${this.handleOutsideClose}></calcite-scrim>`:null}<div .ariaDescription=${t} .ariaLabel=${i} .ariaModal=${this.modal} class=${b({[p.dialog]:!0,[B("width",this.width,this.widthScale)]:!!(this.width||this.widthScale)})} @keydown=${this.handleKeyDown} role=dialog ${y(this.setTransitionEl)}>${e?T("assistive-text",w`<div aria-live=polite class=${b(p.assistiveText)}>${e}</div>`):null}<slot name=${n.customContent}><slot name=${n.content}><calcite-panel .beforeClose=${this.beforeClose} class=${b(p.panel)} .closable=${!this.closeDisabled} .closed=${!a} .description=${t} .heading=${i} .headingLevel=${this.headingLevel} .loading=${this.loading} .menuOpen=${this.menuOpen} .messageOverrides=${this.messageOverrides} @keydown=${this.handlePanelKeyDown} @calcitePanelClose=${this.handleInternalPanelCloseClick} @calcitePanelScroll=${this.handleInternalPanelScroll} .overlayPositioning=${this.overlayPositioning} .scale=${this.scale} ${y(this.panelEl)}><slot name=${n.actionBar} slot=${c.actionBar}></slot><slot name=${n.alerts} slot=${c.alerts}></slot><slot name=${n.headerActionsStart} slot=${c.headerActionsStart}></slot><slot name=${n.headerActionsEnd} slot=${c.headerActionsEnd}></slot><slot name=${n.headerContent} slot=${c.headerContent}></slot><slot name=${n.headerMenuActions} slot=${c.headerMenuActions}></slot><slot name=${n.fab} slot=${c.fab}></slot><slot name=${n.contentTop} slot=${c.contentTop}></slot><slot name=${n.contentBottom} slot=${c.contentBottom}></slot><slot name=${n.footerStart} slot=${c.footerStart}></slot><slot name=${n.footer} slot=${c.footer}></slot><slot name=${n.footerEnd} slot=${c.footerEnd}></slot><slot></slot></calcite-panel></slot></slot></div></div>`}};E("calcite-dialog",$);export{$ as Dialog};
|
|
3
|
+
v3.1.0-next.0 */
|
|
4
|
+
import{a as v}from"./FZJ3BTYV.js";import{a as R}from"./6R5C57P5.js";import{d as c}from"./TD2M3HXH.js";import"./A7WWDVJQ.js";import{a as B}from"./XZVQKECK.js";import"./ARAAYSPA.js";import{a as M}from"./D2PRGKAG.js";import{a as T}from"./CQ5FVCCX.js";import{a as O}from"./R3FLP5QS.js";import{a as A}from"./MYKRE5QO.js";import{a as S,b as y}from"./WACTC6C2.js";import{D as f,n as P}from"./FE2QRVI7.js";import{b as I}from"./7VOKVNOX.js";import"./7LGBDOYP.js";import{J as E,e as D,f as w,v as g,w as C,x as b}from"./IPEYLL4T.js";var p={dialog:"dialog",panel:"panel",scrim:"scrim",container:"container",containerOpen:"container--open",containerEmbedded:"container--embedded",assistiveText:"assistive-text",openingActive:"dialog--opening-active"},n={actionBar:"action-bar",alerts:"alerts",content:"content",customContent:"custom-content",contentTop:"content-top",contentBottom:"content-bottom",headerActionsStart:"header-actions-start",headerActionsEnd:"header-actions-end",headerMenuActions:"header-menu-actions",headerContent:"header-content",fab:"fab",footer:"footer",footerStart:"footer-start",footerEnd:"footer-end"},m=25,x=25,L={x:0,y:0},U={top:0,right:0,bottom:0,left:0},F=D`:host{--calcite-dialog-scrim-background-color: rgba(0, 0, 0, .85);pointer-events:none;inset:0;z-index:var(--calcite-z-index-overlay);display:flex;--calcite-internal-dialog-animation-offset: 20px}:host([modal]){position:absolute}.container{pointer-events:auto;position:fixed;inset:0;z-index:var(--calcite-z-index-overlay);display:flex;align-items:center;justify-content:center;overflow:hidden;color:var(--calcite-color-text-2);opacity:0;visibility:hidden;transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow),opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(.215,.44,.42,.88)}:host([placement=top]) .container{align-items:flex-start;justify-content:center}:host([placement=top-start]) .container{align-items:flex-start;justify-content:flex-start}:host([placement=top-end]) .container{align-items:flex-start;justify-content:flex-end}:host([placement=bottom]) .container{align-items:flex-end;justify-content:center}:host([placement=bottom-start]) .container{align-items:flex-end;justify-content:flex-start}:host([placement=bottom-end]) .container{align-items:flex-end;justify-content:flex-end}:host(:not([modal])) .container{pointer-events:none}:host([scale=s]){--calcite-internal-dialog-content-padding: var(--calcite-dialog-content-space, var(--calcite-spacing-sm));--calcite-internal-dialog-min-size-x: 198px;--calcite-internal-dialog-min-size-y: 140px}:host([scale=m]){--calcite-internal-dialog-content-padding: var(--calcite-dialog-content-space, var(--calcite-spacing-md));--calcite-internal-dialog-min-size-x: 288px;--calcite-internal-dialog-min-size-y: 180px}:host([scale=l]){--calcite-internal-dialog-content-padding: var(--calcite-dialog-content-space, var(--calcite-spacing-md-plus));--calcite-internal-dialog-min-size-x: 388px;--calcite-internal-dialog-min-size-y: 220px}.scrim{--calcite-scrim-background: var(--calcite-dialog-scrim-background-color, var(--calcite-color-transparent-scrim));--calcite-scrim-background-color: var( --calcite-dialog-scrim-background-color, var(--calcite-color-transparent-scrim) );position:fixed;inset:0;display:flex;overflow-y:hidden}calcite-panel{--calcite-panel-content-space: var(--calcite-dialog-content-space, var(--calcite-internal-dialog-content-padding));--calcite-panel-footer-space: var(--calcite-dialog-footer-space);--calcite-panel-border-color: var(--calcite-dialog-border-color);--calcite-panel-background-color: var(--calcite-dialog-background-color, var(--calcite-color-foreground-1))}::slotted(*){--calcite-panel-background-color: initial}.dialog{pointer-events:none;position:relative;z-index:var(--calcite-z-index-modal);margin:1.5rem;box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;border-radius:.25rem;opacity:0;--tw-shadow: 0 2px 12px -4px rgba(0, 0, 0, .2), 0 2px 4px -2px rgba(0, 0, 0, .16);--tw-shadow-colored: 0 2px 12px -4px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);-webkit-overflow-scrolling:touch;visibility:hidden;transition:inset-block var(--calcite-internal-animation-timing-slow) cubic-bezier(.215,.44,.42,.88),opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(.215,.44,.42,.88);min-inline-size:var(--calcite-dialog-min-size-x, var(--calcite-internal-dialog-min-size-x));max-inline-size:var(--calcite-dialog-max-size-x, 100%);min-block-size:var(--calcite-dialog-min-size-y, var(--calcite-internal-dialog-min-size-y));max-block-size:var(--calcite-dialog-max-size-y, 100%);--calcite-internal-dialog-hidden-position: calc( var(--calcite-dialog-offset-y, 0px) + var(--calcite-internal-dialog-animation-offset) );--calcite-internal-dialog-shown-position: var(--calcite-dialog-offset-y, 0);inset-inline-start:var(--calcite-dialog-offset-x, 0);inset-block-start:var(--calcite-internal-dialog-hidden-position)}.dialog--opening-active{inset-block-start:var(--calcite-internal-dialog-shown-position)}:host([menu-open]) .dialog{transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow),opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(.215,.44,.42,.88)}.panel{border-radius:.25rem}.container--open{opacity:1;visibility:visible;transition-delay:0ms}.container--open .dialog{pointer-events:auto;visibility:visible;opacity:1;transition:inset-block var(--calcite-internal-animation-timing-slow) cubic-bezier(.215,.44,.42,.88),opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(.215,.44,.42,.88);transition-delay:0ms}.width-s{inline-size:auto;inline-size:var(--calcite-dialog-size-x, 32rem);block-size:var(--calcite-dialog-size-y, auto)}@media screen and (max-width: 35rem){.width-s{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;inset-inline-start:0;inset-block-start:var(--calcite-internal-dialog-animation-offset)}.width-s.dialog--opening-active{inset-block-start:0}}.width-m{inline-size:var(--calcite-dialog-size-x, 48rem);block-size:var(--calcite-dialog-size-y, auto)}@media screen and (max-width: 51rem){.width-m{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;inset-inline-start:0;inset-block-start:var(--calcite-internal-dialog-animation-offset)}.width-m.dialog--opening-active{inset-block-start:0}}.width-l{inline-size:var(--calcite-dialog-size-x, 94rem);block-size:var(--calcite-dialog-size-y, auto)}@media screen and (max-width: 97rem){.width-l{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;inset-inline-start:0;inset-block-start:var(--calcite-internal-dialog-animation-offset)}.width-l.dialog--opening-active{inset-block-start:0}}:host([placement=cover]) .dialog{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0}:host([placement=cover]) .panel{border-radius:0}:host([kind]) .panel{border-start-start-radius:0px;border-start-end-radius:0px}:host([kind=brand]) .dialog{border-color:var(--calcite-color-brand)}:host([kind=danger]) .dialog{border-color:var(--calcite-color-status-danger)}:host([kind=info]) .dialog{border-color:var(--calcite-color-status-info)}:host([kind=success]) .dialog{border-color:var(--calcite-color-status-success)}:host([kind=warning]) .dialog{border-color:var(--calcite-color-status-warning)}:host([kind=brand][open]) .dialog,:host([kind=danger][open]) .dialog,:host([kind=info][open]) .dialog,:host([kind=success][open]) .dialog,:host([kind=warning][open]) .dialog{border-width:0px;border-block-start-width:4px;border-style:solid}.container--embedded{position:absolute;pointer-events:auto}.container--embedded calcite-scrim{position:absolute}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}`,k=0,j="",$=class extends C{constructor(){super(...arguments),this.dragPosition={...L},this.focusTrap=R({triggerProp:"open",focusTrapOptions:{clickOutsideDeactivates:()=>!this.modal,escapeDeactivates:e=>(!e.defaultPrevented&&!this.escapeDisabled&&(this.open=!1,e.preventDefault()),!1)}})(this),this.ignoreOpenChange=!1,this.mutationObserver=O("mutation",()=>this.handleMutationObserver()),this._open=!1,this.openEnd=()=>{this.setFocus(),this.el.removeEventListener("calciteDialogOpen",this.openEnd)},this.openProp="opened",this.transitionProp="opacity",this.panelEl=S(),this.resizePosition={...U},this.assistiveText=null,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasFooter=!0,this.opened=!1,this.closeDisabled=!1,this.dragEnabled=!1,this.embedded=!1,this.escapeDisabled=!1,this.loading=!1,this.menuOpen=!1,this.messages=A(),this.modal=!1,this.focusTrapDisabled=!1,this.outsideCloseDisabled=!1,this.overlayPositioning="absolute",this.placement="center",this.resizable=!1,this.scale="m",this.widthScale="m",this.calciteDialogBeforeClose=g({cancelable:!1}),this.calciteDialogBeforeOpen=g({cancelable:!1}),this.calciteDialogClose=g({cancelable:!1}),this.calciteDialogOpen=g({cancelable:!1}),this.calciteDialogScroll=g({cancelable:!1})}static{this.properties={assistiveText:16,hasContentBottom:16,hasContentTop:16,hasFooter:16,opened:16,beforeClose:0,closeDisabled:7,description:1,dragEnabled:7,embedded:5,escapeDisabled:7,focusTrapOptions:0,heading:1,headingLevel:11,kind:3,loading:7,menuOpen:7,messageOverrides:0,modal:7,focusTrapDisabled:7,open:7,outsideCloseDisabled:7,overlayPositioning:3,placement:3,resizable:7,scale:3,widthScale:3,width:3}}static{this.styles=F}get open(){return this._open}set open(e){let t=this._open;e!==t&&(this._open=e,this.toggleDialog(e))}async scrollContentTo(e){await this.panelEl.value?.scrollContentTo(e)}async setFocus(){return await I(this),this.panelEl.value?.setFocus()??P(this.el)}async updateFocusTrapElements(e){this.focusTrap.updateContainerElements(e)}focusTrapDisabledOverride(){return!this.modal&&this.focusTrapDisabled}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setupInteractions()}async load(){}willUpdate(e){e.has("modal")&&(this.hasUpdated||this.modal!==!1)&&this.updateOverflowHiddenClass(),(e.has("open")&&(this.hasUpdated||this.open!==!1)||e.has("placement")&&(this.hasUpdated||this.placement!=="center")||e.has("resizable")&&(this.hasUpdated||this.resizable!==!1)||e.has("dragEnabled")&&(this.hasUpdated||this.dragEnabled!==!1))&&this.setupInteractions(),(e.has("messages")||e.has("dragEnabled")&&(this.hasUpdated||this.dragEnabled!==!1)||e.has("resizable")&&(this.hasUpdated||this.resizable!==!1))&&this.updateAssistiveText(),e.has("opened")&&(this.hasUpdated||this.opened!==!1)&&this.handleOpenedChange(this.opened)}loaded(){}disconnectedCallback(){super.disconnectedCallback(),this.removeOverflowHiddenClass(),this.mutationObserver?.disconnect(),this.embedded=!1,this.cleanupInteractions()}updateAssistiveText(){let{messages:e}=this;this.assistiveText=e&&(this.dragEnabled||this.resizable)?`${this.dragEnabled?e.dragEnabled:""} ${this.resizable?e.resizeEnabled:""}`:null}onBeforeOpen(){this.calciteDialogBeforeOpen.emit()}onOpen(){this.calciteDialogOpen.emit(),this.focusTrap.activate()}onBeforeClose(){this.calciteDialogBeforeClose.emit()}onClose(){this.calciteDialogClose.emit(),this.focusTrap.deactivate()}toggleDialog(e){this.ignoreOpenChange||(e?this.openDialog():this.closeDialog())}handleOpenedChange(e){let{transitionEl:t}=this;t&&(t.classList.toggle(p.openingActive,e),M(this))}async triggerInteractModifiers(){let{interaction:e}=this;e&&(await e.reflow({name:"drag"}),await e.reflow({name:"resize"}))}getTransitionElDOMRect(){return this.transitionEl.getBoundingClientRect()}handleKeyDown(e){let{key:t,shiftKey:i,defaultPrevented:a}=e,{dragEnabled:s,resizable:l,resizePosition:r,dragPosition:o,transitionEl:d}=this;if(!(a||!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t)))switch(t){case"ArrowUp":i&&l&&d?(this.updateSize({size:this.getTransitionElDOMRect().height-m,type:"blockSize"}),r.bottom-=m,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()):s&&(o.y-=x,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break;case"ArrowDown":i&&l&&d?(this.updateSize({size:this.getTransitionElDOMRect().height+m,type:"blockSize"}),r.bottom+=m,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()):s&&(o.y+=x,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break;case"ArrowLeft":i&&l&&d?(this.updateSize({size:this.getTransitionElDOMRect().width-m,type:"inlineSize"}),r.right-=m,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()):s&&(o.x-=x,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break;case"ArrowRight":i&&l&&d?(this.updateSize({size:this.getTransitionElDOMRect().width+m,type:"inlineSize"}),r.right+=m,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()):s&&(o.x+=x,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break}}updateTransform(){let{dragPosition:{x:e,y:t},resizePosition:i,transitionEl:a,dragEnabled:s,resizable:l}=this;if(!a)return;if(!s&&!l){a.style.transform=null;return}let{top:r,right:o,bottom:d,left:z}=this.getAdjustedResizePosition(i),u=Math.round(e+z+o),h=Math.round(t+r+d);a.style.transform=u||h?`translate(${u}px, ${h}px)`:null}updateSize({type:e,size:t}){let{transitionEl:i}=this;i&&(i.style[e]=t!==null?`${Math.round(t)}px`:null)}cleanupInteractions(){this.interaction?.unset(),this.updateSize({size:null,type:"inlineSize"}),this.updateSize({size:null,type:"blockSize"}),this.dragPosition={...L},this.resizePosition={...U},this.updateTransform()}setupInteractions(){this.cleanupInteractions();let{el:e,transitionEl:t,resizable:i,dragEnabled:a,resizePosition:s,dragPosition:l}=this;if(!(!t||!this.open)){if((i||a)&&(this.interaction=v(t,{context:e.ownerDocument})),i){let{minInlineSize:r,minBlockSize:o,maxInlineSize:d,maxBlockSize:z}=window.getComputedStyle(t);this.interaction.resizable({edges:{top:!0,right:!0,bottom:!0,left:!0},modifiers:[v.modifiers.restrictSize({min:{width:f(r)?parseInt(r):0,height:f(o)?parseInt(o):0},max:{width:f(d)?parseInt(d):window.innerWidth,height:f(z)?parseInt(z):window.innerHeight}}),v.modifiers.restrict({restriction:"parent"})],listeners:{move:({rect:u,deltaRect:h})=>{h&&(s.top+=h.top,s.right+=h.right,s.bottom+=h.bottom,s.left+=h.left),this.updateSize({size:u.width,type:"inlineSize"}),this.updateSize({size:u.height,type:"blockSize"}),this.updateTransform()}}})}a&&this.interaction.draggable({modifiers:[v.modifiers.restrictRect({restriction:"parent"})],listeners:{move:({dx:r,dy:o})=>{l.x+=r,l.y+=o,this.updateTransform()}}})}}getAdjustedResizePosition({top:e,right:t,bottom:i,left:a}){let s=e/2,l=t/2,r=i/2,o=a/2;switch(this.placement){case"top":return{top:e,right:l,bottom:0,left:o};case"top-start":return{top:e,right:0,bottom:0,left:a};case"top-end":return{top:e,right:t,bottom:0,left:0};case"bottom":return{top:0,right:l,bottom:i,left:o};case"bottom-start":return{top:0,right:0,bottom:i,left:a};case"bottom-end":return{top:0,right:t,bottom:i,left:0};case"cover":case"center":default:return{top:s,right:l,bottom:r,left:o}}}setTransitionEl(e){this.transitionEl=e,this.setupInteractions()}handleInternalPanelScroll(e){e.target===this.panelEl.value&&(e.stopPropagation(),this.calciteDialogScroll.emit())}handleInternalPanelCloseClick(e){e.target===this.panelEl.value&&(e.stopPropagation(),this.open=!1)}handlePanelKeyDown(e){this.escapeDisabled&&e.key==="Escape"&&e.preventDefault()}async openDialog(){await this.componentOnReady(),this.el.addEventListener("calciteDialogOpen",this.openEnd),this.opened=!0,this.updateOverflowHiddenClass()}handleOutsideClose(){this.outsideCloseDisabled||(this.open=!1)}async closeDialog(){if(this.beforeClose)try{await this.beforeClose()}catch{requestAnimationFrame(()=>{this.ignoreOpenChange=!0,this.open=!0,this.ignoreOpenChange=!1});return}k--,this.opened=!1,this.updateOverflowHiddenClass()}updateOverflowHiddenClass(){this.opened&&!this.embedded&&this.modal?this.addOverflowHiddenClass():this.removeOverflowHiddenClass()}addOverflowHiddenClass(){k===0&&(j=document.documentElement.style.overflow),k++,document.documentElement.style.setProperty("overflow","hidden")}removeOverflowHiddenClass(){document.documentElement.style.setProperty("overflow",j)}handleMutationObserver(){this.updateFocusTrapElements()}render(){let{assistiveText:e,description:t,heading:i,opened:a}=this;return w`<div class=${b({[p.container]:!0,[p.containerOpen]:a,[p.containerEmbedded]:this.embedded})}>${this.modal?w`<calcite-scrim class=${b(p.scrim)} @click=${this.handleOutsideClose}></calcite-scrim>`:null}<div .ariaDescription=${t} .ariaLabel=${i} .ariaModal=${this.modal} class=${b({[p.dialog]:!0,[B("width",this.width,this.widthScale)]:!!(this.width||this.widthScale)})} @keydown=${this.handleKeyDown} role=dialog ${y(this.setTransitionEl)}>${e?T("assistive-text",w`<div aria-live=polite class=${b(p.assistiveText)}>${e}</div>`):null}<slot name=${n.customContent}><slot name=${n.content}><calcite-panel .beforeClose=${this.beforeClose} class=${b(p.panel)} .closable=${!this.closeDisabled} .closed=${!a} .description=${t} .heading=${i} .headingLevel=${this.headingLevel} .loading=${this.loading} .menuOpen=${this.menuOpen} .messageOverrides=${this.messageOverrides} @keydown=${this.handlePanelKeyDown} @calcitePanelClose=${this.handleInternalPanelCloseClick} @calcitePanelScroll=${this.handleInternalPanelScroll} .overlayPositioning=${this.overlayPositioning} .scale=${this.scale} ${y(this.panelEl)}><slot name=${n.actionBar} slot=${c.actionBar}></slot><slot name=${n.alerts} slot=${c.alerts}></slot><slot name=${n.headerActionsStart} slot=${c.headerActionsStart}></slot><slot name=${n.headerActionsEnd} slot=${c.headerActionsEnd}></slot><slot name=${n.headerContent} slot=${c.headerContent}></slot><slot name=${n.headerMenuActions} slot=${c.headerMenuActions}></slot><slot name=${n.fab} slot=${c.fab}></slot><slot name=${n.contentTop} slot=${c.contentTop}></slot><slot name=${n.contentBottom} slot=${c.contentBottom}></slot><slot name=${n.footerStart} slot=${c.footerStart}></slot><slot name=${n.footer} slot=${c.footer}></slot><slot name=${n.footerEnd} slot=${c.footerEnd}></slot><slot></slot></calcite-panel></slot></slot></div></div>`}};E("calcite-dialog",$);export{$ as Dialog};
|
|
@@ -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.0 */
|
|
3
|
+
v3.1.0-next.0 */
|
|
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.0 */
|
|
4
|
-
import{a as v,b as l,e as E,f as F,k as u,l as x,n as k,o as O,q as d}from"./7SX3RD7P.js";import{k as h}from"./KBDXI6DJ.js";import{h as P,i as I,j as A}from"./L5FDXQMT.js";import{a as f}from"./UELGJSYH.js";import{a as g,b as m}from"./QU33PBBI.js";import{i as w,k as S}from"./CMO3X257.js";import"./I2OIH73C.js";import{J as Y,e as D,f as r,j as M,u as $,v as z,w as C,x as c}from"./KVSCG5E3.js";var L=D`:host{display:block}.header{display:flex;block-size:100%;align-items:center;justify-content:space-between}.chevron-container{display:flex;align-items:center}:host([scale=s]){block-size:24px;margin:var(--calcite-spacing-xs);margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .chevron-container,:host([scale=s]) .chevron{min-inline-size:24px;block-size:24px}:host([scale=m]){block-size:32px;margin:var(--calcite-spacing-sm);margin-inline-start:var(--calcite-spacing-sm-plus)}:host([scale=m]) .chevron-container,:host([scale=m]) .chevron{min-inline-size:32px;block-size:32px;--calcite-internal-action-padding-block: var(--calcite-spacing-xxs)}:host([scale=l]){block-size:44px;margin:var(--calcite-spacing-xs);margin-inline-start:var(--calcite-spacing-sm)}:host([scale=l]) .chevron-container,:host([scale=l]) .chevron{min-inline-size:44px;block-size:44px;--calcite-internal-action-padding-block: var(--calcite-spacing-sm-plus)}.chevron{box-sizing:content-box;display:flex;block-size:100%;inline-size:100%;flex-grow:0;cursor:pointer;align-items:center;justify-content:center;border-style:none;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;--calcite-internal-action-padding-block: 0;--calcite-action-background-color: var(--calcite-date-picker-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-date-picker-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-date-picker-header-action-background-color-press);--calcite-action-text-color: var(--calcite-date-picker-header-action-text-color);--calcite-action-text-color-press: var(--calcite-date-picker-header-action-text-color-press)}.chevron: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))))}.chevron[aria-disabled=true]{pointer-events:none}.month-year-container{display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;align-items:center;justify-content:flex-start;text-align:center;line-height:1;gap:var(--calcite-spacing-xxs)}.month-year-container.range-calendar{justify-content:center}.year-container{position:relative;display:flex;block-size:100%}.suffix{display:flex;align-items:center}.year,.suffix{margin-inline:var(--calcite-spacing-xxs);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-date-picker-year-text-color, var(--calcite-color-text-1));font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-fixed-lg)}.year{position:relative;display:inline-block;border-style:none;background-color:transparent;text-align:center;font-family:inherit;outline-color:transparent;inline-size:44px}.year:hover{transition-duration:.1s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:outline-color;outline:2px solid var(--calcite-color-border-2);outline-offset:-2px}.year: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))))}.month-select{--calcite-select-internal-border-width: 0;--calcite-select-internal-icon-border-inline-end-width: 0;--calcite-select-spacing-inline: var(--calcite-spacing-xxs);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size-md));--calcite-select-text-color: var(--calcite-date-picker-month-select-text-color, var(--calcite-color-text-1));--calcite-select-icon-color: var(--calcite-date-picker-month-select-icon-color);--calcite-select-icon-color-hover: var(--calcite-date-picker-month-select-icon-color-hover);--calcite-internal-select-spacing-block: var(--calcite-spacing-xxs);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-xxs);--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-lg);--calcite-internal-select-font-weight: var(--calcite-font-weight-medium)}:host([scale=s]) .month-year-container .month-select{--calcite-select-spacing-inline: var(--calcite-spacing-base);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size));--calcite-internal-select-spacing-block: var(--calcite-spacing-base);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-base);--calcite-internal-select-block-size: 24px;--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-base)}:host([scale=s]) .month-year-container .year{inline-size:40px}:host([scale=s]) .month-year-container .year,:host([scale=s]) .month-year-container .suffix{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-fixed-base)}:host([scale=l]) .month-year-container .month-select{--calcite-select-spacing-inline: var(--calcite-spacing-sm);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size-lg));--calcite-internal-select-spacing-block: var(--calcite-spacing-sm);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-sm);--calcite-internal-select-block-size: 44px;--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-xl)}:host([scale=l]) .month-year-container .year{inline-size:48px}:host([scale=l]) .month-year-container .year,:host([scale=l]) .month-year-container .suffix{font-size:var(--calcite-font-size-lg);line-height:var(--calcite-font-line-height-fixed-xl)}:host([hidden]){display:none}[hidden]{display:none}`,o={header:"header",chevron:"chevron",chevronContainer:"chevron-container",monthYearContainer:"month-year-container",monthPicker:"month-select",rangeCalendar:"range-calendar",suffix:"suffix",yearContainer:"year-container"},W={chevronLeft:"chevron-left",chevronRight:"chevron-right"},K=16,y=class extends C{constructor(){super(...arguments),this.monthPickerEl=g(),this.yearInputEl=g(),this.calciteInternalDatePickerMonthHeaderSelectChange=z({cancelable:!1})}static{this.properties={nextMonthDate:16,prevMonthDate:16,activeDate:0,headingLevel:9,localeData:0,max:0,messages:0,min:0,monthStyle:1,position:1,scale:3,selectedDate:0}}static{this.styles=L}connectedCallback(){super.connectedCallback(),this.setNextPrevMonthDates()}load(){this.parentDatePickerEl=S(this.el,"calcite-date-picker")}willUpdate(e){this.hasUpdated&&(e.has("activeDate")||e.has("localeData"))&&this.setYearSelectMenuWidth(),this.hasUpdated&&e.has("scale")&&this.setYearSelectWidthOffset(),(e.has("min")||e.has("max")||e.has("activeDate"))&&this.setNextPrevMonthDates()}loaded(){this.setYearSelectWidthOffset()}setNextPrevMonthDates(){this.activeDate&&(this.nextMonthDate=l(k(this.activeDate),this.min,this.max),this.prevMonthDate=l(u(this.activeDate),this.min,this.max))}onYearKey(e){let t=this.parseCalendarYear(e.target.value);switch(e.key){case"ArrowDown":e.preventDefault(),this.setYear({localizedYear:t,offset:-1});break;case"ArrowUp":e.preventDefault(),this.setYear({localizedYear:t,offset:1});break}}formatCalendarYear(e){return h.localize(`${F(e,this.localeData)}`)}parseCalendarYear(e){return h.localize(`${E(Number(h.delocalize(e)),this.localeData)}`)}onYearChange(e){this.setYear({localizedYear:this.parseCalendarYear(e.target.value)})}onYearInput(e){this.setYear({localizedYear:this.parseCalendarYear(e.target.value),commit:!1})}prevMonthClick(e){this.handleArrowClick(e,this.prevMonthDate)}prevMonthKeydown(e){f(e.key)&&this.prevMonthClick(e)}nextMonthClick(e){this.handleArrowClick(e,this.nextMonthDate)}nextMonthKeydown(e){f(e.key)&&this.nextMonthClick(e)}async handleArrowClick(e,t){e.preventDefault(),await this.handlePenultimateValidMonth(e),this.calciteInternalDatePickerMonthHeaderSelectChange.emit(t)}handleMonthChange(e){let t=e.target,{abbreviated:a,wide:i}=this.localeData.months,s=(this.monthStyle==="wide"?i:a).indexOf(t.value),n=x(this.activeDate,s);v(n,this.min,this.max)||(n=l(n,this.min,this.max)),this.calciteInternalDatePickerMonthHeaderSelectChange.emit(n),this.setYearSelectMenuWidth()}getInRangeDate({localizedYear:e,offset:t=0}){let{min:a,max:i,activeDate:s}=this,n=Number(h.delocalize(e)),N=n.toString().length,p=isNaN(n)?!1:n+t,R=p&&(!a||a.getFullYear()<=p)&&(!i||i.getFullYear()>=p);if(p&&R&&N===e.length){let b=new Date(s);return b.setFullYear(p),l(b,a,i)}}setYear({localizedYear:e,commit:t=!0,offset:a=0}){let{yearInputEl:{value:i},activeDate:s}=this,n=this.getInRangeDate({localizedYear:e,offset:a});n&&this.calciteInternalDatePickerMonthHeaderSelectChange.emit(n),t&&(i.value=this.formatCalendarYear((n||s).getFullYear()))}setYearSelectWidthOffset(){this.yearSelectWidthOffset=K+3*parseInt(this.getYearSelectPadding()),this.setYearSelectMenuWidth()}setYearSelectMenuWidth(){let e=this.monthPickerEl.value;e&&requestAnimationFrame(()=>{let t=getComputedStyle(e),a=`${t.fontStyle} ${t.fontVariant} ${t.fontWeight} ${t.fontSize}/${t.lineHeight} ${t.fontFamily}`,i=this.localeData.months[this.monthStyle][this.activeDate.getMonth()],s=Math.ceil(w(i,a));e.style.width=`${s+this.yearSelectWidthOffset}px`})}isMonthInRange(e){let t=x(this.activeDate,e);return!this.min&&!this.max||v(t,this.min,this.max)?!0:d(t,this.max)||d(t,this.min)}async handlePenultimateValidMonth(e){let t=e.target.getAttribute("data-direction")==="left",a;if(t&&this.min){let i=l(u(this.activeDate),this.min,this.max);a=d(i,this.min)}else if(this.max){let i=l(k(this.activeDate),this.min,this.max);a=d(i,this.max)}a&&(this.position?this.yearInputEl.value.focus():await(t?this.nextMonthAction.setFocus():this.prevMonthAction.setFocus()))}getPx(e){let t=Number(e.replace(/[rem|px]/g,""));return e.includes("rem")?`${t*16}px`:`${t}px`}getYearSelectPadding(){let e;switch(this.scale){case"l":e=A;break;case"s":e=P;break;default:e=I;break}return this.getPx(e)}render(){return r`<div class=${c(o.header)}>${this.renderContent()}</div>`}renderContent(){let{localeData:e,activeDate:t}=this;if(!t||!e)return null;if(this.parentDatePickerEl){let{numberingSystem:s,lang:n}=this.parentDatePickerEl;h.numberFormatOptions={useGrouping:!1,...s&&{numberingSystem:s},...n&&{locale:n}}}let a=O(e.unitOrder),i=a.indexOf("y")<a.indexOf("m");return r`${this.position&&r`<div class=${c({[o.chevronContainer]:!0})}>${this.position==="start"&&this.renderChevron("left")||""}</div>`||""}<div class=${c({[o.monthYearContainer]:!0,[o.rangeCalendar]:!!this.position})}>${this.renderMonthYearContainer(i)}</div>${!this.position&&r`<div class=${c({[o.chevronContainer]:!0})}>${this.renderChevron("left")}</div>`||""}<div class=${c({[o.chevronContainer]:!0})}>${this.position!=="start"&&this.renderChevron("right")||""}</div>`}renderMonthYearContainer(e){return e?[this.renderYearInput(),this.renderMonthPicker()]:[this.renderMonthPicker(),this.renderYearInput()]}renderMonthPicker(){let e=this.activeDate.getMonth(),t=this.localeData.months[this.monthStyle];return r`<calcite-select class=${c(o.monthPicker)} .label=${this.messages.monthMenu} @calciteSelectChange=${this.handleMonthChange} width=auto ${m(this.monthPickerEl)}>${t.map((a,i)=>r`<calcite-option .disabled=${!this.isMonthInRange(i)} .selected=${i===e} .value=${a}>${a}</calcite-option>`)}</calcite-select>`}renderYearInput(){let e=this.localeData.year?.suffix,t=this.formatCalendarYear(this.activeDate.getFullYear());return r`<span class=${c(o.yearContainer)}><input .ariaLabel=${this.messages.year} class=${c({year:!0})} inputmode=numeric maxlength=4 minlength=1 @change=${this.onYearChange} @input=${this.onYearInput} @keydown=${this.onYearKey} pattern=\\d* type=text .value=${$(t??"")} ${m(this.yearInputEl)}>${e&&r`<span class=${c(o.suffix)}>${e}</span>`||""}</span>`}renderChevron(e){let t=e==="right",a=d(t?this.nextMonthDate:this.prevMonthDate,this.activeDate)||!v(this.activeDate,this.min,this.max);return r`<calcite-action alignment=center .ariaDisabled=${a} .ariaLabel=${t?this.messages.nextMonth:this.messages.prevMonth} class=${c(o.chevron)} compact data-direction=${e??M} .disabled=${a} .icon=${t?W.chevronRight:W.chevronLeft} icon-flip-rtl @click=${t?this.nextMonthClick:this.prevMonthClick} @keydown=${t?this.nextMonthKeydown:this.prevMonthKeydown} role=button .scale=${this.scale==="l"?"l":"m"} .text=${t?this.messages.nextMonth:this.messages.prevMonth} ${m(i=>t?this.nextMonthAction=i:this.prevMonthAction=i)}></calcite-action>`}};Y("calcite-date-picker-month-header",y);export{y as DatePickerMonthHeader};
|
|
3
|
+
v3.1.0-next.0 */
|
|
4
|
+
import{a as v,b as l,e as E,f as F,k as u,l as x,n as k,o as O,q as d}from"./CKLM3NH3.js";import{k as h}from"./6I7N4DJM.js";import{h as P,i as I,j as A}from"./62IMSXF5.js";import{a as f}from"./YSGHAVSA.js";import{a as g,b as m}from"./WACTC6C2.js";import{i as w,k as S}from"./FE2QRVI7.js";import"./7LGBDOYP.js";import{J as Y,e as D,f as r,j as M,u as $,v as z,w as C,x as c}from"./IPEYLL4T.js";var L=D`:host{display:block}.header{display:flex;block-size:100%;align-items:center;justify-content:space-between}.chevron-container{display:flex;align-items:center}:host([scale=s]){block-size:24px;margin:var(--calcite-spacing-xs);margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .chevron-container,:host([scale=s]) .chevron{min-inline-size:24px;block-size:24px}:host([scale=m]){block-size:32px;margin:var(--calcite-spacing-sm);margin-inline-start:var(--calcite-spacing-sm-plus)}:host([scale=m]) .chevron-container,:host([scale=m]) .chevron{min-inline-size:32px;block-size:32px;--calcite-internal-action-padding-block: var(--calcite-spacing-xxs)}:host([scale=l]){block-size:44px;margin:var(--calcite-spacing-xs);margin-inline-start:var(--calcite-spacing-sm)}:host([scale=l]) .chevron-container,:host([scale=l]) .chevron{min-inline-size:44px;block-size:44px;--calcite-internal-action-padding-block: var(--calcite-spacing-sm-plus)}.chevron{box-sizing:content-box;display:flex;block-size:100%;inline-size:100%;flex-grow:0;cursor:pointer;align-items:center;justify-content:center;border-style:none;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;--calcite-internal-action-padding-block: 0;--calcite-action-background-color: var(--calcite-date-picker-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-date-picker-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-date-picker-header-action-background-color-press);--calcite-action-text-color: var(--calcite-date-picker-header-action-text-color);--calcite-action-text-color-press: var(--calcite-date-picker-header-action-text-color-press)}.chevron: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))))}.chevron[aria-disabled=true]{pointer-events:none}.month-year-container{display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;align-items:center;justify-content:flex-start;text-align:center;line-height:1;gap:var(--calcite-spacing-xxs)}.month-year-container.range-calendar{justify-content:center}.year-container{position:relative;display:flex;block-size:100%}.suffix{display:flex;align-items:center}.year,.suffix{margin-inline:var(--calcite-spacing-xxs);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-date-picker-year-text-color, var(--calcite-color-text-1));font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-fixed-lg)}.year{position:relative;display:inline-block;border-style:none;background-color:transparent;text-align:center;font-family:inherit;outline-color:transparent;inline-size:44px}.year:hover{transition-duration:.1s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:outline-color;outline:2px solid var(--calcite-color-border-2);outline-offset:-2px}.year: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))))}.month-select{--calcite-select-internal-border-width: 0;--calcite-select-internal-icon-border-inline-end-width: 0;--calcite-select-spacing-inline: var(--calcite-spacing-xxs);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size-md));--calcite-select-text-color: var(--calcite-date-picker-month-select-text-color, var(--calcite-color-text-1));--calcite-select-icon-color: var(--calcite-date-picker-month-select-icon-color);--calcite-select-icon-color-hover: var(--calcite-date-picker-month-select-icon-color-hover);--calcite-internal-select-spacing-block: var(--calcite-spacing-xxs);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-xxs);--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-lg);--calcite-internal-select-font-weight: var(--calcite-font-weight-medium)}:host([scale=s]) .month-year-container .month-select{--calcite-select-spacing-inline: var(--calcite-spacing-base);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size));--calcite-internal-select-spacing-block: var(--calcite-spacing-base);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-base);--calcite-internal-select-block-size: 24px;--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-base)}:host([scale=s]) .month-year-container .year{inline-size:40px}:host([scale=s]) .month-year-container .year,:host([scale=s]) .month-year-container .suffix{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-fixed-base)}:host([scale=l]) .month-year-container .month-select{--calcite-select-spacing-inline: var(--calcite-spacing-sm);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size-lg));--calcite-internal-select-spacing-block: var(--calcite-spacing-sm);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-sm);--calcite-internal-select-block-size: 44px;--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-xl)}:host([scale=l]) .month-year-container .year{inline-size:48px}:host([scale=l]) .month-year-container .year,:host([scale=l]) .month-year-container .suffix{font-size:var(--calcite-font-size-lg);line-height:var(--calcite-font-line-height-fixed-xl)}:host([hidden]){display:none}[hidden]{display:none}`,o={header:"header",chevron:"chevron",chevronContainer:"chevron-container",monthYearContainer:"month-year-container",monthPicker:"month-select",rangeCalendar:"range-calendar",suffix:"suffix",yearContainer:"year-container"},W={chevronLeft:"chevron-left",chevronRight:"chevron-right"},K=16,y=class extends C{constructor(){super(...arguments),this.monthPickerEl=g(),this.yearInputEl=g(),this.calciteInternalDatePickerMonthHeaderSelectChange=z({cancelable:!1})}static{this.properties={nextMonthDate:16,prevMonthDate:16,activeDate:0,headingLevel:9,localeData:0,max:0,messages:0,min:0,monthStyle:1,position:1,scale:3,selectedDate:0}}static{this.styles=L}connectedCallback(){super.connectedCallback(),this.setNextPrevMonthDates()}load(){this.parentDatePickerEl=S(this.el,"calcite-date-picker")}willUpdate(e){this.hasUpdated&&(e.has("activeDate")||e.has("localeData"))&&this.setYearSelectMenuWidth(),this.hasUpdated&&e.has("scale")&&this.setYearSelectWidthOffset(),(e.has("min")||e.has("max")||e.has("activeDate"))&&this.setNextPrevMonthDates()}loaded(){this.setYearSelectWidthOffset()}setNextPrevMonthDates(){this.activeDate&&(this.nextMonthDate=l(k(this.activeDate),this.min,this.max),this.prevMonthDate=l(u(this.activeDate),this.min,this.max))}onYearKey(e){let t=this.parseCalendarYear(e.target.value);switch(e.key){case"ArrowDown":e.preventDefault(),this.setYear({localizedYear:t,offset:-1});break;case"ArrowUp":e.preventDefault(),this.setYear({localizedYear:t,offset:1});break}}formatCalendarYear(e){return h.localize(`${F(e,this.localeData)}`)}parseCalendarYear(e){return h.localize(`${E(Number(h.delocalize(e)),this.localeData)}`)}onYearChange(e){this.setYear({localizedYear:this.parseCalendarYear(e.target.value)})}onYearInput(e){this.setYear({localizedYear:this.parseCalendarYear(e.target.value),commit:!1})}prevMonthClick(e){this.handleArrowClick(e,this.prevMonthDate)}prevMonthKeydown(e){f(e.key)&&this.prevMonthClick(e)}nextMonthClick(e){this.handleArrowClick(e,this.nextMonthDate)}nextMonthKeydown(e){f(e.key)&&this.nextMonthClick(e)}async handleArrowClick(e,t){e.preventDefault(),await this.handlePenultimateValidMonth(e),this.calciteInternalDatePickerMonthHeaderSelectChange.emit(t)}handleMonthChange(e){let t=e.target,{abbreviated:a,wide:i}=this.localeData.months,s=(this.monthStyle==="wide"?i:a).indexOf(t.value),n=x(this.activeDate,s);v(n,this.min,this.max)||(n=l(n,this.min,this.max)),this.calciteInternalDatePickerMonthHeaderSelectChange.emit(n),this.setYearSelectMenuWidth()}getInRangeDate({localizedYear:e,offset:t=0}){let{min:a,max:i,activeDate:s}=this,n=Number(h.delocalize(e)),N=n.toString().length,p=isNaN(n)?!1:n+t,R=p&&(!a||a.getFullYear()<=p)&&(!i||i.getFullYear()>=p);if(p&&R&&N===e.length){let b=new Date(s);return b.setFullYear(p),l(b,a,i)}}setYear({localizedYear:e,commit:t=!0,offset:a=0}){let{yearInputEl:{value:i},activeDate:s}=this,n=this.getInRangeDate({localizedYear:e,offset:a});n&&this.calciteInternalDatePickerMonthHeaderSelectChange.emit(n),t&&(i.value=this.formatCalendarYear((n||s).getFullYear()))}setYearSelectWidthOffset(){this.yearSelectWidthOffset=K+3*parseInt(this.getYearSelectPadding()),this.setYearSelectMenuWidth()}setYearSelectMenuWidth(){let e=this.monthPickerEl.value;e&&requestAnimationFrame(()=>{let t=getComputedStyle(e),a=`${t.fontStyle} ${t.fontVariant} ${t.fontWeight} ${t.fontSize}/${t.lineHeight} ${t.fontFamily}`,i=this.localeData.months[this.monthStyle][this.activeDate.getMonth()],s=Math.ceil(w(i,a));e.style.width=`${s+this.yearSelectWidthOffset}px`})}isMonthInRange(e){let t=x(this.activeDate,e);return!this.min&&!this.max||v(t,this.min,this.max)?!0:d(t,this.max)||d(t,this.min)}async handlePenultimateValidMonth(e){let t=e.target.getAttribute("data-direction")==="left",a;if(t&&this.min){let i=l(u(this.activeDate),this.min,this.max);a=d(i,this.min)}else if(this.max){let i=l(k(this.activeDate),this.min,this.max);a=d(i,this.max)}a&&(this.position?this.yearInputEl.value.focus():await(t?this.nextMonthAction.setFocus():this.prevMonthAction.setFocus()))}getPx(e){let t=Number(e.replace(/[rem|px]/g,""));return e.includes("rem")?`${t*16}px`:`${t}px`}getYearSelectPadding(){let e;switch(this.scale){case"l":e=A;break;case"s":e=P;break;default:e=I;break}return this.getPx(e)}render(){return r`<div class=${c(o.header)}>${this.renderContent()}</div>`}renderContent(){let{localeData:e,activeDate:t}=this;if(!t||!e)return null;if(this.parentDatePickerEl){let{numberingSystem:s,lang:n}=this.parentDatePickerEl;h.numberFormatOptions={useGrouping:!1,...s&&{numberingSystem:s},...n&&{locale:n}}}let a=O(e.unitOrder),i=a.indexOf("y")<a.indexOf("m");return r`${this.position&&r`<div class=${c({[o.chevronContainer]:!0})}>${this.position==="start"&&this.renderChevron("left")||""}</div>`||""}<div class=${c({[o.monthYearContainer]:!0,[o.rangeCalendar]:!!this.position})}>${this.renderMonthYearContainer(i)}</div>${!this.position&&r`<div class=${c({[o.chevronContainer]:!0})}>${this.renderChevron("left")}</div>`||""}<div class=${c({[o.chevronContainer]:!0})}>${this.position!=="start"&&this.renderChevron("right")||""}</div>`}renderMonthYearContainer(e){return e?[this.renderYearInput(),this.renderMonthPicker()]:[this.renderMonthPicker(),this.renderYearInput()]}renderMonthPicker(){let e=this.activeDate.getMonth(),t=this.localeData.months[this.monthStyle];return r`<calcite-select class=${c(o.monthPicker)} .label=${this.messages.monthMenu} @calciteSelectChange=${this.handleMonthChange} width=auto ${m(this.monthPickerEl)}>${t.map((a,i)=>r`<calcite-option .disabled=${!this.isMonthInRange(i)} .selected=${i===e} .value=${a}>${a}</calcite-option>`)}</calcite-select>`}renderYearInput(){let e=this.localeData.year?.suffix,t=this.formatCalendarYear(this.activeDate.getFullYear());return r`<span class=${c(o.yearContainer)}><input .ariaLabel=${this.messages.year} class=${c({year:!0})} inputmode=numeric maxlength=4 minlength=1 @change=${this.onYearChange} @input=${this.onYearInput} @keydown=${this.onYearKey} pattern=\\d* type=text .value=${$(t??"")} ${m(this.yearInputEl)}>${e&&r`<span class=${c(o.suffix)}>${e}</span>`||""}</span>`}renderChevron(e){let t=e==="right",a=d(t?this.nextMonthDate:this.prevMonthDate,this.activeDate)||!v(this.activeDate,this.min,this.max);return r`<calcite-action alignment=center .ariaDisabled=${a} .ariaLabel=${t?this.messages.nextMonth:this.messages.prevMonth} class=${c(o.chevron)} compact data-direction=${e??M} .disabled=${a} .icon=${t?W.chevronRight:W.chevronLeft} icon-flip-rtl @click=${t?this.nextMonthClick:this.prevMonthClick} @keydown=${t?this.nextMonthKeydown:this.prevMonthKeydown} role=button .scale=${this.scale==="l"?"l":"m"} .text=${t?this.messages.nextMonth:this.messages.prevMonth} ${m(i=>t?this.nextMonthAction=i:this.prevMonthAction=i)}></calcite-action>`}};Y("calcite-date-picker-month-header",y);export{y as DatePickerMonthHeader};
|
|
@@ -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.0 */
|
|
3
|
+
v3.1.0-next.0 */
|
|
4
4
|
function e(r){return r.map(o=>{let t="";for(let n=0;n<o;n++)t+=((1+Math.random())*65536|0).toString(16).substring(1);return t}).join("-")}var i=()=>e([2,1,1,1,3]);export{i as a};
|