@esri/calcite-components 5.0.0-next.5 → 5.0.0-next.7
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/{SGJU36YV.js → 24UNOSYB.js} +2 -2
- package/dist/calcite/{AUIOWPFN.js → 2ECRIOED.js} +2 -2
- package/dist/calcite/{Q3MUDXRY.js → 2HYBRHEU.js} +2 -2
- package/dist/calcite/{DJVVGNTK.js → 2IQPS5BW.js} +1 -1
- package/dist/calcite/{PU5TGCQG.js → 2KVMN7YW.js} +2 -2
- package/dist/calcite/{ROWPIQLT.js → 2OCIK6EF.js} +2 -2
- package/dist/calcite/{HU4SHWE7.js → 2RX7VGW7.js} +2 -2
- package/dist/calcite/{LRKWQ3C3.js → 35ODAW6Y.js} +2 -2
- package/dist/calcite/{X374PRV7.js → 3BUYFS42.js} +2 -2
- package/dist/calcite/{RND3V33U.js → 3DKJFWNF.js} +1 -1
- package/dist/calcite/{QFT74HW3.js → 3HF47TJO.js} +2 -2
- package/dist/calcite/{LROCCBRV.js → 3I3IVUOR.js} +2 -2
- package/dist/calcite/{Q2GRCTSJ.js → 3ND3NKAM.js} +2 -2
- package/dist/calcite/{2VKJIYLT.js → 3Y3BABEA.js} +1 -1
- package/dist/calcite/{6VQ5IL36.js → 4I7T7O63.js} +2 -2
- package/dist/calcite/{YSP6WWQB.js → 4PHM5LVD.js} +1 -1
- package/dist/calcite/{7QP5BUGE.js → 4VLHPNAN.js} +2 -2
- package/dist/calcite/{BNKVQYLQ.js → 4ZGFBBWU.js} +2 -2
- package/dist/calcite/{F6EDNLSI.js → 54C7JZCX.js} +2 -2
- package/dist/calcite/{IEL7YV5C.js → 5CNBXVWP.js} +2 -2
- package/dist/calcite/{2GG4AF5T.js → 5RCYTHKP.js} +1 -1
- package/dist/calcite/{2KH3AUCG.js → 63DWWG4C.js} +2 -2
- package/dist/calcite/{4JZMONLD.js → 64ADIWEN.js} +2 -2
- package/dist/calcite/{OCT7LR2O.js → 6LFC7HO5.js} +1 -1
- package/dist/calcite/{3NOZ7M75.js → 6PCOKKOU.js} +2 -2
- package/dist/calcite/{H5DKF7F3.js → 6V5G43HO.js} +2 -2
- package/dist/calcite/{BEUZYBM5.js → 6YPBRY3A.js} +2 -2
- package/dist/calcite/{C2X6VADY.js → 76NBXXTM.js} +2 -2
- package/dist/calcite/{BHU252WA.js → 77YWD3SD.js} +2 -2
- package/dist/calcite/{VKRWRFEJ.js → 7AGPEFKM.js} +2 -2
- package/dist/calcite/{3KUVOQAL.js → 7EYTTVZ5.js} +2 -2
- package/dist/calcite/{62OUMNJ6.js → 7IYMG4ER.js} +2 -2
- package/dist/calcite/{KRHM7ACI.js → 7LUAHEOY.js} +2 -2
- package/dist/calcite/{FZIUTVKD.js → 7RLP2DKK.js} +1 -1
- package/dist/calcite/{2HKRJLBG.js → 7TMYLJNL.js} +2 -2
- package/dist/calcite/{ZAQTILTS.js → 7TUINXH2.js} +2 -2
- package/dist/calcite/{KH3UKQ2D.js → 7ZHPTFVA.js} +2 -2
- package/dist/calcite/{ALDDSDTX.js → AD2NNFBJ.js} +1 -1
- package/dist/calcite/{5K2Z2TMW.js → AK3MQKBH.js} +2 -2
- package/dist/calcite/{NU57UAAO.js → AKL3TSYT.js} +1 -1
- package/dist/calcite/{NLYYOFNV.js → ALBSZ4AH.js} +1 -1
- package/dist/calcite/{N7OO7R2S.js → ATPINFYW.js} +2 -2
- package/dist/calcite/{WBGRGCXR.js → B45OJKRH.js} +2 -2
- package/dist/calcite/{6VPACZP5.js → B7BMLZ2H.js} +2 -2
- package/dist/calcite/{VQMSSO2U.js → BAESWKYQ.js} +2 -2
- package/dist/calcite/{B5JXPZDV.js → BC4ZMTFC.js} +2 -2
- package/dist/calcite/{YV7DKMEQ.js → BES467QA.js} +2 -2
- package/dist/calcite/{PLD7OLLJ.js → BOWHKIKV.js} +2 -2
- package/dist/calcite/{IKDSO2OB.js → D54UBP4E.js} +2 -2
- package/dist/calcite/{YCLOS6NX.js → D6WKHYT4.js} +2 -2
- package/dist/calcite/{3YZG7MA3.js → DDSPVSLH.js} +2 -2
- package/dist/calcite/{AQ4DKRX6.js → DIWZOGSO.js} +2 -2
- package/dist/calcite/{HXGFAPCM.js → DQ3HNJFH.js} +2 -2
- package/dist/calcite/EFJ3XPYN.js +4 -0
- package/dist/calcite/{H2FWQITV.js → ENP5M2UC.js} +1 -1
- package/dist/calcite/{NQJMDHT5.js → EZFMZ526.js} +2 -2
- package/dist/calcite/{PSCEW76J.js → F3FMRPUL.js} +2 -2
- package/dist/calcite/{I53JH7YD.js → FJGFRFXA.js} +2 -2
- package/dist/calcite/{BYZPKQRD.js → FSBWTOKG.js} +2 -2
- package/dist/calcite/{CVLFEMH2.js → FZSVZEO4.js} +2 -2
- package/dist/calcite/{MVLJJOH2.js → G5DFRKUT.js} +2 -2
- package/dist/calcite/{7DTG5KDL.js → G6YXDPGD.js} +2 -2
- package/dist/calcite/{PFDLGOVS.js → G7Z7TBM3.js} +2 -2
- package/dist/calcite/{CF6DTFNX.js → GCM5UXYU.js} +2 -2
- package/dist/calcite/{UNJRBV2R.js → GQKPWPHX.js} +2 -2
- package/dist/calcite/{UOZDXXIF.js → GZGGTN2Z.js} +2 -2
- package/dist/calcite/{PVL2DQVP.js → H4XP55OC.js} +2 -2
- package/dist/calcite/{XRSYDXWZ.js → HIAAXHAL.js} +1 -1
- package/dist/calcite/{DOH3ZW2R.js → HIJA3ZQC.js} +2 -2
- package/dist/calcite/{YSBWKH76.js → HJDKPRY3.js} +1 -1
- package/dist/calcite/{ZLR2B6GQ.js → HWDBQK2D.js} +1 -1
- package/dist/calcite/{VYFT5EAY.js → HZH2MCFD.js} +1 -1
- package/dist/calcite/{ZZGPQLEW.js → HZPG2SWG.js} +2 -2
- package/dist/calcite/{PZL4QWV5.js → IC5WCEPX.js} +2 -2
- package/dist/calcite/{ZTOBC3PN.js → IDJNYNZL.js} +2 -2
- package/dist/calcite/{7ZNR3GNI.js → IGUWR4FW.js} +2 -2
- package/dist/calcite/{XNLWKJLM.js → ILIB7POV.js} +2 -2
- package/dist/calcite/{7IHVHMIY.js → IQOVIHRV.js} +2 -2
- package/dist/calcite/{6J5W2PAJ.js → IQROUFUT.js} +2 -2
- package/dist/calcite/{WWJXVV6U.js → IQY3P34D.js} +2 -2
- package/dist/calcite/{AHOXXRX5.js → J4UVTWRA.js} +2 -2
- package/dist/calcite/{SMRCCHJE.js → J5N7X673.js} +2 -2
- package/dist/calcite/{67HVFNHP.js → JDCUDQFO.js} +2 -2
- package/dist/calcite/{OFZACK2Y.js → JERKEE6O.js} +2 -2
- package/dist/calcite/{2IWOXJH7.js → JOGTHWSZ.js} +2 -2
- package/dist/calcite/{Q23OEAP2.js → JSFR3YQ3.js} +2 -2
- package/dist/calcite/{S5CLKCGJ.js → JVPR6YZA.js} +1 -1
- package/dist/calcite/{H5ANNFJC.js → K5KOFFWP.js} +2 -2
- package/dist/calcite/{HT5KXL4J.js → KEVLNRNX.js} +2 -2
- package/dist/calcite/{APIFFM3O.js → KINXAP24.js} +2 -2
- package/dist/calcite/{ZSMNT5VS.js → KJ6B56VZ.js} +2 -2
- package/dist/calcite/{WTY55PPZ.js → KPSSR45E.js} +2 -2
- package/dist/calcite/{GUT2GKDG.js → LDHSD3M6.js} +2 -2
- package/dist/calcite/{Y3HXK6MO.js → LHYFZTCS.js} +2 -2
- package/dist/calcite/{U3KRKTQY.js → LKORF2QC.js} +2 -2
- package/dist/calcite/{LQ3URZCB.js → LLZVI27K.js} +2 -2
- package/dist/calcite/{3HXEF55M.js → LOPTIQJU.js} +2 -2
- package/dist/calcite/{3266GV6Z.js → LZ3EBLID.js} +2 -2
- package/dist/calcite/{RI3NRBMI.js → M3RKWDE5.js} +2 -2
- package/dist/calcite/{7PFVW4JF.js → M4K4HY3K.js} +1 -1
- package/dist/calcite/{MP3OWQ2A.js → MJWAQ2DA.js} +2 -2
- package/dist/calcite/{7IYAKB7Q.js → MXNI5GI4.js} +2 -2
- package/dist/calcite/{AUF6YLAM.js → MYURWUJP.js} +2 -2
- package/dist/calcite/{A4CO6B7Z.js → N6NZ2GPW.js} +2 -2
- package/dist/calcite/{XNFJXDQ6.js → NNOPKVPT.js} +2 -2
- package/dist/calcite/{W72YZH73.js → O7MZFL34.js} +2 -2
- package/dist/calcite/{K3AHNZL7.js → OOLTKMQJ.js} +2 -2
- package/dist/calcite/{IHEW664E.js → OVNV2JKE.js} +2 -2
- package/dist/calcite/{4GHB4NY4.js → OVVNV5BW.js} +2 -2
- package/dist/calcite/{W5OJOVZY.js → OWSWQHLM.js} +1 -1
- package/dist/calcite/{LJI5SYGA.js → OZ3WSD3P.js} +1 -1
- package/dist/calcite/{C4S2BOWK.js → OZMAX3VQ.js} +2 -2
- package/dist/calcite/{DONAES6Q.js → PN64O3P6.js} +2 -2
- package/dist/calcite/{MEFMO7UB.js → POAMCSPF.js} +2 -2
- package/dist/calcite/{73LRFHS4.js → PUPMRTUL.js} +2 -2
- package/dist/calcite/{PSNA5FAF.js → PWZGTFQO.js} +2 -2
- package/dist/calcite/{HBHSBTMM.js → Q3THBLRM.js} +1 -1
- package/dist/calcite/{DDW4WTS2.js → QGI3TWNX.js} +2 -2
- package/dist/calcite/{WPTOKN7K.js → QR2HL6XI.js} +1 -1
- package/dist/calcite/{V4NPQ4WA.js → QVSPMDDW.js} +2 -2
- package/dist/calcite/{DZWPXJWV.js → QYBWEPW5.js} +2 -2
- package/dist/calcite/{W6EWFSR3.js → R7Q2LFGI.js} +2 -2
- package/dist/calcite/{45F6XOYY.js → REXSF55X.js} +2 -2
- package/dist/calcite/{VMWAAH5B.js → RHBRNWUQ.js} +2 -2
- package/dist/calcite/{CQMVTE7J.js → RIB7K6T6.js} +2 -2
- package/dist/calcite/{5IPJANUU.js → SBARVI35.js} +2 -2
- package/dist/calcite/{5LAPR75M.js → SBJ5HVNQ.js} +2 -2
- package/dist/calcite/{HVF3RXXI.js → SH7VNOTQ.js} +2 -2
- package/dist/calcite/{OMKDUGKV.js → SIVW7YY5.js} +2 -2
- package/dist/calcite/{2YBCAJSV.js → SJGZNFSY.js} +2 -2
- package/dist/calcite/{JJWGSKGI.js → T36PZDA3.js} +2 -2
- package/dist/calcite/{QF6F6CY3.js → T7VT42NJ.js} +2 -2
- package/dist/calcite/{UGI3YWJM.js → THGJ3ZD3.js} +2 -2
- package/dist/calcite/{VIWDW2WZ.js → TPQICMSC.js} +2 -2
- package/dist/calcite/{CUL3VHSD.js → TRYMHQWX.js} +2 -2
- package/dist/calcite/TSJA4LWX.js +4 -0
- package/dist/calcite/{7NUC3WBG.js → UE627G6U.js} +1 -1
- package/dist/calcite/{K5GJLIBR.js → UERWI2LS.js} +2 -2
- package/dist/calcite/{RRP2E2T3.js → UFHAJ3AG.js} +2 -2
- package/dist/calcite/{N5MSFOLW.js → UHKUQQRT.js} +2 -2
- package/dist/calcite/{CTLGVBKW.js → UIHFYOPH.js} +2 -2
- package/dist/calcite/{NULQJBCW.js → ULUKHLQN.js} +2 -2
- package/dist/calcite/{UN7GLLXI.js → USBSH7KC.js} +2 -2
- package/dist/calcite/{BE5OB2TH.js → UTWEOJW6.js} +2 -2
- package/dist/calcite/{LH7245HX.js → UVFQM6FI.js} +2 -2
- package/dist/calcite/{DDXY7TRY.js → UWREJ25T.js} +2 -2
- package/dist/calcite/{SXB76NOR.js → UWUSKJIU.js} +2 -2
- package/dist/calcite/{C3BQ4W7K.js → V6VV5MRC.js} +2 -2
- package/dist/calcite/{CJWGQETT.js → VFQAYOAN.js} +2 -2
- package/dist/calcite/{CIU4VM7X.js → W4XITGKA.js} +2 -2
- package/dist/calcite/{BFINWHLX.js → W4Y22TCR.js} +2 -2
- package/dist/calcite/{PFKUB7JD.js → WG7RY7HV.js} +2 -2
- package/dist/calcite/{R73QB7MJ.js → WR7PEL2H.js} +2 -2
- package/dist/calcite/{Y442PVMQ.js → WW6CS7FX.js} +2 -2
- package/dist/calcite/{ZV7YL7QG.js → WZGZ5PZT.js} +2 -2
- package/dist/calcite/{7XJU5OTS.js → X7OME6SM.js} +2 -2
- package/dist/calcite/{GE7SQF7S.js → XECJM3YP.js} +2 -2
- package/dist/calcite/{SZWYWOXZ.js → XGARHDI3.js} +2 -2
- package/dist/calcite/{WOTQIMPZ.js → XGPCFFL2.js} +2 -2
- package/dist/calcite/{5AL5GWRD.js → XLJGRDO4.js} +2 -2
- package/dist/calcite/{RFALVOKT.js → XU6PDNU5.js} +2 -2
- package/dist/calcite/{XZTRPLLK.js → Y3X3JA73.js} +2 -2
- package/dist/calcite/{NID6WJOW.js → YFY6OPEB.js} +2 -2
- package/dist/calcite/{BHBYSC5H.js → YHUESRZY.js} +2 -2
- package/dist/calcite/{KT4EQWT6.js → YNIG5SX5.js} +2 -2
- package/dist/calcite/{ZVWKN3G7.js → YR554YXQ.js} +2 -2
- package/dist/calcite/{DSEMLW7Z.js → YUOZM346.js} +2 -2
- package/dist/calcite/{LYDOM6VQ.js → ZIA4F7R5.js} +2 -2
- package/dist/calcite/{PJOGMC7F.js → ZIABK7KW.js} +2 -2
- package/dist/calcite/{NSBK36H4.js → ZOYJ4343.js} +2 -2
- package/dist/calcite/{4ARTWEEZ.js → ZV3IGLDE.js} +2 -2
- package/dist/calcite/{V3ZR6RFK.js → ZVCPJCBM.js} +1 -1
- package/dist/calcite/calcite.esm.js +2 -2
- package/dist/chunks/runtime.js +4 -4
- package/dist/components/calcite-card/customElement.js +1 -1
- package/dist/components/calcite-stepper/customElement.d.ts +0 -6
- package/dist/components/calcite-stepper/customElement.js +0 -2
- package/dist/docs/api.json +26 -35
- package/dist/docs/docs.json +76 -91
- package/dist/docs/supported-browsers.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +27 -37
- package/dist/index.d.ts +0 -1
- package/dist/types/lumina.d.ts +0 -1
- package/dist/types/preact.d.ts +0 -1
- package/dist/types/preact10.d.ts +0 -1
- package/dist/types/react.d.ts +0 -1
- package/dist/types/stencil.d.ts +0 -1
- package/package.json +2 -2
- package/dist/calcite/T6Y6ZTWW.js +0 -4
- package/dist/calcite/VBRBI7IU.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as Dt}from"./W5OJOVZY.js";import{e as Lt}from"./5IPJANUU.js";import{K as Tt}from"./AUIOWPFN.js";var vt=["top","right","bottom","left"],Ft=["start","end"],bt=vt.reduce((t,e)=>t.concat(e,e+"-"+Ft[0],e+"-"+Ft[1]),[]),j=Math.min,V=Math.max,rt=Math.round,ct=Math.floor,M=t=>({x:t,y:t}),Oe={left:"right",right:"left",bottom:"top",top:"bottom"},Re={start:"end",end:"start"};function ut(t,e,n){return V(t,j(e,n))}function X(t,e){return typeof t=="function"?t(e):t}function W(t){return t.split("-")[0]}function k(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function dt(t){return t==="y"?"height":"width"}var Se=new Set(["top","bottom"]);function _(t){return Se.has(W(t))?"y":"x"}function mt(t){return At(_(t))}function Ot(t,e,n){n===void 0&&(n=!1);let o=k(t),i=mt(t),r=dt(i),s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=st(s)),[s,st(s)]}function Nt(t){let e=st(t);return[it(t),e,it(e)]}function it(t){return t.replace(/start|end/g,e=>Re[e])}var Mt=["left","right"],kt=["right","left"],Pe=["top","bottom"],Ce=["bottom","top"];function Ee(t,e,n){switch(t){case"top":case"bottom":return n?e?kt:Mt:e?Mt:kt;case"left":case"right":return e?Pe:Ce;default:return[]}}function Bt(t,e,n,o){let i=k(t),r=Ee(W(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(it)))),r}function st(t){return t.replace(/left|right|bottom|top/g,e=>Oe[e])}function Te(t){return{top:0,right:0,bottom:0,left:0,...t}}function Rt(t){return typeof t!="number"?Te(t):{top:t,right:t,bottom:t,left:t}}function K(t){let{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Wt(t,e,n){let{reference:o,floating:i}=t,r=_(e),s=mt(e),c=dt(s),l=W(e),a=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2,f;switch(l){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(k(e)){case"start":f[s]-=m*(n&&a?-1:1);break;case"end":f[s]+=m*(n&&a?-1:1);break}return f}var Vt=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=r.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e)),a=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Wt(a,o,l),m=o,f={},g=0;for(let h=0;h<c.length;h++){let{name:p,fn:w}=c[h],{x,y,data:b,reset:v}=await w({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:f,rects:a,platform:s,elements:{reference:t,floating:e}});d=x??d,u=y??u,f={...f,[p]:{...f[p],...b}},v&&g<=50&&(g++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(a=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:d,y:u}=Wt(a,m,l)),h=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:f}};async function Z(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=X(e,t),g=Rt(f),p=c[m?u==="floating"?"reference":"floating":u],w=K(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(p)))==null||n?p:p.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:d,strategy:l})),x=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),b=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},v=K(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:l}):x);return{top:(w.top-v.top+g.top)/b.y,bottom:(v.bottom-w.bottom+g.bottom)/b.y,left:(w.left-v.left+g.left)/b.x,right:(v.right-w.right+g.right)/b.x}}var _t=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:d=0}=X(t,e)||{};if(a==null)return{};let u=Rt(d),m={x:n,y:o},f=mt(i),g=dt(f),h=await s.getDimensions(a),p=f==="y",w=p?"top":"left",x=p?"bottom":"right",y=p?"clientHeight":"clientWidth",b=r.reference[g]+r.reference[f]-m[f]-r.floating[g],v=m[f]-r.reference[f],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a)),O=R?R[y]:0;(!O||!await(s.isElement==null?void 0:s.isElement(R)))&&(O=c.floating[y]||r.floating[g]);let I=b/2-v/2,C=O/2-h[g]/2-1,A=j(u[w],C),L=j(u[x],C),$=A,Y=O-h[g]-L,S=O/2-h[g]/2+I,q=ut($,S,Y),H=!l.arrow&&k(i)!=null&&S!==q&&r.reference[g]/2-(S<$?A:L)-h[g]/2<0,D=H?S<$?S-$:S-Y:0;return{[f]:m[f]+D,data:{[f]:q,centerOffset:S-q-D,...H&&{alignmentOffset:D}},reset:H}}});function Le(t,e,n){return(t?[...n.filter(i=>k(i)===t),...n.filter(i=>k(i)!==t)]:n.filter(i=>W(i)===i)).filter(i=>t?k(i)===t||(e?it(i)!==i:!1):!0)}var zt=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;let{rects:r,middlewareData:s,placement:c,platform:l,elements:a}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=bt,autoAlignment:f=!0,...g}=X(t,e),h=u!==void 0||m===bt?Le(u||null,f,m):m,p=await Z(e,g),w=((n=s.autoPlacement)==null?void 0:n.index)||0,x=h[w];if(x==null)return{};let y=Ot(x,r,await(l.isRTL==null?void 0:l.isRTL(a.floating)));if(c!==x)return{reset:{placement:h[0]}};let b=[p[W(x)],p[y[0]],p[y[1]]],v=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:x,overflows:b}],R=h[w+1];if(R)return{data:{index:w+1,overflows:v},reset:{placement:R}};let O=v.map(A=>{let L=k(A.placement);return[A.placement,L&&d?A.overflows.slice(0,2).reduce(($,Y)=>$+Y,0):A.overflows[0],A.overflows]}).sort((A,L)=>A[1]-L[1]),C=((i=O.filter(A=>A[2].slice(0,k(A[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||O[0][0];return C!==c?{data:{index:w+1,overflows:v},reset:{placement:C}}:{}}}},It=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...p}=X(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};let w=W(i),x=_(c),y=W(c)===c,b=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=m||(y||!h?[st(c)]:Nt(c)),R=g!=="none";!m&&R&&v.push(...Bt(c,h,g,b));let O=[c,...v],I=await Z(e,p),C=[],A=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&C.push(I[w]),u){let S=Ot(i,s,b);C.push(I[S[0]],I[S[1]])}if(A=[...A,{placement:i,overflows:C}],!C.every(S=>S<=0)){var L,$;let S=(((L=r.flip)==null?void 0:L.index)||0)+1,q=O[S];if(q&&(!(u==="alignment"?x!==_(q):!1)||A.every(F=>_(F.placement)===x?F.overflows[0]>0:!0)))return{data:{index:S,overflows:A},reset:{placement:q}};let H=($=A.filter(D=>D.overflows[0]<=0).sort((D,F)=>D.overflows[1]-F.overflows[1])[0])==null?void 0:$.placement;if(!H)switch(f){case"bestFit":{var Y;let D=(Y=A.filter(F=>{if(R){let U=_(F.placement);return U===x||U==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(U=>U>0).reduce((U,Ae)=>U+Ae,0)]).sort((F,U)=>F[1]-U[1])[0])==null?void 0:Y[0];D&&(H=D);break}case"initialPlacement":H=c;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function $t(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ht(t){return vt.some(e=>t[e]>=0)}var Ut=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n}=e,{strategy:o="referenceHidden",...i}=X(t,e);switch(o){case"referenceHidden":{let r=await Z(e,{...i,elementContext:"reference"}),s=$t(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Ht(s)}}}case"escaped":{let r=await Z(e,{...i,altBoundary:!0}),s=$t(r,n.floating);return{data:{escapedOffsets:s,escaped:Ht(s)}}}default:return{}}}}};var De=new Set(["left","top"]);async function Fe(t,e){let{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=W(n),c=k(n),l=_(n)==="y",a=De.has(s)?-1:1,d=r&&l?-1:1,u=X(e,t),{mainAxis:m,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(f=c==="end"?g*-1:g),l?{x:f*d,y:m*a}:{x:m*a,y:f*d}}var jt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:r,placement:s,middlewareData:c}=e,l=await Fe(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},Xt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:p=>{let{x:w,y:x}=p;return{x:w,y:x}}},...l}=X(t,e),a={x:n,y:o},d=await Z(e,l),u=_(W(i)),m=At(u),f=a[m],g=a[u];if(r){let p=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=f+d[p],y=f-d[w];f=ut(x,f,y)}if(s){let p=u==="y"?"top":"left",w=u==="y"?"bottom":"right",x=g+d[p],y=g-d[w];g=ut(x,g,y)}let h=c.fn({...e,[m]:f,[u]:g});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[m]:r,[u]:s}}}}}};function gt(){return typeof window<"u"}function G(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function P(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function N(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return gt()?t instanceof Node||t instanceof P(t).Node:!1}function E(t){return gt()?t instanceof Element||t instanceof P(t).Element:!1}function B(t){return gt()?t instanceof HTMLElement||t instanceof P(t).HTMLElement:!1}function Yt(t){return!gt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof P(t).ShadowRoot}var Me=new Set(["inline","contents"]);function et(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=T(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Me.has(i)}var ke=new Set(["table","td","th"]);function Kt(t){return ke.has(G(t))}var Ne=[":popover-open",":modal"];function lt(t){return Ne.some(e=>{try{return t.matches(e)}catch{return!1}})}var Be=["transform","translate","scale","rotate","perspective"],We=["transform","translate","scale","rotate","perspective","filter"],$e=["paint","layout","strict","content"];function nt(t){let e=ht(),n=E(t)?T(t):t;return Be.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||We.some(o=>(n.willChange||"").includes(o))||$e.some(o=>(n.contain||"").includes(o))}function Gt(t){let e=z(t);for(;B(e)&&!J(e);){if(nt(e))return e;if(lt(e))return null;e=z(e)}return null}function ht(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var He=new Set(["html","body","#document"]);function J(t){return He.has(G(t))}function T(t){return P(t).getComputedStyle(t)}function at(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function z(t){if(G(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Yt(t)&&t.host||N(t);return Yt(e)?e.host:e}function Jt(t){let e=z(t);return J(e)?t.ownerDocument?t.ownerDocument.body:t.body:B(e)&&et(e)?e:Jt(e)}function tt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Jt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=P(i);if(r){let c=pt(s);return e.concat(s,s.visualViewport||[],et(i)?i:[],c&&n?tt(c):[])}return e.concat(i,tt(i,[],n))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){let e=T(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=B(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=rt(n)!==r||rt(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function Pt(t){return E(t)?t:t.contextElement}function ot(t){let e=Pt(t);if(!B(e))return M(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:r}=ee(e),s=(r?rt(n.width):n.width)/o,c=(r?rt(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var Ve=M(0);function ne(t){let e=P(t);return!ht()||!e.visualViewport?Ve:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function _e(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==P(t)?!1:e}function Q(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),r=Pt(t),s=M(1);e&&(o?E(o)&&(s=ot(o)):s=ot(t));let c=_e(r,n,o)?ne(r):M(0),l=(i.left+c.x)/s.x,a=(i.top+c.y)/s.y,d=i.width/s.x,u=i.height/s.y;if(r){let m=P(r),f=o&&E(o)?P(o):o,g=m,h=pt(g);for(;h&&o&&f!==g;){let p=ot(h),w=h.getBoundingClientRect(),x=T(h),y=w.left+(h.clientLeft+parseFloat(x.paddingLeft))*p.x,b=w.top+(h.clientTop+parseFloat(x.paddingTop))*p.y;l*=p.x,a*=p.y,d*=p.x,u*=p.y,l+=y,a+=b,g=P(h),h=pt(g)}}return K({width:d,height:u,x:l,y:a})}function wt(t,e){let n=at(t).scrollLeft;return e?e.left+n:Q(N(t)).left+n}function oe(t,e){let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-wt(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function ze(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,r=i==="fixed",s=N(o),c=e?lt(e.floating):!1;if(o===s||c&&r)return n;let l={scrollLeft:0,scrollTop:0},a=M(1),d=M(0),u=B(o);if((u||!u&&!r)&&((G(o)!=="body"||et(s))&&(l=at(o)),B(o))){let f=Q(o);a=ot(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}let m=s&&!u&&!r?oe(s,l):M(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+d.x+m.x,y:n.y*a.y-l.scrollTop*a.y+d.y+m.y}}function Ie(t){return Array.from(t.getClientRects())}function Ue(t){let e=N(t),n=at(t),o=t.ownerDocument.body,i=V(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=V(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-n.scrollLeft+wt(t),c=-n.scrollTop;return T(o).direction==="rtl"&&(s+=V(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}var Qt=25;function je(t,e){let n=P(t),o=N(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,c=0,l=0;if(i){r=i.width,s=i.height;let d=ht();(!d||d&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}let a=wt(o);if(a<=0){let d=o.ownerDocument,u=d.body,m=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(o.clientWidth-u.clientWidth-f);g<=Qt&&(r-=g)}else a<=Qt&&(r+=a);return{width:r,height:s,x:c,y:l}}var Xe=new Set(["absolute","fixed"]);function Ye(t,e){let n=Q(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=B(t)?ot(t):M(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=i*r.x,a=o*r.y;return{width:s,height:c,x:l,y:a}}function Zt(t,e,n){let o;if(e==="viewport")o=je(t,n);else if(e==="document")o=Ue(N(t));else if(E(e))o=Ye(e,n);else{let i=ne(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return K(o)}function ie(t,e){let n=z(t);return n===e||!E(n)||J(n)?!1:T(n).position==="fixed"||ie(n,e)}function qe(t,e){let n=e.get(t);if(n)return n;let o=tt(t,[],!1).filter(c=>E(c)&&G(c)!=="body"),i=null,r=T(t).position==="fixed",s=r?z(t):t;for(;E(s)&&!J(s);){let c=T(s),l=nt(s);!l&&c.position==="fixed"&&(i=null),(r?!l&&!i:!l&&c.position==="static"&&!!i&&Xe.has(i.position)||et(s)&&!l&&ie(t,s))?o=o.filter(d=>d!==s):i=c,s=z(s)}return e.set(t,o),o}function Ke(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,s=[...n==="clippingAncestors"?lt(e)?[]:qe(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,d)=>{let u=Zt(e,d,i);return a.top=V(u.top,a.top),a.right=j(u.right,a.right),a.bottom=j(u.bottom,a.bottom),a.left=V(u.left,a.left),a},Zt(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ge(t){let{width:e,height:n}=ee(t);return{width:e,height:n}}function Je(t,e,n){let o=B(e),i=N(e),r=n==="fixed",s=Q(t,!0,r,e),c={scrollLeft:0,scrollTop:0},l=M(0);function a(){l.x=wt(i)}if(o||!o&&!r)if((G(e)!=="body"||et(i))&&(c=at(e)),o){let f=Q(e,!0,r,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else i&&a();r&&!o&&i&&a();let d=i&&!o&&!r?oe(i,c):M(0),u=s.left+c.scrollLeft-l.x-d.x,m=s.top+c.scrollTop-l.y-d.y;return{x:u,y:m,width:s.width,height:s.height}}function St(t){return T(t).position==="static"}function te(t,e){if(!B(t)||T(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return N(t)===n&&(n=n.ownerDocument.body),n}function se(t,e){let n=P(t);if(lt(t))return n;if(!B(t)){let i=z(t);for(;i&&!J(i);){if(E(i)&&!St(i))return i;i=z(i)}return n}let o=te(t,e);for(;o&&Kt(o)&&St(o);)o=te(o,e);return o&&J(o)&&St(o)&&!nt(o)?n:o||Gt(t)||n}var Qe=async function(t){let e=this.getOffsetParent||se,n=this.getDimensions,o=await n(t.floating);return{reference:Je(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ze(t){return T(t).direction==="rtl"}var xt={convertOffsetParentRelativeRectToViewportRelativeRect:ze,getDocumentElement:N,getClippingRect:Ke,getOffsetParent:se,getElementRects:Qe,getClientRects:Ie,getDimensions:Ge,getScale:ot,isElement:E,isRTL:Ze};function re(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function tn(t,e){let n=null,o,i=N(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();let a=t.getBoundingClientRect(),{left:d,top:u,width:m,height:f}=a;if(c||e(),!m||!f)return;let g=ct(u),h=ct(i.clientWidth-(d+m)),p=ct(i.clientHeight-(u+f)),w=ct(d),y={rootMargin:-g+"px "+-h+"px "+-p+"px "+-w+"px",threshold:V(0,j(1,l))||1},b=!0;function v(R){let O=R[0].intersectionRatio;if(O!==l){if(!b)return s();O?s(!1,O):o=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!re(a,t.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(v,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(v,y)}n.observe(t)}return s(!0),r}function ce(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Pt(t),d=i||r?[...a?tt(a):[],...tt(e)]:[];d.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});let u=a&&c?tn(a,n):null,m=-1,f=null;s&&(f=new ResizeObserver(w=>{let[x]=w;x&&x.target===a&&f&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),a&&!l&&f.observe(a),f.observe(e));let g,h=l?Q(t):null;l&&p();function p(){let w=Q(t);h&&!re(h,w)&&n(),h=w,g=requestAnimationFrame(p)}return n(),()=>{var w;d.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(g)}}var le=jt,ae=zt,fe=Xt,Ct=It;var ue=Ut,de=_t;var me=(t,e,n)=>{let o=new Map,i={platform:xt,...n},r={...i.platform,_c:o};return Vt(t,e,{...i,platform:r})};function ge(t){return en(t)}function Et(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function en(t){for(let e=t;e;e=Et(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Et(t);e;e=Et(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||nt(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=xt.getOffsetParent;xt.getOffsetParent=n=>e(n,ge)}})();function he(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var ye=(async(t,{referenceEl:e,floatingEl:n,overlayPositioning:o="absolute",placement:i,flipDisabled:r,flipPlacements:s,offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})=>{if(!e||!n)return;let u=Lt(n)==="rtl",{x:m,y:f,placement:g,strategy:h,middlewareData:p}=await me(e,n,{strategy:o,placement:i==="auto"||i==="auto-start"||i==="auto-end"?void 0:pe(i,u),middleware:on({placement:i,flipDisabled:r,flipPlacements:s?.map(b=>pe(b,u)),offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})});if(a&&p.arrow){let{x:b,y:v}=p.arrow,R=g.split("-")[0],O=b!=null?"left":"top",I=cn[R],C={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(a.style,{...C,[O]:`${O=="left"?b:v}px`,[R]:"100%",transform:I})}let x=p.hide?.referenceHidden?"hidden":null,y=x?"none":null;n.setAttribute(nn,g),Object.assign(n.style,{pointerEvents:y,position:h,transform:`translate(${he(m)}px,${he(f)}px)`,visibility:x})}),nn="data-placement",ve=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end","leading","trailing","leading-start","leading-end","trailing-start","trailing-end"],Ln="bottom-start",Dn="bottom-end",Fn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function on({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:r,type:s}){let c=[fe(),ue()];return s==="menu"&&c.push(Ct({fallbackPlacements:n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})),c.push(le({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),t==="auto"||t==="auto-start"||t==="auto-end"?c.push(ae({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null})):e||c.push(Ct(n?{fallbackPlacements:n}:{})),r&&c.push(de({element:r})),c}function sn(t){return ve.includes(t)}function Mn(t,e){let n=t.filter(sn);return n.length!==t.length&&console.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ve.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function pe(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function kn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",position:e.overlayPositioning??"absolute"}),!ft.get(t))return be(t);await(n?rn(t):ye)(t,e)}function rn(t){let e=yt.get(t);return e||(e=Dt(ye,Tt.reposition,{edges:["leading","trailing"]}),yt.set(t,e),e)}var cn={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,yt=new WeakMap;async function be(t){let{referenceEl:e,floatingEl:n}=t;if(!n.isConnected)return;let o=ce;ft.set(t,{state:"pending"});let i,r=o(e,n,()=>{let s=t.reposition();i||(i=s)});return ft.set(t,{state:"active",cleanUp:r}),i}function ln(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",pointerEvents:"",position:"",transform:"",visibility:""})}async function Nn(t){let{floatingEl:e,referenceEl:n}=t;if(ln(t),!(!e||!n)&&(an(t),!!t.open))return be(t)}function an(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),yt.get(t)?.cancel(),yt.delete(t)}var we=4,Bn=Math.ceil(Math.hypot(we,we));export{Ln as a,Dn as b,Fn as c,Mn as d,kn as e,ln as f,Nn as g,an as h,Bn as i};
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as Dt}from"./OWSWQHLM.js";import{e as Lt}from"./SBARVI35.js";import{K as Tt}from"./2ECRIOED.js";var vt=["top","right","bottom","left"],Ft=["start","end"],bt=vt.reduce((t,e)=>t.concat(e,e+"-"+Ft[0],e+"-"+Ft[1]),[]),j=Math.min,V=Math.max,rt=Math.round,ct=Math.floor,M=t=>({x:t,y:t}),Oe={left:"right",right:"left",bottom:"top",top:"bottom"},Re={start:"end",end:"start"};function ut(t,e,n){return V(t,j(e,n))}function X(t,e){return typeof t=="function"?t(e):t}function W(t){return t.split("-")[0]}function k(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function dt(t){return t==="y"?"height":"width"}var Se=new Set(["top","bottom"]);function _(t){return Se.has(W(t))?"y":"x"}function mt(t){return At(_(t))}function Ot(t,e,n){n===void 0&&(n=!1);let o=k(t),i=mt(t),r=dt(i),s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=st(s)),[s,st(s)]}function Nt(t){let e=st(t);return[it(t),e,it(e)]}function it(t){return t.replace(/start|end/g,e=>Re[e])}var Mt=["left","right"],kt=["right","left"],Pe=["top","bottom"],Ce=["bottom","top"];function Ee(t,e,n){switch(t){case"top":case"bottom":return n?e?kt:Mt:e?Mt:kt;case"left":case"right":return e?Pe:Ce;default:return[]}}function Bt(t,e,n,o){let i=k(t),r=Ee(W(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(it)))),r}function st(t){return t.replace(/left|right|bottom|top/g,e=>Oe[e])}function Te(t){return{top:0,right:0,bottom:0,left:0,...t}}function Rt(t){return typeof t!="number"?Te(t):{top:t,right:t,bottom:t,left:t}}function K(t){let{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Wt(t,e,n){let{reference:o,floating:i}=t,r=_(e),s=mt(e),c=dt(s),l=W(e),a=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2,f;switch(l){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(k(e)){case"start":f[s]-=m*(n&&a?-1:1);break;case"end":f[s]+=m*(n&&a?-1:1);break}return f}var Vt=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=r.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e)),a=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Wt(a,o,l),m=o,f={},g=0;for(let h=0;h<c.length;h++){let{name:p,fn:w}=c[h],{x,y,data:b,reset:v}=await w({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:f,rects:a,platform:s,elements:{reference:t,floating:e}});d=x??d,u=y??u,f={...f,[p]:{...f[p],...b}},v&&g<=50&&(g++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(a=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:d,y:u}=Wt(a,m,l)),h=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:f}};async function Z(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=X(e,t),g=Rt(f),p=c[m?u==="floating"?"reference":"floating":u],w=K(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(p)))==null||n?p:p.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:d,strategy:l})),x=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),b=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},v=K(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:l}):x);return{top:(w.top-v.top+g.top)/b.y,bottom:(v.bottom-w.bottom+g.bottom)/b.y,left:(w.left-v.left+g.left)/b.x,right:(v.right-w.right+g.right)/b.x}}var _t=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:d=0}=X(t,e)||{};if(a==null)return{};let u=Rt(d),m={x:n,y:o},f=mt(i),g=dt(f),h=await s.getDimensions(a),p=f==="y",w=p?"top":"left",x=p?"bottom":"right",y=p?"clientHeight":"clientWidth",b=r.reference[g]+r.reference[f]-m[f]-r.floating[g],v=m[f]-r.reference[f],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a)),O=R?R[y]:0;(!O||!await(s.isElement==null?void 0:s.isElement(R)))&&(O=c.floating[y]||r.floating[g]);let I=b/2-v/2,C=O/2-h[g]/2-1,A=j(u[w],C),L=j(u[x],C),$=A,Y=O-h[g]-L,S=O/2-h[g]/2+I,q=ut($,S,Y),H=!l.arrow&&k(i)!=null&&S!==q&&r.reference[g]/2-(S<$?A:L)-h[g]/2<0,D=H?S<$?S-$:S-Y:0;return{[f]:m[f]+D,data:{[f]:q,centerOffset:S-q-D,...H&&{alignmentOffset:D}},reset:H}}});function Le(t,e,n){return(t?[...n.filter(i=>k(i)===t),...n.filter(i=>k(i)!==t)]:n.filter(i=>W(i)===i)).filter(i=>t?k(i)===t||(e?it(i)!==i:!1):!0)}var zt=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;let{rects:r,middlewareData:s,placement:c,platform:l,elements:a}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=bt,autoAlignment:f=!0,...g}=X(t,e),h=u!==void 0||m===bt?Le(u||null,f,m):m,p=await Z(e,g),w=((n=s.autoPlacement)==null?void 0:n.index)||0,x=h[w];if(x==null)return{};let y=Ot(x,r,await(l.isRTL==null?void 0:l.isRTL(a.floating)));if(c!==x)return{reset:{placement:h[0]}};let b=[p[W(x)],p[y[0]],p[y[1]]],v=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:x,overflows:b}],R=h[w+1];if(R)return{data:{index:w+1,overflows:v},reset:{placement:R}};let O=v.map(A=>{let L=k(A.placement);return[A.placement,L&&d?A.overflows.slice(0,2).reduce(($,Y)=>$+Y,0):A.overflows[0],A.overflows]}).sort((A,L)=>A[1]-L[1]),C=((i=O.filter(A=>A[2].slice(0,k(A[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||O[0][0];return C!==c?{data:{index:w+1,overflows:v},reset:{placement:C}}:{}}}},It=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...p}=X(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};let w=W(i),x=_(c),y=W(c)===c,b=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=m||(y||!h?[st(c)]:Nt(c)),R=g!=="none";!m&&R&&v.push(...Bt(c,h,g,b));let O=[c,...v],I=await Z(e,p),C=[],A=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&C.push(I[w]),u){let S=Ot(i,s,b);C.push(I[S[0]],I[S[1]])}if(A=[...A,{placement:i,overflows:C}],!C.every(S=>S<=0)){var L,$;let S=(((L=r.flip)==null?void 0:L.index)||0)+1,q=O[S];if(q&&(!(u==="alignment"?x!==_(q):!1)||A.every(F=>_(F.placement)===x?F.overflows[0]>0:!0)))return{data:{index:S,overflows:A},reset:{placement:q}};let H=($=A.filter(D=>D.overflows[0]<=0).sort((D,F)=>D.overflows[1]-F.overflows[1])[0])==null?void 0:$.placement;if(!H)switch(f){case"bestFit":{var Y;let D=(Y=A.filter(F=>{if(R){let U=_(F.placement);return U===x||U==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(U=>U>0).reduce((U,Ae)=>U+Ae,0)]).sort((F,U)=>F[1]-U[1])[0])==null?void 0:Y[0];D&&(H=D);break}case"initialPlacement":H=c;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function $t(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ht(t){return vt.some(e=>t[e]>=0)}var Ut=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n}=e,{strategy:o="referenceHidden",...i}=X(t,e);switch(o){case"referenceHidden":{let r=await Z(e,{...i,elementContext:"reference"}),s=$t(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Ht(s)}}}case"escaped":{let r=await Z(e,{...i,altBoundary:!0}),s=$t(r,n.floating);return{data:{escapedOffsets:s,escaped:Ht(s)}}}default:return{}}}}};var De=new Set(["left","top"]);async function Fe(t,e){let{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=W(n),c=k(n),l=_(n)==="y",a=De.has(s)?-1:1,d=r&&l?-1:1,u=X(e,t),{mainAxis:m,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(f=c==="end"?g*-1:g),l?{x:f*d,y:m*a}:{x:m*a,y:f*d}}var jt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:r,placement:s,middlewareData:c}=e,l=await Fe(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},Xt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:p=>{let{x:w,y:x}=p;return{x:w,y:x}}},...l}=X(t,e),a={x:n,y:o},d=await Z(e,l),u=_(W(i)),m=At(u),f=a[m],g=a[u];if(r){let p=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=f+d[p],y=f-d[w];f=ut(x,f,y)}if(s){let p=u==="y"?"top":"left",w=u==="y"?"bottom":"right",x=g+d[p],y=g-d[w];g=ut(x,g,y)}let h=c.fn({...e,[m]:f,[u]:g});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[m]:r,[u]:s}}}}}};function gt(){return typeof window<"u"}function G(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function P(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function N(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return gt()?t instanceof Node||t instanceof P(t).Node:!1}function E(t){return gt()?t instanceof Element||t instanceof P(t).Element:!1}function B(t){return gt()?t instanceof HTMLElement||t instanceof P(t).HTMLElement:!1}function Yt(t){return!gt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof P(t).ShadowRoot}var Me=new Set(["inline","contents"]);function et(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=T(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Me.has(i)}var ke=new Set(["table","td","th"]);function Kt(t){return ke.has(G(t))}var Ne=[":popover-open",":modal"];function lt(t){return Ne.some(e=>{try{return t.matches(e)}catch{return!1}})}var Be=["transform","translate","scale","rotate","perspective"],We=["transform","translate","scale","rotate","perspective","filter"],$e=["paint","layout","strict","content"];function nt(t){let e=ht(),n=E(t)?T(t):t;return Be.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||We.some(o=>(n.willChange||"").includes(o))||$e.some(o=>(n.contain||"").includes(o))}function Gt(t){let e=z(t);for(;B(e)&&!J(e);){if(nt(e))return e;if(lt(e))return null;e=z(e)}return null}function ht(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var He=new Set(["html","body","#document"]);function J(t){return He.has(G(t))}function T(t){return P(t).getComputedStyle(t)}function at(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function z(t){if(G(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Yt(t)&&t.host||N(t);return Yt(e)?e.host:e}function Jt(t){let e=z(t);return J(e)?t.ownerDocument?t.ownerDocument.body:t.body:B(e)&&et(e)?e:Jt(e)}function tt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Jt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=P(i);if(r){let c=pt(s);return e.concat(s,s.visualViewport||[],et(i)?i:[],c&&n?tt(c):[])}return e.concat(i,tt(i,[],n))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){let e=T(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=B(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=rt(n)!==r||rt(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function Pt(t){return E(t)?t:t.contextElement}function ot(t){let e=Pt(t);if(!B(e))return M(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:r}=ee(e),s=(r?rt(n.width):n.width)/o,c=(r?rt(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var Ve=M(0);function ne(t){let e=P(t);return!ht()||!e.visualViewport?Ve:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function _e(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==P(t)?!1:e}function Q(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),r=Pt(t),s=M(1);e&&(o?E(o)&&(s=ot(o)):s=ot(t));let c=_e(r,n,o)?ne(r):M(0),l=(i.left+c.x)/s.x,a=(i.top+c.y)/s.y,d=i.width/s.x,u=i.height/s.y;if(r){let m=P(r),f=o&&E(o)?P(o):o,g=m,h=pt(g);for(;h&&o&&f!==g;){let p=ot(h),w=h.getBoundingClientRect(),x=T(h),y=w.left+(h.clientLeft+parseFloat(x.paddingLeft))*p.x,b=w.top+(h.clientTop+parseFloat(x.paddingTop))*p.y;l*=p.x,a*=p.y,d*=p.x,u*=p.y,l+=y,a+=b,g=P(h),h=pt(g)}}return K({width:d,height:u,x:l,y:a})}function wt(t,e){let n=at(t).scrollLeft;return e?e.left+n:Q(N(t)).left+n}function oe(t,e){let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-wt(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function ze(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,r=i==="fixed",s=N(o),c=e?lt(e.floating):!1;if(o===s||c&&r)return n;let l={scrollLeft:0,scrollTop:0},a=M(1),d=M(0),u=B(o);if((u||!u&&!r)&&((G(o)!=="body"||et(s))&&(l=at(o)),B(o))){let f=Q(o);a=ot(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}let m=s&&!u&&!r?oe(s,l):M(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+d.x+m.x,y:n.y*a.y-l.scrollTop*a.y+d.y+m.y}}function Ie(t){return Array.from(t.getClientRects())}function Ue(t){let e=N(t),n=at(t),o=t.ownerDocument.body,i=V(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=V(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-n.scrollLeft+wt(t),c=-n.scrollTop;return T(o).direction==="rtl"&&(s+=V(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}var Qt=25;function je(t,e){let n=P(t),o=N(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,c=0,l=0;if(i){r=i.width,s=i.height;let d=ht();(!d||d&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}let a=wt(o);if(a<=0){let d=o.ownerDocument,u=d.body,m=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(o.clientWidth-u.clientWidth-f);g<=Qt&&(r-=g)}else a<=Qt&&(r+=a);return{width:r,height:s,x:c,y:l}}var Xe=new Set(["absolute","fixed"]);function Ye(t,e){let n=Q(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=B(t)?ot(t):M(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=i*r.x,a=o*r.y;return{width:s,height:c,x:l,y:a}}function Zt(t,e,n){let o;if(e==="viewport")o=je(t,n);else if(e==="document")o=Ue(N(t));else if(E(e))o=Ye(e,n);else{let i=ne(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return K(o)}function ie(t,e){let n=z(t);return n===e||!E(n)||J(n)?!1:T(n).position==="fixed"||ie(n,e)}function qe(t,e){let n=e.get(t);if(n)return n;let o=tt(t,[],!1).filter(c=>E(c)&&G(c)!=="body"),i=null,r=T(t).position==="fixed",s=r?z(t):t;for(;E(s)&&!J(s);){let c=T(s),l=nt(s);!l&&c.position==="fixed"&&(i=null),(r?!l&&!i:!l&&c.position==="static"&&!!i&&Xe.has(i.position)||et(s)&&!l&&ie(t,s))?o=o.filter(d=>d!==s):i=c,s=z(s)}return e.set(t,o),o}function Ke(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,s=[...n==="clippingAncestors"?lt(e)?[]:qe(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,d)=>{let u=Zt(e,d,i);return a.top=V(u.top,a.top),a.right=j(u.right,a.right),a.bottom=j(u.bottom,a.bottom),a.left=V(u.left,a.left),a},Zt(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ge(t){let{width:e,height:n}=ee(t);return{width:e,height:n}}function Je(t,e,n){let o=B(e),i=N(e),r=n==="fixed",s=Q(t,!0,r,e),c={scrollLeft:0,scrollTop:0},l=M(0);function a(){l.x=wt(i)}if(o||!o&&!r)if((G(e)!=="body"||et(i))&&(c=at(e)),o){let f=Q(e,!0,r,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else i&&a();r&&!o&&i&&a();let d=i&&!o&&!r?oe(i,c):M(0),u=s.left+c.scrollLeft-l.x-d.x,m=s.top+c.scrollTop-l.y-d.y;return{x:u,y:m,width:s.width,height:s.height}}function St(t){return T(t).position==="static"}function te(t,e){if(!B(t)||T(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return N(t)===n&&(n=n.ownerDocument.body),n}function se(t,e){let n=P(t);if(lt(t))return n;if(!B(t)){let i=z(t);for(;i&&!J(i);){if(E(i)&&!St(i))return i;i=z(i)}return n}let o=te(t,e);for(;o&&Kt(o)&&St(o);)o=te(o,e);return o&&J(o)&&St(o)&&!nt(o)?n:o||Gt(t)||n}var Qe=async function(t){let e=this.getOffsetParent||se,n=this.getDimensions,o=await n(t.floating);return{reference:Je(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ze(t){return T(t).direction==="rtl"}var xt={convertOffsetParentRelativeRectToViewportRelativeRect:ze,getDocumentElement:N,getClippingRect:Ke,getOffsetParent:se,getElementRects:Qe,getClientRects:Ie,getDimensions:Ge,getScale:ot,isElement:E,isRTL:Ze};function re(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function tn(t,e){let n=null,o,i=N(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();let a=t.getBoundingClientRect(),{left:d,top:u,width:m,height:f}=a;if(c||e(),!m||!f)return;let g=ct(u),h=ct(i.clientWidth-(d+m)),p=ct(i.clientHeight-(u+f)),w=ct(d),y={rootMargin:-g+"px "+-h+"px "+-p+"px "+-w+"px",threshold:V(0,j(1,l))||1},b=!0;function v(R){let O=R[0].intersectionRatio;if(O!==l){if(!b)return s();O?s(!1,O):o=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!re(a,t.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(v,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(v,y)}n.observe(t)}return s(!0),r}function ce(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Pt(t),d=i||r?[...a?tt(a):[],...tt(e)]:[];d.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});let u=a&&c?tn(a,n):null,m=-1,f=null;s&&(f=new ResizeObserver(w=>{let[x]=w;x&&x.target===a&&f&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),a&&!l&&f.observe(a),f.observe(e));let g,h=l?Q(t):null;l&&p();function p(){let w=Q(t);h&&!re(h,w)&&n(),h=w,g=requestAnimationFrame(p)}return n(),()=>{var w;d.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(g)}}var le=jt,ae=zt,fe=Xt,Ct=It;var ue=Ut,de=_t;var me=(t,e,n)=>{let o=new Map,i={platform:xt,...n},r={...i.platform,_c:o};return Vt(t,e,{...i,platform:r})};function ge(t){return en(t)}function Et(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function en(t){for(let e=t;e;e=Et(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Et(t);e;e=Et(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||nt(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=xt.getOffsetParent;xt.getOffsetParent=n=>e(n,ge)}})();function he(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var ye=(async(t,{referenceEl:e,floatingEl:n,overlayPositioning:o="absolute",placement:i,flipDisabled:r,flipPlacements:s,offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})=>{if(!e||!n)return;let u=Lt(n)==="rtl",{x:m,y:f,placement:g,strategy:h,middlewareData:p}=await me(e,n,{strategy:o,placement:i==="auto"||i==="auto-start"||i==="auto-end"?void 0:pe(i,u),middleware:on({placement:i,flipDisabled:r,flipPlacements:s?.map(b=>pe(b,u)),offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})});if(a&&p.arrow){let{x:b,y:v}=p.arrow,R=g.split("-")[0],O=b!=null?"left":"top",I=cn[R],C={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(a.style,{...C,[O]:`${O=="left"?b:v}px`,[R]:"100%",transform:I})}let x=p.hide?.referenceHidden?"hidden":null,y=x?"none":null;n.setAttribute(nn,g),Object.assign(n.style,{pointerEvents:y,position:h,transform:`translate(${he(m)}px,${he(f)}px)`,visibility:x})}),nn="data-placement",ve=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end","leading","trailing","leading-start","leading-end","trailing-start","trailing-end"],Ln="bottom-start",Dn="bottom-end",Fn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function on({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:r,type:s}){let c=[fe(),ue()];return s==="menu"&&c.push(Ct({fallbackPlacements:n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})),c.push(le({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),t==="auto"||t==="auto-start"||t==="auto-end"?c.push(ae({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null})):e||c.push(Ct(n?{fallbackPlacements:n}:{})),r&&c.push(de({element:r})),c}function sn(t){return ve.includes(t)}function Mn(t,e){let n=t.filter(sn);return n.length!==t.length&&console.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ve.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function pe(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function kn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",position:e.overlayPositioning??"absolute"}),!ft.get(t))return be(t);await(n?rn(t):ye)(t,e)}function rn(t){let e=yt.get(t);return e||(e=Dt(ye,Tt.reposition,{edges:["leading","trailing"]}),yt.set(t,e),e)}var cn={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,yt=new WeakMap;async function be(t){let{referenceEl:e,floatingEl:n}=t;if(!n.isConnected)return;let o=ce;ft.set(t,{state:"pending"});let i,r=o(e,n,()=>{let s=t.reposition();i||(i=s)});return ft.set(t,{state:"active",cleanUp:r}),i}function ln(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",pointerEvents:"",position:"",transform:"",visibility:""})}async function Nn(t){let{floatingEl:e,referenceEl:n}=t;if(ln(t),!(!e||!n)&&(an(t),!!t.open))return be(t)}function an(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),yt.get(t)?.cancel(),yt.delete(t)}var we=4,Bn=Math.ceil(Math.hypot(we,we));export{Ln as a,Dn as b,Fn as c,Mn as d,kn as e,ln as f,Nn as g,an as h,Bn as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a,b,c}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a,b,c}from"./YFY6OPEB.js";import"./QR2HL6XI.js";export{b as extractRegion,c as getCountry,a as global};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as $}from"./7PFVW4JF.js";import{j as A}from"./CVLFEMH2.js";import{a as E}from"./VQMSSO2U.js";import{a as c}from"./NULQJBCW.js";import"./S5CLKCGJ.js";import{a as T}from"./LH7245HX.js";import{a as z}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import{a as d}from"./3YZG7MA3.js";import"./CIU4VM7X.js";import{o as w,t as x}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{C as b,D as y,E as o,I as C,P as k,g as v,h as a,o as l}from"./AUIOWPFN.js";var u={slow:14e3,medium:1e4,fast:6e3},r={actionsEnd:"actions-end",title:"title",message:"message",link:"link"},i={actionsEnd:"actions-end",close:"close",container:"container",containerActive:"container--active",dismissProgress:"dismiss-progress",icon:"icon",containerEmbedded:"container--embedded",queueCount:"queue-count",queueCountActive:"queue-count--active",textContainer:"text-container",focused:"focused"},I=300,h=class{constructor(){this.registeredElements=[],this.queueTimeoutId=null}registerElement(e){let{registeredElements:t}=this;if(!t.includes(e)){switch(e.queue){case"immediate":t.unshift(e);break;case"next":t.splice(1,0,e);break;case"last":t.push(e);break}this.updateAlerts()}}unregisterElement(e){let{registeredElements:t}=this,s=t.indexOf(e);s!==-1&&t.splice(s,1),e.active=!1,this.updateAlerts()}updateAlerts(){window.clearTimeout(this.queueTimeoutId),this.queueTimeoutId=null,this.registeredElements.forEach((e,t)=>{e.openAlertCount=this.registeredElements.length,t===0?this.queueTimeoutId=window.setTimeout(()=>e.active=!0,I):e.active=!1})}},D=v`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:block;inline-size:var(--calcite-alert-width)}.container--embedded,.container[popover]{pointer-events:none;position:fixed;margin-inline:auto;margin-block:0px;box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:min-content;align-items:center;justify-content:center;padding:0;text-align:start;opacity:0;inset:initial;--tw-shadow: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);--tw-shadow-colored: 0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--calcite-alert-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow));background-color:var(--calcite-alert-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-alert-corner-radius, var(--calcite-border-radius));border-block-start:0 solid transparent;border-inline:1px solid var(--calcite-color-border-3);border-block-end:1px solid var(--calcite-color-border-3);max-inline-size:calc(100% - var(--calcite-alert-offset-size, 2rem) * 2);transition:opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(.215,.44,.42,.88),all var(--calcite-animation-timing) ease-in-out}.container--bottom,.container--top,.container--bottom[popover],.container--top[popover]{inset-inline-end:0;inset-inline-start:0}.container[class*=bottom]{transform:translate3d(0,var(--calcite-alert-offset-size, 2rem),0);inset-block-end:var(--calcite-alert-offset-size, 2rem)}.container[class*=top]{transform:translate3d(0,calc(-1 * var(--calcite-alert-offset-size, 2rem)),0);inset-block-start:var(--calcite-alert-offset-size, 2rem)}.container[class*=start]{inset-inline-start:var(--calcite-alert-offset-size, 2rem);inset-inline-end:auto}.container[class*=end]{inset-inline-end:var(--calcite-alert-offset-size, 2rem);inset-inline-start:auto}.icon{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;margin-block:auto;margin-inline-end:auto}.close{display:flex;cursor:pointer;align-items:center;justify-content:flex-end;align-self:stretch;border-style:none;background-color:transparent;color:var(--calcite-color-text-3);outline:2px solid transparent;outline-offset:2px;-webkit-appearance:none;border-start-end-radius:var(--calcite-alert-corner-radius, var(--calcite-border-radius));border-end-end-radius:var(--calcite-alert-corner-radius, var(--calcite-border-radius));outline-color:transparent}.close:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.close:hover,.close:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-2)}.close:active{background-color:var(--calcite-color-foreground-3)}.queue-count{visibility:hidden;display:flex;min-inline-size:min-content;cursor:default;align-items:center;justify-content:space-around;align-self:stretch;overflow:hidden;text-align:center;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-2);opacity:0;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-inline:0 solid transparent;border-start-end-radius:0}.queue-count--active{visibility:visible;opacity:1}.dismiss-progress{position:absolute;display:block;inline-size:100%;overflow:hidden;inset-inline:0;inset-block-start:-2px;block-size:2px;border-radius:var(--calcite-border-radius) var(--calcite-border-radius) 0 0}.dismiss-progress:after{position:absolute;inset-block-start:0px;display:block;block-size:2px;content:"";background-color:var(--calcite-color-transparent-tint);inset-inline-end:0}.actions-end{display:flex;align-self:stretch}.text-container{box-sizing:border-box;display:flex;min-inline-size:0px;flex:1 1 auto;flex-direction:column;overflow-wrap:break-word}.footer{position:relative;display:flex;inline-size:auto;justify-content:flex-end;align-self:stretch;padding-block-start:1px;block-size:inherit}:host([scale=s]) slot[name=title]::slotted(*),:host([scale=s]) *::slotted([slot=title]){font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=s]) slot[name=message]::slotted(*),:host([scale=s]) *::slotted([slot=message]){font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) slot[name=link]::slotted(*),:host([scale=s]) *::slotted([slot=link]){font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) .queue-count{margin-inline:.5rem}:host([scale=s]) .container{--calcite-internal-alert-min-height: 3.5rem;inline-size:var(--calcite-alert-width, 40em)}:host([scale=s]) .close{padding:.75rem}:host([scale=s]) .icon{padding-inline-start:.75rem}:host([scale=s]) .text-container{padding-block:.5rem;padding-inline:.75rem .5rem}:host([scale=m]) slot[name=title]::slotted(*),:host([scale=m]) *::slotted([slot=title]){font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=m]) slot[name=message]::slotted(*),:host([scale=m]) *::slotted([slot=message]){font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) slot[name=link]::slotted(*),:host([scale=m]) *::slotted([slot=link]){font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) .queue-count{margin-inline:.75rem}:host([scale=m]) .container{--calcite-internal-alert-min-height: 4.1875rem;inline-size:var(--calcite-alert-width, 50em)}:host([scale=m]) .close{padding:1rem}:host([scale=m]) .icon{padding-inline-start:1rem}:host([scale=m]) .text-container{padding-block:.75rem;padding-inline:1rem .75rem}:host([scale=l]) slot[name=title]::slotted(*),:host([scale=l]) *::slotted([slot=title]){margin-block-end:.25rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host([scale=l]) slot[name=message]::slotted(*),:host([scale=l]) *::slotted([slot=message]){font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) slot[name=link]::slotted(*),:host([scale=l]) *::slotted([slot=link]){font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) .queue-count{margin-inline:1rem}:host([scale=l]) .container{--calcite-internal-alert-min-height: 5.625rem;inline-size:var(--calcite-alert-width, 60em)}:host([scale=l]) .close{padding:1.25rem}:host([scale=l]) .icon{padding-inline-start:1.25rem}:host([scale=l]) .text-container{padding-block:1rem;padding-inline:1.25rem 1rem}:host([open]) .container--active{border-block-start-width:2px;opacity:1;pointer-events:initial}:host([open]) .container--active[class*=bottom]{transform:translate3d(0,calc(-1 * var(--calcite-alert-offset-size, 2rem)),inherit)}:host([open]) .container--active[class*=top]{transform:translate3d(0,var(--calcite-alert-offset-size, 2rem),inherit)}:host([auto-close])>.queue-count{border-inline-end:0 solid transparent}slot[name=title]::slotted(*),*::slotted([slot=title]){font-size:var(--calcite-font-size-0);line-height:1.375;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}slot[name=message]::slotted(*),*::slotted([slot=message]){margin:0;display:inline;font-size:var(--calcite-font-size--1);line-height:1.375;font-weight:var(--calcite-font-weight-normal);margin-inline-end:.5rem;color:var(--calcite-color-text-2)}slot[name=link]::slotted(*),*::slotted([slot=link]){display:inline-flex;color:var(--calcite-color-text-link)}:host([kind=brand]) .container{border-block-start-color:var(--calcite-color-brand)}:host([kind=brand]) .container .icon{color:var(--calcite-color-brand)}:host([kind=info]) .container{border-block-start-color:var(--calcite-color-status-info)}:host([kind=info]) .container .icon{color:var(--calcite-color-status-info)}:host([kind=danger]) .container{border-block-start-color:var(--calcite-color-status-danger)}:host([kind=danger]) .container .icon{color:var(--calcite-color-status-danger)}:host([kind=success]) .container{border-block-start-color:var(--calcite-color-status-success)}:host([kind=success]) .container .icon{color:var(--calcite-color-status-success)}:host([kind=warning]) .container{border-block-start-color:var(--calcite-color-status-warning)}:host([kind=warning]) .container .icon{color:var(--calcite-color-status-warning)}:host([auto-close-duration=fast]) .dismiss-progress:after{animation:dismissProgress 6s ease-out}:host(:hover[auto-close-duration=fast]) .dismiss-progress:after,:host(:focus[auto-close-duration=fast]) .dismiss-progress:after{animation-play-state:paused}:host([auto-close-duration=medium]) .dismiss-progress:after{animation:dismissProgress 10s ease-out}:host(:hover[auto-close-duration=medium]) .dismiss-progress:after,:host(:focus[auto-close-duration=medium]) .dismiss-progress:after{animation-play-state:paused}:host([auto-close-duration=slow]) .dismiss-progress:after{animation:dismissProgress 14s ease-out}:host(:hover[auto-close-duration=slow]) .dismiss-progress:after,:host(:focus[auto-close-duration=slow]) .dismiss-progress:after{animation-play-state:paused}.container.focused .dismiss-progress:after{animation-play-state:paused}@keyframes dismissProgress{0%{inline-size:0px;opacity:.75}to{inline-size:100%;opacity:1}}.container--embedded{position:absolute;z-index:var(--calcite-z-index-toast)}:host([hidden]){display:none}[hidden]{display:none}:host([calcite-hydrated-hidden]){visibility:hidden!important;pointer-events:none}`,n=new h,m=class extends y{constructor(){super(...arguments),this.autoCloseTimeoutId=null,this.transitionProp="opacity",this.totalHoverTime=0,this.totalOpenTime=0,this.messages=T(),this.focusSetter=z()(this),this.hasEndActions=!1,this.isFocused=!1,this.numberStringFormatter=new A,this.active=!1,this.autoClose=!1,this.autoCloseDuration="medium",this.embedded=!1,this.iconFlipRtl=!1,this.kind="brand",this.open=!1,this.openAlertCount=0,this.placement="bottom",this.queue="last",this.scale="m",this.calciteAlertBeforeClose=l({cancelable:!1}),this.calciteAlertBeforeOpen=l({cancelable:!1}),this.calciteAlertClose=l({cancelable:!1}),this.calciteAlertOpen=l({cancelable:!1})}static{this.properties={hasEndActions:[16,{},{state:!0}],isFocused:[16,{},{state:!0}],numberStringFormatter:[16,{},{state:!0}],active:[5,{},{type:Boolean}],autoClose:[7,{},{reflect:!0,type:Boolean}],autoCloseDuration:[3,{},{reflect:!0}],embedded:[7,{},{reflect:!0,type:Boolean}],icon:[3,{converter:C,type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],kind:[3,{},{reflect:!0}],label:1,messageOverrides:[0,{},{attribute:!1}],numberingSystem:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],openAlertCount:[9,{},{type:Number}],placement:[3,{},{reflect:!0}],queue:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=D}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),this.open&&n.registerElement(this.el),this.numberStringFormatter.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,signDisplay:"always"}}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("active")&&(this.hasUpdated||this.active!==!1)&&this.handleActiveChange(),e.has("autoCloseDuration")&&(this.hasUpdated||this.autoCloseDuration!=="medium")&&this.updateDuration(),e.has("queue")&&(this.hasUpdated||this.queue!=="last")&&this.handleQueueChange(),e.has("numberingSystem")&&this.numberingSystemChange(),e.has("messages")&&this.effectiveLocaleChange()}disconnectedCallback(){super.disconnectedCallback(),n.unregisterElement(this.el),this.clearAutoCloseTimeout(),this.embedded=!1}handleActiveChange(){E(this),this.clearAutoCloseTimeout(),this.active&&this.autoClose&&!this.autoCloseTimeoutId&&(this.initialOpenTime=Date.now(),this.autoCloseTimeoutId=window.setTimeout(()=>this.closeAlert(),u[this.autoCloseDuration]))}async handlePopover(){await this.componentOnReady(),!(this.embedded||!this.transitionEl)&&(this.open?this.transitionEl.showPopover():this.transitionEl.hidePopover())}openHandler(){this.open?n.registerElement(this.el):n.unregisterElement(this.el),this.handlePopover()}updateDuration(){this.autoClose&&this.autoCloseTimeoutId&&(this.clearAutoCloseTimeout(),this.autoCloseTimeoutId=window.setTimeout(()=>this.closeAlert(),u[this.autoCloseDuration]))}handleQueueChange(){this.open&&(n.unregisterElement(this.el),n.registerElement(this.el))}handleKeyBoardFocus(){this.isFocused=!0,this.handleFocus()}handleKeyBoardBlur(){this.isFocused=!1,this.isHovered||this.handleBlur()}effectiveLocaleChange(){this.numberStringFormatter.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,signDisplay:"always"}}numberingSystemChange(){this.numberStringFormatter.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,signDisplay:"always"}}clearAutoCloseTimeout(){window.clearTimeout(this.autoCloseTimeoutId),this.autoCloseTimeoutId=null}setTransitionEl(e){e&&(this.transitionEl=e,this.handlePopover())}closeAlert(){this.open=!1,this.clearAutoCloseTimeout()}onBeforeOpen(){this.calciteAlertBeforeOpen.emit()}onOpen(){this.calciteAlertOpen.emit()}onBeforeClose(){this.calciteAlertBeforeClose.emit()}onClose(){this.calciteAlertClose.emit()}actionsEndSlotChangeHandler(e){this.hasEndActions=x(e)}handleMouseOver(){this.isHovered=!0,this.handleFocus()}handleMouseLeave(){this.isHovered=!1,this.isFocused||this.handleBlur()}handleFocus(){this.clearAutoCloseTimeout(),this.totalOpenTime=Date.now()-this.initialOpenTime,this.lastMouseOverBegin=Date.now()}handleBlur(){let e=Date.now()-this.lastMouseOverBegin,t=u[this.autoCloseDuration]-this.totalOpenTime+this.totalHoverTime;this.totalHoverTime=this.totalHoverTime?e+this.totalHoverTime:e,this.autoCloseTimeoutId=window.setTimeout(()=>this.closeAlert(),t)}render(){let{open:e,autoClose:t,label:s,placement:B,active:p,openAlertCount:F}=this,q=t?"alert":"alertdialog",f=!e,g=w($,this.icon,this.kind),O=F>1;return this.el.inert=f,this.el.ariaLabel=s,this.el.toggleAttribute("calcite-hydrated-hidden",f),this.el.role=q,a`<div class=${o({[i.container]:!0,[i.containerActive]:p,[`${i.container}--${B}`]:!0,[i.containerEmbedded]:this.embedded,[i.focused]:this.isFocused})} @pointerenter=${this.autoClose&&this.autoCloseTimeoutId?this.handleMouseOver:null} @pointerleave=${this.autoClose?this.handleMouseLeave:null} .popover=${this.embedded?null:"manual"} ${b(this.setTransitionEl)}>${g&&this.renderIcon(g)||""}<div class=${o(i.textContainer)} @focusin=${this.autoClose&&this.autoCloseTimeoutId?this.handleKeyBoardFocus:null} @focusout=${this.autoClose?this.handleKeyBoardBlur:null}><slot name=${r.title}></slot><slot name=${r.message}></slot><slot name=${r.link}></slot></div>${this.renderActionsEnd()}${O?this.renderQueueCount():null}${this.renderCloseButton()}${e&&p&&t?a`<div class=${o(i.dismissProgress)}></div>`:null}</div>`}renderCloseButton(){return c("close",a`<button .ariaLabel=${this.messages.close} class=${o(i.close)} @click=${this.closeAlert} @focusin=${this.autoClose?this.handleKeyBoardFocus:null} @focusout=${this.autoClose?this.handleKeyBoardBlur:null} type=button><calcite-icon icon=x .scale=${d(this.scale)}></calcite-icon></button>`)}renderQueueCount(){let{openAlertCount:e}=this,t=e>2?e-1:1,s=this.numberStringFormatter.numberFormatter.format(t);return c("queue-count",a`<div class=${o({[i.queueCount]:!0,[i.queueCountActive]:e>1})}><calcite-chip .label=${s} .scale=${this.scale} .value=${s}>${s}</calcite-chip></div>`)}renderActionsEnd(){return a`<div class=${o(i.actionsEnd)}><slot name=${r.actionsEnd} @slotchange=${this.actionsEndSlotChangeHandler}></slot></div>`}renderIcon(e){return a`<div class=${o(i.icon)}><calcite-icon .flipRtl=${this.iconFlipRtl} .icon=${e} .scale=${d(this.scale)}></calcite-icon></div>`}};k("calcite-alert",m);export{m as Alert};
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as $}from"./M4K4HY3K.js";import{j as A}from"./FZSVZEO4.js";import{a as E}from"./BAESWKYQ.js";import{a as c}from"./ULUKHLQN.js";import"./JVPR6YZA.js";import{a as T}from"./UVFQM6FI.js";import{a as z}from"./XGPCFFL2.js";import"./BC4ZMTFC.js";import{a as d}from"./DDSPVSLH.js";import"./W4XITGKA.js";import{o as w,t as x}from"./SBARVI35.js";import"./HWDBQK2D.js";import{C as b,D as y,E as o,I as C,P as k,g as v,h as a,o as l}from"./2ECRIOED.js";var u={slow:14e3,medium:1e4,fast:6e3},r={actionsEnd:"actions-end",title:"title",message:"message",link:"link"},i={actionsEnd:"actions-end",close:"close",container:"container",containerActive:"container--active",dismissProgress:"dismiss-progress",icon:"icon",containerEmbedded:"container--embedded",queueCount:"queue-count",queueCountActive:"queue-count--active",textContainer:"text-container",focused:"focused"},I=300,h=class{constructor(){this.registeredElements=[],this.queueTimeoutId=null}registerElement(e){let{registeredElements:t}=this;if(!t.includes(e)){switch(e.queue){case"immediate":t.unshift(e);break;case"next":t.splice(1,0,e);break;case"last":t.push(e);break}this.updateAlerts()}}unregisterElement(e){let{registeredElements:t}=this,s=t.indexOf(e);s!==-1&&t.splice(s,1),e.active=!1,this.updateAlerts()}updateAlerts(){window.clearTimeout(this.queueTimeoutId),this.queueTimeoutId=null,this.registeredElements.forEach((e,t)=>{e.openAlertCount=this.registeredElements.length,t===0?this.queueTimeoutId=window.setTimeout(()=>e.active=!0,I):e.active=!1})}},D=v`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:block;inline-size:var(--calcite-alert-width)}.container--embedded,.container[popover]{pointer-events:none;position:fixed;margin-inline:auto;margin-block:0px;box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:min-content;align-items:center;justify-content:center;padding:0;text-align:start;opacity:0;inset:initial;--tw-shadow: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);--tw-shadow-colored: 0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--calcite-alert-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow));background-color:var(--calcite-alert-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-alert-corner-radius, var(--calcite-border-radius));border-block-start:0 solid transparent;border-inline:1px solid var(--calcite-color-border-3);border-block-end:1px solid var(--calcite-color-border-3);max-inline-size:calc(100% - var(--calcite-alert-offset-size, 2rem) * 2);transition:opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(.215,.44,.42,.88),all var(--calcite-animation-timing) ease-in-out}.container--bottom,.container--top,.container--bottom[popover],.container--top[popover]{inset-inline-end:0;inset-inline-start:0}.container[class*=bottom]{transform:translate3d(0,var(--calcite-alert-offset-size, 2rem),0);inset-block-end:var(--calcite-alert-offset-size, 2rem)}.container[class*=top]{transform:translate3d(0,calc(-1 * var(--calcite-alert-offset-size, 2rem)),0);inset-block-start:var(--calcite-alert-offset-size, 2rem)}.container[class*=start]{inset-inline-start:var(--calcite-alert-offset-size, 2rem);inset-inline-end:auto}.container[class*=end]{inset-inline-end:var(--calcite-alert-offset-size, 2rem);inset-inline-start:auto}.icon{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;margin-block:auto;margin-inline-end:auto}.close{display:flex;cursor:pointer;align-items:center;justify-content:flex-end;align-self:stretch;border-style:none;background-color:transparent;color:var(--calcite-color-text-3);outline:2px solid transparent;outline-offset:2px;-webkit-appearance:none;border-start-end-radius:var(--calcite-alert-corner-radius, var(--calcite-border-radius));border-end-end-radius:var(--calcite-alert-corner-radius, var(--calcite-border-radius));outline-color:transparent}.close:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.close:hover,.close:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-2)}.close:active{background-color:var(--calcite-color-foreground-3)}.queue-count{visibility:hidden;display:flex;min-inline-size:min-content;cursor:default;align-items:center;justify-content:space-around;align-self:stretch;overflow:hidden;text-align:center;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-2);opacity:0;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-inline:0 solid transparent;border-start-end-radius:0}.queue-count--active{visibility:visible;opacity:1}.dismiss-progress{position:absolute;display:block;inline-size:100%;overflow:hidden;inset-inline:0;inset-block-start:-2px;block-size:2px;border-radius:var(--calcite-border-radius) var(--calcite-border-radius) 0 0}.dismiss-progress:after{position:absolute;inset-block-start:0px;display:block;block-size:2px;content:"";background-color:var(--calcite-color-transparent-tint);inset-inline-end:0}.actions-end{display:flex;align-self:stretch}.text-container{box-sizing:border-box;display:flex;min-inline-size:0px;flex:1 1 auto;flex-direction:column;overflow-wrap:break-word}.footer{position:relative;display:flex;inline-size:auto;justify-content:flex-end;align-self:stretch;padding-block-start:1px;block-size:inherit}:host([scale=s]) slot[name=title]::slotted(*),:host([scale=s]) *::slotted([slot=title]){font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=s]) slot[name=message]::slotted(*),:host([scale=s]) *::slotted([slot=message]){font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) slot[name=link]::slotted(*),:host([scale=s]) *::slotted([slot=link]){font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) .queue-count{margin-inline:.5rem}:host([scale=s]) .container{--calcite-internal-alert-min-height: 3.5rem;inline-size:var(--calcite-alert-width, 40em)}:host([scale=s]) .close{padding:.75rem}:host([scale=s]) .icon{padding-inline-start:.75rem}:host([scale=s]) .text-container{padding-block:.5rem;padding-inline:.75rem .5rem}:host([scale=m]) slot[name=title]::slotted(*),:host([scale=m]) *::slotted([slot=title]){font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=m]) slot[name=message]::slotted(*),:host([scale=m]) *::slotted([slot=message]){font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) slot[name=link]::slotted(*),:host([scale=m]) *::slotted([slot=link]){font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) .queue-count{margin-inline:.75rem}:host([scale=m]) .container{--calcite-internal-alert-min-height: 4.1875rem;inline-size:var(--calcite-alert-width, 50em)}:host([scale=m]) .close{padding:1rem}:host([scale=m]) .icon{padding-inline-start:1rem}:host([scale=m]) .text-container{padding-block:.75rem;padding-inline:1rem .75rem}:host([scale=l]) slot[name=title]::slotted(*),:host([scale=l]) *::slotted([slot=title]){margin-block-end:.25rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host([scale=l]) slot[name=message]::slotted(*),:host([scale=l]) *::slotted([slot=message]){font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) slot[name=link]::slotted(*),:host([scale=l]) *::slotted([slot=link]){font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) .queue-count{margin-inline:1rem}:host([scale=l]) .container{--calcite-internal-alert-min-height: 5.625rem;inline-size:var(--calcite-alert-width, 60em)}:host([scale=l]) .close{padding:1.25rem}:host([scale=l]) .icon{padding-inline-start:1.25rem}:host([scale=l]) .text-container{padding-block:1rem;padding-inline:1.25rem 1rem}:host([open]) .container--active{border-block-start-width:2px;opacity:1;pointer-events:initial}:host([open]) .container--active[class*=bottom]{transform:translate3d(0,calc(-1 * var(--calcite-alert-offset-size, 2rem)),inherit)}:host([open]) .container--active[class*=top]{transform:translate3d(0,var(--calcite-alert-offset-size, 2rem),inherit)}:host([auto-close])>.queue-count{border-inline-end:0 solid transparent}slot[name=title]::slotted(*),*::slotted([slot=title]){font-size:var(--calcite-font-size-0);line-height:1.375;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}slot[name=message]::slotted(*),*::slotted([slot=message]){margin:0;display:inline;font-size:var(--calcite-font-size--1);line-height:1.375;font-weight:var(--calcite-font-weight-normal);margin-inline-end:.5rem;color:var(--calcite-color-text-2)}slot[name=link]::slotted(*),*::slotted([slot=link]){display:inline-flex;color:var(--calcite-color-text-link)}:host([kind=brand]) .container{border-block-start-color:var(--calcite-color-brand)}:host([kind=brand]) .container .icon{color:var(--calcite-color-brand)}:host([kind=info]) .container{border-block-start-color:var(--calcite-color-status-info)}:host([kind=info]) .container .icon{color:var(--calcite-color-status-info)}:host([kind=danger]) .container{border-block-start-color:var(--calcite-color-status-danger)}:host([kind=danger]) .container .icon{color:var(--calcite-color-status-danger)}:host([kind=success]) .container{border-block-start-color:var(--calcite-color-status-success)}:host([kind=success]) .container .icon{color:var(--calcite-color-status-success)}:host([kind=warning]) .container{border-block-start-color:var(--calcite-color-status-warning)}:host([kind=warning]) .container .icon{color:var(--calcite-color-status-warning)}:host([auto-close-duration=fast]) .dismiss-progress:after{animation:dismissProgress 6s ease-out}:host(:hover[auto-close-duration=fast]) .dismiss-progress:after,:host(:focus[auto-close-duration=fast]) .dismiss-progress:after{animation-play-state:paused}:host([auto-close-duration=medium]) .dismiss-progress:after{animation:dismissProgress 10s ease-out}:host(:hover[auto-close-duration=medium]) .dismiss-progress:after,:host(:focus[auto-close-duration=medium]) .dismiss-progress:after{animation-play-state:paused}:host([auto-close-duration=slow]) .dismiss-progress:after{animation:dismissProgress 14s ease-out}:host(:hover[auto-close-duration=slow]) .dismiss-progress:after,:host(:focus[auto-close-duration=slow]) .dismiss-progress:after{animation-play-state:paused}.container.focused .dismiss-progress:after{animation-play-state:paused}@keyframes dismissProgress{0%{inline-size:0px;opacity:.75}to{inline-size:100%;opacity:1}}.container--embedded{position:absolute;z-index:var(--calcite-z-index-toast)}:host([hidden]){display:none}[hidden]{display:none}:host([calcite-hydrated-hidden]){visibility:hidden!important;pointer-events:none}`,n=new h,m=class extends y{constructor(){super(...arguments),this.autoCloseTimeoutId=null,this.transitionProp="opacity",this.totalHoverTime=0,this.totalOpenTime=0,this.messages=T(),this.focusSetter=z()(this),this.hasEndActions=!1,this.isFocused=!1,this.numberStringFormatter=new A,this.active=!1,this.autoClose=!1,this.autoCloseDuration="medium",this.embedded=!1,this.iconFlipRtl=!1,this.kind="brand",this.open=!1,this.openAlertCount=0,this.placement="bottom",this.queue="last",this.scale="m",this.calciteAlertBeforeClose=l({cancelable:!1}),this.calciteAlertBeforeOpen=l({cancelable:!1}),this.calciteAlertClose=l({cancelable:!1}),this.calciteAlertOpen=l({cancelable:!1})}static{this.properties={hasEndActions:[16,{},{state:!0}],isFocused:[16,{},{state:!0}],numberStringFormatter:[16,{},{state:!0}],active:[5,{},{type:Boolean}],autoClose:[7,{},{reflect:!0,type:Boolean}],autoCloseDuration:[3,{},{reflect:!0}],embedded:[7,{},{reflect:!0,type:Boolean}],icon:[3,{converter:C,type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],kind:[3,{},{reflect:!0}],label:1,messageOverrides:[0,{},{attribute:!1}],numberingSystem:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],openAlertCount:[9,{},{type:Number}],placement:[3,{},{reflect:!0}],queue:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=D}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),this.open&&n.registerElement(this.el),this.numberStringFormatter.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,signDisplay:"always"}}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("active")&&(this.hasUpdated||this.active!==!1)&&this.handleActiveChange(),e.has("autoCloseDuration")&&(this.hasUpdated||this.autoCloseDuration!=="medium")&&this.updateDuration(),e.has("queue")&&(this.hasUpdated||this.queue!=="last")&&this.handleQueueChange(),e.has("numberingSystem")&&this.numberingSystemChange(),e.has("messages")&&this.effectiveLocaleChange()}disconnectedCallback(){super.disconnectedCallback(),n.unregisterElement(this.el),this.clearAutoCloseTimeout(),this.embedded=!1}handleActiveChange(){E(this),this.clearAutoCloseTimeout(),this.active&&this.autoClose&&!this.autoCloseTimeoutId&&(this.initialOpenTime=Date.now(),this.autoCloseTimeoutId=window.setTimeout(()=>this.closeAlert(),u[this.autoCloseDuration]))}async handlePopover(){await this.componentOnReady(),!(this.embedded||!this.transitionEl)&&(this.open?this.transitionEl.showPopover():this.transitionEl.hidePopover())}openHandler(){this.open?n.registerElement(this.el):n.unregisterElement(this.el),this.handlePopover()}updateDuration(){this.autoClose&&this.autoCloseTimeoutId&&(this.clearAutoCloseTimeout(),this.autoCloseTimeoutId=window.setTimeout(()=>this.closeAlert(),u[this.autoCloseDuration]))}handleQueueChange(){this.open&&(n.unregisterElement(this.el),n.registerElement(this.el))}handleKeyBoardFocus(){this.isFocused=!0,this.handleFocus()}handleKeyBoardBlur(){this.isFocused=!1,this.isHovered||this.handleBlur()}effectiveLocaleChange(){this.numberStringFormatter.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,signDisplay:"always"}}numberingSystemChange(){this.numberStringFormatter.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,signDisplay:"always"}}clearAutoCloseTimeout(){window.clearTimeout(this.autoCloseTimeoutId),this.autoCloseTimeoutId=null}setTransitionEl(e){e&&(this.transitionEl=e,this.handlePopover())}closeAlert(){this.open=!1,this.clearAutoCloseTimeout()}onBeforeOpen(){this.calciteAlertBeforeOpen.emit()}onOpen(){this.calciteAlertOpen.emit()}onBeforeClose(){this.calciteAlertBeforeClose.emit()}onClose(){this.calciteAlertClose.emit()}actionsEndSlotChangeHandler(e){this.hasEndActions=x(e)}handleMouseOver(){this.isHovered=!0,this.handleFocus()}handleMouseLeave(){this.isHovered=!1,this.isFocused||this.handleBlur()}handleFocus(){this.clearAutoCloseTimeout(),this.totalOpenTime=Date.now()-this.initialOpenTime,this.lastMouseOverBegin=Date.now()}handleBlur(){let e=Date.now()-this.lastMouseOverBegin,t=u[this.autoCloseDuration]-this.totalOpenTime+this.totalHoverTime;this.totalHoverTime=this.totalHoverTime?e+this.totalHoverTime:e,this.autoCloseTimeoutId=window.setTimeout(()=>this.closeAlert(),t)}render(){let{open:e,autoClose:t,label:s,placement:B,active:p,openAlertCount:F}=this,q=t?"alert":"alertdialog",f=!e,g=w($,this.icon,this.kind),O=F>1;return this.el.inert=f,this.el.ariaLabel=s,this.el.toggleAttribute("calcite-hydrated-hidden",f),this.el.role=q,a`<div class=${o({[i.container]:!0,[i.containerActive]:p,[`${i.container}--${B}`]:!0,[i.containerEmbedded]:this.embedded,[i.focused]:this.isFocused})} @pointerenter=${this.autoClose&&this.autoCloseTimeoutId?this.handleMouseOver:null} @pointerleave=${this.autoClose?this.handleMouseLeave:null} .popover=${this.embedded?null:"manual"} ${b(this.setTransitionEl)}>${g&&this.renderIcon(g)||""}<div class=${o(i.textContainer)} @focusin=${this.autoClose&&this.autoCloseTimeoutId?this.handleKeyBoardFocus:null} @focusout=${this.autoClose?this.handleKeyBoardBlur:null}><slot name=${r.title}></slot><slot name=${r.message}></slot><slot name=${r.link}></slot></div>${this.renderActionsEnd()}${O?this.renderQueueCount():null}${this.renderCloseButton()}${e&&p&&t?a`<div class=${o(i.dismissProgress)}></div>`:null}</div>`}renderCloseButton(){return c("close",a`<button .ariaLabel=${this.messages.close} class=${o(i.close)} @click=${this.closeAlert} @focusin=${this.autoClose?this.handleKeyBoardFocus:null} @focusout=${this.autoClose?this.handleKeyBoardBlur:null} type=button><calcite-icon icon=x .scale=${d(this.scale)}></calcite-icon></button>`)}renderQueueCount(){let{openAlertCount:e}=this,t=e>2?e-1:1,s=this.numberStringFormatter.numberFormatter.format(t);return c("queue-count",a`<div class=${o({[i.queueCount]:!0,[i.queueCountActive]:e>1})}><calcite-chip .label=${s} .scale=${this.scale} .value=${s}>${s}</calcite-chip></div>`)}renderActionsEnd(){return a`<div class=${o(i.actionsEnd)}><slot name=${r.actionsEnd} @slotchange=${this.actionsEndSlotChangeHandler}></slot></div>`}renderIcon(e){return a`<div class=${o(i.icon)}><calcite-icon .flipRtl=${this.iconFlipRtl} .icon=${e} .scale=${d(this.scale)}></calcite-icon></div>`}};k("calcite-alert",m);export{m as Alert};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as t,b as S,c as v,d as r}from"./VYFT5EAY.js";import{a as j}from"./SMRCCHJE.js";import{b as L}from"./5LAPR75M.js";import{a as I}from"./LYDOM6VQ.js";import"./AQ4DKRX6.js";import{a as M,b as O}from"./NSBK36H4.js";import{a as u}from"./NULQJBCW.js";import"./W5OJOVZY.js";import{a as F,b as B}from"./ALDDSDTX.js";import{a as N}from"./LH7245HX.js";import{c as R}from"./H2FWQITV.js";import{a as T}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import{a as P}from"./3YZG7MA3.js";import"./CIU4VM7X.js";import{t as c,u as x}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as w,C,D as z,E as o,P as E,g as A,h as n,l as $,o as g}from"./AUIOWPFN.js";var K=A`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;overflow:hidden;border-radius:var(--calcite-panel-corner-radius, var(--calcite-corner-radius-sharp))}slot[name=alerts]::slotted(calcite-alert){block-size:0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-panel-default-space: var(--calcite-spacing-sm);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-sm-plus)}:host([scale=s]) .header-content .heading{font-size:var(--calcite-font-size--1)}:host([scale=s]) .header-content .description{font-size:var(--calcite-font-size--2)}:host([scale=s]) .header-content .icon{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-panel-default-space: var(--calcite-spacing-md);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-md-plus)}:host([scale=m]) .header-content .heading{font-size:var(--calcite-font-size-0)}:host([scale=m]) .header-content .description{font-size:var(--calcite-font-size--1)}:host([scale=m]) .header-content .icon{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]){--calcite-internal-panel-default-space: var(--calcite-spacing-lg);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-xl)}:host([scale=l]) .header-content .heading{font-size:var(--calcite-font-size-1)}:host([scale=l]) .header-content .description{font-size:var(--calcite-font-size-0)}:host([scale=l]) .header-content .icon{margin-inline-end:var(--calcite-spacing-lg)}.content-top,.content-bottom{display:flex;align-items:flex-start;align-self:stretch;padding:var(--calcite-internal-panel-default-space);border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));background-color:var(--calcite-panel-background-color, var(--calcite-color-foreground-1))}.container{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;overflow:hidden;background-color:var(--calcite-color-background);padding:0;color:var(--calcite-color-text-2);transition:max-block-size var(--calcite-animation-timing),inline-size var(--calcite-animation-timing);box-sizing:border-box;font-size:var(--calcite-font-size--1)}.container *{box-sizing:border-box}.header{z-index:var(--calcite-z-index-header);display:flex;flex-direction:column;background-color:var(--calcite-panel-header-background-color, var(--calcite-color-foreground-1));border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-panel-header-border-block-end, var(--calcite-color-border-3)))}.header-container{display:flex;inline-size:100%;flex-direction:row;align-items:stretch;justify-content:flex-start;flex:0 0 auto}.header-container--border-end{border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3))}.action-bar-container{inline-size:100%}.action-bar-container ::slotted(calcite-action-bar){inline-size:100%}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:.75rem;padding-block:.875rem;margin-inline-end:auto;justify-content:center}.header-content .heading-text-content{flex:1 1 auto;overflow:hidden}.header-content .heading,.header-content .description{display:block;flex:none;overflow-wrap:break-word;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.header-content .heading{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-panel-heading-text-color, var(--calcite-color-text-1))}.header-content .heading:only-child{margin-block-end:0px}.header-content .description{color:var(--calcite-panel-description-text-color, var(--calcite-color-text-2))}#close,#collapse,.back-button,calcite-action-menu{--calcite-action-background-color: var(--calcite-panel-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-panel-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-panel-header-action-background-color-press);--calcite-action-text-color: var(--calcite-panel-header-action-text-color);--calcite-action-text-color-press: var(--calcite-panel-header-action-text-color-press)}.back-button{border-width:0px;border-style:solid;border-inline-end-width:1px;border-color:var(--calcite-panel-border-color, var(--calcite-color-border-3))}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:stretch}.header-actions--end{margin-inline-start:auto}.content-wrapper{position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;overflow:auto;color:var(--calcite-color-text-2);outline-color:transparent;padding:var(--calcite-panel-space, var(--calcite-panel-content-space, 0));background:var(--calcite-panel-background-color, var(--calcite-color-background))}.content-wrapper:focus-visible{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.header-content{flex:1 1 auto;justify-content:center;padding-block:var(--calcite-internal-panel-header-vertical-padding);padding-inline:var(--calcite-internal-panel-default-space)}.header-content.header--slotted-content{padding:var(--calcite-panel-header-content-space, var(--calcite-internal-panel-header-vertical-padding) var(--calcite-internal-panel-default-space))}.header-content.header--non-slotted-content{align-items:center;flex-direction:row}.footer{margin-block-start:auto;display:flex;flex-direction:row;align-content:space-between;align-items:center;justify-content:center;font-size:var(--calcite-font-size--2);line-height:1.375;border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-footer-space, var(--calcite-panel-footer-padding, var(--calcite-internal-panel-default-space)));background-color:var(--calcite-panel-footer-background-color, var(--calcite-color-foreground-1))}.footer-content{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:center}.footer-start{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-start;margin-inline-end:auto;gap:var(--calcite-internal-panel-default-space)}.footer-end{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-end;margin-inline-start:auto;gap:var(--calcite-internal-panel-default-space)}.fab-container{position:sticky;inset-block-end:0px;z-index:var(--calcite-z-index-sticky);margin-block:0px;margin-inline:auto;display:block;padding:.5rem;inset-inline:0;inline-size:fit-content}calcite-icon{--calcite-icon-color: var(--calcite-panel-icon-color, var(--calcite-color-text-1))}:host([hidden]){display:none}[hidden]{display:none}`,y=class extends z{constructor(){super(),this.containerRef=w(),this.resizeObserver=F("resize",()=>this.resizeHandler()),this.messages=N(),this._closed=!1,this.focusSetter=T()(this),this.hasActionBar=!1,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasEndActions=!1,this.hasFab=!1,this.hasFooterContent=!1,this.hasFooterEndContent=!1,this.hasFooterStartContent=!1,this.hasHeaderContent=!1,this.hasMenuItems=!1,this.hasStartActions=!1,this.showHeaderContent=!1,this.closable=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.menuOpen=!1,this.menuPlacement=L,this.overlayPositioning="absolute",this.scale="m",this.calcitePanelClose=g({cancelable:!0}),this.calcitePanelCollapse=g({cancelable:!1}),this.calcitePanelExpand=g({cancelable:!1}),this.calcitePanelScroll=g({cancelable:!1}),this.calcitePanelToggle=g({cancelable:!1}),this.listen("keydown",this.panelKeyDownHandler),this.listen("calcitePanelClose",this.panelCloseHandler)}static{this.properties={hasActionBar:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],hasEndActions:[16,{},{state:!0}],hasFab:[16,{},{state:!0}],hasFooterContent:[16,{},{state:!0}],hasFooterEndContent:[16,{},{state:!0}],hasFooterStartContent:[16,{},{state:!0}],hasHeaderContent:[16,{},{state:!0}],hasMenuItems:[16,{},{state:!0}],hasStartActions:[16,{},{state:!0}],showHeaderContent:[16,{},{state:!0}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=[j,K]}get closed(){return this._closed}set closed(e){let a=this._closed;e!==a&&this.setClosedState(e)}async scrollContentTo(e){this.panelScrollEl?.scrollTo(e)}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}willUpdate(e){e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calcitePanelCollapse.emit():this.calcitePanelExpand.emit())}updated(){M(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}async setClosedState(e){if(this.beforeClose&&e)try{await this.beforeClose?.()}catch{return}this._closed=e}resizeHandler(){let{panelScrollEl:e}=this;if(!e||typeof e.scrollHeight!="number"||typeof e.offsetHeight!="number")return;e.scrollHeight>e.offsetHeight?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}closeClickHandler(){this.emitCloseEvent()}emitCloseEvent(){this.calcitePanelClose.emit()}panelKeyDownHandler(e){this.closable&&e.key==="Escape"&&!e.defaultPrevented&&(e.preventDefault(),this.emitCloseEvent())}panelCloseHandler(e){e.defaultPrevented||e.target!==this.el||(this.closed=!0)}collapse(){this.collapsed=!this.collapsed,this.calcitePanelToggle.emit()}panelScrollHandler(){this.calcitePanelScroll.emit()}handleHeaderActionsStartSlotChange(e){this.hasStartActions=c(e)}handleHeaderActionsEndSlotChange(e){this.hasEndActions=c(e)}handleHeaderMenuActionsSlotChange(e){this.hasMenuItems=c(e)}handleActionBarSlotChange(e){let a=x(e).filter(l=>l?.matches("calcite-action-bar"));a.forEach(l=>l.layout="horizontal"),this.hasActionBar=!!a.length}handleHeaderContentSlotChange(e){this.hasHeaderContent=c(e)}handleFabSlotChange(e){this.hasFab=c(e)}handleFooterEndSlotChange(e){this.hasFooterEndContent=c(e)}handleFooterStartSlotChange(e){this.hasFooterStartContent=c(e)}handleFooterSlotChange(e){this.hasFooterContent=c(e)}contentBottomSlotChangeHandler(e){this.hasContentBottom=c(e)}contentTopSlotChangeHandler(e){this.hasContentTop=c(e)}setPanelScrollEl(e){B(this.resizeObserver,this.panelScrollEl,e),this.panelScrollEl=e}handleAlertsSlotChange(e){x(e)?.map(a=>{a.nodeName==="CALCITE-ALERT"&&(a.embedded=!0)})}renderHeaderContent(){let{heading:e,headingLevel:a,description:l,hasHeaderContent:i,icon:d,scale:m}=this,h=d?n`<calcite-icon class=${o(t.icon)} .flipRtl=${this.iconFlipRtl} .icon=${d} .scale=${P(m)}></calcite-icon>`:null,s=e?I({class:t.heading,level:a,children:e}):null,p=l?n`<span class=${o(t.description)}>${l}</span>`:null;return!i&&(s||p)?u("header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerNonSlottedContent]:!0})}>${h}<div class=${o(t.headingTextContent)}>${s}${p}</div></div>`):null}renderActionBar(){return n`<div class=${o(t.actionBarContainer)} .hidden=${!this.hasActionBar}><slot name=${r.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`}renderHeaderSlottedContent(){return u("slotted-header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerSlottedContent]:!0})} .hidden=${!this.hasHeaderContent}><slot name=${r.headerContent} @slotchange=${this.handleHeaderContentSlotChange}></slot></div>`)}renderHeaderStartActions(){let{hasStartActions:e}=this;return u("header-actions-start",n`<div class=${o({[t.headerActionsStart]:!0,[t.headerActions]:!0})} .hidden=${!e}><slot name=${r.headerActionsStart} @slotchange=${this.handleHeaderActionsStartSlotChange}></slot></div>`)}renderHeaderActionsEnd(){let{hasEndActions:e,messages:a,closable:l,collapsed:i,collapseDirection:d,collapsible:m,hasMenuItems:h}=this,{collapse:s,expand:p,close:f}=a,b=[v.expand,v.collapse];d==="up"&&b.reverse();let H=m?n`<calcite-action .aria=${{expanded:!i}} .icon=${i?b[0]:b[1]} id=${S.collapse} .label=${s} @click=${this.collapse} .scale=${this.scale} .text=${s} title=${(i?p:s)??$}></calcite-action>`:null,k=l?n`<calcite-action .ariaLabel=${f} .icon=${v.close} id=${S.close} @click=${this.closeClickHandler} .scale=${this.scale} .text=${f} title=${f??$}></calcite-action>`:null,D=n`<slot name=${r.headerActionsEnd} @slotchange=${this.handleHeaderActionsEndSlotChange}></slot>`,_=e||H||k||h;return u("header-actions-end",n`<div class=${o({[t.headerActionsEnd]:!0,[t.headerActions]:!0})} .hidden=${!_}>${D}${this.renderMenu()}${H}${k}</div>`)}renderMenu(){let{hasMenuItems:e,messages:a,menuOpen:l,menuFlipPlacements:i,menuPlacement:d}=this;return u("menu",n`<calcite-action-menu .flipPlacements=${i??["top","bottom"]} .hidden=${!e} .label=${a.options} .open=${l} .overlayPositioning=${this.overlayPositioning} .placement=${d}><calcite-action class=${o(t.menuAction)} .icon=${v.menu} .scale=${this.scale} slot=${R.trigger} .text=${a.options}></calcite-action><slot name=${r.headerMenuActions} @slotchange=${this.handleHeaderMenuActionsSlotChange}></slot></calcite-action-menu>`)}renderHeaderNode(){let{hasHeaderContent:e,hasStartActions:a,hasEndActions:l,closable:i,collapsible:d,hasMenuItems:m,hasActionBar:h,hasContentTop:s}=this,p=this.renderHeaderContent(),f=e||!!p||a||l||d||i||m||h||s;return this.showHeaderContent=f,n`<header class=${o(t.header)} .hidden=${!(f||h||s)}><div class=${o({[t.headerContainer]:!0,[t.headerContainerBorderEnd]:h})} .hidden=${!f}>${this.renderHeaderStartActions()}${this.renderHeaderSlottedContent()}${p}${this.renderHeaderActionsEnd()}</div>${this.renderActionBar()}${this.renderContentTop()}</header>`}renderFooterNode(){let{hasFooterEndContent:e,hasFooterStartContent:a,hasFooterContent:l}=this,i=a||e||l;return n`<footer class=${o(t.footer)} .hidden=${!i}><div class=${o(t.footerContent)} .hidden=${!l}><slot name=${r.footer} @slotchange=${this.handleFooterSlotChange}></slot></div><div class=${o(t.footerStart)} .hidden=${l||!a}><slot name=${r.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot></div><div class=${o(t.footerEnd)} .hidden=${l||!e}><slot name=${r.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></div></footer>`}renderContent(){return n`<div class=${o(t.contentWrapper)} .hidden=${this.collapsible&&this.collapsed} @scroll=${this.panelScrollHandler} ${C(this.setPanelScrollEl)}><slot></slot>${this.renderFab()}</div>`}renderContentBottom(){return n`<div class=${o(t.contentBottom)} .hidden=${!this.hasContentBottom}><slot name=${r.contentBottom} @slotchange=${this.contentBottomSlotChangeHandler}></slot></div>`}renderContentTop(){return n`<div class=${o(t.contentTop)} .hidden=${!this.hasContentTop}><slot name=${r.contentTop} @slotchange=${this.contentTopSlotChangeHandler}></slot></div>`}renderFab(){return n`<div class=${o(t.fabContainer)} .hidden=${!this.hasFab}><slot name=${r.fab} @slotchange=${this.handleFabSlotChange}></slot></div>`}render(){let{disabled:e,loading:a,closed:l}=this,i=n`<article .ariaBusy=${a} class=${o(t.container)} .hidden=${l} ${C(this.containerRef)}>${this.renderHeaderNode()}${this.renderContent()}${this.renderContentBottom()}${this.renderFooterNode()}${u("alerts",n`<slot name=${r.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</article>`;return O({disabled:e,children:n`${a?n`<calcite-scrim .loading=${a}></calcite-scrim>`:null}${i}`})}};E("calcite-panel",y);export{y as Panel};
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as t,b as S,c as v,d as r}from"./HZH2MCFD.js";import{a as j}from"./J5N7X673.js";import{b as L}from"./SBJ5HVNQ.js";import{a as I}from"./ZIA4F7R5.js";import"./DIWZOGSO.js";import{a as M,b as O}from"./ZOYJ4343.js";import{a as u}from"./ULUKHLQN.js";import"./OWSWQHLM.js";import{a as F,b as B}from"./AD2NNFBJ.js";import{a as N}from"./UVFQM6FI.js";import{c as R}from"./ENP5M2UC.js";import{a as T}from"./XGPCFFL2.js";import"./BC4ZMTFC.js";import{a as P}from"./DDSPVSLH.js";import"./W4XITGKA.js";import{t as c,u as x}from"./SBARVI35.js";import"./HWDBQK2D.js";import{B as w,C,D as z,E as o,P as E,g as A,h as n,l as $,o as g}from"./2ECRIOED.js";var K=A`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;overflow:hidden;border-radius:var(--calcite-panel-corner-radius, var(--calcite-corner-radius-sharp))}slot[name=alerts]::slotted(calcite-alert){block-size:0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-panel-default-space: var(--calcite-spacing-sm);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-sm-plus)}:host([scale=s]) .header-content .heading{font-size:var(--calcite-font-size--1)}:host([scale=s]) .header-content .description{font-size:var(--calcite-font-size--2)}:host([scale=s]) .header-content .icon{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-panel-default-space: var(--calcite-spacing-md);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-md-plus)}:host([scale=m]) .header-content .heading{font-size:var(--calcite-font-size-0)}:host([scale=m]) .header-content .description{font-size:var(--calcite-font-size--1)}:host([scale=m]) .header-content .icon{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]){--calcite-internal-panel-default-space: var(--calcite-spacing-lg);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-xl)}:host([scale=l]) .header-content .heading{font-size:var(--calcite-font-size-1)}:host([scale=l]) .header-content .description{font-size:var(--calcite-font-size-0)}:host([scale=l]) .header-content .icon{margin-inline-end:var(--calcite-spacing-lg)}.content-top,.content-bottom{display:flex;align-items:flex-start;align-self:stretch;padding:var(--calcite-internal-panel-default-space);border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));background-color:var(--calcite-panel-background-color, var(--calcite-color-foreground-1))}.container{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;overflow:hidden;background-color:var(--calcite-color-background);padding:0;color:var(--calcite-color-text-2);transition:max-block-size var(--calcite-animation-timing),inline-size var(--calcite-animation-timing);box-sizing:border-box;font-size:var(--calcite-font-size--1)}.container *{box-sizing:border-box}.header{z-index:var(--calcite-z-index-header);display:flex;flex-direction:column;background-color:var(--calcite-panel-header-background-color, var(--calcite-color-foreground-1));border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-panel-header-border-block-end, var(--calcite-color-border-3)))}.header-container{display:flex;inline-size:100%;flex-direction:row;align-items:stretch;justify-content:flex-start;flex:0 0 auto}.header-container--border-end{border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3))}.action-bar-container{inline-size:100%}.action-bar-container ::slotted(calcite-action-bar){inline-size:100%}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:.75rem;padding-block:.875rem;margin-inline-end:auto;justify-content:center}.header-content .heading-text-content{flex:1 1 auto;overflow:hidden}.header-content .heading,.header-content .description{display:block;flex:none;overflow-wrap:break-word;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.header-content .heading{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-panel-heading-text-color, var(--calcite-color-text-1))}.header-content .heading:only-child{margin-block-end:0px}.header-content .description{color:var(--calcite-panel-description-text-color, var(--calcite-color-text-2))}#close,#collapse,.back-button,calcite-action-menu{--calcite-action-background-color: var(--calcite-panel-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-panel-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-panel-header-action-background-color-press);--calcite-action-text-color: var(--calcite-panel-header-action-text-color);--calcite-action-text-color-press: var(--calcite-panel-header-action-text-color-press)}.back-button{border-width:0px;border-style:solid;border-inline-end-width:1px;border-color:var(--calcite-panel-border-color, var(--calcite-color-border-3))}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:stretch}.header-actions--end{margin-inline-start:auto}.content-wrapper{position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;overflow:auto;color:var(--calcite-color-text-2);outline-color:transparent;padding:var(--calcite-panel-space, var(--calcite-panel-content-space, 0));background:var(--calcite-panel-background-color, var(--calcite-color-background))}.content-wrapper:focus-visible{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.header-content{flex:1 1 auto;justify-content:center;padding-block:var(--calcite-internal-panel-header-vertical-padding);padding-inline:var(--calcite-internal-panel-default-space)}.header-content.header--slotted-content{padding:var(--calcite-panel-header-content-space, var(--calcite-internal-panel-header-vertical-padding) var(--calcite-internal-panel-default-space))}.header-content.header--non-slotted-content{align-items:center;flex-direction:row}.footer{margin-block-start:auto;display:flex;flex-direction:row;align-content:space-between;align-items:center;justify-content:center;font-size:var(--calcite-font-size--2);line-height:1.375;border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-footer-space, var(--calcite-panel-footer-padding, var(--calcite-internal-panel-default-space)));background-color:var(--calcite-panel-footer-background-color, var(--calcite-color-foreground-1))}.footer-content{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:center}.footer-start{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-start;margin-inline-end:auto;gap:var(--calcite-internal-panel-default-space)}.footer-end{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-end;margin-inline-start:auto;gap:var(--calcite-internal-panel-default-space)}.fab-container{position:sticky;inset-block-end:0px;z-index:var(--calcite-z-index-sticky);margin-block:0px;margin-inline:auto;display:block;padding:.5rem;inset-inline:0;inline-size:fit-content}calcite-icon{--calcite-icon-color: var(--calcite-panel-icon-color, var(--calcite-color-text-1))}:host([hidden]){display:none}[hidden]{display:none}`,y=class extends z{constructor(){super(),this.containerRef=w(),this.resizeObserver=F("resize",()=>this.resizeHandler()),this.messages=N(),this._closed=!1,this.focusSetter=T()(this),this.hasActionBar=!1,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasEndActions=!1,this.hasFab=!1,this.hasFooterContent=!1,this.hasFooterEndContent=!1,this.hasFooterStartContent=!1,this.hasHeaderContent=!1,this.hasMenuItems=!1,this.hasStartActions=!1,this.showHeaderContent=!1,this.closable=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.menuOpen=!1,this.menuPlacement=L,this.overlayPositioning="absolute",this.scale="m",this.calcitePanelClose=g({cancelable:!0}),this.calcitePanelCollapse=g({cancelable:!1}),this.calcitePanelExpand=g({cancelable:!1}),this.calcitePanelScroll=g({cancelable:!1}),this.calcitePanelToggle=g({cancelable:!1}),this.listen("keydown",this.panelKeyDownHandler),this.listen("calcitePanelClose",this.panelCloseHandler)}static{this.properties={hasActionBar:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],hasEndActions:[16,{},{state:!0}],hasFab:[16,{},{state:!0}],hasFooterContent:[16,{},{state:!0}],hasFooterEndContent:[16,{},{state:!0}],hasFooterStartContent:[16,{},{state:!0}],hasHeaderContent:[16,{},{state:!0}],hasMenuItems:[16,{},{state:!0}],hasStartActions:[16,{},{state:!0}],showHeaderContent:[16,{},{state:!0}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=[j,K]}get closed(){return this._closed}set closed(e){let a=this._closed;e!==a&&this.setClosedState(e)}async scrollContentTo(e){this.panelScrollEl?.scrollTo(e)}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}willUpdate(e){e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calcitePanelCollapse.emit():this.calcitePanelExpand.emit())}updated(){M(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}async setClosedState(e){if(this.beforeClose&&e)try{await this.beforeClose?.()}catch{return}this._closed=e}resizeHandler(){let{panelScrollEl:e}=this;if(!e||typeof e.scrollHeight!="number"||typeof e.offsetHeight!="number")return;e.scrollHeight>e.offsetHeight?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}closeClickHandler(){this.emitCloseEvent()}emitCloseEvent(){this.calcitePanelClose.emit()}panelKeyDownHandler(e){this.closable&&e.key==="Escape"&&!e.defaultPrevented&&(e.preventDefault(),this.emitCloseEvent())}panelCloseHandler(e){e.defaultPrevented||e.target!==this.el||(this.closed=!0)}collapse(){this.collapsed=!this.collapsed,this.calcitePanelToggle.emit()}panelScrollHandler(){this.calcitePanelScroll.emit()}handleHeaderActionsStartSlotChange(e){this.hasStartActions=c(e)}handleHeaderActionsEndSlotChange(e){this.hasEndActions=c(e)}handleHeaderMenuActionsSlotChange(e){this.hasMenuItems=c(e)}handleActionBarSlotChange(e){let a=x(e).filter(l=>l?.matches("calcite-action-bar"));a.forEach(l=>l.layout="horizontal"),this.hasActionBar=!!a.length}handleHeaderContentSlotChange(e){this.hasHeaderContent=c(e)}handleFabSlotChange(e){this.hasFab=c(e)}handleFooterEndSlotChange(e){this.hasFooterEndContent=c(e)}handleFooterStartSlotChange(e){this.hasFooterStartContent=c(e)}handleFooterSlotChange(e){this.hasFooterContent=c(e)}contentBottomSlotChangeHandler(e){this.hasContentBottom=c(e)}contentTopSlotChangeHandler(e){this.hasContentTop=c(e)}setPanelScrollEl(e){B(this.resizeObserver,this.panelScrollEl,e),this.panelScrollEl=e}handleAlertsSlotChange(e){x(e)?.map(a=>{a.nodeName==="CALCITE-ALERT"&&(a.embedded=!0)})}renderHeaderContent(){let{heading:e,headingLevel:a,description:l,hasHeaderContent:i,icon:d,scale:m}=this,h=d?n`<calcite-icon class=${o(t.icon)} .flipRtl=${this.iconFlipRtl} .icon=${d} .scale=${P(m)}></calcite-icon>`:null,s=e?I({class:t.heading,level:a,children:e}):null,p=l?n`<span class=${o(t.description)}>${l}</span>`:null;return!i&&(s||p)?u("header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerNonSlottedContent]:!0})}>${h}<div class=${o(t.headingTextContent)}>${s}${p}</div></div>`):null}renderActionBar(){return n`<div class=${o(t.actionBarContainer)} .hidden=${!this.hasActionBar}><slot name=${r.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`}renderHeaderSlottedContent(){return u("slotted-header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerSlottedContent]:!0})} .hidden=${!this.hasHeaderContent}><slot name=${r.headerContent} @slotchange=${this.handleHeaderContentSlotChange}></slot></div>`)}renderHeaderStartActions(){let{hasStartActions:e}=this;return u("header-actions-start",n`<div class=${o({[t.headerActionsStart]:!0,[t.headerActions]:!0})} .hidden=${!e}><slot name=${r.headerActionsStart} @slotchange=${this.handleHeaderActionsStartSlotChange}></slot></div>`)}renderHeaderActionsEnd(){let{hasEndActions:e,messages:a,closable:l,collapsed:i,collapseDirection:d,collapsible:m,hasMenuItems:h}=this,{collapse:s,expand:p,close:f}=a,b=[v.expand,v.collapse];d==="up"&&b.reverse();let H=m?n`<calcite-action .aria=${{expanded:!i}} .icon=${i?b[0]:b[1]} id=${S.collapse} .label=${s} @click=${this.collapse} .scale=${this.scale} .text=${s} title=${(i?p:s)??$}></calcite-action>`:null,k=l?n`<calcite-action .ariaLabel=${f} .icon=${v.close} id=${S.close} @click=${this.closeClickHandler} .scale=${this.scale} .text=${f} title=${f??$}></calcite-action>`:null,D=n`<slot name=${r.headerActionsEnd} @slotchange=${this.handleHeaderActionsEndSlotChange}></slot>`,_=e||H||k||h;return u("header-actions-end",n`<div class=${o({[t.headerActionsEnd]:!0,[t.headerActions]:!0})} .hidden=${!_}>${D}${this.renderMenu()}${H}${k}</div>`)}renderMenu(){let{hasMenuItems:e,messages:a,menuOpen:l,menuFlipPlacements:i,menuPlacement:d}=this;return u("menu",n`<calcite-action-menu .flipPlacements=${i??["top","bottom"]} .hidden=${!e} .label=${a.options} .open=${l} .overlayPositioning=${this.overlayPositioning} .placement=${d}><calcite-action class=${o(t.menuAction)} .icon=${v.menu} .scale=${this.scale} slot=${R.trigger} .text=${a.options}></calcite-action><slot name=${r.headerMenuActions} @slotchange=${this.handleHeaderMenuActionsSlotChange}></slot></calcite-action-menu>`)}renderHeaderNode(){let{hasHeaderContent:e,hasStartActions:a,hasEndActions:l,closable:i,collapsible:d,hasMenuItems:m,hasActionBar:h,hasContentTop:s}=this,p=this.renderHeaderContent(),f=e||!!p||a||l||d||i||m||h||s;return this.showHeaderContent=f,n`<header class=${o(t.header)} .hidden=${!(f||h||s)}><div class=${o({[t.headerContainer]:!0,[t.headerContainerBorderEnd]:h})} .hidden=${!f}>${this.renderHeaderStartActions()}${this.renderHeaderSlottedContent()}${p}${this.renderHeaderActionsEnd()}</div>${this.renderActionBar()}${this.renderContentTop()}</header>`}renderFooterNode(){let{hasFooterEndContent:e,hasFooterStartContent:a,hasFooterContent:l}=this,i=a||e||l;return n`<footer class=${o(t.footer)} .hidden=${!i}><div class=${o(t.footerContent)} .hidden=${!l}><slot name=${r.footer} @slotchange=${this.handleFooterSlotChange}></slot></div><div class=${o(t.footerStart)} .hidden=${l||!a}><slot name=${r.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot></div><div class=${o(t.footerEnd)} .hidden=${l||!e}><slot name=${r.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></div></footer>`}renderContent(){return n`<div class=${o(t.contentWrapper)} .hidden=${this.collapsible&&this.collapsed} @scroll=${this.panelScrollHandler} ${C(this.setPanelScrollEl)}><slot></slot>${this.renderFab()}</div>`}renderContentBottom(){return n`<div class=${o(t.contentBottom)} .hidden=${!this.hasContentBottom}><slot name=${r.contentBottom} @slotchange=${this.contentBottomSlotChangeHandler}></slot></div>`}renderContentTop(){return n`<div class=${o(t.contentTop)} .hidden=${!this.hasContentTop}><slot name=${r.contentTop} @slotchange=${this.contentTopSlotChangeHandler}></slot></div>`}renderFab(){return n`<div class=${o(t.fabContainer)} .hidden=${!this.hasFab}><slot name=${r.fab} @slotchange=${this.handleFabSlotChange}></slot></div>`}render(){let{disabled:e,loading:a,closed:l}=this,i=n`<article .ariaBusy=${a} class=${o(t.container)} .hidden=${l} ${C(this.containerRef)}>${this.renderHeaderNode()}${this.renderContent()}${this.renderContentBottom()}${this.renderFooterNode()}${u("alerts",n`<slot name=${r.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</article>`;return O({disabled:e,children:n`${a?n`<calcite-scrim .loading=${a}></calcite-scrim>`:null}${i}`})}};E("calcite-panel",y);export{y as Panel};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as $}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as $}from"./M3RKWDE5.js";import{a as E}from"./7LUAHEOY.js";import{c as z,d as L,e as M}from"./YR554YXQ.js";import{c as C,e as S,f as A,h as D}from"./LHYFZTCS.js";import{a as x,b as k}from"./ZOYJ4343.js";import{a as I}from"./UVFQM6FI.js";import{a as w}from"./XGPCFFL2.js";import"./BC4ZMTFC.js";import"./DDSPVSLH.js";import"./W4XITGKA.js";import{e as v,u as y}from"./SBARVI35.js";import"./HWDBQK2D.js";import{D as u,E as f,I as g,P as b,g as h,h as c,l as m,o as p}from"./2ECRIOED.js";var F={itemWrapper:"item-wrapper"},q={validationMessage:"segmentedControlValidationMessage"},R=h`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column}.item-wrapper{display:flex;background-color:var(--calcite-color-foreground-1);inline-size:fit-content;outline:1px solid var(--calcite-segmented-control-border-color, var(--calcite-color-border-input));outline-offset:-1px}:host([appearance=outline])>.item-wrapper{background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([layout=vertical])>.item-wrapper{flex-direction:column;align-items:flex-start;align-self:flex-start}:host([width=full])>.item-wrapper{inline-size:100%;min-inline-size:fit-content}:host([width=full])>.item-wrapper ::slotted(calcite-segmented-control-item){flex:1 1 auto}:host([width=full][layout=vertical])>.item-wrapper ::slotted(calcite-segmented-control-item){justify-content:flex-start}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,d=class extends u{constructor(){super(),this.items=[],this.messages=I(),this.focusSetter=w()(this),this.appearance="solid",this.disabled=!1,this.layout="horizontal",this.required=!1,this.scale="m",this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.value=null,this.width="auto",this.calciteSegmentedControlChange=p({cancelable:!1}),this.listen("calciteInternalSegmentedControlItemChange",this.handleSelected),this.listen("keydown",this.handleKeyDown),this.listen("click",this.handleClick)}static{this.properties={appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],labelText:1,messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectedItem:[0,{},{attribute:!1}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:g,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1,width:[3,{},{reflect:!0}]}}static{this.styles=R}async setFocus(e){return this.focusSetter(()=>this.selectedItem||this.items[0],e)}connectedCallback(){super.connectedCallback(),z(this),C(this)}willUpdate(e){(e.has("appearance")&&(this.hasUpdated||this.appearance!=="solid")||e.has("layout")&&(this.hasUpdated||this.layout!=="horizontal")||e.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.handleItemPropChange(),e.has("value")&&(this.hasUpdated||this.value!==null)&&this.valueHandler(this.value),e.has("selectedItem")&&this.handleSelectedItemChange(this.selectedItem,e.get("selectedItem"))}updated(){x(this)}loaded(){A(this,this.value)}disconnectedCallback(){super.disconnectedCallback(),L(this),S(this)}valueHandler(e){let{items:t}=this;t.forEach(a=>a.checked=a.value===e)}handleSelectedItemChange(e,t){if(this.value=e?.value,e===t)return;let{items:a}=this,s=a.filter(i=>i===e).pop();s?this.selectItem(s):a[0]&&(a[0].tabIndex=0)}handleClick(e){this.disabled||e.target.localName==="calcite-segmented-control-item"&&this.selectItem(e.target,!0)}handleSelected(e){e.preventDefault();let t=e.target;t.checked&&this.selectItem(t),e.stopPropagation()}handleKeyDown(e){let t=["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "],{key:a}=e,{el:s,selectedItem:i}=this;if(t.indexOf(a)===-1)return;let l=a;v(s)==="rtl"&&(a==="ArrowRight"&&(l="ArrowLeft"),a==="ArrowLeft"&&(l="ArrowRight"));let{items:n}=this,r=-1;switch(n.forEach((o,U)=>{o===i&&(r=U)}),l){case"ArrowLeft":case"ArrowUp":{e.preventDefault();let o=r<1?n[n.length-1]:n[r-1];this.selectItem(o,!0);return}case"ArrowRight":case"ArrowDown":{e.preventDefault();let o=r===-1?n[1]:n[r+1]||n[0];this.selectItem(o,!0);return}case" ":e.preventDefault(),this.selectItem(e.target,!0);return;default:return}}handleItemPropChange(){let{items:e}=this;e.forEach(t=>{t.appearance=this.appearance,t.layout=this.layout,t.scale=this.scale})}handleSelectedItem(){let{items:e}=this,t=e.filter(a=>a.checked).pop();t?this.selectItem(t):e[0]&&(e[0].tabIndex=0)}async handleDefaultSlotChange(e){let t=y(e).filter(a=>a.matches("calcite-segmented-control-item"));await Promise.all(t.map(a=>a.componentOnReady())),this.items=t,this.handleSelectedItem(),this.handleItemPropChange()}onLabelClick(){this.setFocus()}async selectItem(e,t=!1){if(e===this.selectedItem)return;let{items:a}=this,s=null;a.forEach(i=>{let l=i===e;(l&&!i.checked||!l&&i.checked)&&(i.checked=l),i.tabIndex=l?0:-1,l&&(s=i)}),this.selectedItem=s,s&&t&&(await this.updateComplete,this.calciteSegmentedControlChange.emit(),s.focus())}render(){return this.el.role="radiogroup",c`${this.labelText&&E({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-errormessage=${q.validationMessage} aria-label=${M(this)??m} .ariaInvalid=${this.status==="invalid"} .ariaRequired=${this.required} class=${f(F.itemWrapper)}>${k({disabled:this.disabled,children:c`<slot @slotchange=${this.handleDefaultSlotChange}></slot>${D({component:this})}`})}</div>${this.validationMessage&&this.status==="invalid"?$({icon:this.validationIcon,id:q.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`}};b("calcite-segmented-control",d);export{d as SegmentedControl};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as F,e as G,g as N}from"./LJI5SYGA.js";import{a,b as x,d as m,e as I}from"./V3ZR6RFK.js";import{a as U}from"./BYZPKQRD.js";import{a as T,b as P}from"./NSBK36H4.js";import{a as h}from"./NULQJBCW.js";import{a as O}from"./LH7245HX.js";import{a as M}from"./WOTQIMPZ.js";import"./B5JXPZDV.js";import{a as S}from"./3YZG7MA3.js";import{a as z}from"./CIU4VM7X.js";import{e as R,m as D,t as C}from"./5IPJANUU.js";import"./ZLR2B6GQ.js";import{B as b,C as v,D as B,E as i,P as A,g as H,h as l,l as k,o as s}from"./AUIOWPFN.js";var Q=H`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column}:host([filter-hidden]),:host([closed]){display:none}.wrapper--bordered{border-block-end:1px solid var(--calcite-list-border-color, var(--calcite-color-border-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{box-sizing:border-box;display:flex;flex:1 1 0%;overflow:hidden;background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1))}.container *{box-sizing:border-box}.container--hover:hover{cursor:pointer;background-color:var(--calcite-list-background-color-hover, var(--calcite-color-foreground-2))}.container:active{background-color:var(--calcite-list-background-color-press, var(--calcite-color-foreground-3))}.container--border{position:relative}.container--border:before{position:absolute;inline-size:var(--calcite-border-width-lg);inset-block:0;inset-inline-start:0;background-color:transparent;content:""}.container--border-selected:before{background-color:var(--calcite-list-selection-border-color, var(--calcite-color-brand))}.container--border-selected:focus{box-shadow:inset var(--calcite-border-width-lg) 0 0 0 var(--calcite-list-selection-border-color, var(--calcite-color-brand))}.nested-container{display:none;flex-direction:column;border-width:0px;border-style:solid;border-color:1px solid var(--calcite-list-border-color, var(--calcite-color-border-3));margin-inline-start:var(--calcite-list-spacing-indent, 1.5rem)}.nested-container--expanded{display:flex}.selection-container{display:flex;padding-block:0px;color:var(--calcite-list-icon-color, var(--calcite-color-border-input))}:host(:not([disabled]):not([selected])) .container:hover .selection-container--single{color:var(--calcite-list-icon-color, var(--calcite-color-border-input))}:host([selected]:hover) .selection-container,:host([selected]:hover) .selection-container--single,:host([selected]) .selection-container{color:var(--calcite-list-icon-color, var(--calcite-color-brand))}.content-container-wrapper{display:flex;flex:1 1 auto}.content-container-wrapper--bordered{border-block-end:1px solid var(--calcite-list-border-color, var(--calcite-color-border-3))}.content-container{display:flex;flex:1 1 auto;-webkit-user-select:none;user-select:none;align-items:stretch;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-list-content-text-color, var(--calcite-color-text-2))}.content-container--unavailable{opacity:var(--calcite-opacity-disabled)}.row,.grid-cell{outline-color:transparent}.row{position:relative}.row:focus,.grid-cell:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.content,.custom-content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;line-height:var(--calcite-font-line-height-relative-snug)}.label{color:var(--calcite-list-label-text-color, var(--calcite-color-text-1))}.description{color:var(--calcite-list-description-text-color, var(--calcite-color-text-3))}.icon{align-self:center;color:var(--calcite-list-icon-color, var(--calcite-color-text-3))}.icon:hover,.icon:active{color:var(--calcite-color-text-1)}:host([display-mode=flat][drag-handle]:is([selection-mode=none],[selection-appearance=border])) .drag-container{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s]) .actions-start{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .content-container{gap:var(--calcite-spacing-sm);min-block-size:32px;padding-block:var(--calcite-spacing-xxs);padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .content,:host([scale=s]) .custom-content,:host([scale=s]) .label{font-size:var(--calcite-font-size--2)}:host([scale=s]) .description{font-size:var(--calcite-font-size--3)}:host([scale=s][display-mode=flat]:not([drag-handle])) .container{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=s][display-mode=flat]:not([drag-handle])) .selection-container{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s][display-mode=flat][drag-handle]) .selection-container{padding-inline:var(--calcite-spacing-xxs) var(--calcite-spacing-sm)}:host([scale=s][display-mode=nested]) .selection-container{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s][display-mode=nested][selection-appearance=icon]:not([selection-mode=none]):not([drag-handle])) .container{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=s][display-mode=nested][selection-appearance=icon]:not([selection-mode=none]):not([drag-handle])) .selection-container{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s][display-mode=nested][drag-handle]) .selection-container{padding-inline:var(--calcite-spacing-xxs)}:host([scale=m]) .actions-start{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .content-container{gap:var(--calcite-spacing-sm);min-block-size:40px;padding-block:var(--calcite-spacing-sm);padding-inline-end:var(--calcite-spacing-md)}:host([scale=m]) .content,:host([scale=m]) .custom-content{font-size:var(--calcite-font-size--2)}:host([scale=m]) .label{font-size:var(--calcite-font-size--1)}:host([scale=m]) .description{font-size:var(--calcite-font-size--2)}:host([scale=m][display-mode=flat]) .container{padding-inline-start:var(--calcite-spacing-md)}:host([scale=m][display-mode=flat]) .selection-container{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=m][display-mode=flat][drag-handle]) .container{padding-inline-start:0}:host([scale=m][display-mode=flat][drag-handle]) .selection-container{padding-inline:var(--calcite-spacing-xxs) var(--calcite-spacing-sm)}:host([scale=m][display-mode=nested]) .container{padding-inline-start:var(--calcite-spacing-xxs)}:host([scale=m][display-mode=nested]) .selection-container{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=m][display-mode=nested][selection-appearance=icon]:not([selection-mode=none]):not([drag-handle])) .container{padding-inline-start:var(--calcite-spacing-md)}:host([scale=m][display-mode=nested][drag-handle]) .container{padding-inline-start:0}:host([scale=m][display-mode=nested][drag-handle]) .selection-container{padding-inline:var(--calcite-spacing-xxs)}:host([scale=l]) .actions-start{padding-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .content-container{gap:var(--calcite-spacing-md);min-block-size:56px;padding-block:.625rem;padding-inline-end:var(--calcite-spacing-lg)}:host([scale=l]) .content,:host([scale=l]) .custom-content,:host([scale=l]) .label{font-size:var(--calcite-font-size-0)}:host([scale=l]) .description{font-size:var(--calcite-font-size--1)}:host([scale=l]) .nested-container{margin-inline-start:1.75rem}:host([scale=l][display-mode=flat]) .container{padding-inline-start:var(--calcite-spacing-lg)}:host([scale=l][display-mode=flat]) .selection-container{padding-inline-end:var(--calcite-spacing-md)}:host([scale=l][display-mode=flat][drag-handle]) .container{padding-inline-start:0}:host([scale=l][display-mode=flat][drag-handle]) .selection-container{padding-inline-end:var(--calcite-spacing-md)}:host([scale=l][display-mode=nested]) .container{padding-inline-start:var(--calcite-spacing-xxs)}:host([scale=l][display-mode=nested][drag-handle]) .container{padding-inline-start:0}:host([scale=l][display-mode=nested][selection-appearance=icon]:not([selection-mode=none]):not([drag-handle])) .container{padding-inline-start:var(--calcite-spacing-lg)}.label,.description,.content-bottom{font-weight:var(--calcite-font-weight-normal);word-wrap:break-word;word-break:break-word}:host([selected]) .label{font-weight:var(--calcite-font-weight-medium)}:host([selected]) .icon{color:var(--calcite-list-icon-color, var(--calcite-color-text-1))}:host([selected]) .description{color:var(--calcite-list-description-text-color, var(--calcite-color-text-2))}.content-start{justify-content:flex-start}.content-end{justify-content:flex-end}.content-start,.content-end{flex:1 1 auto}.content-start ::slotted(calcite-icon),.content-end ::slotted(calcite-icon){align-self:center}.content-bottom{display:flex;flex-direction:column}.content-container--has-center-content .content-start,.content-container--has-center-content .content-end{flex:0 1 auto}.expanded-container{color:var(--calcite-list-icon-color, var(--calcite-color-text-3));padding-inline:var(--calcite-spacing-xxs)}:host(:not([disabled])) .expanded-container:hover{color:var(--calcite-list-icon-color, var(--calcite-color-text-1))}.actions-start,.actions-end,.content-start,.content-end,.selection-container,.drag-container,.expanded-container{display:flex;align-items:center}.actions-start calcite-action,.actions-start calcite-sort-handle,.actions-end calcite-action,.actions-end calcite-sort-handle,.content-start calcite-action,.content-start calcite-sort-handle,.content-end calcite-action,.content-end calcite-sort-handle,.selection-container calcite-action,.selection-container calcite-sort-handle,.drag-container calcite-action,.drag-container calcite-sort-handle,.expanded-container calcite-action,.expanded-container calcite-sort-handle{align-self:stretch}.drag-container,.selection-container,.expanded-container{padding-block-end:var(--calcite-spacing-px)}.expanded-container,.selection-container{cursor:pointer}.actions-start,.actions-end{position:relative;padding:0}.actions-start ::slotted(calcite-action),.actions-start ::slotted(calcite-action-menu),.actions-start ::slotted(calcite-sort-handle),.actions-start ::slotted(calcite-dropdown),.actions-end ::slotted(calcite-action),.actions-end ::slotted(calcite-action-menu),.actions-end ::slotted(calcite-sort-handle),.actions-end ::slotted(calcite-dropdown){align-self:stretch;color:inherit}.row:focus .actions-start,.row:focus .actions-end{inset-block:.125rem}.row:focus .actions-start .close,.row:focus .actions-start ::slotted(calcite-action),.row:focus .actions-start ::slotted(calcite-action-menu),.row:focus .actions-start ::slotted(calcite-sort-handle),.row:focus .actions-start ::slotted(calcite-dropdown),.row:focus .actions-end .close,.row:focus .actions-end ::slotted(calcite-action),.row:focus .actions-end ::slotted(calcite-action-menu),.row:focus .actions-end ::slotted(calcite-sort-handle),.row:focus .actions-end ::slotted(calcite-dropdown){block-size:calc(100% - .25rem)}.row:focus:after,.row:focus:before{position:absolute;content:"";inline-size:.125rem;z-index:var(--calcite-z-index-header);background-color:var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));inset-block:0}.row:focus:before{inset-inline-start:0}.row:focus:after{inset-inline-end:0}.container--border:focus:before{display:none}::slotted(calcite-list:empty){border-block-start-width:0px}:host([hidden]){display:none}[hidden]{display:none}`,$=new Map,w=class extends B{constructor(){super(),this.actionsEndRef=b(),this.actionsStartRef=b(),this.containerRef=b(),this.contentRef=b(),this.defaultSlotRef=b(),this.handleGridRef=b(),this.messages=O(),this.focusSetter=M()(this),this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasContentBottom=!1,this.hasContentEnd=!1,this.hasContentStart=!1,this.hasCustomContent=!1,this.level=null,this.expandable=!1,this.active=!1,this.bordered=!1,this.sortDisabled=!1,this.closable=!1,this.closed=!1,this.disabled=!1,this.dragDisabled=!1,this.dragHandle=!1,this.expanded=!1,this.filterHidden=!1,this.interactionMode=null,this.displayMode="flat",this.addToItems=[],this.moveToItems=[],this.scale="m",this.selected=!1,this.selectionAppearance=null,this.selectionMode=null,this.sortHandleOpen=!1,this.unavailable=!1,this.calciteInternalFocusPreviousItem=s({cancelable:!1}),this.calciteInternalListItemActive=s({cancelable:!1}),this.calciteInternalListItemChange=s({cancelable:!1}),this.calciteInternalListItemSelect=s({cancelable:!1}),this.calciteInternalListItemSelectMultiple=s({cancelable:!1}),this.calciteInternalListItemToggle=s({cancelable:!1}),this.calciteListItemClose=s({cancelable:!1}),this.calciteListItemCollapse=s({cancelable:!1}),this.calciteListItemExpand=s({cancelable:!1}),this.calciteListItemSelect=s({cancelable:!1}),this.calciteListItemSortHandleBeforeClose=s({cancelable:!1}),this.calciteListItemSortHandleBeforeOpen=s({cancelable:!1}),this.calciteListItemSortHandleClose=s({cancelable:!1}),this.calciteListItemSortHandleOpen=s({cancelable:!1}),this.calciteListItemToggle=s({cancelable:!1}),this.listen("calciteInternalListItemGroupDefaultSlotChange",this.handleCalciteInternalListDefaultSlotChanges),this.listen("calciteInternalListDefaultSlotChange",this.handleCalciteInternalListDefaultSlotChanges)}static{this.properties={hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentEnd:[16,{},{state:!0}],hasContentStart:[16,{},{state:!0}],hasCustomContent:[16,{},{state:!0}],level:[16,{},{state:!0}],expandable:[16,{},{state:!0}],parentListEl:[16,{},{state:!0}],active:[5,{},{type:Boolean}],bordered:[5,{},{type:Boolean}],sortDisabled:[5,{},{type:Boolean}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],dragDisabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],filterHidden:[7,{},{reflect:!0,type:Boolean}],interactionMode:1,label:1,messageOverrides:[0,{},{attribute:!1}],metadata:[0,{},{attribute:!1}],displayMode:[3,{},{reflect:!0}],addToItems:[0,{},{attribute:!1}],moveToItems:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],setPosition:[9,{},{type:Number}],setSize:[9,{},{type:Number}],sortHandleOpen:[7,{},{reflect:!0,type:Boolean}],unavailable:[7,{},{reflect:!0,type:Boolean}],value:1,iconStart:[3,{type:String},{reflect:!0}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}]}}static{this.styles=[Q,U]}get open(){return this.expanded}set open(e){z.deprecated("property",{name:"open",removalVersion:4,suggested:"expanded"}),this.expanded=e}async setFocus(e){return this.focusSetter(()=>{let{containerRef:t,parentListEl:n}=this,o=$.get(n);if(typeof o=="number"){let c=this.getGridCells()[o];if(c){this.focusCell(c);return}}return{target:t.value,includeContainer:!0,strategy:"focusable"}},e)}connectedCallback(){super.connectedCallback();let{el:e}=this;this.parentListEl=e.closest(F),this.level=N(e)+1,this.setSelectionDefaults()}disconnectedCallback(){super.disconnectedCallback(),$.clear()}willUpdate(e){e.has("active")&&(this.hasUpdated||this.active!==!1)&&this.activeHandler(this.active),e.has("closed")&&(this.hasUpdated||this.closed!==!1)&&this.handleClosedChange(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(),e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.handleSelectedChange(),e.has("sortHandleOpen")&&(this.hasUpdated||this.sortHandleOpen!==!1)&&this.sortHandleOpenHandler(),e.has("displayMode")&&this.hasUpdated&&this.handleExpandableChange(this.defaultSlotRef.value),e.has("expanded")&&this.hasUpdated&&(this.expanded?(this.handleExpandedChange(),this.calciteListItemExpand.emit()):this.calciteListItemCollapse.emit())}updated(){T(this)}activeHandler(e){e||this.focusCell(null,!1)}handleClosedChange(){this.emitCalciteInternalListItemChange()}handleDisabledChange(){this.emitCalciteInternalListItemChange()}handleExpandedChange(){this.emitCalciteInternalListItemToggle()}handleSelectedChange(){this.calciteInternalListItemSelect.emit()}sortHandleOpenHandler(){this.sortHandleEl&&(this.sortHandleEl.open=this.sortHandleOpen)}handleCalciteInternalListDefaultSlotChanges(e){e.stopPropagation(),this.handleExpandableChange(this.defaultSlotRef.value)}setSortHandleEl(e){this.sortHandleEl=e,this.sortHandleOpenHandler()}handleSortHandleBeforeOpen(e){e.stopPropagation(),this.calciteListItemSortHandleBeforeOpen.emit()}handleSortHandleBeforeClose(e){e.stopPropagation(),this.calciteListItemSortHandleBeforeClose.emit()}handleSortHandleClose(e){e.stopPropagation(),this.sortHandleOpen=!1,this.calciteListItemSortHandleClose.emit()}handleSortHandleOpen(e){e.stopPropagation(),this.sortHandleOpen=!0,this.calciteListItemSortHandleOpen.emit()}emitInternalListItemActive(){this.calciteInternalListItemActive.emit()}emitCalciteInternalListItemToggle(){this.calciteInternalListItemToggle.emit()}emitCalciteInternalListItemChange(){this.calciteInternalListItemChange.emit()}handleCloseClick(){this.closed=!0,this.calciteListItemClose.emit()}handleContentSlotChange(e){this.hasCustomContent=C(e)}handleActionsStartSlotChange(e){this.hasActionsStart=C(e)}handleActionsEndSlotChange(e){this.hasActionsEnd=C(e)}handleContentStartSlotChange(e){this.hasContentStart=C(e)}handleContentEndSlotChange(e){this.hasContentEnd=C(e)}handleContentBottomSlotChange(e){this.hasContentBottom=C(e)}setSelectionDefaults(){let{parentListEl:e,selectionMode:t,selectionAppearance:n}=this;e&&(t||(this.selectionMode=e.selectionMode),n||(this.selectionAppearance=e.selectionAppearance))}handleExpandableChange(e){if(!e)return;let t=G(e);t.lists.forEach(n=>{n.displayMode=this.displayMode}),this.expandable=this.displayMode==="nested"&&(t.lists.length>0||t.items.length>0)}handleDefaultSlotChange(e){this.handleExpandableChange(e.target)}handleToggleClick(){this.toggle()}toggle(e=!this.expanded){this.expanded=e,this.calciteListItemToggle.emit()}handleItemClick(e){e.defaultPrevented||this.toggleSelected(e.shiftKey)}async toggleSelected(e){let{selectionMode:t,selected:n}=this;this.disabled||(t==="multiple"||t==="single"?this.selected=!n:t==="single-persist"&&(this.selected=!0),this.calciteInternalListItemSelectMultiple.emit({selectMultiple:e&&t==="multiple"}),await this.updateComplete,this.calciteListItemSelect.emit())}getGridCells(){return[this.handleGridRef.value,this.actionsStartRef.value,this.contentRef.value,this.actionsEndRef.value].filter(e=>e&&!e.hidden)}handleItemKeyDown(e){if(e.defaultPrevented)return;let{key:t}=e,n=e.composedPath(),{containerRef:o,actionsStartRef:{value:c},actionsEndRef:{value:r},expanded:p,expandable:g}=this,d=this.getGridCells(),f=d.findIndex(u=>n.includes(u));if(t==="Enter"&&!n.includes(c)&&!n.includes(r))e.preventDefault(),this.toggleSelected(e.shiftKey);else if(t==="ArrowRight"){e.preventDefault();let u=f+1;f===-1?!p&&g?(this.toggle(!0),this.focusCell(null)):d[0]&&this.focusCell(d[0]):d[f]&&d[u]&&this.focusCell(d[u])}else if(t==="ArrowLeft"){e.preventDefault();let u=f-1;f===-1?(this.focusCell(null),p&&g?this.toggle(!1):this.calciteInternalFocusPreviousItem.emit()):f===0?(this.focusCell(null),o.value.focus()):d[f]&&d[u]&&this.focusCell(d[u])}}focusCellNull(){this.focusCell(null)}setFocusCell(e,t,n){let{parentListEl:o}=this;n&&$.set(o,null);let c=this.getGridCells();c.forEach(r=>{r.removeAttribute("tabindex"),r.removeAttribute(I)}),e&&(e===t?e.tabIndex=0:e.removeAttribute("tabindex"),e.setAttribute(I,""),n&&$.set(o,c.indexOf(e)))}focusCell(e,t=!0){let n=D(e);this.setFocusCell(e,n,t),n?.focus()}renderSelected(){let{selected:e,selectionMode:t,selectionAppearance:n}=this;return t==="none"||n==="border"?null:h("selection-container",l`<div class=${i({[a.selectionContainer]:!0,[a.selectionContainerSingle]:t==="single"||t==="single-persist"})} @click=${this.handleItemClick}><calcite-icon .icon=${e?t==="multiple"?m.selectedMultiple:m.selectedSingle:t==="multiple"?m.unselectedMultiple:m.unselectedSingle} .scale=${S(this.scale)}></calcite-icon></div>`)}renderDragHandle(){let{label:e,dragHandle:t,dragDisabled:n,setPosition:o,setSize:c,moveToItems:r,sortDisabled:p,addToItems:g}=this;return t?h("drag-handle-container",l`<div .ariaLabel=${e} class=${i({[a.dragContainer]:!0,[a.gridCell]:!0})} role=gridcell ${v(this.handleGridRef)}><calcite-sort-handle .addToItems=${g} .disabled=${n} .label=${e} .moveToItems=${r} @calciteSortHandleBeforeClose=${this.handleSortHandleBeforeClose} @calciteSortHandleBeforeOpen=${this.handleSortHandleBeforeOpen} @calciteSortHandleClose=${this.handleSortHandleClose} @calciteSortHandleOpen=${this.handleSortHandleOpen} overlay-positioning=fixed .scale=${this.scale} .setPosition=${o} .setSize=${c} .sortDisabled=${p} ${v(this.setSortHandleEl)}></calcite-sort-handle></div>`):null}renderExpanded(){let{el:e,expanded:t,expandable:n,messages:o,displayMode:c,scale:r}=this;if(c!=="nested")return null;let p=R(e),g=n?t?m.open:p==="rtl"?m.collapsedRTL:m.collapsedLTR:m.blank,d=S(r),f=n?t?o.collapse:o.expand:void 0,u=n?this.handleToggleClick:void 0;return h("expanded-container",l`<div class=${i(a.expandedContainer)} @click=${u} title=${f??k}>${h(g,l`<calcite-icon .icon=${g} .scale=${d}></calcite-icon>`)}</div>`)}renderActionsStart(){let{label:e,hasActionsStart:t}=this;return h("actions-start-container",l`<div .ariaLabel=${e} class=${i({[a.actionsStart]:!0,[a.gridCell]:!0})} .hidden=${!t} role=gridcell ${v(this.actionsStartRef)}><slot name=${x.actionsStart} @slotchange=${this.handleActionsStartSlotChange}></slot></div>`)}renderActionsEnd(){let{label:e,hasActionsEnd:t,closable:n,messages:o}=this;return h("actions-end-container",l`<div .ariaLabel=${e} class=${i({[a.actionsEnd]:!0,[a.gridCell]:!0})} .hidden=${!(t||n)} role=gridcell ${v(this.actionsEndRef)}><slot name=${x.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot>${n?h("close-action",l`<calcite-action appearance=transparent class=${i(a.close)} .icon=${m.close} .label=${o.close} @click=${this.handleCloseClick} .scale=${this.scale} .text=${o.close}></calcite-action>`):null}</div>`)}renderContentStart(){let{hasContentStart:e}=this;return l`<div class=${i(a.contentStart)} .hidden=${!e}><slot name=${x.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot></div>`}renderCustomContent(){let{hasCustomContent:e}=this;return l`<div class=${i(a.customContent)} .hidden=${!e}><slot name=${x.content} @slotchange=${this.handleContentSlotChange}></slot></div>`}renderIconStart(){let{iconStart:e,iconFlipRtl:t,scale:n}=this;return e?h("icon-start",l`<calcite-icon class=${i(a.icon)} .flipRtl=${t==="both"||t==="start"} .icon=${e} .scale=${S(n)}></calcite-icon>`):null}renderIconEnd(){let{iconEnd:e,iconFlipRtl:t,scale:n}=this;return e?h("icon-end",l`<calcite-icon class=${i(a.icon)} .flipRtl=${t==="both"||t==="end"} .icon=${e} .scale=${S(n)}></calcite-icon>`):null}renderContentEnd(){let{hasContentEnd:e}=this;return l`<div class=${i(a.contentEnd)} .hidden=${!e}><slot name=${x.contentEnd} @slotchange=${this.handleContentEndSlotChange}></slot></div>`}renderContentBottom(){let{hasContentBottom:e}=this;return l`<div class=${i(a.contentBottom)} .hidden=${!e}><slot name=${x.contentBottom} @slotchange=${this.handleContentBottomSlotChange}></slot></div>`}renderDefaultContainer(){return l`<div class=${i({[a.nestedContainer]:!0,[a.nestedContainerExpanded]:this.expandable&&this.expanded})}><slot @slotchange=${this.handleDefaultSlotChange} ${v(this.defaultSlotRef)}></slot></div>`}renderContentProperties(){let{label:e,description:t,hasCustomContent:n}=this;return!n&&(e||t)?h("content",l`<div class=${i(a.content)}>${e?h("label",l`<div class=${i(a.label)}>${e}</div>`):null}${t?h("description",l`<div class=${i(a.description)}>${t}</div>`):null}</div>`):null}renderContentContainer(){let{description:e,label:t,selectionMode:n,hasCustomContent:o,unavailable:c}=this,r=o||!!t||!!e,p=[this.renderContentStart(),this.renderCustomContent(),this.renderIconStart(),this.renderContentProperties(),this.renderIconEnd(),this.renderContentEnd()];return h("content-container",l`<div .ariaLabel=${t} class=${i({[a.gridCell]:!0,[a.contentContainer]:!0,[a.contentContainerUnavailable]:c,[a.contentContainerSelectable]:n!=="none",[a.contentContainerHasCenterContent]:r})} @click=${this.handleItemClick} role=gridcell ${v(this.contentRef)}>${p}</div>`)}render(){let{expandable:e,expanded:t,level:n,active:o,label:c,selected:r,selectionAppearance:p,selectionMode:g,interactionMode:d,closed:f,filterHidden:u,bordered:L,disabled:K,hasContentBottom:E}=this,j=L&&E,W=L&&!E,y=g!=="none"&&p==="border",V=y&&r,q=y&&!r,J=d==="interactive"||d==="static"&&g!=="none"&&p==="border";return P({disabled:K,children:l`<div class=${i({[a.wrapper]:!0,[a.wrapperBordered]:j})}><div .ariaExpanded=${e?t:null} .ariaLabel=${c} .ariaLevel=${n} .ariaSelected=${r} class=${i({[a.row]:!0,[a.container]:!0,[a.containerHover]:J,[a.containerBorder]:y,[a.containerBorderSelected]:V,[a.containerBorderUnselected]:q})} .hidden=${f||u} @focus=${this.focusCellNull} @focusin=${this.emitInternalListItemActive} @keydown=${this.handleItemKeyDown} role=row .tabIndex=${o?0:-1} ${v(this.containerRef)}>${this.renderDragHandle()}${this.renderSelected()}${this.renderExpanded()}<div class=${i({[a.contentContainerWrapper]:!0,[a.contentContainerWrapperBordered]:W})}>${this.renderActionsStart()}${this.renderContentContainer()}${this.renderActionsEnd()}</div></div>${this.renderContentBottom()}</div>${this.renderDefaultContainer()}`})}};A("calcite-list-item",w);export{w as ListItem};
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as F,e as G,g as N}from"./OZ3WSD3P.js";import{a,b as x,d as m,e as I}from"./ZVCPJCBM.js";import{a as U}from"./FSBWTOKG.js";import{a as T,b as P}from"./ZOYJ4343.js";import{a as h}from"./ULUKHLQN.js";import{a as O}from"./UVFQM6FI.js";import{a as M}from"./XGPCFFL2.js";import"./BC4ZMTFC.js";import{a as S}from"./DDSPVSLH.js";import{a as z}from"./W4XITGKA.js";import{e as R,m as D,t as C}from"./SBARVI35.js";import"./HWDBQK2D.js";import{B as b,C as v,D as B,E as i,P as A,g as H,h as l,l as k,o as s}from"./2ECRIOED.js";var Q=H`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column}:host([filter-hidden]),:host([closed]){display:none}.wrapper--bordered{border-block-end:1px solid var(--calcite-list-border-color, var(--calcite-color-border-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{box-sizing:border-box;display:flex;flex:1 1 0%;overflow:hidden;background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1))}.container *{box-sizing:border-box}.container--hover:hover{cursor:pointer;background-color:var(--calcite-list-background-color-hover, var(--calcite-color-foreground-2))}.container:active{background-color:var(--calcite-list-background-color-press, var(--calcite-color-foreground-3))}.container--border{position:relative}.container--border:before{position:absolute;inline-size:var(--calcite-border-width-lg);inset-block:0;inset-inline-start:0;background-color:transparent;content:""}.container--border-selected:before{background-color:var(--calcite-list-selection-border-color, var(--calcite-color-brand))}.container--border-selected:focus{box-shadow:inset var(--calcite-border-width-lg) 0 0 0 var(--calcite-list-selection-border-color, var(--calcite-color-brand))}.nested-container{display:none;flex-direction:column;border-width:0px;border-style:solid;border-color:1px solid var(--calcite-list-border-color, var(--calcite-color-border-3));margin-inline-start:var(--calcite-list-spacing-indent, 1.5rem)}.nested-container--expanded{display:flex}.selection-container{display:flex;padding-block:0px;color:var(--calcite-list-icon-color, var(--calcite-color-border-input))}:host(:not([disabled]):not([selected])) .container:hover .selection-container--single{color:var(--calcite-list-icon-color, var(--calcite-color-border-input))}:host([selected]:hover) .selection-container,:host([selected]:hover) .selection-container--single,:host([selected]) .selection-container{color:var(--calcite-list-icon-color, var(--calcite-color-brand))}.content-container-wrapper{display:flex;flex:1 1 auto}.content-container-wrapper--bordered{border-block-end:1px solid var(--calcite-list-border-color, var(--calcite-color-border-3))}.content-container{display:flex;flex:1 1 auto;-webkit-user-select:none;user-select:none;align-items:stretch;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-list-content-text-color, var(--calcite-color-text-2))}.content-container--unavailable{opacity:var(--calcite-opacity-disabled)}.row,.grid-cell{outline-color:transparent}.row{position:relative}.row:focus,.grid-cell:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.content,.custom-content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;line-height:var(--calcite-font-line-height-relative-snug)}.label{color:var(--calcite-list-label-text-color, var(--calcite-color-text-1))}.description{color:var(--calcite-list-description-text-color, var(--calcite-color-text-3))}.icon{align-self:center;color:var(--calcite-list-icon-color, var(--calcite-color-text-3))}.icon:hover,.icon:active{color:var(--calcite-color-text-1)}:host([display-mode=flat][drag-handle]:is([selection-mode=none],[selection-appearance=border])) .drag-container{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s]) .actions-start{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .content-container{gap:var(--calcite-spacing-sm);min-block-size:32px;padding-block:var(--calcite-spacing-xxs);padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .content,:host([scale=s]) .custom-content,:host([scale=s]) .label{font-size:var(--calcite-font-size--2)}:host([scale=s]) .description{font-size:var(--calcite-font-size--3)}:host([scale=s][display-mode=flat]:not([drag-handle])) .container{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=s][display-mode=flat]:not([drag-handle])) .selection-container{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s][display-mode=flat][drag-handle]) .selection-container{padding-inline:var(--calcite-spacing-xxs) var(--calcite-spacing-sm)}:host([scale=s][display-mode=nested]) .selection-container{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s][display-mode=nested][selection-appearance=icon]:not([selection-mode=none]):not([drag-handle])) .container{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=s][display-mode=nested][selection-appearance=icon]:not([selection-mode=none]):not([drag-handle])) .selection-container{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s][display-mode=nested][drag-handle]) .selection-container{padding-inline:var(--calcite-spacing-xxs)}:host([scale=m]) .actions-start{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .content-container{gap:var(--calcite-spacing-sm);min-block-size:40px;padding-block:var(--calcite-spacing-sm);padding-inline-end:var(--calcite-spacing-md)}:host([scale=m]) .content,:host([scale=m]) .custom-content{font-size:var(--calcite-font-size--2)}:host([scale=m]) .label{font-size:var(--calcite-font-size--1)}:host([scale=m]) .description{font-size:var(--calcite-font-size--2)}:host([scale=m][display-mode=flat]) .container{padding-inline-start:var(--calcite-spacing-md)}:host([scale=m][display-mode=flat]) .selection-container{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=m][display-mode=flat][drag-handle]) .container{padding-inline-start:0}:host([scale=m][display-mode=flat][drag-handle]) .selection-container{padding-inline:var(--calcite-spacing-xxs) var(--calcite-spacing-sm)}:host([scale=m][display-mode=nested]) .container{padding-inline-start:var(--calcite-spacing-xxs)}:host([scale=m][display-mode=nested]) .selection-container{padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=m][display-mode=nested][selection-appearance=icon]:not([selection-mode=none]):not([drag-handle])) .container{padding-inline-start:var(--calcite-spacing-md)}:host([scale=m][display-mode=nested][drag-handle]) .container{padding-inline-start:0}:host([scale=m][display-mode=nested][drag-handle]) .selection-container{padding-inline:var(--calcite-spacing-xxs)}:host([scale=l]) .actions-start{padding-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .content-container{gap:var(--calcite-spacing-md);min-block-size:56px;padding-block:.625rem;padding-inline-end:var(--calcite-spacing-lg)}:host([scale=l]) .content,:host([scale=l]) .custom-content,:host([scale=l]) .label{font-size:var(--calcite-font-size-0)}:host([scale=l]) .description{font-size:var(--calcite-font-size--1)}:host([scale=l]) .nested-container{margin-inline-start:1.75rem}:host([scale=l][display-mode=flat]) .container{padding-inline-start:var(--calcite-spacing-lg)}:host([scale=l][display-mode=flat]) .selection-container{padding-inline-end:var(--calcite-spacing-md)}:host([scale=l][display-mode=flat][drag-handle]) .container{padding-inline-start:0}:host([scale=l][display-mode=flat][drag-handle]) .selection-container{padding-inline-end:var(--calcite-spacing-md)}:host([scale=l][display-mode=nested]) .container{padding-inline-start:var(--calcite-spacing-xxs)}:host([scale=l][display-mode=nested][drag-handle]) .container{padding-inline-start:0}:host([scale=l][display-mode=nested][selection-appearance=icon]:not([selection-mode=none]):not([drag-handle])) .container{padding-inline-start:var(--calcite-spacing-lg)}.label,.description,.content-bottom{font-weight:var(--calcite-font-weight-normal);word-wrap:break-word;word-break:break-word}:host([selected]) .label{font-weight:var(--calcite-font-weight-medium)}:host([selected]) .icon{color:var(--calcite-list-icon-color, var(--calcite-color-text-1))}:host([selected]) .description{color:var(--calcite-list-description-text-color, var(--calcite-color-text-2))}.content-start{justify-content:flex-start}.content-end{justify-content:flex-end}.content-start,.content-end{flex:1 1 auto}.content-start ::slotted(calcite-icon),.content-end ::slotted(calcite-icon){align-self:center}.content-bottom{display:flex;flex-direction:column}.content-container--has-center-content .content-start,.content-container--has-center-content .content-end{flex:0 1 auto}.expanded-container{color:var(--calcite-list-icon-color, var(--calcite-color-text-3));padding-inline:var(--calcite-spacing-xxs)}:host(:not([disabled])) .expanded-container:hover{color:var(--calcite-list-icon-color, var(--calcite-color-text-1))}.actions-start,.actions-end,.content-start,.content-end,.selection-container,.drag-container,.expanded-container{display:flex;align-items:center}.actions-start calcite-action,.actions-start calcite-sort-handle,.actions-end calcite-action,.actions-end calcite-sort-handle,.content-start calcite-action,.content-start calcite-sort-handle,.content-end calcite-action,.content-end calcite-sort-handle,.selection-container calcite-action,.selection-container calcite-sort-handle,.drag-container calcite-action,.drag-container calcite-sort-handle,.expanded-container calcite-action,.expanded-container calcite-sort-handle{align-self:stretch}.drag-container,.selection-container,.expanded-container{padding-block-end:var(--calcite-spacing-px)}.expanded-container,.selection-container{cursor:pointer}.actions-start,.actions-end{position:relative;padding:0}.actions-start ::slotted(calcite-action),.actions-start ::slotted(calcite-action-menu),.actions-start ::slotted(calcite-sort-handle),.actions-start ::slotted(calcite-dropdown),.actions-end ::slotted(calcite-action),.actions-end ::slotted(calcite-action-menu),.actions-end ::slotted(calcite-sort-handle),.actions-end ::slotted(calcite-dropdown){align-self:stretch;color:inherit}.row:focus .actions-start,.row:focus .actions-end{inset-block:.125rem}.row:focus .actions-start .close,.row:focus .actions-start ::slotted(calcite-action),.row:focus .actions-start ::slotted(calcite-action-menu),.row:focus .actions-start ::slotted(calcite-sort-handle),.row:focus .actions-start ::slotted(calcite-dropdown),.row:focus .actions-end .close,.row:focus .actions-end ::slotted(calcite-action),.row:focus .actions-end ::slotted(calcite-action-menu),.row:focus .actions-end ::slotted(calcite-sort-handle),.row:focus .actions-end ::slotted(calcite-dropdown){block-size:calc(100% - .25rem)}.row:focus:after,.row:focus:before{position:absolute;content:"";inline-size:.125rem;z-index:var(--calcite-z-index-header);background-color:var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));inset-block:0}.row:focus:before{inset-inline-start:0}.row:focus:after{inset-inline-end:0}.container--border:focus:before{display:none}::slotted(calcite-list:empty){border-block-start-width:0px}:host([hidden]){display:none}[hidden]{display:none}`,$=new Map,w=class extends B{constructor(){super(),this.actionsEndRef=b(),this.actionsStartRef=b(),this.containerRef=b(),this.contentRef=b(),this.defaultSlotRef=b(),this.handleGridRef=b(),this.messages=O(),this.focusSetter=M()(this),this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasContentBottom=!1,this.hasContentEnd=!1,this.hasContentStart=!1,this.hasCustomContent=!1,this.level=null,this.expandable=!1,this.active=!1,this.bordered=!1,this.sortDisabled=!1,this.closable=!1,this.closed=!1,this.disabled=!1,this.dragDisabled=!1,this.dragHandle=!1,this.expanded=!1,this.filterHidden=!1,this.interactionMode=null,this.displayMode="flat",this.addToItems=[],this.moveToItems=[],this.scale="m",this.selected=!1,this.selectionAppearance=null,this.selectionMode=null,this.sortHandleOpen=!1,this.unavailable=!1,this.calciteInternalFocusPreviousItem=s({cancelable:!1}),this.calciteInternalListItemActive=s({cancelable:!1}),this.calciteInternalListItemChange=s({cancelable:!1}),this.calciteInternalListItemSelect=s({cancelable:!1}),this.calciteInternalListItemSelectMultiple=s({cancelable:!1}),this.calciteInternalListItemToggle=s({cancelable:!1}),this.calciteListItemClose=s({cancelable:!1}),this.calciteListItemCollapse=s({cancelable:!1}),this.calciteListItemExpand=s({cancelable:!1}),this.calciteListItemSelect=s({cancelable:!1}),this.calciteListItemSortHandleBeforeClose=s({cancelable:!1}),this.calciteListItemSortHandleBeforeOpen=s({cancelable:!1}),this.calciteListItemSortHandleClose=s({cancelable:!1}),this.calciteListItemSortHandleOpen=s({cancelable:!1}),this.calciteListItemToggle=s({cancelable:!1}),this.listen("calciteInternalListItemGroupDefaultSlotChange",this.handleCalciteInternalListDefaultSlotChanges),this.listen("calciteInternalListDefaultSlotChange",this.handleCalciteInternalListDefaultSlotChanges)}static{this.properties={hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentEnd:[16,{},{state:!0}],hasContentStart:[16,{},{state:!0}],hasCustomContent:[16,{},{state:!0}],level:[16,{},{state:!0}],expandable:[16,{},{state:!0}],parentListEl:[16,{},{state:!0}],active:[5,{},{type:Boolean}],bordered:[5,{},{type:Boolean}],sortDisabled:[5,{},{type:Boolean}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],dragDisabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],filterHidden:[7,{},{reflect:!0,type:Boolean}],interactionMode:1,label:1,messageOverrides:[0,{},{attribute:!1}],metadata:[0,{},{attribute:!1}],displayMode:[3,{},{reflect:!0}],addToItems:[0,{},{attribute:!1}],moveToItems:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],setPosition:[9,{},{type:Number}],setSize:[9,{},{type:Number}],sortHandleOpen:[7,{},{reflect:!0,type:Boolean}],unavailable:[7,{},{reflect:!0,type:Boolean}],value:1,iconStart:[3,{type:String},{reflect:!0}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}]}}static{this.styles=[Q,U]}get open(){return this.expanded}set open(e){z.deprecated("property",{name:"open",removalVersion:4,suggested:"expanded"}),this.expanded=e}async setFocus(e){return this.focusSetter(()=>{let{containerRef:t,parentListEl:n}=this,o=$.get(n);if(typeof o=="number"){let c=this.getGridCells()[o];if(c){this.focusCell(c);return}}return{target:t.value,includeContainer:!0,strategy:"focusable"}},e)}connectedCallback(){super.connectedCallback();let{el:e}=this;this.parentListEl=e.closest(F),this.level=N(e)+1,this.setSelectionDefaults()}disconnectedCallback(){super.disconnectedCallback(),$.clear()}willUpdate(e){e.has("active")&&(this.hasUpdated||this.active!==!1)&&this.activeHandler(this.active),e.has("closed")&&(this.hasUpdated||this.closed!==!1)&&this.handleClosedChange(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(),e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.handleSelectedChange(),e.has("sortHandleOpen")&&(this.hasUpdated||this.sortHandleOpen!==!1)&&this.sortHandleOpenHandler(),e.has("displayMode")&&this.hasUpdated&&this.handleExpandableChange(this.defaultSlotRef.value),e.has("expanded")&&this.hasUpdated&&(this.expanded?(this.handleExpandedChange(),this.calciteListItemExpand.emit()):this.calciteListItemCollapse.emit())}updated(){T(this)}activeHandler(e){e||this.focusCell(null,!1)}handleClosedChange(){this.emitCalciteInternalListItemChange()}handleDisabledChange(){this.emitCalciteInternalListItemChange()}handleExpandedChange(){this.emitCalciteInternalListItemToggle()}handleSelectedChange(){this.calciteInternalListItemSelect.emit()}sortHandleOpenHandler(){this.sortHandleEl&&(this.sortHandleEl.open=this.sortHandleOpen)}handleCalciteInternalListDefaultSlotChanges(e){e.stopPropagation(),this.handleExpandableChange(this.defaultSlotRef.value)}setSortHandleEl(e){this.sortHandleEl=e,this.sortHandleOpenHandler()}handleSortHandleBeforeOpen(e){e.stopPropagation(),this.calciteListItemSortHandleBeforeOpen.emit()}handleSortHandleBeforeClose(e){e.stopPropagation(),this.calciteListItemSortHandleBeforeClose.emit()}handleSortHandleClose(e){e.stopPropagation(),this.sortHandleOpen=!1,this.calciteListItemSortHandleClose.emit()}handleSortHandleOpen(e){e.stopPropagation(),this.sortHandleOpen=!0,this.calciteListItemSortHandleOpen.emit()}emitInternalListItemActive(){this.calciteInternalListItemActive.emit()}emitCalciteInternalListItemToggle(){this.calciteInternalListItemToggle.emit()}emitCalciteInternalListItemChange(){this.calciteInternalListItemChange.emit()}handleCloseClick(){this.closed=!0,this.calciteListItemClose.emit()}handleContentSlotChange(e){this.hasCustomContent=C(e)}handleActionsStartSlotChange(e){this.hasActionsStart=C(e)}handleActionsEndSlotChange(e){this.hasActionsEnd=C(e)}handleContentStartSlotChange(e){this.hasContentStart=C(e)}handleContentEndSlotChange(e){this.hasContentEnd=C(e)}handleContentBottomSlotChange(e){this.hasContentBottom=C(e)}setSelectionDefaults(){let{parentListEl:e,selectionMode:t,selectionAppearance:n}=this;e&&(t||(this.selectionMode=e.selectionMode),n||(this.selectionAppearance=e.selectionAppearance))}handleExpandableChange(e){if(!e)return;let t=G(e);t.lists.forEach(n=>{n.displayMode=this.displayMode}),this.expandable=this.displayMode==="nested"&&(t.lists.length>0||t.items.length>0)}handleDefaultSlotChange(e){this.handleExpandableChange(e.target)}handleToggleClick(){this.toggle()}toggle(e=!this.expanded){this.expanded=e,this.calciteListItemToggle.emit()}handleItemClick(e){e.defaultPrevented||this.toggleSelected(e.shiftKey)}async toggleSelected(e){let{selectionMode:t,selected:n}=this;this.disabled||(t==="multiple"||t==="single"?this.selected=!n:t==="single-persist"&&(this.selected=!0),this.calciteInternalListItemSelectMultiple.emit({selectMultiple:e&&t==="multiple"}),await this.updateComplete,this.calciteListItemSelect.emit())}getGridCells(){return[this.handleGridRef.value,this.actionsStartRef.value,this.contentRef.value,this.actionsEndRef.value].filter(e=>e&&!e.hidden)}handleItemKeyDown(e){if(e.defaultPrevented)return;let{key:t}=e,n=e.composedPath(),{containerRef:o,actionsStartRef:{value:c},actionsEndRef:{value:r},expanded:p,expandable:g}=this,d=this.getGridCells(),f=d.findIndex(u=>n.includes(u));if(t==="Enter"&&!n.includes(c)&&!n.includes(r))e.preventDefault(),this.toggleSelected(e.shiftKey);else if(t==="ArrowRight"){e.preventDefault();let u=f+1;f===-1?!p&&g?(this.toggle(!0),this.focusCell(null)):d[0]&&this.focusCell(d[0]):d[f]&&d[u]&&this.focusCell(d[u])}else if(t==="ArrowLeft"){e.preventDefault();let u=f-1;f===-1?(this.focusCell(null),p&&g?this.toggle(!1):this.calciteInternalFocusPreviousItem.emit()):f===0?(this.focusCell(null),o.value.focus()):d[f]&&d[u]&&this.focusCell(d[u])}}focusCellNull(){this.focusCell(null)}setFocusCell(e,t,n){let{parentListEl:o}=this;n&&$.set(o,null);let c=this.getGridCells();c.forEach(r=>{r.removeAttribute("tabindex"),r.removeAttribute(I)}),e&&(e===t?e.tabIndex=0:e.removeAttribute("tabindex"),e.setAttribute(I,""),n&&$.set(o,c.indexOf(e)))}focusCell(e,t=!0){let n=D(e);this.setFocusCell(e,n,t),n?.focus()}renderSelected(){let{selected:e,selectionMode:t,selectionAppearance:n}=this;return t==="none"||n==="border"?null:h("selection-container",l`<div class=${i({[a.selectionContainer]:!0,[a.selectionContainerSingle]:t==="single"||t==="single-persist"})} @click=${this.handleItemClick}><calcite-icon .icon=${e?t==="multiple"?m.selectedMultiple:m.selectedSingle:t==="multiple"?m.unselectedMultiple:m.unselectedSingle} .scale=${S(this.scale)}></calcite-icon></div>`)}renderDragHandle(){let{label:e,dragHandle:t,dragDisabled:n,setPosition:o,setSize:c,moveToItems:r,sortDisabled:p,addToItems:g}=this;return t?h("drag-handle-container",l`<div .ariaLabel=${e} class=${i({[a.dragContainer]:!0,[a.gridCell]:!0})} role=gridcell ${v(this.handleGridRef)}><calcite-sort-handle .addToItems=${g} .disabled=${n} .label=${e} .moveToItems=${r} @calciteSortHandleBeforeClose=${this.handleSortHandleBeforeClose} @calciteSortHandleBeforeOpen=${this.handleSortHandleBeforeOpen} @calciteSortHandleClose=${this.handleSortHandleClose} @calciteSortHandleOpen=${this.handleSortHandleOpen} overlay-positioning=fixed .scale=${this.scale} .setPosition=${o} .setSize=${c} .sortDisabled=${p} ${v(this.setSortHandleEl)}></calcite-sort-handle></div>`):null}renderExpanded(){let{el:e,expanded:t,expandable:n,messages:o,displayMode:c,scale:r}=this;if(c!=="nested")return null;let p=R(e),g=n?t?m.open:p==="rtl"?m.collapsedRTL:m.collapsedLTR:m.blank,d=S(r),f=n?t?o.collapse:o.expand:void 0,u=n?this.handleToggleClick:void 0;return h("expanded-container",l`<div class=${i(a.expandedContainer)} @click=${u} title=${f??k}>${h(g,l`<calcite-icon .icon=${g} .scale=${d}></calcite-icon>`)}</div>`)}renderActionsStart(){let{label:e,hasActionsStart:t}=this;return h("actions-start-container",l`<div .ariaLabel=${e} class=${i({[a.actionsStart]:!0,[a.gridCell]:!0})} .hidden=${!t} role=gridcell ${v(this.actionsStartRef)}><slot name=${x.actionsStart} @slotchange=${this.handleActionsStartSlotChange}></slot></div>`)}renderActionsEnd(){let{label:e,hasActionsEnd:t,closable:n,messages:o}=this;return h("actions-end-container",l`<div .ariaLabel=${e} class=${i({[a.actionsEnd]:!0,[a.gridCell]:!0})} .hidden=${!(t||n)} role=gridcell ${v(this.actionsEndRef)}><slot name=${x.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot>${n?h("close-action",l`<calcite-action appearance=transparent class=${i(a.close)} .icon=${m.close} .label=${o.close} @click=${this.handleCloseClick} .scale=${this.scale} .text=${o.close}></calcite-action>`):null}</div>`)}renderContentStart(){let{hasContentStart:e}=this;return l`<div class=${i(a.contentStart)} .hidden=${!e}><slot name=${x.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot></div>`}renderCustomContent(){let{hasCustomContent:e}=this;return l`<div class=${i(a.customContent)} .hidden=${!e}><slot name=${x.content} @slotchange=${this.handleContentSlotChange}></slot></div>`}renderIconStart(){let{iconStart:e,iconFlipRtl:t,scale:n}=this;return e?h("icon-start",l`<calcite-icon class=${i(a.icon)} .flipRtl=${t==="both"||t==="start"} .icon=${e} .scale=${S(n)}></calcite-icon>`):null}renderIconEnd(){let{iconEnd:e,iconFlipRtl:t,scale:n}=this;return e?h("icon-end",l`<calcite-icon class=${i(a.icon)} .flipRtl=${t==="both"||t==="end"} .icon=${e} .scale=${S(n)}></calcite-icon>`):null}renderContentEnd(){let{hasContentEnd:e}=this;return l`<div class=${i(a.contentEnd)} .hidden=${!e}><slot name=${x.contentEnd} @slotchange=${this.handleContentEndSlotChange}></slot></div>`}renderContentBottom(){let{hasContentBottom:e}=this;return l`<div class=${i(a.contentBottom)} .hidden=${!e}><slot name=${x.contentBottom} @slotchange=${this.handleContentBottomSlotChange}></slot></div>`}renderDefaultContainer(){return l`<div class=${i({[a.nestedContainer]:!0,[a.nestedContainerExpanded]:this.expandable&&this.expanded})}><slot @slotchange=${this.handleDefaultSlotChange} ${v(this.defaultSlotRef)}></slot></div>`}renderContentProperties(){let{label:e,description:t,hasCustomContent:n}=this;return!n&&(e||t)?h("content",l`<div class=${i(a.content)}>${e?h("label",l`<div class=${i(a.label)}>${e}</div>`):null}${t?h("description",l`<div class=${i(a.description)}>${t}</div>`):null}</div>`):null}renderContentContainer(){let{description:e,label:t,selectionMode:n,hasCustomContent:o,unavailable:c}=this,r=o||!!t||!!e,p=[this.renderContentStart(),this.renderCustomContent(),this.renderIconStart(),this.renderContentProperties(),this.renderIconEnd(),this.renderContentEnd()];return h("content-container",l`<div .ariaLabel=${t} class=${i({[a.gridCell]:!0,[a.contentContainer]:!0,[a.contentContainerUnavailable]:c,[a.contentContainerSelectable]:n!=="none",[a.contentContainerHasCenterContent]:r})} @click=${this.handleItemClick} role=gridcell ${v(this.contentRef)}>${p}</div>`)}render(){let{expandable:e,expanded:t,level:n,active:o,label:c,selected:r,selectionAppearance:p,selectionMode:g,interactionMode:d,closed:f,filterHidden:u,bordered:L,disabled:K,hasContentBottom:E}=this,j=L&&E,W=L&&!E,y=g!=="none"&&p==="border",V=y&&r,q=y&&!r,J=d==="interactive"||d==="static"&&g!=="none"&&p==="border";return P({disabled:K,children:l`<div class=${i({[a.wrapper]:!0,[a.wrapperBordered]:j})}><div .ariaExpanded=${e?t:null} .ariaLabel=${c} .ariaLevel=${n} .ariaSelected=${r} class=${i({[a.row]:!0,[a.container]:!0,[a.containerHover]:J,[a.containerBorder]:y,[a.containerBorderSelected]:V,[a.containerBorderUnselected]:q})} .hidden=${f||u} @focus=${this.focusCellNull} @focusin=${this.emitInternalListItemActive} @keydown=${this.handleItemKeyDown} role=row .tabIndex=${o?0:-1} ${v(this.containerRef)}>${this.renderDragHandle()}${this.renderSelected()}${this.renderExpanded()}<div class=${i({[a.contentContainerWrapper]:!0,[a.contentContainerWrapperBordered]:W})}>${this.renderActionsStart()}${this.renderContentContainer()}${this.renderActionsEnd()}</div></div>${this.renderContentBottom()}</div>${this.renderDefaultContainer()}`})}};A("calcite-list-item",w);export{w as ListItem};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as S,b as g}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as S,b as g}from"./ZOYJ4343.js";import{a as f}from"./XGPCFFL2.js";import"./BC4ZMTFC.js";import"./DDSPVSLH.js";import"./W4XITGKA.js";import{u,y as i}from"./SBARVI35.js";import"./HWDBQK2D.js";import{B as n,C as d,D as h,E as p,P as m,g as l,h as o,o as r}from"./2ECRIOED.js";var I={container:"container"},b=l`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}.container{display:flex;flex-wrap:wrap;gap:var(--calcite-swatch-group-space, var(--calcite-spacing-sm))}:host([scale=s]) .container{gap:var(--calcite-swatch-group-space, var(--calcite-spacing-xs))}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,c=class extends h{constructor(){super(),this.items=[],this.slotRef=n(),this.focusSetter=f()(this),this.disabled=!1,this.scale="m",this.selectedItems=[],this.selectionMode="none",this.calciteSwatchGroupSelect=r({cancelable:!1}),this.listen("calciteInternalSwatchKeyEvent",this.calciteInternalSwatchKeyEventListener),this.listen("calciteSwatchSelect",this.calciteSwatchSelectListener),this.listen("calciteInternalSwatchSelect",this.calciteInternalSwatchSelectListener),this.listen("calciteInternalSyncSelectedSwatches",this.calciteInternalSyncSelectedSwatches)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],label:1,scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=b}async setFocus(e){return this.focusSetter(()=>this.el,e)}willUpdate(e){e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")&&this.updateItems()}updated(){S(this)}calciteInternalSwatchKeyEventListener(e){if(e.composedPath().includes(this.el)){let s=this.items?.filter(t=>!t.disabled);switch(e.detail.key){case"ArrowRight":i(s,e.detail.target,"next");break;case"ArrowLeft":i(s,e.detail.target,"previous");break;case"Home":i(s,e.detail.target,"first");break;case"End":i(s,e.detail.target,"last");break}}e.stopPropagation()}calciteSwatchSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(!0,e.target),e.stopPropagation()}calciteInternalSwatchSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(!1,e.target),e.stopPropagation()}calciteInternalSyncSelectedSwatches(e){e.composedPath().includes(this.el)&&(this.updateSelectedItems(),this.selectionMode==="single"&&this.selectedItems.length>1&&this.setSelectedItems(!1,e.target)),e.stopPropagation()}updateItems(e){let s=this.slotRef.value?.assignedElements({flatten:!0}).filter(t=>t?.matches("calcite-swatch"));this.items=e?u(e):s,!(this.items?.length<1)&&(this.items?.forEach(t=>{t.interactive=!0,t.scale=this.scale,t.selectionMode=this.selectionMode,t.parentSwatchGroup=this.el}),this.setSelectedItems(!1))}updateSelectedItems(){this.selectedItems=this.items?.filter(e=>e.selected)}setSelectedItems(e,s){s&&this.items?.forEach(t=>{let a=s===t;switch(this.selectionMode){case"multiple":a&&(t.selected=!t.selected);break;case"single":t.selected=a?!t.selected:!1;break;case"single-persist":t.selected=!!a;break}}),this.updateSelectedItems(),e&&this.calciteSwatchGroupSelect.emit()}render(){let e=this.selectionMode==="none"||this.selectionMode==="multiple"?"group":"radiogroup",{disabled:s}=this;return g({disabled:s,children:o`<div .ariaLabel=${this.label} class=${p(I.container)} .role=${e}><slot @slotchange=${this.updateItems} ${d(this.slotRef)}></slot></div>`})}};m("calcite-swatch-group",c);export{c as SwatchGroup};
|