@esri/calcite-components 3.0.0-next.101 → 3.0.0-next.102
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/{5BDLK76D.js → 24KLAK63.js} +2 -2
- package/dist/calcite/{N35FIXPX.js → 2EFDWZPU.js} +1 -1
- package/dist/calcite/{QXNJSXL4.js → 2MJWKG2L.js} +2 -2
- package/dist/calcite/{NV77O5TV.js → 2NTQDX7C.js} +2 -2
- package/dist/calcite/{EMMST5Z4.js → 2XZRBFRM.js} +2 -2
- package/dist/calcite/{AOGLHGKD.js → 2YJAGHRB.js} +2 -2
- package/dist/calcite/{7UZW4KQT.js → 32IRLVPD.js} +2 -2
- package/dist/calcite/{KMULUHG3.js → 3BK3FVFF.js} +2 -2
- package/dist/calcite/{DL6EI2A4.js → 3DTKXAXS.js} +2 -2
- package/dist/calcite/{WTRRC56B.js → 3ENKA46R.js} +2 -2
- package/dist/calcite/3UXKR5RU.js +6 -0
- package/dist/calcite/{LWIRCRMR.js → 3WZFHMFI.js} +2 -2
- package/dist/calcite/{G3NJ3FRP.js → 42HSASTM.js} +1 -1
- package/dist/calcite/{XHEWZLE2.js → 42LJNZ6R.js} +1 -1
- package/dist/calcite/{4GBR7ICS.js → 44XGFESF.js} +2 -2
- package/dist/calcite/{TJJ3TF2Q.js → 4DDZMCKV.js} +2 -2
- package/dist/calcite/4FU7RE33.js +6 -0
- package/dist/calcite/{7QQACZUV.js → 4NTI553S.js} +2 -2
- package/dist/calcite/{H5TLKUXP.js → 4QHLMHYO.js} +1 -1
- package/dist/calcite/{GXCYJE6L.js → 4TK37EQN.js} +2 -2
- package/dist/calcite/{SLRLQ2HO.js → 4V3EX7QE.js} +2 -2
- package/dist/calcite/{X5EHVOLO.js → 4YT4G4RW.js} +2 -2
- package/dist/calcite/{I3TYC44F.js → 5ERQGCK5.js} +2 -2
- package/dist/calcite/{3ARY6FSN.js → 5GRMOVXW.js} +2 -2
- package/dist/calcite/{CKAP52FA.js → 5GZ3ZNKO.js} +2 -2
- package/dist/calcite/{D7JZY5XO.js → 5JK3NRUA.js} +2 -2
- package/dist/calcite/{K2PHVJZU.js → 5N3XVPHG.js} +2 -2
- package/dist/calcite/{UZL4F2BY.js → 5NU5XXBL.js} +2 -2
- package/dist/calcite/{OFNUXYUT.js → 5ULL7XNT.js} +2 -2
- package/dist/calcite/{GA2YDWAH.js → 5V4KINIS.js} +1 -1
- package/dist/calcite/{IC3IP4T2.js → 63BH2O7U.js} +2 -2
- package/dist/calcite/{5GZ2427X.js → 66CIMFVL.js} +2 -2
- package/dist/calcite/{F5HKDLBD.js → 66FEWKIS.js} +2 -2
- package/dist/calcite/{FCA4NLI4.js → 6F5HO2CW.js} +2 -2
- package/dist/calcite/{VOUEQ5NH.js → 6LESV7GB.js} +2 -2
- package/dist/calcite/{SATDWKJY.js → 6N3UIVSD.js} +2 -2
- package/dist/calcite/{PW3RZSAB.js → 6SUK7GVH.js} +1 -1
- package/dist/calcite/{XXGN7NNI.js → 6UUA3BAD.js} +2 -2
- package/dist/calcite/{D6OZKG77.js → 7RQ2LMKD.js} +2 -2
- package/dist/calcite/{VO4NSX3A.js → 7Z2JBSUK.js} +2 -2
- package/dist/calcite/{ZKVNWG7V.js → A7EKTADU.js} +2 -2
- package/dist/calcite/{CIBJNWVE.js → AC3OQC2U.js} +2 -2
- package/dist/calcite/AFAMYC46.js +6 -0
- package/dist/calcite/{FL4ICUUF.js → AGNLDD5N.js} +2 -2
- package/dist/calcite/{X7LAQZG3.js → AM3ZHN2P.js} +2 -2
- package/dist/calcite/{I7EUVM7R.js → ANX3QUDA.js} +2 -2
- package/dist/calcite/{D6MRBHGP.js → AUZ2Z4WU.js} +2 -2
- package/dist/calcite/{JYZZKVAE.js → AVTAQHMO.js} +2 -2
- package/dist/calcite/{OAYJJDEY.js → AVVHAVDC.js} +2 -2
- package/dist/calcite/{IKSWR4BJ.js → B3ZZYLHF.js} +2 -2
- package/dist/calcite/{3VVNG7Z6.js → B6QDJPAK.js} +2 -2
- package/dist/calcite/{VBCMKDR6.js → BE7S3M3B.js} +2 -2
- package/dist/calcite/{ZOUUKLCH.js → BPG6TKSJ.js} +2 -2
- package/dist/calcite/{5PRB2XET.js → BR66GKWV.js} +2 -2
- package/dist/calcite/{GIUT3DLD.js → BYNMXM7L.js} +2 -2
- package/dist/calcite/{YCTFUMYF.js → C2LRSJ2J.js} +2 -2
- package/dist/calcite/{KO6DUNT2.js → CLP53BLB.js} +2 -2
- package/dist/calcite/{7OJXXDZU.js → COWIKJWZ.js} +2 -2
- package/dist/calcite/{O47UAYNM.js → CRC3QSV5.js} +2 -2
- package/dist/calcite/{UJ4DDCFI.js → DCSX7LVM.js} +1 -1
- package/dist/calcite/{GZIKBMU5.js → DEEIO3XX.js} +1 -1
- package/dist/calcite/{UOR6BN6K.js → DICF2FMP.js} +2 -2
- package/dist/calcite/{MGKC2B6O.js → DMYTLYTD.js} +2 -2
- package/dist/calcite/{KXGILWQP.js → DNFCRYNT.js} +2 -2
- package/dist/calcite/{XTER2KBG.js → DWGU4HLJ.js} +2 -2
- package/dist/calcite/{OC2NP6QD.js → E3AB3GWI.js} +2 -2
- package/dist/calcite/{LW2WK7LK.js → E73PXYWS.js} +2 -2
- package/dist/calcite/{MNMMJDGT.js → ECCPGVOM.js} +2 -2
- package/dist/calcite/{H5Q5XVTF.js → ED3VEAHF.js} +2 -2
- package/dist/calcite/{AYMOROQD.js → EDQD5UDG.js} +1 -1
- package/dist/calcite/{M3ME4MVF.js → EKSEDQZK.js} +2 -2
- package/dist/calcite/{RJOOPNDS.js → ERHEI7BN.js} +2 -2
- package/dist/calcite/{4IIG5VLG.js → EU4XSRAD.js} +2 -2
- package/dist/calcite/{32LX4WSW.js → EWWST244.js} +2 -2
- package/dist/calcite/{KQ24VSS3.js → F6TYWNHH.js} +2 -2
- package/dist/calcite/{CNWAFILU.js → FHR23EXG.js} +2 -2
- package/dist/calcite/{SQMZ6VAQ.js → FIIUQUW3.js} +1 -1
- package/dist/calcite/{CGXEYLCN.js → FINYV3KK.js} +2 -2
- package/dist/calcite/{4Y3MLTYM.js → FJ3ILIFK.js} +2 -2
- package/dist/calcite/{KVWNQMMM.js → FPRPUEMK.js} +1 -1
- package/dist/calcite/{NCX7LOTY.js → FUFZ6DSG.js} +2 -2
- package/dist/calcite/{DVZZS5PK.js → G2JE6NWB.js} +1 -1
- package/dist/calcite/{UPLVGMDG.js → G7UTGYMV.js} +1 -1
- package/dist/calcite/{RGRI7BMK.js → GD7DA5TA.js} +2 -2
- package/dist/calcite/{MTF5FQFF.js → GDUEUYZX.js} +2 -2
- package/dist/calcite/{GFMZ4MLT.js → H457Z7D2.js} +2 -2
- package/dist/calcite/{5JDEHA2Y.js → H5HFYZX2.js} +2 -2
- package/dist/calcite/{IFDHQDIM.js → H6YVY4VP.js} +2 -2
- package/dist/calcite/{ANKNXZ6E.js → HA37PPKM.js} +2 -2
- package/dist/calcite/{LLUEQ6MI.js → HEXKCCDT.js} +2 -2
- package/dist/calcite/{QH6NIB3F.js → HQLR4YL6.js} +2 -2
- package/dist/calcite/{4CRSTTO5.js → HXIDHGO5.js} +2 -2
- package/dist/calcite/{DUMUZC5D.js → HZOBGF3D.js} +2 -2
- package/dist/calcite/{2ZYCUNW2.js → IA66ZI4Q.js} +2 -2
- package/dist/calcite/{XWZHHYHW.js → IARCEQYE.js} +2 -2
- package/dist/calcite/ICXEFUXN.js +6 -0
- package/dist/calcite/{USNVO45C.js → IPSEN5YU.js} +2 -2
- package/dist/calcite/{AEEBVGWA.js → IVZERXXA.js} +2 -2
- package/dist/calcite/{3Y66ERRY.js → IWRDC24D.js} +2 -2
- package/dist/calcite/{NY57HWOP.js → IYMGJZSO.js} +2 -2
- package/dist/calcite/{6WTYJQZ7.js → J4ZWJW4L.js} +2 -2
- package/dist/calcite/{3WOU2OOQ.js → JJZWEU7I.js} +2 -2
- package/dist/calcite/{Z6DA2PBZ.js → JNDOIKAJ.js} +2 -2
- package/dist/calcite/{VXU7M4DR.js → JOOZVXHR.js} +2 -2
- package/dist/calcite/{R4MC333A.js → JOUJGJ6D.js} +2 -2
- package/dist/calcite/{KBTUFYL6.js → JVJKXXMD.js} +2 -2
- package/dist/calcite/{PFSEBXZW.js → JWJ32L2M.js} +2 -2
- package/dist/calcite/{JG7WJHFV.js → K2UZIGDO.js} +1 -1
- package/dist/calcite/{VYLAMJL6.js → KECO7XU6.js} +2 -2
- package/dist/calcite/{Z4GTHRZI.js → KH6NGGEK.js} +2 -2
- package/dist/calcite/{DEK5BUAN.js → KIXCX2AK.js} +1 -1
- package/dist/calcite/{S7ENFJDI.js → KKOCT5IK.js} +2 -2
- package/dist/calcite/{II5JHQGN.js → KS7KN3J6.js} +2 -2
- package/dist/calcite/{R3EVNJHI.js → KVSLPRUX.js} +2 -2
- package/dist/calcite/{4F5EU5ZX.js → KXZZVUAL.js} +2 -2
- package/dist/calcite/{SHZM5BBT.js → L277R7GU.js} +2 -2
- package/dist/calcite/{OB6TR73X.js → LLELQ3EW.js} +2 -2
- package/dist/calcite/{RMKEHTJB.js → LZHJ4QKL.js} +2 -2
- package/dist/calcite/{SC7KAHCI.js → M5F4PXGG.js} +1 -1
- package/dist/calcite/{CC3KGELT.js → MF2LLRKY.js} +2 -2
- package/dist/calcite/{TRVLS5SY.js → MICNNKUS.js} +2 -2
- package/dist/calcite/{MDZ2ZSD7.js → MUE7L5AI.js} +2 -2
- package/dist/calcite/NHJL4TF4.js +6 -0
- package/dist/calcite/{N3GWTPVK.js → NO6YUIBW.js} +2 -2
- package/dist/calcite/{OS75TY4W.js → NQ5QKTH7.js} +2 -2
- package/dist/calcite/{BWLQWDJC.js → NQVOKQGW.js} +2 -2
- package/dist/calcite/{JR4HP65C.js → NZNZAYKF.js} +1 -1
- package/dist/calcite/{R2M7IIA4.js → ODRIDNVC.js} +2 -2
- package/dist/calcite/{JIFFNVK4.js → ON3PLUOP.js} +1 -1
- package/dist/calcite/{OETNBCL3.js → OPKJGNXH.js} +2 -2
- package/dist/calcite/{TIPDCVSW.js → OWQWLMX4.js} +2 -2
- package/dist/calcite/{IUBMARD2.js → P56CMAVL.js} +2 -2
- package/dist/calcite/{IWPRZSU7.js → PMKVZ3OL.js} +2 -2
- package/dist/calcite/{US7QCP3H.js → PPZ5AD53.js} +2 -2
- package/dist/calcite/{X7IZ3TGO.js → PQI7BVXG.js} +2 -2
- package/dist/calcite/{HCYAXHUJ.js → PQMQVGUG.js} +2 -2
- package/dist/calcite/{EXLEUIZE.js → PQPDKM7D.js} +2 -2
- package/dist/calcite/{JDO3QICA.js → Q2RY7V3L.js} +2 -2
- package/dist/calcite/{PT4Y4RDE.js → QA6B7OCB.js} +2 -2
- package/dist/calcite/QE5A6P6K.js +6 -0
- package/dist/calcite/{KK7Q23HX.js → QEE4IDPR.js} +2 -2
- package/dist/calcite/{Q7QDYHNU.js → QINZSHOM.js} +2 -2
- package/dist/calcite/{6VBKHD7E.js → QIOAJYVZ.js} +2 -2
- package/dist/calcite/{DK2NCUXQ.js → QJRABNEL.js} +2 -2
- package/dist/calcite/{EMA6YQZX.js → QKVDF3BT.js} +2 -2
- package/dist/calcite/{CIANKFQD.js → QTN4UZQY.js} +1 -1
- package/dist/calcite/{ZKEEVKFS.js → QXSUF4TW.js} +2 -2
- package/dist/calcite/{6DBLCSB6.js → QYW3KTOT.js} +2 -2
- package/dist/calcite/{XYTSY764.js → R2LCO3RA.js} +2 -2
- package/dist/calcite/{PQ4ESHKB.js → R2XDZX2I.js} +2 -2
- package/dist/calcite/{EU2BWSTB.js → R6K3GBV4.js} +2 -2
- package/dist/calcite/RC6L2D75.js +6 -0
- package/dist/calcite/{M2WVIIV4.js → RJS3BKNK.js} +2 -2
- package/dist/calcite/{U24G4EZL.js → RUFIZAD4.js} +2 -2
- package/dist/calcite/S7MZV44A.js +6 -0
- package/dist/calcite/{HEV2TXLC.js → SAMNQZH5.js} +2 -2
- package/dist/calcite/{UWTWCEUU.js → SAZ3ANOP.js} +1 -1
- package/dist/calcite/{EIMFUJV5.js → SQJC7WTD.js} +2 -2
- package/dist/calcite/{5J6XLRMZ.js → T3MVKAE5.js} +2 -2
- package/dist/calcite/{RHJHV7G3.js → TE75QWOF.js} +2 -2
- package/dist/calcite/{CV6AAKTE.js → TFAYHNS7.js} +2 -2
- package/dist/calcite/THRAGCU6.js +6 -0
- package/dist/calcite/{GNASYW5I.js → THZF5Q5B.js} +2 -2
- package/dist/calcite/{I63FEVOY.js → TQFA5BXO.js} +1 -1
- package/dist/calcite/{LH5OVWSM.js → TQX2DFIV.js} +2 -2
- package/dist/calcite/{FVLVSPLB.js → TQYQ3ZSO.js} +2 -2
- package/dist/calcite/{GEEKP2TE.js → TVMBHYWL.js} +2 -2
- package/dist/calcite/{ED5OOIWS.js → UBAGBNLP.js} +2 -2
- package/dist/calcite/{GPZXAADH.js → UDJYT5BX.js} +2 -2
- package/dist/calcite/{ISQZL7CT.js → UFCZYZVK.js} +2 -2
- package/dist/calcite/{W45KV4SE.js → UKCV5UJL.js} +2 -2
- package/dist/calcite/{2EZO5AUC.js → ULU7C2KM.js} +2 -2
- package/dist/calcite/{ZYGOWVZZ.js → ULVTKSAY.js} +2 -2
- package/dist/calcite/{C72BLEHG.js → UUSHLNKD.js} +2 -2
- package/dist/calcite/{PRX2V536.js → V2SXNGLP.js} +2 -2
- package/dist/calcite/{AAYJ2I2P.js → V4PLRON2.js} +2 -2
- package/dist/calcite/{3BYW6FWB.js → VFLH66AI.js} +2 -2
- package/dist/calcite/{GMXYGCJK.js → VJFDBUNA.js} +2 -2
- package/dist/calcite/{XKHXQQTR.js → VKISC6WD.js} +1 -1
- package/dist/calcite/{HE5RWJJL.js → VNZ4C5EK.js} +2 -2
- package/dist/calcite/{WMAWN5PD.js → VPFTMPWR.js} +2 -2
- package/dist/calcite/{ZMQ2LYJT.js → VTQMGX2I.js} +2 -2
- package/dist/calcite/{QUJ4T7R2.js → VYHGOTE4.js} +2 -2
- package/dist/calcite/{WXX4GPAD.js → W3Q77OUJ.js} +2 -2
- package/dist/calcite/{FIVZGP6C.js → WFP4KKOJ.js} +2 -2
- package/dist/calcite/{A5BSCXRC.js → WITU6MNQ.js} +2 -2
- package/dist/calcite/{CFAQIEGZ.js → WJT2KTOI.js} +2 -2
- package/dist/calcite/{76ID5UXA.js → WR7OXOKX.js} +2 -2
- package/dist/calcite/{GOKWOVE2.js → WRDMD4YS.js} +2 -2
- package/dist/calcite/{JBMH7TKF.js → WRX7U57O.js} +2 -2
- package/dist/calcite/{Y7YBCDS2.js → WSO6QLOV.js} +2 -2
- package/dist/calcite/{34DLQQFX.js → WTVT7M3L.js} +2 -2
- package/dist/calcite/{EMK2AYUP.js → WWXAGXLI.js} +2 -2
- package/dist/calcite/{EXRCO27O.js → X3HQEQSN.js} +2 -2
- package/dist/calcite/{VGPZFPAW.js → X4GIRP5L.js} +2 -2
- package/dist/calcite/{3RHVNDRG.js → X4Z4NITK.js} +2 -2
- package/dist/calcite/{QVQYBDFA.js → XANKFTNY.js} +2 -2
- package/dist/calcite/{NAE43KJ4.js → XHEV4S33.js} +2 -2
- package/dist/calcite/{Q2VVJTC7.js → XKJMKGYT.js} +2 -2
- package/dist/calcite/{J45BPF7A.js → XMD4QDGA.js} +2 -2
- package/dist/calcite/{AVOYO455.js → XSZ2HIFU.js} +2 -2
- package/dist/calcite/{YYABTNBJ.js → XU6ZWJMN.js} +2 -2
- package/dist/calcite/{QRCTE52Q.js → Y3BMQ26L.js} +2 -2
- package/dist/calcite/{HWT77YTT.js → Y5JKA2EZ.js} +2 -2
- package/dist/calcite/{2EQT6XDA.js → Y75PA3DV.js} +2 -2
- package/dist/calcite/{RPKITWOM.js → YFHCHHA3.js} +2 -2
- package/dist/calcite/{4M73FU2T.js → YGYL5EWA.js} +2 -2
- package/dist/calcite/{SY2YALFS.js → YOWIKD2W.js} +2 -2
- package/dist/calcite/{36HWNOFJ.js → YRMTCYRV.js} +2 -2
- package/dist/calcite/{SKPJY4DF.js → YSYTMUCJ.js} +2 -2
- package/dist/calcite/{OVNLU5BS.js → YUW5X75A.js} +2 -2
- package/dist/calcite/{RR5MIGZ6.js → YYISSN6B.js} +2 -2
- package/dist/calcite/{P3UJ2UOU.js → YZ47JT57.js} +2 -2
- package/dist/calcite/{YF45QFNC.js → Z3SSHVDQ.js} +2 -2
- package/dist/calcite/{DPQLLPJ5.js → ZE4G7GXI.js} +2 -2
- package/dist/calcite/{TROL5XJM.js → ZIBSOYVG.js} +2 -2
- package/dist/calcite/{WCUUNKTD.js → ZRIO5OYC.js} +2 -2
- package/dist/calcite/{CRRBYD6P.js → ZSRWNQQC.js} +2 -2
- package/dist/calcite/{3RXSAGPQ.js → ZUKEBKUC.js} +2 -2
- package/dist/calcite/{UO5TY67J.js → ZYLESFLE.js} +2 -2
- package/dist/calcite/{GN7OOFBL.js → ZYNYYJLO.js} +2 -2
- package/dist/calcite/{CWRHLVPX.js → ZZYJB4VH.js} +2 -2
- package/dist/calcite/calcite.esm.js +2 -2
- package/dist/chunks/ExpandToggle.js +1 -1
- package/dist/chunks/FloatingArrow.js +1 -1
- package/dist/chunks/Heading.js +1 -1
- package/dist/chunks/Validation.js +1 -1
- package/dist/chunks/_commonjsHelpers.js +1 -1
- package/dist/chunks/array.js +1 -1
- package/dist/chunks/component.js +1 -1
- package/dist/chunks/core.js +1 -1
- package/dist/chunks/date.js +1 -1
- package/dist/chunks/dom.js +216 -230
- package/dist/chunks/dynamicClasses.js +1 -1
- package/dist/chunks/filter.js +1 -1
- package/dist/chunks/floating-ui.js +1 -1
- package/dist/chunks/focusTrapComponent.js +1 -1
- package/dist/chunks/form.js +1 -1
- package/dist/chunks/global.js +1 -1
- package/dist/chunks/guid.js +1 -1
- package/dist/chunks/input.js +1 -1
- package/dist/chunks/interact.min.js +1 -1
- package/dist/chunks/interactive.js +1 -1
- package/dist/chunks/key.js +1 -1
- package/dist/chunks/label.js +1 -1
- package/dist/chunks/loadable.js +1 -1
- package/dist/chunks/locale.js +1 -1
- package/dist/chunks/logger.js +1 -1
- package/dist/chunks/math.js +1 -1
- package/dist/chunks/observers.js +1 -1
- package/dist/chunks/openCloseComponent.js +1 -1
- package/dist/chunks/resources.js +1 -1
- package/dist/chunks/resources2.js +1 -1
- package/dist/chunks/resources3.js +1 -1
- package/dist/chunks/resources4.js +1 -1
- package/dist/chunks/resources5.js +1 -1
- package/dist/chunks/resources6.js +1 -1
- package/dist/chunks/resources7.js +1 -1
- package/dist/chunks/responsive.js +1 -1
- package/dist/chunks/runtime.js +3 -3
- package/dist/chunks/sortableComponent.js +1 -1
- package/dist/chunks/text.js +1 -1
- package/dist/chunks/time.js +1 -1
- package/dist/chunks/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 +23 -23
- package/dist/components/calcite-autocomplete/customElement.d.ts +8 -3
- package/dist/components/calcite-autocomplete/customElement.js +37 -37
- 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 +32 -32
- 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.d.ts +4 -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.d.ts +4 -1
- package/dist/components/calcite-combobox/customElement.js +59 -59
- 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.d.ts +8 -2
- package/dist/components/calcite-date-picker/customElement.js +1 -1
- package/dist/components/calcite-date-picker-day/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
- package/dist/components/calcite-dialog/customElement.js +1 -1
- package/dist/components/calcite-dropdown/customElement.js +28 -28
- 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.d.ts +12 -5
- package/dist/components/calcite-input/customElement.js +1 -1
- package/dist/components/calcite-input-date-picker/customElement.d.ts +12 -3
- package/dist/components/calcite-input-date-picker/customElement.js +77 -77
- package/dist/components/calcite-input-message/customElement.js +1 -1
- package/dist/components/calcite-input-number/customElement.d.ts +12 -5
- package/dist/components/calcite-input-number/customElement.js +1 -1
- package/dist/components/calcite-input-text/customElement.d.ts +8 -3
- package/dist/components/calcite-input-text/customElement.js +1 -1
- package/dist/components/calcite-input-time-picker/customElement.d.ts +8 -3
- package/dist/components/calcite-input-time-picker/customElement.js +1 -1
- package/dist/components/calcite-input-time-zone/customElement.js +1 -1
- package/dist/components/calcite-label/customElement.js +1 -1
- package/dist/components/calcite-link/customElement.js +1 -1
- package/dist/components/calcite-list/customElement.js +1 -1
- package/dist/components/calcite-list-item/customElement.js +1 -1
- package/dist/components/calcite-list-item-group/customElement.js +1 -1
- package/dist/components/calcite-loader/customElement.js +1 -1
- package/dist/components/calcite-menu/customElement.js +1 -1
- package/dist/components/calcite-menu-item/customElement.js +1 -1
- package/dist/components/calcite-meter/customElement.js +1 -1
- package/dist/components/calcite-modal/customElement.js +1 -1
- package/dist/components/calcite-navigation/customElement.js +1 -1
- package/dist/components/calcite-navigation-logo/customElement.js +1 -1
- package/dist/components/calcite-navigation-user/customElement.js +1 -1
- package/dist/components/calcite-notice/customElement.js +19 -19
- 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 +32 -32
- package/dist/components/calcite-progress/customElement.js +1 -1
- package/dist/components/calcite-radio-button/customElement.d.ts +4 -1
- package/dist/components/calcite-radio-button/customElement.js +1 -1
- package/dist/components/calcite-radio-button-group/customElement.d.ts +4 -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.d.ts +4 -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.d.ts +4 -1
- package/dist/components/calcite-select/customElement.js +1 -1
- package/dist/components/calcite-sheet/customElement.js +1 -1
- package/dist/components/calcite-shell/customElement.js +1 -1
- package/dist/components/calcite-shell-center-row/customElement.js +1 -1
- package/dist/components/calcite-shell-panel/customElement.js +1 -1
- package/dist/components/calcite-slider/customElement.d.ts +4 -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.d.ts +6 -3
- 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 +31 -34
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +1 -1
- package/dist/docs/api.json +69 -69
- package/dist/docs/docs.json +35 -35
- package/dist/docs/vscode.html-custom-data.json +34 -34
- package/dist/docs/web-types.json +69 -69
- package/dist/extras/vscode-data.json +34 -34
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/dist/utils/openCloseComponent.d.ts +8 -10
- package/package.json +2 -2
- package/dist/calcite/CWAIBN3C.js +0 -6
- package/dist/calcite/DAKLWHI5.js +0 -6
- package/dist/calcite/DX5SY6DR.js +0 -6
- package/dist/calcite/F5UBBU7C.js +0 -6
- package/dist/calcite/I4KSW4OO.js +0 -6
- package/dist/calcite/NP3UU2DJ.js +0 -6
- package/dist/calcite/OPVLA7IH.js +0 -6
- package/dist/calcite/P6BS5HE3.js +0 -6
- package/dist/calcite/QLQCYRYS.js +0 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.102
|
|
5
5
|
*/
|
|
6
|
-
import{b as t}from"./
|
|
6
|
+
import{b as t}from"./6F5HO2CW.js";import"./5V4KINIS.js";var Y={name:"zh-cn",weekdays:"\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"),weekdaysShort:"\u5468\u65E5_\u5468\u4E00_\u5468\u4E8C_\u5468\u4E09_\u5468\u56DB_\u5468\u4E94_\u5468\u516D".split("_"),weekdaysMin:"\u65E5_\u4E00_\u4E8C_\u4E09_\u56DB_\u4E94_\u516D".split("_"),months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),ordinal:function(e,r){switch(r){case"W":return e+"\u5468";default:return e+"\u65E5"}},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5E74M\u6708D\u65E5",LLL:"YYYY\u5E74M\u6708D\u65E5Ah\u70B9mm\u5206",LLLL:"YYYY\u5E74M\u6708D\u65E5ddddAh\u70B9mm\u5206",l:"YYYY/M/D",ll:"YYYY\u5E74M\u6708D\u65E5",lll:"YYYY\u5E74M\u6708D\u65E5 HH:mm",llll:"YYYY\u5E74M\u6708D\u65E5dddd HH:mm"},relativeTime:{future:"%s\u5185",past:"%s\u524D",s:"\u51E0\u79D2",m:"1 \u5206\u949F",mm:"%d \u5206\u949F",h:"1 \u5C0F\u65F6",hh:"%d \u5C0F\u65F6",d:"1 \u5929",dd:"%d \u5929",M:"1 \u4E2A\u6708",MM:"%d \u4E2A\u6708",y:"1 \u5E74",yy:"%d \u5E74"},meridiem:function(e,r){var _=e*100+r;return _<600?"\u51CC\u6668":_<900?"\u65E9\u4E0A":_<1100?"\u4E0A\u5348":_<1300?"\u4E2D\u5348":_<1800?"\u4E0B\u5348":"\u665A\u4E0A"}};t.locale(Y,null,!0);var m=Y;export{m as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.102
|
|
5
5
|
*/
|
|
6
6
|
var n={container:"container",containerNone:"container--none-selection",icon:"dropdown-item-icon",iconEnd:"dropdown-item-icon--end",iconStart:"dropdown-item-icon--start",itemContent:"dropdown-item-content",link:"dropdown-link"};export{n as a};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.102
|
|
5
5
|
*/
|
|
6
|
-
import{c as d}from"./
|
|
6
|
+
import{c as d}from"./EDQD5UDG.js";import{a as n,b as o}from"./YGYL5EWA.js";import{I as c,d as i,e as t,u as s,v as l,w as e}from"./DMYTLYTD.js";var r={container:"container",heading:"heading"},p=i`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column}:host([filter-hidden]){display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{margin:0;display:flex;flex:1 1 0%;background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1));color:var(--calcite-list-color, var(--calcite-color-text-2))}.heading{font-weight:var(--calcite-font-weight-medium)}:host([scale=s]) .container{padding-inline:var(--calcite-spacing-sm)}:host([scale=s]) .heading{font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-fixed-base);padding-block:var(--calcite-spacing-sm) var(--calcite-spacing-xxs)}:host([scale=s]:not(:first-child)) .container{padding-block-start:var(--calcite-spacing-sm)}:host([scale=m]) .container{padding-inline:var(--calcite-spacing-md)}:host([scale=m]) .heading{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-fixed-base);padding-block:var(--calcite-spacing-lg) var(--calcite-spacing-sm)}:host([scale=m]:not(:first-child)) .container{padding-block-start:var(--calcite-spacing-md)}:host([scale=l]) .container{padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .heading{font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-fixed-lg);padding-block:var(--calcite-spacing-xl) var(--calcite-spacing-sm-plus, .625rem)}:host([scale=l]:not(:first-child)) .container{padding-block-start:var(--calcite-spacing-md-plus, .875rem)}.heading{padding:0}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends l{constructor(){super(...arguments),this.disabled=!1,this.filterHidden=!1,this.scale="m",this.calciteInternalListItemGroupDefaultSlotChange=s({cancelable:!1})}static{this.properties={disabled:7,filterHidden:7,heading:3,scale:3}}static{this.styles=p}updated(){n(this)}handleDefaultSlotChange(){this.calciteInternalListItemGroupDefaultSlotChange.emit()}render(){let{disabled:h,heading:g}=this;return o({disabled:h,children:t`<div class=${e(r.container)} role=row><div .ariaColSpan=${d} class=${e(r.heading)} role=cell>${g}</div></div><slot @slotchange=${this.handleDefaultSlotChange}></slot>`})}};c("calcite-list-item-group",a);export{a as ListItemGroup};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.102
|
|
5
5
|
*/
|
|
6
|
-
import{a as de,d as N,e as pe}from"./SQMZ6VAQ.js";import{a as ne}from"./Z4GTHRZI.js";import{A as he,B as W,C as ce,a as b,b as s,c as v,d as F,e as $,f as p,g as M,h as S,i as D,j as H,l as O,m as K,q as P,r as w,t as se,u as re,w as U,x as z,y as E,z as k}from"./DL6EI2A4.js";import"./JIFFNVK4.js";import{a as te,b as ie}from"./4M73FU2T.js";import{a as A}from"./QRCTE52Q.js";import{d as oe}from"./DVZZS5PK.js";import{a as le}from"./DEK5BUAN.js";import{a as ae}from"./ZMQ2LYJT.js";import{b as f}from"./DPQLLPJ5.js";import{e as J,n as Y,x as L}from"./NP3UU2DJ.js";import{a as Q,b as Z,d as ee}from"./QH6NIB3F.js";import"./JG7WJHFV.js";import{I as G,d as q,e as C,i as y,u as R,v as X,w as h,x}from"./MGKC2B6O.js";var $e=q`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-color-picker-spacing: 8px}:host([scale=s]) .container{inline-size:198px}:host([scale=s]) .saved-colors{gap:.25rem;grid-template-columns:repeat(auto-fill,20px)}:host([scale=m]){--calcite-color-picker-spacing: 12px}:host([scale=m]) .container{inline-size:238px}:host([scale=l]){--calcite-color-picker-spacing: 16px;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) .container{inline-size:302px}: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{flex-wrap:nowrap;align-items:baseline;flex-wrap:wrap}:host([scale=l]) .color-hex-options{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:inline-block;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{inline-size:100%}.hex-and-channels-group,.control-section{display:flex;flex-direction:row;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}`,ke=16,j=class extends X{constructor(){super(),this.captureColorFieldColor=(e,t,i=!0)=>{let{dimensions:{colorField:{height:a,width:o}}}=this,l=Math.round(p.s/o*e),n=Math.round(p.v/a*(a-t));this.internalColorSet(this.baseColorFieldColor.hsv().saturationv(l).value(n),i)},this._color=v,this.drawColorControls=oe((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()},ke),this.globalPointerMoveHandler=e=>{let{activeCanvasInfo:t,el:i}=this;if(!i.isConnected||!t)return;let{context:a,bounds:o}=t,l,n,{clientX:r,clientY:c}=e;a.canvas.matches(":hover")?(l=r-o.x,n=c-o.y):(r<o.x+o.width&&r>o.x?l=r-o.x:r<o.x?l=0:l=o.width,c<o.y+o.height&&c>o.y?n=c-o.y:c<o.y?n=0:n=o.height),a===this.colorFieldRenderingContext?this.captureColorFieldColor(l,n,!1):a===this.hueSliderRenderingContext?this.captureHueSliderColor(l):a===this.opacitySliderRenderingContext&&this.captureOpacitySliderValue(l)},this.globalPointerUpHandler=e=>{if(!L(e))return;let t=this.activeCanvasInfo;this.activeCanvasInfo=null,this.drawColorControls(),t&&this.calciteColorPickerChange.emit()},this.internalColorUpdateContext=null,this.isActiveChannelInputEmpty=!1,this.mode=U.HEX,this.shiftKeyChannelAdjustment=0,this.upOrDownArrowKeyTracker=null,this._valueWasSet=!1,this.channelMode="rgb",this.channels=this.toChannels(v),this.dimensions=D.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=R({cancelable:!1}),this.calciteColorPickerInput=R({cancelable:!1}),this.listen("keydown",this.handleChannelKeyUpOrDown,{capture:!0}),this.listen("keyup",this.handleChannelKeyUpOrDown,{capture:!0})}static{this.properties={channelMode:16,channels:16,colorFieldScopeLeft:16,colorFieldScopeTop:16,dimensions:16,hueScopeLeft:16,opacityScopeLeft:16,savedColors:16,scopeOrientation:16,allowEmpty:7,alphaChannel:5,channelsDisabled:5,clearable:7,color:0,disabled:7,format:3,hexDisabled:5,messageOverrides:0,numberingSystem:3,savedDisabled:7,scale:3,storageId:3,value:1}}static{this.styles=$e}get baseColorFieldColor(){return this.color||this.previousColor||v}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 ee(this),Y(this.el)}async load(){this._valueWasSet||(this._value??=P(w(v,this.alphaChannel))),Q(this),this.handleAllowEmptyOrClearableChange(),this.handleAlphaChannelDimensionsChange();let{isClearable:e,color:t,format:i,value:a}=this,o=e&&!a,l=z(a),n=o||i==="auto"&&l||i===l,r=o?null:n?b(a):t;n||this.showIncompatibleColorWarning(a,i),this.setMode(i,!1),this.internalColorSet(r,!1,"initial"),this.updateDimensions(this.scale);let c=`${F}${this.storageId}`;this.storageId&&localStorage.getItem(c)&&(this.savedColors=JSON.parse(localStorage.getItem(c)))}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),(e.has("alphaChannel")&&(this.hasUpdated||this.alphaChannel!==!1)||e.has("dimensions")&&(this.hasUpdated||this.dimensions!==D.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(){te(this)}loaded(){Z(this)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("pointermove",this.globalPointerMoveHandler),window.removeEventListener("pointerup",this.globalPointerUpHandler)}handleAllowEmptyOrClearableChange(){this.isClearable=this.clearable||this.allowEmpty}handleAlphaChannelChange(e){let{format:t}=this;e&&t!=="auto"&&!k(t)&&(console.warn(`ignoring alphaChannel as the current format (${t}) does not support alpha`),this.alphaChannel=!1)}handleAlphaChannelDimensionsChange(){this.effectiveSliderWidth=ce(this.dimensions,this.alphaChannel),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.updateDimensions(e),this.updateCanvasSize("all"),this.drawColorControls()}handleValueChange(e,t){let{isClearable:i,format:a}=this,o=!i||e,l=!1;if(o){let d=z(e);if(!d||a!=="auto"&&d!==a){this.showIncompatibleColorWarning(e,a),this._value=t;return}l=this.mode!==d,this.setMode(d,this.internalColorUpdateContext===null)}let n=this.activeCanvasInfo;if(this.internalColorUpdateContext==="initial")return;if(this.internalColorUpdateContext==="user-interaction"){this.calciteColorPickerInput.emit(),n||this.calciteColorPickerChange.emit();return}let r=i&&!e?null:b(e!=null&&typeof e=="object"&&k(this.mode)?re(e):e),c=!E(r,this.color);(l||c)&&this.internalColorSet(r,this.alphaChannel&&!(this.mode.endsWith("a")||this.mode.endsWith("a-css")),"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,a={ArrowUp:1,ArrowRight:1,ArrowDown:-1,ArrowLeft:-1};if(a[i]){e.preventDefault();let o=a[i]*t,l=this.baseColorFieldColor.hue(),n=this.baseColorFieldColor.hue(l+o);this.internalColorSet(n,!1)}}handleHexInputChange(e){e.stopPropagation();let{isClearable:t,color:i}=this,a=e.target.value;if(t&&!a){this.internalColorSet(null);return}let o=i&&P(w(i,k(this.mode)));a!==o&&this.internalColorSet(b(a))}handleSavedColorSelect(e){let t=e.currentTarget;this.internalColorSet(b(t.color))}handleChannelInput(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),a=i===3?S.max:this.channelMode==="rgb"?$[Object.keys($)[i]]:p[Object.keys(p)[i]],o;if(!t.value)o="",this.isActiveChannelInputEmpty=!0,this.upOrDownArrowKeyTracker=null;else{let l=Number(t.value)+this.shiftKeyChannelAdjustment;o=de(l,0,a).toString()}t.value=o,o!==""&&this.shiftKeyChannelAdjustment!==0?this.handleChannelChange(e):o!==""&&this.handleChannelChange(e)}handleChannelBlur(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),a=[...this.channels];!t.value&&!this.isClearable&&(t.value=a[i]?.toString())}handleChannelFocus(e){e.currentTarget.selectText()}handleChannelKeyUpOrDown(e){this.shiftKeyChannelAdjustment=0;let{key:t}=e;if(t!=="ArrowUp"&&t!=="ArrowDown"||!e.composedPath().some(o=>o.classList?.contains(s.channel)))return;let{shiftKey:i}=e;if(e.preventDefault(),!this.color){this.internalColorSet(this.previousColor),e.stopPropagation();return}let a=9;this.shiftKeyChannelAdjustment=t==="ArrowUp"&&i?a:t==="ArrowDown"&&i?-9:0,t==="ArrowUp"&&(this.upOrDownArrowKeyTracker="up"),t==="ArrowDown"&&(this.upOrDownArrowKeyTracker="down")}getChannelInputLimit(e){return this.channelMode==="rgb"?$[Object.keys($)[e]]:p[Object.keys(p)[e]]}handleChannelChange(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),a=[...this.channels];if(this.isClearable&&!t.value){this.channels=[null,null,null,null],this.internalColorSet(null);return}let o=i===3;this.isActiveChannelInputEmpty&&this.upOrDownArrowKeyTracker&&(t.value=this.upOrDownArrowKeyTracker==="up"?(a[i]+1<=this.getChannelInputLimit(i)?a[i]+1:this.getChannelInputLimit(i)).toString():(a[i]-1>=0?a[i]-1:0).toString(),this.isActiveChannelInputEmpty=!1,this.upOrDownArrowKeyTracker=null);let l=t.value?Number(t.value):a[i];a[i]=o?K(l):l,this.updateColorFromChannels(a)}handleSavedColorKeyDown(e){le(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,a){L(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(a))}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,a=k(e);if(i&&!a){let o=he(e);return t&&console.warn(`setting format to (${o}) as the provided one (${e}) does not support alpha`),o}if(!i&&a){let o=W(e);return t&&console.warn(`setting format to (${o}) as the provided one (${e}) does not support alpha`),o}return e}captureHueSliderColor(e){let t=M/this.effectiveSliderWidth*e;this.internalColorSet(this.baseColorFieldColor.hue(t),!1)}captureOpacitySliderValue(e){let t=K(S.max/this.effectiveSliderWidth*e);this.internalColorSet(this.baseColorFieldColor.alpha(t),!1)}internalColorSet(e,t=!0,i="user-interaction"){t&&E(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 P(w(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 o=a.slice(0,3),l=a.slice(4,-1);return`${o}a(${l}, ${e.alpha()})`}return a}let i=e[W(t)]().round().object();return t.endsWith("a")?se(i):i}getSliderCapSpacing(){let{dimensions:{slider:{height:e},thumb:{radius:t}}}=this;return t*2-e}updateDimensions(e="m"){this.dimensions=D[e]}deleteColor(){let e=w(this.color,this.alphaChannel);if(!(this.savedColors.indexOf(e)>-1))return;let t=this.savedColors.filter(a=>a!==e);this.savedColors=t;let i=`${F}${this.storageId}`;this.storageId&&localStorage.setItem(i,JSON.stringify(t))}saveColor(){let e=w(this.color,this.alphaChannel);if(this.savedColors.indexOf(e)>-1)return;let t=[...this.savedColors,e];this.savedColors=t;let i=`${F}${this.storageId}`;this.storageId&&localStorage.setItem(i,JSON.stringify(t))}drawColorField(){let e=this.colorFieldRenderingContext,{dimensions:{colorField:{height:t,width:i}}}=this;e.fillStyle=this.baseColorFieldColor.hsv().saturationv(100).value(100).alpha(1).string(),e.fillRect(0,0,i,t);let a=e.createLinearGradient(0,0,i,0);a.addColorStop(0,"rgba(255,255,255,1)"),a.addColorStop(1,"rgba(255,255,255,0)"),e.fillStyle=a,e.fillRect(0,0,i,t);let o=e.createLinearGradient(0,0,0,t);o.addColorStop(0,"rgba(0,0,0,0)"),o.addColorStop(1,"rgba(0,0,0,1)"),e.fillStyle=o,e.fillRect(0,0,i,t),this.drawActiveColorFieldColor()}setCanvasContextSize(e,{height:t,width:i}){if(!e)return;let a=window.devicePixelRatio||1;e.width=i*a,e.height=t*a,e.style.height=`${t}px`,e.style.width=`${i}px`,e.getContext("2d").scale(a,a)}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{dimensions:t}=this;(e==="all"||e==="color-field")&&this.setCanvasContextSize(this.colorFieldRenderingContext?.canvas,t.colorField);let i={width:this.effectiveSliderWidth,height:t.slider.height+(t.thumb.radius-t.slider.height/2)*2};(e==="all"||e==="hue-slider")&&this.setCanvasContextSize(this.hueSliderRenderingContext?.canvas,i),(e==="all"||e==="opacity-slider")&&this.setCanvasContextSize(this.opacitySliderRenderingContext?.canvas,i)}drawActiveColorFieldColor(){let{color:e}=this;if(!e)return;let t=e.hsv(),{dimensions:{colorField:{height:i,width:a},thumb:{radius:o}}}=this,l=t.saturationv()/(p.s/a),n=i-t.value()/(p.v/i);requestAnimationFrame(()=>{this.colorFieldScopeLeft=l,this.colorFieldScopeTop=n}),this.drawThumb(this.colorFieldRenderingContext,o,l,n,t,!1)}drawThumb(e,t,i,a,o,l){let n=2*Math.PI,r=1;if(e.beginPath(),e.arc(i,a,t,0,n),e.fillStyle="#fff",e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=r,e.stroke(),l&&o.alpha()<1){let d=e.createPattern(this.getCheckeredBackgroundPattern(),"repeat");e.beginPath(),e.arc(i,a,t-3,0,n),e.fillStyle=d,e.fill()}e.globalCompositeOperation="source-atop",e.beginPath(),e.arc(i,a,t-3,0,n);let c=l?o.alpha():1;e.fillStyle=o.rgb().alpha(c).string(),e.fill(),e.globalCompositeOperation="source-over"}drawActiveHueSliderColor(){let{color:e}=this;if(!e)return;let t=e.hsv().saturationv(100).value(100),{dimensions:{thumb:{radius:i}}}=this,a=this.effectiveSliderWidth,o=t.hue()/(M/a),l=i,n=this.getSliderBoundX(o,a,i);requestAnimationFrame(()=>{this.hueScopeLeft=n}),this.drawThumb(this.hueSliderRenderingContext,i,n,l,t,!1)}drawHueSlider(){let e=this.hueSliderRenderingContext,{dimensions:{slider:{height:t},thumb:{radius:i}}}=this,a=0,o=i-t/2,l=this.effectiveSliderWidth,n=e.createLinearGradient(0,0,l,0),r=["red","yellow","lime","cyan","blue","magenta","#ff0004"],c=1/(r.length-1),d=0;r.forEach(u=>{n.addColorStop(d,b(u).string()),d+=c}),e.clearRect(0,0,l,t+this.getSliderCapSpacing()*2),this.drawSliderPath(e,t,l,a,o),e.fillStyle=n,e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=1,e.stroke(),this.drawActiveHueSliderColor()}drawOpacitySlider(){let e=this.opacitySliderRenderingContext,{baseColorFieldColor:t,dimensions:{slider:{height:i},thumb:{radius:a}}}=this,o=0,l=a-i/2,n=this.effectiveSliderWidth;e.clearRect(0,0,n,i+this.getSliderCapSpacing()*2);let r=e.createLinearGradient(0,l,n,0),c=t.rgb().alpha(0),d=t.rgb().alpha(.5),u=t.rgb().alpha(1);r.addColorStop(0,c.string()),r.addColorStop(.5,d.string()),r.addColorStop(1,u.string()),this.drawSliderPath(e,i,n,o,l);let m=e.createPattern(this.getCheckeredBackgroundPattern(),"repeat");e.fillStyle=m,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,a,o){let l=t/2+1;e.beginPath(),e.moveTo(a+l,o),e.lineTo(a+i-l,o),e.quadraticCurveTo(a+i,o,a+i,o+l),e.lineTo(a+i,o+t-l),e.quadraticCurveTo(a+i,o+t,a+i-l,o+t),e.lineTo(a+l,o+t),e.quadraticCurveTo(a,o+t,a,o+t-l),e.lineTo(a,o+l),e.quadraticCurveTo(a,o,a+l,o),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,{dimensions:{thumb:{radius:i}}}=this,a=this.effectiveSliderWidth,o=O(t.alpha())/(S.max/a),l=i,n=this.getSliderBoundX(o,a,i);requestAnimationFrame(()=>{this.opacityScopeLeft=n}),this.drawThumb(this.opacitySliderRenderingContext,i,n,l,t,!0)}getSliderBoundX(e,t,i){let a=pe(e,t,i);return a===0?e:a===-1?N(e,0,t,i,i*2):N(e,0,t,t-i*2,t-i)}storeOpacityScope(e){this.opacityScopeNode=e}handleOpacityScopeKeyDown(e){let t=e.shiftKey?10:1,{key:i}=e,a={ArrowUp:.01,ArrowRight:.01,ArrowDown:-.01,ArrowLeft:-.01};if(a[i]){e.preventDefault();let o=a[i]*t,l=this.baseColorFieldColor.alpha(),n=this.baseColorFieldColor.alpha(l+o);this.internalColorSet(n,!1)}}updateColorFromChannels(e){this.internalColorSet(b(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((a,o)=>o===3?a:Math.floor(a));return i.length===3&&i.push(1),i}getAdjustedScopePosition(e,t){return[e-H/2,t-H/2]}render(){let{channelsDisabled:e,color:t,colorFieldScopeLeft:i,colorFieldScopeTop:a,dimensions:{thumb:{radius:o}},hexDisabled:l,hueScopeLeft:n,messages:r,alphaChannel:c,opacityScopeLeft:d,savedColors:u,savedDisabled:m,scale:g,scopeOrientation:ue}=this,V=this.effectiveSliderWidth,_=t?w(t,c):null,Ce=o,ve=n??V*v.hue()/p.h,ge=o,me=d??V*O(v.alpha())/S.max,B=t===void 0,T=ue==="vertical",[fe,be]=this.getAdjustedScopePosition(i,a),[Se,we]=this.getAdjustedScopePosition(ve,Ce),[ye,xe]=this.getAdjustedScopePosition(me,ge);return ie({disabled:this.disabled,children:C`<div class=${h(s.container)}><div class=${h(s.controlAndScope)}><canvas class=${h(s.colorField)} @pointerdown=${this.handleColorFieldPointerDown} ${f(this.initColorField)}></canvas><div .ariaLabel=${T?r.value:r.saturation} .ariaValueMax=${T?p.v:p.s} aria-valuemin=0 .ariaValueNow=${(T?t?.saturationv():t?.value())||"0"} class=${h({[s.scope]:!0,[s.colorFieldScope]:!0})} @keydown=${this.handleColorFieldScopeKeyDown} role=slider style=${x({top:`${be||0}px`,left:`${fe||0}px`})} tabindex=0 ${f(this.storeColorFieldScope)}></div></div><div class=${h(s.previewAndSliders)}><calcite-color-picker-swatch class=${h(s.preview)} .color=${_} .scale=${this.alphaChannel?"l":this.scale}></calcite-color-picker-swatch><div class=${h(s.sliders)}><div class=${h(s.controlAndScope)}><canvas class=${h({[s.slider]:!0,[s.hueSlider]:!0})} @pointerdown=${this.handleHueSliderPointerDown} ${f(this.initHueSlider)}></canvas><div .ariaLabel=${r.hue} .ariaValueMax=${p.h} aria-valuemin=0 .ariaValueNow=${t?.round().hue()||v.round().hue()} class=${h({[s.scope]:!0,[s.hueScope]:!0})} @keydown=${this.handleHueScopeKeyDown} role=slider style=${x({top:`${we}px`,left:`${Se}px`})} tabindex=0 ${f(this.storeHueScope)}></div></div>${c?C`<div class=${h(s.controlAndScope)}><canvas class=${h({[s.slider]:!0,[s.opacitySlider]:!0})} @pointerdown=${this.handleOpacitySliderPointerDown} ${f(this.initOpacitySlider)}></canvas><div .ariaLabel=${r.opacity} .ariaValueMax=${S.max} .ariaValueMin=${S.min} .ariaValueNow=${(t||v).round().alpha()} class=${h({[s.scope]:!0,[s.opacityScope]:!0})} @keydown=${this.handleOpacityScopeKeyDown} role=slider style=${x({top:`${xe}px`,left:`${ye}px`})} tabindex=0 ${f(this.storeOpacityScope)}></div></div>`:null}</div></div>${l&&e?null:C`<div class=${h({[s.controlSection]:!0,[s.section]:!0})}><div class=${h(s.hexAndChannelsGroup)}>${l?null:C`<div class=${h(s.hexOptions)}><calcite-color-picker-hex-input .allowEmpty=${this.isClearable} .alphaChannel=${c} class=${h(s.control)} .messages=${r} .numberingSystem=${this.numberingSystem} @calciteColorPickerHexInputChange=${this.handleHexInputChange} .scale=${g} .value=${_}></calcite-color-picker-hex-input></div>`}${e?null:C`<calcite-tabs class=${h({[s.colorModeContainer]:!0,[s.splitSection]:!0})} .scale=${g==="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>`}${m?null:C`<div class=${h({[s.savedColorsSection]:!0,[s.section]:!0})}><div class=${h(s.header)}><label>${r.saved}</label><div class=${h(s.savedColorsButtons)}><calcite-button appearance=transparent class=${h(s.deleteColor)} .disabled=${B} icon-start=minus kind=neutral .label=${r.deleteColor} @click=${this.deleteColor} .scale=${g} type=button></calcite-button><calcite-button appearance=transparent class=${h(s.saveColor)} .disabled=${B} icon-start=plus kind=neutral .label=${r.saveColor} @click=${this.saveColor} .scale=${g} type=button></calcite-button></div></div>${u.length>0?C`<div class=${h(s.savedColors)}>${ne(u,I=>I,I=>C`<calcite-color-picker-swatch class=${h(s.savedColor)} .color=${I} @click=${this.handleSavedColorSelect} @keydown=${this.handleSavedColorKeyDown} .scale=${g} tabindex=0></calcite-color-picker-swatch>`)}</div>`:null}</div>`}</div>`})}renderChannelsTabTitle(e){let{channelMode:t,messages:i}=this,a=e===t,o=e==="rgb"?i.rgb:i.hsv;return A(e,C`<calcite-tab-title class=${h(s.colorMode)} data-color-mode=${e??y} @calciteTabsActivate=${this.handleTabActivate} .selected=${a}>${o}</calcite-tab-title>`)}renderChannelsTab(e){let{isClearable:t,channelMode:i,channels:a,messages:o,alphaChannel:l}=this,n=e===i,r=e==="rgb"?[o.red,o.green,o.blue]:[o.hue,o.saturation,o.value],c=J(this.el),d=l?a:a.slice(0,3);return A(e,C`<calcite-tab class=${h(s.control)} .selected=${n}><div class=${h(s.channels)} dir=ltr>${d.map((u,m)=>{let g=m===3;return g&&(u=t&&!u?u:O(u)),this.renderChannel(u,m,r[m],c,g?"%":"")})}</div></calcite-tab>`)}renderChannel(e,t,i,a,o){return A(t,C`<calcite-input-number class=${h(s.channel)} data-channel-index=${t??y} dir=${a??y} .label=${i} lang=${this.messages._lang??y} 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=${x({marginLeft:t>0&&!(this.scale==="s"&&this.alphaChannel&&t===3)?"-1px":""})} .suffixText=${o} .value=${e?.toString()}></calcite-input-number>`)}};G("calcite-color-picker",j);export{j as ColorPicker};
|
|
6
|
+
import{a as de,d as N,e as pe}from"./FIIUQUW3.js";import{a as ne}from"./KH6NGGEK.js";import{A as he,B as W,C as ce,a as b,b as s,c as v,d as F,e as $,f as p,g as M,h as S,i as D,j as H,l as O,m as K,q as P,r as w,t as se,u as re,w as U,x as z,y as E,z as k}from"./3DTKXAXS.js";import"./ON3PLUOP.js";import{a as te,b as ie}from"./YGYL5EWA.js";import{a as A}from"./Y3BMQ26L.js";import{d as oe}from"./G2JE6NWB.js";import{a as le}from"./KIXCX2AK.js";import{a as ae}from"./VTQMGX2I.js";import{b as f}from"./ZE4G7GXI.js";import{e as J,n as Y,x as L}from"./4FU7RE33.js";import{a as Q,b as Z,d as ee}from"./HQLR4YL6.js";import"./K2UZIGDO.js";import{I as G,d as q,e as C,i as y,u as R,v as X,w as h,x}from"./DMYTLYTD.js";var $e=q`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-color-picker-spacing: 8px}:host([scale=s]) .container{inline-size:198px}:host([scale=s]) .saved-colors{gap:.25rem;grid-template-columns:repeat(auto-fill,20px)}:host([scale=m]){--calcite-color-picker-spacing: 12px}:host([scale=m]) .container{inline-size:238px}:host([scale=l]){--calcite-color-picker-spacing: 16px;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) .container{inline-size:302px}: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{flex-wrap:nowrap;align-items:baseline;flex-wrap:wrap}:host([scale=l]) .color-hex-options{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:inline-block;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{inline-size:100%}.hex-and-channels-group,.control-section{display:flex;flex-direction:row;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}`,ke=16,j=class extends X{constructor(){super(),this.captureColorFieldColor=(e,t,i=!0)=>{let{dimensions:{colorField:{height:a,width:o}}}=this,l=Math.round(p.s/o*e),n=Math.round(p.v/a*(a-t));this.internalColorSet(this.baseColorFieldColor.hsv().saturationv(l).value(n),i)},this._color=v,this.drawColorControls=oe((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()},ke),this.globalPointerMoveHandler=e=>{let{activeCanvasInfo:t,el:i}=this;if(!i.isConnected||!t)return;let{context:a,bounds:o}=t,l,n,{clientX:r,clientY:c}=e;a.canvas.matches(":hover")?(l=r-o.x,n=c-o.y):(r<o.x+o.width&&r>o.x?l=r-o.x:r<o.x?l=0:l=o.width,c<o.y+o.height&&c>o.y?n=c-o.y:c<o.y?n=0:n=o.height),a===this.colorFieldRenderingContext?this.captureColorFieldColor(l,n,!1):a===this.hueSliderRenderingContext?this.captureHueSliderColor(l):a===this.opacitySliderRenderingContext&&this.captureOpacitySliderValue(l)},this.globalPointerUpHandler=e=>{if(!L(e))return;let t=this.activeCanvasInfo;this.activeCanvasInfo=null,this.drawColorControls(),t&&this.calciteColorPickerChange.emit()},this.internalColorUpdateContext=null,this.isActiveChannelInputEmpty=!1,this.mode=U.HEX,this.shiftKeyChannelAdjustment=0,this.upOrDownArrowKeyTracker=null,this._valueWasSet=!1,this.channelMode="rgb",this.channels=this.toChannels(v),this.dimensions=D.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=R({cancelable:!1}),this.calciteColorPickerInput=R({cancelable:!1}),this.listen("keydown",this.handleChannelKeyUpOrDown,{capture:!0}),this.listen("keyup",this.handleChannelKeyUpOrDown,{capture:!0})}static{this.properties={channelMode:16,channels:16,colorFieldScopeLeft:16,colorFieldScopeTop:16,dimensions:16,hueScopeLeft:16,opacityScopeLeft:16,savedColors:16,scopeOrientation:16,allowEmpty:7,alphaChannel:5,channelsDisabled:5,clearable:7,color:0,disabled:7,format:3,hexDisabled:5,messageOverrides:0,numberingSystem:3,savedDisabled:7,scale:3,storageId:3,value:1}}static{this.styles=$e}get baseColorFieldColor(){return this.color||this.previousColor||v}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 ee(this),Y(this.el)}async load(){this._valueWasSet||(this._value??=P(w(v,this.alphaChannel))),Q(this),this.handleAllowEmptyOrClearableChange(),this.handleAlphaChannelDimensionsChange();let{isClearable:e,color:t,format:i,value:a}=this,o=e&&!a,l=z(a),n=o||i==="auto"&&l||i===l,r=o?null:n?b(a):t;n||this.showIncompatibleColorWarning(a,i),this.setMode(i,!1),this.internalColorSet(r,!1,"initial"),this.updateDimensions(this.scale);let c=`${F}${this.storageId}`;this.storageId&&localStorage.getItem(c)&&(this.savedColors=JSON.parse(localStorage.getItem(c)))}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),(e.has("alphaChannel")&&(this.hasUpdated||this.alphaChannel!==!1)||e.has("dimensions")&&(this.hasUpdated||this.dimensions!==D.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(){te(this)}loaded(){Z(this)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("pointermove",this.globalPointerMoveHandler),window.removeEventListener("pointerup",this.globalPointerUpHandler)}handleAllowEmptyOrClearableChange(){this.isClearable=this.clearable||this.allowEmpty}handleAlphaChannelChange(e){let{format:t}=this;e&&t!=="auto"&&!k(t)&&(console.warn(`ignoring alphaChannel as the current format (${t}) does not support alpha`),this.alphaChannel=!1)}handleAlphaChannelDimensionsChange(){this.effectiveSliderWidth=ce(this.dimensions,this.alphaChannel),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.updateDimensions(e),this.updateCanvasSize("all"),this.drawColorControls()}handleValueChange(e,t){let{isClearable:i,format:a}=this,o=!i||e,l=!1;if(o){let d=z(e);if(!d||a!=="auto"&&d!==a){this.showIncompatibleColorWarning(e,a),this._value=t;return}l=this.mode!==d,this.setMode(d,this.internalColorUpdateContext===null)}let n=this.activeCanvasInfo;if(this.internalColorUpdateContext==="initial")return;if(this.internalColorUpdateContext==="user-interaction"){this.calciteColorPickerInput.emit(),n||this.calciteColorPickerChange.emit();return}let r=i&&!e?null:b(e!=null&&typeof e=="object"&&k(this.mode)?re(e):e),c=!E(r,this.color);(l||c)&&this.internalColorSet(r,this.alphaChannel&&!(this.mode.endsWith("a")||this.mode.endsWith("a-css")),"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,a={ArrowUp:1,ArrowRight:1,ArrowDown:-1,ArrowLeft:-1};if(a[i]){e.preventDefault();let o=a[i]*t,l=this.baseColorFieldColor.hue(),n=this.baseColorFieldColor.hue(l+o);this.internalColorSet(n,!1)}}handleHexInputChange(e){e.stopPropagation();let{isClearable:t,color:i}=this,a=e.target.value;if(t&&!a){this.internalColorSet(null);return}let o=i&&P(w(i,k(this.mode)));a!==o&&this.internalColorSet(b(a))}handleSavedColorSelect(e){let t=e.currentTarget;this.internalColorSet(b(t.color))}handleChannelInput(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),a=i===3?S.max:this.channelMode==="rgb"?$[Object.keys($)[i]]:p[Object.keys(p)[i]],o;if(!t.value)o="",this.isActiveChannelInputEmpty=!0,this.upOrDownArrowKeyTracker=null;else{let l=Number(t.value)+this.shiftKeyChannelAdjustment;o=de(l,0,a).toString()}t.value=o,o!==""&&this.shiftKeyChannelAdjustment!==0?this.handleChannelChange(e):o!==""&&this.handleChannelChange(e)}handleChannelBlur(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),a=[...this.channels];!t.value&&!this.isClearable&&(t.value=a[i]?.toString())}handleChannelFocus(e){e.currentTarget.selectText()}handleChannelKeyUpOrDown(e){this.shiftKeyChannelAdjustment=0;let{key:t}=e;if(t!=="ArrowUp"&&t!=="ArrowDown"||!e.composedPath().some(o=>o.classList?.contains(s.channel)))return;let{shiftKey:i}=e;if(e.preventDefault(),!this.color){this.internalColorSet(this.previousColor),e.stopPropagation();return}let a=9;this.shiftKeyChannelAdjustment=t==="ArrowUp"&&i?a:t==="ArrowDown"&&i?-9:0,t==="ArrowUp"&&(this.upOrDownArrowKeyTracker="up"),t==="ArrowDown"&&(this.upOrDownArrowKeyTracker="down")}getChannelInputLimit(e){return this.channelMode==="rgb"?$[Object.keys($)[e]]:p[Object.keys(p)[e]]}handleChannelChange(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),a=[...this.channels];if(this.isClearable&&!t.value){this.channels=[null,null,null,null],this.internalColorSet(null);return}let o=i===3;this.isActiveChannelInputEmpty&&this.upOrDownArrowKeyTracker&&(t.value=this.upOrDownArrowKeyTracker==="up"?(a[i]+1<=this.getChannelInputLimit(i)?a[i]+1:this.getChannelInputLimit(i)).toString():(a[i]-1>=0?a[i]-1:0).toString(),this.isActiveChannelInputEmpty=!1,this.upOrDownArrowKeyTracker=null);let l=t.value?Number(t.value):a[i];a[i]=o?K(l):l,this.updateColorFromChannels(a)}handleSavedColorKeyDown(e){le(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,a){L(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(a))}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,a=k(e);if(i&&!a){let o=he(e);return t&&console.warn(`setting format to (${o}) as the provided one (${e}) does not support alpha`),o}if(!i&&a){let o=W(e);return t&&console.warn(`setting format to (${o}) as the provided one (${e}) does not support alpha`),o}return e}captureHueSliderColor(e){let t=M/this.effectiveSliderWidth*e;this.internalColorSet(this.baseColorFieldColor.hue(t),!1)}captureOpacitySliderValue(e){let t=K(S.max/this.effectiveSliderWidth*e);this.internalColorSet(this.baseColorFieldColor.alpha(t),!1)}internalColorSet(e,t=!0,i="user-interaction"){t&&E(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 P(w(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 o=a.slice(0,3),l=a.slice(4,-1);return`${o}a(${l}, ${e.alpha()})`}return a}let i=e[W(t)]().round().object();return t.endsWith("a")?se(i):i}getSliderCapSpacing(){let{dimensions:{slider:{height:e},thumb:{radius:t}}}=this;return t*2-e}updateDimensions(e="m"){this.dimensions=D[e]}deleteColor(){let e=w(this.color,this.alphaChannel);if(!(this.savedColors.indexOf(e)>-1))return;let t=this.savedColors.filter(a=>a!==e);this.savedColors=t;let i=`${F}${this.storageId}`;this.storageId&&localStorage.setItem(i,JSON.stringify(t))}saveColor(){let e=w(this.color,this.alphaChannel);if(this.savedColors.indexOf(e)>-1)return;let t=[...this.savedColors,e];this.savedColors=t;let i=`${F}${this.storageId}`;this.storageId&&localStorage.setItem(i,JSON.stringify(t))}drawColorField(){let e=this.colorFieldRenderingContext,{dimensions:{colorField:{height:t,width:i}}}=this;e.fillStyle=this.baseColorFieldColor.hsv().saturationv(100).value(100).alpha(1).string(),e.fillRect(0,0,i,t);let a=e.createLinearGradient(0,0,i,0);a.addColorStop(0,"rgba(255,255,255,1)"),a.addColorStop(1,"rgba(255,255,255,0)"),e.fillStyle=a,e.fillRect(0,0,i,t);let o=e.createLinearGradient(0,0,0,t);o.addColorStop(0,"rgba(0,0,0,0)"),o.addColorStop(1,"rgba(0,0,0,1)"),e.fillStyle=o,e.fillRect(0,0,i,t),this.drawActiveColorFieldColor()}setCanvasContextSize(e,{height:t,width:i}){if(!e)return;let a=window.devicePixelRatio||1;e.width=i*a,e.height=t*a,e.style.height=`${t}px`,e.style.width=`${i}px`,e.getContext("2d").scale(a,a)}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{dimensions:t}=this;(e==="all"||e==="color-field")&&this.setCanvasContextSize(this.colorFieldRenderingContext?.canvas,t.colorField);let i={width:this.effectiveSliderWidth,height:t.slider.height+(t.thumb.radius-t.slider.height/2)*2};(e==="all"||e==="hue-slider")&&this.setCanvasContextSize(this.hueSliderRenderingContext?.canvas,i),(e==="all"||e==="opacity-slider")&&this.setCanvasContextSize(this.opacitySliderRenderingContext?.canvas,i)}drawActiveColorFieldColor(){let{color:e}=this;if(!e)return;let t=e.hsv(),{dimensions:{colorField:{height:i,width:a},thumb:{radius:o}}}=this,l=t.saturationv()/(p.s/a),n=i-t.value()/(p.v/i);requestAnimationFrame(()=>{this.colorFieldScopeLeft=l,this.colorFieldScopeTop=n}),this.drawThumb(this.colorFieldRenderingContext,o,l,n,t,!1)}drawThumb(e,t,i,a,o,l){let n=2*Math.PI,r=1;if(e.beginPath(),e.arc(i,a,t,0,n),e.fillStyle="#fff",e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=r,e.stroke(),l&&o.alpha()<1){let d=e.createPattern(this.getCheckeredBackgroundPattern(),"repeat");e.beginPath(),e.arc(i,a,t-3,0,n),e.fillStyle=d,e.fill()}e.globalCompositeOperation="source-atop",e.beginPath(),e.arc(i,a,t-3,0,n);let c=l?o.alpha():1;e.fillStyle=o.rgb().alpha(c).string(),e.fill(),e.globalCompositeOperation="source-over"}drawActiveHueSliderColor(){let{color:e}=this;if(!e)return;let t=e.hsv().saturationv(100).value(100),{dimensions:{thumb:{radius:i}}}=this,a=this.effectiveSliderWidth,o=t.hue()/(M/a),l=i,n=this.getSliderBoundX(o,a,i);requestAnimationFrame(()=>{this.hueScopeLeft=n}),this.drawThumb(this.hueSliderRenderingContext,i,n,l,t,!1)}drawHueSlider(){let e=this.hueSliderRenderingContext,{dimensions:{slider:{height:t},thumb:{radius:i}}}=this,a=0,o=i-t/2,l=this.effectiveSliderWidth,n=e.createLinearGradient(0,0,l,0),r=["red","yellow","lime","cyan","blue","magenta","#ff0004"],c=1/(r.length-1),d=0;r.forEach(u=>{n.addColorStop(d,b(u).string()),d+=c}),e.clearRect(0,0,l,t+this.getSliderCapSpacing()*2),this.drawSliderPath(e,t,l,a,o),e.fillStyle=n,e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=1,e.stroke(),this.drawActiveHueSliderColor()}drawOpacitySlider(){let e=this.opacitySliderRenderingContext,{baseColorFieldColor:t,dimensions:{slider:{height:i},thumb:{radius:a}}}=this,o=0,l=a-i/2,n=this.effectiveSliderWidth;e.clearRect(0,0,n,i+this.getSliderCapSpacing()*2);let r=e.createLinearGradient(0,l,n,0),c=t.rgb().alpha(0),d=t.rgb().alpha(.5),u=t.rgb().alpha(1);r.addColorStop(0,c.string()),r.addColorStop(.5,d.string()),r.addColorStop(1,u.string()),this.drawSliderPath(e,i,n,o,l);let m=e.createPattern(this.getCheckeredBackgroundPattern(),"repeat");e.fillStyle=m,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,a,o){let l=t/2+1;e.beginPath(),e.moveTo(a+l,o),e.lineTo(a+i-l,o),e.quadraticCurveTo(a+i,o,a+i,o+l),e.lineTo(a+i,o+t-l),e.quadraticCurveTo(a+i,o+t,a+i-l,o+t),e.lineTo(a+l,o+t),e.quadraticCurveTo(a,o+t,a,o+t-l),e.lineTo(a,o+l),e.quadraticCurveTo(a,o,a+l,o),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,{dimensions:{thumb:{radius:i}}}=this,a=this.effectiveSliderWidth,o=O(t.alpha())/(S.max/a),l=i,n=this.getSliderBoundX(o,a,i);requestAnimationFrame(()=>{this.opacityScopeLeft=n}),this.drawThumb(this.opacitySliderRenderingContext,i,n,l,t,!0)}getSliderBoundX(e,t,i){let a=pe(e,t,i);return a===0?e:a===-1?N(e,0,t,i,i*2):N(e,0,t,t-i*2,t-i)}storeOpacityScope(e){this.opacityScopeNode=e}handleOpacityScopeKeyDown(e){let t=e.shiftKey?10:1,{key:i}=e,a={ArrowUp:.01,ArrowRight:.01,ArrowDown:-.01,ArrowLeft:-.01};if(a[i]){e.preventDefault();let o=a[i]*t,l=this.baseColorFieldColor.alpha(),n=this.baseColorFieldColor.alpha(l+o);this.internalColorSet(n,!1)}}updateColorFromChannels(e){this.internalColorSet(b(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((a,o)=>o===3?a:Math.floor(a));return i.length===3&&i.push(1),i}getAdjustedScopePosition(e,t){return[e-H/2,t-H/2]}render(){let{channelsDisabled:e,color:t,colorFieldScopeLeft:i,colorFieldScopeTop:a,dimensions:{thumb:{radius:o}},hexDisabled:l,hueScopeLeft:n,messages:r,alphaChannel:c,opacityScopeLeft:d,savedColors:u,savedDisabled:m,scale:g,scopeOrientation:ue}=this,V=this.effectiveSliderWidth,_=t?w(t,c):null,Ce=o,ve=n??V*v.hue()/p.h,ge=o,me=d??V*O(v.alpha())/S.max,B=t===void 0,T=ue==="vertical",[fe,be]=this.getAdjustedScopePosition(i,a),[Se,we]=this.getAdjustedScopePosition(ve,Ce),[ye,xe]=this.getAdjustedScopePosition(me,ge);return ie({disabled:this.disabled,children:C`<div class=${h(s.container)}><div class=${h(s.controlAndScope)}><canvas class=${h(s.colorField)} @pointerdown=${this.handleColorFieldPointerDown} ${f(this.initColorField)}></canvas><div .ariaLabel=${T?r.value:r.saturation} .ariaValueMax=${T?p.v:p.s} aria-valuemin=0 .ariaValueNow=${(T?t?.saturationv():t?.value())||"0"} class=${h({[s.scope]:!0,[s.colorFieldScope]:!0})} @keydown=${this.handleColorFieldScopeKeyDown} role=slider style=${x({top:`${be||0}px`,left:`${fe||0}px`})} tabindex=0 ${f(this.storeColorFieldScope)}></div></div><div class=${h(s.previewAndSliders)}><calcite-color-picker-swatch class=${h(s.preview)} .color=${_} .scale=${this.alphaChannel?"l":this.scale}></calcite-color-picker-swatch><div class=${h(s.sliders)}><div class=${h(s.controlAndScope)}><canvas class=${h({[s.slider]:!0,[s.hueSlider]:!0})} @pointerdown=${this.handleHueSliderPointerDown} ${f(this.initHueSlider)}></canvas><div .ariaLabel=${r.hue} .ariaValueMax=${p.h} aria-valuemin=0 .ariaValueNow=${t?.round().hue()||v.round().hue()} class=${h({[s.scope]:!0,[s.hueScope]:!0})} @keydown=${this.handleHueScopeKeyDown} role=slider style=${x({top:`${we}px`,left:`${Se}px`})} tabindex=0 ${f(this.storeHueScope)}></div></div>${c?C`<div class=${h(s.controlAndScope)}><canvas class=${h({[s.slider]:!0,[s.opacitySlider]:!0})} @pointerdown=${this.handleOpacitySliderPointerDown} ${f(this.initOpacitySlider)}></canvas><div .ariaLabel=${r.opacity} .ariaValueMax=${S.max} .ariaValueMin=${S.min} .ariaValueNow=${(t||v).round().alpha()} class=${h({[s.scope]:!0,[s.opacityScope]:!0})} @keydown=${this.handleOpacityScopeKeyDown} role=slider style=${x({top:`${xe}px`,left:`${ye}px`})} tabindex=0 ${f(this.storeOpacityScope)}></div></div>`:null}</div></div>${l&&e?null:C`<div class=${h({[s.controlSection]:!0,[s.section]:!0})}><div class=${h(s.hexAndChannelsGroup)}>${l?null:C`<div class=${h(s.hexOptions)}><calcite-color-picker-hex-input .allowEmpty=${this.isClearable} .alphaChannel=${c} class=${h(s.control)} .messages=${r} .numberingSystem=${this.numberingSystem} @calciteColorPickerHexInputChange=${this.handleHexInputChange} .scale=${g} .value=${_}></calcite-color-picker-hex-input></div>`}${e?null:C`<calcite-tabs class=${h({[s.colorModeContainer]:!0,[s.splitSection]:!0})} .scale=${g==="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>`}${m?null:C`<div class=${h({[s.savedColorsSection]:!0,[s.section]:!0})}><div class=${h(s.header)}><label>${r.saved}</label><div class=${h(s.savedColorsButtons)}><calcite-button appearance=transparent class=${h(s.deleteColor)} .disabled=${B} icon-start=minus kind=neutral .label=${r.deleteColor} @click=${this.deleteColor} .scale=${g} type=button></calcite-button><calcite-button appearance=transparent class=${h(s.saveColor)} .disabled=${B} icon-start=plus kind=neutral .label=${r.saveColor} @click=${this.saveColor} .scale=${g} type=button></calcite-button></div></div>${u.length>0?C`<div class=${h(s.savedColors)}>${ne(u,I=>I,I=>C`<calcite-color-picker-swatch class=${h(s.savedColor)} .color=${I} @click=${this.handleSavedColorSelect} @keydown=${this.handleSavedColorKeyDown} .scale=${g} tabindex=0></calcite-color-picker-swatch>`)}</div>`:null}</div>`}</div>`})}renderChannelsTabTitle(e){let{channelMode:t,messages:i}=this,a=e===t,o=e==="rgb"?i.rgb:i.hsv;return A(e,C`<calcite-tab-title class=${h(s.colorMode)} data-color-mode=${e??y} @calciteTabsActivate=${this.handleTabActivate} .selected=${a}>${o}</calcite-tab-title>`)}renderChannelsTab(e){let{isClearable:t,channelMode:i,channels:a,messages:o,alphaChannel:l}=this,n=e===i,r=e==="rgb"?[o.red,o.green,o.blue]:[o.hue,o.saturation,o.value],c=J(this.el),d=l?a:a.slice(0,3);return A(e,C`<calcite-tab class=${h(s.control)} .selected=${n}><div class=${h(s.channels)} dir=ltr>${d.map((u,m)=>{let g=m===3;return g&&(u=t&&!u?u:O(u)),this.renderChannel(u,m,r[m],c,g?"%":"")})}</div></calcite-tab>`)}renderChannel(e,t,i,a,o){return A(t,C`<calcite-input-number class=${h(s.channel)} data-channel-index=${t??y} dir=${a??y} .label=${i} lang=${this.messages._lang??y} 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=${x({marginLeft:t>0&&!(this.scale==="s"&&this.alphaChannel&&t===3)?"-1px":""})} .suffixText=${o} .value=${e?.toString()}></calcite-input-number>`)}};G("calcite-color-picker",j);export{j as ColorPicker};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.102
|
|
5
5
|
*/
|
|
6
|
-
import{a as re,l as ne}from"./
|
|
6
|
+
import{a as re,l as ne}from"./4FU7RE33.js";import{D as ae}from"./DMYTLYTD.js";var ue=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],B=ue.join(","),oe=typeof Element>"u",D=oe?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,K=!oe&&Element.prototype.getRootNode?function(a){var e;return a==null||(e=a.getRootNode)===null||e===void 0?void 0:e.call(a)}:function(a){return a?.ownerDocument},j=function a(e,t){var r;t===void 0&&(t=!0);var o=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=o===""||o==="true",i=s||t&&e&&a(e.parentNode);return i},Te=function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"},se=function(e,t,r){if(j(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(B));return t&&D.call(e,B)&&o.unshift(e),o=o.filter(r),o},ce=function a(e,t,r){for(var o=[],s=Array.from(e);s.length;){var i=s.shift();if(!j(i,!1))if(i.tagName==="SLOT"){var b=i.assignedElements(),v=b.length?b:i.children,y=a(v,!0,r);r.flatten?o.push.apply(o,y):o.push({scopeParent:i,candidates:y})}else{var T=D.call(i,B);T&&r.filter(i)&&(t||!e.includes(i))&&o.push(i);var w=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),S=!j(w,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(w&&S){var I=a(w===!0?i.children:w.children,!0,r);r.flatten?o.push.apply(o,I):o.push({scopeParent:i,candidates:I})}else s.unshift.apply(s,i.children)}}return o},le=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},E=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Te(e))&&!le(e)?0:e.tabIndex},Ne=function(e,t){var r=E(e);return r<0&&t&&!le(e)?0:r},Fe=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},fe=function(e){return e.tagName==="INPUT"},Ee=function(e){return fe(e)&&e.type==="hidden"},Se=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},ke=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]},De=function(e){if(!e.name)return!0;var t=e.form||K(e),r=function(b){return t.querySelectorAll('input[type="radio"][name="'+b+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(e.name));else try{o=r(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=ke(o,e.form);return!s||s===e},Re=function(e){return fe(e)&&e.type==="radio"},Ie=function(e){return Re(e)&&!De(e)},Ae=function(e){var t,r=e&&K(e),o=(t=r)===null||t===void 0?void 0:t.host,s=!1;if(r&&r!==e){var i,b,v;for(s=!!((i=o)!==null&&i!==void 0&&(b=i.ownerDocument)!==null&&b!==void 0&&b.contains(o)||e!=null&&(v=e.ownerDocument)!==null&&v!==void 0&&v.contains(e));!s&&o;){var y,T,w;r=K(o),o=(y=r)===null||y===void 0?void 0:y.host,s=!!((T=o)!==null&&T!==void 0&&(w=T.ownerDocument)!==null&&w!==void 0&&w.contains(o))}}return s},ie=function(e){var t=e.getBoundingClientRect(),r=t.width,o=t.height;return r===0&&o===0},Oe=function(e,t){var r=t.displayCheck,o=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=D.call(e,"details>summary:first-of-type"),i=s?e.parentElement:e;if(D.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var b=e;e;){var v=e.parentElement,y=K(e);if(v&&!v.shadowRoot&&o(v)===!0)return ie(e);e.assignedSlot?e=e.assignedSlot:!v&&y!==e.ownerDocument?e=y.host:e=v}e=b}if(Ae(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ie(e);return!1},Pe=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var r=0;r<t.children.length;r++){var o=t.children.item(r);if(o.tagName==="LEGEND")return D.call(t,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}t=t.parentElement}return!1},M=function(e,t){return!(t.disabled||j(t)||Ee(t)||Oe(t,e)||Se(t)||Pe(t))},U=function(e,t){return!(Ie(t)||E(t)<0||!M(e,t))},Ce=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},xe=function a(e){var t=[],r=[];return e.forEach(function(o,s){var i=!!o.scopeParent,b=i?o.scopeParent:o,v=Ne(b,i),y=i?a(o.candidates):b;v===0?i?t.push.apply(t,y):t.push(b):r.push({documentOrder:s,tabIndex:v,item:o,isScope:i,content:y})}),r.sort(Fe).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(t)},de=function(e,t){t=t||{};var r;return t.getShadowRoot?r=ce([e],t.includeContainer,{filter:U.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ce}):r=se(e,t.includeContainer,U.bind(null,t)),xe(r)},ve=function(e,t){t=t||{};var r;return t.getShadowRoot?r=ce([e],t.includeContainer,{filter:M.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):r=se(e,t.includeContainer,M.bind(null,t)),r},R=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return D.call(e,B)===!1?!1:U(t,e)},Le=ue.concat("iframe").join(","),G=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return D.call(e,Le)===!1?!1:M(t,e)};function W(a,e){(e==null||e>a.length)&&(e=a.length);for(var t=0,r=Array(e);t<e;t++)r[t]=a[t];return r}function Be(a){if(Array.isArray(a))return W(a)}function Ke(a,e,t){return(e=Ve(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function je(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function Me(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
7
7
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function be(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(a,o).enumerable})),t.push.apply(t,r)}return t}function he(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?be(Object(t),!0).forEach(function(r){Ke(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):be(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function Ge(a){return Be(a)||je(a)||_e(a)||Me()}function qe(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function Ve(a){var e=qe(a,"string");return typeof e=="symbol"?e:e+""}function _e(a,e){if(a){if(typeof a=="string")return W(a,e);var t={}.toString.call(a).slice(8,-1);return t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set"?Array.from(a):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?W(a,e):void 0}}var pe={activateTrap:function(e,t){if(e.length>0){var r=e[e.length-1];r!==t&&r._setPausedState(!0)}var o=e.indexOf(t);o===-1||e.splice(o,1),e.push(t)},deactivateTrap:function(e,t){var r=e.indexOf(t);r!==-1&&e.splice(r,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)}},$e=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Ue=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},x=function(e){return e?.key==="Tab"||e?.keyCode===9},We=function(e){return x(e)&&!e.shiftKey},Ye=function(e){return x(e)&&e.shiftKey},ye=function(e){return setTimeout(e,0)},C=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];return typeof e=="function"?e.apply(void 0,r):e},q=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Ze=[],me=function(e,t){var r=t?.document||document,o=t?.trapStack||Ze,s=he({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:We,isKeyBackward:Ye},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},b,v=function(n,u,c){return n&&n[u]!==void 0?n[u]:s[c||u]},y=function(n,u){var c=typeof u?.composedPath=="function"?u.composedPath():void 0;return i.containerGroups.findIndex(function(f){var d=f.container,p=f.tabbableNodes;return d.contains(n)||c?.includes(d)||p.find(function(l){return l===n})})},T=function(n){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=u.hasFallback,f=c===void 0?!1:c,d=u.params,p=d===void 0?[]:d,l=s[n];if(typeof l=="function"&&(l=l.apply(void 0,Ge(p))),l===!0&&(l=void 0),!l){if(l===void 0||l===!1)return l;throw new Error("`".concat(n,"` was specified but was not a node, or did not return a node"))}var m=l;if(typeof l=="string"){try{m=r.querySelector(l)}catch(g){throw new Error("`".concat(n,'` appears to be an invalid selector; error="').concat(g.message,'"'))}if(!m&&!f)throw new Error("`".concat(n,"` as selector refers to no known node"))}return m},w=function(){var n=T("initialFocus",{hasFallback:!0});if(n===!1)return!1;if(n===void 0||n&&!G(n,s.tabbableOptions))if(y(r.activeElement)>=0)n=r.activeElement;else{var u=i.tabbableGroups[0],c=u&&u.firstTabbableNode;n=c||T("fallbackFocus")}else n===null&&(n=T("fallbackFocus"));if(!n)throw new Error("Your focus-trap needs to have at least one focusable element");return n},S=function(){if(i.containerGroups=i.containers.map(function(n){var u=de(n,s.tabbableOptions),c=ve(n,s.tabbableOptions),f=u.length>0?u[0]:void 0,d=u.length>0?u[u.length-1]:void 0,p=c.find(function(g){return R(g)}),l=c.slice().reverse().find(function(g){return R(g)}),m=!!u.find(function(g){return E(g)>0});return{container:n,tabbableNodes:u,focusableNodes:c,posTabIndexesFound:m,firstTabbableNode:f,lastTabbableNode:d,firstDomTabbableNode:p,lastDomTabbableNode:l,nextTabbableNode:function(k){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,F=u.indexOf(k);return F<0?O?c.slice(c.indexOf(k)+1).find(function(P){return R(P)}):c.slice(0,c.indexOf(k)).reverse().find(function(P){return R(P)}):u[F+(O?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(n){return n.tabbableNodes.length>0}),i.tabbableGroups.length<=0&&!T("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(i.containerGroups.find(function(n){return n.posTabIndexesFound})&&i.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},I=function(n){var u=n.activeElement;if(u)return u.shadowRoot&&u.shadowRoot.activeElement!==null?I(u.shadowRoot):u},N=function(n){if(n!==!1&&n!==I(document)){if(!n||!n.focus){N(w());return}n.focus({preventScroll:!!s.preventScroll}),i.mostRecentlyFocusedNode=n,$e(n)&&n.select()}},Y=function(n){var u=T("setReturnFocus",{params:[n]});return u||(u===!1?!1:n)},Z=function(n){var u=n.target,c=n.event,f=n.isBackward,d=f===void 0?!1:f;u=u||q(c),S();var p=null;if(i.tabbableGroups.length>0){var l=y(u,c),m=l>=0?i.containerGroups[l]:void 0;if(l<0)d?p=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:p=i.tabbableGroups[0].firstTabbableNode;else if(d){var g=i.tabbableGroups.findIndex(function(_){var $=_.firstTabbableNode;return u===$});if(g<0&&(m.container===u||G(u,s.tabbableOptions)&&!R(u,s.tabbableOptions)&&!m.nextTabbableNode(u,!1))&&(g=l),g>=0){var k=g===0?i.tabbableGroups.length-1:g-1,O=i.tabbableGroups[k];p=E(u)>=0?O.lastTabbableNode:O.lastDomTabbableNode}else x(c)||(p=m.nextTabbableNode(u,!1))}else{var F=i.tabbableGroups.findIndex(function(_){var $=_.lastTabbableNode;return u===$});if(F<0&&(m.container===u||G(u,s.tabbableOptions)&&!R(u,s.tabbableOptions)&&!m.nextTabbableNode(u))&&(F=l),F>=0){var P=F===i.tabbableGroups.length-1?0:F+1,te=i.tabbableGroups[P];p=E(u)>=0?te.firstTabbableNode:te.firstDomTabbableNode}else x(c)||(p=m.nextTabbableNode(u))}}else p=T("fallbackFocus");return p},L=function(n){var u=q(n);if(!(y(u,n)>=0)){if(C(s.clickOutsideDeactivates,n)){b.deactivate({returnFocus:s.returnFocusOnDeactivate});return}C(s.allowOutsideClick,n)||n.preventDefault()}},z=function(n){var u=q(n),c=y(u,n)>=0;if(c||u instanceof Document)c&&(i.mostRecentlyFocusedNode=u);else{n.stopImmediatePropagation();var f,d=!0;if(i.mostRecentlyFocusedNode)if(E(i.mostRecentlyFocusedNode)>0){var p=y(i.mostRecentlyFocusedNode),l=i.containerGroups[p].tabbableNodes;if(l.length>0){var m=l.findIndex(function(g){return g===i.mostRecentlyFocusedNode});m>=0&&(s.isKeyForward(i.recentNavEvent)?m+1<l.length&&(f=l[m+1],d=!1):m-1>=0&&(f=l[m-1],d=!1))}}else i.containerGroups.some(function(g){return g.tabbableNodes.some(function(k){return E(k)>0})})||(d=!1);else d=!1;d&&(f=Z({target:i.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(i.recentNavEvent)})),N(f||i.mostRecentlyFocusedNode||w())}i.recentNavEvent=void 0},ge=function(n){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;i.recentNavEvent=n;var c=Z({event:n,isBackward:u});c&&(x(n)&&n.preventDefault(),N(c))},X=function(n){(s.isKeyForward(n)||s.isKeyBackward(n))&&ge(n,s.isKeyBackward(n))},H=function(n){Ue(n)&&C(s.escapeDeactivates,n)!==!1&&(n.preventDefault(),b.deactivate())},J=function(n){var u=q(n);y(u,n)>=0||C(s.clickOutsideDeactivates,n)||C(s.allowOutsideClick,n)||(n.preventDefault(),n.stopImmediatePropagation())},Q=function(){if(i.active)return pe.activateTrap(o,b),i.delayInitialFocusTimer=s.delayInitialFocus?ye(function(){N(w())}):N(w()),r.addEventListener("focusin",z,!0),r.addEventListener("mousedown",L,{capture:!0,passive:!1}),r.addEventListener("touchstart",L,{capture:!0,passive:!1}),r.addEventListener("click",J,{capture:!0,passive:!1}),r.addEventListener("keydown",X,{capture:!0,passive:!1}),r.addEventListener("keydown",H),b},ee=function(){if(i.active)return r.removeEventListener("focusin",z,!0),r.removeEventListener("mousedown",L,!0),r.removeEventListener("touchstart",L,!0),r.removeEventListener("click",J,!0),r.removeEventListener("keydown",X,!0),r.removeEventListener("keydown",H),b},we=function(n){var u=n.some(function(c){var f=Array.from(c.removedNodes);return f.some(function(d){return d===i.mostRecentlyFocusedNode})});u&&N(w())},V=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(we):void 0,A=function(){V&&(V.disconnect(),i.active&&!i.paused&&i.containers.map(function(n){V.observe(n,{subtree:!0,childList:!0})}))};return b={get active(){return i.active},get paused(){return i.paused},activate:function(n){if(i.active)return this;var u=v(n,"onActivate"),c=v(n,"onPostActivate"),f=v(n,"checkCanFocusTrap");f||S(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,u?.();var d=function(){f&&S(),Q(),A(),c?.()};return f?(f(i.containers.concat()).then(d,d),this):(d(),this)},deactivate:function(n){if(!i.active)return this;var u=he({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},n);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,ee(),i.active=!1,i.paused=!1,A(),pe.deactivateTrap(o,b);var c=v(u,"onDeactivate"),f=v(u,"onPostDeactivate"),d=v(u,"checkCanReturnFocus"),p=v(u,"returnFocus","returnFocusOnDeactivate");c?.();var l=function(){ye(function(){p&&N(Y(i.nodeFocusedBeforeActivation)),f?.()})};return p&&d?(d(Y(i.nodeFocusedBeforeActivation)).then(l,l),this):(l(),this)},pause:function(n){return i.active?(i.manuallyPaused=!0,this._setPausedState(!0,n)):this},unpause:function(n){return i.active?(i.manuallyPaused=!1,o[o.length-1]!==this?this:this._setPausedState(!1,n)):this},updateContainerElements:function(n){var u=[].concat(n).filter(Boolean);return i.containers=u.map(function(c){return typeof c=="string"?r.querySelector(c):c}),i.active&&S(),A(),this}},Object.defineProperties(b,{_isManuallyPaused:{value:function(){return i.manuallyPaused}},_setPausedState:{value:function(n,u){if(i.paused===n)return this;if(i.paused=n,n){var c=v(u,"onPause"),f=v(u,"onPostPause");c?.(),ee(),A(),f?.()}else{var d=v(u,"onUnpause"),p=v(u,"onPostUnpause");d?.(),S(),Q(),A(),p?.()}return this}}}),b.updateContainerElements(e),b};function tt(a,e){let{el:t}=a,r=e?.focusTrapEl||t;if(!r)return;let o={clickOutsideDeactivates:!0,fallbackFocus:r,setReturnFocus:s=>(ne(s),!1),...e?.focusTrapOptions,document:t.ownerDocument,tabbableOptions:re,trapStack:ae};a.focusTrap=me(r,o)}function at(a,e){a.focusTrapDisabled||a.focusTrap?.activate(e)}function rt(a,e){a.focusTrap?.deactivate(e)}function nt(a){a.focusTrap?.updateContainerElements(a.el)}export{tt as a,at as b,rt as c,nt as d};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.102
|
|
5
5
|
*/
|
|
6
|
-
import{b as _}from"./
|
|
6
|
+
import{b as _}from"./6F5HO2CW.js";import"./5V4KINIS.js";var a="\u064A\u0646\u0627\u064A\u0631_\u0641\u0628\u0631\u0627\u064A\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064A\u0644_\u0645\u0627\u064A\u0648_\u064A\u0648\u0646\u064A\u0648_\u064A\u0648\u0644\u064A\u0648_\u0623\u063A\u0633\u0637\u0633_\u0633\u0628\u062A\u0645\u0628\u0631_\u0623\u0643\u062A\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062F\u064A\u0633\u0645\u0628\u0631".split("_"),n={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},o={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},m={name:"ar",weekdays:"\u0627\u0644\u0623\u062D\u062F_\u0627\u0644\u0625\u062B\u0646\u064A\u0646_\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062E\u0645\u064A\u0633_\u0627\u0644\u062C\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062A".split("_"),weekdaysShort:"\u0623\u062D\u062F_\u0625\u062B\u0646\u064A\u0646_\u062B\u0644\u0627\u062B\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062E\u0645\u064A\u0633_\u062C\u0645\u0639\u0629_\u0633\u0628\u062A".split("_"),weekdaysMin:"\u062D_\u0646_\u062B_\u0631_\u062E_\u062C_\u0633".split("_"),months:a,monthsShort:a,weekStart:6,meridiem:function(r){return r>12?"\u0645":"\u0635"},relativeTime:{future:"\u0628\u0639\u062F %s",past:"\u0645\u0646\u0630 %s",s:"\u062B\u0627\u0646\u064A\u0629 \u0648\u0627\u062D\u062F\u0629",m:"\u062F\u0642\u064A\u0642\u0629 \u0648\u0627\u062D\u062F\u0629",mm:"%d \u062F\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629 \u0648\u0627\u062D\u062F\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062A",d:"\u064A\u0648\u0645 \u0648\u0627\u062D\u062F",dd:"%d \u0623\u064A\u0627\u0645",M:"\u0634\u0647\u0631 \u0648\u0627\u062D\u062F",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0639\u0627\u0645 \u0648\u0627\u062D\u062F",yy:"%d \u0623\u0639\u0648\u0627\u0645"},preparse:function(r){return r.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(t){return o[t]}).replace(/،/g,",")},postformat:function(r){return r.replace(/\d/g,function(t){return n[t]}).replace(/,/g,"\u060C")},ordinal:function(r){return r},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200FM/\u200FYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"}};_.locale(m,null,!0);var d=m;export{d as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.102
|
|
5
5
|
*/
|
|
6
|
-
import{a as f,b as C}from"./
|
|
6
|
+
import{a as f,b as C}from"./YGYL5EWA.js";import{a as v}from"./VTQMGX2I.js";import{a as h,b as p}from"./ZE4G7GXI.js";import{e as m}from"./4FU7RE33.js";import{a as b,b as u,d as g}from"./HQLR4YL6.js";import"./K2UZIGDO.js";import{B as r,I as d,d as c,e as o,i as s,v as a,w as i}from"./DMYTLYTD.js";var e={contentCell:"content-cell",numberCell:"number-cell",footerCell:"footer-cell",selectionCell:"selection-cell",selectedCell:"selected-cell",assistiveText:"assistive-text",lastCell:"last-cell",staticCell:"static-cell"},x=c`: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{--calcite-internal-table-cell-background: var(--calcite-table-cell-background, transparent);display:contents}:host([alignment=center]) td:not(.selection-cell):not(.number-cell){text-align:center}:host([alignment=end]) td:not(.selection-cell):not(.number-cell){text-align:end}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}td{white-space:normal;text-align:start;vertical-align:middle;color:var(--calcite-color-text-1);background:var(--calcite-internal-table-cell-background);font-size:var(--calcite-internal-table-cell-font-size);border-inline-end:1px solid var(--calcite-color-border-3);padding:var(--calcite-internal-table-cell-padding)}td:not(.static-cell){outline-color:transparent}td:not(.static-cell):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))))}td.start.content-cell{vertical-align:top}td.end.content-cell{vertical-align:bottom}td.last-cell{border-inline-end:0}.number-cell{background-color:var(--calcite-color-foreground-2)}.footer-cell{background-color:var(--calcite-color-background);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1);border-block-start:1px solid var(--calcite-color-border-3)}.number-cell,.selection-cell{text-align:center;border-inline-end:1px solid var(--calcite-color-border-3);inline-size:2rem;min-inline-size:2rem}.selection-cell{color:var(--calcite-color-text-3);inset-inline-start:2rem}.selection-cell:not(.footer-cell){cursor:pointer}.selected-cell:not(.number-cell):not(.footer-cell){--calcite-internal-table-cell-background: var(--calcite-color-foreground-current)}.selection-cell.selected-cell{box-shadow:inset .25rem 0 0 0 var(--calcite-color-brand);color:var(--calcite-color-brand)}.selection-cell.selected-cell calcite-icon{color:var(--calcite-color-brand)}.calcite--rtl.selection-cell.selected-cell{box-shadow:inset -.25rem 0 0 0 var(--calcite-color-brand)}.selection-cell{vertical-align:middle}.selection-cell ::slotted(calcite-icon){pointer-events:none;margin-block-start:.25rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,n=class extends a{constructor(){super(...arguments),this.containerEl=h(),this.contentsText="",this.focused=!1,this.selectionText="",this.alignment="start",this.interactionMode="interactive",this.messages=v(),this.parentRowAlignment="start",this.scale="m"}static{this.properties={contentsText:16,focused:16,selectionText:16,alignment:3,colSpan:11,disabled:5,interactionMode:1,lastCell:5,messageOverrides:0,numberCell:5,parentRowAlignment:1,parentRowIsSelected:5,parentRowPositionLocalized:1,parentRowType:1,positionInRow:9,readCellContentsToAT:5,rowSpan:11,scale:1,selectionCell:5}}static{this.styles=x}async setFocus(){await g(this),this.containerEl.value.focus()}async load(){b(this),this.updateScreenReaderContentsText(),this.updateScreenReaderSelectionText()}willUpdate(t){t.has("parentRowIsSelected")&&this.updateScreenReaderSelectionText()}updated(){f(this)}loaded(){u(this)}updateScreenReaderSelectionText(){let t=`${this.messages?.row} ${this.parentRowPositionLocalized} ${this.messages?.selected} ${this.messages?.keyboardDeselect}`,l=`${this.messages?.row} ${this.parentRowPositionLocalized} ${this.messages?.unselected} ${this.messages?.keyboardSelect}`;this.selectionText=this.parentRowIsSelected?t:l}updateScreenReaderContentsText(){this.contentsText=this.el.textContent}onContainerBlur(){this.focused=!1}onContainerFocus(){this.focused=!0}render(){let t=m(this.el),l=this.disabled||this.interactionMode==="static"&&(!this.selectionCell||this.selectionCell&&this.parentRowType==="foot");return C({disabled:this.disabled,children:o`<td class=${i({[e.footerCell]:this.parentRowType==="foot",[e.contentCell]:!this.numberCell&&!this.selectionCell,[e.numberCell]:this.numberCell,[e.selectionCell]:this.selectionCell,[e.selectedCell]:this.parentRowIsSelected,[e.lastCell]:this.lastCell&&(!this.rowSpan||this.colSpan&&!!this.rowSpan),[r.rtl]:t==="rtl",[e.staticCell]:l,[this.parentRowAlignment]:this.parentRowAlignment==="start"||this.parentRowAlignment==="end"})} colSpan=${this.colSpan??s} @blur=${this.onContainerBlur} @focus=${this.onContainerFocus} .role=${this.interactionMode==="interactive"?"gridcell":"cell"} rowSpan=${this.rowSpan??s} .tabIndex=${l?-1:0} ${p(this.containerEl)}>${(this.selectionCell||this.readCellContentsToAT)&&o`<span .ariaLive=${this.focused?"polite":"off"} class=${i(e.assistiveText)}>${this.selectionCell&&this.selectionText||""}${this.readCellContentsToAT&&!this.selectionCell&&this.contentsText||""}</span>`||""}<slot @slotchange=${this.updateScreenReaderContentsText}></slot></td>`})}};d("calcite-table-cell",n);export{n as TableCell};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.102
|
|
5
5
|
*/
|
|
6
|
-
import{a as h,b as u}from"./
|
|
6
|
+
import{a as h,b as u}from"./YGYL5EWA.js";import{n as c}from"./4FU7RE33.js";import{a as s,b as d,d as p}from"./HQLR4YL6.js";import"./K2UZIGDO.js";import{I as l,d as n,e as o,u as i,v as r,w as t}from"./DMYTLYTD.js";var e={container:"container",dividerContainer:"divider-container",divider:"divider",widthAuto:"width-auto",widthHalf:"width-half",widthFull:"width-full"},v=n`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([kind=brand]){--calcite-internal-split-button-background: var(--calcite-color-brand);--calcite-internal-split-button-divider: var(--calcite-color-foreground-1)}:host([kind=danger]){--calcite-internal-split-button-background: var(--calcite-color-status-danger);--calcite-internal-split-button-divider: var(--calcite-color-foreground-1)}:host([kind=neutral]){--calcite-internal-split-button-background: var(--calcite-color-foreground-3);--calcite-internal-split-button-divider: var(--calcite-color-text-1)}:host([kind=inverse]){--calcite-internal-split-button-background: var(--calcite-color-inverse);--calcite-internal-split-button-divider: var(--calcite-color-foreground-1)}:host([appearance=transparent]){--calcite-internal-split-button-background: transparent}:host([appearance=transparent]):host([kind=brand]){--calcite-internal-split-button-divider: var(--calcite-color-brand)}:host([appearance=transparent]):host([kind=danger]){--calcite-internal-split-button-divider: var(--calcite-color-status-danger)}:host([appearance=transparent]):host([kind=neutral]){--calcite-internal-split-button-divider: var(--calcite-color-text-1)}:host([appearance=transparent]):host([kind=inverse]){--calcite-internal-split-button-divider: var(--calcite-color-foreground-1)}:host([appearance=outline]):host([kind=brand]),:host([appearance=outline]):host([kind=danger]),:host([appearance=outline]):host([kind=neutral]),:host([appearance=outline]):host([kind=inverse]){--calcite-internal-split-button-background: transparent}:host([appearance=outline-fill]):host([kind=brand]),:host([appearance=outline-fill]):host([kind=danger]),:host([appearance=outline-fill]):host([kind=neutral]),:host([appearance=outline-fill]):host([kind=inverse]){--calcite-internal-split-button-background: var(--calcite-color-background)}:host([appearance=outline]):host([kind=brand]),:host([appearance=outline-fill]):host([kind=brand]){--calcite-internal-split-button-divider: var(--calcite-color-brand)}:host([appearance=outline]):host([kind=danger]),:host([appearance=outline-fill]):host([kind=danger]){--calcite-internal-split-button-divider: var(--calcite-color-status-danger)}:host([appearance=outline]):host([kind=neutral]),:host([appearance=outline-fill]):host([kind=neutral]){--calcite-internal-split-button-divider: var(--calcite-color-border-1)}:host([appearance=outline]):host([kind=inverse]),:host([appearance=outline-fill]):host([kind=inverse]){--calcite-internal-split-button-divider: var(--calcite-color-inverse)}.container{display:flex;align-items:stretch}.container>calcite-dropdown>calcite-button{block-size:100%;vertical-align:top}.divider-container{display:flex;inline-size:1px;align-items:stretch;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;background-color:var(--calcite-internal-split-button-background)}.divider{margin-block:.25rem;display:inline-block;inline-size:1px;background-color:var(--calcite-internal-split-button-divider)}:host([appearance=outline-fill]) .divider-container,:host([appearance=outline]) .divider-container{border-block:1px solid var(--calcite-internal-split-button-divider)}:host([appearance=outline-fill]):hover .divider-container,:host([appearance=outline]):hover .divider-container{background-color:var(--calcite-internal-split-button-divider)}:host([appearance=outline-fill]:hover) .divider-container,:host([appearance=outline]:hover) .divider-container{background-color:var(--calcite-internal-split-button-divider)}:host([appearance=outline-fill]:focus-within):host([kind=brand]),:host([appearance=outline]:focus-within):host([kind=brand]){--calcite-internal-split-button-divider: var(--calcite-color-brand-press)}:host([appearance=outline-fill]:focus-within):host([kind=danger]),:host([appearance=outline]:focus-within):host([kind=danger]){--calcite-internal-split-button-divider: var(--calcite-color-status-danger-press)}:host([appearance=outline-fill]:focus-within) .divider-container,:host([appearance=outline]:focus-within) .divider-container{background-color:var(--calcite-internal-split-button-divider)}:host([disabled]) calcite-dropdown>calcite-button{pointer-events:none}:host([disabled]):host([appearance=outline-fill]) .divider-container{background-color:var(--calcite-color-background)}:host([disabled]):host([appearance=outline]) .divider-container{background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends r{constructor(){super(...arguments),this.active=!1,this.appearance="solid",this.disabled=!1,this.dropdownIconType="chevron",this.kind="brand",this.loading=!1,this.overlayPositioning="absolute",this.placement="bottom-end",this.scale="m",this.width="auto",this.calciteSplitButtonPrimaryClick=i({cancelable:!1}),this.calciteSplitButtonSecondaryClick=i({cancelable:!1})}static{this.properties={active:7,appearance:3,disabled:7,dropdownIconType:3,dropdownLabel:3,flipPlacements:0,kind:3,loading:7,overlayPositioning:3,placement:3,primaryIconEnd:3,primaryIconFlipRtl:3,primaryIconStart:3,primaryLabel:3,primaryText:3,scale:3,width:3}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=v}get dropdownIcon(){return this.dropdownIconType==="chevron"?"chevronDown":this.dropdownIconType==="caret"?"caretDown":this.dropdownIconType==="ellipsis"?"ellipsis":"handle-vertical"}async setFocus(){await p(this),c(this.el)}load(){s(this)}updated(){h(this)}loaded(){d(this)}calciteSplitButtonPrimaryClickHandler(){this.calciteSplitButtonPrimaryClick.emit()}calciteSplitButtonSecondaryClickHandler(){this.calciteSplitButtonSecondaryClick.emit()}render(){let b=this.width==="auto"?"auto":"full";return u({disabled:this.disabled,children:o`<div class=${t(e.container)}><calcite-button .appearance=${this.appearance} .disabled=${this.disabled} .iconEnd=${this.primaryIconEnd?this.primaryIconEnd:null} .iconFlipRtl=${this.primaryIconFlipRtl?this.primaryIconFlipRtl:null} .iconStart=${this.primaryIconStart?this.primaryIconStart:null} .kind=${this.kind} .label=${this.primaryLabel} .loading=${this.loading} @click=${this.calciteSplitButtonPrimaryClickHandler} .scale=${this.scale} split-child=primary type=button .width=${b}>${this.primaryText}</calcite-button><div class=${t(e.dividerContainer)}><div class=${t(e.divider)}></div></div><calcite-dropdown .disabled=${this.disabled} .flipPlacements=${this.flipPlacements} @click=${this.calciteSplitButtonSecondaryClickHandler} .open=${this.active} .overlayPositioning=${this.overlayPositioning} .placement=${this.placement} .scale=${this.scale} .widthScale=${this.scale}><calcite-button .appearance=${this.appearance} .disabled=${this.disabled} .iconStart=${this.dropdownIcon} .kind=${this.kind} .label=${this.dropdownLabel} .scale=${this.scale} slot=trigger split-child=secondary type=button></calcite-button><slot></slot></calcite-dropdown></div>`})}};l("calcite-split-button",a);export{a as SplitButton};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.102
|
|
5
5
|
*/
|
|
6
|
-
import{b as G}from"./JIFFNVK4.js";var q={exports:{}},N={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},X={exports:{}},Z=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")},Y=Z,ee=Array.prototype.concat,re=Array.prototype.slice,R=X.exports=function(e){for(var r=[],n=0,t=e.length;n<t;n++){var o=e[n];Y(o)?r=ee.call(r,re.call(o)):r.push(o)}return r};R.wrap=function(e){return function(){return e(R(arguments))}};var ne=X.exports,x=N,H=ne,P=Object.hasOwnProperty,V=Object.create(null);for(C in x)P.call(x,C)&&(V[x[C]]=C);var C,y=q.exports={to:{},get:{}};y.get=function(e){var r=e.substring(0,3).toLowerCase(),n,t;switch(r){case"hsl":n=y.get.hsl(e),t="hsl";break;case"hwb":n=y.get.hwb(e),t="hwb";break;default:n=y.get.rgb(e),t="rgb";break}return n?{model:t,value:n}:null};y.get.rgb=function(e){if(!e)return null;var r=/^#([a-f0-9]{3,4})$/i,n=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,t=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,a=/^(\w+)$/,s=[0,0,0,1],l,i,h;if(l=e.match(n)){for(h=l[2],l=l[1],i=0;i<3;i++){var p=i*2;s[i]=parseInt(l.slice(p,p+2),16)}h&&(s[3]=parseInt(h,16)/255)}else if(l=e.match(r)){for(l=l[1],h=l[3],i=0;i<3;i++)s[i]=parseInt(l[i]+l[i],16);h&&(s[3]=parseInt(h+h,16)/255)}else if(l=e.match(t)){for(i=0;i<3;i++)s[i]=parseInt(l[i+1],0);l[4]&&(l[5]?s[3]=parseFloat(l[4])*.01:s[3]=parseFloat(l[4]))}else if(l=e.match(o)){for(i=0;i<3;i++)s[i]=Math.round(parseFloat(l[i+1])*2.55);l[4]&&(l[5]?s[3]=parseFloat(l[4])*.01:s[3]=parseFloat(l[4]))}else return(l=e.match(a))?l[1]==="transparent"?[0,0,0,0]:P.call(x,l[1])?(s=x[l[1]],s[3]=1,s):null:null;for(i=0;i<3;i++)s[i]=w(s[i],0,255);return s[3]=w(s[3],0,1),s};y.get.hsl=function(e){if(!e)return null;var r=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(r);if(n){var t=parseFloat(n[4]),o=(parseFloat(n[1])%360+360)%360,a=w(parseFloat(n[2]),0,100),s=w(parseFloat(n[3]),0,100),l=w(isNaN(t)?1:t,0,1);return[o,a,s,l]}return null};y.get.hwb=function(e){if(!e)return null;var r=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(r);if(n){var t=parseFloat(n[4]),o=(parseFloat(n[1])%360+360)%360,a=w(parseFloat(n[2]),0,100),s=w(parseFloat(n[3]),0,100),l=w(isNaN(t)?1:t,0,1);return[o,a,s,l]}return null};y.to.hex=function(){var e=H(arguments);return"#"+j(e[0])+j(e[1])+j(e[2])+(e[3]<1?j(Math.round(e[3]*255)):"")};y.to.rgb=function(){var e=H(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};y.to.rgb.percent=function(){var e=H(arguments),r=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),t=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+r+"%, "+n+"%, "+t+"%)":"rgba("+r+"%, "+n+"%, "+t+"%, "+e[3]+")"};y.to.hsl=function(){var e=H(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};y.to.hwb=function(){var e=H(arguments),r="";return e.length>=4&&e[3]!==1&&(r=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+r+")"};y.to.keyword=function(e){return V[e.slice(0,3)]};function w(e,r,n){return Math.min(Math.max(r,e),n)}function j(e){var r=Math.round(e).toString(16).toUpperCase();return r.length<2?"0"+r:r}var te=q.exports,A=N,U={};for(let e of Object.keys(A))U[A[e]]=e;var c={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},W=c;for(let e of Object.keys(c)){if(!("channels"in c[e]))throw new Error("missing channels property: "+e);if(!("labels"in c[e]))throw new Error("missing channel labels property: "+e);if(c[e].labels.length!==c[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:r,labels:n}=c[e];delete c[e].channels,delete c[e].labels,Object.defineProperty(c[e],"channels",{value:r}),Object.defineProperty(c[e],"labels",{value:n})}c.rgb.hsl=function(e){let r=e[0]/255,n=e[1]/255,t=e[2]/255,o=Math.min(r,n,t),a=Math.max(r,n,t),s=a-o,l,i;a===o?l=0:r===a?l=(n-t)/s:n===a?l=2+(t-r)/s:t===a&&(l=4+(r-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);let h=(o+a)/2;return a===o?i=0:h<=.5?i=s/(a+o):i=s/(2-a-o),[l,i*100,h*100]};c.rgb.hsv=function(e){let r,n,t,o,a,s=e[0]/255,l=e[1]/255,i=e[2]/255,h=Math.max(s,l,i),p=h-Math.min(s,l,i),v=function(Q){return(h-Q)/6/p+1/2};return p===0?(o=0,a=0):(a=p/h,r=v(s),n=v(l),t=v(i),s===h?o=t-n:l===h?o=1/3+r-t:i===h&&(o=2/3+n-r),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,h*100]};c.rgb.hwb=function(e){let r=e[0],n=e[1],t=e[2],o=c.rgb.hsl(e)[0],a=1/255*Math.min(r,Math.min(n,t));return t=1-1/255*Math.max(r,Math.max(n,t)),[o,a*100,t*100]};c.rgb.cmyk=function(e){let r=e[0]/255,n=e[1]/255,t=e[2]/255,o=Math.min(1-r,1-n,1-t),a=(1-r-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-t-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function oe(e,r){return(e[0]-r[0])**2+(e[1]-r[1])**2+(e[2]-r[2])**2}c.rgb.keyword=function(e){let r=U[e];if(r)return r;let n=1/0,t;for(let o of Object.keys(A)){let a=A[o],s=oe(e,a);s<n&&(n=s,t=o)}return t};c.keyword.rgb=function(e){return A[e]};c.rgb.xyz=function(e){let r=e[0]/255,n=e[1]/255,t=e[2]/255;r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,t=t>.04045?((t+.055)/1.055)**2.4:t/12.92;let o=r*.4124+n*.3576+t*.1805,a=r*.2126+n*.7152+t*.0722,s=r*.0193+n*.1192+t*.9505;return[o*100,a*100,s*100]};c.rgb.lab=function(e){let r=c.rgb.xyz(e),n=r[0],t=r[1],o=r[2];n/=95.047,t/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,t=t>.008856?t**(1/3):7.787*t+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;let a=116*t-16,s=500*(n-t),l=200*(t-o);return[a,s,l]};c.hsl.rgb=function(e){let r=e[0]/360,n=e[1]/100,t=e[2]/100,o,a,s;if(n===0)return s=t*255,[s,s,s];t<.5?o=t*(1+n):o=t+n-t*n;let l=2*t-o,i=[0,0,0];for(let h=0;h<3;h++)a=r+1/3*-(h-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,i[h]=s*255;return i};c.hsl.hsv=function(e){let r=e[0],n=e[1]/100,t=e[2]/100,o=n,a=Math.max(t,.01);t*=2,n*=t<=1?t:2-t,o*=a<=1?a:2-a;let s=(t+n)/2,l=t===0?2*o/(a+o):2*n/(t+n);return[r,l*100,s*100]};c.hsv.rgb=function(e){let r=e[0]/60,n=e[1]/100,t=e[2]/100,o=Math.floor(r)%6,a=r-Math.floor(r),s=255*t*(1-n),l=255*t*(1-n*a),i=255*t*(1-n*(1-a));switch(t*=255,o){case 0:return[t,i,s];case 1:return[l,t,s];case 2:return[s,t,i];case 3:return[s,l,t];case 4:return[i,s,t];case 5:return[t,s,l]}};c.hsv.hsl=function(e){let r=e[0],n=e[1]/100,t=e[2]/100,o=Math.max(t,.01),a,s;s=(2-n)*t;let l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[r,a*100,s*100]};c.hwb.rgb=function(e){let r=e[0]/360,n=e[1]/100,t=e[2]/100,o=n+t,a;o>1&&(n/=o,t/=o);let s=Math.floor(6*r),l=1-t;a=6*r-s,s&1&&(a=1-a);let i=n+a*(l-n),h,p,v;switch(s){default:case 6:case 0:h=l,p=i,v=n;break;case 1:h=i,p=l,v=n;break;case 2:h=n,p=l,v=i;break;case 3:h=n,p=i,v=l;break;case 4:h=i,p=n,v=l;break;case 5:h=l,p=n,v=i;break}return[h*255,p*255,v*255]};c.cmyk.rgb=function(e){let r=e[0]/100,n=e[1]/100,t=e[2]/100,o=e[3]/100,a=1-Math.min(1,r*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,t*(1-o)+o);return[a*255,s*255,l*255]};c.xyz.rgb=function(e){let r=e[0]/100,n=e[1]/100,t=e[2]/100,o,a,s;return o=r*3.2406+n*-1.5372+t*-.4986,a=r*-.9689+n*1.8758+t*.0415,s=r*.0557+n*-.204+t*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};c.xyz.lab=function(e){let r=e[0],n=e[1],t=e[2];r/=95.047,n/=100,t/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,t=t>.008856?t**(1/3):7.787*t+16/116;let o=116*n-16,a=500*(r-n),s=200*(n-t);return[o,a,s]};c.lab.xyz=function(e){let r=e[0],n=e[1],t=e[2],o,a,s;a=(r+16)/116,o=n/500+a,s=a-t/200;let l=a**3,i=o**3,h=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,s=h>.008856?h:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};c.lab.lch=function(e){let r=e[0],n=e[1],t=e[2],o;o=Math.atan2(t,n)*360/2/Math.PI,o<0&&(o+=360);let a=Math.sqrt(n*n+t*t);return[r,a,o]};c.lch.lab=function(e){let r=e[0],n=e[1],t=e[2]/360*2*Math.PI,o=n*Math.cos(t),a=n*Math.sin(t);return[r,o,a]};c.rgb.ansi16=function(e,r=null){let[n,t,o]=e,a=r===null?c.rgb.hsv(e)[2]:r;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(t/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};c.hsv.ansi16=function(e){return c.rgb.ansi16(c.hsv.rgb(e),e[2])};c.rgb.ansi256=function(e){let r=e[0],n=e[1],t=e[2];return r===n&&n===t?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(n/255*5)+Math.round(t/255*5)};c.ansi16.rgb=function(e){let r=e%10;if(r===0||r===7)return e>50&&(r+=3.5),r=r/10.5*255,[r,r,r];let n=(~~(e>50)+1)*.5,t=(r&1)*n*255,o=(r>>1&1)*n*255,a=(r>>2&1)*n*255;return[t,o,a]};c.ansi256.rgb=function(e){if(e>=232){let a=(e-232)*10+8;return[a,a,a]}e-=16;let r,n=Math.floor(e/36)/5*255,t=Math.floor((r=e%36)/6)/5*255,o=r%6/5*255;return[n,t,o]};c.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};c.hex.rgb=function(e){let r=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!r)return[0,0,0];let n=r[0];r[0].length===3&&(n=n.split("").map(l=>l+l).join(""));let t=parseInt(n,16),o=t>>16&255,a=t>>8&255,s=t&255;return[o,a,s]};c.rgb.hcg=function(e){let r=e[0]/255,n=e[1]/255,t=e[2]/255,o=Math.max(Math.max(r,n),t),a=Math.min(Math.min(r,n),t),s=o-a,l,i;return s<1?l=a/(1-s):l=0,s<=0?i=0:o===r?i=(n-t)/s%6:o===n?i=2+(t-r)/s:i=4+(r-n)/s,i/=6,i%=1,[i*360,s*100,l*100]};c.hsl.hcg=function(e){let r=e[1]/100,n=e[2]/100,t=n<.5?2*r*n:2*r*(1-n),o=0;return t<1&&(o=(n-.5*t)/(1-t)),[e[0],t*100,o*100]};c.hsv.hcg=function(e){let r=e[1]/100,n=e[2]/100,t=r*n,o=0;return t<1&&(o=(n-t)/(1-t)),[e[0],t*100,o*100]};c.hcg.rgb=function(e){let r=e[0]/360,n=e[1]/100,t=e[2]/100;if(n===0)return[t*255,t*255,t*255];let o=[0,0,0],a=r%1*6,s=a%1,l=1-s,i=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*t,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};c.hcg.hsv=function(e){let r=e[1]/100,n=e[2]/100,t=r+n*(1-r),o=0;return t>0&&(o=r/t),[e[0],o*100,t*100]};c.hcg.hsl=function(e){let r=e[1]/100,n=e[2]/100*(1-r)+.5*r,t=0;return n>0&&n<.5?t=r/(2*n):n>=.5&&n<1&&(t=r/(2*(1-n))),[e[0],t*100,n*100]};c.hcg.hwb=function(e){let r=e[1]/100,n=e[2]/100,t=r+n*(1-r);return[e[0],(t-r)*100,(1-t)*100]};c.hwb.hcg=function(e){let r=e[1]/100,n=1-e[2]/100,t=n-r,o=0;return t<1&&(o=(n-t)/(1-t)),[e[0],t*100,o*100]};c.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};c.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};c.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};c.gray.hsl=function(e){return[0,0,e[0]]};c.gray.hsv=c.gray.hsl;c.gray.hwb=function(e){return[0,100,e[0]]};c.gray.cmyk=function(e){return[0,0,0,e[0]]};c.gray.lab=function(e){return[e[0],0,0]};c.gray.hex=function(e){let r=Math.round(e[0]/100*255)&255,n=((r<<16)+(r<<8)+r).toString(16).toUpperCase();return"000000".substring(n.length)+n};c.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};var F=W;function se(){let e={},r=Object.keys(F);for(let n=r.length,t=0;t<n;t++)e[r[t]]={distance:-1,parent:null};return e}function ae(e){let r=se(),n=[e];for(r[e].distance=0;n.length;){let t=n.pop(),o=Object.keys(F[t]);for(let a=o.length,s=0;s<a;s++){let l=o[s],i=r[l];i.distance===-1&&(i.distance=r[t].distance+1,i.parent=t,n.unshift(l))}}return r}function le(e,r){return function(n){return r(e(n))}}function ie(e,r){let n=[r[e].parent,e],t=F[r[e].parent][e],o=r[e].parent;for(;r[o].parent;)n.unshift(r[o].parent),t=le(F[r[o].parent][o],t),o=r[o].parent;return t.conversion=n,t}var ce=function(e){let r=ae(e),n={},t=Object.keys(r);for(let o=t.length,a=0;a<o;a++){let s=t[a];r[s].parent!==null&&(n[s]=ie(s,r))}return n},L=W,he=ce,k={},ue=Object.keys(L);function ge(e){let r=function(...n){let t=n[0];return t==null?t:(t.length>1&&(n=t),e(n))};return"conversion"in e&&(r.conversion=e.conversion),r}function de(e){let r=function(...n){let t=n[0];if(t==null)return t;t.length>1&&(n=t);let o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s<a;s++)o[s]=Math.round(o[s]);return o};return"conversion"in e&&(r.conversion=e.conversion),r}ue.forEach(e=>{k[e]={},Object.defineProperty(k[e],"channels",{value:L[e].channels}),Object.defineProperty(k[e],"labels",{value:L[e].labels});let r=he(e);Object.keys(r).forEach(n=>{let t=r[n];k[e][n]=de(t),k[e][n].raw=ge(t)})});var fe=k,M=te,m=fe,D=["keyword","gray","hex"],E={};for(let e of Object.keys(m))E[[...m[e].labels].sort().join("")]=e;var O={};function b(e,r){if(!(this instanceof b))return new b(e,r);if(r&&r in D&&(r=null),r&&!(r in m))throw new Error("Unknown model: "+r);let n,t;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof b)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){let o=M.get(e);if(o===null)throw new Error("Unable to parse color from string: "+e);this.model=o.model,t=m[this.model].channels,this.color=o.value.slice(0,t),this.valpha=typeof o.value[t]=="number"?o.value[t]:1}else if(e.length>0){this.model=r||"rgb",t=m[this.model].channels;let o=Array.prototype.slice.call(e,0,t);this.color=z(o,t),this.valpha=typeof e[t]=="number"?e[t]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let o=Object.keys(e);"alpha"in e&&(o.splice(o.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);let a=o.sort().join("");if(!(a in E))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=E[a];let{labels:s}=m[this.model],l=[];for(n=0;n<s.length;n++)l.push(e[s[n]]);this.color=z(l)}if(O[this.model])for(t=m[this.model].channels,n=0;n<t;n++){let o=O[this.model][n];o&&(this.color[n]=o(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}b.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let r=this.model in M.to?this:this.rgb();r=r.round(typeof e=="number"?e:1);let n=r.valpha===1?r.color:[...r.color,this.valpha];return M.to[r.model](n)},percentString(e){let r=this.rgb().round(typeof e=="number"?e:1),n=r.valpha===1?r.color:[...r.color,this.valpha];return M.to.rgb.percent(n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:r}=m[this.model],{labels:n}=m[this.model];for(let t=0;t<r;t++)e[n[t]]=this.color[t];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new b([...this.color.map(pe(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new b([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:u("rgb",0,f(255)),green:u("rgb",1,f(255)),blue:u("rgb",2,f(255)),hue:u(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:u("hsl",1,f(100)),lightness:u("hsl",2,f(100)),saturationv:u("hsv",1,f(100)),value:u("hsv",2,f(100)),chroma:u("hcg",1,f(100)),gray:u("hcg",2,f(100)),white:u("hwb",1,f(100)),wblack:u("hwb",2,f(100)),cyan:u("cmyk",0,f(100)),magenta:u("cmyk",1,f(100)),yellow:u("cmyk",2,f(100)),black:u("cmyk",3,f(100)),x:u("xyz",0,f(95.047)),y:u("xyz",1,f(100)),z:u("xyz",2,f(108.833)),l:u("lab",0,f(100)),a:u("lab",1),b:u("lab",2),keyword(e){return e!==void 0?new b(e):m[this.model].keyword(this.color)},hex(e){return e!==void 0?new b(e):M.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new b(e);let r=this.rgb().round().color,n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),M.to.hex(r)+n},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,r=[];for(let[n,t]of e.entries()){let o=t/255;r[n]=o<=.04045?o/12.92:((o+.055)/1.055)**2.4}return .2126*r[0]+.7152*r[1]+.0722*r[2]},contrast(e){let r=this.luminosity(),n=e.luminosity();return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)},level(e){let r=this.contrast(e);return r>=7?"AAA":r>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let r=0;r<3;r++)e.color[r]=255-e.color[r];return e},lighten(e){let r=this.hsl();return r.color[2]+=r.color[2]*e,r},darken(e){let r=this.hsl();return r.color[2]-=r.color[2]*e,r},saturate(e){let r=this.hsl();return r.color[1]+=r.color[1]*e,r},desaturate(e){let r=this.hsl();return r.color[1]-=r.color[1]*e,r},whiten(e){let r=this.hwb();return r.color[1]+=r.color[1]*e,r},blacken(e){let r=this.hwb();return r.color[2]+=r.color[2]*e,r},grayscale(){let e=this.rgb().color,r=e[0]*.3+e[1]*.59+e[2]*.11;return b.rgb(r,r,r)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let r=this.hsl(),n=r.color[0];return n=(n+e)%360,n=n<0?360+n:n,r.color[0]=n,r},mix(e,r){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let n=e.rgb(),t=this.rgb(),o=r===void 0?.5:r,a=2*o-1,s=n.alpha()-t.alpha(),l=((a*s===-1?a:(a+s)/(1+a*s))+1)/2,i=1-l;return b.rgb(l*n.red()+i*t.red(),l*n.green()+i*t.green(),l*n.blue()+i*t.blue(),n.alpha()*o+t.alpha()*(1-o))}};for(let e of Object.keys(m)){if(D.includes(e))continue;let{channels:r}=m[e];b.prototype[e]=function(...n){return this.model===e?new b(this):n.length>0?new b(n,e):new b([...me(m[this.model][e].raw(this.color)),this.valpha],e)},b[e]=function(...n){let t=n[0];return typeof t=="number"&&(t=z(n,r)),new b(t,e)}}function be(e,r){return Number(e.toFixed(r))}function pe(e){return function(r){return be(r,e)}}function u(e,r,n){e=Array.isArray(e)?e:[e];for(let t of e)(O[t]||(O[t]=[]))[r]=n;return e=e[0],function(t){let o;return t!==void 0?(n&&(t=n(t)),o=this[e](),o.color[r]=t,o):(o=this[e]().color[r],n&&(o=n(o)),o)}}function f(e){return function(r){return Math.max(0,Math.min(e,r))}}function me(e){return Array.isArray(e)?e:[e]}function z(e,r){for(let n=0;n<r;n++)typeof e[n]!="number"&&(e[n]=0);return e}var ye=b,ve=G(ye),je={channel:"channel",channels:"channels",colorField:"color-field",colorFieldScope:"scope--color-field",colorMode:"color-mode",colorModeContainer:"color-mode-container",container:"container",control:"control",controlAndScope:"control-and-scope",controlSection:"control-section",deleteColor:"delete-color",header:"header",hexAndChannelsGroup:"hex-and-channels-group",hexOptions:"color-hex-options",hueScope:"scope--hue",hueSlider:"hue-slider",opacityScope:"scope--opacity",opacitySlider:"opacity-slider",preview:"preview",previewAndSliders:"preview-and-sliders",saveColor:"save-color",savedColor:"saved-color",savedColors:"saved-colors",savedColorsButtons:"saved-colors-buttons",savedColorsSection:"saved-colors-section",scope:"scope",section:"section",slider:"slider",sliders:"sliders",splitSection:"section--split"},$e=ve("#007AC2"),Fe="calcite-color-",Oe={r:255,g:255,b:255},we={h:360,s:100,v:100},Le=we.h-1,Ee={min:0,max:100},Se={s:{slider:{height:12,width:142},colorField:{height:110,width:198},thumb:{radius:7},preview:{size:20}},m:{slider:{height:12,width:170},colorField:{height:132,width:238},thumb:{radius:7},preview:{size:24}},l:{slider:{height:12,width:222},colorField:{height:168,width:302},thumb:{radius:7},preview:{size:32}}},ze=1,Be=/^[0-9A-F]$/i,ke=/^#[0-9A-F]{3}$/i,Me=/^#[0-9A-F]{6}$/i,xe=/^#[0-9A-F]{4}$/i,Ae=/^#[0-9A-F]{8}$/i,Ge=e=>Number((e*100).toFixed()),Re=e=>Number((e/100).toFixed(2));function J(e,r=!1){return B(e,r)||He(e,r)}function K(e,r,n){return e?e.length===r&&n.test(e):!1}function B(e,r=!1){return K(e,r?5:4,r?xe:ke)}function He(e,r=!1){return K(e,r?9:7,r?Ae:Me)}function _e(e,r=!1,n=!1){if(e=e.toLowerCase(),e.startsWith("#")||(e=`#${e}`),B(e,r))return _(I(e,r));if(r&&n&&J(e,!1)){let t=B(e,!1);return _(I(`${e}${t?"f":"ff"}`,!0))}return e}function Ie(e,r=!1){return r?e.hexa():e.hex()}function _(e){let{r,g:n,b:t}=e,o=$(r),a=$(n),s=$(t),l="a"in e?$(e.a*255):"";return`#${o}${a}${s}${l}`.toLowerCase()}function $(e){return e.toString(16).padStart(2,"0")}function qe(e){let r={...e,a:e.alpha??1};return delete r.alpha,r}function Ne(e){let r={...e,alpha:e.a??1};return delete r.a,r}function I(e,r=!1){if(!J(e,r))return null;e=e.replace("#","");let n,t,o,a;if(e.length===3||e.length===4){let[s,l,i,h]=e.split("");n=parseInt(`${s}${s}`,16),t=parseInt(`${l}${l}`,16),o=parseInt(`${i}${i}`,16),a=parseInt(`${h}${h}`,16)/255}else n=parseInt(e.slice(0,2),16),t=parseInt(e.slice(2,4),16),o=parseInt(e.slice(4,6),16),a=parseInt(e.slice(6,8),16)/255;return isNaN(a)?{r:n,g:t,b:o}:{r:n,g:t,b:o,a}}var T=e=>e,g=T({HEX:"hex",HEXA:"hexa",RGB_CSS:"rgb-css",RGBA_CSS:"rgba-css",HSL_CSS:"hsl-css",HSLA_CSS:"hsla-css"}),d=T({RGB:"rgb",RGBA:"rgba",HSL:"hsl",HSLA:"hsla",HSV:"hsv",HSVA:"hsva"});function Xe(e){if(typeof e=="string"){if(e.startsWith("#")){let{length:r}=e;if(r===4||r===7)return g.HEX;if(r===5||r===9)return g.HEXA}if(e.startsWith("rgba("))return g.RGBA_CSS;if(e.startsWith("rgb("))return g.RGB_CSS;if(e.startsWith("hsl("))return g.HSL_CSS;if(e.startsWith("hsla("))return g.HSLA_CSS}if(typeof e=="object"){if(S(e,"r","g","b"))return S(e,"a")?d.RGBA:d.RGB;if(S(e,"h","s","l"))return S(e,"a")?d.HSLA:d.HSL;if(S(e,"h","s","v"))return S(e,"a")?d.HSVA:d.HSV}return null}function S(e,...r){return r.every(n=>n&&e&&`${n}`in e)}function Pe(e,r){return e?.rgb().array().toString()===r?.rgb().array().toString()}function Ve(e){return e===g.HEXA||e===g.RGBA_CSS||e===g.HSLA_CSS||e===d.RGBA||e===d.HSLA||e===d.HSVA}function Ue(e){return e===g.HEX?g.HEXA:e===g.RGB_CSS?g.RGBA_CSS:e===g.HSL_CSS?g.HSLA_CSS:e===d.RGB?d.RGBA:e===d.HSL?d.HSLA:e===d.HSV?d.HSVA:e}function We(e){return e===g.HEXA?g.HEX:e===g.RGBA_CSS?g.RGB_CSS:e===g.HSLA_CSS?g.HSL_CSS:e===d.RGBA?d.RGB:e===d.HSLA?d.HSL:e===d.HSVA?d.HSV:e}function De(e,r){let{slider:{width:n},preview:t}=e;if(r)return n;let o=Se.l.preview.size-t.size;return n+o}export{ve as a,je as b,$e as c,Fe as d,Oe as e,we as f,Le as g,Ee as h,Se as i,ze as j,Be as k,Ge as l,Re as m,J as n,B as o,He as p,_e as q,Ie as r,_ as s,qe as t,Ne as u,I as v,g as w,Xe as x,Pe as y,Ve as z,Ue as A,We as B,De as C};
|
|
6
|
+
import{b as G}from"./ON3PLUOP.js";var q={exports:{}},N={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},X={exports:{}},Z=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")},Y=Z,ee=Array.prototype.concat,re=Array.prototype.slice,R=X.exports=function(e){for(var r=[],n=0,t=e.length;n<t;n++){var o=e[n];Y(o)?r=ee.call(r,re.call(o)):r.push(o)}return r};R.wrap=function(e){return function(){return e(R(arguments))}};var ne=X.exports,x=N,H=ne,P=Object.hasOwnProperty,V=Object.create(null);for(C in x)P.call(x,C)&&(V[x[C]]=C);var C,y=q.exports={to:{},get:{}};y.get=function(e){var r=e.substring(0,3).toLowerCase(),n,t;switch(r){case"hsl":n=y.get.hsl(e),t="hsl";break;case"hwb":n=y.get.hwb(e),t="hwb";break;default:n=y.get.rgb(e),t="rgb";break}return n?{model:t,value:n}:null};y.get.rgb=function(e){if(!e)return null;var r=/^#([a-f0-9]{3,4})$/i,n=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,t=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,a=/^(\w+)$/,s=[0,0,0,1],l,i,h;if(l=e.match(n)){for(h=l[2],l=l[1],i=0;i<3;i++){var p=i*2;s[i]=parseInt(l.slice(p,p+2),16)}h&&(s[3]=parseInt(h,16)/255)}else if(l=e.match(r)){for(l=l[1],h=l[3],i=0;i<3;i++)s[i]=parseInt(l[i]+l[i],16);h&&(s[3]=parseInt(h+h,16)/255)}else if(l=e.match(t)){for(i=0;i<3;i++)s[i]=parseInt(l[i+1],0);l[4]&&(l[5]?s[3]=parseFloat(l[4])*.01:s[3]=parseFloat(l[4]))}else if(l=e.match(o)){for(i=0;i<3;i++)s[i]=Math.round(parseFloat(l[i+1])*2.55);l[4]&&(l[5]?s[3]=parseFloat(l[4])*.01:s[3]=parseFloat(l[4]))}else return(l=e.match(a))?l[1]==="transparent"?[0,0,0,0]:P.call(x,l[1])?(s=x[l[1]],s[3]=1,s):null:null;for(i=0;i<3;i++)s[i]=w(s[i],0,255);return s[3]=w(s[3],0,1),s};y.get.hsl=function(e){if(!e)return null;var r=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(r);if(n){var t=parseFloat(n[4]),o=(parseFloat(n[1])%360+360)%360,a=w(parseFloat(n[2]),0,100),s=w(parseFloat(n[3]),0,100),l=w(isNaN(t)?1:t,0,1);return[o,a,s,l]}return null};y.get.hwb=function(e){if(!e)return null;var r=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(r);if(n){var t=parseFloat(n[4]),o=(parseFloat(n[1])%360+360)%360,a=w(parseFloat(n[2]),0,100),s=w(parseFloat(n[3]),0,100),l=w(isNaN(t)?1:t,0,1);return[o,a,s,l]}return null};y.to.hex=function(){var e=H(arguments);return"#"+j(e[0])+j(e[1])+j(e[2])+(e[3]<1?j(Math.round(e[3]*255)):"")};y.to.rgb=function(){var e=H(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};y.to.rgb.percent=function(){var e=H(arguments),r=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),t=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+r+"%, "+n+"%, "+t+"%)":"rgba("+r+"%, "+n+"%, "+t+"%, "+e[3]+")"};y.to.hsl=function(){var e=H(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};y.to.hwb=function(){var e=H(arguments),r="";return e.length>=4&&e[3]!==1&&(r=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+r+")"};y.to.keyword=function(e){return V[e.slice(0,3)]};function w(e,r,n){return Math.min(Math.max(r,e),n)}function j(e){var r=Math.round(e).toString(16).toUpperCase();return r.length<2?"0"+r:r}var te=q.exports,A=N,U={};for(let e of Object.keys(A))U[A[e]]=e;var c={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},W=c;for(let e of Object.keys(c)){if(!("channels"in c[e]))throw new Error("missing channels property: "+e);if(!("labels"in c[e]))throw new Error("missing channel labels property: "+e);if(c[e].labels.length!==c[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:r,labels:n}=c[e];delete c[e].channels,delete c[e].labels,Object.defineProperty(c[e],"channels",{value:r}),Object.defineProperty(c[e],"labels",{value:n})}c.rgb.hsl=function(e){let r=e[0]/255,n=e[1]/255,t=e[2]/255,o=Math.min(r,n,t),a=Math.max(r,n,t),s=a-o,l,i;a===o?l=0:r===a?l=(n-t)/s:n===a?l=2+(t-r)/s:t===a&&(l=4+(r-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);let h=(o+a)/2;return a===o?i=0:h<=.5?i=s/(a+o):i=s/(2-a-o),[l,i*100,h*100]};c.rgb.hsv=function(e){let r,n,t,o,a,s=e[0]/255,l=e[1]/255,i=e[2]/255,h=Math.max(s,l,i),p=h-Math.min(s,l,i),v=function(Q){return(h-Q)/6/p+1/2};return p===0?(o=0,a=0):(a=p/h,r=v(s),n=v(l),t=v(i),s===h?o=t-n:l===h?o=1/3+r-t:i===h&&(o=2/3+n-r),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,h*100]};c.rgb.hwb=function(e){let r=e[0],n=e[1],t=e[2],o=c.rgb.hsl(e)[0],a=1/255*Math.min(r,Math.min(n,t));return t=1-1/255*Math.max(r,Math.max(n,t)),[o,a*100,t*100]};c.rgb.cmyk=function(e){let r=e[0]/255,n=e[1]/255,t=e[2]/255,o=Math.min(1-r,1-n,1-t),a=(1-r-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-t-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function oe(e,r){return(e[0]-r[0])**2+(e[1]-r[1])**2+(e[2]-r[2])**2}c.rgb.keyword=function(e){let r=U[e];if(r)return r;let n=1/0,t;for(let o of Object.keys(A)){let a=A[o],s=oe(e,a);s<n&&(n=s,t=o)}return t};c.keyword.rgb=function(e){return A[e]};c.rgb.xyz=function(e){let r=e[0]/255,n=e[1]/255,t=e[2]/255;r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,t=t>.04045?((t+.055)/1.055)**2.4:t/12.92;let o=r*.4124+n*.3576+t*.1805,a=r*.2126+n*.7152+t*.0722,s=r*.0193+n*.1192+t*.9505;return[o*100,a*100,s*100]};c.rgb.lab=function(e){let r=c.rgb.xyz(e),n=r[0],t=r[1],o=r[2];n/=95.047,t/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,t=t>.008856?t**(1/3):7.787*t+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;let a=116*t-16,s=500*(n-t),l=200*(t-o);return[a,s,l]};c.hsl.rgb=function(e){let r=e[0]/360,n=e[1]/100,t=e[2]/100,o,a,s;if(n===0)return s=t*255,[s,s,s];t<.5?o=t*(1+n):o=t+n-t*n;let l=2*t-o,i=[0,0,0];for(let h=0;h<3;h++)a=r+1/3*-(h-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,i[h]=s*255;return i};c.hsl.hsv=function(e){let r=e[0],n=e[1]/100,t=e[2]/100,o=n,a=Math.max(t,.01);t*=2,n*=t<=1?t:2-t,o*=a<=1?a:2-a;let s=(t+n)/2,l=t===0?2*o/(a+o):2*n/(t+n);return[r,l*100,s*100]};c.hsv.rgb=function(e){let r=e[0]/60,n=e[1]/100,t=e[2]/100,o=Math.floor(r)%6,a=r-Math.floor(r),s=255*t*(1-n),l=255*t*(1-n*a),i=255*t*(1-n*(1-a));switch(t*=255,o){case 0:return[t,i,s];case 1:return[l,t,s];case 2:return[s,t,i];case 3:return[s,l,t];case 4:return[i,s,t];case 5:return[t,s,l]}};c.hsv.hsl=function(e){let r=e[0],n=e[1]/100,t=e[2]/100,o=Math.max(t,.01),a,s;s=(2-n)*t;let l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[r,a*100,s*100]};c.hwb.rgb=function(e){let r=e[0]/360,n=e[1]/100,t=e[2]/100,o=n+t,a;o>1&&(n/=o,t/=o);let s=Math.floor(6*r),l=1-t;a=6*r-s,s&1&&(a=1-a);let i=n+a*(l-n),h,p,v;switch(s){default:case 6:case 0:h=l,p=i,v=n;break;case 1:h=i,p=l,v=n;break;case 2:h=n,p=l,v=i;break;case 3:h=n,p=i,v=l;break;case 4:h=i,p=n,v=l;break;case 5:h=l,p=n,v=i;break}return[h*255,p*255,v*255]};c.cmyk.rgb=function(e){let r=e[0]/100,n=e[1]/100,t=e[2]/100,o=e[3]/100,a=1-Math.min(1,r*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,t*(1-o)+o);return[a*255,s*255,l*255]};c.xyz.rgb=function(e){let r=e[0]/100,n=e[1]/100,t=e[2]/100,o,a,s;return o=r*3.2406+n*-1.5372+t*-.4986,a=r*-.9689+n*1.8758+t*.0415,s=r*.0557+n*-.204+t*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};c.xyz.lab=function(e){let r=e[0],n=e[1],t=e[2];r/=95.047,n/=100,t/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,t=t>.008856?t**(1/3):7.787*t+16/116;let o=116*n-16,a=500*(r-n),s=200*(n-t);return[o,a,s]};c.lab.xyz=function(e){let r=e[0],n=e[1],t=e[2],o,a,s;a=(r+16)/116,o=n/500+a,s=a-t/200;let l=a**3,i=o**3,h=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,s=h>.008856?h:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};c.lab.lch=function(e){let r=e[0],n=e[1],t=e[2],o;o=Math.atan2(t,n)*360/2/Math.PI,o<0&&(o+=360);let a=Math.sqrt(n*n+t*t);return[r,a,o]};c.lch.lab=function(e){let r=e[0],n=e[1],t=e[2]/360*2*Math.PI,o=n*Math.cos(t),a=n*Math.sin(t);return[r,o,a]};c.rgb.ansi16=function(e,r=null){let[n,t,o]=e,a=r===null?c.rgb.hsv(e)[2]:r;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(t/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};c.hsv.ansi16=function(e){return c.rgb.ansi16(c.hsv.rgb(e),e[2])};c.rgb.ansi256=function(e){let r=e[0],n=e[1],t=e[2];return r===n&&n===t?r<8?16:r>248?231:Math.round((r-8)/247*24)+232:16+36*Math.round(r/255*5)+6*Math.round(n/255*5)+Math.round(t/255*5)};c.ansi16.rgb=function(e){let r=e%10;if(r===0||r===7)return e>50&&(r+=3.5),r=r/10.5*255,[r,r,r];let n=(~~(e>50)+1)*.5,t=(r&1)*n*255,o=(r>>1&1)*n*255,a=(r>>2&1)*n*255;return[t,o,a]};c.ansi256.rgb=function(e){if(e>=232){let a=(e-232)*10+8;return[a,a,a]}e-=16;let r,n=Math.floor(e/36)/5*255,t=Math.floor((r=e%36)/6)/5*255,o=r%6/5*255;return[n,t,o]};c.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};c.hex.rgb=function(e){let r=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!r)return[0,0,0];let n=r[0];r[0].length===3&&(n=n.split("").map(l=>l+l).join(""));let t=parseInt(n,16),o=t>>16&255,a=t>>8&255,s=t&255;return[o,a,s]};c.rgb.hcg=function(e){let r=e[0]/255,n=e[1]/255,t=e[2]/255,o=Math.max(Math.max(r,n),t),a=Math.min(Math.min(r,n),t),s=o-a,l,i;return s<1?l=a/(1-s):l=0,s<=0?i=0:o===r?i=(n-t)/s%6:o===n?i=2+(t-r)/s:i=4+(r-n)/s,i/=6,i%=1,[i*360,s*100,l*100]};c.hsl.hcg=function(e){let r=e[1]/100,n=e[2]/100,t=n<.5?2*r*n:2*r*(1-n),o=0;return t<1&&(o=(n-.5*t)/(1-t)),[e[0],t*100,o*100]};c.hsv.hcg=function(e){let r=e[1]/100,n=e[2]/100,t=r*n,o=0;return t<1&&(o=(n-t)/(1-t)),[e[0],t*100,o*100]};c.hcg.rgb=function(e){let r=e[0]/360,n=e[1]/100,t=e[2]/100;if(n===0)return[t*255,t*255,t*255];let o=[0,0,0],a=r%1*6,s=a%1,l=1-s,i=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*t,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};c.hcg.hsv=function(e){let r=e[1]/100,n=e[2]/100,t=r+n*(1-r),o=0;return t>0&&(o=r/t),[e[0],o*100,t*100]};c.hcg.hsl=function(e){let r=e[1]/100,n=e[2]/100*(1-r)+.5*r,t=0;return n>0&&n<.5?t=r/(2*n):n>=.5&&n<1&&(t=r/(2*(1-n))),[e[0],t*100,n*100]};c.hcg.hwb=function(e){let r=e[1]/100,n=e[2]/100,t=r+n*(1-r);return[e[0],(t-r)*100,(1-t)*100]};c.hwb.hcg=function(e){let r=e[1]/100,n=1-e[2]/100,t=n-r,o=0;return t<1&&(o=(n-t)/(1-t)),[e[0],t*100,o*100]};c.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};c.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};c.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};c.gray.hsl=function(e){return[0,0,e[0]]};c.gray.hsv=c.gray.hsl;c.gray.hwb=function(e){return[0,100,e[0]]};c.gray.cmyk=function(e){return[0,0,0,e[0]]};c.gray.lab=function(e){return[e[0],0,0]};c.gray.hex=function(e){let r=Math.round(e[0]/100*255)&255,n=((r<<16)+(r<<8)+r).toString(16).toUpperCase();return"000000".substring(n.length)+n};c.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};var F=W;function se(){let e={},r=Object.keys(F);for(let n=r.length,t=0;t<n;t++)e[r[t]]={distance:-1,parent:null};return e}function ae(e){let r=se(),n=[e];for(r[e].distance=0;n.length;){let t=n.pop(),o=Object.keys(F[t]);for(let a=o.length,s=0;s<a;s++){let l=o[s],i=r[l];i.distance===-1&&(i.distance=r[t].distance+1,i.parent=t,n.unshift(l))}}return r}function le(e,r){return function(n){return r(e(n))}}function ie(e,r){let n=[r[e].parent,e],t=F[r[e].parent][e],o=r[e].parent;for(;r[o].parent;)n.unshift(r[o].parent),t=le(F[r[o].parent][o],t),o=r[o].parent;return t.conversion=n,t}var ce=function(e){let r=ae(e),n={},t=Object.keys(r);for(let o=t.length,a=0;a<o;a++){let s=t[a];r[s].parent!==null&&(n[s]=ie(s,r))}return n},L=W,he=ce,k={},ue=Object.keys(L);function ge(e){let r=function(...n){let t=n[0];return t==null?t:(t.length>1&&(n=t),e(n))};return"conversion"in e&&(r.conversion=e.conversion),r}function de(e){let r=function(...n){let t=n[0];if(t==null)return t;t.length>1&&(n=t);let o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s<a;s++)o[s]=Math.round(o[s]);return o};return"conversion"in e&&(r.conversion=e.conversion),r}ue.forEach(e=>{k[e]={},Object.defineProperty(k[e],"channels",{value:L[e].channels}),Object.defineProperty(k[e],"labels",{value:L[e].labels});let r=he(e);Object.keys(r).forEach(n=>{let t=r[n];k[e][n]=de(t),k[e][n].raw=ge(t)})});var fe=k,M=te,m=fe,D=["keyword","gray","hex"],E={};for(let e of Object.keys(m))E[[...m[e].labels].sort().join("")]=e;var O={};function b(e,r){if(!(this instanceof b))return new b(e,r);if(r&&r in D&&(r=null),r&&!(r in m))throw new Error("Unknown model: "+r);let n,t;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof b)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){let o=M.get(e);if(o===null)throw new Error("Unable to parse color from string: "+e);this.model=o.model,t=m[this.model].channels,this.color=o.value.slice(0,t),this.valpha=typeof o.value[t]=="number"?o.value[t]:1}else if(e.length>0){this.model=r||"rgb",t=m[this.model].channels;let o=Array.prototype.slice.call(e,0,t);this.color=z(o,t),this.valpha=typeof e[t]=="number"?e[t]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let o=Object.keys(e);"alpha"in e&&(o.splice(o.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);let a=o.sort().join("");if(!(a in E))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=E[a];let{labels:s}=m[this.model],l=[];for(n=0;n<s.length;n++)l.push(e[s[n]]);this.color=z(l)}if(O[this.model])for(t=m[this.model].channels,n=0;n<t;n++){let o=O[this.model][n];o&&(this.color[n]=o(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}b.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let r=this.model in M.to?this:this.rgb();r=r.round(typeof e=="number"?e:1);let n=r.valpha===1?r.color:[...r.color,this.valpha];return M.to[r.model](n)},percentString(e){let r=this.rgb().round(typeof e=="number"?e:1),n=r.valpha===1?r.color:[...r.color,this.valpha];return M.to.rgb.percent(n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:r}=m[this.model],{labels:n}=m[this.model];for(let t=0;t<r;t++)e[n[t]]=this.color[t];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new b([...this.color.map(pe(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new b([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:u("rgb",0,f(255)),green:u("rgb",1,f(255)),blue:u("rgb",2,f(255)),hue:u(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:u("hsl",1,f(100)),lightness:u("hsl",2,f(100)),saturationv:u("hsv",1,f(100)),value:u("hsv",2,f(100)),chroma:u("hcg",1,f(100)),gray:u("hcg",2,f(100)),white:u("hwb",1,f(100)),wblack:u("hwb",2,f(100)),cyan:u("cmyk",0,f(100)),magenta:u("cmyk",1,f(100)),yellow:u("cmyk",2,f(100)),black:u("cmyk",3,f(100)),x:u("xyz",0,f(95.047)),y:u("xyz",1,f(100)),z:u("xyz",2,f(108.833)),l:u("lab",0,f(100)),a:u("lab",1),b:u("lab",2),keyword(e){return e!==void 0?new b(e):m[this.model].keyword(this.color)},hex(e){return e!==void 0?new b(e):M.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new b(e);let r=this.rgb().round().color,n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),M.to.hex(r)+n},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,r=[];for(let[n,t]of e.entries()){let o=t/255;r[n]=o<=.04045?o/12.92:((o+.055)/1.055)**2.4}return .2126*r[0]+.7152*r[1]+.0722*r[2]},contrast(e){let r=this.luminosity(),n=e.luminosity();return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)},level(e){let r=this.contrast(e);return r>=7?"AAA":r>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let r=0;r<3;r++)e.color[r]=255-e.color[r];return e},lighten(e){let r=this.hsl();return r.color[2]+=r.color[2]*e,r},darken(e){let r=this.hsl();return r.color[2]-=r.color[2]*e,r},saturate(e){let r=this.hsl();return r.color[1]+=r.color[1]*e,r},desaturate(e){let r=this.hsl();return r.color[1]-=r.color[1]*e,r},whiten(e){let r=this.hwb();return r.color[1]+=r.color[1]*e,r},blacken(e){let r=this.hwb();return r.color[2]+=r.color[2]*e,r},grayscale(){let e=this.rgb().color,r=e[0]*.3+e[1]*.59+e[2]*.11;return b.rgb(r,r,r)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let r=this.hsl(),n=r.color[0];return n=(n+e)%360,n=n<0?360+n:n,r.color[0]=n,r},mix(e,r){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let n=e.rgb(),t=this.rgb(),o=r===void 0?.5:r,a=2*o-1,s=n.alpha()-t.alpha(),l=((a*s===-1?a:(a+s)/(1+a*s))+1)/2,i=1-l;return b.rgb(l*n.red()+i*t.red(),l*n.green()+i*t.green(),l*n.blue()+i*t.blue(),n.alpha()*o+t.alpha()*(1-o))}};for(let e of Object.keys(m)){if(D.includes(e))continue;let{channels:r}=m[e];b.prototype[e]=function(...n){return this.model===e?new b(this):n.length>0?new b(n,e):new b([...me(m[this.model][e].raw(this.color)),this.valpha],e)},b[e]=function(...n){let t=n[0];return typeof t=="number"&&(t=z(n,r)),new b(t,e)}}function be(e,r){return Number(e.toFixed(r))}function pe(e){return function(r){return be(r,e)}}function u(e,r,n){e=Array.isArray(e)?e:[e];for(let t of e)(O[t]||(O[t]=[]))[r]=n;return e=e[0],function(t){let o;return t!==void 0?(n&&(t=n(t)),o=this[e](),o.color[r]=t,o):(o=this[e]().color[r],n&&(o=n(o)),o)}}function f(e){return function(r){return Math.max(0,Math.min(e,r))}}function me(e){return Array.isArray(e)?e:[e]}function z(e,r){for(let n=0;n<r;n++)typeof e[n]!="number"&&(e[n]=0);return e}var ye=b,ve=G(ye),je={channel:"channel",channels:"channels",colorField:"color-field",colorFieldScope:"scope--color-field",colorMode:"color-mode",colorModeContainer:"color-mode-container",container:"container",control:"control",controlAndScope:"control-and-scope",controlSection:"control-section",deleteColor:"delete-color",header:"header",hexAndChannelsGroup:"hex-and-channels-group",hexOptions:"color-hex-options",hueScope:"scope--hue",hueSlider:"hue-slider",opacityScope:"scope--opacity",opacitySlider:"opacity-slider",preview:"preview",previewAndSliders:"preview-and-sliders",saveColor:"save-color",savedColor:"saved-color",savedColors:"saved-colors",savedColorsButtons:"saved-colors-buttons",savedColorsSection:"saved-colors-section",scope:"scope",section:"section",slider:"slider",sliders:"sliders",splitSection:"section--split"},$e=ve("#007AC2"),Fe="calcite-color-",Oe={r:255,g:255,b:255},we={h:360,s:100,v:100},Le=we.h-1,Ee={min:0,max:100},Se={s:{slider:{height:12,width:142},colorField:{height:110,width:198},thumb:{radius:7},preview:{size:20}},m:{slider:{height:12,width:170},colorField:{height:132,width:238},thumb:{radius:7},preview:{size:24}},l:{slider:{height:12,width:222},colorField:{height:168,width:302},thumb:{radius:7},preview:{size:32}}},ze=1,Be=/^[0-9A-F]$/i,ke=/^#[0-9A-F]{3}$/i,Me=/^#[0-9A-F]{6}$/i,xe=/^#[0-9A-F]{4}$/i,Ae=/^#[0-9A-F]{8}$/i,Ge=e=>Number((e*100).toFixed()),Re=e=>Number((e/100).toFixed(2));function J(e,r=!1){return B(e,r)||He(e,r)}function K(e,r,n){return e?e.length===r&&n.test(e):!1}function B(e,r=!1){return K(e,r?5:4,r?xe:ke)}function He(e,r=!1){return K(e,r?9:7,r?Ae:Me)}function _e(e,r=!1,n=!1){if(e=e.toLowerCase(),e.startsWith("#")||(e=`#${e}`),B(e,r))return _(I(e,r));if(r&&n&&J(e,!1)){let t=B(e,!1);return _(I(`${e}${t?"f":"ff"}`,!0))}return e}function Ie(e,r=!1){return r?e.hexa():e.hex()}function _(e){let{r,g:n,b:t}=e,o=$(r),a=$(n),s=$(t),l="a"in e?$(e.a*255):"";return`#${o}${a}${s}${l}`.toLowerCase()}function $(e){return e.toString(16).padStart(2,"0")}function qe(e){let r={...e,a:e.alpha??1};return delete r.alpha,r}function Ne(e){let r={...e,alpha:e.a??1};return delete r.a,r}function I(e,r=!1){if(!J(e,r))return null;e=e.replace("#","");let n,t,o,a;if(e.length===3||e.length===4){let[s,l,i,h]=e.split("");n=parseInt(`${s}${s}`,16),t=parseInt(`${l}${l}`,16),o=parseInt(`${i}${i}`,16),a=parseInt(`${h}${h}`,16)/255}else n=parseInt(e.slice(0,2),16),t=parseInt(e.slice(2,4),16),o=parseInt(e.slice(4,6),16),a=parseInt(e.slice(6,8),16)/255;return isNaN(a)?{r:n,g:t,b:o}:{r:n,g:t,b:o,a}}var T=e=>e,g=T({HEX:"hex",HEXA:"hexa",RGB_CSS:"rgb-css",RGBA_CSS:"rgba-css",HSL_CSS:"hsl-css",HSLA_CSS:"hsla-css"}),d=T({RGB:"rgb",RGBA:"rgba",HSL:"hsl",HSLA:"hsla",HSV:"hsv",HSVA:"hsva"});function Xe(e){if(typeof e=="string"){if(e.startsWith("#")){let{length:r}=e;if(r===4||r===7)return g.HEX;if(r===5||r===9)return g.HEXA}if(e.startsWith("rgba("))return g.RGBA_CSS;if(e.startsWith("rgb("))return g.RGB_CSS;if(e.startsWith("hsl("))return g.HSL_CSS;if(e.startsWith("hsla("))return g.HSLA_CSS}if(typeof e=="object"){if(S(e,"r","g","b"))return S(e,"a")?d.RGBA:d.RGB;if(S(e,"h","s","l"))return S(e,"a")?d.HSLA:d.HSL;if(S(e,"h","s","v"))return S(e,"a")?d.HSVA:d.HSV}return null}function S(e,...r){return r.every(n=>n&&e&&`${n}`in e)}function Pe(e,r){return e?.rgb().array().toString()===r?.rgb().array().toString()}function Ve(e){return e===g.HEXA||e===g.RGBA_CSS||e===g.HSLA_CSS||e===d.RGBA||e===d.HSLA||e===d.HSVA}function Ue(e){return e===g.HEX?g.HEXA:e===g.RGB_CSS?g.RGBA_CSS:e===g.HSL_CSS?g.HSLA_CSS:e===d.RGB?d.RGBA:e===d.HSL?d.HSLA:e===d.HSV?d.HSVA:e}function We(e){return e===g.HEXA?g.HEX:e===g.RGBA_CSS?g.RGB_CSS:e===g.HSLA_CSS?g.HSL_CSS:e===d.RGBA?d.RGB:e===d.HSLA?d.HSL:e===d.HSVA?d.HSV:e}function De(e,r){let{slider:{width:n},preview:t}=e;if(r)return n;let o=Se.l.preview.size-t.size;return n+o}export{ve as a,je as b,$e as c,Fe as d,Oe as e,we as f,Le as g,Ee as h,Se as i,ze as j,Be as k,Ge as l,Re as m,J as n,B as o,He as p,_e as q,Ie as r,_ as s,qe as t,Ne as u,I as v,g as w,Xe as x,Pe as y,Ve as z,Ue as A,We as B,De as C};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.102
|
|
5
5
|
*/
|
|
6
|
-
import{b as e}from"./
|
|
6
|
+
import{b as e}from"./6F5HO2CW.js";import"./5V4KINIS.js";var a={name:"en-au",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),weekStart:1,weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ordinal:function(_){return _},formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}};e.locale(a,null,!0);var t=a;export{t as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
+
* v3.0.0-next.102
|
|
5
|
+
*/
|
|
6
|
+
import{a as A}from"./SAZ3ANOP.js";import{a as m,c as w,d as $,e as z,f as H,g as r,h as T}from"./CRC3QSV5.js";import"./NZNZAYKF.js";import{a as S}from"./EKSEDQZK.js";import{a as k,b as C}from"./YGYL5EWA.js";import"./G2JE6NWB.js";import{a as P}from"./KIXCX2AK.js";import{a as p}from"./QJRABNEL.js";import{b as l}from"./ZE4G7GXI.js";import{l as h,n as y,z as n}from"./4FU7RE33.js";import{a as I,b as O,d as x}from"./HQLR4YL6.js";import{a as E}from"./K2UZIGDO.js";import{I as D,d as g,e as b,u as o,v,w as d}from"./DMYTLYTD.js";var L={dropdownTrigger:"trigger"},U={wrapper:"calcite-dropdown-wrapper"},B=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}.calcite-dropdown-wrapper{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown);inline-size:max-content;display:none;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}.calcite-dropdown-wrapper .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);transition-property:inset,left,opacity;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.calcite-dropdown-wrapper[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.calcite-dropdown-wrapper[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.calcite-dropdown-wrapper[data-placement^=left] .calcite-floating-ui-anim{left:5px}.calcite-dropdown-wrapper[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.calcite-dropdown-wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}.calcite-dropdown-content{max-block-size:45vh;inline-size:auto;overflow-y:auto;overflow-x:hidden;background-color:var(--calcite-color-foreground-1);inline-size:var(--calcite-dropdown-width)}.calcite-trigger-container{position:relative;display:flex;block-size:100%;flex:1 1 auto;word-wrap:break-word;word-break:break-word}.width-s{--calcite-dropdown-width: 12rem}.width-m{--calcite-dropdown-width: 14rem}.width-l{--calcite-dropdown-width: 16rem}@media (forced-colors: active){:host([open]) .calcite-dropdown-wrapper{border:1px solid canvasText}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,u=class extends v{constructor(){super(),this.focusLastDropdownItem=!1,this.groups=[],this.guid=`calcite-dropdown-${E()}`,this.items=[],this.mutationObserver=p("mutation",()=>this.updateItems()),this.onOpenEnd=()=>{this.focusOnFirstActiveOrDefaultItem(),this.el.removeEventListener("calciteDropdownOpen",this.onOpenEnd)},this.transitionProp="opacity",this.resizeObserver=p("resize",e=>this.resizeObserverCallback(e)),this.closeOnSelectDisabled=!1,this.disabled=!1,this.maxItems=0,this.open=!1,this.overlayPositioning="absolute",this.placement=m,this.scale="m",this.selectedItems=[],this.type="click",this.calciteDropdownBeforeClose=o({cancelable:!1}),this.calciteDropdownBeforeOpen=o({cancelable:!1}),this.calciteDropdownClose=o({cancelable:!1}),this.calciteDropdownOpen=o({cancelable:!1}),this.calciteDropdownSelect=o({cancelable:!1}),this.listenOn(window,"click",this.closeCalciteDropdownOnClick),this.listen("calciteInternalDropdownCloseRequest",this.closeCalciteDropdownOnEvent),this.listenOn(window,"calciteDropdownOpen",this.closeCalciteDropdownOnOpenEvent),this.listen("pointerenter",this.pointerEnterHandler),this.listen("pointerleave",this.pointerLeaveHandler),this.listen("calciteInternalDropdownItemKeyEvent",this.calciteInternalDropdownItemKeyEvent),this.listen("calciteInternalDropdownItemSelect",this.handleItemSelect)}static{this.properties={closeOnSelectDisabled:7,disabled:7,flipPlacements:0,maxItems:11,open:7,overlayPositioning:3,placement:3,scale:3,selectedItems:0,type:3,widthScale:3,width:3}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=B}async reposition(e=!1){let{floatingEl:t,referenceEl:i,placement:s,overlayPositioning:a,filteredFlipPlacements:c}=this;return z(this,{floatingEl:t,referenceEl:i,overlayPositioning:a,placement:s,flipPlacements:c,type:"menu"},e)}async setFocus(){await x(this),y(this.referenceEl)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),this.updateItems(),r(this)}load(){I(this)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("flipPlacements")&&this.flipPlacementsHandler(),e.has("maxItems")&&(this.hasUpdated||this.maxItems!==0)&&this.setMaxScrollerHeight(),(e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!==m))&&this.reposition(!0),e.has("scale")&&(this.hasUpdated||this.scale!=="m")&&this.handlePropsChange()}updated(){k(this)}loaded(){this.updateSelectedItems(),O(this),r(this)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),T(this)}openHandler(){S(this),!this.disabled&&this.reposition(!0)}handleDisabledChange(e){e||(this.open=!1)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}handlePropsChange(){this.updateItems(),this.updateGroupScale()}closeCalciteDropdownOnClick(e){this.disabled||!this.open||e.composedPath().includes(this.el)||this.closeCalciteDropdown(!1)}closeCalciteDropdownOnEvent(e){this.closeCalciteDropdown(),e.stopPropagation()}closeCalciteDropdownOnOpenEvent(e){e.composedPath().includes(this.el)||(this.open=!1)}pointerEnterHandler(){this.disabled||this.type!=="hover"||this.toggleDropdown()}pointerLeaveHandler(){this.disabled||this.type!=="hover"||this.closeCalciteDropdown()}getTraversableItems(){return this.items.filter(e=>!e.disabled&&!e.hidden)}calciteInternalDropdownItemKeyEvent(e){let{keyboardEvent:t}=e.detail,i=t.target,s=this.getTraversableItems();switch(t.key){case"Tab":this.open=!1,this.updateTabIndexOfItems(i);break;case"ArrowDown":n(s,i,"next");break;case"ArrowUp":n(s,i,"previous");break;case"Home":n(s,i,"first");break;case"End":n(s,i,"last");break}e.stopPropagation()}handleItemSelect(e){this.updateSelectedItems(),e.stopPropagation(),this.calciteDropdownSelect.emit(),(!this.closeOnSelectDisabled||e.detail.requestedDropdownGroup.selectionMode==="none")&&this.closeCalciteDropdown(),e.stopPropagation()}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?$(t,e):null}updateTriggers(e){this.triggers=e.target.assignedElements({flatten:!0}),this.reposition(!0)}updateItems(){this.items=this.groups.map(e=>Array.from(e?.querySelectorAll("calcite-dropdown-item"))).reduce((e,t)=>[...e,...t],[]),this.updateSelectedItems(),this.reposition(!0),this.items.forEach(e=>e.scale=this.scale)}updateGroups(e){let t=e.target.assignedElements({flatten:!0}).filter(i=>i?.matches("calcite-dropdown-group"));this.groups=t,this.updateItems(),this.updateGroupScale()}updateGroupScale(){this.groups?.forEach(e=>e.scale=this.scale)}resizeObserverCallback(e){e.forEach(t=>{let{target:i}=t;i===this.referenceEl?this.setDropdownWidth():i===this.scrollerEl&&this.setMaxScrollerHeight()})}setDropdownWidth(){let{referenceEl:e,scrollerEl:t}=this,i=e?.clientWidth;!i||!t||(t.style.minWidth=`${i}px`)}setMaxScrollerHeight(){let{scrollerEl:e}=this;if(!e)return;this.reposition(!0);let t=this.getMaxScrollerHeight();e.style.maxBlockSize=t>0?`${t}px`:"",this.reposition(!0)}setScrollerAndTransitionEl(e){e&&this.resizeObserver?.observe(e),this.scrollerEl=e,this.transitionEl=e}onBeforeOpen(){this.calciteDropdownBeforeOpen.emit()}onOpen(){this.calciteDropdownOpen.emit()}onBeforeClose(){this.calciteDropdownBeforeClose.emit()}onClose(){this.calciteDropdownClose.emit(),H(this)}setReferenceEl(e){this.referenceEl=e,r(this),e&&this.resizeObserver?.observe(e)}setFloatingEl(e){this.floatingEl=e,r(this)}keyDownHandler(e){if(!e.composedPath().includes(this.referenceEl))return;let{defaultPrevented:t,key:i}=e;if(!t){if(i==="Escape"){this.closeCalciteDropdown(),e.preventDefault();return}if(this.open&&e.shiftKey&&i==="Tab"){this.closeCalciteDropdown(),e.preventDefault();return}P(i)?(this.toggleDropdown(),e.preventDefault()):(i==="ArrowDown"||i==="ArrowUp")&&(e.preventDefault(),this.focusLastDropdownItem=i==="ArrowUp",this.open=!0,this.el.addEventListener("calciteDropdownOpen",this.onOpenEnd))}}updateSelectedItems(){this.selectedItems=this.items.filter(e=>e.selected)}getMaxScrollerHeight(){let{maxItems:e,items:t}=this,i=0,s=0,a;return this.groups.forEach(c=>{e>0&&i<e&&Array.from(c.children).forEach((f,F)=>{F===0&&(isNaN(a)&&(a=f.offsetTop),s+=a),i<e&&(s+=f.offsetHeight,i+=1)})}),t.length>=e?s:0}closeCalciteDropdown(e=!0){this.open=!1,e&&h(this.triggers[0])}focusOnFirstActiveOrDefaultItem(){let e=this.getTraversableItems().find(t=>t.selected)||(this.focusLastDropdownItem?this.items[this.items.length-1]:this.items[0]);this.focusLastDropdownItem=!1,e&&h(e)}toggleDropdown(){this.open=!this.open,this.open&&this.el.addEventListener("calciteDropdownOpen",this.onOpenEnd)}updateTabIndexOfItems(e){this.items.forEach(t=>{t.tabIndex=e!==t?-1:0})}render(){let{open:e,guid:t}=this;return C({disabled:this.disabled,children:b`<div class="calcite-trigger-container" .id=${`${t}-menubutton`} @click=${this.toggleDropdown} @keydown=${this.keyDownHandler} ${l(this.setReferenceEl)}><slot aria-controls=${`${t}-menu`} .ariaExpanded=${e} aria-haspopup=menu name=${L.dropdownTrigger} @slotchange=${this.updateTriggers}></slot></div><div .ariaHidden=${!e} class=${d({[U.wrapper]:!0,[A("width",this.width,this.widthScale)]:!!(this.width||this.widthScale)})} ${l(this.setFloatingEl)}><div aria-labelledby=${`${t}-menubutton`} class=${d({"calcite-dropdown-content":!0,[w.animation]:!0,[w.animationActive]:e})} .id=${`${t}-menu`} role=menu ${l(this.setScrollerAndTransitionEl)}><slot @slotchange=${this.updateGroups}></slot></div></div>`})}};D("calcite-dropdown",u);export{u as Dropdown};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
4
|
-
* v3.0.0-next.
|
|
4
|
+
* v3.0.0-next.102
|
|
5
5
|
*/
|
|
6
|
-
import{e as a,i,w as s}from"./
|
|
6
|
+
import{e as a,i,w as s}from"./DMYTLYTD.js";var c={validationContainer:"validation-container"},d=({scale:t,status:e,id:n,icon:o,message:l})=>a`<div class=${s(c.validationContainer)}><calcite-input-message aria-live=polite .icon=${o} id=${n??i} .scale=${t} .status=${e}>${l}</calcite-input-message></div>`;export{d as a};
|