@esri/calcite-components 3.2.0-next.39 → 3.2.0-next.40
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/{VGUJWIE3.js → 2AURSSBW.js} +2 -2
- package/dist/calcite/{3RVJJX2U.js.LEGAL.txt → 2AURSSBW.js.LEGAL.txt} +1 -1
- package/dist/calcite/{QJMY6HK4.js → 2BKMHEEV.js} +2 -2
- package/dist/calcite/{24OTRUCC.js.LEGAL.txt → 2BKMHEEV.js.LEGAL.txt} +1 -1
- package/dist/calcite/{ZMFN7VKF.js → 2O44LJYG.js} +2 -2
- package/dist/calcite/{372T7EBW.js.LEGAL.txt → 2O44LJYG.js.LEGAL.txt} +1 -1
- package/dist/calcite/{372T7EBW.js → 2OKWW5QW.js} +2 -2
- package/dist/calcite/{2DKPKQXG.js.LEGAL.txt → 2OKWW5QW.js.LEGAL.txt} +1 -1
- package/dist/calcite/{RN6G4AJW.js → 33VZVMEQ.js} +2 -2
- package/dist/calcite/33VZVMEQ.js.LEGAL.txt +3 -0
- package/dist/calcite/{G77XQIMX.js → 34H6VHCP.js} +2 -2
- package/dist/calcite/34H6VHCP.js.LEGAL.txt +3 -0
- package/dist/calcite/{RLN7DR35.js → 3BX3JALR.js} +2 -2
- package/dist/calcite/3BX3JALR.js.LEGAL.txt +3 -0
- package/dist/calcite/{3RVJJX2U.js → 3KAKFW27.js} +2 -2
- package/dist/calcite/3KAKFW27.js.LEGAL.txt +3 -0
- package/dist/calcite/{P2XP2NHT.js → 3NKYZGOY.js} +2 -2
- package/dist/calcite/3NKYZGOY.js.LEGAL.txt +3 -0
- package/dist/calcite/{TYKK4ZDP.js → 3OLDLPGW.js} +2 -2
- package/dist/calcite/3OLDLPGW.js.LEGAL.txt +3 -0
- package/dist/calcite/{IRUMOVZZ.js → 3ZC35IU6.js} +2 -2
- package/dist/calcite/3ZC35IU6.js.LEGAL.txt +3 -0
- package/dist/calcite/{GS3X5VRZ.js → 3ZHVUAGO.js} +2 -2
- package/dist/calcite/3ZHVUAGO.js.LEGAL.txt +3 -0
- package/dist/calcite/{NYCLULH3.js → 3ZI3PBLD.js} +2 -2
- package/dist/calcite/3ZI3PBLD.js.LEGAL.txt +3 -0
- package/dist/calcite/{MR5UPVPG.js → 47SZGRLH.js} +2 -2
- package/dist/calcite/47SZGRLH.js.LEGAL.txt +3 -0
- package/dist/calcite/{LLN5DNPL.js → 4JEZM6VX.js} +2 -2
- package/dist/calcite/{LLN5DNPL.js.LEGAL.txt → 4JEZM6VX.js.LEGAL.txt} +1 -1
- package/dist/calcite/{3VLVDWSS.js → 4KFIUD2B.js} +2 -2
- package/dist/calcite/4KFIUD2B.js.LEGAL.txt +3 -0
- package/dist/calcite/4MQEUWEH.js +4 -0
- package/dist/calcite/4MQEUWEH.js.LEGAL.txt +3 -0
- package/dist/calcite/{P6C3W6FL.js → 4PDCFLEI.js} +2 -2
- package/dist/calcite/4PDCFLEI.js.LEGAL.txt +3 -0
- package/dist/calcite/{NCWK6WJU.js → 4S5MMRKY.js} +2 -2
- package/dist/calcite/4S5MMRKY.js.LEGAL.txt +3 -0
- package/dist/calcite/{62GP7Q7R.js → 4YKPRILU.js} +2 -2
- package/dist/calcite/4YKPRILU.js.LEGAL.txt +3 -0
- package/dist/calcite/{I4FISWDK.js → 5K3GZOWW.js} +2 -2
- package/dist/calcite/5K3GZOWW.js.LEGAL.txt +3 -0
- package/dist/calcite/{W7YWLFKG.js → 5NQUZRDM.js} +2 -2
- package/dist/calcite/{5T2FJWUW.js → 5SSKMKFV.js} +2 -2
- package/dist/calcite/5SSKMKFV.js.LEGAL.txt +3 -0
- package/dist/calcite/{F4S6EXX6.js → 5ZKH6XNV.js} +2 -2
- package/dist/calcite/5ZKH6XNV.js.LEGAL.txt +3 -0
- package/dist/calcite/{R7U5O4YW.js → 64F6FSTF.js} +2 -2
- package/dist/calcite/64F6FSTF.js.LEGAL.txt +3 -0
- package/dist/calcite/{PYM6655A.js → 67QAOXDX.js} +1 -1
- package/dist/calcite/67QAOXDX.js.LEGAL.txt +3 -0
- package/dist/calcite/{CVQXSZEH.js → 6AW4GRQ4.js} +2 -2
- package/dist/calcite/6AW4GRQ4.js.LEGAL.txt +3 -0
- package/dist/calcite/{R3CUJDU2.js → 6DCGXB5R.js} +1 -1
- package/dist/calcite/6DCGXB5R.js.LEGAL.txt +3 -0
- package/dist/calcite/{A4XLCDLZ.js → 6GM27GBO.js} +2 -2
- package/dist/calcite/{SQNNHAAG.js → 6HPPO7XW.js} +2 -2
- package/dist/calcite/6HPPO7XW.js.LEGAL.txt +3 -0
- package/dist/calcite/{HBU463EW.js → 6JABLZT7.js} +2 -2
- package/dist/calcite/6JABLZT7.js.LEGAL.txt +3 -0
- package/dist/calcite/{U2YGN4RT.js → 6P5PSH65.js} +2 -2
- package/dist/calcite/{AXBOTO3S.js → 6RISBQOV.js} +2 -2
- package/dist/calcite/6RISBQOV.js.LEGAL.txt +3 -0
- package/dist/calcite/{XQSZJ5CG.js → 6Z2B5YPT.js} +1 -1
- package/dist/calcite/6Z2B5YPT.js.LEGAL.txt +3 -0
- package/dist/calcite/{24OTRUCC.js → 7EKOSZOZ.js} +2 -2
- package/dist/calcite/7EKOSZOZ.js.LEGAL.txt +3 -0
- package/dist/calcite/{Y5A3EQS4.js → A7N7QSFD.js} +2 -2
- package/dist/calcite/A7N7QSFD.js.LEGAL.txt +3 -0
- package/dist/calcite/{PENLWMB3.js → AB6ORITE.js} +2 -2
- package/dist/calcite/AB6ORITE.js.LEGAL.txt +3 -0
- package/dist/calcite/{NDM46TRI.js → AECWOUVE.js} +2 -2
- package/dist/calcite/AECWOUVE.js.LEGAL.txt +3 -0
- package/dist/calcite/{TGV7EMNU.js → AFEKH67J.js} +2 -2
- package/dist/calcite/AFEKH67J.js.LEGAL.txt +3 -0
- package/dist/calcite/{H3WIGFJO.js → ALA3CMPJ.js} +2 -2
- package/dist/calcite/ALA3CMPJ.js.LEGAL.txt +3 -0
- package/dist/calcite/{MUFGKP4E.js → AZTNUW5Z.js} +2 -2
- package/dist/calcite/AZTNUW5Z.js.LEGAL.txt +3 -0
- package/dist/calcite/C5B5QVOZ.js +4 -0
- package/dist/calcite/C5B5QVOZ.js.LEGAL.txt +3 -0
- package/dist/calcite/{6M254VM3.js → CFP3CIBH.js} +2 -2
- package/dist/calcite/CFP3CIBH.js.LEGAL.txt +3 -0
- package/dist/calcite/{LWUNC2OP.js → CY4HMEXM.js} +2 -2
- package/dist/calcite/CY4HMEXM.js.LEGAL.txt +3 -0
- package/dist/calcite/{BXNTEQDG.js → D33THSDQ.js} +2 -2
- package/dist/calcite/D33THSDQ.js.LEGAL.txt +3 -0
- package/dist/calcite/{4M5YF4UK.js → D5ORTJBP.js} +2 -2
- package/dist/calcite/D5ORTJBP.js.LEGAL.txt +3 -0
- package/dist/calcite/{BXRLVWOE.js → D5WOJOBP.js} +2 -2
- package/dist/calcite/D5WOJOBP.js.LEGAL.txt +3 -0
- package/dist/calcite/{4PC2H3SA.js → DCCICHLE.js} +2 -2
- package/dist/calcite/DCCICHLE.js.LEGAL.txt +3 -0
- package/dist/calcite/{DACMF6M4.js → DJIDW3PH.js} +2 -2
- package/dist/calcite/DJIDW3PH.js.LEGAL.txt +3 -0
- package/dist/calcite/{2VN3YIDH.js → DNYNDPB5.js} +2 -2
- package/dist/calcite/{V6MACRDH.js → DXEUZNXM.js} +2 -2
- package/dist/calcite/DXEUZNXM.js.LEGAL.txt +3 -0
- package/dist/calcite/{MG5IOFW7.js → DYBMPADA.js} +2 -2
- package/dist/calcite/DYBMPADA.js.LEGAL.txt +3 -0
- package/dist/calcite/{5UJXO6ER.js → EQDBU7RM.js} +2 -2
- package/dist/calcite/EQDBU7RM.js.LEGAL.txt +3 -0
- package/dist/calcite/{MZMZSY5A.js → EYWRTO2E.js} +2 -2
- package/dist/calcite/{MZMZSY5A.js.LEGAL.txt → EYWRTO2E.js.LEGAL.txt} +1 -1
- package/dist/calcite/{JFS56TST.js → FCJNAEP5.js} +2 -2
- package/dist/calcite/FCJNAEP5.js.LEGAL.txt +3 -0
- package/dist/calcite/{Y2E6XYEE.js → FEMPCZLV.js} +1 -1
- package/dist/calcite/FEMPCZLV.js.LEGAL.txt +3 -0
- package/dist/calcite/{N63BZNBM.js → FFH3PE7I.js} +2 -2
- package/dist/calcite/FFH3PE7I.js.LEGAL.txt +3 -0
- package/dist/calcite/{4SZ573RT.js → FNJ5UP55.js} +2 -2
- package/dist/calcite/FNJ5UP55.js.LEGAL.txt +3 -0
- package/dist/calcite/{7T7MTXSU.js → FR4VAYJC.js} +2 -2
- package/dist/calcite/FR4VAYJC.js.LEGAL.txt +3 -0
- package/dist/calcite/{QRBR6VUO.js → G2KZHOPC.js} +2 -2
- package/dist/calcite/G2KZHOPC.js.LEGAL.txt +3 -0
- package/dist/calcite/{6VI66GV4.js → GC3D3FA4.js} +2 -2
- package/dist/calcite/GC3D3FA4.js.LEGAL.txt +3 -0
- package/dist/calcite/{LZ3V33XC.js → HNVOQW5F.js} +1 -1
- package/dist/calcite/HNVOQW5F.js.LEGAL.txt +3 -0
- package/dist/calcite/{RFI4KO6W.js → HPNQQK6A.js} +1 -1
- package/dist/calcite/{5Z4FPF7F.js → HVDZCSXZ.js} +2 -2
- package/dist/calcite/HVDZCSXZ.js.LEGAL.txt +3 -0
- package/dist/calcite/{NODTVZ24.js → IFSUY6OL.js} +2 -2
- package/dist/calcite/IFSUY6OL.js.LEGAL.txt +3 -0
- package/dist/calcite/{SEHADNF3.js → IS2XQRWJ.js} +2 -2
- package/dist/calcite/IS2XQRWJ.js.LEGAL.txt +3 -0
- package/dist/calcite/{HOEPFXY4.js → IYSVUD2W.js} +2 -2
- package/dist/calcite/IYSVUD2W.js.LEGAL.txt +3 -0
- package/dist/calcite/{TH2HXM2T.js → J6ZU5TTP.js} +1 -1
- package/dist/calcite/J6ZU5TTP.js.LEGAL.txt +3 -0
- package/dist/calcite/{XLQJWLJR.js → JGJKOHCP.js} +1 -1
- package/dist/calcite/JGJKOHCP.js.LEGAL.txt +3 -0
- package/dist/calcite/{JATMHESF.js → JQMONEIC.js} +1 -1
- package/dist/calcite/JQMONEIC.js.LEGAL.txt +3 -0
- package/dist/calcite/{QFOJGUH4.js → JSKDQQHO.js} +2 -2
- package/dist/calcite/JSKDQQHO.js.LEGAL.txt +3 -0
- package/dist/calcite/{R5NIHVIX.js → JTSQHJX5.js} +2 -2
- package/dist/calcite/JTSQHJX5.js.LEGAL.txt +3 -0
- package/dist/calcite/{C2KRQ7VY.js → K3HQETKI.js} +2 -2
- package/dist/calcite/K3HQETKI.js.LEGAL.txt +3 -0
- package/dist/calcite/{CLRL273B.js → K3RGRXZK.js} +2 -2
- package/dist/calcite/{AFFK5WSZ.js → K6GY2Q5E.js} +2 -2
- package/dist/calcite/K6GY2Q5E.js.LEGAL.txt +3 -0
- package/dist/calcite/{IWDYFFAM.js → KDX22TPR.js} +2 -2
- package/dist/calcite/{LAKJK7HL.js → KJQNKFEY.js} +2 -2
- package/dist/calcite/KJQNKFEY.js.LEGAL.txt +3 -0
- package/dist/calcite/{T3TLDID7.js → KKVVDKZZ.js} +2 -2
- package/dist/calcite/KKVVDKZZ.js.LEGAL.txt +3 -0
- package/dist/calcite/{4JL2EBN2.js → KMI5ODOO.js} +2 -2
- package/dist/calcite/KMI5ODOO.js.LEGAL.txt +3 -0
- package/dist/calcite/{DTAEBKT4.js → KOH7CJJ2.js} +2 -2
- package/dist/calcite/KOH7CJJ2.js.LEGAL.txt +3 -0
- package/dist/calcite/{HZH7HHAH.js → KTZK563F.js} +2 -2
- package/dist/calcite/{HZH7HHAH.js.LEGAL.txt → KTZK563F.js.LEGAL.txt} +1 -1
- package/dist/calcite/{DIWK757P.js → KV75A5OZ.js} +2 -2
- package/dist/calcite/KV75A5OZ.js.LEGAL.txt +3 -0
- package/dist/calcite/{ZS2B2AF5.js → LJFEVAGO.js} +2 -2
- package/dist/calcite/LJFEVAGO.js.LEGAL.txt +3 -0
- package/dist/calcite/{J5XEWZHE.js → LUAE2BNR.js} +2 -2
- package/dist/calcite/LUAE2BNR.js.LEGAL.txt +3 -0
- package/dist/calcite/{Z646UZFI.js → LWBS4ZDT.js} +1 -1
- package/dist/calcite/LWBS4ZDT.js.LEGAL.txt +3 -0
- package/dist/calcite/{HJQMJ3O5.js → M34FQPFC.js} +2 -2
- package/dist/calcite/M34FQPFC.js.LEGAL.txt +3 -0
- package/dist/calcite/{DIYHPDDJ.js → MEJBDF2X.js} +2 -2
- package/dist/calcite/MEJBDF2X.js.LEGAL.txt +3 -0
- package/dist/calcite/{46GRM4CE.js → MG6JYBW5.js} +2 -2
- package/dist/calcite/MG6JYBW5.js.LEGAL.txt +3 -0
- package/dist/calcite/{JDWLRXMB.js → MJ3BP4EF.js} +2 -2
- package/dist/calcite/MJ3BP4EF.js.LEGAL.txt +3 -0
- package/dist/calcite/{P2CTJE5E.js → MTSBROZ4.js} +2 -2
- package/dist/calcite/MTSBROZ4.js.LEGAL.txt +3 -0
- package/dist/calcite/{7QECW2E2.js → N73L76SJ.js} +2 -2
- package/dist/calcite/N73L76SJ.js.LEGAL.txt +3 -0
- package/dist/calcite/{D2KGWKKE.js → NA2X3DPJ.js} +2 -2
- package/dist/calcite/NA2X3DPJ.js.LEGAL.txt +3 -0
- package/dist/calcite/{CK2727PE.js → NAEQOQHY.js} +2 -2
- package/dist/calcite/NAEQOQHY.js.LEGAL.txt +3 -0
- package/dist/calcite/{UGDRDJPA.js → NNTVWBBP.js} +2 -2
- package/dist/calcite/{FQPVAT5F.js → NP2WVDB5.js} +2 -2
- package/dist/calcite/NP2WVDB5.js.LEGAL.txt +3 -0
- package/dist/calcite/{2DKPKQXG.js → NR2X3T5D.js} +2 -2
- package/dist/calcite/NR2X3T5D.js.LEGAL.txt +3 -0
- package/dist/calcite/{LIPUTT6N.js → NYF6T3OI.js} +2 -2
- package/dist/calcite/NYF6T3OI.js.LEGAL.txt +3 -0
- package/dist/calcite/{KFEMDYAO.js → O26R4TSO.js} +2 -2
- package/dist/calcite/{GL7DMV4S.js → O55ZI7N2.js} +2 -2
- package/dist/calcite/O55ZI7N2.js.LEGAL.txt +3 -0
- package/dist/calcite/{NH2FREQY.js → OKGB77L2.js} +2 -2
- package/dist/calcite/OKGB77L2.js.LEGAL.txt +3 -0
- package/dist/calcite/{Z6VHOIAN.js → ORK223LB.js} +2 -2
- package/dist/calcite/ORK223LB.js.LEGAL.txt +3 -0
- package/dist/calcite/{QJN3Y7KP.js → PB3OJ43M.js} +2 -2
- package/dist/calcite/PB3OJ43M.js.LEGAL.txt +3 -0
- package/dist/calcite/{EHEE5FVV.js → PHWXS446.js} +2 -2
- package/dist/calcite/PHWXS446.js.LEGAL.txt +3 -0
- package/dist/calcite/{MXQCR7YF.js → PIHPNMID.js} +2 -2
- package/dist/calcite/PIHPNMID.js.LEGAL.txt +3 -0
- package/dist/calcite/{KPX237YH.js → PIMY4FDR.js} +2 -2
- package/dist/calcite/PIMY4FDR.js.LEGAL.txt +3 -0
- package/dist/calcite/{GZUOSY5I.js → PNGIMH3C.js} +2 -2
- package/dist/calcite/{QVKJQIOF.js → PNO3AQXX.js} +1 -1
- package/dist/calcite/PNO3AQXX.js.LEGAL.txt +3 -0
- package/dist/calcite/{LI2EINF7.js → PP4TWNBJ.js} +2 -2
- package/dist/calcite/PP4TWNBJ.js.LEGAL.txt +3 -0
- package/dist/calcite/{7QNG2EF7.js → PQCLGIYQ.js} +2 -2
- package/dist/calcite/PQCLGIYQ.js.LEGAL.txt +3 -0
- package/dist/calcite/{Z7EIB7KP.js → PWPO7D4Y.js} +2 -2
- package/dist/calcite/PWPO7D4Y.js.LEGAL.txt +3 -0
- package/dist/calcite/{OPWA55SD.js → PXCK2RZB.js} +2 -2
- package/dist/calcite/PXCK2RZB.js.LEGAL.txt +3 -0
- package/dist/calcite/{HAEAO4QM.js → Q2FGVAYP.js} +2 -2
- package/dist/calcite/Q2FGVAYP.js.LEGAL.txt +3 -0
- package/dist/calcite/{PLJALAVQ.js → Q732AZTP.js} +2 -2
- package/dist/calcite/Q732AZTP.js.LEGAL.txt +3 -0
- package/dist/calcite/{WL7KPPYH.js → QB7JK7LO.js} +2 -2
- package/dist/calcite/QB7JK7LO.js.LEGAL.txt +3 -0
- package/dist/calcite/{FYK4XJBH.js → QCW5FCIU.js} +1 -1
- package/dist/calcite/QCW5FCIU.js.LEGAL.txt +3 -0
- package/dist/calcite/{GTIGGEIV.js → QH2DDIL6.js} +2 -2
- package/dist/calcite/QH2DDIL6.js.LEGAL.txt +3 -0
- package/dist/calcite/{GFFE55DG.js → QHBI2BZU.js} +2 -2
- package/dist/calcite/QHBI2BZU.js.LEGAL.txt +3 -0
- package/dist/calcite/QS2IO2B6.js +4 -0
- package/dist/calcite/QS2IO2B6.js.LEGAL.txt +3 -0
- package/dist/calcite/{MFXMCYAU.js → QWS3K5HU.js} +2 -2
- package/dist/calcite/{NLQEJQ5J.js → QWUSZRIE.js} +2 -2
- package/dist/calcite/QWUSZRIE.js.LEGAL.txt +3 -0
- package/dist/calcite/{5CFQYPD6.js → R6YNQ2V6.js} +2 -2
- package/dist/calcite/R6YNQ2V6.js.LEGAL.txt +3 -0
- package/dist/calcite/{76ZLZZXT.js → RCZOIN3S.js} +2 -2
- package/dist/calcite/RCZOIN3S.js.LEGAL.txt +3 -0
- package/dist/calcite/{WIUS56JI.js → RGO4YDKF.js} +1 -1
- package/dist/calcite/{SKKGAAMO.js → RWJNVFXT.js} +2 -2
- package/dist/calcite/RWJNVFXT.js.LEGAL.txt +3 -0
- package/dist/calcite/{BIXOQRWX.js → RZQCIIVR.js} +1 -1
- package/dist/calcite/RZQCIIVR.js.LEGAL.txt +3 -0
- package/dist/calcite/{4CRXZ63L.js → SBQ2IBIF.js} +2 -2
- package/dist/calcite/SBQ2IBIF.js.LEGAL.txt +3 -0
- package/dist/calcite/{IQQJKKQR.js → SFHB45KR.js} +2 -2
- package/dist/calcite/SFHB45KR.js.LEGAL.txt +3 -0
- package/dist/calcite/{JDNJDXBT.js → SH3BT3E4.js} +2 -2
- package/dist/calcite/SH3BT3E4.js.LEGAL.txt +3 -0
- package/dist/calcite/{5JJMIROF.js → SLJ7H27X.js} +2 -2
- package/dist/calcite/SLJ7H27X.js.LEGAL.txt +3 -0
- package/dist/calcite/{MN5ZMGDP.js → SR7MDDWB.js} +2 -2
- package/dist/calcite/SR7MDDWB.js.LEGAL.txt +3 -0
- package/dist/calcite/{3VMC2CMT.js → SWKCCOCK.js} +1 -1
- package/dist/calcite/{3VMC2CMT.js.LEGAL.txt → SWKCCOCK.js.LEGAL.txt} +1 -1
- package/dist/calcite/{T4ISGVVX.js → T2IMUI4L.js} +2 -2
- package/dist/calcite/T2IMUI4L.js.LEGAL.txt +3 -0
- package/dist/calcite/{M3UZ4E5H.js → T6ZWPJ3H.js} +2 -2
- package/dist/calcite/T6ZWPJ3H.js.LEGAL.txt +3 -0
- package/dist/calcite/{Z2N3ZD66.js → TGPFQVI3.js} +1 -1
- package/dist/calcite/TGPFQVI3.js.LEGAL.txt +3 -0
- package/dist/calcite/{MBN54URU.js → TIGA7CAS.js} +2 -2
- package/dist/calcite/TIGA7CAS.js.LEGAL.txt +3 -0
- package/dist/calcite/{MZDX2RGO.js → TK7HEAKQ.js} +2 -2
- package/dist/calcite/TK7HEAKQ.js.LEGAL.txt +3 -0
- package/dist/calcite/{YPHDMEZE.js → TRCUXJQP.js} +2 -2
- package/dist/calcite/TRCUXJQP.js.LEGAL.txt +3 -0
- package/dist/calcite/{JBY373VQ.js → TXROGSB2.js} +2 -2
- package/dist/calcite/TXROGSB2.js.LEGAL.txt +3 -0
- package/dist/calcite/{KO2HPSDS.js → U4AGMMNR.js} +2 -2
- package/dist/calcite/U4AGMMNR.js.LEGAL.txt +3 -0
- package/dist/calcite/{XCW4TOV5.js → U52EKICH.js} +2 -2
- package/dist/calcite/{I7DZAQ33.js → UBPEEJ47.js} +2 -2
- package/dist/calcite/UBPEEJ47.js.LEGAL.txt +3 -0
- package/dist/calcite/{LEGWZZ3C.js → UCUYESPO.js} +2 -2
- package/dist/calcite/UCUYESPO.js.LEGAL.txt +3 -0
- package/dist/calcite/{THZPNFDC.js → UJ3DVBBB.js} +2 -2
- package/dist/calcite/UJ3DVBBB.js.LEGAL.txt +3 -0
- package/dist/calcite/{7JTQUIIG.js → UTHT52HY.js} +1 -1
- package/dist/calcite/UTHT52HY.js.LEGAL.txt +3 -0
- package/dist/calcite/{GSA4PGT2.js → VAAG5IJE.js} +2 -2
- package/dist/calcite/VAAG5IJE.js.LEGAL.txt +3 -0
- package/dist/calcite/{55R7FS3U.js → VCIESHSA.js} +2 -2
- package/dist/calcite/VCIESHSA.js.LEGAL.txt +3 -0
- package/dist/calcite/{GTUVAAAD.js → VIJYQUPS.js} +1 -1
- package/dist/calcite/VIJYQUPS.js.LEGAL.txt +3 -0
- package/dist/calcite/{JAL66H3J.js → VKH366XK.js} +2 -2
- package/dist/calcite/VKH366XK.js.LEGAL.txt +3 -0
- package/dist/calcite/{POGNNNSN.js → VOMFC6A5.js} +2 -2
- package/dist/calcite/VOMFC6A5.js.LEGAL.txt +3 -0
- package/dist/calcite/{YBIDORYE.js → VWXTUWMC.js} +2 -2
- package/dist/calcite/VWXTUWMC.js.LEGAL.txt +3 -0
- package/dist/calcite/{DX4BEDZ3.js → VYNVOZVL.js} +1 -1
- package/dist/calcite/VYNVOZVL.js.LEGAL.txt +3 -0
- package/dist/calcite/{VUEY5X5A.js → W6MHPGER.js} +2 -2
- package/dist/calcite/W6MHPGER.js.LEGAL.txt +3 -0
- package/dist/calcite/{5Q54AMGC.js → WIA2UZRQ.js} +2 -2
- package/dist/calcite/WIA2UZRQ.js.LEGAL.txt +3 -0
- package/dist/calcite/{OQGS3D3N.js → WLID72PZ.js} +2 -2
- package/dist/calcite/WLID72PZ.js.LEGAL.txt +3 -0
- package/dist/calcite/{7PKWMEQD.js → WQ2CWXYT.js} +2 -2
- package/dist/calcite/WQ2CWXYT.js.LEGAL.txt +3 -0
- package/dist/calcite/{M4H4WLVH.js → WVA5MSI4.js} +2 -2
- package/dist/calcite/WVA5MSI4.js.LEGAL.txt +3 -0
- package/dist/calcite/{VHLIF5DY.js → WXNB4546.js} +2 -2
- package/dist/calcite/WXNB4546.js.LEGAL.txt +3 -0
- package/dist/calcite/{MSCFVCHB.js → X3Y745O5.js} +2 -2
- package/dist/calcite/X3Y745O5.js.LEGAL.txt +3 -0
- package/dist/calcite/{PW6UBKVH.js → X5NLUQDA.js} +2 -2
- package/dist/calcite/X5NLUQDA.js.LEGAL.txt +3 -0
- package/dist/calcite/{XVSPBUCP.js → XJUNWEHJ.js} +1 -1
- package/dist/calcite/XJUNWEHJ.js.LEGAL.txt +3 -0
- package/dist/calcite/{RI5ZWQGD.js → XUZICRV7.js} +2 -2
- package/dist/calcite/XUZICRV7.js.LEGAL.txt +3 -0
- package/dist/calcite/{7CQ233AJ.js → XZK2I4C2.js} +2 -2
- package/dist/calcite/XZK2I4C2.js.LEGAL.txt +3 -0
- package/dist/calcite/{7FB33YBD.js → Y6MVE6DC.js} +2 -2
- package/dist/calcite/Y6MVE6DC.js.LEGAL.txt +3 -0
- package/dist/calcite/{6NUAVTSM.js → YCAEPRM6.js} +2 -2
- package/dist/calcite/YCAEPRM6.js.LEGAL.txt +3 -0
- package/dist/calcite/{GRLBXAFF.js → YD2UXF4G.js} +1 -1
- package/dist/calcite/{GFONJVVJ.js → YQDHA3IR.js} +2 -2
- package/dist/calcite/YQDHA3IR.js.LEGAL.txt +3 -0
- package/dist/calcite/{OSZVSWGU.js → Z3OQGPN5.js} +2 -2
- package/dist/calcite/Z3OQGPN5.js.LEGAL.txt +3 -0
- package/dist/calcite/{TSHHVAZ7.js → Z53Z6H75.js} +2 -2
- package/dist/calcite/Z53Z6H75.js.LEGAL.txt +3 -0
- package/dist/calcite/{HNERZLDY.js → ZTSRFYI5.js} +2 -2
- package/dist/calcite/ZTSRFYI5.js.LEGAL.txt +3 -0
- package/dist/calcite/{VYRPNOIH.js → ZXGONEDG.js} +1 -1
- package/dist/calcite/ZXGONEDG.js.LEGAL.txt +3 -0
- package/dist/calcite/calcite.esm.js +2 -2
- package/dist/calcite/calcite.esm.js.LEGAL.txt +1 -1
- package/dist/chunks/ExpandToggle.js +1 -1
- package/dist/chunks/FloatingArrow.js +1 -1
- package/dist/chunks/Heading.js +1 -1
- package/dist/chunks/Validation.js +1 -1
- package/dist/chunks/XButton.js +1 -1
- package/dist/chunks/array.js +1 -1
- package/dist/chunks/component.js +1 -1
- package/dist/chunks/core.js +1 -1
- package/dist/chunks/date.js +1 -1
- package/dist/chunks/dom.js +1 -1
- package/dist/chunks/dynamicClasses.js +1 -1
- package/dist/chunks/filter.js +1 -1
- package/dist/chunks/floating-ui.js +1 -1
- package/dist/chunks/form.js +1 -1
- package/dist/chunks/global.js +1 -1
- package/dist/chunks/guid.js +1 -1
- package/dist/chunks/input.js +1 -1
- package/dist/chunks/interact.min.js +1 -1
- package/dist/chunks/interactive.js +1 -1
- package/dist/chunks/key.js +1 -1
- package/dist/chunks/label.js +1 -1
- package/dist/chunks/locale.js +1 -1
- package/dist/chunks/logger.js +1 -1
- package/dist/chunks/math.js +1 -1
- package/dist/chunks/observers.js +1 -1
- package/dist/chunks/openCloseComponent.js +1 -1
- package/dist/chunks/resources.js +1 -1
- package/dist/chunks/resources2.js +1 -1
- package/dist/chunks/resources3.js +1 -1
- package/dist/chunks/resources4.js +1 -1
- package/dist/chunks/resources5.js +1 -1
- package/dist/chunks/resources6.js +1 -1
- package/dist/chunks/resources7.js +1 -1
- package/dist/chunks/responsive.js +1 -1
- package/dist/chunks/runtime.js +5 -5
- 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/usePreventDocumentScroll.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utils.js +1 -1
- package/dist/chunks/utils2.js +1 -1
- package/dist/chunks/utils3.js +1 -1
- package/dist/chunks/utils4.js +1 -1
- package/dist/components/calcite-accordion/customElement.js +1 -1
- package/dist/components/calcite-accordion-item/customElement.js +1 -1
- package/dist/components/calcite-action/customElement.js +1 -1
- package/dist/components/calcite-action-bar/customElement.js +1 -1
- package/dist/components/calcite-action-group/customElement.js +1 -1
- package/dist/components/calcite-action-menu/customElement.js +1 -1
- package/dist/components/calcite-action-pad/customElement.js +1 -1
- package/dist/components/calcite-alert/customElement.js +1 -1
- package/dist/components/calcite-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 +6 -8
- package/dist/components/calcite-dropdown/customElement.js +3 -10
- 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 +5 -7
- 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 +5 -7
- package/dist/components/calcite-shell/customElement.js +1 -1
- package/dist/components/calcite-shell-center-row/customElement.js +1 -1
- package/dist/components/calcite-shell-panel/customElement.js +1 -1
- package/dist/components/calcite-slider/customElement.js +1 -1
- package/dist/components/calcite-sort-handle/customElement.js +1 -1
- package/dist/components/calcite-sortable-list/customElement.js +1 -1
- package/dist/components/calcite-split-button/customElement.js +1 -1
- package/dist/components/calcite-stack/customElement.js +1 -1
- package/dist/components/calcite-stepper/customElement.js +1 -1
- package/dist/components/calcite-stepper-item/customElement.js +1 -1
- package/dist/components/calcite-switch/customElement.js +1 -1
- package/dist/components/calcite-tab/customElement.js +1 -1
- package/dist/components/calcite-tab-nav/customElement.js +1 -1
- package/dist/components/calcite-tab-title/customElement.js +1 -1
- package/dist/components/calcite-table/customElement.js +1 -1
- package/dist/components/calcite-table-cell/customElement.js +1 -1
- package/dist/components/calcite-table-header/customElement.js +1 -1
- package/dist/components/calcite-table-row/customElement.js +1 -1
- package/dist/components/calcite-tabs/customElement.js +1 -1
- package/dist/components/calcite-text-area/customElement.js +1 -1
- package/dist/components/calcite-tile/customElement.js +1 -1
- package/dist/components/calcite-tile-group/customElement.js +1 -1
- package/dist/components/calcite-tile-select/customElement.js +1 -1
- package/dist/components/calcite-tile-select-group/customElement.js +1 -1
- package/dist/components/calcite-time-picker/customElement.js +1 -1
- package/dist/components/calcite-tip/customElement.js +1 -1
- package/dist/components/calcite-tip-group/customElement.js +1 -1
- package/dist/components/calcite-tip-manager/customElement.js +1 -1
- package/dist/components/calcite-tooltip/customElement.js +1 -1
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/package.json +2 -2
- package/dist/calcite/3VLVDWSS.js.LEGAL.txt +0 -3
- package/dist/calcite/46GRM4CE.js.LEGAL.txt +0 -3
- package/dist/calcite/4CRXZ63L.js.LEGAL.txt +0 -3
- package/dist/calcite/4JL2EBN2.js.LEGAL.txt +0 -3
- package/dist/calcite/4M5YF4UK.js.LEGAL.txt +0 -3
- package/dist/calcite/4PC2H3SA.js.LEGAL.txt +0 -3
- package/dist/calcite/4SZ573RT.js.LEGAL.txt +0 -3
- package/dist/calcite/55R7FS3U.js.LEGAL.txt +0 -3
- package/dist/calcite/5CFQYPD6.js.LEGAL.txt +0 -3
- package/dist/calcite/5JJMIROF.js.LEGAL.txt +0 -3
- package/dist/calcite/5Q54AMGC.js.LEGAL.txt +0 -3
- package/dist/calcite/5T2FJWUW.js.LEGAL.txt +0 -3
- package/dist/calcite/5UJXO6ER.js.LEGAL.txt +0 -3
- package/dist/calcite/5Z4FPF7F.js.LEGAL.txt +0 -3
- package/dist/calcite/62GP7Q7R.js.LEGAL.txt +0 -3
- package/dist/calcite/6M254VM3.js.LEGAL.txt +0 -3
- package/dist/calcite/6NUAVTSM.js.LEGAL.txt +0 -3
- package/dist/calcite/6VI66GV4.js.LEGAL.txt +0 -3
- package/dist/calcite/76ZLZZXT.js.LEGAL.txt +0 -3
- package/dist/calcite/7CQ233AJ.js.LEGAL.txt +0 -3
- package/dist/calcite/7FB33YBD.js.LEGAL.txt +0 -3
- package/dist/calcite/7JTQUIIG.js.LEGAL.txt +0 -3
- package/dist/calcite/7PKWMEQD.js.LEGAL.txt +0 -3
- package/dist/calcite/7QECW2E2.js.LEGAL.txt +0 -3
- package/dist/calcite/7QNG2EF7.js.LEGAL.txt +0 -3
- package/dist/calcite/7T7MTXSU.js.LEGAL.txt +0 -3
- package/dist/calcite/A2YB5LXN.js +0 -4
- package/dist/calcite/A2YB5LXN.js.LEGAL.txt +0 -3
- package/dist/calcite/AFFK5WSZ.js.LEGAL.txt +0 -3
- package/dist/calcite/AXBOTO3S.js.LEGAL.txt +0 -3
- package/dist/calcite/BIXOQRWX.js.LEGAL.txt +0 -3
- package/dist/calcite/BXNTEQDG.js.LEGAL.txt +0 -3
- package/dist/calcite/BXRLVWOE.js.LEGAL.txt +0 -3
- package/dist/calcite/C2KRQ7VY.js.LEGAL.txt +0 -3
- package/dist/calcite/CK2727PE.js.LEGAL.txt +0 -3
- package/dist/calcite/CVQXSZEH.js.LEGAL.txt +0 -3
- package/dist/calcite/D2KGWKKE.js.LEGAL.txt +0 -3
- package/dist/calcite/DACMF6M4.js.LEGAL.txt +0 -3
- package/dist/calcite/DIWK757P.js.LEGAL.txt +0 -3
- package/dist/calcite/DIYHPDDJ.js.LEGAL.txt +0 -3
- package/dist/calcite/DTAEBKT4.js.LEGAL.txt +0 -3
- package/dist/calcite/DX4BEDZ3.js.LEGAL.txt +0 -3
- package/dist/calcite/EHEE5FVV.js.LEGAL.txt +0 -3
- package/dist/calcite/F4S6EXX6.js.LEGAL.txt +0 -3
- package/dist/calcite/FQPVAT5F.js.LEGAL.txt +0 -3
- package/dist/calcite/FYK4XJBH.js.LEGAL.txt +0 -3
- package/dist/calcite/G77XQIMX.js.LEGAL.txt +0 -3
- package/dist/calcite/GFFE55DG.js.LEGAL.txt +0 -3
- package/dist/calcite/GFONJVVJ.js.LEGAL.txt +0 -3
- package/dist/calcite/GL7DMV4S.js.LEGAL.txt +0 -3
- package/dist/calcite/GS3X5VRZ.js.LEGAL.txt +0 -3
- package/dist/calcite/GSA4PGT2.js.LEGAL.txt +0 -3
- package/dist/calcite/GTIGGEIV.js.LEGAL.txt +0 -3
- package/dist/calcite/GTUVAAAD.js.LEGAL.txt +0 -3
- package/dist/calcite/H3WIGFJO.js.LEGAL.txt +0 -3
- package/dist/calcite/HAEAO4QM.js.LEGAL.txt +0 -3
- package/dist/calcite/HBU463EW.js.LEGAL.txt +0 -3
- package/dist/calcite/HJQMJ3O5.js.LEGAL.txt +0 -3
- package/dist/calcite/HNERZLDY.js.LEGAL.txt +0 -3
- package/dist/calcite/HOEPFXY4.js.LEGAL.txt +0 -3
- package/dist/calcite/I4FISWDK.js.LEGAL.txt +0 -3
- package/dist/calcite/I7DZAQ33.js.LEGAL.txt +0 -3
- package/dist/calcite/IQQJKKQR.js.LEGAL.txt +0 -3
- package/dist/calcite/IRUMOVZZ.js.LEGAL.txt +0 -3
- package/dist/calcite/J5XEWZHE.js.LEGAL.txt +0 -3
- package/dist/calcite/JAL66H3J.js.LEGAL.txt +0 -3
- package/dist/calcite/JATMHESF.js.LEGAL.txt +0 -3
- package/dist/calcite/JBY373VQ.js.LEGAL.txt +0 -3
- package/dist/calcite/JDNJDXBT.js.LEGAL.txt +0 -3
- package/dist/calcite/JDWLRXMB.js.LEGAL.txt +0 -3
- package/dist/calcite/JFS56TST.js.LEGAL.txt +0 -3
- package/dist/calcite/KO2HPSDS.js.LEGAL.txt +0 -3
- package/dist/calcite/KPX237YH.js.LEGAL.txt +0 -3
- package/dist/calcite/LAKJK7HL.js.LEGAL.txt +0 -3
- package/dist/calcite/LEGWZZ3C.js.LEGAL.txt +0 -3
- package/dist/calcite/LI2EINF7.js.LEGAL.txt +0 -3
- package/dist/calcite/LIPUTT6N.js.LEGAL.txt +0 -3
- package/dist/calcite/LWUNC2OP.js.LEGAL.txt +0 -3
- package/dist/calcite/LZ3V33XC.js.LEGAL.txt +0 -3
- package/dist/calcite/M3UZ4E5H.js.LEGAL.txt +0 -3
- package/dist/calcite/M4H4WLVH.js.LEGAL.txt +0 -3
- package/dist/calcite/MBN54URU.js.LEGAL.txt +0 -3
- package/dist/calcite/MG5IOFW7.js.LEGAL.txt +0 -3
- package/dist/calcite/MN5ZMGDP.js.LEGAL.txt +0 -3
- package/dist/calcite/MR5UPVPG.js.LEGAL.txt +0 -3
- package/dist/calcite/MSCFVCHB.js.LEGAL.txt +0 -3
- package/dist/calcite/MUFGKP4E.js.LEGAL.txt +0 -3
- package/dist/calcite/MXQCR7YF.js.LEGAL.txt +0 -3
- package/dist/calcite/MZDX2RGO.js.LEGAL.txt +0 -3
- package/dist/calcite/N63BZNBM.js.LEGAL.txt +0 -3
- package/dist/calcite/NCWK6WJU.js.LEGAL.txt +0 -3
- package/dist/calcite/NDM46TRI.js.LEGAL.txt +0 -3
- package/dist/calcite/NH2FREQY.js.LEGAL.txt +0 -3
- package/dist/calcite/NLQEJQ5J.js.LEGAL.txt +0 -3
- package/dist/calcite/NODTVZ24.js.LEGAL.txt +0 -3
- package/dist/calcite/NYCLULH3.js.LEGAL.txt +0 -3
- package/dist/calcite/OPWA55SD.js.LEGAL.txt +0 -3
- package/dist/calcite/OQGS3D3N.js.LEGAL.txt +0 -3
- package/dist/calcite/OSZVSWGU.js.LEGAL.txt +0 -3
- package/dist/calcite/P2CTJE5E.js.LEGAL.txt +0 -3
- package/dist/calcite/P2XP2NHT.js.LEGAL.txt +0 -3
- package/dist/calcite/P3RLUM2B.js +0 -4
- package/dist/calcite/P3RLUM2B.js.LEGAL.txt +0 -3
- package/dist/calcite/P6C3W6FL.js.LEGAL.txt +0 -3
- package/dist/calcite/PENLWMB3.js.LEGAL.txt +0 -3
- package/dist/calcite/PLJALAVQ.js.LEGAL.txt +0 -3
- package/dist/calcite/POGNNNSN.js.LEGAL.txt +0 -3
- package/dist/calcite/PW6UBKVH.js.LEGAL.txt +0 -3
- package/dist/calcite/PYM6655A.js.LEGAL.txt +0 -3
- package/dist/calcite/QFOJGUH4.js.LEGAL.txt +0 -3
- package/dist/calcite/QJMY6HK4.js.LEGAL.txt +0 -3
- package/dist/calcite/QJN3Y7KP.js.LEGAL.txt +0 -3
- package/dist/calcite/QRBR6VUO.js.LEGAL.txt +0 -3
- package/dist/calcite/QVKJQIOF.js.LEGAL.txt +0 -3
- package/dist/calcite/R3CUJDU2.js.LEGAL.txt +0 -3
- package/dist/calcite/R5NIHVIX.js.LEGAL.txt +0 -3
- package/dist/calcite/R7U5O4YW.js.LEGAL.txt +0 -3
- package/dist/calcite/RI5ZWQGD.js.LEGAL.txt +0 -3
- package/dist/calcite/RLN7DR35.js.LEGAL.txt +0 -3
- package/dist/calcite/RN6G4AJW.js.LEGAL.txt +0 -3
- package/dist/calcite/SEHADNF3.js.LEGAL.txt +0 -3
- package/dist/calcite/SKKGAAMO.js.LEGAL.txt +0 -3
- package/dist/calcite/SQNNHAAG.js.LEGAL.txt +0 -3
- package/dist/calcite/T3TLDID7.js.LEGAL.txt +0 -3
- package/dist/calcite/T4ISGVVX.js.LEGAL.txt +0 -3
- package/dist/calcite/TGV7EMNU.js.LEGAL.txt +0 -3
- package/dist/calcite/TH2HXM2T.js.LEGAL.txt +0 -3
- package/dist/calcite/THZPNFDC.js.LEGAL.txt +0 -3
- package/dist/calcite/TSHHVAZ7.js.LEGAL.txt +0 -3
- package/dist/calcite/TYKK4ZDP.js.LEGAL.txt +0 -3
- package/dist/calcite/V6MACRDH.js.LEGAL.txt +0 -3
- package/dist/calcite/VGUJWIE3.js.LEGAL.txt +0 -3
- package/dist/calcite/VHLIF5DY.js.LEGAL.txt +0 -3
- package/dist/calcite/VUEY5X5A.js.LEGAL.txt +0 -3
- package/dist/calcite/VYRPNOIH.js.LEGAL.txt +0 -3
- package/dist/calcite/WL7KPPYH.js.LEGAL.txt +0 -3
- package/dist/calcite/WN6CJLMD.js +0 -4
- package/dist/calcite/WN6CJLMD.js.LEGAL.txt +0 -3
- package/dist/calcite/XLQJWLJR.js.LEGAL.txt +0 -3
- package/dist/calcite/XQSZJ5CG.js.LEGAL.txt +0 -3
- package/dist/calcite/XVSPBUCP.js.LEGAL.txt +0 -3
- package/dist/calcite/Y2E6XYEE.js.LEGAL.txt +0 -3
- package/dist/calcite/Y5A3EQS4.js.LEGAL.txt +0 -3
- package/dist/calcite/YBIDORYE.js.LEGAL.txt +0 -3
- package/dist/calcite/YPHDMEZE.js.LEGAL.txt +0 -3
- package/dist/calcite/Z2N3ZD66.js.LEGAL.txt +0 -3
- package/dist/calcite/Z646UZFI.js.LEGAL.txt +0 -3
- package/dist/calcite/Z6VHOIAN.js.LEGAL.txt +0 -3
- package/dist/calcite/Z7EIB7KP.js.LEGAL.txt +0 -3
- package/dist/calcite/ZMFN7VKF.js.LEGAL.txt +0 -3
- package/dist/calcite/ZS2B2AF5.js.LEGAL.txt +0 -3
- /package/dist/calcite/{W7YWLFKG.js.LEGAL.txt → 5NQUZRDM.js.LEGAL.txt} +0 -0
- /package/dist/calcite/{A4XLCDLZ.js.LEGAL.txt → 6GM27GBO.js.LEGAL.txt} +0 -0
- /package/dist/calcite/{U2YGN4RT.js.LEGAL.txt → 6P5PSH65.js.LEGAL.txt} +0 -0
- /package/dist/calcite/{2VN3YIDH.js.LEGAL.txt → DNYNDPB5.js.LEGAL.txt} +0 -0
- /package/dist/calcite/{RFI4KO6W.js.LEGAL.txt → HPNQQK6A.js.LEGAL.txt} +0 -0
- /package/dist/calcite/{CLRL273B.js.LEGAL.txt → K3RGRXZK.js.LEGAL.txt} +0 -0
- /package/dist/calcite/{GRLBXAFF.js.LEGAL.txt → KDX22TPR.js.LEGAL.txt} +0 -0
- /package/dist/calcite/{IWDYFFAM.js.LEGAL.txt → NNTVWBBP.js.LEGAL.txt} +0 -0
- /package/dist/calcite/{KFEMDYAO.js.LEGAL.txt → O26R4TSO.js.LEGAL.txt} +0 -0
- /package/dist/calcite/{GZUOSY5I.js.LEGAL.txt → PNGIMH3C.js.LEGAL.txt} +0 -0
- /package/dist/calcite/{MFXMCYAU.js.LEGAL.txt → QWS3K5HU.js.LEGAL.txt} +0 -0
- /package/dist/calcite/{UGDRDJPA.js.LEGAL.txt → RGO4YDKF.js.LEGAL.txt} +0 -0
- /package/dist/calcite/{WIUS56JI.js.LEGAL.txt → U52EKICH.js.LEGAL.txt} +0 -0
- /package/dist/calcite/{XCW4TOV5.js.LEGAL.txt → YD2UXF4G.js.LEGAL.txt} +0 -0
|
@@ -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.2.0-next.
|
|
4
|
-
import{a as n,b as m,c}from"./
|
|
3
|
+
v3.2.0-next.40 */
|
|
4
|
+
import{a as n,b as m,c}from"./DNYNDPB5.js";import{a as l}from"./PNGIMH3C.js";import{y as i}from"./EYWRTO2E.js";function f(e){return Math.min(Math.max(Math.ceil(e),1),6)}var h=({children:e,...a})=>{let t=a.level?n(`h${a.level}`):m`div`;return l(a.key,c`<${t} class=${i(a.class)}>${e}</${t}>`)};export{f as a,h 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.2.0-next.
|
|
3
|
+
v3.2.0-next.40 */
|
|
4
4
|
function v(r,n,i){if(!1)return;let e=c(r);return new e(n,i)}function c(r){class n extends window.MutationObserver{constructor(e){super(e),this.observedEntry=[],this.callback=e}observe(e,t){return this.observedEntry.push({target:e,options:t}),super.observe(e,t)}unobserve(e){let t=this.observedEntry.filter(s=>s.target!==e);this.observedEntry=[],this.callback(super.takeRecords(),this),this.disconnect(),t.forEach(s=>this.observe(s.target,s.options))}}return function(){return r==="intersection"?window.IntersectionObserver:r==="mutation"?n:window.ResizeObserver}()}export{v 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.2.0-next.
|
|
4
|
-
import{a as s}from"./GZUOSY5I.js";import{b}from"./U2YGN4RT.js";import{e as $,k as h,u as m}from"./LLN5DNPL.js";import{a as r,d as k}from"./POGNNNSN.js";import"./QJN3Y7KP.js";import"./R3CUJDU2.js";import{D as x,K as f,e as g,g as a,w as d,x as u,y as t}from"./MZMZSY5A.js";var S={actionsStart:"actions-start",actionsEnd:"actions-end"},c={actionsEnd:"actions-end",actionsStart:"actions-start",content:"content",description:"description",expandIcon:"expand-icon",header:"header",headerContainer:"header-container",headerContent:"header-content",headerText:"header-text",heading:"heading",icon:"icon",iconEnd:"icon--end",iconStart:"icon--start"},l={section:"section",sectionToggle:"section-toggle"},y=g`.icon-position--end,.icon-position--start{--calcite-internal-accordion-item-icon-rotation: -90deg ;--calcite-internal-accordion-item-active-icon-rotation: 0deg;--calcite-internal-accordion-item-icon-rotation-rtl: 90deg;--calcite-internal-accordion-item-active-icon-rotation-rtl: 0deg}:host{position:relative;display:flex;flex-direction:column;text-decoration-line:none;color:var(--calcite-accordion-text-color, var(--calcite-accordion-item-text-color, var(--calcite-color-text-3)));background-color:var(--calcite-accordion-background-color, var(--calcite-accordion-item-background-color));border-width:0}:host .header{background-color:var(--calcite-accordion-item-header-background-color)}:host .header:hover{background-color:var(--calcite-internal-accordion-item-header-background-color-hover)}:host .header:active{background-color:var(--calcite-internal-accordion-item-header-background-color-press)}.header--solid{--calcite-internal-accordion-item-header-background-color-hover: var( --calcite-accordion-item-header-background-color-hover, var(--calcite-color-foreground-2) );--calcite-internal-accordion-item-header-background-color-press: var( --calcite-accordion-item-header-background-color-press, var(--calcite-color-foreground-3) )}.header--transparent{--calcite-internal-accordion-item-header-background-color-hover: var( --calcite-accordion-item-header-background-color-hover, var(--calcite-color-transparent-hover) );--calcite-internal-accordion-item-header-background-color-press: var( --calcite-accordion-item-header-background-color-press, var(--calcite-color-transparent-press) )}.icon-position--start{--calcite-internal-accordion-item-flex-direction: row-reverse;--calcite-internal-accordion-item-icon-spacing-start: 0;--calcite-internal-accordion-item-icon-spacing-end: var(--calcite-internal-accordion-icon-margin)}.icon-position--end{--calcite-internal-accordion-item-flex-direction: row;--calcite-internal-accordion-item-icon-spacing-start: var(--calcite-internal-accordion-icon-margin);--calcite-internal-accordion-item-icon-spacing-end: 0}.icon-position--end:not(.icon-type--plus-minus){--calcite-internal-accordion-item-icon-rotation: 0deg;--calcite-internal-accordion-item-active-icon-rotation: 180deg;--calcite-internal-accordion-item-icon-rotation-rtl: 0deg;--calcite-internal-accordion-item-active-icon-rotation-rtl: -180deg }.content,.header{border-block-end-width:var(--calcite-border-width-sm);border-block-end-style:solid;border-color:var(--calcite-accordion-border-color, var(--calcite-accordion-item-border-color, var(--calcite-color-border-2)))}.header-content{padding:var(--calcite-internal-accordion-item-padding, var(--calcite-internal-accordion-item-spacing-unit, .5rem .75rem))}.content{padding:var(--calcite-accordion-item-content-space, var(--calcite-internal-accordion-item-padding, var(--calcite-internal-accordion-item-spacing-unit, .5rem .75rem)))}.header{display:flex;align-items:stretch}.header-content,.header-container,.header .actions-start,.header .actions-end{display:flex;align-items:center;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);word-wrap:break-word;word-break:break-word}.header-content{flex-grow:1;cursor:pointer;outline-color:transparent;flex-direction:var(--calcite-internal-accordion-item-flex-direction);color:var(--calcite-accordion-item-heading-text-color, var(--calcite-accordion-text-color, inherit))}.header-content: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))))}.header-content:focus,.header-content:hover,.header-content:active{color:var(--calcite-accordion-item-heading-text-color, var(--calcite-accordion-text-color-hover))}.header-content:focus .heading,.header-content:hover .heading,.header-content:active .heading{color:var(--calcite-accordion-item-heading-text-color, var(--calcite-accordion-text-color-press))}.header-container{inline-size:100%}.header-text{margin-block:0px;flex-grow:1;flex-direction:column;padding-block:0px;text-align:initial;margin-inline-end:auto}.heading,.description{display:flex;inline-size:100%}.heading{font-weight:var(--calcite-font-weight-medium)}.actions-start ::slotted(calcite-action),.actions-end ::slotted(calcite-action){align-self:stretch}.icon{display:flex;align-items:center;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);margin-inline-end:var(--calcite-internal-accordion-item-icon-spacing-start);margin-inline-start:var(--calcite-internal-accordion-item-icon-spacing-end)}.icon--start{color:var(--calcite-accordion-item-icon-color-start, var(--calcite-accordion-item-start-icon-color, var(--calcite-accordion-item-icon-color, currentColor)));margin-inline-end:var(--calcite-internal-accordion-icon-margin)}.icon--end{color:var(--calcite-accordion-item-icon-color-end, var(--calcite-accordion-item-end-icon-color, var(--calcite-accordion-item-icon-color, currentColor)));margin-inline-end:var(--calcite-internal-accordion-icon-margin);margin-inline-start:var(--calcite-internal-accordion-icon-margin)}.expand-icon{color:var(--calcite-accordion-item-expand-icon-color, var(--calcite-accordion-text-color, var(--calcite-accordion-item-text-color, var(--calcite-color-text-3))));margin-inline-start:var(--calcite-internal-accordion-item-icon-spacing-start);margin-inline-end:var(--calcite-internal-accordion-item-icon-spacing-end);transform:rotate(var(--calcite-internal-accordion-item-icon-rotation))}.calcite--rtl .expand-icon{transform:rotate(var(--calcite-internal-accordion-item-icon-rotation-rtl))}.description{margin-block-start:.25rem}.content{display:none;text-align:initial}:host(:not([expanded])) .heading{color:var(--calcite-accordion-item-heading-text-color, var(--calcite-accordion-text-color-hover, var(--calcite-accordion-item-text-color-hover, var(--calcite-color-text-2))))}:host([expanded]){color:var(--calcite-accordion-text-color-press, var(--calcite-accordion-text-color, var(--calcite-accordion-item-text-color, var(--calcite-color-text-1))))}:host([expanded]) .header{border-block-end-color:transparent}:host([expanded]) .expand-icon{color:var(--calcite-accordion-item-expand-icon-color, var(--calcite-accordion-text-color-hover, var(--calcite-accordion-text-color, var(--calcite-accordion-item-text-color, var(--calcite-accordion-item-text-color-hover, var(--calcite-color-text-2))))));transform:rotate(var(--calcite-internal-accordion-item-active-icon-rotation))}:host([expanded]) .calcite--rtl .expand-icon{transform:rotate(var(--calcite-internal-accordion-item-active-icon-rotation-rtl))}:host([expanded]) .description{color:var(--calcite-accordion-text-color-hover, var(--calcite-accordion-text-color, var(--calcite-accordion-item-text-color, var(--calcite-accordion-item-text-color-hover, var(--calcite-color-text-2)))))}:host([expanded]) .content{display:block}@media (forced-colors: active){:host([expanded]) .header{border-block-end:none}:host([expanded]) .heading{font-weight:bolder}.header-content:hover .heading,.header-content:focus .heading{text-decoration:underline}}:host([hidden]){display:none}[hidden]{display:none}`,p=class extends u{constructor(){super(),this.hasActionsEnd=!1,this.hasActionsStart=!1,this.expanded=!1,this.calciteInternalAccordionItemClose=d({cancelable:!1}),this.calciteInternalAccordionItemSelect=d({cancelable:!1}),this.listen("keydown",this.keyDownHandler),this.listenOn(document.body,"calciteInternalAccordionChange",this.updateActiveItemOnChange),this.listenOn(document,"calciteInternalAccordionItemsSync",this.accordionItemSyncHandler)}static{this.properties={hasActionsEnd:[16,{state:!0}],hasActionsStart:[16,{state:!0}],accordionParent:[0,{attribute:!1}],description:1,expanded:[7,{reflect:!0,type:Boolean}],heading:1,iconEnd:[3,{reflect:!0}],iconFlipRtl:[3,{reflect:!0}],appearance:1,iconPosition:1,iconStart:[3,{reflect:!0}],iconType:1,scale:1}}static{this.styles=y}async setFocus(){await k(this),this.headerEl.focus()}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.emitRequestedItem(),e.preventDefault();break}}updateActiveItemOnChange(e){let[i]=e.composedPath(),n=h(this.el,"calcite-accordion");i===n&&(this.determineActiveItem(n.selectionMode,e.detail.requestedAccordionItem),e.stopPropagation())}accordionItemSyncHandler(e){let[i]=e.composedPath(),n=this.el;if(n.parentElement===i)return;let o=h(n,"calcite-accordion");i===o&&(this.appearance=o.appearance,this.iconPosition=o.iconPosition,this.iconType=o.iconType,this.scale=o.scale,e.stopPropagation())}handleActionsStartSlotChange(e){this.hasActionsStart=m(e)}handleActionsEndSlotChange(e){this.hasActionsEnd=m(e)}storeHeaderEl(e){this.headerEl=e}itemHeaderClickHandler(){this.emitRequestedItem()}determineActiveItem(e,i){switch(e){case"multiple":this.el===i&&(this.expanded=!this.expanded);break;case"single":this.expanded=this.el===i?!this.expanded:!1;break;case"single-persist":this.expanded=this.el===i;break}}emitRequestedItem(){this.calciteInternalAccordionItemSelect.emit({requestedAccordionItem:this.el})}renderActionsStart(){return a`<div class=${t(c.actionsStart)} .hidden=${!this.hasActionsStart}><slot name=${S.actionsStart} @slotchange=${this.handleActionsStartSlotChange}></slot></div>`}renderActionsEnd(){return a`<div class=${t(c.actionsEnd)} .hidden=${!this.hasActionsEnd}><slot name=${S.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot></div>`}render(){let{iconFlipRtl:e}=this,i=$(this.el),n=this.iconStart?s("icon-start",a`<calcite-icon class=${t({[c.icon]:!0,[c.iconStart]:!0})} .flipRtl=${e==="both"||e==="start"} .icon=${this.iconStart} .scale=${r(this.scale)}></calcite-icon>`):null,v=this.iconEnd?s("icon-end",a`<calcite-icon class=${t({[c.iconEnd]:!0,[c.icon]:!0})} .flipRtl=${e==="both"||e==="end"} .icon=${this.iconEnd} .scale=${r(this.scale)}></calcite-icon>`):null,{description:o}=this;return a`<div class=${t({[`icon-position--${this.iconPosition}`]:!0,[`icon-type--${this.iconType}`]:!0})}><div class=${t({[c.header]:!0,[x.rtl]:i==="rtl",[`header--${this.appearance}`]:!0})}>${this.renderActionsStart()}<div aria-controls=${l.section} .ariaExpanded=${this.expanded} class=${t(c.headerContent)} id=${l.sectionToggle} @click=${this.itemHeaderClickHandler} role=button tabindex=0 ${b(this.storeHeaderEl)}><div class=${t(c.headerContainer)}>${n}<div class=${t(c.headerText)}><span class=${t(c.heading)}>${this.heading}</span>${o?a`<span class=${t(c.description)}>${o}</span>`:null}</div>${v}</div><calcite-icon class=${t(c.expandIcon)} .icon=${this.iconType==="chevron"?"chevronDown":this.iconType==="caret"?"caretDown":this.expanded?"minus":"plus"} .scale=${r(this.scale)}></calcite-icon></div>${this.renderActionsEnd()}</div><section aria-labelledby=${l.sectionToggle} class=${t(c.content)} id=${l.section}><slot></slot></section></div>`}};f("calcite-accordion-item",p);export{p as AccordionItem};
|
|
3
|
+
v3.2.0-next.40 */
|
|
4
|
+
import{a as s}from"./PNGIMH3C.js";import{b}from"./6P5PSH65.js";import{e as $,k as h,u as m}from"./4JEZM6VX.js";import{a as r,d as k}from"./VOMFC6A5.js";import"./PB3OJ43M.js";import"./6DCGXB5R.js";import{D as x,K as f,e as g,g as a,w as d,x as u,y as t}from"./EYWRTO2E.js";var S={actionsStart:"actions-start",actionsEnd:"actions-end"},c={actionsEnd:"actions-end",actionsStart:"actions-start",content:"content",description:"description",expandIcon:"expand-icon",header:"header",headerContainer:"header-container",headerContent:"header-content",headerText:"header-text",heading:"heading",icon:"icon",iconEnd:"icon--end",iconStart:"icon--start"},l={section:"section",sectionToggle:"section-toggle"},y=g`.icon-position--end,.icon-position--start{--calcite-internal-accordion-item-icon-rotation: -90deg ;--calcite-internal-accordion-item-active-icon-rotation: 0deg;--calcite-internal-accordion-item-icon-rotation-rtl: 90deg;--calcite-internal-accordion-item-active-icon-rotation-rtl: 0deg}:host{position:relative;display:flex;flex-direction:column;text-decoration-line:none;color:var(--calcite-accordion-text-color, var(--calcite-accordion-item-text-color, var(--calcite-color-text-3)));background-color:var(--calcite-accordion-background-color, var(--calcite-accordion-item-background-color));border-width:0}:host .header{background-color:var(--calcite-accordion-item-header-background-color)}:host .header:hover{background-color:var(--calcite-internal-accordion-item-header-background-color-hover)}:host .header:active{background-color:var(--calcite-internal-accordion-item-header-background-color-press)}.header--solid{--calcite-internal-accordion-item-header-background-color-hover: var( --calcite-accordion-item-header-background-color-hover, var(--calcite-color-foreground-2) );--calcite-internal-accordion-item-header-background-color-press: var( --calcite-accordion-item-header-background-color-press, var(--calcite-color-foreground-3) )}.header--transparent{--calcite-internal-accordion-item-header-background-color-hover: var( --calcite-accordion-item-header-background-color-hover, var(--calcite-color-transparent-hover) );--calcite-internal-accordion-item-header-background-color-press: var( --calcite-accordion-item-header-background-color-press, var(--calcite-color-transparent-press) )}.icon-position--start{--calcite-internal-accordion-item-flex-direction: row-reverse;--calcite-internal-accordion-item-icon-spacing-start: 0;--calcite-internal-accordion-item-icon-spacing-end: var(--calcite-internal-accordion-icon-margin)}.icon-position--end{--calcite-internal-accordion-item-flex-direction: row;--calcite-internal-accordion-item-icon-spacing-start: var(--calcite-internal-accordion-icon-margin);--calcite-internal-accordion-item-icon-spacing-end: 0}.icon-position--end:not(.icon-type--plus-minus){--calcite-internal-accordion-item-icon-rotation: 0deg;--calcite-internal-accordion-item-active-icon-rotation: 180deg;--calcite-internal-accordion-item-icon-rotation-rtl: 0deg;--calcite-internal-accordion-item-active-icon-rotation-rtl: -180deg }.content,.header{border-block-end-width:var(--calcite-border-width-sm);border-block-end-style:solid;border-color:var(--calcite-accordion-border-color, var(--calcite-accordion-item-border-color, var(--calcite-color-border-2)))}.header-content{padding:var(--calcite-internal-accordion-item-padding, var(--calcite-internal-accordion-item-spacing-unit, .5rem .75rem))}.content{padding:var(--calcite-accordion-item-content-space, var(--calcite-internal-accordion-item-padding, var(--calcite-internal-accordion-item-spacing-unit, .5rem .75rem)))}.header{display:flex;align-items:stretch}.header-content,.header-container,.header .actions-start,.header .actions-end{display:flex;align-items:center;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);word-wrap:break-word;word-break:break-word}.header-content{flex-grow:1;cursor:pointer;outline-color:transparent;flex-direction:var(--calcite-internal-accordion-item-flex-direction);color:var(--calcite-accordion-item-heading-text-color, var(--calcite-accordion-text-color, inherit))}.header-content: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))))}.header-content:focus,.header-content:hover,.header-content:active{color:var(--calcite-accordion-item-heading-text-color, var(--calcite-accordion-text-color-hover))}.header-content:focus .heading,.header-content:hover .heading,.header-content:active .heading{color:var(--calcite-accordion-item-heading-text-color, var(--calcite-accordion-text-color-press))}.header-container{inline-size:100%}.header-text{margin-block:0px;flex-grow:1;flex-direction:column;padding-block:0px;text-align:initial;margin-inline-end:auto}.heading,.description{display:flex;inline-size:100%}.heading{font-weight:var(--calcite-font-weight-medium)}.actions-start ::slotted(calcite-action),.actions-end ::slotted(calcite-action){align-self:stretch}.icon{display:flex;align-items:center;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);margin-inline-end:var(--calcite-internal-accordion-item-icon-spacing-start);margin-inline-start:var(--calcite-internal-accordion-item-icon-spacing-end)}.icon--start{color:var(--calcite-accordion-item-icon-color-start, var(--calcite-accordion-item-start-icon-color, var(--calcite-accordion-item-icon-color, currentColor)));margin-inline-end:var(--calcite-internal-accordion-icon-margin)}.icon--end{color:var(--calcite-accordion-item-icon-color-end, var(--calcite-accordion-item-end-icon-color, var(--calcite-accordion-item-icon-color, currentColor)));margin-inline-end:var(--calcite-internal-accordion-icon-margin);margin-inline-start:var(--calcite-internal-accordion-icon-margin)}.expand-icon{color:var(--calcite-accordion-item-expand-icon-color, var(--calcite-accordion-text-color, var(--calcite-accordion-item-text-color, var(--calcite-color-text-3))));margin-inline-start:var(--calcite-internal-accordion-item-icon-spacing-start);margin-inline-end:var(--calcite-internal-accordion-item-icon-spacing-end);transform:rotate(var(--calcite-internal-accordion-item-icon-rotation))}.calcite--rtl .expand-icon{transform:rotate(var(--calcite-internal-accordion-item-icon-rotation-rtl))}.description{margin-block-start:.25rem}.content{display:none;text-align:initial}:host(:not([expanded])) .heading{color:var(--calcite-accordion-item-heading-text-color, var(--calcite-accordion-text-color-hover, var(--calcite-accordion-item-text-color-hover, var(--calcite-color-text-2))))}:host([expanded]){color:var(--calcite-accordion-text-color-press, var(--calcite-accordion-text-color, var(--calcite-accordion-item-text-color, var(--calcite-color-text-1))))}:host([expanded]) .header{border-block-end-color:transparent}:host([expanded]) .expand-icon{color:var(--calcite-accordion-item-expand-icon-color, var(--calcite-accordion-text-color-hover, var(--calcite-accordion-text-color, var(--calcite-accordion-item-text-color, var(--calcite-accordion-item-text-color-hover, var(--calcite-color-text-2))))));transform:rotate(var(--calcite-internal-accordion-item-active-icon-rotation))}:host([expanded]) .calcite--rtl .expand-icon{transform:rotate(var(--calcite-internal-accordion-item-active-icon-rotation-rtl))}:host([expanded]) .description{color:var(--calcite-accordion-text-color-hover, var(--calcite-accordion-text-color, var(--calcite-accordion-item-text-color, var(--calcite-accordion-item-text-color-hover, var(--calcite-color-text-2)))))}:host([expanded]) .content{display:block}@media (forced-colors: active){:host([expanded]) .header{border-block-end:none}:host([expanded]) .heading{font-weight:bolder}.header-content:hover .heading,.header-content:focus .heading{text-decoration:underline}}:host([hidden]){display:none}[hidden]{display:none}`,p=class extends u{constructor(){super(),this.hasActionsEnd=!1,this.hasActionsStart=!1,this.expanded=!1,this.calciteInternalAccordionItemClose=d({cancelable:!1}),this.calciteInternalAccordionItemSelect=d({cancelable:!1}),this.listen("keydown",this.keyDownHandler),this.listenOn(document.body,"calciteInternalAccordionChange",this.updateActiveItemOnChange),this.listenOn(document,"calciteInternalAccordionItemsSync",this.accordionItemSyncHandler)}static{this.properties={hasActionsEnd:[16,{state:!0}],hasActionsStart:[16,{state:!0}],accordionParent:[0,{attribute:!1}],description:1,expanded:[7,{reflect:!0,type:Boolean}],heading:1,iconEnd:[3,{reflect:!0}],iconFlipRtl:[3,{reflect:!0}],appearance:1,iconPosition:1,iconStart:[3,{reflect:!0}],iconType:1,scale:1}}static{this.styles=y}async setFocus(){await k(this),this.headerEl.focus()}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.emitRequestedItem(),e.preventDefault();break}}updateActiveItemOnChange(e){let[i]=e.composedPath(),n=h(this.el,"calcite-accordion");i===n&&(this.determineActiveItem(n.selectionMode,e.detail.requestedAccordionItem),e.stopPropagation())}accordionItemSyncHandler(e){let[i]=e.composedPath(),n=this.el;if(n.parentElement===i)return;let o=h(n,"calcite-accordion");i===o&&(this.appearance=o.appearance,this.iconPosition=o.iconPosition,this.iconType=o.iconType,this.scale=o.scale,e.stopPropagation())}handleActionsStartSlotChange(e){this.hasActionsStart=m(e)}handleActionsEndSlotChange(e){this.hasActionsEnd=m(e)}storeHeaderEl(e){this.headerEl=e}itemHeaderClickHandler(){this.emitRequestedItem()}determineActiveItem(e,i){switch(e){case"multiple":this.el===i&&(this.expanded=!this.expanded);break;case"single":this.expanded=this.el===i?!this.expanded:!1;break;case"single-persist":this.expanded=this.el===i;break}}emitRequestedItem(){this.calciteInternalAccordionItemSelect.emit({requestedAccordionItem:this.el})}renderActionsStart(){return a`<div class=${t(c.actionsStart)} .hidden=${!this.hasActionsStart}><slot name=${S.actionsStart} @slotchange=${this.handleActionsStartSlotChange}></slot></div>`}renderActionsEnd(){return a`<div class=${t(c.actionsEnd)} .hidden=${!this.hasActionsEnd}><slot name=${S.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot></div>`}render(){let{iconFlipRtl:e}=this,i=$(this.el),n=this.iconStart?s("icon-start",a`<calcite-icon class=${t({[c.icon]:!0,[c.iconStart]:!0})} .flipRtl=${e==="both"||e==="start"} .icon=${this.iconStart} .scale=${r(this.scale)}></calcite-icon>`):null,v=this.iconEnd?s("icon-end",a`<calcite-icon class=${t({[c.iconEnd]:!0,[c.icon]:!0})} .flipRtl=${e==="both"||e==="end"} .icon=${this.iconEnd} .scale=${r(this.scale)}></calcite-icon>`):null,{description:o}=this;return a`<div class=${t({[`icon-position--${this.iconPosition}`]:!0,[`icon-type--${this.iconType}`]:!0})}><div class=${t({[c.header]:!0,[x.rtl]:i==="rtl",[`header--${this.appearance}`]:!0})}>${this.renderActionsStart()}<div aria-controls=${l.section} .ariaExpanded=${this.expanded} class=${t(c.headerContent)} id=${l.sectionToggle} @click=${this.itemHeaderClickHandler} role=button tabindex=0 ${b(this.storeHeaderEl)}><div class=${t(c.headerContainer)}>${n}<div class=${t(c.headerText)}><span class=${t(c.heading)}>${this.heading}</span>${o?a`<span class=${t(c.description)}>${o}</span>`:null}</div>${v}</div><calcite-icon class=${t(c.expandIcon)} .icon=${this.iconType==="chevron"?"chevronDown":this.iconType==="caret"?"caretDown":this.expanded?"minus":"plus"} .scale=${r(this.scale)}></calcite-icon></div>${this.renderActionsEnd()}</div><section aria-labelledby=${l.sectionToggle} class=${t(c.content)} id=${l.section}><slot></slot></section></div>`}};f("calcite-accordion-item",p);export{p as AccordionItem};
|
|
@@ -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.2.0-next.
|
|
4
|
-
import{a as Dt}from"./RFI4KO6W.js";import{e as Lt}from"./LLN5DNPL.js";import{E as yt}from"./MZMZSY5A.js";var vt=["top","right","bottom","left"],Ft=["start","end"],bt=vt.reduce((t,e)=>t.concat(e,e+"-"+Ft[0],e+"-"+Ft[1]),[]),I=Math.min,H=Math.max,rt=Math.round,ct=Math.floor,D=t=>({x:t,y:t}),ve={left:"right",right:"left",bottom:"top",top:"bottom"},be={start:"end",end:"start"};function ut(t,e,n){return H(t,I(e,n))}function j(t,e){return typeof t=="function"?t(e):t}function B(t){return t.split("-")[0]}function F(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function dt(t){return t==="y"?"height":"width"}function X(t){return["top","bottom"].includes(B(t))?"y":"x"}function mt(t){return At(X(t))}function Ot(t,e,n){n===void 0&&(n=!1);let o=F(t),i=mt(t),r=dt(i),s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=st(s)),[s,st(s)]}function Mt(t){let e=st(t);return[it(t),e,it(e)]}function it(t){return t.replace(/start|end/g,e=>be[e])}function Ae(t,e,n){let o=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?r:s;default:return[]}}function kt(t,e,n,o){let i=F(t),r=Ae(B(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(it)))),r}function st(t){return t.replace(/left|right|bottom|top/g,e=>ve[e])}function Oe(t){return{top:0,right:0,bottom:0,left:0,...t}}function Rt(t){return typeof t!="number"?Oe(t):{top:t,right:t,bottom:t,left:t}}function q(t){let{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Nt(t,e,n){let{reference:o,floating:i}=t,r=X(e),s=mt(e),c=dt(s),l=B(e),a=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2,f;switch(l){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(F(e)){case"start":f[s]-=m*(n&&a?-1:1);break;case"end":f[s]+=m*(n&&a?-1:1);break}return f}var $t=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=r.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e)),a=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Nt(a,o,l),m=o,f={},g=0;for(let h=0;h<c.length;h++){let{name:p,fn:w}=c[h],{x,y,data:b,reset:v}=await w({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:f,rects:a,platform:s,elements:{reference:t,floating:e}});d=x??d,u=y??u,f={...f,[p]:{...f[p],...b}},v&&g<=50&&(g++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(a=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:d,y:u}=Nt(a,m,l)),h=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:f}};async function Z(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=j(e,t),g=Rt(f),p=c[m?u==="floating"?"reference":"floating":u],w=q(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(p)))==null||n?p:p.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:d,strategy:l})),x=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),b=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},v=q(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:l}):x);return{top:(w.top-v.top+g.top)/b.y,bottom:(v.bottom-w.bottom+g.bottom)/b.y,left:(w.left-v.left+g.left)/b.x,right:(v.right-w.right+g.right)/b.x}}var Ht=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:d=0}=j(t,e)||{};if(a==null)return{};let u=Rt(d),m={x:n,y:o},f=mt(i),g=dt(f),h=await s.getDimensions(a),p=f==="y",w=p?"top":"left",x=p?"bottom":"right",y=p?"clientHeight":"clientWidth",b=r.reference[g]+r.reference[f]-m[f]-r.floating[g],v=m[f]-r.reference[f],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a)),O=R?R[y]:0;(!O||!await(s.isElement==null?void 0:s.isElement(R)))&&(O=c.floating[y]||r.floating[g]);let z=b/2-v/2,S=O/2-h[g]/2-1,A=I(u[w],S),L=I(u[x],S),W=A,Y=O-h[g]-L,P=O/2-h[g]/2+z,Q=ut(W,P,Y),$=!l.arrow&&F(i)!=null&&P!==Q&&r.reference[g]/2-(P<W?A:L)-h[g]/2<0,N=$?P<W?P-W:P-Y:0;return{[f]:m[f]+N,data:{[f]:Q,centerOffset:P-Q-N,...$&&{alignmentOffset:N}},reset:$}}});function Re(t,e,n){return(t?[...n.filter(i=>F(i)===t),...n.filter(i=>F(i)!==t)]:n.filter(i=>B(i)===i)).filter(i=>t?F(i)===t||(e?it(i)!==i:!1):!0)}var Vt=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;let{rects:r,middlewareData:s,placement:c,platform:l,elements:a}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=bt,autoAlignment:f=!0,...g}=j(t,e),h=u!==void 0||m===bt?Re(u||null,f,m):m,p=await Z(e,g),w=((n=s.autoPlacement)==null?void 0:n.index)||0,x=h[w];if(x==null)return{};let y=Ot(x,r,await(l.isRTL==null?void 0:l.isRTL(a.floating)));if(c!==x)return{reset:{placement:h[0]}};let b=[p[B(x)],p[y[0]],p[y[1]]],v=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:x,overflows:b}],R=h[w+1];if(R)return{data:{index:w+1,overflows:v},reset:{placement:R}};let O=v.map(A=>{let L=F(A.placement);return[A.placement,L&&d?A.overflows.slice(0,2).reduce((W,Y)=>W+Y,0):A.overflows[0],A.overflows]}).sort((A,L)=>A[1]-L[1]),S=((i=O.filter(A=>A[2].slice(0,F(A[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||O[0][0];return S!==c?{data:{index:w+1,overflows:v},reset:{placement:S}}:{}}}},zt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...p}=j(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};let w=B(i),x=X(c),y=B(c)===c,b=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=m||(y||!h?[st(c)]:Mt(c)),R=g!=="none";!m&&R&&v.push(...kt(c,h,g,b));let O=[c,...v],z=await Z(e,p),S=[],A=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&S.push(z[w]),u){let P=Ot(i,s,b);S.push(z[P[0]],z[P[1]])}if(A=[...A,{placement:i,overflows:S}],!S.every(P=>P<=0)){var L,W;let P=(((L=r.flip)==null?void 0:L.index)||0)+1,Q=O[P];if(Q)return{data:{index:P,overflows:A},reset:{placement:Q}};let $=(W=A.filter(N=>N.overflows[0]<=0).sort((N,_)=>N.overflows[1]-_.overflows[1])[0])==null?void 0:W.placement;if(!$)switch(f){case"bestFit":{var Y;let N=(Y=A.filter(_=>{if(R){let U=X(_.placement);return U===x||U==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(U=>U>0).reduce((U,ye)=>U+ye,0)]).sort((_,U)=>_[1]-U[1])[0])==null?void 0:Y[0];N&&($=N);break}case"initialPlacement":$=c;break}if(i!==$)return{reset:{placement:$}}}return{}}}};function Bt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Wt(t){return vt.some(e=>t[e]>=0)}var _t=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n}=e,{strategy:o="referenceHidden",...i}=j(t,e);switch(o){case"referenceHidden":{let r=await Z(e,{...i,elementContext:"reference"}),s=Bt(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Wt(s)}}}case"escaped":{let r=await Z(e,{...i,altBoundary:!0}),s=Bt(r,n.floating);return{data:{escapedOffsets:s,escaped:Wt(s)}}}default:return{}}}}};async function Pe(t,e){let{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=B(n),c=F(n),l=X(n)==="y",a=["left","top"].includes(s)?-1:1,d=r&&l?-1:1,u=j(e,t),{mainAxis:m,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(f=c==="end"?g*-1:g),l?{x:f*d,y:m*a}:{x:m*a,y:f*d}}var Ut=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:r,placement:s,middlewareData:c}=e,l=await Pe(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},It=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:p=>{let{x:w,y:x}=p;return{x:w,y:x}}},...l}=j(t,e),a={x:n,y:o},d=await Z(e,l),u=X(B(i)),m=At(u),f=a[m],g=a[u];if(r){let p=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=f+d[p],y=f-d[w];f=ut(x,f,y)}if(s){let p=u==="y"?"top":"left",w=u==="y"?"bottom":"right",x=g+d[p],y=g-d[w];g=ut(x,g,y)}let h=c.fn({...e,[m]:f,[u]:g});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[m]:r,[u]:s}}}}}};function gt(){return typeof window<"u"}function K(t){return Yt(t)?(t.nodeName||"").toLowerCase():"#document"}function C(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function M(t){var e;return(e=(Yt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Yt(t){return gt()?t instanceof Node||t instanceof C(t).Node:!1}function E(t){return gt()?t instanceof Element||t instanceof C(t).Element:!1}function k(t){return gt()?t instanceof HTMLElement||t instanceof C(t).HTMLElement:!1}function jt(t){return!gt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof C(t).ShadowRoot}function et(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=T(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function Xt(t){return["table","td","th"].includes(K(t))}function lt(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function nt(t){let e=ht(),n=E(t)?T(t):t;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function qt(t){let e=V(t);for(;k(e)&&!G(e);){if(nt(e))return e;if(lt(e))return null;e=V(e)}return null}function ht(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function G(t){return["html","body","#document"].includes(K(t))}function T(t){return C(t).getComputedStyle(t)}function at(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function V(t){if(K(t)==="html")return t;let e=t.assignedSlot||t.parentNode||jt(t)&&t.host||M(t);return jt(e)?e.host:e}function Kt(t){let e=V(t);return G(e)?t.ownerDocument?t.ownerDocument.body:t.body:k(e)&&et(e)?e:Kt(e)}function tt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Kt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=C(i);if(r){let c=pt(s);return e.concat(s,s.visualViewport||[],et(i)?i:[],c&&n?tt(c):[])}return e.concat(i,tt(i,[],n))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Qt(t){let e=T(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=k(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=rt(n)!==r||rt(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function Ct(t){return E(t)?t:t.contextElement}function ot(t){let e=Ct(t);if(!k(e))return D(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Qt(e),s=(r?rt(n.width):n.width)/o,c=(r?rt(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var Ce=D(0);function Zt(t){let e=C(t);return!ht()||!e.visualViewport?Ce:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Se(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==C(t)?!1:e}function J(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),r=Ct(t),s=D(1);e&&(o?E(o)&&(s=ot(o)):s=ot(t));let c=Se(r,n,o)?Zt(r):D(0),l=(i.left+c.x)/s.x,a=(i.top+c.y)/s.y,d=i.width/s.x,u=i.height/s.y;if(r){let m=C(r),f=o&&E(o)?C(o):o,g=m,h=pt(g);for(;h&&o&&f!==g;){let p=ot(h),w=h.getBoundingClientRect(),x=T(h),y=w.left+(h.clientLeft+parseFloat(x.paddingLeft))*p.x,b=w.top+(h.clientTop+parseFloat(x.paddingTop))*p.y;l*=p.x,a*=p.y,d*=p.x,u*=p.y,l+=y,a+=b,g=C(h),h=pt(g)}}return q({width:d,height:u,x:l,y:a})}function St(t,e){let n=at(t).scrollLeft;return e?e.left+n:J(M(t)).left+n}function te(t,e,n){n===void 0&&(n=!1);let o=t.getBoundingClientRect(),i=o.left+e.scrollLeft-(n?0:St(t,o)),r=o.top+e.scrollTop;return{x:i,y:r}}function Ee(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,r=i==="fixed",s=M(o),c=e?lt(e.floating):!1;if(o===s||c&&r)return n;let l={scrollLeft:0,scrollTop:0},a=D(1),d=D(0),u=k(o);if((u||!u&&!r)&&((K(o)!=="body"||et(s))&&(l=at(o)),k(o))){let f=J(o);a=ot(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}let m=s&&!u&&!r?te(s,l,!0):D(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+d.x+m.x,y:n.y*a.y-l.scrollTop*a.y+d.y+m.y}}function Te(t){return Array.from(t.getClientRects())}function Le(t){let e=M(t),n=at(t),o=t.ownerDocument.body,i=H(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=H(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-n.scrollLeft+St(t),c=-n.scrollTop;return T(o).direction==="rtl"&&(s+=H(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}function De(t,e){let n=C(t),o=M(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,c=0,l=0;if(i){r=i.width,s=i.height;let a=ht();(!a||a&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}return{width:r,height:s,x:c,y:l}}function Fe(t,e){let n=J(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=k(t)?ot(t):D(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=i*r.x,a=o*r.y;return{width:s,height:c,x:l,y:a}}function Gt(t,e,n){let o;if(e==="viewport")o=De(t,n);else if(e==="document")o=Le(M(t));else if(E(e))o=Fe(e,n);else{let i=Zt(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return q(o)}function ee(t,e){let n=V(t);return n===e||!E(n)||G(n)?!1:T(n).position==="fixed"||ee(n,e)}function Me(t,e){let n=e.get(t);if(n)return n;let o=tt(t,[],!1).filter(c=>E(c)&&K(c)!=="body"),i=null,r=T(t).position==="fixed",s=r?V(t):t;for(;E(s)&&!G(s);){let c=T(s),l=nt(s);!l&&c.position==="fixed"&&(i=null),(r?!l&&!i:!l&&c.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||et(s)&&!l&&ee(t,s))?o=o.filter(d=>d!==s):i=c,s=V(s)}return e.set(t,o),o}function ke(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,s=[...n==="clippingAncestors"?lt(e)?[]:Me(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,d)=>{let u=Gt(e,d,i);return a.top=H(u.top,a.top),a.right=I(u.right,a.right),a.bottom=I(u.bottom,a.bottom),a.left=H(u.left,a.left),a},Gt(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ne(t){let{width:e,height:n}=Qt(t);return{width:e,height:n}}function Be(t,e,n){let o=k(e),i=M(e),r=n==="fixed",s=J(t,!0,r,e),c={scrollLeft:0,scrollTop:0},l=D(0);if(o||!o&&!r)if((K(e)!=="body"||et(i))&&(c=at(e)),o){let m=J(e,!0,r,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}else i&&(l.x=St(i));let a=i&&!o&&!r?te(i,c):D(0),d=s.left+c.scrollLeft-l.x-a.x,u=s.top+c.scrollTop-l.y-a.y;return{x:d,y:u,width:s.width,height:s.height}}function Pt(t){return T(t).position==="static"}function Jt(t,e){if(!k(t)||T(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return M(t)===n&&(n=n.ownerDocument.body),n}function ne(t,e){let n=C(t);if(lt(t))return n;if(!k(t)){let i=V(t);for(;i&&!G(i);){if(E(i)&&!Pt(i))return i;i=V(i)}return n}let o=Jt(t,e);for(;o&&Xt(o)&&Pt(o);)o=Jt(o,e);return o&&G(o)&&Pt(o)&&!nt(o)?n:o||qt(t)||n}var We=async function(t){let e=this.getOffsetParent||ne,n=this.getDimensions,o=await n(t.floating);return{reference:Be(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function $e(t){return T(t).direction==="rtl"}var wt={convertOffsetParentRelativeRectToViewportRelativeRect:Ee,getDocumentElement:M,getClippingRect:ke,getOffsetParent:ne,getElementRects:We,getClientRects:Te,getDimensions:Ne,getScale:ot,isElement:E,isRTL:$e};function oe(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function He(t,e){let n=null,o,i=M(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();let a=t.getBoundingClientRect(),{left:d,top:u,width:m,height:f}=a;if(c||e(),!m||!f)return;let g=ct(u),h=ct(i.clientWidth-(d+m)),p=ct(i.clientHeight-(u+f)),w=ct(d),y={rootMargin:-g+"px "+-h+"px "+-p+"px "+-w+"px",threshold:H(0,I(1,l))||1},b=!0;function v(R){let O=R[0].intersectionRatio;if(O!==l){if(!b)return s();O?s(!1,O):o=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!oe(a,t.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(v,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(v,y)}n.observe(t)}return s(!0),r}function ie(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Ct(t),d=i||r?[...a?tt(a):[],...tt(e)]:[];d.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});let u=a&&c?He(a,n):null,m=-1,f=null;s&&(f=new ResizeObserver(w=>{let[x]=w;x&&x.target===a&&f&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),a&&!l&&f.observe(a),f.observe(e));let g,h=l?J(t):null;l&&p();function p(){let w=J(t);h&&!oe(h,w)&&n(),h=w,g=requestAnimationFrame(p)}return n(),()=>{var w;d.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(g)}}var se=Ut,re=Vt,ce=It,Et=zt;var le=_t,ae=Ht;var fe=(t,e,n)=>{let o=new Map,i={platform:wt,...n},r={...i.platform,_c:o};return $t(t,e,{...i,platform:r})};function ue(t){return Ve(t)}function Tt(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Ve(t){for(let e=t;e;e=Tt(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Tt(t);e;e=Tt(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||nt(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=wt.getOffsetParent;wt.getOffsetParent=n=>e(n,ue)}})();function de(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var we=async(t,{referenceEl:e,floatingEl:n,overlayPositioning:o="absolute",placement:i,flipDisabled:r,flipPlacements:s,offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})=>{if(!e||!n)return;let u=Lt(n)==="rtl",{x:m,y:f,placement:g,strategy:h,middlewareData:p}=await fe(e,n,{strategy:o,placement:i==="auto"||i==="auto-start"||i==="auto-end"?void 0:ge(i,u),middleware:_e({placement:i,flipDisabled:r,flipPlacements:s?.map(b=>ge(b,u)),offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})});if(a&&p.arrow){let{x:b,y:v}=p.arrow,R=g.split("-")[0],O=b!=null?"left":"top",z=Ie[R],S={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(a.style,{...S,[O]:`${O=="left"?b:v}px`,[R]:"100%",transform:z})}let x=p.hide?.referenceHidden?"hidden":null,y=x?"none":null;n.setAttribute(ze,g),Object.assign(n.style,{pointerEvents:y,position:h,transform:`translate(${de(m)}px,${de(f)}px)`,visibility:x})},ze="data-placement",me=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end","leading","trailing","leading-start","leading-end","trailing-start","trailing-end"],gn="bottom-start",hn="bottom-end",pn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function _e({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:r,type:s}){let c=[ce(),le()];return s==="menu"&&c.push(Et({fallbackPlacements:n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})),c.push(se({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),t==="auto"||t==="auto-start"||t==="auto-end"?c.push(re({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null})):e||c.push(Et(n?{fallbackPlacements:n}:{})),r&&c.push(ae({element:r})),c}function wn(t,e){let n=t.filter(o=>me.includes(o));return n.length!==t.length&&console.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${me.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function ge(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function xn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",position:e.overlayPositioning??"absolute"}),!ft.get(t))return xe(t);await(n?Ue(t):we)(t,e)}function Ue(t){let e=xt.get(t);return e||(e=Dt(we,yt.reposition,{leading:!0,maxWait:yt.reposition}),xt.set(t,e),e)}var Ie={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,xt=new WeakMap;async function xe(t){let{referenceEl:e,floatingEl:n}=t;if(!n.isConnected)return;let o=ie;ft.set(t,{state:"pending"});let i,r=o(e,n,()=>{let s=t.reposition();i||(i=s)});return ft.set(t,{state:"active",cleanUp:r}),i}function je(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",pointerEvents:"",position:"",transform:"",visibility:""})}async function yn(t){let{floatingEl:e,referenceEl:n}=t;if(je(t),!(!e||!n)&&(Ye(t),!!t.open))return xe(t)}function Ye(t){let{floatingEl:e,referenceEl:n}=t;if(!e||!n)return;let o=ft.get(t);o?.state==="active"&&o.cleanUp(),ft.delete(t),xt.get(t)?.cancel(),xt.delete(t)}var he=4,vn=Math.ceil(Math.hypot(he,he));export{gn as a,hn as b,pn as c,wn as d,xn as e,je as f,yn as g,Ye as h,vn as i};
|
|
3
|
+
v3.2.0-next.40 */
|
|
4
|
+
import{a as Dt}from"./HPNQQK6A.js";import{e as Lt}from"./4JEZM6VX.js";import{E as yt}from"./EYWRTO2E.js";var vt=["top","right","bottom","left"],Ft=["start","end"],bt=vt.reduce((t,e)=>t.concat(e,e+"-"+Ft[0],e+"-"+Ft[1]),[]),I=Math.min,H=Math.max,rt=Math.round,ct=Math.floor,D=t=>({x:t,y:t}),ve={left:"right",right:"left",bottom:"top",top:"bottom"},be={start:"end",end:"start"};function ut(t,e,n){return H(t,I(e,n))}function j(t,e){return typeof t=="function"?t(e):t}function B(t){return t.split("-")[0]}function F(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function dt(t){return t==="y"?"height":"width"}function X(t){return["top","bottom"].includes(B(t))?"y":"x"}function mt(t){return At(X(t))}function Ot(t,e,n){n===void 0&&(n=!1);let o=F(t),i=mt(t),r=dt(i),s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=st(s)),[s,st(s)]}function Mt(t){let e=st(t);return[it(t),e,it(e)]}function it(t){return t.replace(/start|end/g,e=>be[e])}function Ae(t,e,n){let o=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?r:s;default:return[]}}function kt(t,e,n,o){let i=F(t),r=Ae(B(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(it)))),r}function st(t){return t.replace(/left|right|bottom|top/g,e=>ve[e])}function Oe(t){return{top:0,right:0,bottom:0,left:0,...t}}function Rt(t){return typeof t!="number"?Oe(t):{top:t,right:t,bottom:t,left:t}}function q(t){let{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Nt(t,e,n){let{reference:o,floating:i}=t,r=X(e),s=mt(e),c=dt(s),l=B(e),a=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2,f;switch(l){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(F(e)){case"start":f[s]-=m*(n&&a?-1:1);break;case"end":f[s]+=m*(n&&a?-1:1);break}return f}var $t=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=r.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e)),a=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Nt(a,o,l),m=o,f={},g=0;for(let h=0;h<c.length;h++){let{name:p,fn:w}=c[h],{x,y,data:b,reset:v}=await w({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:f,rects:a,platform:s,elements:{reference:t,floating:e}});d=x??d,u=y??u,f={...f,[p]:{...f[p],...b}},v&&g<=50&&(g++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(a=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:d,y:u}=Nt(a,m,l)),h=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:f}};async function Z(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=j(e,t),g=Rt(f),p=c[m?u==="floating"?"reference":"floating":u],w=q(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(p)))==null||n?p:p.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:d,strategy:l})),x=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),b=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},v=q(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:l}):x);return{top:(w.top-v.top+g.top)/b.y,bottom:(v.bottom-w.bottom+g.bottom)/b.y,left:(w.left-v.left+g.left)/b.x,right:(v.right-w.right+g.right)/b.x}}var Ht=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:d=0}=j(t,e)||{};if(a==null)return{};let u=Rt(d),m={x:n,y:o},f=mt(i),g=dt(f),h=await s.getDimensions(a),p=f==="y",w=p?"top":"left",x=p?"bottom":"right",y=p?"clientHeight":"clientWidth",b=r.reference[g]+r.reference[f]-m[f]-r.floating[g],v=m[f]-r.reference[f],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a)),O=R?R[y]:0;(!O||!await(s.isElement==null?void 0:s.isElement(R)))&&(O=c.floating[y]||r.floating[g]);let z=b/2-v/2,S=O/2-h[g]/2-1,A=I(u[w],S),L=I(u[x],S),W=A,Y=O-h[g]-L,P=O/2-h[g]/2+z,Q=ut(W,P,Y),$=!l.arrow&&F(i)!=null&&P!==Q&&r.reference[g]/2-(P<W?A:L)-h[g]/2<0,N=$?P<W?P-W:P-Y:0;return{[f]:m[f]+N,data:{[f]:Q,centerOffset:P-Q-N,...$&&{alignmentOffset:N}},reset:$}}});function Re(t,e,n){return(t?[...n.filter(i=>F(i)===t),...n.filter(i=>F(i)!==t)]:n.filter(i=>B(i)===i)).filter(i=>t?F(i)===t||(e?it(i)!==i:!1):!0)}var Vt=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;let{rects:r,middlewareData:s,placement:c,platform:l,elements:a}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=bt,autoAlignment:f=!0,...g}=j(t,e),h=u!==void 0||m===bt?Re(u||null,f,m):m,p=await Z(e,g),w=((n=s.autoPlacement)==null?void 0:n.index)||0,x=h[w];if(x==null)return{};let y=Ot(x,r,await(l.isRTL==null?void 0:l.isRTL(a.floating)));if(c!==x)return{reset:{placement:h[0]}};let b=[p[B(x)],p[y[0]],p[y[1]]],v=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:x,overflows:b}],R=h[w+1];if(R)return{data:{index:w+1,overflows:v},reset:{placement:R}};let O=v.map(A=>{let L=F(A.placement);return[A.placement,L&&d?A.overflows.slice(0,2).reduce((W,Y)=>W+Y,0):A.overflows[0],A.overflows]}).sort((A,L)=>A[1]-L[1]),S=((i=O.filter(A=>A[2].slice(0,F(A[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||O[0][0];return S!==c?{data:{index:w+1,overflows:v},reset:{placement:S}}:{}}}},zt=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...p}=j(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};let w=B(i),x=X(c),y=B(c)===c,b=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=m||(y||!h?[st(c)]:Mt(c)),R=g!=="none";!m&&R&&v.push(...kt(c,h,g,b));let O=[c,...v],z=await Z(e,p),S=[],A=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&S.push(z[w]),u){let P=Ot(i,s,b);S.push(z[P[0]],z[P[1]])}if(A=[...A,{placement:i,overflows:S}],!S.every(P=>P<=0)){var L,W;let P=(((L=r.flip)==null?void 0:L.index)||0)+1,Q=O[P];if(Q)return{data:{index:P,overflows:A},reset:{placement:Q}};let $=(W=A.filter(N=>N.overflows[0]<=0).sort((N,_)=>N.overflows[1]-_.overflows[1])[0])==null?void 0:W.placement;if(!$)switch(f){case"bestFit":{var Y;let N=(Y=A.filter(_=>{if(R){let U=X(_.placement);return U===x||U==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(U=>U>0).reduce((U,ye)=>U+ye,0)]).sort((_,U)=>_[1]-U[1])[0])==null?void 0:Y[0];N&&($=N);break}case"initialPlacement":$=c;break}if(i!==$)return{reset:{placement:$}}}return{}}}};function Bt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Wt(t){return vt.some(e=>t[e]>=0)}var _t=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n}=e,{strategy:o="referenceHidden",...i}=j(t,e);switch(o){case"referenceHidden":{let r=await Z(e,{...i,elementContext:"reference"}),s=Bt(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Wt(s)}}}case"escaped":{let r=await Z(e,{...i,altBoundary:!0}),s=Bt(r,n.floating);return{data:{escapedOffsets:s,escaped:Wt(s)}}}default:return{}}}}};async function Pe(t,e){let{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=B(n),c=F(n),l=X(n)==="y",a=["left","top"].includes(s)?-1:1,d=r&&l?-1:1,u=j(e,t),{mainAxis:m,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(f=c==="end"?g*-1:g),l?{x:f*d,y:m*a}:{x:m*a,y:f*d}}var Ut=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:r,placement:s,middlewareData:c}=e,l=await Pe(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},It=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:p=>{let{x:w,y:x}=p;return{x:w,y:x}}},...l}=j(t,e),a={x:n,y:o},d=await Z(e,l),u=X(B(i)),m=At(u),f=a[m],g=a[u];if(r){let p=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=f+d[p],y=f-d[w];f=ut(x,f,y)}if(s){let p=u==="y"?"top":"left",w=u==="y"?"bottom":"right",x=g+d[p],y=g-d[w];g=ut(x,g,y)}let h=c.fn({...e,[m]:f,[u]:g});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[m]:r,[u]:s}}}}}};function gt(){return typeof window<"u"}function K(t){return Yt(t)?(t.nodeName||"").toLowerCase():"#document"}function C(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function M(t){var e;return(e=(Yt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Yt(t){return gt()?t instanceof Node||t instanceof C(t).Node:!1}function E(t){return gt()?t instanceof Element||t instanceof C(t).Element:!1}function k(t){return gt()?t instanceof HTMLElement||t instanceof C(t).HTMLElement:!1}function jt(t){return!gt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof C(t).ShadowRoot}function et(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=T(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function Xt(t){return["table","td","th"].includes(K(t))}function lt(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function nt(t){let e=ht(),n=E(t)?T(t):t;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function qt(t){let e=V(t);for(;k(e)&&!G(e);){if(nt(e))return e;if(lt(e))return null;e=V(e)}return null}function ht(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function G(t){return["html","body","#document"].includes(K(t))}function T(t){return C(t).getComputedStyle(t)}function at(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function V(t){if(K(t)==="html")return t;let e=t.assignedSlot||t.parentNode||jt(t)&&t.host||M(t);return jt(e)?e.host:e}function Kt(t){let e=V(t);return G(e)?t.ownerDocument?t.ownerDocument.body:t.body:k(e)&&et(e)?e:Kt(e)}function tt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Kt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=C(i);if(r){let c=pt(s);return e.concat(s,s.visualViewport||[],et(i)?i:[],c&&n?tt(c):[])}return e.concat(i,tt(i,[],n))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Qt(t){let e=T(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=k(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=rt(n)!==r||rt(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function Ct(t){return E(t)?t:t.contextElement}function ot(t){let e=Ct(t);if(!k(e))return D(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Qt(e),s=(r?rt(n.width):n.width)/o,c=(r?rt(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var Ce=D(0);function Zt(t){let e=C(t);return!ht()||!e.visualViewport?Ce:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Se(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==C(t)?!1:e}function J(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),r=Ct(t),s=D(1);e&&(o?E(o)&&(s=ot(o)):s=ot(t));let c=Se(r,n,o)?Zt(r):D(0),l=(i.left+c.x)/s.x,a=(i.top+c.y)/s.y,d=i.width/s.x,u=i.height/s.y;if(r){let m=C(r),f=o&&E(o)?C(o):o,g=m,h=pt(g);for(;h&&o&&f!==g;){let p=ot(h),w=h.getBoundingClientRect(),x=T(h),y=w.left+(h.clientLeft+parseFloat(x.paddingLeft))*p.x,b=w.top+(h.clientTop+parseFloat(x.paddingTop))*p.y;l*=p.x,a*=p.y,d*=p.x,u*=p.y,l+=y,a+=b,g=C(h),h=pt(g)}}return q({width:d,height:u,x:l,y:a})}function St(t,e){let n=at(t).scrollLeft;return e?e.left+n:J(M(t)).left+n}function te(t,e,n){n===void 0&&(n=!1);let o=t.getBoundingClientRect(),i=o.left+e.scrollLeft-(n?0:St(t,o)),r=o.top+e.scrollTop;return{x:i,y:r}}function Ee(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,r=i==="fixed",s=M(o),c=e?lt(e.floating):!1;if(o===s||c&&r)return n;let l={scrollLeft:0,scrollTop:0},a=D(1),d=D(0),u=k(o);if((u||!u&&!r)&&((K(o)!=="body"||et(s))&&(l=at(o)),k(o))){let f=J(o);a=ot(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}let m=s&&!u&&!r?te(s,l,!0):D(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+d.x+m.x,y:n.y*a.y-l.scrollTop*a.y+d.y+m.y}}function Te(t){return Array.from(t.getClientRects())}function Le(t){let e=M(t),n=at(t),o=t.ownerDocument.body,i=H(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=H(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-n.scrollLeft+St(t),c=-n.scrollTop;return T(o).direction==="rtl"&&(s+=H(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}function De(t,e){let n=C(t),o=M(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,c=0,l=0;if(i){r=i.width,s=i.height;let a=ht();(!a||a&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}return{width:r,height:s,x:c,y:l}}function Fe(t,e){let n=J(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=k(t)?ot(t):D(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=i*r.x,a=o*r.y;return{width:s,height:c,x:l,y:a}}function Gt(t,e,n){let o;if(e==="viewport")o=De(t,n);else if(e==="document")o=Le(M(t));else if(E(e))o=Fe(e,n);else{let i=Zt(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return q(o)}function ee(t,e){let n=V(t);return n===e||!E(n)||G(n)?!1:T(n).position==="fixed"||ee(n,e)}function Me(t,e){let n=e.get(t);if(n)return n;let o=tt(t,[],!1).filter(c=>E(c)&&K(c)!=="body"),i=null,r=T(t).position==="fixed",s=r?V(t):t;for(;E(s)&&!G(s);){let c=T(s),l=nt(s);!l&&c.position==="fixed"&&(i=null),(r?!l&&!i:!l&&c.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||et(s)&&!l&&ee(t,s))?o=o.filter(d=>d!==s):i=c,s=V(s)}return e.set(t,o),o}function ke(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,s=[...n==="clippingAncestors"?lt(e)?[]:Me(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,d)=>{let u=Gt(e,d,i);return a.top=H(u.top,a.top),a.right=I(u.right,a.right),a.bottom=I(u.bottom,a.bottom),a.left=H(u.left,a.left),a},Gt(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ne(t){let{width:e,height:n}=Qt(t);return{width:e,height:n}}function Be(t,e,n){let o=k(e),i=M(e),r=n==="fixed",s=J(t,!0,r,e),c={scrollLeft:0,scrollTop:0},l=D(0);if(o||!o&&!r)if((K(e)!=="body"||et(i))&&(c=at(e)),o){let m=J(e,!0,r,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}else i&&(l.x=St(i));let a=i&&!o&&!r?te(i,c):D(0),d=s.left+c.scrollLeft-l.x-a.x,u=s.top+c.scrollTop-l.y-a.y;return{x:d,y:u,width:s.width,height:s.height}}function Pt(t){return T(t).position==="static"}function Jt(t,e){if(!k(t)||T(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return M(t)===n&&(n=n.ownerDocument.body),n}function ne(t,e){let n=C(t);if(lt(t))return n;if(!k(t)){let i=V(t);for(;i&&!G(i);){if(E(i)&&!Pt(i))return i;i=V(i)}return n}let o=Jt(t,e);for(;o&&Xt(o)&&Pt(o);)o=Jt(o,e);return o&&G(o)&&Pt(o)&&!nt(o)?n:o||qt(t)||n}var We=async function(t){let e=this.getOffsetParent||ne,n=this.getDimensions,o=await n(t.floating);return{reference:Be(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function $e(t){return T(t).direction==="rtl"}var wt={convertOffsetParentRelativeRectToViewportRelativeRect:Ee,getDocumentElement:M,getClippingRect:ke,getOffsetParent:ne,getElementRects:We,getClientRects:Te,getDimensions:Ne,getScale:ot,isElement:E,isRTL:$e};function oe(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function He(t,e){let n=null,o,i=M(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();let a=t.getBoundingClientRect(),{left:d,top:u,width:m,height:f}=a;if(c||e(),!m||!f)return;let g=ct(u),h=ct(i.clientWidth-(d+m)),p=ct(i.clientHeight-(u+f)),w=ct(d),y={rootMargin:-g+"px "+-h+"px "+-p+"px "+-w+"px",threshold:H(0,I(1,l))||1},b=!0;function v(R){let O=R[0].intersectionRatio;if(O!==l){if(!b)return s();O?s(!1,O):o=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!oe(a,t.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(v,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(v,y)}n.observe(t)}return s(!0),r}function ie(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Ct(t),d=i||r?[...a?tt(a):[],...tt(e)]:[];d.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});let u=a&&c?He(a,n):null,m=-1,f=null;s&&(f=new ResizeObserver(w=>{let[x]=w;x&&x.target===a&&f&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),a&&!l&&f.observe(a),f.observe(e));let g,h=l?J(t):null;l&&p();function p(){let w=J(t);h&&!oe(h,w)&&n(),h=w,g=requestAnimationFrame(p)}return n(),()=>{var w;d.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(g)}}var se=Ut,re=Vt,ce=It,Et=zt;var le=_t,ae=Ht;var fe=(t,e,n)=>{let o=new Map,i={platform:wt,...n},r={...i.platform,_c:o};return $t(t,e,{...i,platform:r})};function ue(t){return Ve(t)}function Tt(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Ve(t){for(let e=t;e;e=Tt(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Tt(t);e;e=Tt(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||nt(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=wt.getOffsetParent;wt.getOffsetParent=n=>e(n,ue)}})();function de(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var we=async(t,{referenceEl:e,floatingEl:n,overlayPositioning:o="absolute",placement:i,flipDisabled:r,flipPlacements:s,offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})=>{if(!e||!n)return;let u=Lt(n)==="rtl",{x:m,y:f,placement:g,strategy:h,middlewareData:p}=await fe(e,n,{strategy:o,placement:i==="auto"||i==="auto-start"||i==="auto-end"?void 0:ge(i,u),middleware:_e({placement:i,flipDisabled:r,flipPlacements:s?.map(b=>ge(b,u)),offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})});if(a&&p.arrow){let{x:b,y:v}=p.arrow,R=g.split("-")[0],O=b!=null?"left":"top",z=Ie[R],S={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(a.style,{...S,[O]:`${O=="left"?b:v}px`,[R]:"100%",transform:z})}let x=p.hide?.referenceHidden?"hidden":null,y=x?"none":null;n.setAttribute(ze,g),Object.assign(n.style,{pointerEvents:y,position:h,transform:`translate(${de(m)}px,${de(f)}px)`,visibility:x})},ze="data-placement",me=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end","leading","trailing","leading-start","leading-end","trailing-start","trailing-end"],gn="bottom-start",hn="bottom-end",pn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function _e({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:r,type:s}){let c=[ce(),le()];return s==="menu"&&c.push(Et({fallbackPlacements:n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})),c.push(se({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),t==="auto"||t==="auto-start"||t==="auto-end"?c.push(re({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null})):e||c.push(Et(n?{fallbackPlacements:n}:{})),r&&c.push(ae({element:r})),c}function wn(t,e){let n=t.filter(o=>me.includes(o));return n.length!==t.length&&console.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${me.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function ge(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function xn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",position:e.overlayPositioning??"absolute"}),!ft.get(t))return xe(t);await(n?Ue(t):we)(t,e)}function Ue(t){let e=xt.get(t);return e||(e=Dt(we,yt.reposition,{leading:!0,maxWait:yt.reposition}),xt.set(t,e),e)}var Ie={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,xt=new WeakMap;async function xe(t){let{referenceEl:e,floatingEl:n}=t;if(!n.isConnected)return;let o=ie;ft.set(t,{state:"pending"});let i,r=o(e,n,()=>{let s=t.reposition();i||(i=s)});return ft.set(t,{state:"active",cleanUp:r}),i}function je(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",pointerEvents:"",position:"",transform:"",visibility:""})}async function yn(t){let{floatingEl:e,referenceEl:n}=t;if(je(t),!(!e||!n)&&(Ye(t),!!t.open))return xe(t)}function Ye(t){let{floatingEl:e,referenceEl:n}=t;if(!e||!n)return;let o=ft.get(t);o?.state==="active"&&o.cleanUp(),ft.delete(t),xt.get(t)?.cancel(),xt.delete(t)}var he=4,vn=Math.ceil(Math.hypot(he,he));export{gn as a,hn as b,pn as c,wn as d,xn as e,je as f,yn as g,Ye as h,vn as i};
|
|
@@ -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.2.0-next.
|
|
4
|
-
import{e as b,f}from"./
|
|
3
|
+
v3.2.0-next.40 */
|
|
4
|
+
import{e as b,f}from"./DJIDW3PH.js";import{a as u}from"./VYNVOZVL.js";import"./LWBS4ZDT.js";import{a as m}from"./7EKOSZOZ.js";import"./6P5PSH65.js";import"./XJUNWEHJ.js";import{n as h,v as x}from"./4JEZM6VX.js";import{d as g}from"./VOMFC6A5.js";import"./PB3OJ43M.js";import"./6DCGXB5R.js";import{K as p,e as r,g as a,w as c,x as d,y as i}from"./EYWRTO2E.js";var y={actionGroupEnd:"action-group--end",container:"container"},C={expandTooltip:"expand-tooltip"},O=r`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{display:block}@keyframes in{0%{opacity:0}to{opacity:1}}:host{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:var(--calcite-action-pad-corner-radius, .125rem);background:transparent}:host([expanded][layout=vertical]) .container{max-inline-size:var(--calcite-action-pad-expanded-max-width, auto)}:host([layout=vertical]) ::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:1px}.container{display:inline-flex;flex-direction:column;overflow:hidden;--tw-shadow: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);--tw-shadow-colored: 0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -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);gap:var(--calcite-action-pad-items-space, 0);border-radius:calc(var(--calcite-action-pad-corner-radius, .125rem) * 2);background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1))}.action-group--bottom{flex-grow:1;justify-content:flex-end;padding-block-end:0px}:host([layout=horizontal]) .container{flex-direction:row}:host([layout=horizontal]) .container .action-group--bottom{padding:0}:host([layout=horizontal]) .container ::slotted(calcite-action-group:not(:last-of-type)){border-inline-end-width:1px}:host([hidden]){display:none}[hidden]{display:none}`,s=class extends d{constructor(){super(),this.mutationObserver=u("mutation",()=>this.updateGroups()),this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionPadToggle.emit()},this.expandDisabled=!1,this.expanded=!1,this.layout="vertical",this.messages=m(),this.overlayPositioning="absolute",this.scale="m",this.calciteActionPadToggle=c({cancelable:!1}),this.listen("calciteActionMenuOpen",this.actionMenuOpenHandler)}static{this.properties={expandTooltip:[16,{state:!0}],actionsEndGroupLabel:1,expandDisabled:[7,{reflect:!0,type:Boolean}],expanded:[7,{reflect:!0,type:Boolean}],layout:[3,{reflect:!0}],messageOverrides:[0,{attribute:!1}],overlayPositioning:[3,{reflect:!0}],position:[3,{reflect:!0}],scale:[3,{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=O}async setFocus(){await g(this),h(this.el)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}willUpdate(t){t.has("expanded")&&this.hasUpdated&&b({el:this.el,expanded:this.expanded}),t.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&this.updateGroups()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}actionMenuOpenHandler(t){if(t.target.menuOpen){let o=t.composedPath();this.actionGroups?.forEach(e=>{o.includes(e)||(e.menuOpen=!1)})}}updateGroups(){let t=Array.from(this.el.querySelectorAll("calcite-action-group"));this.actionGroups=t,this.setGroupLayout(t)}setGroupLayout(t){t.forEach(o=>o.layout=this.layout)}handleDefaultSlotChange(){this.updateGroups()}handleTooltipSlotChange(t){let o=x(t).filter(e=>e?.matches("calcite-tooltip"));this.expandTooltip=o[0]}renderBottomActionGroup(){let{expanded:t,expandDisabled:o,messages:e,el:v,position:w,toggleExpand:T,scale:n,layout:G,actionsEndGroupLabel:E,overlayPositioning:k}=this,l=o?null:f({collapseLabel:e.collapseLabel,collapseText:e.collapse,el:v,expandLabel:e.expandLabel,expandText:e.expand,expanded:t,position:w,scale:n,toggle:T,tooltip:this.expandTooltip});return l?a`<calcite-action-group class=${i(y.actionGroupEnd)} .label=${E} .layout=${G} .overlayPositioning=${k} .scale=${n}><slot name=${C.expandTooltip} @slotchange=${this.handleTooltipSlotChange}></slot>${l}</calcite-action-group>`:null}render(){return a`<div class=${i(y.container)}><slot @slotchange=${this.handleDefaultSlotChange}></slot>${this.renderBottomActionGroup()}</div>`}};p("calcite-action-pad",s);export{s as ActionPad};
|
|
@@ -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.2.0-next.
|
|
4
|
-
import{a as pe,d as B,e as ue}from"./XLQJWLJR.js";import{a as le}from"./W7YWLFKG.js";import{A as ce,B as N,C as he,D as de,a as S,b as n,c as g,d as T,e as x,f as p,g as E,h as b,i as A,j as K,l as I,m as H,q as O,r as y,t as ne,u as re,w as U,x as j,y as W,z as D}from"./CK2727PE.js";import"./7JTQUIIG.js";import{a as ie,b as oe}from"./DTAEBKT4.js";import{a as F}from"./GZUOSY5I.js";import{d as L}from"./RFI4KO6W.js";import{a as se}from"./GTUVAAAD.js";import{a as Z}from"./DX4BEDZ3.js";import{a as ae}from"./24OTRUCC.js";import{b as v}from"./U2YGN4RT.js";import{e as Q,n as ee,x as z}from"./LLN5DNPL.js";import{d as te}from"./POGNNNSN.js";import"./QJN3Y7KP.js";import"./R3CUJDU2.js";import{K as J,e as G,g as u,k as w,w as M,x as Y,y as c,z as $}from"./MZMZSY5A.js";var Ae=G`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal);inline-size:var(--calcite-internal-color-picker-min-width);min-inline-size:var(--calcite-internal-color-picker-min-width)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-color-picker-min-width: 200px;--calcite-color-picker-spacing: 8px}:host([scale=s]) .saved-colors{gap:.25rem;grid-template-columns:repeat(auto-fill,20px)}:host([scale=m]){--calcite-internal-color-picker-min-width: 240px;--calcite-color-picker-spacing: 12px}:host([scale=l]){--calcite-internal-color-picker-min-width: 304px;--calcite-color-picker-spacing: 16px;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) .section:first-of-type{padding-block-start:var(--calcite-color-picker-spacing)}:host([scale=l]) .saved-colors{grid-template-columns:repeat(auto-fill,32px)}:host([scale=l]) .control-section{display:flex;flex-direction:column;flex-wrap:wrap;align-items:baseline}:host([scale=l]) .color-hex-options{inline-size:100%;display:flex;flex-shrink:1;flex-direction:column;justify-content:space-around}:host([scale=l]) .color-mode-container{flex-shrink:3}.container{background-color:var(--calcite-color-foreground-1);display:flex;flex-direction:column;block-size:min-content;border:1px solid var(--calcite-color-border-1)}.control-and-scope{position:relative;display:flex;cursor:pointer;touch-action:none}.color-field,.control-and-scope{-webkit-user-select:none;user-select:none}.scope{pointer-events:none;position:absolute;z-index:var(--calcite-z-index);block-size:1px;inline-size:1px;border-radius:9999px;background-color:transparent;font-size:var(--calcite-font-size--1);outline-color:transparent}.scope: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))));outline-offset:6px}.hex-and-channels-group{display:flex;inline-size:100%;flex-direction:column;flex-wrap:wrap}.section{padding-block:0 var(--calcite-color-picker-spacing);padding-inline:var(--calcite-color-picker-spacing)}.section:first-of-type{padding-block-start:var(--calcite-color-picker-spacing)}.sliders{display:flex;flex-direction:column;justify-content:space-between;margin-inline-start:var(--calcite-color-picker-spacing);gap:var(--calcite-spacing-xxs)}.preview-and-sliders{display:flex;align-items:center;padding:var(--calcite-color-picker-spacing)}.color-hex-options,.section--split{flex-grow:1}.header{display:flex;align-items:center;justify-content:space-between;color:var(--calcite-color-text-1)}.color-mode-container{padding-block-start:var(--calcite-color-picker-spacing)}.channels{display:flex}.channel{flex-grow:1}.channel[data-channel-index="3"]{margin-inline-start:-1px;min-inline-size:81px}:host([scale=s]) .channel[data-channel-index="3"]{min-inline-size:68px}:host([scale=l]) .channel[data-channel-index="3"]{min-inline-size:88px}.saved-colors{display:grid;gap:.5rem;padding-block-start:var(--calcite-color-picker-spacing);grid-template-columns:repeat(auto-fill,24px)}.saved-colors-buttons{display:flex}.saved-color{outline-offset:0;outline-color:transparent;cursor:pointer}.saved-color:focus{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.saved-color:hover{transition:outline-color var(--calcite-internal-animation-timing-fast) ease-in-out;outline:2px solid var(--calcite-color-border-2);outline-offset:2px}:host([hidden]){display:none}[hidden]{display:none}`,Ce=16,_=class extends Y{constructor(){super(),this._color=g,this.internalColorUpdateContext=null,this.isActiveChannelInputEmpty=!1,this.mode=U.HEX,this.resizeObserver=Z("resize",e=>this.resizeCanvas(e)),this.shiftKeyChannelAdjustment=0,this.upOrDownArrowKeyTracker=null,this._valueWasSet=!1,this.channelMode="rgb",this.channels=this.toChannels(g),this.staticDimensions=A.m,this.savedColors=[],this.allowEmpty=!1,this.alphaChannel=!1,this.channelsDisabled=!1,this.clearable=!1,this.disabled=!1,this.format="auto",this.hexDisabled=!1,this.messages=ae({blocking:!0}),this.savedDisabled=!1,this.scale="m",this.calciteColorPickerChange=M({cancelable:!1}),this.calciteColorPickerInput=M({cancelable:!1}),this.captureColorFieldColor=(e,t,i=!0)=>{let{width:o,height:a}=this.dynamicDimensions.colorField,s=Math.round(p.s/o*e),l=Math.round(p.v/a*(a-t));this.internalColorSet(this.baseColorFieldColor.hsv().saturationv(s).value(l),i)},this.drawColorControls=L((e="all")=>{(e==="all"||e==="color-field")&&this.colorFieldRenderingContext&&this.drawColorField(),(e==="all"||e==="hue-slider")&&this.hueSliderRenderingContext&&this.drawHueSlider(),this.alphaChannel&&(e==="all"||e==="opacity-slider")&&this.opacitySliderRenderingContext&&this.drawOpacitySlider()},Ce),this.globalPointerMoveHandler=e=>{let{activeCanvasInfo:t,el:i}=this;if(!i.isConnected||!t)return;let{context:o,bounds:a}=t,s,l,{clientX:r,clientY:h}=e;o.canvas.matches(":hover")?(s=r-a.x,l=h-a.y):(r<a.x+a.width&&r>a.x?s=r-a.x:r<a.x?s=0:s=a.width,h<a.y+a.height&&h>a.y?l=h-a.y:h<a.y?l=0:l=a.height),o===this.colorFieldRenderingContext?this.captureColorFieldColor(s,l,!1):o===this.hueSliderRenderingContext?this.captureHueSliderColor(s):o===this.opacitySliderRenderingContext&&this.captureOpacitySliderValue(s)},this.globalPointerUpHandler=e=>{if(!z(e))return;let t=this.activeCanvasInfo;this.activeCanvasInfo=null,this.drawColorControls(),t&&this.calciteColorPickerChange.emit()},this.resizeCanvas=L(e=>{if(!this.hasUpdated)return;let[t]=e,i=Math.floor(t.contentBoxSize[0].inlineSize);this.dynamicDimensions.colorField.width!==i&&(this.updateDynamicDimensions(i),this.updateCanvasSize(),this.drawColorControls())},Ce),this.updateDynamicDimensions=e=>{let t={width:he(e,this.staticDimensions,this.alphaChannel),height:this.staticDimensions.slider.height};this.dynamicDimensions={colorField:de(e),slider:t}},this.listen("keydown",this.handleChannelKeyUpOrDown,{capture:!0}),this.listen("keyup",this.handleChannelKeyUpOrDown,{capture:!0})}static{this.properties={channelMode:[16,{state:!0}],channels:[16,{state:!0}],colorFieldScopeLeft:[16,{state:!0}],colorFieldScopeTop:[16,{state:!0}],staticDimensions:[16,{state:!0}],hueScopeLeft:[16,{state:!0}],opacityScopeLeft:[16,{state:!0}],savedColors:[16,{state:!0}],scopeOrientation:[16,{state:!0}],allowEmpty:[7,{reflect:!0,type:Boolean}],alphaChannel:[5,{type:Boolean}],channelsDisabled:[5,{type:Boolean}],clearable:[7,{reflect:!0,type:Boolean}],color:[0,{attribute:!1}],disabled:[7,{reflect:!0,type:Boolean}],format:[3,{reflect:!0}],hexDisabled:[5,{type:Boolean}],messageOverrides:[0,{attribute:!1}],numberingSystem:[3,{reflect:!0}],savedDisabled:[7,{reflect:!0,type:Boolean}],scale:[3,{reflect:!0}],storageId:[3,{reflect:!0}],value:1}}static{this.styles=Ae}get baseColorFieldColor(){return this.color||this.previousColor||g}get effectiveSliderWidth(){return this.dynamicDimensions.slider.width}get color(){return this._color}set color(e){let t=this._color;this._color=e,this.handleColorChange(e,t)}get value(){return this._value}set value(e){let t=this._value;this._value=e,this.handleValueChange(e,t),this._valueWasSet=!0}async setFocus(){await te(this),ee(this.el)}connectedCallback(){super.connectedCallback(),this.observeResize()}async load(){this._valueWasSet||(this._value??=O(y(g,this.alphaChannel))),this.handleAllowEmptyOrClearableChange();let{isClearable:e,color:t,format:i,value:o}=this,a=e&&!o,s=j(o),l=a||i==="auto"&&s||i===s,r=a?null:l?S(o):t;l||this.showIncompatibleColorWarning(o,i),this.setMode(i,!1),this.internalColorSet(r,!1,"initial"),this.updateStaticDimensions(this.scale),this.updateDynamicDimensions(A[this.scale].minWidth);let h=`${T}${this.storageId}`;this.storageId&&localStorage.getItem(h)&&(this.savedColors=JSON.parse(localStorage.getItem(h)))}willUpdate(e){(e.has("allowEmpty")&&(this.hasUpdated||this.allowEmpty!==!1)||e.has("clearable")&&(this.hasUpdated||this.clearable!==!1))&&this.handleAllowEmptyOrClearableChange(),e.has("alphaChannel")&&(this.hasUpdated||this.alphaChannel!==!1)&&this.handleAlphaChannelChange(this.alphaChannel),this.hasUpdated&&(e.has("alphaChannel")&&this.alphaChannel!==!1||e.has("staticDimensions")&&this.staticDimensions!==A.m)&&this.handleAlphaChannelDimensionsChange(),(e.has("alphaChannel")&&(this.hasUpdated||this.alphaChannel!==!1)||e.has("format")&&(this.hasUpdated||this.format!=="auto"))&&this.handleFormatOrAlphaChannelChange(),e.has("scale")&&(this.hasUpdated||this.scale!=="m")&&this.handleScaleChange(this.scale)}updated(){ie(this)}loaded(){this.handleAlphaChannelDimensionsChange()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("pointermove",this.globalPointerMoveHandler),window.removeEventListener("pointerup",this.globalPointerUpHandler),this.resizeObserver?.disconnect()}observeResize(){this.resizeObserver?.observe(this.el)}handleAllowEmptyOrClearableChange(){this.isClearable=this.clearable||this.allowEmpty}handleAlphaChannelChange(e){let{format:t}=this;e&&t!=="auto"&&!D(t)&&(console.warn(`ignoring alphaChannel as the current format (${t}) does not support alpha`),this.alphaChannel=!1)}handleAlphaChannelDimensionsChange(){this.drawColorControls()}handleColorChange(e,t){this.drawColorControls(),this.updateChannelsFromColor(e),this.previousColor=t}handleFormatOrAlphaChannelChange(){this.setMode(this.format),this.internalColorSet(this.color,!1,"internal")}handleScaleChange(e="m"){this.updateStaticDimensions(e),this.updateCanvasSize(),this.drawColorControls()}handleValueChange(e,t){let{isClearable:i,format:o}=this,a=!i||e,s=!1;if(a){let d=j(e);if(!d||o!=="auto"&&d!==o){this.showIncompatibleColorWarning(e,o),this._value=t;return}s=this.mode!==d,this.setMode(d,this.internalColorUpdateContext===null)}let l=this.activeCanvasInfo;if(this.internalColorUpdateContext==="initial")return;if(this.internalColorUpdateContext==="user-interaction"){this.calciteColorPickerInput.emit(),l||this.calciteColorPickerChange.emit();return}let r=i&&!e?null:S(e!=null&&typeof e=="object"&&D(this.mode)?re(e):e),h=!W(r,this.color);(s||h)&&this.internalColorSet(r,this.alphaChannel&&!(this.mode.endsWith("a")||this.mode.endsWith("a-css"))||this.internalColorUpdateContext==="internal","internal")}handleTabActivate(e){this.channelMode=e.currentTarget.getAttribute("data-color-mode"),this.updateChannelsFromColor(this.color)}handleColorFieldScopeKeyDown(e){let{key:t}=e,i={ArrowUp:{x:0,y:-10},ArrowRight:{x:10,y:0},ArrowDown:{x:0,y:10},ArrowLeft:{x:-10,y:0}};i[t]&&(e.preventDefault(),this.scopeOrientation=t==="ArrowDown"||t==="ArrowUp"?"vertical":"horizontal",this.captureColorFieldColor(this.colorFieldScopeLeft+i[t].x||0,this.colorFieldScopeTop+i[t].y||0,!1))}handleHueScopeKeyDown(e){let t=e.shiftKey?10:1,{key:i}=e,o={ArrowUp:1,ArrowRight:1,ArrowDown:-1,ArrowLeft:-1};if(o[i]){e.preventDefault();let a=o[i]*t,s=this.baseColorFieldColor.hue(),l=this.baseColorFieldColor.hue(s+a);this.internalColorSet(l,!1)}}handleHexInputChange(e){e.stopPropagation();let{isClearable:t,color:i}=this,a=e.target.value;if(t&&!a){this.internalColorSet(null);return}let s=i&&O(y(i,D(this.mode)));a!==s&&this.internalColorSet(S(a))}handleSavedColorSelect(e){let t=e.currentTarget;this.internalColorSet(S(t.color))}handleChannelInput(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),a=i===3?b.max:this.channelMode==="rgb"?x[Object.keys(x)[i]]:p[Object.keys(p)[i]],s;if(!t.value)s="",this.isActiveChannelInputEmpty=!0,this.upOrDownArrowKeyTracker=null;else{let r=Number(t.value)+this.shiftKeyChannelAdjustment;s=pe(r,0,a).toString()}t.value=s,s!==""&&this.shiftKeyChannelAdjustment!==0?this.handleChannelChange(e):s!==""&&this.handleChannelChange(e)}handleChannelBlur(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),o=[...this.channels];!t.value&&!this.isClearable&&(t.value=o[i]?.toString())}handleChannelFocus(e){e.currentTarget.selectText()}handleChannelKeyUpOrDown(e){this.shiftKeyChannelAdjustment=0;let{key:t}=e;if(t!=="ArrowUp"&&t!=="ArrowDown"||!e.composedPath().some(a=>a.classList?.contains(n.channel)))return;let{shiftKey:i}=e;if(e.preventDefault(),!this.color){this.internalColorSet(this.previousColor),e.stopPropagation();return}let o=9;this.shiftKeyChannelAdjustment=t==="ArrowUp"&&i?o:t==="ArrowDown"&&i?-9:0,t==="ArrowUp"&&(this.upOrDownArrowKeyTracker="up"),t==="ArrowDown"&&(this.upOrDownArrowKeyTracker="down")}getChannelInputLimit(e){return this.channelMode==="rgb"?x[Object.keys(x)[e]]:p[Object.keys(p)[e]]}handleChannelChange(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),o=[...this.channels];if(this.isClearable&&!t.value){this.channels=[null,null,null,null],this.internalColorSet(null);return}let s=i===3;this.isActiveChannelInputEmpty&&this.upOrDownArrowKeyTracker&&(t.value=this.upOrDownArrowKeyTracker==="up"?(o[i]+1<=this.getChannelInputLimit(i)?o[i]+1:this.getChannelInputLimit(i)).toString():(o[i]-1>=0?o[i]-1:0).toString(),this.isActiveChannelInputEmpty=!1,this.upOrDownArrowKeyTracker=null);let l=t.value?Number(t.value):o[i];o[i]=s?H(l):l,this.updateColorFromChannels(o)}handleSavedColorKeyDown(e){se(e.key)&&(e.preventDefault(),this.handleSavedColorSelect(e))}handleColorFieldPointerDown(e){this.handleCanvasControlPointerDown(e,this.colorFieldRenderingContext,this.captureColorFieldColor,this.colorFieldScopeNode)}focusScope(e){requestAnimationFrame(()=>{e.focus()})}handleHueSliderPointerDown(e){this.handleCanvasControlPointerDown(e,this.hueSliderRenderingContext,this.captureHueSliderColor,this.hueScopeNode)}handleOpacitySliderPointerDown(e){this.handleCanvasControlPointerDown(e,this.opacitySliderRenderingContext,this.captureOpacitySliderValue,this.opacityScopeNode)}handleCanvasControlPointerDown(e,t,i,o){z(e)&&(window.addEventListener("pointermove",this.globalPointerMoveHandler),window.addEventListener("pointerup",this.globalPointerUpHandler,{once:!0}),this.activeCanvasInfo={context:t,bounds:t.canvas.getBoundingClientRect()},i.call(this,e.offsetX,e.offsetY),this.focusScope(o))}storeColorFieldScope(e){this.colorFieldScopeNode=e}storeHueScope(e){this.hueScopeNode=e}handleKeyDown(e){e.key==="Enter"&&e.preventDefault()}showIncompatibleColorWarning(e,t){console.warn(`ignoring color value (${e}) as it is not compatible with the current format (${t})`)}setMode(e,t=!0){let i=e==="auto"?this.mode:e;this.mode=this.ensureCompatibleMode(i,t)}ensureCompatibleMode(e,t){let{alphaChannel:i}=this,o=D(e);if(i&&!o){let a=ce(e);return t&&console.warn(`setting format to (${a}) as the provided one (${e}) does not support alpha`),a}if(!i&&o){let a=N(e);return t&&console.warn(`setting format to (${a}) as the provided one (${e}) does not support alpha`),a}return e}captureHueSliderColor(e){let t=E/this.effectiveSliderWidth*e;this.internalColorSet(this.baseColorFieldColor.hue(t),!1)}captureOpacitySliderValue(e){let t=H(b.max/this.effectiveSliderWidth*e);this.internalColorSet(this.baseColorFieldColor.alpha(t),!1)}internalColorSet(e,t=!0,i="user-interaction"){t&&W(e,this.color)||(this.internalColorUpdateContext=i,this.color=e,this.value=this.toValue(e),this.internalColorUpdateContext=null)}toValue(e,t=this.mode){if(!e)return null;if(t.includes("hex")){let a=t===U.HEXA;return O(y(e.round(),a),a)}if(t.includes("-css")){let a=e[t.replace("-css","").replace("a","")]().round().string();if((t.endsWith("a")||t.endsWith("a-css"))&&e.alpha()===1){let l=a.slice(0,3),r=a.slice(4,-1);return`${l}a(${r}, ${e.alpha()})`}return a}let o=e[N(t)]().round().object();return t.endsWith("a")?ne(o):o}getSliderCapSpacing(){let{staticDimensions:{slider:{height:e},thumb:{radius:t}}}=this;return t*2-e}updateStaticDimensions(e="m"){this.staticDimensions=A[e]}deleteColor(){let e=y(this.color,this.alphaChannel);if(!(this.savedColors.indexOf(e)>-1))return;let i=this.savedColors.filter(a=>a!==e);this.savedColors=i;let o=`${T}${this.storageId}`;this.storageId&&localStorage.setItem(o,JSON.stringify(i))}saveColor(){let e=y(this.color,this.alphaChannel);if(this.savedColors.indexOf(e)>-1)return;let i=[...this.savedColors,e];this.savedColors=i;let o=`${T}${this.storageId}`;this.storageId&&localStorage.setItem(o,JSON.stringify(i))}drawColorField(){let e=this.colorFieldRenderingContext,{width:t,height:i}=this.dynamicDimensions.colorField;e.fillStyle=this.baseColorFieldColor.hsv().saturationv(100).value(100).alpha(1).string(),e.fillRect(0,0,t,i);let o=e.createLinearGradient(0,0,t,0);o.addColorStop(0,"rgba(255,255,255,1)"),o.addColorStop(1,"rgba(255,255,255,0)"),e.fillStyle=o,e.fillRect(0,0,t,i);let a=e.createLinearGradient(0,0,0,i);a.addColorStop(0,"rgba(0,0,0,0)"),a.addColorStop(1,"rgba(0,0,0,1)"),e.fillStyle=a,e.fillRect(0,0,t,i),this.drawActiveColorFieldColor()}setCanvasContextSize(e,{height:t,width:i}){if(!e)return;let o=window.devicePixelRatio||1;e.width=i*o,e.height=t*o,e.style.height=`${t}px`,e.style.width=`${i}px`,e.getContext("2d").scale(o,o)}initColorField(e){e&&(this.colorFieldRenderingContext=e.getContext("2d"),this.updateCanvasSize("color-field"),this.drawColorControls())}initHueSlider(e){e&&(this.hueSliderRenderingContext=e.getContext("2d"),this.updateCanvasSize("hue-slider"),this.drawHueSlider())}initOpacitySlider(e){e&&(this.opacitySliderRenderingContext=e.getContext("2d"),this.updateCanvasSize("opacity-slider"),this.drawOpacitySlider())}updateCanvasSize(e="all"){let{dynamicDimensions:t,staticDimensions:i}=this;(e==="all"||e==="color-field")&&this.setCanvasContextSize(this.colorFieldRenderingContext?.canvas,t.colorField);let o={width:this.effectiveSliderWidth,height:i.slider.height+(i.thumb.radius-t.slider.height/2)*2};(e==="all"||e==="hue-slider")&&this.setCanvasContextSize(this.hueSliderRenderingContext?.canvas,o),(e==="all"||e==="opacity-slider")&&this.setCanvasContextSize(this.opacitySliderRenderingContext?.canvas,o)}drawActiveColorFieldColor(){let{color:e}=this;if(!e)return;let t=e.hsv(),{staticDimensions:{thumb:{radius:i}}}=this,{width:o,height:a}=this.dynamicDimensions.colorField,s=t.saturationv()/(p.s/o),l=a-t.value()/(p.v/a);requestAnimationFrame(()=>{this.colorFieldScopeLeft=s,this.colorFieldScopeTop=l}),this.drawThumb(this.colorFieldRenderingContext,i,s,l,t,!1)}drawThumb(e,t,i,o,a,s){let r=2*Math.PI,h=1;if(e.beginPath(),e.arc(i,o,t,0,r),e.fillStyle="#fff",e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=h,e.stroke(),s&&a.alpha()<1){let C=e.createPattern(this.getCheckeredBackgroundPattern(),"repeat");e.beginPath(),e.arc(i,o,t-3,0,r),e.fillStyle=C,e.fill()}e.globalCompositeOperation="source-atop",e.beginPath(),e.arc(i,o,t-3,0,r);let d=s?a.alpha():1;e.fillStyle=a.rgb().alpha(d).string(),e.fill(),e.globalCompositeOperation="source-over"}drawActiveHueSliderColor(){let{color:e}=this;if(!e)return;let t=e.hsv().saturationv(100).value(100),{staticDimensions:{thumb:{radius:i}}}=this,o=this.effectiveSliderWidth,a=t.hue()/(E/o),s=i,l=this.getSliderBoundX(a,o,i);requestAnimationFrame(()=>{this.hueScopeLeft=l}),this.drawThumb(this.hueSliderRenderingContext,i,l,s,t,!1)}drawHueSlider(){let e=this.hueSliderRenderingContext,{staticDimensions:{slider:{height:t},thumb:{radius:i}}}=this,o=0,a=i-t/2,s=this.effectiveSliderWidth,l=e.createLinearGradient(0,0,s,0),r=["red","yellow","lime","cyan","blue","magenta","#ff0004"],h=1/(r.length-1),d=0;r.forEach(C=>{l.addColorStop(d,S(C).string()),d+=h}),e.clearRect(0,0,s,t+this.getSliderCapSpacing()*2),this.drawSliderPath(e,t,s,o,a),e.fillStyle=l,e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=1,e.stroke(),this.drawActiveHueSliderColor()}drawOpacitySlider(){let e=this.opacitySliderRenderingContext,{baseColorFieldColor:t,staticDimensions:{slider:{height:i},thumb:{radius:o}}}=this,a=0,s=o-i/2,l=this.effectiveSliderWidth;e.clearRect(0,0,l,i+this.getSliderCapSpacing()*2);let r=e.createLinearGradient(0,s,l,0),h=t.rgb().alpha(0),d=t.rgb().alpha(.5),C=t.rgb().alpha(1);r.addColorStop(0,h.string()),r.addColorStop(.5,d.string()),r.addColorStop(1,C.string()),this.drawSliderPath(e,i,l,a,s);let f=e.createPattern(this.getCheckeredBackgroundPattern(),"repeat");e.fillStyle=f,e.fill(),e.fillStyle=r,e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=1,e.stroke(),this.drawActiveOpacitySliderColor()}drawSliderPath(e,t,i,o,a){let s=t/2+1;e.beginPath(),e.moveTo(o+s,a),e.lineTo(o+i-s,a),e.quadraticCurveTo(o+i,a,o+i,a+s),e.lineTo(o+i,a+t-s),e.quadraticCurveTo(o+i,a+t,o+i-s,a+t),e.lineTo(o+s,a+t),e.quadraticCurveTo(o,a+t,o,a+t-s),e.lineTo(o,a+s),e.quadraticCurveTo(o,a,o+s,a),e.closePath()}getCheckeredBackgroundPattern(){if(this.checkerPattern)return this.checkerPattern;let e=document.createElement("canvas");e.width=10,e.height=10;let t=e.getContext("2d");return t.fillStyle="#ccc",t.fillRect(0,0,10,10),t.fillStyle="#fff",t.fillRect(0,0,5,5),t.fillRect(5,5,5,5),this.checkerPattern=e,e}drawActiveOpacitySliderColor(){let{color:e}=this;if(!e)return;let t=e,{staticDimensions:{thumb:{radius:i}}}=this,o=this.effectiveSliderWidth,a=I(t.alpha())/(b.max/o),s=i,l=this.getSliderBoundX(a,o,i);requestAnimationFrame(()=>{this.opacityScopeLeft=l}),this.drawThumb(this.opacitySliderRenderingContext,i,l,s,t,!0)}getSliderBoundX(e,t,i){let o=ue(e,t,i);return o===0?e:o===-1?B(e,0,t,i,i*2):B(e,0,t,t-i*2,t-i)}storeOpacityScope(e){this.opacityScopeNode=e}handleOpacityScopeKeyDown(e){let t=e.shiftKey?10:1,{key:i}=e,o={ArrowUp:.01,ArrowRight:.01,ArrowDown:-.01,ArrowLeft:-.01};if(o[i]){e.preventDefault();let a=o[i]*t,s=this.baseColorFieldColor.alpha(),l=this.baseColorFieldColor.alpha(s+a);this.internalColorSet(l,!1)}}updateColorFromChannels(e){this.internalColorSet(S(e,this.channelMode))}updateChannelsFromColor(e){this.channels=e?this.toChannels(e):[null,null,null,null]}toChannels(e){let{channelMode:t}=this,i=e[t]().array().map((o,a)=>a===3?o:Math.floor(o));return i.length===3&&i.push(1),i}getAdjustedScopePosition(e,t){return[e-K/2,t-K/2]}render(){let{channelsDisabled:e,color:t,colorFieldScopeLeft:i,colorFieldScopeTop:o,staticDimensions:{thumb:{radius:a}},hexDisabled:s,hueScopeLeft:l,messages:r,alphaChannel:h,opacityScopeLeft:d,savedColors:C,savedDisabled:f,scale:m,scopeOrientation:k}=this,V=this.effectiveSliderWidth,X=t?y(t,h):null,fe=a,me=l??V*g.hue()/p.h,ge=a,ve=d??V*I(g.alpha())/b.max,q=t===void 0,P=k==="vertical",[Se,be]=this.getAdjustedScopePosition(i,o),[ye,we]=this.getAdjustedScopePosition(me,fe),[$e,xe]=this.getAdjustedScopePosition(ve,ge);return oe({disabled:this.disabled,children:u`<div class=${c(n.container)}><div class=${c(n.controlAndScope)}><canvas class=${c(n.colorField)} @pointerdown=${this.handleColorFieldPointerDown} ${v(this.initColorField)}></canvas><div .ariaLabel=${P?r.value:r.saturation} .ariaValueMax=${P?p.v:p.s} aria-valuemin=0 .ariaValueNow=${(P?t?.saturationv():t?.value())||"0"} class=${c({[n.scope]:!0,[n.colorFieldScope]:!0})} @keydown=${this.handleColorFieldScopeKeyDown} role=slider style=${$({top:`${be||0}px`,left:`${Se||0}px`})} tabindex=0 ${v(this.storeColorFieldScope)}></div></div><div class=${c(n.previewAndSliders)}><calcite-color-picker-swatch class=${c(n.preview)} .color=${X} .scale=${this.alphaChannel?"l":this.scale}></calcite-color-picker-swatch><div class=${c(n.sliders)}><div class=${c(n.controlAndScope)}><canvas class=${c({[n.slider]:!0,[n.hueSlider]:!0})} @pointerdown=${this.handleHueSliderPointerDown} ${v(this.initHueSlider)}></canvas><div .ariaLabel=${r.hue} .ariaValueMax=${p.h} aria-valuemin=0 .ariaValueNow=${t?.round().hue()||g.round().hue()} class=${c({[n.scope]:!0,[n.hueScope]:!0})} @keydown=${this.handleHueScopeKeyDown} role=slider style=${$({top:`${we}px`,left:`${ye}px`})} tabindex=0 ${v(this.storeHueScope)}></div></div>${h?u`<div class=${c(n.controlAndScope)}><canvas class=${c({[n.slider]:!0,[n.opacitySlider]:!0})} @pointerdown=${this.handleOpacitySliderPointerDown} ${v(this.initOpacitySlider)}></canvas><div .ariaLabel=${r.opacity} .ariaValueMax=${b.max} .ariaValueMin=${b.min} .ariaValueNow=${(t||g).round().alpha()} class=${c({[n.scope]:!0,[n.opacityScope]:!0})} @keydown=${this.handleOpacityScopeKeyDown} role=slider style=${$({top:`${xe}px`,left:`${$e}px`})} tabindex=0 ${v(this.storeOpacityScope)}></div></div>`:null}</div></div>${s&&e?null:u`<div class=${c({[n.controlSection]:!0,[n.section]:!0})}><div class=${c(n.hexAndChannelsGroup)}>${s?null:u`<div class=${c(n.hexOptions)}><calcite-color-picker-hex-input .allowEmpty=${this.isClearable} .alphaChannel=${h} class=${c(n.control)} .messages=${r} .numberingSystem=${this.numberingSystem} @calciteColorPickerHexInputChange=${this.handleHexInputChange} .scale=${m} .value=${X}></calcite-color-picker-hex-input></div>`}${e?null:u`<calcite-tabs class=${c({[n.colorModeContainer]:!0,[n.splitSection]:!0})} .scale=${m==="l"?"m":"s"}><calcite-tab-nav slot=title-group>${this.renderChannelsTabTitle("rgb")}${this.renderChannelsTabTitle("hsv")}</calcite-tab-nav>${this.renderChannelsTab("rgb")}${this.renderChannelsTab("hsv")}</calcite-tabs>`}</div></div>`}${f?null:u`<div class=${c({[n.savedColorsSection]:!0,[n.section]:!0})}><div class=${c(n.header)}><label>${r.saved}</label><div class=${c(n.savedColorsButtons)}><calcite-button appearance=transparent class=${c(n.deleteColor)} .disabled=${q} icon-start=minus kind=neutral .label=${r.deleteColor} @click=${this.deleteColor} .scale=${m} type=button></calcite-button><calcite-button appearance=transparent class=${c(n.saveColor)} .disabled=${q} icon-start=plus kind=neutral .label=${r.saveColor} @click=${this.saveColor} .scale=${m} type=button></calcite-button></div></div>${C.length>0?u`<div class=${c(n.savedColors)}>${le(C,R=>R,R=>u`<calcite-color-picker-swatch class=${c(n.savedColor)} .color=${R} @click=${this.handleSavedColorSelect} @keydown=${this.handleSavedColorKeyDown} .scale=${m} tabindex=0></calcite-color-picker-swatch>`)}</div>`:null}</div>`}</div>`})}renderChannelsTabTitle(e){let{channelMode:t,messages:i}=this,o=e===t,a=e==="rgb"?i.rgb:i.hsv;return F(e,u`<calcite-tab-title class=${c(n.colorMode)} data-color-mode=${e??w} @calciteTabsActivate=${this.handleTabActivate} .selected=${o}>${a}</calcite-tab-title>`)}renderChannelsTab(e){let{isClearable:t,channelMode:i,channels:o,messages:a,alphaChannel:s}=this,l=e===i,h=e==="rgb"?[a.red,a.green,a.blue]:[a.hue,a.saturation,a.value],d=Q(this.el),C=s?o:o.slice(0,3);return F(e,u`<calcite-tab class=${c(n.control)} .selected=${l}><div class=${c(n.channels)} dir=ltr>${C.map((f,m)=>{let k=m===3;return k&&(f=t&&!f?f:I(f)),this.renderChannel(f,m,h[m],d,k?"%":"")})}</div></calcite-tab>`)}renderChannel(e,t,i,o,a){return F(t,u`<calcite-input-number class=${c(n.channel)} data-channel-index=${t??w} dir=${o??w} .label=${i} lang=${this.messages._lang??w} number-button-type=none .numberingSystem=${this.numberingSystem} @keydown=${this.handleKeyDown} @calciteInputNumberChange=${this.handleChannelChange} @calciteInputNumberInput=${this.handleChannelInput} @calciteInternalInputNumberBlur=${this.handleChannelBlur} @calciteInternalInputNumberFocus=${this.handleChannelFocus} .scale=${this.scale==="l"?"m":"s"} style=${$({marginLeft:t>0&&!(this.scale==="s"&&this.alphaChannel&&t===3)?"-1px":""})} .suffixText=${a} .value=${e?.toString()}></calcite-input-number>`)}};J("calcite-color-picker",_);export{_ as ColorPicker};
|
|
3
|
+
v3.2.0-next.40 */
|
|
4
|
+
import{a as pe,d as B,e as ue}from"./JGJKOHCP.js";import{a as le}from"./5NQUZRDM.js";import{A as ce,B as N,C as he,D as de,a as S,b as n,c as g,d as T,e as x,f as p,g as E,h as b,i as A,j as K,l as I,m as H,q as O,r as y,t as ne,u as re,w as U,x as j,y as W,z as D}from"./NAEQOQHY.js";import"./UTHT52HY.js";import{a as ie,b as oe}from"./KOH7CJJ2.js";import{a as F}from"./PNGIMH3C.js";import{d as L}from"./HPNQQK6A.js";import{a as se}from"./VIJYQUPS.js";import{a as Z}from"./VYNVOZVL.js";import{a as ae}from"./7EKOSZOZ.js";import{b as v}from"./6P5PSH65.js";import{e as Q,n as ee,x as z}from"./4JEZM6VX.js";import{d as te}from"./VOMFC6A5.js";import"./PB3OJ43M.js";import"./6DCGXB5R.js";import{K as J,e as G,g as u,k as w,w as M,x as Y,y as c,z as $}from"./EYWRTO2E.js";var Ae=G`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal);inline-size:var(--calcite-internal-color-picker-min-width);min-inline-size:var(--calcite-internal-color-picker-min-width)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-color-picker-min-width: 200px;--calcite-color-picker-spacing: 8px}:host([scale=s]) .saved-colors{gap:.25rem;grid-template-columns:repeat(auto-fill,20px)}:host([scale=m]){--calcite-internal-color-picker-min-width: 240px;--calcite-color-picker-spacing: 12px}:host([scale=l]){--calcite-internal-color-picker-min-width: 304px;--calcite-color-picker-spacing: 16px;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) .section:first-of-type{padding-block-start:var(--calcite-color-picker-spacing)}:host([scale=l]) .saved-colors{grid-template-columns:repeat(auto-fill,32px)}:host([scale=l]) .control-section{display:flex;flex-direction:column;flex-wrap:wrap;align-items:baseline}:host([scale=l]) .color-hex-options{inline-size:100%;display:flex;flex-shrink:1;flex-direction:column;justify-content:space-around}:host([scale=l]) .color-mode-container{flex-shrink:3}.container{background-color:var(--calcite-color-foreground-1);display:flex;flex-direction:column;block-size:min-content;border:1px solid var(--calcite-color-border-1)}.control-and-scope{position:relative;display:flex;cursor:pointer;touch-action:none}.color-field,.control-and-scope{-webkit-user-select:none;user-select:none}.scope{pointer-events:none;position:absolute;z-index:var(--calcite-z-index);block-size:1px;inline-size:1px;border-radius:9999px;background-color:transparent;font-size:var(--calcite-font-size--1);outline-color:transparent}.scope: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))));outline-offset:6px}.hex-and-channels-group{display:flex;inline-size:100%;flex-direction:column;flex-wrap:wrap}.section{padding-block:0 var(--calcite-color-picker-spacing);padding-inline:var(--calcite-color-picker-spacing)}.section:first-of-type{padding-block-start:var(--calcite-color-picker-spacing)}.sliders{display:flex;flex-direction:column;justify-content:space-between;margin-inline-start:var(--calcite-color-picker-spacing);gap:var(--calcite-spacing-xxs)}.preview-and-sliders{display:flex;align-items:center;padding:var(--calcite-color-picker-spacing)}.color-hex-options,.section--split{flex-grow:1}.header{display:flex;align-items:center;justify-content:space-between;color:var(--calcite-color-text-1)}.color-mode-container{padding-block-start:var(--calcite-color-picker-spacing)}.channels{display:flex}.channel{flex-grow:1}.channel[data-channel-index="3"]{margin-inline-start:-1px;min-inline-size:81px}:host([scale=s]) .channel[data-channel-index="3"]{min-inline-size:68px}:host([scale=l]) .channel[data-channel-index="3"]{min-inline-size:88px}.saved-colors{display:grid;gap:.5rem;padding-block-start:var(--calcite-color-picker-spacing);grid-template-columns:repeat(auto-fill,24px)}.saved-colors-buttons{display:flex}.saved-color{outline-offset:0;outline-color:transparent;cursor:pointer}.saved-color:focus{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.saved-color:hover{transition:outline-color var(--calcite-internal-animation-timing-fast) ease-in-out;outline:2px solid var(--calcite-color-border-2);outline-offset:2px}:host([hidden]){display:none}[hidden]{display:none}`,Ce=16,_=class extends Y{constructor(){super(),this._color=g,this.internalColorUpdateContext=null,this.isActiveChannelInputEmpty=!1,this.mode=U.HEX,this.resizeObserver=Z("resize",e=>this.resizeCanvas(e)),this.shiftKeyChannelAdjustment=0,this.upOrDownArrowKeyTracker=null,this._valueWasSet=!1,this.channelMode="rgb",this.channels=this.toChannels(g),this.staticDimensions=A.m,this.savedColors=[],this.allowEmpty=!1,this.alphaChannel=!1,this.channelsDisabled=!1,this.clearable=!1,this.disabled=!1,this.format="auto",this.hexDisabled=!1,this.messages=ae({blocking:!0}),this.savedDisabled=!1,this.scale="m",this.calciteColorPickerChange=M({cancelable:!1}),this.calciteColorPickerInput=M({cancelable:!1}),this.captureColorFieldColor=(e,t,i=!0)=>{let{width:o,height:a}=this.dynamicDimensions.colorField,s=Math.round(p.s/o*e),l=Math.round(p.v/a*(a-t));this.internalColorSet(this.baseColorFieldColor.hsv().saturationv(s).value(l),i)},this.drawColorControls=L((e="all")=>{(e==="all"||e==="color-field")&&this.colorFieldRenderingContext&&this.drawColorField(),(e==="all"||e==="hue-slider")&&this.hueSliderRenderingContext&&this.drawHueSlider(),this.alphaChannel&&(e==="all"||e==="opacity-slider")&&this.opacitySliderRenderingContext&&this.drawOpacitySlider()},Ce),this.globalPointerMoveHandler=e=>{let{activeCanvasInfo:t,el:i}=this;if(!i.isConnected||!t)return;let{context:o,bounds:a}=t,s,l,{clientX:r,clientY:h}=e;o.canvas.matches(":hover")?(s=r-a.x,l=h-a.y):(r<a.x+a.width&&r>a.x?s=r-a.x:r<a.x?s=0:s=a.width,h<a.y+a.height&&h>a.y?l=h-a.y:h<a.y?l=0:l=a.height),o===this.colorFieldRenderingContext?this.captureColorFieldColor(s,l,!1):o===this.hueSliderRenderingContext?this.captureHueSliderColor(s):o===this.opacitySliderRenderingContext&&this.captureOpacitySliderValue(s)},this.globalPointerUpHandler=e=>{if(!z(e))return;let t=this.activeCanvasInfo;this.activeCanvasInfo=null,this.drawColorControls(),t&&this.calciteColorPickerChange.emit()},this.resizeCanvas=L(e=>{if(!this.hasUpdated)return;let[t]=e,i=Math.floor(t.contentBoxSize[0].inlineSize);this.dynamicDimensions.colorField.width!==i&&(this.updateDynamicDimensions(i),this.updateCanvasSize(),this.drawColorControls())},Ce),this.updateDynamicDimensions=e=>{let t={width:he(e,this.staticDimensions,this.alphaChannel),height:this.staticDimensions.slider.height};this.dynamicDimensions={colorField:de(e),slider:t}},this.listen("keydown",this.handleChannelKeyUpOrDown,{capture:!0}),this.listen("keyup",this.handleChannelKeyUpOrDown,{capture:!0})}static{this.properties={channelMode:[16,{state:!0}],channels:[16,{state:!0}],colorFieldScopeLeft:[16,{state:!0}],colorFieldScopeTop:[16,{state:!0}],staticDimensions:[16,{state:!0}],hueScopeLeft:[16,{state:!0}],opacityScopeLeft:[16,{state:!0}],savedColors:[16,{state:!0}],scopeOrientation:[16,{state:!0}],allowEmpty:[7,{reflect:!0,type:Boolean}],alphaChannel:[5,{type:Boolean}],channelsDisabled:[5,{type:Boolean}],clearable:[7,{reflect:!0,type:Boolean}],color:[0,{attribute:!1}],disabled:[7,{reflect:!0,type:Boolean}],format:[3,{reflect:!0}],hexDisabled:[5,{type:Boolean}],messageOverrides:[0,{attribute:!1}],numberingSystem:[3,{reflect:!0}],savedDisabled:[7,{reflect:!0,type:Boolean}],scale:[3,{reflect:!0}],storageId:[3,{reflect:!0}],value:1}}static{this.styles=Ae}get baseColorFieldColor(){return this.color||this.previousColor||g}get effectiveSliderWidth(){return this.dynamicDimensions.slider.width}get color(){return this._color}set color(e){let t=this._color;this._color=e,this.handleColorChange(e,t)}get value(){return this._value}set value(e){let t=this._value;this._value=e,this.handleValueChange(e,t),this._valueWasSet=!0}async setFocus(){await te(this),ee(this.el)}connectedCallback(){super.connectedCallback(),this.observeResize()}async load(){this._valueWasSet||(this._value??=O(y(g,this.alphaChannel))),this.handleAllowEmptyOrClearableChange();let{isClearable:e,color:t,format:i,value:o}=this,a=e&&!o,s=j(o),l=a||i==="auto"&&s||i===s,r=a?null:l?S(o):t;l||this.showIncompatibleColorWarning(o,i),this.setMode(i,!1),this.internalColorSet(r,!1,"initial"),this.updateStaticDimensions(this.scale),this.updateDynamicDimensions(A[this.scale].minWidth);let h=`${T}${this.storageId}`;this.storageId&&localStorage.getItem(h)&&(this.savedColors=JSON.parse(localStorage.getItem(h)))}willUpdate(e){(e.has("allowEmpty")&&(this.hasUpdated||this.allowEmpty!==!1)||e.has("clearable")&&(this.hasUpdated||this.clearable!==!1))&&this.handleAllowEmptyOrClearableChange(),e.has("alphaChannel")&&(this.hasUpdated||this.alphaChannel!==!1)&&this.handleAlphaChannelChange(this.alphaChannel),this.hasUpdated&&(e.has("alphaChannel")&&this.alphaChannel!==!1||e.has("staticDimensions")&&this.staticDimensions!==A.m)&&this.handleAlphaChannelDimensionsChange(),(e.has("alphaChannel")&&(this.hasUpdated||this.alphaChannel!==!1)||e.has("format")&&(this.hasUpdated||this.format!=="auto"))&&this.handleFormatOrAlphaChannelChange(),e.has("scale")&&(this.hasUpdated||this.scale!=="m")&&this.handleScaleChange(this.scale)}updated(){ie(this)}loaded(){this.handleAlphaChannelDimensionsChange()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("pointermove",this.globalPointerMoveHandler),window.removeEventListener("pointerup",this.globalPointerUpHandler),this.resizeObserver?.disconnect()}observeResize(){this.resizeObserver?.observe(this.el)}handleAllowEmptyOrClearableChange(){this.isClearable=this.clearable||this.allowEmpty}handleAlphaChannelChange(e){let{format:t}=this;e&&t!=="auto"&&!D(t)&&(console.warn(`ignoring alphaChannel as the current format (${t}) does not support alpha`),this.alphaChannel=!1)}handleAlphaChannelDimensionsChange(){this.drawColorControls()}handleColorChange(e,t){this.drawColorControls(),this.updateChannelsFromColor(e),this.previousColor=t}handleFormatOrAlphaChannelChange(){this.setMode(this.format),this.internalColorSet(this.color,!1,"internal")}handleScaleChange(e="m"){this.updateStaticDimensions(e),this.updateCanvasSize(),this.drawColorControls()}handleValueChange(e,t){let{isClearable:i,format:o}=this,a=!i||e,s=!1;if(a){let d=j(e);if(!d||o!=="auto"&&d!==o){this.showIncompatibleColorWarning(e,o),this._value=t;return}s=this.mode!==d,this.setMode(d,this.internalColorUpdateContext===null)}let l=this.activeCanvasInfo;if(this.internalColorUpdateContext==="initial")return;if(this.internalColorUpdateContext==="user-interaction"){this.calciteColorPickerInput.emit(),l||this.calciteColorPickerChange.emit();return}let r=i&&!e?null:S(e!=null&&typeof e=="object"&&D(this.mode)?re(e):e),h=!W(r,this.color);(s||h)&&this.internalColorSet(r,this.alphaChannel&&!(this.mode.endsWith("a")||this.mode.endsWith("a-css"))||this.internalColorUpdateContext==="internal","internal")}handleTabActivate(e){this.channelMode=e.currentTarget.getAttribute("data-color-mode"),this.updateChannelsFromColor(this.color)}handleColorFieldScopeKeyDown(e){let{key:t}=e,i={ArrowUp:{x:0,y:-10},ArrowRight:{x:10,y:0},ArrowDown:{x:0,y:10},ArrowLeft:{x:-10,y:0}};i[t]&&(e.preventDefault(),this.scopeOrientation=t==="ArrowDown"||t==="ArrowUp"?"vertical":"horizontal",this.captureColorFieldColor(this.colorFieldScopeLeft+i[t].x||0,this.colorFieldScopeTop+i[t].y||0,!1))}handleHueScopeKeyDown(e){let t=e.shiftKey?10:1,{key:i}=e,o={ArrowUp:1,ArrowRight:1,ArrowDown:-1,ArrowLeft:-1};if(o[i]){e.preventDefault();let a=o[i]*t,s=this.baseColorFieldColor.hue(),l=this.baseColorFieldColor.hue(s+a);this.internalColorSet(l,!1)}}handleHexInputChange(e){e.stopPropagation();let{isClearable:t,color:i}=this,a=e.target.value;if(t&&!a){this.internalColorSet(null);return}let s=i&&O(y(i,D(this.mode)));a!==s&&this.internalColorSet(S(a))}handleSavedColorSelect(e){let t=e.currentTarget;this.internalColorSet(S(t.color))}handleChannelInput(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),a=i===3?b.max:this.channelMode==="rgb"?x[Object.keys(x)[i]]:p[Object.keys(p)[i]],s;if(!t.value)s="",this.isActiveChannelInputEmpty=!0,this.upOrDownArrowKeyTracker=null;else{let r=Number(t.value)+this.shiftKeyChannelAdjustment;s=pe(r,0,a).toString()}t.value=s,s!==""&&this.shiftKeyChannelAdjustment!==0?this.handleChannelChange(e):s!==""&&this.handleChannelChange(e)}handleChannelBlur(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),o=[...this.channels];!t.value&&!this.isClearable&&(t.value=o[i]?.toString())}handleChannelFocus(e){e.currentTarget.selectText()}handleChannelKeyUpOrDown(e){this.shiftKeyChannelAdjustment=0;let{key:t}=e;if(t!=="ArrowUp"&&t!=="ArrowDown"||!e.composedPath().some(a=>a.classList?.contains(n.channel)))return;let{shiftKey:i}=e;if(e.preventDefault(),!this.color){this.internalColorSet(this.previousColor),e.stopPropagation();return}let o=9;this.shiftKeyChannelAdjustment=t==="ArrowUp"&&i?o:t==="ArrowDown"&&i?-9:0,t==="ArrowUp"&&(this.upOrDownArrowKeyTracker="up"),t==="ArrowDown"&&(this.upOrDownArrowKeyTracker="down")}getChannelInputLimit(e){return this.channelMode==="rgb"?x[Object.keys(x)[e]]:p[Object.keys(p)[e]]}handleChannelChange(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),o=[...this.channels];if(this.isClearable&&!t.value){this.channels=[null,null,null,null],this.internalColorSet(null);return}let s=i===3;this.isActiveChannelInputEmpty&&this.upOrDownArrowKeyTracker&&(t.value=this.upOrDownArrowKeyTracker==="up"?(o[i]+1<=this.getChannelInputLimit(i)?o[i]+1:this.getChannelInputLimit(i)).toString():(o[i]-1>=0?o[i]-1:0).toString(),this.isActiveChannelInputEmpty=!1,this.upOrDownArrowKeyTracker=null);let l=t.value?Number(t.value):o[i];o[i]=s?H(l):l,this.updateColorFromChannels(o)}handleSavedColorKeyDown(e){se(e.key)&&(e.preventDefault(),this.handleSavedColorSelect(e))}handleColorFieldPointerDown(e){this.handleCanvasControlPointerDown(e,this.colorFieldRenderingContext,this.captureColorFieldColor,this.colorFieldScopeNode)}focusScope(e){requestAnimationFrame(()=>{e.focus()})}handleHueSliderPointerDown(e){this.handleCanvasControlPointerDown(e,this.hueSliderRenderingContext,this.captureHueSliderColor,this.hueScopeNode)}handleOpacitySliderPointerDown(e){this.handleCanvasControlPointerDown(e,this.opacitySliderRenderingContext,this.captureOpacitySliderValue,this.opacityScopeNode)}handleCanvasControlPointerDown(e,t,i,o){z(e)&&(window.addEventListener("pointermove",this.globalPointerMoveHandler),window.addEventListener("pointerup",this.globalPointerUpHandler,{once:!0}),this.activeCanvasInfo={context:t,bounds:t.canvas.getBoundingClientRect()},i.call(this,e.offsetX,e.offsetY),this.focusScope(o))}storeColorFieldScope(e){this.colorFieldScopeNode=e}storeHueScope(e){this.hueScopeNode=e}handleKeyDown(e){e.key==="Enter"&&e.preventDefault()}showIncompatibleColorWarning(e,t){console.warn(`ignoring color value (${e}) as it is not compatible with the current format (${t})`)}setMode(e,t=!0){let i=e==="auto"?this.mode:e;this.mode=this.ensureCompatibleMode(i,t)}ensureCompatibleMode(e,t){let{alphaChannel:i}=this,o=D(e);if(i&&!o){let a=ce(e);return t&&console.warn(`setting format to (${a}) as the provided one (${e}) does not support alpha`),a}if(!i&&o){let a=N(e);return t&&console.warn(`setting format to (${a}) as the provided one (${e}) does not support alpha`),a}return e}captureHueSliderColor(e){let t=E/this.effectiveSliderWidth*e;this.internalColorSet(this.baseColorFieldColor.hue(t),!1)}captureOpacitySliderValue(e){let t=H(b.max/this.effectiveSliderWidth*e);this.internalColorSet(this.baseColorFieldColor.alpha(t),!1)}internalColorSet(e,t=!0,i="user-interaction"){t&&W(e,this.color)||(this.internalColorUpdateContext=i,this.color=e,this.value=this.toValue(e),this.internalColorUpdateContext=null)}toValue(e,t=this.mode){if(!e)return null;if(t.includes("hex")){let a=t===U.HEXA;return O(y(e.round(),a),a)}if(t.includes("-css")){let a=e[t.replace("-css","").replace("a","")]().round().string();if((t.endsWith("a")||t.endsWith("a-css"))&&e.alpha()===1){let l=a.slice(0,3),r=a.slice(4,-1);return`${l}a(${r}, ${e.alpha()})`}return a}let o=e[N(t)]().round().object();return t.endsWith("a")?ne(o):o}getSliderCapSpacing(){let{staticDimensions:{slider:{height:e},thumb:{radius:t}}}=this;return t*2-e}updateStaticDimensions(e="m"){this.staticDimensions=A[e]}deleteColor(){let e=y(this.color,this.alphaChannel);if(!(this.savedColors.indexOf(e)>-1))return;let i=this.savedColors.filter(a=>a!==e);this.savedColors=i;let o=`${T}${this.storageId}`;this.storageId&&localStorage.setItem(o,JSON.stringify(i))}saveColor(){let e=y(this.color,this.alphaChannel);if(this.savedColors.indexOf(e)>-1)return;let i=[...this.savedColors,e];this.savedColors=i;let o=`${T}${this.storageId}`;this.storageId&&localStorage.setItem(o,JSON.stringify(i))}drawColorField(){let e=this.colorFieldRenderingContext,{width:t,height:i}=this.dynamicDimensions.colorField;e.fillStyle=this.baseColorFieldColor.hsv().saturationv(100).value(100).alpha(1).string(),e.fillRect(0,0,t,i);let o=e.createLinearGradient(0,0,t,0);o.addColorStop(0,"rgba(255,255,255,1)"),o.addColorStop(1,"rgba(255,255,255,0)"),e.fillStyle=o,e.fillRect(0,0,t,i);let a=e.createLinearGradient(0,0,0,i);a.addColorStop(0,"rgba(0,0,0,0)"),a.addColorStop(1,"rgba(0,0,0,1)"),e.fillStyle=a,e.fillRect(0,0,t,i),this.drawActiveColorFieldColor()}setCanvasContextSize(e,{height:t,width:i}){if(!e)return;let o=window.devicePixelRatio||1;e.width=i*o,e.height=t*o,e.style.height=`${t}px`,e.style.width=`${i}px`,e.getContext("2d").scale(o,o)}initColorField(e){e&&(this.colorFieldRenderingContext=e.getContext("2d"),this.updateCanvasSize("color-field"),this.drawColorControls())}initHueSlider(e){e&&(this.hueSliderRenderingContext=e.getContext("2d"),this.updateCanvasSize("hue-slider"),this.drawHueSlider())}initOpacitySlider(e){e&&(this.opacitySliderRenderingContext=e.getContext("2d"),this.updateCanvasSize("opacity-slider"),this.drawOpacitySlider())}updateCanvasSize(e="all"){let{dynamicDimensions:t,staticDimensions:i}=this;(e==="all"||e==="color-field")&&this.setCanvasContextSize(this.colorFieldRenderingContext?.canvas,t.colorField);let o={width:this.effectiveSliderWidth,height:i.slider.height+(i.thumb.radius-t.slider.height/2)*2};(e==="all"||e==="hue-slider")&&this.setCanvasContextSize(this.hueSliderRenderingContext?.canvas,o),(e==="all"||e==="opacity-slider")&&this.setCanvasContextSize(this.opacitySliderRenderingContext?.canvas,o)}drawActiveColorFieldColor(){let{color:e}=this;if(!e)return;let t=e.hsv(),{staticDimensions:{thumb:{radius:i}}}=this,{width:o,height:a}=this.dynamicDimensions.colorField,s=t.saturationv()/(p.s/o),l=a-t.value()/(p.v/a);requestAnimationFrame(()=>{this.colorFieldScopeLeft=s,this.colorFieldScopeTop=l}),this.drawThumb(this.colorFieldRenderingContext,i,s,l,t,!1)}drawThumb(e,t,i,o,a,s){let r=2*Math.PI,h=1;if(e.beginPath(),e.arc(i,o,t,0,r),e.fillStyle="#fff",e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=h,e.stroke(),s&&a.alpha()<1){let C=e.createPattern(this.getCheckeredBackgroundPattern(),"repeat");e.beginPath(),e.arc(i,o,t-3,0,r),e.fillStyle=C,e.fill()}e.globalCompositeOperation="source-atop",e.beginPath(),e.arc(i,o,t-3,0,r);let d=s?a.alpha():1;e.fillStyle=a.rgb().alpha(d).string(),e.fill(),e.globalCompositeOperation="source-over"}drawActiveHueSliderColor(){let{color:e}=this;if(!e)return;let t=e.hsv().saturationv(100).value(100),{staticDimensions:{thumb:{radius:i}}}=this,o=this.effectiveSliderWidth,a=t.hue()/(E/o),s=i,l=this.getSliderBoundX(a,o,i);requestAnimationFrame(()=>{this.hueScopeLeft=l}),this.drawThumb(this.hueSliderRenderingContext,i,l,s,t,!1)}drawHueSlider(){let e=this.hueSliderRenderingContext,{staticDimensions:{slider:{height:t},thumb:{radius:i}}}=this,o=0,a=i-t/2,s=this.effectiveSliderWidth,l=e.createLinearGradient(0,0,s,0),r=["red","yellow","lime","cyan","blue","magenta","#ff0004"],h=1/(r.length-1),d=0;r.forEach(C=>{l.addColorStop(d,S(C).string()),d+=h}),e.clearRect(0,0,s,t+this.getSliderCapSpacing()*2),this.drawSliderPath(e,t,s,o,a),e.fillStyle=l,e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=1,e.stroke(),this.drawActiveHueSliderColor()}drawOpacitySlider(){let e=this.opacitySliderRenderingContext,{baseColorFieldColor:t,staticDimensions:{slider:{height:i},thumb:{radius:o}}}=this,a=0,s=o-i/2,l=this.effectiveSliderWidth;e.clearRect(0,0,l,i+this.getSliderCapSpacing()*2);let r=e.createLinearGradient(0,s,l,0),h=t.rgb().alpha(0),d=t.rgb().alpha(.5),C=t.rgb().alpha(1);r.addColorStop(0,h.string()),r.addColorStop(.5,d.string()),r.addColorStop(1,C.string()),this.drawSliderPath(e,i,l,a,s);let f=e.createPattern(this.getCheckeredBackgroundPattern(),"repeat");e.fillStyle=f,e.fill(),e.fillStyle=r,e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=1,e.stroke(),this.drawActiveOpacitySliderColor()}drawSliderPath(e,t,i,o,a){let s=t/2+1;e.beginPath(),e.moveTo(o+s,a),e.lineTo(o+i-s,a),e.quadraticCurveTo(o+i,a,o+i,a+s),e.lineTo(o+i,a+t-s),e.quadraticCurveTo(o+i,a+t,o+i-s,a+t),e.lineTo(o+s,a+t),e.quadraticCurveTo(o,a+t,o,a+t-s),e.lineTo(o,a+s),e.quadraticCurveTo(o,a,o+s,a),e.closePath()}getCheckeredBackgroundPattern(){if(this.checkerPattern)return this.checkerPattern;let e=document.createElement("canvas");e.width=10,e.height=10;let t=e.getContext("2d");return t.fillStyle="#ccc",t.fillRect(0,0,10,10),t.fillStyle="#fff",t.fillRect(0,0,5,5),t.fillRect(5,5,5,5),this.checkerPattern=e,e}drawActiveOpacitySliderColor(){let{color:e}=this;if(!e)return;let t=e,{staticDimensions:{thumb:{radius:i}}}=this,o=this.effectiveSliderWidth,a=I(t.alpha())/(b.max/o),s=i,l=this.getSliderBoundX(a,o,i);requestAnimationFrame(()=>{this.opacityScopeLeft=l}),this.drawThumb(this.opacitySliderRenderingContext,i,l,s,t,!0)}getSliderBoundX(e,t,i){let o=ue(e,t,i);return o===0?e:o===-1?B(e,0,t,i,i*2):B(e,0,t,t-i*2,t-i)}storeOpacityScope(e){this.opacityScopeNode=e}handleOpacityScopeKeyDown(e){let t=e.shiftKey?10:1,{key:i}=e,o={ArrowUp:.01,ArrowRight:.01,ArrowDown:-.01,ArrowLeft:-.01};if(o[i]){e.preventDefault();let a=o[i]*t,s=this.baseColorFieldColor.alpha(),l=this.baseColorFieldColor.alpha(s+a);this.internalColorSet(l,!1)}}updateColorFromChannels(e){this.internalColorSet(S(e,this.channelMode))}updateChannelsFromColor(e){this.channels=e?this.toChannels(e):[null,null,null,null]}toChannels(e){let{channelMode:t}=this,i=e[t]().array().map((o,a)=>a===3?o:Math.floor(o));return i.length===3&&i.push(1),i}getAdjustedScopePosition(e,t){return[e-K/2,t-K/2]}render(){let{channelsDisabled:e,color:t,colorFieldScopeLeft:i,colorFieldScopeTop:o,staticDimensions:{thumb:{radius:a}},hexDisabled:s,hueScopeLeft:l,messages:r,alphaChannel:h,opacityScopeLeft:d,savedColors:C,savedDisabled:f,scale:m,scopeOrientation:k}=this,V=this.effectiveSliderWidth,X=t?y(t,h):null,fe=a,me=l??V*g.hue()/p.h,ge=a,ve=d??V*I(g.alpha())/b.max,q=t===void 0,P=k==="vertical",[Se,be]=this.getAdjustedScopePosition(i,o),[ye,we]=this.getAdjustedScopePosition(me,fe),[$e,xe]=this.getAdjustedScopePosition(ve,ge);return oe({disabled:this.disabled,children:u`<div class=${c(n.container)}><div class=${c(n.controlAndScope)}><canvas class=${c(n.colorField)} @pointerdown=${this.handleColorFieldPointerDown} ${v(this.initColorField)}></canvas><div .ariaLabel=${P?r.value:r.saturation} .ariaValueMax=${P?p.v:p.s} aria-valuemin=0 .ariaValueNow=${(P?t?.saturationv():t?.value())||"0"} class=${c({[n.scope]:!0,[n.colorFieldScope]:!0})} @keydown=${this.handleColorFieldScopeKeyDown} role=slider style=${$({top:`${be||0}px`,left:`${Se||0}px`})} tabindex=0 ${v(this.storeColorFieldScope)}></div></div><div class=${c(n.previewAndSliders)}><calcite-color-picker-swatch class=${c(n.preview)} .color=${X} .scale=${this.alphaChannel?"l":this.scale}></calcite-color-picker-swatch><div class=${c(n.sliders)}><div class=${c(n.controlAndScope)}><canvas class=${c({[n.slider]:!0,[n.hueSlider]:!0})} @pointerdown=${this.handleHueSliderPointerDown} ${v(this.initHueSlider)}></canvas><div .ariaLabel=${r.hue} .ariaValueMax=${p.h} aria-valuemin=0 .ariaValueNow=${t?.round().hue()||g.round().hue()} class=${c({[n.scope]:!0,[n.hueScope]:!0})} @keydown=${this.handleHueScopeKeyDown} role=slider style=${$({top:`${we}px`,left:`${ye}px`})} tabindex=0 ${v(this.storeHueScope)}></div></div>${h?u`<div class=${c(n.controlAndScope)}><canvas class=${c({[n.slider]:!0,[n.opacitySlider]:!0})} @pointerdown=${this.handleOpacitySliderPointerDown} ${v(this.initOpacitySlider)}></canvas><div .ariaLabel=${r.opacity} .ariaValueMax=${b.max} .ariaValueMin=${b.min} .ariaValueNow=${(t||g).round().alpha()} class=${c({[n.scope]:!0,[n.opacityScope]:!0})} @keydown=${this.handleOpacityScopeKeyDown} role=slider style=${$({top:`${xe}px`,left:`${$e}px`})} tabindex=0 ${v(this.storeOpacityScope)}></div></div>`:null}</div></div>${s&&e?null:u`<div class=${c({[n.controlSection]:!0,[n.section]:!0})}><div class=${c(n.hexAndChannelsGroup)}>${s?null:u`<div class=${c(n.hexOptions)}><calcite-color-picker-hex-input .allowEmpty=${this.isClearable} .alphaChannel=${h} class=${c(n.control)} .messages=${r} .numberingSystem=${this.numberingSystem} @calciteColorPickerHexInputChange=${this.handleHexInputChange} .scale=${m} .value=${X}></calcite-color-picker-hex-input></div>`}${e?null:u`<calcite-tabs class=${c({[n.colorModeContainer]:!0,[n.splitSection]:!0})} .scale=${m==="l"?"m":"s"}><calcite-tab-nav slot=title-group>${this.renderChannelsTabTitle("rgb")}${this.renderChannelsTabTitle("hsv")}</calcite-tab-nav>${this.renderChannelsTab("rgb")}${this.renderChannelsTab("hsv")}</calcite-tabs>`}</div></div>`}${f?null:u`<div class=${c({[n.savedColorsSection]:!0,[n.section]:!0})}><div class=${c(n.header)}><label>${r.saved}</label><div class=${c(n.savedColorsButtons)}><calcite-button appearance=transparent class=${c(n.deleteColor)} .disabled=${q} icon-start=minus kind=neutral .label=${r.deleteColor} @click=${this.deleteColor} .scale=${m} type=button></calcite-button><calcite-button appearance=transparent class=${c(n.saveColor)} .disabled=${q} icon-start=plus kind=neutral .label=${r.saveColor} @click=${this.saveColor} .scale=${m} type=button></calcite-button></div></div>${C.length>0?u`<div class=${c(n.savedColors)}>${le(C,R=>R,R=>u`<calcite-color-picker-swatch class=${c(n.savedColor)} .color=${R} @click=${this.handleSavedColorSelect} @keydown=${this.handleSavedColorKeyDown} .scale=${m} tabindex=0></calcite-color-picker-swatch>`)}</div>`:null}</div>`}</div>`})}renderChannelsTabTitle(e){let{channelMode:t,messages:i}=this,o=e===t,a=e==="rgb"?i.rgb:i.hsv;return F(e,u`<calcite-tab-title class=${c(n.colorMode)} data-color-mode=${e??w} @calciteTabsActivate=${this.handleTabActivate} .selected=${o}>${a}</calcite-tab-title>`)}renderChannelsTab(e){let{isClearable:t,channelMode:i,channels:o,messages:a,alphaChannel:s}=this,l=e===i,h=e==="rgb"?[a.red,a.green,a.blue]:[a.hue,a.saturation,a.value],d=Q(this.el),C=s?o:o.slice(0,3);return F(e,u`<calcite-tab class=${c(n.control)} .selected=${l}><div class=${c(n.channels)} dir=ltr>${C.map((f,m)=>{let k=m===3;return k&&(f=t&&!f?f:I(f)),this.renderChannel(f,m,h[m],d,k?"%":"")})}</div></calcite-tab>`)}renderChannel(e,t,i,o,a){return F(t,u`<calcite-input-number class=${c(n.channel)} data-channel-index=${t??w} dir=${o??w} .label=${i} lang=${this.messages._lang??w} number-button-type=none .numberingSystem=${this.numberingSystem} @keydown=${this.handleKeyDown} @calciteInputNumberChange=${this.handleChannelChange} @calciteInputNumberInput=${this.handleChannelInput} @calciteInternalInputNumberBlur=${this.handleChannelBlur} @calciteInternalInputNumberFocus=${this.handleChannelFocus} .scale=${this.scale==="l"?"m":"s"} style=${$({marginLeft:t>0&&!(this.scale==="s"&&this.alphaChannel&&t===3)?"-1px":""})} .suffixText=${a} .value=${e?.toString()}></calcite-input-number>`)}};J("calcite-color-picker",_);export{_ as ColorPicker};
|
|
@@ -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.2.0-next.
|
|
4
|
-
import{a as nt}from"./BIXOQRWX.js";import{a as _,b,c as q,d as G,e as Y,k as u}from"./7CQ233AJ.js";import{a as it}from"./I4FISWDK.js";import{a as Q,c as X,e as tt,g as V,h as et}from"./3VLVDWSS.js";import{c as Z,d as J,e as I}from"./7T7MTXSU.js";import{b as E,c as rt}from"./2VN3YIDH.js";import{a as K,b as W}from"./DTAEBKT4.js";import{a as P}from"./GZUOSY5I.js";import{b as R}from"./GTUVAAAD.js";import{a as j}from"./24OTRUCC.js";import{a as $,b as g}from"./U2YGN4RT.js";import{e as L,n as U,p as z,x as M}from"./LLN5DNPL.js";import{a as v,d as A}from"./POGNNNSN.js";import"./QJN3Y7KP.js";import"./R3CUJDU2.js";import{C as w,D,K as F,c as T,e as O,g as c,k as i,v as k,w as f,x as C,y as o}from"./MZMZSY5A.js";var a={loader:"loader",clearButton:"clear-button",editingEnabled:"editing-enabled",inlineChild:"inline-child",inputIcon:"icon",prefix:"prefix",suffix:"suffix",numberButtonWrapper:"number-button-wrapper",buttonItemHorizontal:"number-button-item--horizontal",wrapper:"element-wrapper",inputWrapper:"wrapper",actionWrapper:"action-wrapper",numberButtonItem:"number-button-item",hasSuffix:"has-suffix",hasPrefix:"has-prefix"},N={validationMessage:"inputValidationMessage"},at={tel:"phone",password:"lock",email:"email-address",date:"calendar",time:"clock",search:"search"},lt={action:"action"},ct=O`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block}:host([scale=s]) input,:host([scale=s]) .prefix,:host([scale=s]) .suffix{block-size:1.5rem;padding-inline:.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) input[type=file],:host([scale=s]) textarea{min-block-size:1.5rem}:host([scale=s]) .number-button-wrapper,:host([scale=s]) .action-wrapper calcite-button,:host([scale=s]) .action-wrapper calcite-button button{block-size:1.5rem}:host([scale=s]) .clear-button{min-block-size:1.5rem;min-inline-size:1.5rem}:host([scale=s]) textarea{block-size:auto;padding-block:.25rem;padding-inline:.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]) input,:host([scale=m]) .prefix,:host([scale=m]) .suffix{block-size:2rem;padding-inline:.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) textarea,:host([scale=m]) input[type=file]{min-block-size:2rem}:host([scale=m]) .number-button-wrapper,:host([scale=m]) .action-wrapper calcite-button,:host([scale=m]) .action-wrapper calcite-button button{block-size:2rem}:host([scale=m]) .clear-button{min-block-size:2rem;min-inline-size:2rem}:host([scale=m]) textarea{block-size:auto;padding-block:.5rem;padding-inline:.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) input,:host([scale=l]) .prefix,:host([scale=l]) .suffix{block-size:2.75rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) textarea,:host([scale=l]) input[type=file]{min-block-size:2.75rem}:host([scale=l]) .number-button-wrapper,:host([scale=l]) .action-wrapper calcite-button,:host([scale=l]) .action-wrapper calcite-button button{block-size:2.75rem}:host([scale=l]) .clear-button{min-block-size:2.75rem;min-inline-size:2.75rem}:host([scale=l]) textarea{block-size:auto;padding-block:.75rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([disabled]) textarea{resize:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}textarea,input{position:relative;margin:0;box-sizing:border-box;display:flex;max-block-size:100%;inline-size:100%;max-inline-size:100%;flex:1 1 0%;text-overflow:ellipsis;border-width:1px;border-style:solid;font-family:inherit;font-weight:var(--calcite-font-weight-normal);border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));background-color:var(--calcite-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-input-text-color, var(--calcite-color-text-1));transition:var(--calcite-animation-timing),block-size 0,outline-offset 0s;-webkit-appearance:none}textarea:placeholder-shown,input:placeholder-shown{text-overflow:ellipsis}textarea{border-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}input{border-start-start-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));border-start-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));border-end-start-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));border-end-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}.has-prefix input{border-start-start-radius:0;border-end-start-radius:0}.has-suffix input,.element-wrapper:has(.clear-button) input,:host([number-button-type=vertical][type=number]) input,:host([number-button-type=horizontal]) .has-suffix .suffix,:host([number-button-type=vertical][type=number]) .has-suffix .suffix,:host([number-button-type=vertical][type=number]) .clear-button,:host([number-button-type=horizontal][type=number]) .clear-button{border-start-end-radius:0;border-end-end-radius:0}:host([number-button-type=horizontal]) input{border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:0;border-end-end-radius:0}.has-prefix .prefix:first-child,:host([number-button-type=horizontal]) .number-button-item[data-adjustment=down]{border-start-start-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));border-end-start-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}.has-suffix .suffix,:host([number-button-type=vertical][type=number][read-only]) .has-suffix .suffix,:host([clearable]) .clear-button,:host([number-button-type=horizontal]) .number-button-item[data-adjustment=up]{border-end-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));border-start-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}:host([clearable]) .has-suffix .clear-button{border-end-end-radius:0;border-start-end-radius:0}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]{border-block-start-width:0px;border-end-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]{border-start-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input:focus,textarea:focus{border-color:var(--calcite-color-brand);color:var(--calcite-input-text-color, var(--calcite-color-text-1))}input[readonly],textarea[readonly]{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-input-background-color, var(--calcite-color-background))}input[readonly]:focus,textarea[readonly]:focus{color:var(--calcite-input-text-color, var(--calcite-color-text-1))}textarea,input{outline-color:transparent}textarea:focus,input:focus{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([status=invalid]) input,:host([status=invalid]) textarea{border-color:var(--calcite-color-status-danger)}:host([status=invalid]) input:focus,:host([status=invalid]) textarea:focus{outline:2px solid var(--calcite-color-status-danger);outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([scale=s]) .icon{inset-inline-start:.5rem}:host([scale=m]) .icon{inset-inline-start:.75rem}:host([scale=l]) .icon{inset-inline-start:1rem}:host([icon][scale=s]) input{padding-inline-start:2rem}:host([icon][scale=m]) input{padding-inline-start:2.5rem}:host([icon][scale=l]) input{padding-inline-start:3.5rem}.element-wrapper{position:relative;order:3;display:inline-flex;flex:1 1 0%;align-items:center}.icon{pointer-events:none;position:absolute;display:block;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;color:var(--calcite-input-icon-color, var(--calcite-color-text-3));z-index:var(--calcite-z-index)}input[type=text]::-ms-clear,input[type=text]::-ms-reveal{display:none;block-size:0px;inline-size:0px}input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration,input[type=date]::-webkit-clear-button,input[type=time]::-webkit-clear-button{display:none}.clear-button{pointer-events:initial;order:4;margin:0;box-sizing:border-box;display:flex;min-block-size:100%;cursor:pointer;align-items:center;justify-content:center;align-self:stretch;border-width:1px;border-style:solid;outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));background-color:var(--calcite-input-actions-background-color, var(--calcite-color-foreground-1));border-inline-start-width:0px}.clear-button calcite-icon{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;color:var(--calcite-input-actions-icon-color, var(--calcite-color-text-3))}.clear-button:hover{background-color:var(--calcite-input-actions-background-color-hover, var(--calcite-color-foreground-2))}.clear-button:hover calcite-icon{color:var(--calcite-input-actions-icon-color-hover, var(--calcite-color-text-1))}.clear-button:active{background-color:var(--calcite-input-actions-background-color-press, var(--calcite-color-foreground-3))}.clear-button:active calcite-icon{color:var(--calcite-input-actions-icon-color-press, var(--calcite-color-text-1))}.clear-button:focus{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.clear-button:disabled{opacity:var(--calcite-opacity-disabled)}.loader{inset-block-start:1px;inset-inline:1px;pointer-events:none;position:absolute;display:block;--calcite-progress-background-color: var(--calcite-input-loading-background-color);--calcite-progress-fill-color: var(--calcite-input-loading-fill-color)}.action-wrapper{order:7;display:flex}.prefix,.suffix{box-sizing:border-box;display:flex;block-size:auto;min-block-size:100%;-webkit-user-select:none;user-select:none;align-content:center;align-items:center;overflow-wrap:break-word;border-width:1px;border-style:solid;font-weight:var(--calcite-font-weight-medium);line-height:1;border-color:var(--calcite-input-border-color, var(--calcite-color-border-input))}.prefix{order:2;border-inline-end-width:0px;inline-size:var(--calcite-input-prefix-size, auto);background-color:var(--calcite-input-prefix-background-color, var(--calcite-color-background));color:var(--calcite-input-prefix-text-color, var(--calcite-color-text-2))}.suffix{order:5;border-inline-start-width:0px;inline-size:var(--calcite-input-suffix-size, auto);background-color:var(--calcite-input-suffix-background-color, var(--calcite-color-background));color:var(--calcite-input-suffix-text-color, var(--calcite-color-text-2))}:host([alignment=start]) textarea,:host([alignment=start]) input{text-align:start}:host([alignment=end]) textarea,:host([alignment=end]) input{text-align:end}input[type=number]{-moz-appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:textfield;margin:0}.number-button-wrapper{pointer-events:none;order:6;box-sizing:border-box;display:flex;flex-direction:column;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}:host([number-button-type=vertical]) .wrapper{flex-direction:row;display:flex}:host([number-button-type=vertical]) input,:host([number-button-type=vertical]) textarea{order:2}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=down] calcite-icon{transform:rotate(-90deg)}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=up] calcite-icon{transform:rotate(-90deg)}.number-button-item.number-button-item--horizontal{border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));order:1;max-block-size:100%;min-block-size:100%;align-self:stretch;border-width:1px;border-style:solid}.number-button-item.number-button-item--horizontal[data-adjustment=down] calcite-icon,.number-button-item.number-button-item--horizontal[data-adjustment=up] calcite-icon{transform:rotate(90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down]{border-inline-end-width:0px}.number-button-item.number-button-item--horizontal[data-adjustment=up]{border-inline-start-width:0px;order:5}.number-button-item{max-block-size:50%;min-block-size:50%;pointer-events:initial;margin:0;box-sizing:border-box;display:flex;cursor:pointer;align-items:center;align-self:center;border-width:1px;border-style:solid;background-color:var(--calcite-color-foreground-1);padding-block:0px;padding-inline:.5rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));background-color:var(--calcite-input-actions-background-color, var(--calcite-color-foreground-1));border-inline-start-width:0px}.number-button-item calcite-icon{pointer-events:none;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;color:var(--calcite-input-actions-icon-color, var(--calcite-color-text-3))}.number-button-item:hover{background-color:var(--calcite-input-actions-background-color-hover, var(--calcite-color-foreground-2))}.number-button-item:hover calcite-icon{color:var(--calcite-input-actions-icon-color-hover, var(--calcite-color-text-1))}.number-button-item:active{background-color:var(--calcite-input-actions-background-color-press, var(--calcite-color-foreground-3))}.number-button-item:active calcite-icon{color:var(--calcite-input-actions-icon-color-press, var(--calcite-color-text-1))}.number-button-item:disabled{pointer-events:none}.wrapper{position:relative;display:flex;flex-direction:row;align-items:center;border-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));box-shadow:var(--calcite-input-shadow, var(--calcite-shadow-none))}input[type=date]::-webkit-input-placeholder{visibility:hidden!important}:host([type=color]) input{padding:.25rem}:host([type=file]) input{cursor:pointer;border-width:1px;border-style:dashed;background-color:var(--calcite-color-foreground-1);text-align:center;border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));block-size:initial}:host([type=file][scale=s]) input{padding-block:1px;padding-inline:.5rem}:host([type=file][scale=m]) input{padding-block:.25rem;padding-inline:.75rem}:host([type=file][scale=l]) input{padding-block:.5rem;padding-inline:1rem}:host(.no-bottom-border) input{border-block-end-width:0px}:host(.border-top-color-one) input{border-block-start-color:var(--calcite-color-border-1)}input.inline-child{background-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}input.inline-child .editing-enabled{background-color:inherit}input.inline-child:not(.editing-enabled){display:flex;cursor:pointer;text-overflow:ellipsis;border-color:transparent;padding-inline-start:0}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,B=class extends C{constructor(){super(),this.actionWrapperEl=$(),this.attributeWatch=T(["autofocus","enterkeyhint","inputmode","spellcheck"],this.handleGlobalAttributesChanged),this.childElType="input",this.inputWrapperEl=$(),this.onHiddenFormInputInput=t=>{t.target.name===this.name&&this.setValue({value:t.target.value,origin:"direct"}),this.setFocus(),t.stopPropagation()},this.previousValueOrigin="initial",this.userChangedValue=!1,this._value="",this.slottedActionElDisabledInternally=!1,this.alignment="start",this.clearable=!1,this.disabled=!1,this.editingEnabled=!1,this.groupSeparator=!1,this.iconFlipRtl=!1,this.loading=!1,this.localeFormat=!1,this.messages=j(),this.multiple=!1,this.numberButtonType="vertical",this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.type="text",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.calciteInputChange=f({cancelable:!1}),this.calciteInputInput=f(),this.calciteInternalInputBlur=f({cancelable:!1}),this.calciteInternalInputFocus=f({cancelable:!1}),this.listen("click",this.clickHandler),this.listen("keydown",this.keyDownHandler)}static{this.properties={displayedValue:[16,{state:!0}],slottedActionElDisabledInternally:[16,{state:!0}],accept:1,alignment:[3,{reflect:!0}],autocomplete:[0,{attribute:!1}],clearable:[7,{reflect:!0,type:Boolean}],disabled:[7,{reflect:!0,type:Boolean}],editingEnabled:[7,{reflect:!0,type:Boolean}],files:[0,{attribute:!1}],form:[3,{reflect:!0}],groupSeparator:[7,{reflect:!0,type:Boolean}],icon:[3,{reflect:!0,converter:w}],iconFlipRtl:[7,{reflect:!0,type:Boolean}],label:1,loading:[7,{reflect:!0,type:Boolean}],localeFormat:[5,{type:Boolean}],max:[11,{reflect:!0,type:Number}],maxLength:[11,{reflect:!0,type:Number}],messageOverrides:[0,{attribute:!1}],min:[11,{reflect:!0,type:Number}],minLength:[11,{reflect:!0,type:Number}],multiple:[5,{type:Boolean}],name:[3,{reflect:!0}],numberButtonType:[3,{reflect:!0}],numberingSystem:[3,{reflect:!0}],pattern:1,placeholder:1,prefixText:1,readOnly:[7,{reflect:!0,type:Boolean}],required:[7,{reflect:!0,type:Boolean}],scale:[3,{reflect:!0}],status:[3,{reflect:!0}],step:[3,{reflect:!0}],suffixText:1,type:[3,{reflect:!0}],validationIcon:[3,{reflect:!0,converter:w}],validationMessage:1,validity:[0,{attribute:!1}],value:1}}static{this.styles=ct}get isClearable(){return!this.isTextarea&&(this.clearable||this.type==="search")&&this.value?.length>0}get isTextarea(){return this.childElType==="textarea"}get value(){return this._value}set value(t){let e=this._value;t!==e&&(this._value=t,this.valueWatcher(t,e),t&&this._value===""&&this.setValue({origin:"reset",value:e}))}async selectText(){this.type==="number"?this.childNumberEl?.select():this.childEl?.select()}async setFocus(){await A(this),U(this.type==="number"?this.childNumberEl:this.childEl)}connectedCallback(){super.connectedCallback(),this.inlineEditableEl=this.el.closest("calcite-inline-editable"),this.inlineEditableEl&&(this.editingEnabled=this.inlineEditableEl.editingEnabled||!1),Z(this),X(this),this.el.addEventListener(V,this.onHiddenFormInputInput)}async load(){this.childElType=this.type==="textarea"?"textarea":"input",this.maxString=this.max?.toString(),this.minString=this.min?.toString(),this.requestedIcon=z(at,this.icon,this.type),this.setPreviousEmittedValue(this.value),this.setPreviousValue(this.value),this.type==="number"&&(this.value==="Infinity"||this.value==="-Infinity"?(this.displayedValue=this.value,this.previousEmittedValue=this.value):(this.warnAboutInvalidNumberValue(this.value),this.setValue({origin:"connected",value:b(this.value)?this.value:""})))}willUpdate(t){t.has("max")&&(this.maxString=this.max?.toString()||null),t.has("min")&&(this.minString=this.min?.toString()||null),(t.has("icon")||t.has("type")&&(this.hasUpdated||this.type!=="text"))&&(this.requestedIcon=z(at,this.icon,this.type))}updated(){K(this)}disconnectedCallback(){super.disconnectedCallback(),J(this),tt(this),this.el.removeEventListener(V,this.onHiddenFormInputInput)}handleGlobalAttributesChanged(){this.requestUpdate()}valueWatcher(t,e){if(!this.userChangedValue){if(this.type==="number"&&(t==="Infinity"||t==="-Infinity")){this.displayedValue=t,this.previousEmittedValue=t;return}this.setValue({origin:"direct",previousValue:e,value:t==null||t==""?"":this.type==="number"?b(t)?t:this.previousValue||"":t}),this.warnAboutInvalidNumberValue(t)}this.userChangedValue=!1}keyDownHandler(t){this.readOnly||this.disabled||t.defaultPrevented||(this.isClearable&&t.key==="Escape"&&(this.clearInputValue(t),t.preventDefault()),t.key==="Enter"&&Q(this)&&t.preventDefault())}onLabelClick(){this.setFocus()}incrementOrDecrementNumberValue(t,e,r,d){let{value:n}=this;if(n==="Infinity"||n==="-Infinity")return;let s=t==="up"?1:-1,p=this.step==="any"?1:Math.abs(this.step||1),l=new _(n!==""?n:"0").add(`${p*s}`),h=()=>typeof r=="number"&&!isNaN(r)&&l.subtract(`${r}`).isNegative,y=()=>typeof e=="number"&&!isNaN(e)&&!l.subtract(`${e}`).isNegative,x=h()?`${r}`:y()?`${e}`:l.toString();this.setValue({committing:!0,nativeEvent:d,origin:"user",value:x})}clearInputValue(t){this.setValue({committing:!0,nativeEvent:t,origin:"user",value:""})}emitChangeIfUserModified(){this.previousValueOrigin==="user"&&this.value!==this.previousEmittedValue&&(this.calciteInputChange.emit(),this.setPreviousEmittedValue(this.value))}inputBlurHandler(){window.clearInterval(this.nudgeNumberValueIntervalId),this.calciteInternalInputBlur.emit(),this.emitChangeIfUserModified()}clickHandler(t){if(this.disabled)return;let e=t.composedPath();!e.includes(this.inputWrapperEl.value)||e.includes(this.actionWrapperEl.value)||this.setFocus()}inputFocusHandler(){this.calciteInternalInputFocus.emit()}inputInputHandler(t){this.disabled||this.readOnly||(this.type==="file"&&(this.files=this.childEl.files),this.setValue({nativeEvent:t,origin:"user",value:t.target.value}))}inputKeyDownHandler(t){this.disabled||this.readOnly||t.key==="Enter"&&this.emitChangeIfUserModified()}inputNumberInputHandler(t){if(this.disabled||this.readOnly||this.value==="Infinity"||this.value==="-Infinity")return;let e=t.target.value;u.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator};let r=u.delocalize(e);t.inputType==="insertFromPaste"?(b(r)||t.preventDefault(),this.setValue({nativeEvent:t,origin:"user",value:q(r)}),this.childNumberEl.value=this.displayedValue):this.setValue({nativeEvent:t,origin:"user",value:r})}inputNumberKeyDownHandler(t){if(this.type!=="number"||this.disabled||this.readOnly)return;if(this.value==="Infinity"||this.value==="-Infinity"){t.preventDefault(),(t.key==="Backspace"||t.key==="Delete")&&this.clearInputValue(t);return}if(t.key==="ArrowUp"){t.preventDefault(),this.nudgeNumberValue("up",t);return}if(t.key==="ArrowDown"){this.nudgeNumberValue("down",t);return}let e=[...R,"ArrowLeft","ArrowRight","Backspace","Delete","Enter","Escape","Tab"];if(t.altKey||t.ctrlKey||t.metaKey)return;let r=t.shiftKey&&t.key==="Tab";if(e.includes(t.key)||r){t.key==="Enter"&&this.emitChangeIfUserModified();return}u.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},!(t.key===u.decimal&&(!this.value&&!this.childNumberEl.value||this.value&&this.childNumberEl.value.indexOf(u.decimal)===-1))&&(/[eE]/.test(t.key)&&(!this.value&&!this.childNumberEl.value||this.value&&!/[eE]/.test(this.childNumberEl.value))||t.key==="-"&&(!this.value&&!this.childNumberEl.value||this.value&&this.childNumberEl.value.split("-").length<=2)||t.preventDefault())}nudgeNumberValue(t,e){if(e instanceof KeyboardEvent&&e.repeat||this.type!=="number")return;let r=this.maxString?parseFloat(this.maxString):null,d=this.minString?parseFloat(this.minString):null,n=150;this.incrementOrDecrementNumberValue(t,r,d,e),this.nudgeNumberValueIntervalId&&window.clearInterval(this.nudgeNumberValueIntervalId);let s=!0;this.nudgeNumberValueIntervalId=window.setInterval(()=>{if(s){s=!1;return}this.incrementOrDecrementNumberValue(t,r,d,e)},n)}numberButtonPointerUpAndOutHandler(){window.clearInterval(this.nudgeNumberValueIntervalId)}numberButtonPointerDownHandler(t){if(!M(t))return;t.preventDefault();let e=t.target.dataset.adjustment;this.disabled||this.nudgeNumberValue(e,t)}syncHiddenFormInput(t){nt(this.type,this,t)}setChildElRef(t){this.childEl=t}setChildNumberElRef(t){this.childNumberEl=t}setInputValue(t){this.type==="number"&&this.childNumberEl?this.childNumberEl.value=t:this.childEl&&(this.childEl.value=t)}setPreviousEmittedValue(t){this.previousEmittedValue=this.normalizeValue(t)}normalizeValue(t){return this.type==="number"?b(t)?t:"":t}setPreviousValue(t){this.previousValue=this.normalizeValue(t)}setValue({committing:t=!1,nativeEvent:e,origin:r,previousValue:d,value:n}){if(this.setPreviousValue(d??this.value),this.previousValueOrigin=r,this.type==="number"){u.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator,signDisplay:"never"};let s=this.previousValue?.length>n.length||this.value?.length>n.length,p=n.charAt(n.length-1)===".",m=p&&s?n:G(n),l=n&&!m?b(this.previousValue)?this.previousValue:"":m,h=u.localize(l);r!=="connected"&&!p&&(h=Y(h,l,u)),this.displayedValue=p&&s?`${h}${u.decimal}`:h,this.userChangedValue=r==="user"&&this.value!==l,this.value=["-","."].includes(l)?"":l}else this.userChangedValue=r==="user"&&this.value!==n,this.value=n;r==="direct"&&(this.setInputValue(n),this.previousEmittedValue=n),e&&(this.calciteInputInput.emit().defaultPrevented?(this.value=this.previousValue,this.displayedValue=this.type==="number"?u.localize(this.previousValue):this.previousValue):t&&this.emitChangeIfUserModified())}inputKeyUpHandler(){window.clearInterval(this.nudgeNumberValueIntervalId)}warnAboutInvalidNumberValue(t){this.type==="number"&&t&&!b(t)&&console.warn(`The specified value "${t}" cannot be parsed, or is out of range.`)}render(){let t=L(this.el),e=c`<div class=${o(a.loader)}><calcite-progress .label=${this.messages.loading} type=indeterminate></calcite-progress></div>`,r=c`<button .ariaLabel=${this.messages.clear} class=${o(a.clearButton)} .disabled=${this.disabled||this.readOnly} @click=${this.clearInputValue} tabindex=-1 type=button><calcite-icon icon=x .scale=${v(this.scale)}></calcite-icon></button>`,d=c`<calcite-icon class=${o(a.inputIcon)} .flipRtl=${this.iconFlipRtl} .icon=${this.requestedIcon} .scale=${v(this.scale)}></calcite-icon>`,n=this.numberButtonType==="horizontal",s=c`<button aria-hidden=true class=${o({[a.numberButtonItem]:!0,[a.buttonItemHorizontal]:n})} data-adjustment=up .disabled=${this.disabled||this.readOnly} @pointerdown=${this.numberButtonPointerDownHandler} @pointerout=${this.numberButtonPointerUpAndOutHandler} @pointerup=${this.numberButtonPointerUpAndOutHandler} tabindex=-1 type=button><calcite-icon icon=chevron-up .scale=${v(this.scale)}></calcite-icon></button>`,p=c`<button aria-hidden=true class=${o({[a.numberButtonItem]:!0,[a.buttonItemHorizontal]:n})} data-adjustment=down .disabled=${this.disabled||this.readOnly} @pointerdown=${this.numberButtonPointerDownHandler} @pointerout=${this.numberButtonPointerUpAndOutHandler} @pointerup=${this.numberButtonPointerUpAndOutHandler} tabindex=-1 type=button><calcite-icon icon=chevron-down .scale=${v(this.scale)}></calcite-icon></button>`,m=c`<div class=${o(a.numberButtonWrapper)}>${s}${p}</div>`,l=c`<div class=${o(a.prefix)}>${this.prefixText}</div>`,h=c`<div class=${o(a.suffix)}>${this.suffixText}</div>`,y=this.el.autofocus,x=this.el.enterKeyHint,H=this.el.inputMode,ot=this.type==="number"?P("localized-input",c`<input accept=${this.accept??i} aria-errormessage=${N.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${I(this)} autocomplete=${this.autocomplete??i} .autofocus=${y} value=${this.defaultValue??i} .disabled=${this.disabled?!0:null} enterkeyhint=${x??i} inputmode=${H??i} maxlength=${this.maxLength??i} minlength=${this.minLength??i} .multiple=${this.multiple} name=${i} @blur=${this.inputBlurHandler} @focus=${this.inputFocusHandler} @input=${this.inputNumberInputHandler} @keydown=${this.inputNumberKeyDownHandler} @keyup=${this.inputKeyUpHandler} pattern=${this.pattern??i} placeholder=${(this.placeholder||"")??i} .readOnly=${this.readOnly} type=text .value=${k(this.displayedValue??"")} ${g(this.setChildNumberElRef)}>`):null,S=this.childElType==="input"?E`input`:E`textarea`,st=this.type!=="number"?rt`<${S} accept=${this.accept??i} aria-errormessage=${N.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${I(this)} autocomplete=${this.autocomplete??i} .autofocus=${y} class=${o({[a.editingEnabled]:this.editingEnabled,[a.inlineChild]:!!this.inlineEditableEl})} .defaultValue=${this.defaultValue??""} .disabled=${this.disabled?!0:null} enterkeyhint=${x??i} inputmode=${H??i} max=${this.maxString??i} maxlength=${this.maxLength??i} min=${this.minString??i} minlength=${this.minLength??i} .multiple=${this.multiple} name=${this.name??i} @blur=${this.inputBlurHandler} @focus=${this.inputFocusHandler} @input=${this.inputInputHandler} @keydown=${this.inputKeyDownHandler} @keyup=${this.inputKeyUpHandler} pattern=${this.pattern??i} placeholder=${(this.placeholder||"")??i} .readOnly=${this.readOnly} .required=${this.required?!0:null} spellcheck=${this.el.spellcheck??i} step=${this.step??i} tabindex=${(this.disabled||this.inlineEditableEl&&!this.editingEnabled?-1:null)??i} type=${this.type??i} .value=${k(this.value??"")} ${g(this.setChildElRef)}></${S}>`:null;return W({disabled:this.disabled,children:c`<div class=${o({[a.inputWrapper]:!0,[D.rtl]:t==="rtl",[a.hasSuffix]:this.suffixText,[a.hasPrefix]:this.prefixText})} ${g(this.inputWrapperEl)}>${this.type==="number"&&this.numberButtonType==="horizontal"&&!this.readOnly?p:null}${this.prefixText?l:null}<div class=${o(a.wrapper)}>${ot}${st}${this.isClearable?r:null}${this.requestedIcon?d:null}${this.loading?e:null}</div><div class=${o(a.actionWrapper)} ${g(this.actionWrapperEl)}><slot name=${lt.action}></slot></div>${this.type==="number"&&this.numberButtonType==="vertical"&&!this.readOnly?m:null}${this.suffixText?h:null}${this.type==="number"&&this.numberButtonType==="horizontal"&&!this.readOnly?s:null}${et({component:this})}</div>${this.validationMessage&&this.status==="invalid"?it({icon:this.validationIcon,id:N.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};F("calcite-input",B);export{B as Input};
|
|
3
|
+
v3.2.0-next.40 */
|
|
4
|
+
import{a as nt}from"./RZQCIIVR.js";import{a as _,b,c as q,d as G,e as Y,k as u}from"./XZK2I4C2.js";import{a as it}from"./5K3GZOWW.js";import{a as Q,c as X,e as tt,g as V,h as et}from"./4KFIUD2B.js";import{c as Z,d as J,e as I}from"./FR4VAYJC.js";import{b as E,c as rt}from"./DNYNDPB5.js";import{a as K,b as W}from"./KOH7CJJ2.js";import{a as P}from"./PNGIMH3C.js";import{b as R}from"./VIJYQUPS.js";import{a as j}from"./7EKOSZOZ.js";import{a as $,b as g}from"./6P5PSH65.js";import{e as L,n as U,p as z,x as M}from"./4JEZM6VX.js";import{a as v,d as A}from"./VOMFC6A5.js";import"./PB3OJ43M.js";import"./6DCGXB5R.js";import{C as w,D,K as F,c as T,e as O,g as c,k as i,v as k,w as f,x as C,y as o}from"./EYWRTO2E.js";var a={loader:"loader",clearButton:"clear-button",editingEnabled:"editing-enabled",inlineChild:"inline-child",inputIcon:"icon",prefix:"prefix",suffix:"suffix",numberButtonWrapper:"number-button-wrapper",buttonItemHorizontal:"number-button-item--horizontal",wrapper:"element-wrapper",inputWrapper:"wrapper",actionWrapper:"action-wrapper",numberButtonItem:"number-button-item",hasSuffix:"has-suffix",hasPrefix:"has-prefix"},N={validationMessage:"inputValidationMessage"},at={tel:"phone",password:"lock",email:"email-address",date:"calendar",time:"clock",search:"search"},lt={action:"action"},ct=O`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block}:host([scale=s]) input,:host([scale=s]) .prefix,:host([scale=s]) .suffix{block-size:1.5rem;padding-inline:.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) input[type=file],:host([scale=s]) textarea{min-block-size:1.5rem}:host([scale=s]) .number-button-wrapper,:host([scale=s]) .action-wrapper calcite-button,:host([scale=s]) .action-wrapper calcite-button button{block-size:1.5rem}:host([scale=s]) .clear-button{min-block-size:1.5rem;min-inline-size:1.5rem}:host([scale=s]) textarea{block-size:auto;padding-block:.25rem;padding-inline:.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]) input,:host([scale=m]) .prefix,:host([scale=m]) .suffix{block-size:2rem;padding-inline:.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) textarea,:host([scale=m]) input[type=file]{min-block-size:2rem}:host([scale=m]) .number-button-wrapper,:host([scale=m]) .action-wrapper calcite-button,:host([scale=m]) .action-wrapper calcite-button button{block-size:2rem}:host([scale=m]) .clear-button{min-block-size:2rem;min-inline-size:2rem}:host([scale=m]) textarea{block-size:auto;padding-block:.5rem;padding-inline:.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) input,:host([scale=l]) .prefix,:host([scale=l]) .suffix{block-size:2.75rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) textarea,:host([scale=l]) input[type=file]{min-block-size:2.75rem}:host([scale=l]) .number-button-wrapper,:host([scale=l]) .action-wrapper calcite-button,:host([scale=l]) .action-wrapper calcite-button button{block-size:2.75rem}:host([scale=l]) .clear-button{min-block-size:2.75rem;min-inline-size:2.75rem}:host([scale=l]) textarea{block-size:auto;padding-block:.75rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([disabled]) textarea{resize:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}textarea,input{position:relative;margin:0;box-sizing:border-box;display:flex;max-block-size:100%;inline-size:100%;max-inline-size:100%;flex:1 1 0%;text-overflow:ellipsis;border-width:1px;border-style:solid;font-family:inherit;font-weight:var(--calcite-font-weight-normal);border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));background-color:var(--calcite-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-input-text-color, var(--calcite-color-text-1));transition:var(--calcite-animation-timing),block-size 0,outline-offset 0s;-webkit-appearance:none}textarea:placeholder-shown,input:placeholder-shown{text-overflow:ellipsis}textarea{border-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}input{border-start-start-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));border-start-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));border-end-start-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));border-end-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}.has-prefix input{border-start-start-radius:0;border-end-start-radius:0}.has-suffix input,.element-wrapper:has(.clear-button) input,:host([number-button-type=vertical][type=number]) input,:host([number-button-type=horizontal]) .has-suffix .suffix,:host([number-button-type=vertical][type=number]) .has-suffix .suffix,:host([number-button-type=vertical][type=number]) .clear-button,:host([number-button-type=horizontal][type=number]) .clear-button{border-start-end-radius:0;border-end-end-radius:0}:host([number-button-type=horizontal]) input{border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:0;border-end-end-radius:0}.has-prefix .prefix:first-child,:host([number-button-type=horizontal]) .number-button-item[data-adjustment=down]{border-start-start-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));border-end-start-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}.has-suffix .suffix,:host([number-button-type=vertical][type=number][read-only]) .has-suffix .suffix,:host([clearable]) .clear-button,:host([number-button-type=horizontal]) .number-button-item[data-adjustment=up]{border-end-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));border-start-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}:host([clearable]) .has-suffix .clear-button{border-end-end-radius:0;border-start-end-radius:0}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]{border-block-start-width:0px;border-end-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]{border-start-end-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp))}input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input:focus,textarea:focus{border-color:var(--calcite-color-brand);color:var(--calcite-input-text-color, var(--calcite-color-text-1))}input[readonly],textarea[readonly]{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-input-background-color, var(--calcite-color-background))}input[readonly]:focus,textarea[readonly]:focus{color:var(--calcite-input-text-color, var(--calcite-color-text-1))}textarea,input{outline-color:transparent}textarea:focus,input:focus{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([status=invalid]) input,:host([status=invalid]) textarea{border-color:var(--calcite-color-status-danger)}:host([status=invalid]) input:focus,:host([status=invalid]) textarea:focus{outline:2px solid var(--calcite-color-status-danger);outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([scale=s]) .icon{inset-inline-start:.5rem}:host([scale=m]) .icon{inset-inline-start:.75rem}:host([scale=l]) .icon{inset-inline-start:1rem}:host([icon][scale=s]) input{padding-inline-start:2rem}:host([icon][scale=m]) input{padding-inline-start:2.5rem}:host([icon][scale=l]) input{padding-inline-start:3.5rem}.element-wrapper{position:relative;order:3;display:inline-flex;flex:1 1 0%;align-items:center}.icon{pointer-events:none;position:absolute;display:block;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;color:var(--calcite-input-icon-color, var(--calcite-color-text-3));z-index:var(--calcite-z-index)}input[type=text]::-ms-clear,input[type=text]::-ms-reveal{display:none;block-size:0px;inline-size:0px}input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration,input[type=date]::-webkit-clear-button,input[type=time]::-webkit-clear-button{display:none}.clear-button{pointer-events:initial;order:4;margin:0;box-sizing:border-box;display:flex;min-block-size:100%;cursor:pointer;align-items:center;justify-content:center;align-self:stretch;border-width:1px;border-style:solid;outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));background-color:var(--calcite-input-actions-background-color, var(--calcite-color-foreground-1));border-inline-start-width:0px}.clear-button calcite-icon{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;color:var(--calcite-input-actions-icon-color, var(--calcite-color-text-3))}.clear-button:hover{background-color:var(--calcite-input-actions-background-color-hover, var(--calcite-color-foreground-2))}.clear-button:hover calcite-icon{color:var(--calcite-input-actions-icon-color-hover, var(--calcite-color-text-1))}.clear-button:active{background-color:var(--calcite-input-actions-background-color-press, var(--calcite-color-foreground-3))}.clear-button:active calcite-icon{color:var(--calcite-input-actions-icon-color-press, var(--calcite-color-text-1))}.clear-button:focus{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.clear-button:disabled{opacity:var(--calcite-opacity-disabled)}.loader{inset-block-start:1px;inset-inline:1px;pointer-events:none;position:absolute;display:block;--calcite-progress-background-color: var(--calcite-input-loading-background-color);--calcite-progress-fill-color: var(--calcite-input-loading-fill-color)}.action-wrapper{order:7;display:flex}.prefix,.suffix{box-sizing:border-box;display:flex;block-size:auto;min-block-size:100%;-webkit-user-select:none;user-select:none;align-content:center;align-items:center;overflow-wrap:break-word;border-width:1px;border-style:solid;font-weight:var(--calcite-font-weight-medium);line-height:1;border-color:var(--calcite-input-border-color, var(--calcite-color-border-input))}.prefix{order:2;border-inline-end-width:0px;inline-size:var(--calcite-input-prefix-size, auto);background-color:var(--calcite-input-prefix-background-color, var(--calcite-color-background));color:var(--calcite-input-prefix-text-color, var(--calcite-color-text-2))}.suffix{order:5;border-inline-start-width:0px;inline-size:var(--calcite-input-suffix-size, auto);background-color:var(--calcite-input-suffix-background-color, var(--calcite-color-background));color:var(--calcite-input-suffix-text-color, var(--calcite-color-text-2))}:host([alignment=start]) textarea,:host([alignment=start]) input{text-align:start}:host([alignment=end]) textarea,:host([alignment=end]) input{text-align:end}input[type=number]{-moz-appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:textfield;margin:0}.number-button-wrapper{pointer-events:none;order:6;box-sizing:border-box;display:flex;flex-direction:column;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}:host([number-button-type=vertical]) .wrapper{flex-direction:row;display:flex}:host([number-button-type=vertical]) input,:host([number-button-type=vertical]) textarea{order:2}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=down] calcite-icon{transform:rotate(-90deg)}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=up] calcite-icon{transform:rotate(-90deg)}.number-button-item.number-button-item--horizontal{border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));order:1;max-block-size:100%;min-block-size:100%;align-self:stretch;border-width:1px;border-style:solid}.number-button-item.number-button-item--horizontal[data-adjustment=down] calcite-icon,.number-button-item.number-button-item--horizontal[data-adjustment=up] calcite-icon{transform:rotate(90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down]{border-inline-end-width:0px}.number-button-item.number-button-item--horizontal[data-adjustment=up]{border-inline-start-width:0px;order:5}.number-button-item{max-block-size:50%;min-block-size:50%;pointer-events:initial;margin:0;box-sizing:border-box;display:flex;cursor:pointer;align-items:center;align-self:center;border-width:1px;border-style:solid;background-color:var(--calcite-color-foreground-1);padding-block:0px;padding-inline:.5rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));background-color:var(--calcite-input-actions-background-color, var(--calcite-color-foreground-1));border-inline-start-width:0px}.number-button-item calcite-icon{pointer-events:none;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;color:var(--calcite-input-actions-icon-color, var(--calcite-color-text-3))}.number-button-item:hover{background-color:var(--calcite-input-actions-background-color-hover, var(--calcite-color-foreground-2))}.number-button-item:hover calcite-icon{color:var(--calcite-input-actions-icon-color-hover, var(--calcite-color-text-1))}.number-button-item:active{background-color:var(--calcite-input-actions-background-color-press, var(--calcite-color-foreground-3))}.number-button-item:active calcite-icon{color:var(--calcite-input-actions-icon-color-press, var(--calcite-color-text-1))}.number-button-item:disabled{pointer-events:none}.wrapper{position:relative;display:flex;flex-direction:row;align-items:center;border-radius:var(--calcite-input-corner-radius, var(--calcite-corner-radius-sharp));box-shadow:var(--calcite-input-shadow, var(--calcite-shadow-none))}input[type=date]::-webkit-input-placeholder{visibility:hidden!important}:host([type=color]) input{padding:.25rem}:host([type=file]) input{cursor:pointer;border-width:1px;border-style:dashed;background-color:var(--calcite-color-foreground-1);text-align:center;border-color:var(--calcite-input-border-color, var(--calcite-color-border-input));block-size:initial}:host([type=file][scale=s]) input{padding-block:1px;padding-inline:.5rem}:host([type=file][scale=m]) input{padding-block:.25rem;padding-inline:.75rem}:host([type=file][scale=l]) input{padding-block:.5rem;padding-inline:1rem}:host(.no-bottom-border) input{border-block-end-width:0px}:host(.border-top-color-one) input{border-block-start-color:var(--calcite-color-border-1)}input.inline-child{background-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}input.inline-child .editing-enabled{background-color:inherit}input.inline-child:not(.editing-enabled){display:flex;cursor:pointer;text-overflow:ellipsis;border-color:transparent;padding-inline-start:0}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,B=class extends C{constructor(){super(),this.actionWrapperEl=$(),this.attributeWatch=T(["autofocus","enterkeyhint","inputmode","spellcheck"],this.handleGlobalAttributesChanged),this.childElType="input",this.inputWrapperEl=$(),this.onHiddenFormInputInput=t=>{t.target.name===this.name&&this.setValue({value:t.target.value,origin:"direct"}),this.setFocus(),t.stopPropagation()},this.previousValueOrigin="initial",this.userChangedValue=!1,this._value="",this.slottedActionElDisabledInternally=!1,this.alignment="start",this.clearable=!1,this.disabled=!1,this.editingEnabled=!1,this.groupSeparator=!1,this.iconFlipRtl=!1,this.loading=!1,this.localeFormat=!1,this.messages=j(),this.multiple=!1,this.numberButtonType="vertical",this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.type="text",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.calciteInputChange=f({cancelable:!1}),this.calciteInputInput=f(),this.calciteInternalInputBlur=f({cancelable:!1}),this.calciteInternalInputFocus=f({cancelable:!1}),this.listen("click",this.clickHandler),this.listen("keydown",this.keyDownHandler)}static{this.properties={displayedValue:[16,{state:!0}],slottedActionElDisabledInternally:[16,{state:!0}],accept:1,alignment:[3,{reflect:!0}],autocomplete:[0,{attribute:!1}],clearable:[7,{reflect:!0,type:Boolean}],disabled:[7,{reflect:!0,type:Boolean}],editingEnabled:[7,{reflect:!0,type:Boolean}],files:[0,{attribute:!1}],form:[3,{reflect:!0}],groupSeparator:[7,{reflect:!0,type:Boolean}],icon:[3,{reflect:!0,converter:w}],iconFlipRtl:[7,{reflect:!0,type:Boolean}],label:1,loading:[7,{reflect:!0,type:Boolean}],localeFormat:[5,{type:Boolean}],max:[11,{reflect:!0,type:Number}],maxLength:[11,{reflect:!0,type:Number}],messageOverrides:[0,{attribute:!1}],min:[11,{reflect:!0,type:Number}],minLength:[11,{reflect:!0,type:Number}],multiple:[5,{type:Boolean}],name:[3,{reflect:!0}],numberButtonType:[3,{reflect:!0}],numberingSystem:[3,{reflect:!0}],pattern:1,placeholder:1,prefixText:1,readOnly:[7,{reflect:!0,type:Boolean}],required:[7,{reflect:!0,type:Boolean}],scale:[3,{reflect:!0}],status:[3,{reflect:!0}],step:[3,{reflect:!0}],suffixText:1,type:[3,{reflect:!0}],validationIcon:[3,{reflect:!0,converter:w}],validationMessage:1,validity:[0,{attribute:!1}],value:1}}static{this.styles=ct}get isClearable(){return!this.isTextarea&&(this.clearable||this.type==="search")&&this.value?.length>0}get isTextarea(){return this.childElType==="textarea"}get value(){return this._value}set value(t){let e=this._value;t!==e&&(this._value=t,this.valueWatcher(t,e),t&&this._value===""&&this.setValue({origin:"reset",value:e}))}async selectText(){this.type==="number"?this.childNumberEl?.select():this.childEl?.select()}async setFocus(){await A(this),U(this.type==="number"?this.childNumberEl:this.childEl)}connectedCallback(){super.connectedCallback(),this.inlineEditableEl=this.el.closest("calcite-inline-editable"),this.inlineEditableEl&&(this.editingEnabled=this.inlineEditableEl.editingEnabled||!1),Z(this),X(this),this.el.addEventListener(V,this.onHiddenFormInputInput)}async load(){this.childElType=this.type==="textarea"?"textarea":"input",this.maxString=this.max?.toString(),this.minString=this.min?.toString(),this.requestedIcon=z(at,this.icon,this.type),this.setPreviousEmittedValue(this.value),this.setPreviousValue(this.value),this.type==="number"&&(this.value==="Infinity"||this.value==="-Infinity"?(this.displayedValue=this.value,this.previousEmittedValue=this.value):(this.warnAboutInvalidNumberValue(this.value),this.setValue({origin:"connected",value:b(this.value)?this.value:""})))}willUpdate(t){t.has("max")&&(this.maxString=this.max?.toString()||null),t.has("min")&&(this.minString=this.min?.toString()||null),(t.has("icon")||t.has("type")&&(this.hasUpdated||this.type!=="text"))&&(this.requestedIcon=z(at,this.icon,this.type))}updated(){K(this)}disconnectedCallback(){super.disconnectedCallback(),J(this),tt(this),this.el.removeEventListener(V,this.onHiddenFormInputInput)}handleGlobalAttributesChanged(){this.requestUpdate()}valueWatcher(t,e){if(!this.userChangedValue){if(this.type==="number"&&(t==="Infinity"||t==="-Infinity")){this.displayedValue=t,this.previousEmittedValue=t;return}this.setValue({origin:"direct",previousValue:e,value:t==null||t==""?"":this.type==="number"?b(t)?t:this.previousValue||"":t}),this.warnAboutInvalidNumberValue(t)}this.userChangedValue=!1}keyDownHandler(t){this.readOnly||this.disabled||t.defaultPrevented||(this.isClearable&&t.key==="Escape"&&(this.clearInputValue(t),t.preventDefault()),t.key==="Enter"&&Q(this)&&t.preventDefault())}onLabelClick(){this.setFocus()}incrementOrDecrementNumberValue(t,e,r,d){let{value:n}=this;if(n==="Infinity"||n==="-Infinity")return;let s=t==="up"?1:-1,p=this.step==="any"?1:Math.abs(this.step||1),l=new _(n!==""?n:"0").add(`${p*s}`),h=()=>typeof r=="number"&&!isNaN(r)&&l.subtract(`${r}`).isNegative,y=()=>typeof e=="number"&&!isNaN(e)&&!l.subtract(`${e}`).isNegative,x=h()?`${r}`:y()?`${e}`:l.toString();this.setValue({committing:!0,nativeEvent:d,origin:"user",value:x})}clearInputValue(t){this.setValue({committing:!0,nativeEvent:t,origin:"user",value:""})}emitChangeIfUserModified(){this.previousValueOrigin==="user"&&this.value!==this.previousEmittedValue&&(this.calciteInputChange.emit(),this.setPreviousEmittedValue(this.value))}inputBlurHandler(){window.clearInterval(this.nudgeNumberValueIntervalId),this.calciteInternalInputBlur.emit(),this.emitChangeIfUserModified()}clickHandler(t){if(this.disabled)return;let e=t.composedPath();!e.includes(this.inputWrapperEl.value)||e.includes(this.actionWrapperEl.value)||this.setFocus()}inputFocusHandler(){this.calciteInternalInputFocus.emit()}inputInputHandler(t){this.disabled||this.readOnly||(this.type==="file"&&(this.files=this.childEl.files),this.setValue({nativeEvent:t,origin:"user",value:t.target.value}))}inputKeyDownHandler(t){this.disabled||this.readOnly||t.key==="Enter"&&this.emitChangeIfUserModified()}inputNumberInputHandler(t){if(this.disabled||this.readOnly||this.value==="Infinity"||this.value==="-Infinity")return;let e=t.target.value;u.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator};let r=u.delocalize(e);t.inputType==="insertFromPaste"?(b(r)||t.preventDefault(),this.setValue({nativeEvent:t,origin:"user",value:q(r)}),this.childNumberEl.value=this.displayedValue):this.setValue({nativeEvent:t,origin:"user",value:r})}inputNumberKeyDownHandler(t){if(this.type!=="number"||this.disabled||this.readOnly)return;if(this.value==="Infinity"||this.value==="-Infinity"){t.preventDefault(),(t.key==="Backspace"||t.key==="Delete")&&this.clearInputValue(t);return}if(t.key==="ArrowUp"){t.preventDefault(),this.nudgeNumberValue("up",t);return}if(t.key==="ArrowDown"){this.nudgeNumberValue("down",t);return}let e=[...R,"ArrowLeft","ArrowRight","Backspace","Delete","Enter","Escape","Tab"];if(t.altKey||t.ctrlKey||t.metaKey)return;let r=t.shiftKey&&t.key==="Tab";if(e.includes(t.key)||r){t.key==="Enter"&&this.emitChangeIfUserModified();return}u.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},!(t.key===u.decimal&&(!this.value&&!this.childNumberEl.value||this.value&&this.childNumberEl.value.indexOf(u.decimal)===-1))&&(/[eE]/.test(t.key)&&(!this.value&&!this.childNumberEl.value||this.value&&!/[eE]/.test(this.childNumberEl.value))||t.key==="-"&&(!this.value&&!this.childNumberEl.value||this.value&&this.childNumberEl.value.split("-").length<=2)||t.preventDefault())}nudgeNumberValue(t,e){if(e instanceof KeyboardEvent&&e.repeat||this.type!=="number")return;let r=this.maxString?parseFloat(this.maxString):null,d=this.minString?parseFloat(this.minString):null,n=150;this.incrementOrDecrementNumberValue(t,r,d,e),this.nudgeNumberValueIntervalId&&window.clearInterval(this.nudgeNumberValueIntervalId);let s=!0;this.nudgeNumberValueIntervalId=window.setInterval(()=>{if(s){s=!1;return}this.incrementOrDecrementNumberValue(t,r,d,e)},n)}numberButtonPointerUpAndOutHandler(){window.clearInterval(this.nudgeNumberValueIntervalId)}numberButtonPointerDownHandler(t){if(!M(t))return;t.preventDefault();let e=t.target.dataset.adjustment;this.disabled||this.nudgeNumberValue(e,t)}syncHiddenFormInput(t){nt(this.type,this,t)}setChildElRef(t){this.childEl=t}setChildNumberElRef(t){this.childNumberEl=t}setInputValue(t){this.type==="number"&&this.childNumberEl?this.childNumberEl.value=t:this.childEl&&(this.childEl.value=t)}setPreviousEmittedValue(t){this.previousEmittedValue=this.normalizeValue(t)}normalizeValue(t){return this.type==="number"?b(t)?t:"":t}setPreviousValue(t){this.previousValue=this.normalizeValue(t)}setValue({committing:t=!1,nativeEvent:e,origin:r,previousValue:d,value:n}){if(this.setPreviousValue(d??this.value),this.previousValueOrigin=r,this.type==="number"){u.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator,signDisplay:"never"};let s=this.previousValue?.length>n.length||this.value?.length>n.length,p=n.charAt(n.length-1)===".",m=p&&s?n:G(n),l=n&&!m?b(this.previousValue)?this.previousValue:"":m,h=u.localize(l);r!=="connected"&&!p&&(h=Y(h,l,u)),this.displayedValue=p&&s?`${h}${u.decimal}`:h,this.userChangedValue=r==="user"&&this.value!==l,this.value=["-","."].includes(l)?"":l}else this.userChangedValue=r==="user"&&this.value!==n,this.value=n;r==="direct"&&(this.setInputValue(n),this.previousEmittedValue=n),e&&(this.calciteInputInput.emit().defaultPrevented?(this.value=this.previousValue,this.displayedValue=this.type==="number"?u.localize(this.previousValue):this.previousValue):t&&this.emitChangeIfUserModified())}inputKeyUpHandler(){window.clearInterval(this.nudgeNumberValueIntervalId)}warnAboutInvalidNumberValue(t){this.type==="number"&&t&&!b(t)&&console.warn(`The specified value "${t}" cannot be parsed, or is out of range.`)}render(){let t=L(this.el),e=c`<div class=${o(a.loader)}><calcite-progress .label=${this.messages.loading} type=indeterminate></calcite-progress></div>`,r=c`<button .ariaLabel=${this.messages.clear} class=${o(a.clearButton)} .disabled=${this.disabled||this.readOnly} @click=${this.clearInputValue} tabindex=-1 type=button><calcite-icon icon=x .scale=${v(this.scale)}></calcite-icon></button>`,d=c`<calcite-icon class=${o(a.inputIcon)} .flipRtl=${this.iconFlipRtl} .icon=${this.requestedIcon} .scale=${v(this.scale)}></calcite-icon>`,n=this.numberButtonType==="horizontal",s=c`<button aria-hidden=true class=${o({[a.numberButtonItem]:!0,[a.buttonItemHorizontal]:n})} data-adjustment=up .disabled=${this.disabled||this.readOnly} @pointerdown=${this.numberButtonPointerDownHandler} @pointerout=${this.numberButtonPointerUpAndOutHandler} @pointerup=${this.numberButtonPointerUpAndOutHandler} tabindex=-1 type=button><calcite-icon icon=chevron-up .scale=${v(this.scale)}></calcite-icon></button>`,p=c`<button aria-hidden=true class=${o({[a.numberButtonItem]:!0,[a.buttonItemHorizontal]:n})} data-adjustment=down .disabled=${this.disabled||this.readOnly} @pointerdown=${this.numberButtonPointerDownHandler} @pointerout=${this.numberButtonPointerUpAndOutHandler} @pointerup=${this.numberButtonPointerUpAndOutHandler} tabindex=-1 type=button><calcite-icon icon=chevron-down .scale=${v(this.scale)}></calcite-icon></button>`,m=c`<div class=${o(a.numberButtonWrapper)}>${s}${p}</div>`,l=c`<div class=${o(a.prefix)}>${this.prefixText}</div>`,h=c`<div class=${o(a.suffix)}>${this.suffixText}</div>`,y=this.el.autofocus,x=this.el.enterKeyHint,H=this.el.inputMode,ot=this.type==="number"?P("localized-input",c`<input accept=${this.accept??i} aria-errormessage=${N.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${I(this)} autocomplete=${this.autocomplete??i} .autofocus=${y} value=${this.defaultValue??i} .disabled=${this.disabled?!0:null} enterkeyhint=${x??i} inputmode=${H??i} maxlength=${this.maxLength??i} minlength=${this.minLength??i} .multiple=${this.multiple} name=${i} @blur=${this.inputBlurHandler} @focus=${this.inputFocusHandler} @input=${this.inputNumberInputHandler} @keydown=${this.inputNumberKeyDownHandler} @keyup=${this.inputKeyUpHandler} pattern=${this.pattern??i} placeholder=${(this.placeholder||"")??i} .readOnly=${this.readOnly} type=text .value=${k(this.displayedValue??"")} ${g(this.setChildNumberElRef)}>`):null,S=this.childElType==="input"?E`input`:E`textarea`,st=this.type!=="number"?rt`<${S} accept=${this.accept??i} aria-errormessage=${N.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${I(this)} autocomplete=${this.autocomplete??i} .autofocus=${y} class=${o({[a.editingEnabled]:this.editingEnabled,[a.inlineChild]:!!this.inlineEditableEl})} .defaultValue=${this.defaultValue??""} .disabled=${this.disabled?!0:null} enterkeyhint=${x??i} inputmode=${H??i} max=${this.maxString??i} maxlength=${this.maxLength??i} min=${this.minString??i} minlength=${this.minLength??i} .multiple=${this.multiple} name=${this.name??i} @blur=${this.inputBlurHandler} @focus=${this.inputFocusHandler} @input=${this.inputInputHandler} @keydown=${this.inputKeyDownHandler} @keyup=${this.inputKeyUpHandler} pattern=${this.pattern??i} placeholder=${(this.placeholder||"")??i} .readOnly=${this.readOnly} .required=${this.required?!0:null} spellcheck=${this.el.spellcheck??i} step=${this.step??i} tabindex=${(this.disabled||this.inlineEditableEl&&!this.editingEnabled?-1:null)??i} type=${this.type??i} .value=${k(this.value??"")} ${g(this.setChildElRef)}></${S}>`:null;return W({disabled:this.disabled,children:c`<div class=${o({[a.inputWrapper]:!0,[D.rtl]:t==="rtl",[a.hasSuffix]:this.suffixText,[a.hasPrefix]:this.prefixText})} ${g(this.inputWrapperEl)}>${this.type==="number"&&this.numberButtonType==="horizontal"&&!this.readOnly?p:null}${this.prefixText?l:null}<div class=${o(a.wrapper)}>${ot}${st}${this.isClearable?r:null}${this.requestedIcon?d:null}${this.loading?e:null}</div><div class=${o(a.actionWrapper)} ${g(this.actionWrapperEl)}><slot name=${lt.action}></slot></div>${this.type==="number"&&this.numberButtonType==="vertical"&&!this.readOnly?m:null}${this.suffixText?h:null}${this.type==="number"&&this.numberButtonType==="horizontal"&&!this.readOnly?s:null}${et({component:this})}</div>${this.validationMessage&&this.status==="invalid"?it({icon:this.validationIcon,id:N.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};F("calcite-input",B);export{B as Input};
|