@esri/calcite-components 5.1.1-next.6 → 5.1.2-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cdn/{F7RQCNJ4.js → 22ZEEBHY.js} +1 -1
- package/dist/cdn/{YI3ZMHS5.js → 2E5VWP5F.js} +1 -1
- package/dist/cdn/{KB2WIMAL.js → 2IH3A7XP.js} +1 -1
- package/dist/cdn/{MWMTHMMN.js → 35O6UEOL.js} +1 -1
- package/dist/cdn/{WVJUNLFN.js → 3DHLIYTZ.js} +1 -1
- package/dist/cdn/{TQJK5WF5.js → 3LBQM6E5.js} +1 -1
- package/dist/cdn/3OUO73FE.js +2 -0
- package/dist/cdn/3UQ52WEC.js +2 -0
- package/dist/cdn/{F5MS5PBN.js → 46QVRBZQ.js} +1 -1
- package/dist/cdn/{YFUBBPNI.js → 4DEE5DJG.js} +1 -1
- package/dist/cdn/{3BUDIEL3.js → 4ESXF6CD.js} +1 -1
- package/dist/cdn/4GINWH77.js +2 -0
- package/dist/cdn/{7M4ANW77.js → 4GLWWIFB.js} +1 -1
- package/dist/cdn/55B3DHRL.js +2 -0
- package/dist/cdn/{32QFEQZS.js → 5AIYVBUE.js} +1 -1
- package/dist/cdn/{Y44WJ7Z2.js → 5GSQDOTM.js} +1 -1
- package/dist/cdn/{3XFDQDVC.js → 5JMEGSKG.js} +1 -1
- package/dist/cdn/{NAJTDRNC.js → 5P6PZGTL.js} +1 -1
- package/dist/cdn/{3XMNPYNB.js → 5RKV22NY.js} +1 -1
- package/dist/cdn/{WYGNUS2B.js → 5XBX6MS4.js} +1 -1
- package/dist/cdn/{MRRVOAJL.js → 65AE3WDH.js} +1 -1
- package/dist/cdn/{QN4XN67Z.js → 6DMJVTU7.js} +1 -1
- package/dist/cdn/{M2TFDONT.js → 7CPR7ZY6.js} +1 -1
- package/dist/cdn/{Z2GSU7Q2.js → 7LJPLUHO.js} +1 -1
- package/dist/cdn/{VYXKMJSU.js → 7Q7ZAE37.js} +1 -1
- package/dist/cdn/{ROY5CHB3.js → 7S7I3ZX6.js} +1 -1
- package/dist/cdn/{CUSR767T.js → 7TIC7MWH.js} +1 -1
- package/dist/cdn/{ND7KY7GE.js → AE6WIDBA.js} +1 -1
- package/dist/cdn/{U6NA5WAH.js → ANR6MBC5.js} +1 -1
- package/dist/cdn/AQZ7H27V.js +2 -0
- package/dist/cdn/AUY3K2CK.js +2 -0
- package/dist/cdn/{VWQPK5JA.js → B2ZOCHY5.js} +1 -1
- package/dist/cdn/B74ZW4VM.js +2 -0
- package/dist/cdn/{74CLXGQH.js → BSFLNK3G.js} +1 -1
- package/dist/cdn/{JQIHTMWX.js → BX7JMSW4.js} +1 -1
- package/dist/cdn/{45C4ENM6.js → BXUDOEEY.js} +1 -1
- package/dist/cdn/{OXKGEAUB.js → BZW75APA.js} +1 -1
- package/dist/cdn/{QXPWDVC2.js → CCMLFJRX.js} +1 -1
- package/dist/cdn/{C4PPQBLW.js → CHVYZBJP.js} +1 -1
- package/dist/cdn/{5X2CR2NN.js → CQMH7FNX.js} +1 -1
- package/dist/cdn/{REW7C42W.js → D5RB7ITG.js} +1 -1
- package/dist/cdn/{IHGSINVA.js → D7WOEWO3.js} +1 -1
- package/dist/cdn/{ATWAUE4R.js → DAUDD3TU.js} +1 -1
- package/dist/cdn/{I2DNOFC6.js → DH7CVA3S.js} +1 -1
- package/dist/cdn/{5RJTKL4J.js → DIVK7SUE.js} +1 -1
- package/dist/cdn/{CDGEWGDD.js → DUFMSJ4N.js} +1 -1
- package/dist/cdn/{RZR44QGM.js → DVG3NA3H.js} +1 -1
- package/dist/cdn/{RIEKXKB2.js → DZ2ML6RL.js} +1 -1
- package/dist/cdn/{N3YQ6P66.js → E274U5KY.js} +1 -1
- package/dist/cdn/{5SYOHCLD.js → E5KOELX6.js} +1 -1
- package/dist/cdn/{JMKB4CRU.js → EBDWLL34.js} +1 -1
- package/dist/cdn/{YNG6JO67.js → EH5Y2TRK.js} +1 -1
- package/dist/cdn/{WAXTXFBL.js → FA5NVFJF.js} +1 -1
- package/dist/cdn/{5N32D533.js → FPSAFKXP.js} +1 -1
- package/dist/cdn/{D2HPEC7F.js → FQTCAXYA.js} +1 -1
- package/dist/cdn/{E4MGJ47Y.js → FQZZCTBU.js} +1 -1
- package/dist/cdn/{2VL3OCAZ.js → FR5GKBKS.js} +1 -1
- package/dist/cdn/{G62VTWNT.js → FTH3OHTR.js} +1 -1
- package/dist/cdn/{5L5RJCKK.js → GA2SRL7F.js} +1 -1
- package/dist/cdn/{IXQQO6HC.js → GCCKUDLZ.js} +1 -1
- package/dist/cdn/{BTSHRUHD.js → GFJSIQAL.js} +1 -1
- package/dist/cdn/{F3E7QPPC.js → GQV6EPVW.js} +1 -1
- package/dist/cdn/{CUTXFNYN.js → GUYWR6OU.js} +1 -1
- package/dist/cdn/{7YNDWV76.js → GVPG6GL6.js} +1 -1
- package/dist/cdn/{27MK2V4G.js → H5OQUUCS.js} +1 -1
- package/dist/cdn/{5QXKHC54.js → HNFN5XI4.js} +1 -1
- package/dist/cdn/{A332WZ6V.js → HOZFU3MX.js} +1 -1
- package/dist/cdn/{EJUEMY56.js → HS67EN4X.js} +1 -1
- package/dist/cdn/{TMWGSGAP.js → I5FHLUKC.js} +1 -1
- package/dist/cdn/{N6V2UT62.js → IDT2SXTU.js} +1 -1
- package/dist/cdn/{KQGUXAM6.js → IIK67UVJ.js} +1 -1
- package/dist/cdn/{W3N2DKPC.js → J4NTIVMX.js} +1 -1
- package/dist/cdn/{VVJGLEIA.js → JBJREVM7.js} +1 -1
- package/dist/cdn/{773VWCGD.js → JGIGYWX4.js} +1 -1
- package/dist/cdn/{OJO5NPP3.js → JKB2GJ3L.js} +1 -1
- package/dist/cdn/{CZPSEMDH.js → KJ3CYYKH.js} +1 -1
- package/dist/cdn/KRJOJQ44.js +2 -0
- package/dist/cdn/KZAI3CI3.js +2 -0
- package/dist/cdn/{UE4QYUAU.js → LBE47OKH.js} +1 -1
- package/dist/cdn/{SBQVCX2M.js → LELOCWEB.js} +1 -1
- package/dist/cdn/LWJGPTE6.js +2 -0
- package/dist/cdn/{5WFJNGXP.js → M3FXEHEJ.js} +1 -1
- package/dist/cdn/{2MRL4RKW.js → MOFJZGJJ.js} +1 -1
- package/dist/cdn/{Y6WCKCHJ.js → MSMAWAGB.js} +1 -1
- package/dist/cdn/{5JIKOOZ6.js → NFJSGECW.js} +1 -1
- package/dist/cdn/{JDAOWOTY.js → NFSJVK6S.js} +1 -1
- package/dist/cdn/{KJNTF66K.js → NV73Q6Y3.js} +1 -1
- package/dist/cdn/{FKX46Z6K.js → NWCJZZUP.js} +1 -1
- package/dist/cdn/{SGZ3IG5W.js → NXXNNPTZ.js} +1 -1
- package/dist/cdn/OAHYAUPC.js +2 -0
- package/dist/cdn/{RVXZUGJA.js → OJOSD3I3.js} +1 -1
- package/dist/cdn/{MD2UCHOX.js → OKEUM3YZ.js} +1 -1
- package/dist/cdn/{6W4CWLXH.js → ON5SZ43I.js} +1 -1
- package/dist/cdn/{EHS7L663.js → OO4DL46D.js} +1 -1
- package/dist/cdn/{GEKASHNF.js → OXAULX56.js} +1 -1
- package/dist/cdn/{TPML2DIA.js → OYI5HS2H.js} +1 -1
- package/dist/cdn/{3VNZC64N.js → PF2E72GP.js} +1 -1
- package/dist/cdn/{XTGDCTQE.js → PGOMURMZ.js} +1 -1
- package/dist/cdn/{WRQD4O6A.js → PTENM6H3.js} +1 -1
- package/dist/cdn/PZBMDHWQ.js +2 -0
- package/dist/cdn/{72XY7IDN.js → QEET4SDM.js} +1 -1
- package/dist/cdn/QEJPO65G.js +2 -0
- package/dist/cdn/{RDOHAXOA.js → QU4Q7ONO.js} +1 -1
- package/dist/cdn/{TRN7FUFM.js → QUBOBRBE.js} +1 -1
- package/dist/cdn/{YBFI2FQL.js → QUFMR3GW.js} +1 -1
- package/dist/cdn/{6N246L5H.js → R6QHGRLY.js} +1 -1
- package/dist/cdn/{HQHM5NWX.js → RAPPDCJC.js} +1 -1
- package/dist/cdn/{2PEF7GQE.js → RCKGNXG5.js} +1 -1
- package/dist/cdn/{O6PZKJ7R.js → ROD7LNFF.js} +1 -1
- package/dist/cdn/{IRDSJTUK.js → RRG7YZBV.js} +1 -1
- package/dist/cdn/{74UIHSVE.js → RUFVN26P.js} +1 -1
- package/dist/cdn/{BZJYGCDK.js → SNI7EAIB.js} +1 -1
- package/dist/cdn/{6MUZLYOR.js → T3FWIMHQ.js} +1 -1
- package/dist/cdn/{PJSI5N6F.js → THKF3UIU.js} +1 -1
- package/dist/cdn/{ERBKUSSX.js → TLYY3J5P.js} +1 -1
- package/dist/cdn/{CBUNIAKL.js → TMJJBLP6.js} +1 -1
- package/dist/cdn/{KCENWQ6Z.js → TNK2ZMWI.js} +1 -1
- package/dist/cdn/{TFTS26NS.js → TO7Y5WZH.js} +1 -1
- package/dist/cdn/{PW2XM5HR.js → TPA4W766.js} +1 -1
- package/dist/cdn/{NDVX6CLP.js → TPACOVOQ.js} +1 -1
- package/dist/cdn/{SH7DQCS7.js → TQ5ZBZVK.js} +1 -1
- package/dist/cdn/U5CB5AOH.js +2 -0
- package/dist/cdn/{4Q7PL2KY.js → UANLRLKZ.js} +1 -1
- package/dist/cdn/{3NNR2AZU.js → UILRTNAY.js} +1 -1
- package/dist/cdn/{DJMAPSDY.js → UJSGNQNS.js} +1 -1
- package/dist/cdn/{34WAUXUE.js → UMNCTZMZ.js} +1 -1
- package/dist/cdn/{UIFHJ5IO.js → UQADROG7.js} +1 -1
- package/dist/cdn/{ZEEFJOPQ.js → UU6TKA7Y.js} +1 -1
- package/dist/cdn/{4NYY44U4.js → V7X5QMP5.js} +1 -1
- package/dist/cdn/{FE3TGEP7.js → VKOMYCKU.js} +1 -1
- package/dist/cdn/{C4DX6ZIA.js → VL5MBQLU.js} +1 -1
- package/dist/cdn/{OB3Z74X6.js → VLTH6OI4.js} +1 -1
- package/dist/cdn/{FZTLSQJL.js → VTIIXIO2.js} +1 -1
- package/dist/cdn/{SS4J7QES.js → VVLIBG27.js} +1 -1
- package/dist/cdn/{CQYI4Z2Z.js → W776TYSB.js} +1 -1
- package/dist/cdn/{UOSSQPFY.js → WBG5KGIT.js} +1 -1
- package/dist/cdn/{DEQNFOAS.js → WE6LDLUR.js} +1 -1
- package/dist/cdn/{5CBFI2KM.js → WJLDQOSL.js} +1 -1
- package/dist/cdn/{XCNAJ4XA.js → WMAINNWS.js} +1 -1
- package/dist/cdn/{RUNWK23I.js → WMRHH4QJ.js} +1 -1
- package/dist/cdn/WYWBO53V.js +2 -0
- package/dist/cdn/XPV23QFC.js +2 -0
- package/dist/cdn/XXOHZXFG.js +2 -0
- package/dist/cdn/{R4C3WA5S.js → Y7HCDFPY.js} +1 -1
- package/dist/cdn/{ZBN5LXKS.js → YCBJZOJS.js} +1 -1
- package/dist/cdn/{3H6RVKMN.js → YETMUH7M.js} +1 -1
- package/dist/cdn/{WUBPEGFV.js → YPGTWYGF.js} +1 -1
- package/dist/cdn/{FKPCRFUW.js → YVT2GP5U.js} +1 -1
- package/dist/cdn/{6UM5PQBD.js → ZAWIMU5V.js} +1 -1
- package/dist/cdn/{72EJ64LI.js → ZU6VN5T5.js} +1 -1
- package/dist/cdn/assets/icon/buildingIndex16.json +1 -0
- package/dist/cdn/assets/icon/buildingIndex24.json +1 -0
- package/dist/cdn/assets/icon/buildingIndex32.json +1 -0
- package/dist/cdn/assets/icon/fireIndex16.json +1 -0
- package/dist/cdn/assets/icon/fireIndex24.json +1 -0
- package/dist/cdn/assets/icon/fireIndex32.json +1 -0
- package/dist/cdn/assets/icon/geologyIndex16.json +1 -0
- package/dist/cdn/assets/icon/geologyIndex24.json +1 -0
- package/dist/cdn/assets/icon/geologyIndex32.json +1 -0
- package/dist/cdn/assets/icon/snowIndex16.json +1 -0
- package/dist/cdn/assets/icon/snowIndex24.json +1 -0
- package/dist/cdn/assets/icon/snowIndex32.json +1 -0
- package/dist/cdn/assets/icon/soilAdjustedVegetationIndex16.json +1 -0
- package/dist/cdn/assets/icon/soilAdjustedVegetationIndex24.json +1 -0
- package/dist/cdn/assets/icon/soilAdjustedVegetationIndex32.json +1 -0
- package/dist/cdn/assets/icon/vegetationIndex16.json +1 -0
- package/dist/cdn/assets/icon/vegetationIndex24.json +1 -0
- package/dist/cdn/assets/icon/vegetationIndex32.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/openCloseComponent.js +1 -1
- package/dist/chunks/resources10.js +19 -0
- package/dist/chunks/resources11.js +63 -0
- package/dist/chunks/resources5.js +40 -51
- package/dist/chunks/resources6.js +24 -46
- package/dist/chunks/resources7.js +53 -8
- package/dist/chunks/resources8.js +50 -10
- package/dist/chunks/resources9.js +7 -53
- package/dist/chunks/runtime.js +4 -4
- package/dist/chunks/utils.js +9 -15
- package/dist/chunks/utils2.js +59 -6
- package/dist/components/calcite-block/customElement.d.ts +9 -9
- package/dist/components/calcite-block/customElement.js +8 -49
- package/dist/components/calcite-block-group/customElement.js +3 -5
- package/dist/components/calcite-block-section/customElement.d.ts +5 -5
- package/dist/components/calcite-block-section/customElement.js +1 -1
- package/dist/components/calcite-button/customElement.d.ts +8 -8
- package/dist/components/calcite-button/customElement.js +3 -3
- package/dist/components/calcite-checkbox/customElement.js +1 -1
- package/dist/components/calcite-chip/customElement.js +1 -27
- package/dist/components/calcite-color-picker/customElement.d.ts +3 -3
- package/dist/components/calcite-color-picker/customElement.js +23 -20
- package/dist/components/calcite-color-picker-hex-input/customElement.d.ts +1 -1
- package/dist/components/calcite-color-picker-hex-input/customElement.js +4 -4
- package/dist/components/calcite-color-picker-swatch/customElement.d.ts +1 -1
- package/dist/components/calcite-color-picker-swatch/customElement.js +1 -1
- package/dist/components/calcite-combobox/customElement.js +286 -132
- package/dist/components/calcite-combobox-item/customElement.js +1 -1
- package/dist/components/calcite-combobox-item-group/customElement.js +1 -1
- package/dist/components/calcite-dialog/customElement.js +1 -1
- package/dist/components/calcite-dropdown-group/customElement.js +1 -1
- package/dist/components/calcite-dropdown-item/customElement.js +1 -1
- package/dist/components/calcite-flow-item/customElement.d.ts +7 -1
- package/dist/components/calcite-flow-item/customElement.js +1 -1
- package/dist/components/calcite-input/customElement.js +1 -1
- package/dist/components/calcite-input-date-picker/customElement.js +5 -10
- package/dist/components/calcite-input-number/customElement.js +1 -1
- package/dist/components/calcite-input-text/customElement.js +1 -1
- package/dist/components/calcite-input-time-zone/customElement.js +1 -1
- package/dist/components/calcite-list/customElement.js +1 -1
- package/dist/components/calcite-list-item/customElement.js +1 -1
- package/dist/components/calcite-list-item-group/customElement.js +1 -1
- package/dist/components/calcite-panel/customElement.js +1 -1
- package/dist/components/calcite-stack/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +3 -3
- package/dist/cdn/25SUELBY.js +0 -2
- package/dist/cdn/73EQ5TEB.js +0 -2
- package/dist/cdn/7AOQ4FPG.js +0 -2
- package/dist/cdn/C2BK5CUC.js +0 -2
- package/dist/cdn/DAXLXKIY.js +0 -2
- package/dist/cdn/DSQ47C3C.js +0 -2
- package/dist/cdn/DZSC3TJX.js +0 -2
- package/dist/cdn/GYYFBZS2.js +0 -2
- package/dist/cdn/I5HZNPIE.js +0 -2
- package/dist/cdn/OGNY6ZIB.js +0 -2
- package/dist/cdn/OWJYARYV.js +0 -2
- package/dist/cdn/QABVNEOF.js +0 -2
- package/dist/cdn/VCDOY22T.js +0 -2
- package/dist/cdn/VYZ6WAWT.js +0 -2
- package/dist/cdn/Z7NNDJEN.js +0 -2
- /package/dist/cdn/{IYGANVDT.js → 2G2ZTAXT.js} +0 -0
- /package/dist/cdn/{UM6KICQF.js → 5ZULUIQ5.js} +0 -0
- /package/dist/cdn/{MYDCGCGV.js → EWIZKNXQ.js} +0 -0
- /package/dist/cdn/{DCWL5FUH.js → EZQV6OUW.js} +0 -0
- /package/dist/cdn/{R6HABYRV.js → SXELOWJI.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as L}from"./BTSHRUHD.js";import{a as y,b as R}from"./F5MS5PBN.js";import{d as n}from"./DCWL5FUH.js";import{a as A}from"./7YNDWV76.js";import{a as M}from"./3PITBECR.js";import{a as I}from"./7M4ANW77.js";import{a as P}from"./YI3ZMHS5.js";import{a as O}from"./ZBN5LXKS.js";import{a as C}from"./ENDXE7YY.js";import{a as B}from"./IHGSINVA.js";import{a as E}from"./ERBKUSSX.js";import"./WGGFNK4Z.js";import"./YNG6JO67.js";import"./4Q7PL2KY.js";import{D as u}from"./RZR44QGM.js";import"./OAOQ5BXS.js";import{E as k,F as w,G as D,H as b,P as c,S as T,g as S,h as x,p as f}from"./XTGDCTQE.js";var g={dialog:"dialog",panel:"panel",scrim:"scrim",container:"container",containerOpen:"container--open",containerEmbedded:"container--embedded",assistiveText:"assistive-text"},s={actionBar:"action-bar",alerts:"alerts",customContent:"custom-content",contentTop:"content-top",contentBottom:"content-bottom",headerActionsStart:"header-actions-start",headerActionsEnd:"header-actions-end",description:"description",heading:"heading",headerMenuActions:"header-menu-actions",headerContent:"header-content",fab:"fab",footer:"footer",footerStart:"footer-start",footerEnd:"footer-end"},U={x:null,y:null},F={top:null,right:null,bottom:null,left:null},j=S`:host{--calcite-dialog-scrim-background-color: rgba(0, 0, 0, .85);pointer-events:none;inset:0;display:flex;--calcite-internal-dialog-animation-offset: 20px}:host([top-layer-disabled]),:host([top-layer-disabled]) .container,:host([embedded]),.container--embedded{z-index:var(--calcite-z-index-overlay)}:host([embedded][modal]){position:absolute}.container{pointer-events:auto;position:fixed;inset:0;display:flex;block-size:100%;inline-size:100%;align-items:center;justify-content:center;overflow:hidden;color:var(--calcite-color-text-2);opacity:0;visibility:hidden;transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow),opacity var(--calcite-internal-animation-timing-slow) ease-in-out}:host([placement=top]) .container{align-items:flex-start;justify-content:center}:host([placement=top-start]) .container{align-items:flex-start;justify-content:flex-start}:host([placement=top-end]) .container{align-items:flex-start;justify-content:flex-end}:host([placement=bottom]) .container{align-items:flex-end;justify-content:center}:host([placement=bottom-start]) .container{align-items:flex-end;justify-content:flex-start}:host([placement=bottom-end]) .container{align-items:flex-end;justify-content:flex-end}:host(:not([modal])) .container{pointer-events:none}:host([scale=s]){--calcite-internal-dialog-content-padding: var(--calcite-dialog-content-space, var(--calcite-spacing-sm));--calcite-internal-dialog-min-size-x: 198px;--calcite-internal-dialog-min-size-y: 140px}:host([scale=m]){--calcite-internal-dialog-content-padding: var(--calcite-dialog-content-space, var(--calcite-spacing-md));--calcite-internal-dialog-min-size-x: 288px;--calcite-internal-dialog-min-size-y: 180px}:host([scale=l]){--calcite-internal-dialog-content-padding: var(--calcite-dialog-content-space, var(--calcite-spacing-md-plus));--calcite-internal-dialog-min-size-x: 388px;--calcite-internal-dialog-min-size-y: 220px}.scrim{--calcite-scrim-background: var(--calcite-dialog-scrim-background-color, var(--calcite-color-transparent-scrim));--calcite-scrim-background-color: var( --calcite-dialog-scrim-background-color, var(--calcite-color-transparent-scrim) );position:fixed;inset:0;display:flex;overflow-y:hidden;z-index:calc(var(--calcite-z-index) * -1)}:host([top-layer-disabled]) .scrim{z-index:unset}calcite-panel{--calcite-panel-content-space: var(--calcite-dialog-content-space, var(--calcite-internal-dialog-content-padding));--calcite-panel-content-top-space: var( --calcite-dialog-content-top-space, var(--calcite-internal-dialog-content-padding) );--calcite-panel-content-bottom-space: var( --calcite-dialog-content-bottom-space, var(--calcite-internal-dialog-content-padding) );--calcite-panel-footer-space: var(--calcite-dialog-footer-space);--calcite-panel-border-color: var(--calcite-dialog-border-color);--calcite-panel-background-color: var(--calcite-dialog-background-color, var(--calcite-color-foreground-1));--calcite-panel-icon-color: var(--calcite-dialog-icon-color);--calcite-panel-heading-text-color: var(--calcite-dialog-heading-text-color);--calcite-panel-description-text-color: var(--calcite-dialog-description-text-color);--calcite-panel-header-background-color: var(--calcite-dialog-header-background-color);--calcite-panel-header-action-background-color: var(--calcite-dialog-header-action-background-color);--calcite-panel-header-action-background-color-hover: var(--calcite-dialog-header-action-background-color-hover);--calcite-panel-header-action-background-color-press: var(--calcite-dialog-header-action-background-color-press);--calcite-panel-header-action-text-color: var(--calcite-dialog-header-action-text-color);--calcite-panel-header-action-text-color-press: var(--calcite-dialog-header-action-text-color-press);--calcite-panel-footer-background-color: var(--calcite-dialog-footer-background-color);--calcite-panel-space: var(--calcite-dialog-space, var(--calcite-internal-dialog-content-padding));--calcite-panel-header-content-space: var(--calcite-dialog-header-content-space, var(--calcite-dialog-content-space));--calcite-popover-border-color: var(--calcite-dialog-action-menu-border-color, var(--calcite-color-border-1));--calcite-panel-corner-radius: var(--calcite-dialog-corner-radius)}:host([kind=brand]) calcite-panel{--calcite-panel-icon-color: var(--calcite-dialog-icon-color, var(--calcite-color-brand))}:host([kind=danger]) calcite-panel{--calcite-panel-icon-color: var(--calcite-dialog-icon-color, var(--calcite-color-status-danger))}:host([kind=info]) calcite-panel{--calcite-panel-icon-color: var(--calcite-dialog-icon-color, var(--calcite-color-status-info))}:host([kind=success]) calcite-panel{--calcite-panel-icon-color: var(--calcite-dialog-icon-color, var(--calcite-color-status-success))}:host([kind=warning]) calcite-panel{--calcite-panel-icon-color: var(--calcite-dialog-icon-color, var(--calcite-color-status-warning))}::slotted(*){--calcite-panel-background-color: initial}[popover]{padding:0;border:none;background-color:transparent;position:fixed;display:flex}[popover]:popover-open{display:flex}.dialog{pointer-events:none;position:relative;margin:1.5rem;box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;opacity:0;box-shadow:var(--calcite-shadow-md);-webkit-overflow-scrolling:touch;visibility:hidden;transition:inset-block-start var(--calcite-internal-animation-timing-slow) ease-in-out allow-discrete,opacity var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:var(--calcite-dialog-corner-radius, var(--calcite-corner-radius-sm));min-inline-size:var(--calcite-dialog-min-size-x, var(--calcite-internal-dialog-min-size-x));max-inline-size:var(--calcite-dialog-max-size-x, 100%);min-block-size:var(--calcite-dialog-min-size-y, var(--calcite-internal-dialog-min-size-y));max-block-size:var(--calcite-dialog-max-size-y, 100%);--calcite-internal-dialog-hidden-position: calc( var(--calcite-dialog-offset-y, 0px) + var(--calcite-internal-dialog-animation-offset) );--calcite-internal-dialog-shown-position: var(--calcite-dialog-offset-y, 0);inset-inline-start:var(--calcite-dialog-offset-x, 0);inset-block-start:var(--calcite-internal-dialog-hidden-position)}:host([top-layer-disabled]) .dialog,:host([embedded]) .dialog{z-index:var(--calcite-z-index-modal)}:host([menu-open]) .dialog{transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow),opacity var(--calcite-internal-animation-timing-slow) ease-in-out}.panel{visibility:hidden;opacity:0;border-radius:var(--calcite-dialog-corner-radius, var(--calcite-corner-radius-sm));transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow),opacity var(--calcite-internal-animation-timing-slow) ease-in-out}.container--open .panel{visibility:visible;opacity:1;transition:visibility 0ms linear,opacity var(--calcite-internal-animation-timing-slow) ease-in-out}.container--open{opacity:1;visibility:visible;transition-delay:0ms}.container--open .dialog{pointer-events:auto;visibility:visible;opacity:1;transition:inset-block-start var(--calcite-internal-animation-timing-slow) ease-in-out allow-discrete,opacity var(--calcite-internal-animation-timing-slow) ease-in-out;transition-delay:0ms}.width-s{inline-size:auto;inline-size:var(--calcite-dialog-size-x, 32rem);block-size:var(--calcite-dialog-size-y, auto)}@media screen and (max-width:35rem){:host(:not([fullscreen-disabled])) .width-s{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;inset-inline-start:0;inset-block-start:var(--calcite-internal-dialog-animation-offset)}}.width-m{inline-size:var(--calcite-dialog-size-x, 48rem);block-size:var(--calcite-dialog-size-y, auto)}@media screen and (max-width:51rem){:host(:not([fullscreen-disabled])) .width-m{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;inset-inline-start:0;inset-block-start:var(--calcite-internal-dialog-animation-offset)}}.width-l{inline-size:var(--calcite-dialog-size-x, 94rem);block-size:var(--calcite-dialog-size-y, auto)}@media screen and (max-width:97rem){:host(:not([fullscreen-disabled])) .width-l{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;inset-inline-start:0;inset-block-start:var(--calcite-internal-dialog-animation-offset)}}:host([placement=cover]) .dialog{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0}:host([placement=cover]) .panel{border-radius:0}:host([kind]) .panel{border-start-start-radius:0px;border-start-end-radius:0px}:host([kind]) .dialog{overflow:hidden}:host([kind=brand]) .dialog{border-color:var(--calcite-color-brand)}:host([kind=danger]) .dialog{border-color:var(--calcite-dialog-accent-color, var(--calcite-color-status-danger))}:host([kind=info]) .dialog{border-color:var(--calcite-dialog-accent-color, var(--calcite-color-status-info))}:host([kind=success]) .dialog{border-color:var(--calcite-dialog-accent-color, var(--calcite-color-status-success))}:host([kind=warning]) .dialog{border-color:var(--calcite-dialog-accent-color, var(--calcite-color-status-warning))}:host([open]) .dialog{inset-block-start:var(--calcite-internal-dialog-shown-position)}@starting-style{:host([open]) .dialog{inset-block-start:var(--calcite-internal-dialog-hidden-position);opacity:0}}:host([kind=brand][open]) .dialog,:host([kind=danger][open]) .dialog,:host([kind=info][open]) .dialog,:host([kind=success][open]) .dialog,:host([kind=warning][open]) .dialog{border-width:0px;border-block-start-width:4px;border-style:solid}.container--embedded{position:absolute;pointer-events:auto}.container--embedded calcite-scrim{position:absolute}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}`,$=class extends D{constructor(){super(...arguments),this.dragPosition={...U},this.focusTrap=A({triggerProp:"open",focusTrapOptions:{clickOutsideDeactivates:()=>!this.modal||this.embedded,escapeDeactivates:e=>(!e.defaultPrevented&&!this.escapeDisabled&&(this.open=!1,e.preventDefault()),!1)}})(this),this.usePreventDocumentScroll=L()(this),this.mutationObserver=C("mutation",()=>this.handleMutationObserver()),this._open=!1,this.openProp="opened",this.transitionProp="opacity",this.panelRef=k(),this.popoverRef=k(),this.resizePosition={...F},this.transitionEl=null,this.messages=B(),this.focusSetter=E()(this),this.sizeOverride=R({targetElement:()=>({value:this.transitionEl}),getBounds:()=>({inline:{min:this.resizeValues.minInlineSize,max:this.resizeValues.maxInlineSize},block:{min:this.resizeValues.minBlockSize,max:this.resizeValues.maxBlockSize}}),fullscreenDisabled:()=>this.fullscreenDisabled,onResize:e=>{this.resizeValues=e}}),this.topLayer=I({disabledOverride:()=>this.embedded,target:this.popoverRef})(this),this.assistiveText=null,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasFooter=!0,this.opened=!1,this.resizeValues={inlineSize:null,blockSize:null,minInlineSize:null,minBlockSize:null,maxInlineSize:null,maxBlockSize:null},this.closeDisabled=!1,this.dragEnabled=!1,this.embedded=!1,this.escapeDisabled=!1,this.fullscreenDisabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.menuOpen=!1,this.modal=!1,this.focusTrapDisabled=!1,this.outsideCloseDisabled=!1,this.overlayPositioning="absolute",this.placement="center",this.resizable=!1,this.scale="m",this.topLayerDisabled=!1,this.widthScale="m",this.calciteDialogBeforeClose=f({cancelable:!1}),this.calciteDialogBeforeOpen=f({cancelable:!1}),this.calciteDialogClose=f({cancelable:!1}),this.calciteDialogOpen=f({cancelable:!1}),this.calciteDialogScroll=f({cancelable:!1})}static{this.properties={assistiveText:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],hasFooter:[16,{},{state:!0}],opened:[16,{},{state:!0}],resizeValues:[16,{},{state:!0}],beforeClose:[0,{},{attribute:!1}],closeDisabled:[7,{},{reflect:!0,type:Boolean}],description:1,dragEnabled:[7,{},{reflect:!0,type:Boolean}],embedded:[7,{},{reflect:!0,type:Boolean}],escapeDisabled:[7,{},{reflect:!0,type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],fullscreenDisabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],kind:[3,{},{reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],menuOpen:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],modal:[7,{},{reflect:!0,type:Boolean}],focusTrapDisabled:[7,{},{reflect:!0,type:Boolean}],open:[7,{},{reflect:!0,type:Boolean}],outsideCloseDisabled:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],resizable:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=j}get preventDocumentScroll(){return!this.embedded&&this.modal}get open(){return this._open}set open(e){let t=this._open;e!==t&&this.setOpenState(e)}async scrollContentTo(e){await this.panelRef.value?.scrollContentTo(e)}async setFocus(e){return this.focusSetter(()=>this.panelRef.value??this.el,e)}async updateFocusTrapElements(e){this.focusTrap.setExtraContainers(e),this.focusTrap.updateContainerElements()}async updateSize(e){this.updateSizeInternal(e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setUpInteractions()}willUpdate(e){(e.has("open")&&(this.hasUpdated||this.open!==!1)||e.has("placement")&&(this.hasUpdated||this.placement!=="center")||e.has("resizable")&&(this.hasUpdated||this.resizable!==!1)||e.has("dragEnabled")&&(this.hasUpdated||this.dragEnabled!==!1))&&this.setUpInteractions(),(e.has("messages")||e.has("dragEnabled")&&(this.hasUpdated||this.dragEnabled!==!1)||e.has("resizable")&&(this.hasUpdated||this.resizable!==!1))&&this.updateAssistiveText(),e.has("opened")&&(this.hasUpdated||this.opened!==!1)&&this.handleOpenedChange()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.embedded=!1,this.cleanUpInteractions()}focusTrapDisabledOverride(){return!this.modal&&this.focusTrapDisabled}updateAssistiveText(){let{messages:e}=this;this.assistiveText=e&&(this.dragEnabled||this.resizable)?`${this.dragEnabled?e.dragEnabled:""} ${this.resizable?e.resizeEnabled:""}`:null}onBeforeOpen(){this.calciteDialogBeforeOpen.emit(),this.topLayer.show()}onOpen(){this.focusTrapDisabled&&this.setFocus(),this.focusTrap.activate(),this.calciteDialogOpen.emit()}onBeforeClose(){this.calciteDialogBeforeClose.emit()}onClose(){this.focusTrap.deactivate(),this.calciteDialogClose.emit(),this.topLayer.hide()}async setOpenState(e){if(this.beforeClose&&!e)try{await this.beforeClose?.()}catch{return}this._open=e,e&&await this.componentOnReady(),this.opened=e}handleOpenedChange(){P(this)}async triggerInteractModifiers(){let{interaction:e}=this;e&&(await e.reflow({name:"drag"}),await e.reflow({name:"resize"}))}getTransitionRefDOMRect(){return this.transitionEl.getBoundingClientRect()}handleKeyDown(e){let{key:t,shiftKey:i,defaultPrevented:r}=e,{dragEnabled:a,resizable:o,resizePosition:d,dragPosition:l,transitionEl:p}=this;if(!(r||!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t)))switch(t){case"ArrowUp":if(i&&o&&p){let{minBlockSize:m}=window.getComputedStyle(p),h=u(m),v=this.getTransitionRefDOMRect().height;if(v<=h)return;this.updateSizeInternal({block:v-c}),d.bottom-=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()}else a&&(l.y-=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break;case"ArrowDown":i&&o&&p?(this.updateSizeInternal({block:this.getTransitionRefDOMRect().height+c}),d.bottom+=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()):a&&(l.y+=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break;case"ArrowLeft":if(i&&o&&p){let{minInlineSize:m}=window.getComputedStyle(p),h=u(m),v=this.getTransitionRefDOMRect().width;if(v<=h)return;this.updateSizeInternal({inline:v-c}),d.right-=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()}else a&&(l.x-=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break;case"ArrowRight":i&&o&&p?(this.updateSizeInternal({inline:this.getTransitionRefDOMRect().width+c}),d.right+=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()):a&&(l.x+=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break}}updateTransform(){let{dragPosition:{x:e,y:t},resizePosition:i,transitionEl:r,dragEnabled:a,resizable:o}=this;if(!r)return;if(!a&&!o){r.style.transform=null;return}let{top:d,right:l,bottom:p,left:z}=this.getAdjustedResizePosition(i),m=Math.round(e+z+l),h=Math.round(t+d+p);this.transitionEl.style.transform=m||h?`translate(${m}px, ${h}px)`:null}cleanUpInteractions(){this.interaction?.unset(),this.updateSizeInternal({inline:null,block:null}),this.dragPosition={...U},this.resizePosition={...F},this.updateTransform()}async setUpInteractions(){this.cleanUpInteractions();let{el:e,transitionEl:t,resizable:i,dragEnabled:r,resizePosition:a,dragPosition:o}=this;if(!(!t||!this.open)){if((i||r)&&(this.interaction=y(t,{context:e.ownerDocument})),i){await this.el.componentOnReady();let{minInlineSize:d,minBlockSize:l,maxInlineSize:p,maxBlockSize:z}=window.getComputedStyle(this.transitionEl);this.interaction.resizable({edges:{top:!0,right:!0,bottom:!0,left:!0},modifiers:[y.modifiers.restrictSize({min:{width:u(d),height:u(l)},max:{width:u(p)||window.innerWidth,height:u(z)||window.innerHeight}}),y.modifiers.restrict({restriction:"parent"})],listeners:{move:({rect:m,deltaRect:h})=>{h&&(a.top+=h.top,a.right+=h.right,a.bottom+=h.bottom,a.left+=h.left),this.updateSizeInternal({inline:m.width,block:m.height}),this.updateTransform()}}})}r&&this.interaction.draggable({modifiers:[y.modifiers.restrictRect({restriction:"parent"})],listeners:{move:({dx:d,dy:l})=>{o.x+=d,o.y+=l,this.updateTransform()}}})}}getAdjustedResizePosition({top:e,right:t,bottom:i,left:r}){let a=e/2,o=t/2,d=i/2,l=r/2;switch(this.placement){case"top":return{top:e,right:o,bottom:0,left:l};case"top-start":return{top:e,right:0,bottom:0,left:r};case"top-end":return{top:e,right:t,bottom:0,left:0};case"bottom":return{top:0,right:o,bottom:i,left:l};case"bottom-start":return{top:0,right:0,bottom:i,left:r};case"bottom-end":return{top:0,right:t,bottom:i,left:0};default:return{top:a,right:o,bottom:d,left:l}}}setTransitionEl(e){e&&(this.transitionEl=e,this.setUpInteractions())}handleInternalPanelScroll(e){e.target===this.panelRef.value&&(e.stopPropagation(),this.calciteDialogScroll.emit())}handleInternalPanelCloseClick(e){e.target===this.panelRef.value&&(e.preventDefault(),e.stopPropagation(),this.open=!1)}handlePanelKeyDown(e){this.escapeDisabled&&e.key==="Escape"&&!e.defaultPrevented&&e.preventDefault()}handleOutsideClose(){this.outsideCloseDisabled||(this.open=!1)}handleMutationObserver(){this.focusTrap.updateContainerElements()}updateSizeInternal(e){this.transitionEl&&this.sizeOverride.resize(e)}render(){let{assistiveText:e,description:t,heading:i,opened:r,icon:a,iconFlipRtl:o}=this;return x`<div .ariaDescription=${t} .ariaLabel=${i} .ariaModal=${this.modal} class=${b({[g.container]:!0,[g.containerOpen]:r,[g.containerEmbedded]:this.embedded})} .popover=${this.embedded?null:"manual"} role=dialog ${w(this.popoverRef)}>${this.modal?x`<calcite-scrim class=${b(g.scrim)} @click=${this.handleOutsideClose}></calcite-scrim>`:null}<div class=${b({[g.dialog]:!0,[M("width",this.width,this.widthScale)]:!!(this.width||this.widthScale)})} @keydown=${this.handleKeyDown} ${w(this.setTransitionEl)}>${e?O("assistive-text",x`<div aria-live=polite class=${b(g.assistiveText)}>${e}</div>`):null}<slot name=${s.customContent}><calcite-panel class=${b(g.panel)} .closable=${!this.closeDisabled} .description=${t} .heading=${i} .headingLevel=${this.headingLevel} .hidden=${!this.opened} .icon=${a} .iconFlipRtl=${o} .loading=${this.loading} .menuOpen=${this.menuOpen} .messageOverrides=${this.messageOverrides} @calcitePanelClose=${this.handleInternalPanelCloseClick} @calcitePanelScroll=${this.handleInternalPanelScroll} @keydown=${this.handlePanelKeyDown} .overlayPositioning=${this.overlayPositioning} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} ${w(this.panelRef)}><slot name=${s.actionBar} slot=${n.actionBar}></slot><slot name=${s.alerts} slot=${n.alerts}></slot><slot name=${s.headerActionsStart} slot=${n.headerActionsStart}></slot><slot name=${s.headerActionsEnd} slot=${n.headerActionsEnd}></slot><slot name=${s.description} slot=${n.description}></slot><slot name=${s.heading} slot=${n.heading}></slot><slot name=${s.headerContent} slot=${n.headerContent}></slot><slot name=${s.headerMenuActions} slot=${n.headerMenuActions}></slot><slot name=${s.fab} slot=${n.fab}></slot><slot name=${s.contentTop} slot=${n.contentTop}></slot><slot name=${s.contentBottom} slot=${n.contentBottom}></slot><slot name=${s.footerStart} slot=${n.footerStart}></slot><slot name=${s.footer} slot=${n.footer}></slot><slot name=${s.footerEnd} slot=${n.footerEnd}></slot><slot></slot></calcite-panel></slot></div></div>`}};T("calcite-dialog",$);export{$ as Dialog};
|
|
2
|
+
import{a as L}from"./GFJSIQAL.js";import{a as y,b as R}from"./46QVRBZQ.js";import{d as n}from"./EZQV6OUW.js";import{a as A}from"./GVPG6GL6.js";import{a as M}from"./3PITBECR.js";import{a as I}from"./4GLWWIFB.js";import{a as P}from"./2E5VWP5F.js";import{a as O}from"./YCBJZOJS.js";import{a as C}from"./ENDXE7YY.js";import{a as B}from"./D7WOEWO3.js";import{a as E}from"./TLYY3J5P.js";import"./WGGFNK4Z.js";import"./EH5Y2TRK.js";import"./UANLRLKZ.js";import{D as u}from"./DVG3NA3H.js";import"./OAOQ5BXS.js";import{E as k,F as w,G as D,H as b,P as c,S as T,g as S,h as x,p as f}from"./PGOMURMZ.js";var g={dialog:"dialog",panel:"panel",scrim:"scrim",container:"container",containerOpen:"container--open",containerEmbedded:"container--embedded",assistiveText:"assistive-text"},s={actionBar:"action-bar",alerts:"alerts",customContent:"custom-content",contentTop:"content-top",contentBottom:"content-bottom",headerActionsStart:"header-actions-start",headerActionsEnd:"header-actions-end",description:"description",heading:"heading",headerMenuActions:"header-menu-actions",headerContent:"header-content",fab:"fab",footer:"footer",footerStart:"footer-start",footerEnd:"footer-end"},U={x:null,y:null},F={top:null,right:null,bottom:null,left:null},j=S`:host{--calcite-dialog-scrim-background-color: rgba(0, 0, 0, .85);pointer-events:none;inset:0;display:flex;--calcite-internal-dialog-animation-offset: 20px}:host([top-layer-disabled]),:host([top-layer-disabled]) .container,:host([embedded]),.container--embedded{z-index:var(--calcite-z-index-overlay)}:host([embedded][modal]){position:absolute}.container{pointer-events:auto;position:fixed;inset:0;display:flex;block-size:100%;inline-size:100%;align-items:center;justify-content:center;overflow:hidden;color:var(--calcite-color-text-2);opacity:0;visibility:hidden;transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow),opacity var(--calcite-internal-animation-timing-slow) ease-in-out}:host([placement=top]) .container{align-items:flex-start;justify-content:center}:host([placement=top-start]) .container{align-items:flex-start;justify-content:flex-start}:host([placement=top-end]) .container{align-items:flex-start;justify-content:flex-end}:host([placement=bottom]) .container{align-items:flex-end;justify-content:center}:host([placement=bottom-start]) .container{align-items:flex-end;justify-content:flex-start}:host([placement=bottom-end]) .container{align-items:flex-end;justify-content:flex-end}:host(:not([modal])) .container{pointer-events:none}:host([scale=s]){--calcite-internal-dialog-content-padding: var(--calcite-dialog-content-space, var(--calcite-spacing-sm));--calcite-internal-dialog-min-size-x: 198px;--calcite-internal-dialog-min-size-y: 140px}:host([scale=m]){--calcite-internal-dialog-content-padding: var(--calcite-dialog-content-space, var(--calcite-spacing-md));--calcite-internal-dialog-min-size-x: 288px;--calcite-internal-dialog-min-size-y: 180px}:host([scale=l]){--calcite-internal-dialog-content-padding: var(--calcite-dialog-content-space, var(--calcite-spacing-md-plus));--calcite-internal-dialog-min-size-x: 388px;--calcite-internal-dialog-min-size-y: 220px}.scrim{--calcite-scrim-background: var(--calcite-dialog-scrim-background-color, var(--calcite-color-transparent-scrim));--calcite-scrim-background-color: var( --calcite-dialog-scrim-background-color, var(--calcite-color-transparent-scrim) );position:fixed;inset:0;display:flex;overflow-y:hidden;z-index:calc(var(--calcite-z-index) * -1)}:host([top-layer-disabled]) .scrim{z-index:unset}calcite-panel{--calcite-panel-content-space: var(--calcite-dialog-content-space, var(--calcite-internal-dialog-content-padding));--calcite-panel-content-top-space: var( --calcite-dialog-content-top-space, var(--calcite-internal-dialog-content-padding) );--calcite-panel-content-bottom-space: var( --calcite-dialog-content-bottom-space, var(--calcite-internal-dialog-content-padding) );--calcite-panel-footer-space: var(--calcite-dialog-footer-space);--calcite-panel-border-color: var(--calcite-dialog-border-color);--calcite-panel-background-color: var(--calcite-dialog-background-color, var(--calcite-color-foreground-1));--calcite-panel-icon-color: var(--calcite-dialog-icon-color);--calcite-panel-heading-text-color: var(--calcite-dialog-heading-text-color);--calcite-panel-description-text-color: var(--calcite-dialog-description-text-color);--calcite-panel-header-background-color: var(--calcite-dialog-header-background-color);--calcite-panel-header-action-background-color: var(--calcite-dialog-header-action-background-color);--calcite-panel-header-action-background-color-hover: var(--calcite-dialog-header-action-background-color-hover);--calcite-panel-header-action-background-color-press: var(--calcite-dialog-header-action-background-color-press);--calcite-panel-header-action-text-color: var(--calcite-dialog-header-action-text-color);--calcite-panel-header-action-text-color-press: var(--calcite-dialog-header-action-text-color-press);--calcite-panel-footer-background-color: var(--calcite-dialog-footer-background-color);--calcite-panel-space: var(--calcite-dialog-space, var(--calcite-internal-dialog-content-padding));--calcite-panel-header-content-space: var(--calcite-dialog-header-content-space, var(--calcite-dialog-content-space));--calcite-popover-border-color: var(--calcite-dialog-action-menu-border-color, var(--calcite-color-border-1));--calcite-panel-corner-radius: var(--calcite-dialog-corner-radius)}:host([kind=brand]) calcite-panel{--calcite-panel-icon-color: var(--calcite-dialog-icon-color, var(--calcite-color-brand))}:host([kind=danger]) calcite-panel{--calcite-panel-icon-color: var(--calcite-dialog-icon-color, var(--calcite-color-status-danger))}:host([kind=info]) calcite-panel{--calcite-panel-icon-color: var(--calcite-dialog-icon-color, var(--calcite-color-status-info))}:host([kind=success]) calcite-panel{--calcite-panel-icon-color: var(--calcite-dialog-icon-color, var(--calcite-color-status-success))}:host([kind=warning]) calcite-panel{--calcite-panel-icon-color: var(--calcite-dialog-icon-color, var(--calcite-color-status-warning))}::slotted(*){--calcite-panel-background-color: initial}[popover]{padding:0;border:none;background-color:transparent;position:fixed;display:flex}[popover]:popover-open{display:flex}.dialog{pointer-events:none;position:relative;margin:1.5rem;box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;opacity:0;box-shadow:var(--calcite-shadow-md);-webkit-overflow-scrolling:touch;visibility:hidden;transition:inset-block-start var(--calcite-internal-animation-timing-slow) ease-in-out allow-discrete,opacity var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:var(--calcite-dialog-corner-radius, var(--calcite-corner-radius-sm));min-inline-size:var(--calcite-dialog-min-size-x, var(--calcite-internal-dialog-min-size-x));max-inline-size:var(--calcite-dialog-max-size-x, 100%);min-block-size:var(--calcite-dialog-min-size-y, var(--calcite-internal-dialog-min-size-y));max-block-size:var(--calcite-dialog-max-size-y, 100%);--calcite-internal-dialog-hidden-position: calc( var(--calcite-dialog-offset-y, 0px) + var(--calcite-internal-dialog-animation-offset) );--calcite-internal-dialog-shown-position: var(--calcite-dialog-offset-y, 0);inset-inline-start:var(--calcite-dialog-offset-x, 0);inset-block-start:var(--calcite-internal-dialog-hidden-position)}:host([top-layer-disabled]) .dialog,:host([embedded]) .dialog{z-index:var(--calcite-z-index-modal)}:host([menu-open]) .dialog{transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow),opacity var(--calcite-internal-animation-timing-slow) ease-in-out}.panel{visibility:hidden;opacity:0;border-radius:var(--calcite-dialog-corner-radius, var(--calcite-corner-radius-sm));transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow),opacity var(--calcite-internal-animation-timing-slow) ease-in-out}.container--open .panel{visibility:visible;opacity:1;transition:visibility 0ms linear,opacity var(--calcite-internal-animation-timing-slow) ease-in-out}.container--open{opacity:1;visibility:visible;transition-delay:0ms}.container--open .dialog{pointer-events:auto;visibility:visible;opacity:1;transition:inset-block-start var(--calcite-internal-animation-timing-slow) ease-in-out allow-discrete,opacity var(--calcite-internal-animation-timing-slow) ease-in-out;transition-delay:0ms}.width-s{inline-size:auto;inline-size:var(--calcite-dialog-size-x, 32rem);block-size:var(--calcite-dialog-size-y, auto)}@media screen and (max-width:35rem){:host(:not([fullscreen-disabled])) .width-s{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;inset-inline-start:0;inset-block-start:var(--calcite-internal-dialog-animation-offset)}}.width-m{inline-size:var(--calcite-dialog-size-x, 48rem);block-size:var(--calcite-dialog-size-y, auto)}@media screen and (max-width:51rem){:host(:not([fullscreen-disabled])) .width-m{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;inset-inline-start:0;inset-block-start:var(--calcite-internal-dialog-animation-offset)}}.width-l{inline-size:var(--calcite-dialog-size-x, 94rem);block-size:var(--calcite-dialog-size-y, auto)}@media screen and (max-width:97rem){:host(:not([fullscreen-disabled])) .width-l{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;inset-inline-start:0;inset-block-start:var(--calcite-internal-dialog-animation-offset)}}:host([placement=cover]) .dialog{margin:0;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0}:host([placement=cover]) .panel{border-radius:0}:host([kind]) .panel{border-start-start-radius:0px;border-start-end-radius:0px}:host([kind]) .dialog{overflow:hidden}:host([kind=brand]) .dialog{border-color:var(--calcite-color-brand)}:host([kind=danger]) .dialog{border-color:var(--calcite-dialog-accent-color, var(--calcite-color-status-danger))}:host([kind=info]) .dialog{border-color:var(--calcite-dialog-accent-color, var(--calcite-color-status-info))}:host([kind=success]) .dialog{border-color:var(--calcite-dialog-accent-color, var(--calcite-color-status-success))}:host([kind=warning]) .dialog{border-color:var(--calcite-dialog-accent-color, var(--calcite-color-status-warning))}:host([open]) .dialog{inset-block-start:var(--calcite-internal-dialog-shown-position)}@starting-style{:host([open]) .dialog{inset-block-start:var(--calcite-internal-dialog-hidden-position);opacity:0}}:host([kind=brand][open]) .dialog,:host([kind=danger][open]) .dialog,:host([kind=info][open]) .dialog,:host([kind=success][open]) .dialog,:host([kind=warning][open]) .dialog{border-width:0px;border-block-start-width:4px;border-style:solid}.container--embedded{position:absolute;pointer-events:auto}.container--embedded calcite-scrim{position:absolute}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}`,$=class extends D{constructor(){super(...arguments),this.dragPosition={...U},this.focusTrap=A({triggerProp:"open",focusTrapOptions:{clickOutsideDeactivates:()=>!this.modal||this.embedded,escapeDeactivates:e=>(!e.defaultPrevented&&!this.escapeDisabled&&(this.open=!1,e.preventDefault()),!1)}})(this),this.usePreventDocumentScroll=L()(this),this.mutationObserver=C("mutation",()=>this.handleMutationObserver()),this._open=!1,this.openProp="opened",this.transitionProp="opacity",this.panelRef=k(),this.popoverRef=k(),this.resizePosition={...F},this.transitionEl=null,this.messages=B(),this.focusSetter=E()(this),this.sizeOverride=R({targetElement:()=>({value:this.transitionEl}),getBounds:()=>({inline:{min:this.resizeValues.minInlineSize,max:this.resizeValues.maxInlineSize},block:{min:this.resizeValues.minBlockSize,max:this.resizeValues.maxBlockSize}}),fullscreenDisabled:()=>this.fullscreenDisabled,onResize:e=>{this.resizeValues=e}}),this.topLayer=I({disabledOverride:()=>this.embedded,target:this.popoverRef})(this),this.assistiveText=null,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasFooter=!0,this.opened=!1,this.resizeValues={inlineSize:null,blockSize:null,minInlineSize:null,minBlockSize:null,maxInlineSize:null,maxBlockSize:null},this.closeDisabled=!1,this.dragEnabled=!1,this.embedded=!1,this.escapeDisabled=!1,this.fullscreenDisabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.menuOpen=!1,this.modal=!1,this.focusTrapDisabled=!1,this.outsideCloseDisabled=!1,this.overlayPositioning="absolute",this.placement="center",this.resizable=!1,this.scale="m",this.topLayerDisabled=!1,this.widthScale="m",this.calciteDialogBeforeClose=f({cancelable:!1}),this.calciteDialogBeforeOpen=f({cancelable:!1}),this.calciteDialogClose=f({cancelable:!1}),this.calciteDialogOpen=f({cancelable:!1}),this.calciteDialogScroll=f({cancelable:!1})}static{this.properties={assistiveText:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],hasFooter:[16,{},{state:!0}],opened:[16,{},{state:!0}],resizeValues:[16,{},{state:!0}],beforeClose:[0,{},{attribute:!1}],closeDisabled:[7,{},{reflect:!0,type:Boolean}],description:1,dragEnabled:[7,{},{reflect:!0,type:Boolean}],embedded:[7,{},{reflect:!0,type:Boolean}],escapeDisabled:[7,{},{reflect:!0,type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],fullscreenDisabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],kind:[3,{},{reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],menuOpen:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],modal:[7,{},{reflect:!0,type:Boolean}],focusTrapDisabled:[7,{},{reflect:!0,type:Boolean}],open:[7,{},{reflect:!0,type:Boolean}],outsideCloseDisabled:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],resizable:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=j}get preventDocumentScroll(){return!this.embedded&&this.modal}get open(){return this._open}set open(e){let t=this._open;e!==t&&this.setOpenState(e)}async scrollContentTo(e){await this.panelRef.value?.scrollContentTo(e)}async setFocus(e){return this.focusSetter(()=>this.panelRef.value??this.el,e)}async updateFocusTrapElements(e){this.focusTrap.setExtraContainers(e),this.focusTrap.updateContainerElements()}async updateSize(e){this.updateSizeInternal(e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setUpInteractions()}willUpdate(e){(e.has("open")&&(this.hasUpdated||this.open!==!1)||e.has("placement")&&(this.hasUpdated||this.placement!=="center")||e.has("resizable")&&(this.hasUpdated||this.resizable!==!1)||e.has("dragEnabled")&&(this.hasUpdated||this.dragEnabled!==!1))&&this.setUpInteractions(),(e.has("messages")||e.has("dragEnabled")&&(this.hasUpdated||this.dragEnabled!==!1)||e.has("resizable")&&(this.hasUpdated||this.resizable!==!1))&&this.updateAssistiveText(),e.has("opened")&&(this.hasUpdated||this.opened!==!1)&&this.handleOpenedChange()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.embedded=!1,this.cleanUpInteractions()}focusTrapDisabledOverride(){return!this.modal&&this.focusTrapDisabled}updateAssistiveText(){let{messages:e}=this;this.assistiveText=e&&(this.dragEnabled||this.resizable)?`${this.dragEnabled?e.dragEnabled:""} ${this.resizable?e.resizeEnabled:""}`:null}onBeforeOpen(){this.calciteDialogBeforeOpen.emit(),this.topLayer.show()}onOpen(){this.focusTrapDisabled&&this.setFocus(),this.focusTrap.activate(),this.calciteDialogOpen.emit()}onBeforeClose(){this.calciteDialogBeforeClose.emit()}onClose(){this.focusTrap.deactivate(),this.calciteDialogClose.emit(),this.topLayer.hide()}async setOpenState(e){if(this.beforeClose&&!e)try{await this.beforeClose?.()}catch{return}this._open=e,e&&await this.componentOnReady(),this.opened=e}handleOpenedChange(){P(this)}async triggerInteractModifiers(){let{interaction:e}=this;e&&(await e.reflow({name:"drag"}),await e.reflow({name:"resize"}))}getTransitionRefDOMRect(){return this.transitionEl.getBoundingClientRect()}handleKeyDown(e){let{key:t,shiftKey:i,defaultPrevented:r}=e,{dragEnabled:a,resizable:o,resizePosition:d,dragPosition:l,transitionEl:p}=this;if(!(r||!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t)))switch(t){case"ArrowUp":if(i&&o&&p){let{minBlockSize:m}=window.getComputedStyle(p),h=u(m),v=this.getTransitionRefDOMRect().height;if(v<=h)return;this.updateSizeInternal({block:v-c}),d.bottom-=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()}else a&&(l.y-=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break;case"ArrowDown":i&&o&&p?(this.updateSizeInternal({block:this.getTransitionRefDOMRect().height+c}),d.bottom+=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()):a&&(l.y+=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break;case"ArrowLeft":if(i&&o&&p){let{minInlineSize:m}=window.getComputedStyle(p),h=u(m),v=this.getTransitionRefDOMRect().width;if(v<=h)return;this.updateSizeInternal({inline:v-c}),d.right-=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()}else a&&(l.x-=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break;case"ArrowRight":i&&o&&p?(this.updateSizeInternal({inline:this.getTransitionRefDOMRect().width+c}),d.right+=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault()):a&&(l.x+=c,this.updateTransform(),this.triggerInteractModifiers(),e.preventDefault());break}}updateTransform(){let{dragPosition:{x:e,y:t},resizePosition:i,transitionEl:r,dragEnabled:a,resizable:o}=this;if(!r)return;if(!a&&!o){r.style.transform=null;return}let{top:d,right:l,bottom:p,left:z}=this.getAdjustedResizePosition(i),m=Math.round(e+z+l),h=Math.round(t+d+p);this.transitionEl.style.transform=m||h?`translate(${m}px, ${h}px)`:null}cleanUpInteractions(){this.interaction?.unset(),this.updateSizeInternal({inline:null,block:null}),this.dragPosition={...U},this.resizePosition={...F},this.updateTransform()}async setUpInteractions(){this.cleanUpInteractions();let{el:e,transitionEl:t,resizable:i,dragEnabled:r,resizePosition:a,dragPosition:o}=this;if(!(!t||!this.open)){if((i||r)&&(this.interaction=y(t,{context:e.ownerDocument})),i){await this.el.componentOnReady();let{minInlineSize:d,minBlockSize:l,maxInlineSize:p,maxBlockSize:z}=window.getComputedStyle(this.transitionEl);this.interaction.resizable({edges:{top:!0,right:!0,bottom:!0,left:!0},modifiers:[y.modifiers.restrictSize({min:{width:u(d),height:u(l)},max:{width:u(p)||window.innerWidth,height:u(z)||window.innerHeight}}),y.modifiers.restrict({restriction:"parent"})],listeners:{move:({rect:m,deltaRect:h})=>{h&&(a.top+=h.top,a.right+=h.right,a.bottom+=h.bottom,a.left+=h.left),this.updateSizeInternal({inline:m.width,block:m.height}),this.updateTransform()}}})}r&&this.interaction.draggable({modifiers:[y.modifiers.restrictRect({restriction:"parent"})],listeners:{move:({dx:d,dy:l})=>{o.x+=d,o.y+=l,this.updateTransform()}}})}}getAdjustedResizePosition({top:e,right:t,bottom:i,left:r}){let a=e/2,o=t/2,d=i/2,l=r/2;switch(this.placement){case"top":return{top:e,right:o,bottom:0,left:l};case"top-start":return{top:e,right:0,bottom:0,left:r};case"top-end":return{top:e,right:t,bottom:0,left:0};case"bottom":return{top:0,right:o,bottom:i,left:l};case"bottom-start":return{top:0,right:0,bottom:i,left:r};case"bottom-end":return{top:0,right:t,bottom:i,left:0};default:return{top:a,right:o,bottom:d,left:l}}}setTransitionEl(e){e&&(this.transitionEl=e,this.setUpInteractions())}handleInternalPanelScroll(e){e.target===this.panelRef.value&&(e.stopPropagation(),this.calciteDialogScroll.emit())}handleInternalPanelCloseClick(e){e.target===this.panelRef.value&&(e.preventDefault(),e.stopPropagation(),this.open=!1)}handlePanelKeyDown(e){this.escapeDisabled&&e.key==="Escape"&&!e.defaultPrevented&&e.preventDefault()}handleOutsideClose(){this.outsideCloseDisabled||(this.open=!1)}handleMutationObserver(){this.focusTrap.updateContainerElements()}updateSizeInternal(e){this.transitionEl&&this.sizeOverride.resize(e)}render(){let{assistiveText:e,description:t,heading:i,opened:r,icon:a,iconFlipRtl:o}=this;return x`<div .ariaDescription=${t} .ariaLabel=${i} .ariaModal=${this.modal} class=${b({[g.container]:!0,[g.containerOpen]:r,[g.containerEmbedded]:this.embedded})} .popover=${this.embedded?null:"manual"} role=dialog ${w(this.popoverRef)}>${this.modal?x`<calcite-scrim class=${b(g.scrim)} @click=${this.handleOutsideClose}></calcite-scrim>`:null}<div class=${b({[g.dialog]:!0,[M("width",this.width,this.widthScale)]:!!(this.width||this.widthScale)})} @keydown=${this.handleKeyDown} ${w(this.setTransitionEl)}>${e?O("assistive-text",x`<div aria-live=polite class=${b(g.assistiveText)}>${e}</div>`):null}<slot name=${s.customContent}><calcite-panel class=${b(g.panel)} .closable=${!this.closeDisabled} .description=${t} .heading=${i} .headingLevel=${this.headingLevel} .hidden=${!this.opened} .icon=${a} .iconFlipRtl=${o} .loading=${this.loading} .menuOpen=${this.menuOpen} .messageOverrides=${this.messageOverrides} @calcitePanelClose=${this.handleInternalPanelCloseClick} @calcitePanelScroll=${this.handleInternalPanelScroll} @keydown=${this.handlePanelKeyDown} .overlayPositioning=${this.overlayPositioning} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} ${w(this.panelRef)}><slot name=${s.actionBar} slot=${n.actionBar}></slot><slot name=${s.alerts} slot=${n.alerts}></slot><slot name=${s.headerActionsStart} slot=${n.headerActionsStart}></slot><slot name=${s.headerActionsEnd} slot=${n.headerActionsEnd}></slot><slot name=${s.description} slot=${n.description}></slot><slot name=${s.heading} slot=${n.heading}></slot><slot name=${s.headerContent} slot=${n.headerContent}></slot><slot name=${s.headerMenuActions} slot=${n.headerMenuActions}></slot><slot name=${s.fab} slot=${n.fab}></slot><slot name=${s.contentTop} slot=${n.contentTop}></slot><slot name=${s.contentBottom} slot=${n.contentBottom}></slot><slot name=${s.footerStart} slot=${n.footerStart}></slot><slot name=${s.footer} slot=${n.footer}></slot><slot name=${s.footerEnd} slot=${n.footerEnd}></slot><slot></slot></calcite-panel></slot></div></div>`}};T("calcite-dialog",$);export{$ as Dialog};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as y}from"./
|
|
2
|
+
import{a as y}from"./QUFMR3GW.js";import{a as x}from"./R6QHGRLY.js";import{a as v}from"./D7WOEWO3.js";import{a as g}from"./TLYY3J5P.js";import"./WGGFNK4Z.js";import"./EH5Y2TRK.js";import"./UANLRLKZ.js";import"./DVG3NA3H.js";import"./OAOQ5BXS.js";import{E as u,F as b,G as p,H as f,S as m,g as d,h,l as s,p as l}from"./PGOMURMZ.js";var S={handle:"handle",handleSelected:"handle--selected"},k={drag:"drag"},i={itemLabel:"{itemLabel}",position:"{position}",total:"{total}"},C=d`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}.handle{display:flex;align-items:center;justify-content:center;align-self:stretch;border-style:none;outline-color:transparent;color:var(--calcite-handle-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-handle-background-color, transparent);padding-block:.75rem;padding-inline:.25rem;line-height:0}.handle calcite-icon{color:inherit}:host(:not([disabled])) .handle{cursor:move}:host(:not([disabled])) .handle:hover{color:var(--calcite-handle-icon-color-hover, var(--calcite-color-text-1));background-color:var(--calcite-handle-background-color-hover, var(--calcite-color-foreground-2))}:host(:not([disabled])) .handle:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));color:var(--calcite-handle-icon-color-hover, var(--calcite-color-text-1))}:host(:not([disabled])) .handle--selected{color:var(--calcite-handle-icon-color-selected, var(--calcite-color-text-1));background-color:var(--calcite-handle-background-color-selected, var(--calcite-color-foreground-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,o=class extends p{constructor(){super(...arguments),this.handleButtonRef=u(),this.messages=v({blocking:!0}),this.focusSetter=g()(this),this.interactiveContainer=y(this),this.blurUnselectDisabled=!1,this.disabled=!1,this.selected=!1,this.calciteHandleChange=l({cancelable:!1}),this.calciteHandleNudge=l({cancelable:!1}),this.calciteInternalAssistiveTextChange=l({cancelable:!1})}static{this.properties={blurUnselectDisabled:[5,{},{type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[3,{},{reflect:!0}],label:1,messageOverrides:[0,{},{attribute:!1}],selected:[7,{},{reflect:!0,type:Boolean}],setPosition:[9,{},{type:Number}],setSize:[9,{},{type:Number}]}}static{this.styles=C}async setFocus(e){return this.focusSetter(()=>this.handleButtonRef.value,e)}willUpdate(e){(e.has("messages")||e.has("label")||e.has("selected")&&(this.hasUpdated||this.selected!==!1)||e.has("setPosition")||e.has("setSize"))&&this.handleAriaTextChange()}loaded(){x.deprecated("component",{component:this,name:"handle",removalVersion:5,suggested:"sort-handle"})}handleAriaTextChange(){let e=this.getAriaText("live");e&&this.calciteInternalAssistiveTextChange.emit({message:e})}getTooltip(){let{label:e,messages:t}=this;return t?e?t.dragHandle.replace(i.itemLabel,e):t.dragHandleUntitled:""}getAriaText(e){let{setPosition:t,setSize:r,label:c,messages:a,selected:n}=this;return!a||!c||typeof r!="number"||typeof t!="number"?null:(e==="label"?n?a.dragHandleChange:a.dragHandleIdle:n?a.dragHandleActive:a.dragHandleCommit).replace(i.position,t.toString()).replace(i.itemLabel,c).replace(i.total,r.toString())}handleKeyDown(e){if(!this.disabled)switch(e.key){case" ":this.selected=!this.selected,this.calciteHandleChange.emit(),e.preventDefault();break;case"ArrowUp":if(!this.selected)return;e.preventDefault(),this.calciteHandleNudge.emit({direction:"up"});break;case"ArrowDown":if(!this.selected)return;e.preventDefault(),this.calciteHandleNudge.emit({direction:"down"});break}}handleBlur(){this.blurUnselectDisabled||this.disabled||this.selected&&(this.selected=!1,this.calciteHandleChange.emit())}render(){return this.interactiveContainer({disabled:this.disabled,children:h`<span .ariaChecked=${this.disabled?null:this.selected} .ariaDisabled=${this.disabled?this.disabled:null} .ariaLabel=${this.disabled?null:this.getAriaText("label")} class=${f({[S.handle]:!0,[S.handleSelected]:!this.disabled&&this.selected})} @blur=${this.handleBlur} @keydown=${this.handleKeyDown} role=radio tabindex=${(this.disabled?null:0)??s} title=${this.getTooltip()??s} ${b(this.handleButtonRef)}><calcite-icon .icon=${k.drag} scale=s></calcite-icon></span>`})}};m("calcite-handle",o);export{o as Handle};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{b as r}from"./
|
|
2
|
+
import{b as r}from"./EH5Y2TRK.js";var n=0,u="",f=()=>{function t(){n++,n===1&&(u=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden")}function o(){n--,n===0&&(document.documentElement.style.overflow=u)}return r((e,l)=>{l.onConnected(()=>{e.opened&&e.preventDocumentScroll&&t()}),l.onUpdate(d=>{e.hasUpdated&&(d.has("opened")&&e.preventDocumentScroll?e.opened?t():o():d.has("preventDocumentScroll")&&e.opened&&(e.preventDocumentScroll?t():o()))}),l.onDisconnected(()=>{e.opened&&e.preventDocumentScroll&&o()})})};export{f as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as I,b as P}from"./F5MS5PBN.js";import{a as B}from"./3PITBECR.js";import{a as f}from"./ZBN5LXKS.js";import{a as y}from"./WKR7R7AZ.js";import{a as L}from"./IHGSINVA.js";import{e as U}from"./YNG6JO67.js";import"./4Q7PL2KY.js";import{D as m,t as E,u as O}from"./RZR44QGM.js";import"./OAOQ5BXS.js";import{E as k,F as S,G as V,H as s,M as p,O as A,P as D,S as _,g,h as d,p as b}from"./XTGDCTQE.js";var K=g`.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-right{animation-name:in-right}.calcite-animate__in-left{animation-name:in-left}.calcite-animate__in-scale{animation-name:in-scale}@keyframes in{0%{opacity:0}to{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0,-5px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0,5px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-right{0%{opacity:0;transform:translate3D(-5px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-left{0%{opacity:0;transform:translate3D(5px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(.95,.95,1)}to{opacity:1;transform:scaleZ(1)}}`,o={container:"container",actionBarContainer:"action-bar-container",contentContainer:"content-container",content:"content",contentHeader:"content__header",contentBody:"content__body",contentOverlay:"content--overlay",floatAll:"float-all",floatContent:"float--content",resizeHandle:"resize-handle",resizeHandleBar:"resize-handle-bar"},M={actionBar:"action-bar",header:"header"},N={dragVertical:"drag-resize-vertical",dragHorizontal:"drag-resize-horizontal"},T=g`:host{pointer-events:none;position:relative;display:flex;flex:0 1 auto;align-items:stretch;z-index:var(--calcite-shell-panel-z-index, var(--calcite-z-index));--calcite-shell-panel-max-height: unset;--calcite-internal-shell-panel-shadow-block-start: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-block-end: 0 -4px 8px -1px rgba(0, 0, 0, .08), 0 -2px 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-start: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-end: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04)}.calcite--rtl.content--overlay{--calcite-internal-shell-panel-shadow-inline-start: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-end: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04)}:host([layout=vertical]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index) + 1))}:host([layout=vertical][display-mode=overlay]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index-header) + 1))}:host([layout=vertical][display-mode=float-all]) .content{flex:2}:host([layout=vertical]:not([display-mode=float-all])) .width-s{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 300px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical][display-mode=float-all]) .width-s{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical]:not([display-mode=float-all])) .width-m{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 420px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical][display-mode=float-all]) .width-m{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical]:not([display-mode=float-all])) .width-l{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 680px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px)}:host([layout=vertical][display-mode=float-all]) .width-l{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px)}:host([layout=horizontal]) .content{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 30vh)}:host([layout=horizontal]) .height-s{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 20vh)}:host([layout=horizontal]) .height-l{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 40vh)}:host([display-mode=float-all][height=s]),:host([display-mode=float-all][height-scale=s]) .content{min-block-size:var(--calcite-shell-panel-height, 20vh)}:host([display-mode=float-all][height=m]),:host([display-mode=float-all][height-scale=m]) .content{min-block-size:var(--calcite-shell-panel-height, 30vh)}:host([display-mode=float-all][height=l]),:host([display-mode=float-all][height-scale=l]) .content{min-block-size:var(--calcite-shell-panel-height, 40vh)}.container{pointer-events:none;box-sizing:border-box;display:flex;block-size:100%;flex:1 1 auto;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-shell-panel-text-color, var(--calcite-color-text-2))}.container *{box-sizing:border-box}.container.float-all{margin-block:var(--calcite-spacing-sm);margin-inline:var(--calcite-spacing-sm)}.float-all{max-block-size:var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem) );box-shadow:var(--calcite-shell-panel-shadow, var(--calcite-shadow-sm));border-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));overflow:hidden}:host([layout=vertical][position=start]) .float-all{border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-shell-panel-border-color, var(--calcite-color-border-3))}:host([layout=vertical][position=end]) .float-all{border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-shell-panel-border-color, var(--calcite-color-border-3)))}:host([layout=horizontal]) .float-all{border-inline:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-shell-panel-border-color, var(--calcite-color-border-3)))}:host([layout=horizontal]) .container{block-size:auto;inline-size:100%;flex-direction:column}.resize-handle{position:absolute;box-sizing:border-box;display:flex;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center;outline:2px solid transparent;outline-offset:2px;--calcite-internal-shell-panel-resize-handle-offset: calc( (var(--calcite-size-fixed-xxl) - var(--calcite-size-fixed-sm-plus)) / 2 * -1 );z-index:var(--calcite-z-index-header)}.resize-handle:active .resize-handle-bar,.resize-handle:hover .resize-handle-bar{color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-text-1));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-foreground-3))}.resize-handle-bar{pointer-events:none;display:flex;align-items:center;justify-content:center;color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-background))}.resize-handle:focus .resize-handle-bar{outline-color:transparent;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)))}:host([position=start][layout=vertical]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-end:var(--calcite-internal-shell-panel-resize-handle-offset);block-size:100%}:host([position=start][layout=vertical]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start][layout=vertical]):host([display-mode^=float]) .resize-handle-bar{border-start-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=end][layout=vertical]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-start:var(--calcite-internal-shell-panel-resize-handle-offset);block-size:100%}:host([position=end][layout=vertical]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=end][layout=vertical]):host([display-mode^=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=start][layout=horizontal]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-end:var(--calcite-internal-shell-panel-resize-handle-offset)}:host([position=start][layout=horizontal]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start][layout=horizontal]):host([display-mode^=float]) .resize-handle-bar{border-end-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=end][layout=horizontal]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-start:var(--calcite-internal-shell-panel-resize-handle-offset)}:host([position=end][layout=horizontal]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=end][layout=horizontal]):host([display-mode^=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-start-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%;inline-size:100%;flex:1 1 auto;max-block-size:unset;max-inline-size:unset}.action-bar-container{pointer-events:auto;box-sizing:border-box;display:flex;flex:1 1 auto}.content-container{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;align-items:stretch;align-self:stretch}:host([layout=horizontal]) .action-bar-container,:host([layout=horizontal]) .content-container{flex-direction:column}.content{pointer-events:auto;position:relative;box-sizing:border-box;display:flex;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;align-self:stretch;padding:0;background-color:var(--calcite-shell-panel-background-color, var(--calcite-color-background));transition:max-block-size var(--calcite-animation-timing),max-inline-size var(--calcite-animation-timing)}:host([layout=vertical]:not([display-mode=float-all])) .content{inline-size:var(--calcite-internal-shell-panel-width);max-inline-size:var(--calcite-internal-shell-panel-max-width);min-inline-size:var(--calcite-internal-shell-panel-min-width)}:host([layout=vertical][display-mode=float-all]) .content{inline-size:var(--calcite-internal-shell-panel-width);min-inline-size:var(--calcite-internal-shell-panel-min-width)}:host([layout=horizontal]) .content{block-size:var(--calcite-internal-shell-panel-height);max-block-size:var(--calcite-internal-shell-panel-max-height);min-block-size:var(--calcite-internal-shell-panel-min-height)}:host([resizable][layout=vertical][position=start]) .content{padding-inline-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=vertical][position=end]) .content{padding-inline-start:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=horizontal][position=start]) .content{padding-block-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=horizontal][position=end]) .content{padding-block-start:var(--calcite-size-fixed-sm-plus)}.content__header{display:flex;flex:0 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch}.content__body{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.content--overlay{position:absolute;box-shadow:var(--calcite-shell-panel-shadow, var(--calcite-shadow-sm))}:host([layout=vertical]) .content--overlay{inset-block-start:0px;block-size:100%}:host([layout=horizontal]) .content--overlay{inset-inline-start:0px;inline-size:100%}:host([layout=vertical][position=start]) .content--overlay{inset-inline-start:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-inline-start)}:host([layout=vertical][position=end]) .content--overlay{inset-inline-end:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-inline-end)}:host([layout=horizontal][position=start]) .content--overlay{inset-block-start:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-block-start)}:host([layout=horizontal][position=end]) .content--overlay{inset-block-end:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-block-end)}.float--content{margin-block-end:auto;block-size:auto;overflow:hidden;box-shadow:var(--calcite-shell-panel-shadow, var(--calcite-shadow-sm));border-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));margin-inline:var(--calcite-spacing-sm);margin-block-start:var(--calcite-spacing-sm);max-block-size:var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem) )}.float--content ::slotted(calcite-panel),.float--content ::slotted(calcite-flow){max-block-size:unset}:host([layout=horizontal]) .float--content{margin-block:var(--calcite-spacing-sm)}:host([position=start]) .float--content ::slotted(calcite-panel),:host([position=start]) .float--content ::slotted(calcite-flow),:host([position=end]) .float--content ::slotted(calcite-panel),:host([position=end]) .float--content ::slotted(calcite-flow){border-style:none}slot[name=action-bar]::slotted(calcite-action-bar),.content ::slotted(calcite-flow),.content ::slotted(calcite-panel:not([closed])){border:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start]:not([slot=panel-end])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-flow),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-panel),:host([position=end][slot=panel-start]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end][slot=panel-start]) .content ::slotted(calcite-flow),:host([position=end][slot=panel-start]) .content ::slotted(calcite-panel){border-inline-start:none}:host([resizable][layout=vertical]) .content ::slotted(calcite-flow),:host([resizable][layout=vertical]) .content ::slotted(calcite-panel){border-inline-start:none;border-inline-end:none}:host([resizable][layout=horizontal]) .content ::slotted(calcite-flow),:host([resizable][layout=horizontal]) .content ::slotted(calcite-panel){border-block-start:none;border-block-end:none}:host([position=end]:not([slot=panel-start])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-flow),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-panel),:host([position=start][slot=panel-end]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start][slot=panel-end]) .content ::slotted(calcite-flow),:host([position=start][slot=panel-end]) .content ::slotted(calcite-panel){border-inline-end:none}:host([layout=horizontal]) slot[name=action-bar]::slotted(calcite-action-bar){border-inline:0}:host([layout=horizontal][position=start]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=start]) .content ::slotted(calcite-panel){border-inline:0;border-block-start:0}:host([layout=horizontal][position=end]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=end]) .content ::slotted(calcite-panel){border-inline:0;border-block-end:0}:host([display-mode=dock]) .resize-handle-bar,:host([display-mode=float-all]) .resize-handle-bar,:host([display-mode=overlay]) .resize-handle-bar{border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}:host([hidden]){display:none}[hidden]{display:none}`,R=class extends V{constructor(){super(...arguments),this.direction=U(),this.resizeHandleRef=k(),this.actionBars=[],this.contentRef=k(),this.messages=L(),this.sizeOverride=P({targetElement:this.contentRef,getBounds:()=>({inline:{min:this.resizeValues.minInlineSize,max:this.resizeValues.maxInlineSize},block:{min:this.resizeValues.minBlockSize,max:this.resizeValues.maxBlockSize}}),onResize:e=>{this.resizeValues=e}}),this.resizeValues={inlineSize:null,blockSize:null,minInlineSize:null,minBlockSize:null,maxInlineSize:null,maxBlockSize:null},this.hasHeader=!1,this.collapsed=!1,this.displayMode="dock",this.layout="vertical",this.position="start",this.resizable=!1,this.widthScale="m",this.calciteInternalShellPanelResizeEnd=b({cancelable:!1}),this.calciteInternalShellPanelResizeStart=b({cancelable:!1}),this.calciteShellPanelCollapse=b({cancelable:!1}),this.calciteShellPanelExpand=b({cancelable:!1})}static{this.properties={resizeValues:[16,{},{state:!0}],hasHeader:[16,{},{state:!0}],collapsed:[7,{},{reflect:!0,type:Boolean}],displayMode:[3,{},{reflect:!0}],heightScale:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],position:[3,{},{reflect:!0}],resizable:[7,{},{reflect:!0,type:Boolean}],height:[3,{},{reflect:!0}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=[T,K]}async updateSize(e){this.updateSizeInternal(e)}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this.refreshResize()}willUpdate(e){let t=!1;e.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&(this.setActionBarsLayout(this.actionBars),this.updateSizeInternal({inline:null,block:null}),t=!0),(e.has("direction")&&this.hasUpdated||e.has("position")&&(this.hasUpdated||this.position!=="start"))&&(t=!0),(e.has("collapsed")&&(this.hasUpdated||this.collapsed!==!1)||e.has("resizable")&&(this.hasUpdated||this.resizable!==!1))&&(t=this.resizable&&!this.collapsed,t||this.cleanUpInteractions()),t&&this.refreshResize(),e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calciteShellPanelCollapse.emit():this.calciteShellPanelExpand.emit())}disconnectedCallback(){super.disconnectedCallback(),this.cleanUpInteractions()}getContentElDOMRect(){return this.contentRef.value.getBoundingClientRect()}updateSizeInternal(e){this.contentRef.value&&this.sizeOverride.resize(e)}handleKeyDown(e){let{key:t,defaultPrevented:h,shiftKey:r}=e,{position:l,layout:a,resizable:n,contentRef:i,resizeValues:{maxBlockSize:u,maxInlineSize:z,minBlockSize:v,minInlineSize:C}}=this,$=[...a==="horizontal"?["ArrowUp","ArrowDown"]:["ArrowLeft","ArrowRight"],"Home","End"];if(!n||!i.value||h||!$.includes(t))return;let x=this.getContentElDOMRect(),H=this.direction==="rtl"?-1:1,c=r?D:A;switch(t){case"ArrowUp":this.updateSizeInternal({block:x.height+(a==="horizontal"&&l==="end"?c:-c)}),e.preventDefault();break;case"ArrowDown":this.updateSizeInternal({block:x.height+(a==="horizontal"&&l==="end"?-c:c)}),e.preventDefault();break;case"ArrowLeft":this.updateSizeInternal({inline:x.width+(a==="vertical"&&l==="end"?c:-c)*H}),e.preventDefault();break;case"ArrowRight":this.updateSizeInternal({inline:x.width+(a==="vertical"&&l==="end"?-c:c)*H}),e.preventDefault();break;case"Home":this.updateSizeInternal(a==="horizontal"?{block:v}:{inline:C}),e.preventDefault();break;case"End":this.updateSizeInternal(a==="horizontal"?{block:u}:{inline:z}),e.preventDefault();break}}cleanUpInteractions(){this.interaction?.unset()}updateResizeValues(){let{contentRef:e}=this;if(!e.value)return;let t=window.getComputedStyle(e.value);this.resizeValues={inlineSize:m(t.inlineSize),blockSize:m(t.blockSize),minInlineSize:m(t.minInlineSize),minBlockSize:m(t.minBlockSize),maxInlineSize:m(t.maxInlineSize)||window.innerWidth,maxBlockSize:m(t.maxBlockSize)||window.innerHeight}}async refreshResize(){await this.componentOnReady(),await this.updateComplete,this.updateResizeValues(),this.setUpResizeInteractions()}setUpResizeInteractions(){this.cleanUpInteractions();let{el:e,contentRef:t,resizable:h,position:r,collapsed:l,resizeHandleRef:a,layout:n}=this,i=a.value;if(!t.value||l||!h||!i)return;let u=this.direction==="rtl";this.interaction=I(t.value,{context:e.ownerDocument}).resizable({edges:{top:r==="end"&&n==="horizontal"?i:!1,right:r===(u?"end":"start")&&n==="vertical"?i:!1,bottom:r==="start"&&n==="horizontal"?i:!1,left:r===(u?"start":"end")&&n==="vertical"?i:!1},modifiers:[I.modifiers.restrictSize({min:{width:this.resizeValues.minInlineSize,height:this.resizeValues.minBlockSize},max:{width:this.resizeValues.maxInlineSize,height:this.resizeValues.maxBlockSize}})],listeners:{resizestart:()=>{this.calciteInternalShellPanelResizeStart.emit()},resizeend:()=>{this.calciteInternalShellPanelResizeEnd.emit()},move:({rect:z})=>{let v=n==="horizontal";this.updateSize(v?{block:z.height}:{inline:z.width})}}})}setActionBarsLayout(e){e.forEach(t=>t.layout=this.layout)}handleActionBarSlotChange(e){let t=O(e).filter(h=>h?.matches("calcite-action-bar"));this.actionBars=t,this.setActionBarsLayout(t)}handleHeaderSlotChange(e){this.hasHeader=E(e)}getResizeIcon(){let{layout:e}=this;return e==="horizontal"?N.dragVertical:N.dragHorizontal}renderHeader(){return f("header",d`<div class=${s(o.contentHeader)} .hidden=${!this.hasHeader}><slot name=${M.header} @slotchange=${this.handleHeaderSlotChange}></slot></div>`)}render(){let{collapsed:e,position:t,resizable:h,layout:r,displayMode:l,resizeValues:a}=this,n=this.direction,i=r==="horizontal",u=!e&&h?f("resize-handle",d`<div .ariaLabel=${this.messages.resize} .ariaOrientation=${i?"vertical":"horizontal"} .ariaValueMax=${y(i?"block":"inline",a.maxBlockSize,a.maxInlineSize)} .ariaValueMin=${y(i?"block":"inline",a.minBlockSize,a.minInlineSize)} .ariaValueNow=${y(i?"block":"inline",a.blockSize,a.inlineSize)} class=${s(o.resizeHandle)} @keydown=${this.handleKeyDown} role=separator tabindex=0 touch-action=none ${S(this.resizeHandleRef)}><div class=${s(o.resizeHandleBar)}><calcite-icon .icon=${this.getResizeIcon()} scale=s></calcite-icon></div></div>`):null,z=()=>r==="horizontal"?t==="start"?p.calciteAnimateInDown:p.calciteAnimateInUp:n==="ltr"&&t==="end"||n==="rtl"&&t==="start"?p.calciteAnimateInLeft:p.calciteAnimateInRight,v=d`<div class=${s(o.contentContainer)}>${f("content",d`<div class=${s({[p.rtl]:n==="rtl",[o.content]:!0,[o.contentOverlay]:l==="overlay",[o.floatContent]:l==="float-content"||l==="float",[p.calciteAnimate]:l==="overlay",[z()]:l==="overlay",[B("width",this.width,this.widthScale)]:!!(this.width||this.widthScale),[B("height",this.height,this.heightScale)]:!!(this.height||this.heightScale)})} .hidden=${e} ${S(this.contentRef)}>${this.renderHeader()}<div class=${s(o.contentBody)}><slot></slot></div>${u}</div>`)}</div>`,w=[f("action-bar-container",d`<div class=${s(o.actionBarContainer)}><slot name=${M.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`),v];return t==="end"&&w.reverse(),d`<div class=${s({[o.container]:!0,[o.floatAll]:l==="float-all"})}>${w}</div>`}};_("calcite-shell-panel",R);export{R as ShellPanel};
|
|
2
|
+
import{a as I,b as P}from"./46QVRBZQ.js";import{a as B}from"./3PITBECR.js";import{a as f}from"./YCBJZOJS.js";import{a as y}from"./WKR7R7AZ.js";import{a as L}from"./D7WOEWO3.js";import{e as U}from"./EH5Y2TRK.js";import"./UANLRLKZ.js";import{D as m,t as E,u as O}from"./DVG3NA3H.js";import"./OAOQ5BXS.js";import{E as k,F as S,G as V,H as s,M as p,O as A,P as D,S as _,g,h as d,p as b}from"./PGOMURMZ.js";var K=g`.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-right{animation-name:in-right}.calcite-animate__in-left{animation-name:in-left}.calcite-animate__in-scale{animation-name:in-scale}@keyframes in{0%{opacity:0}to{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0,-5px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0,5px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-right{0%{opacity:0;transform:translate3D(-5px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-left{0%{opacity:0;transform:translate3D(5px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(.95,.95,1)}to{opacity:1;transform:scaleZ(1)}}`,o={container:"container",actionBarContainer:"action-bar-container",contentContainer:"content-container",content:"content",contentHeader:"content__header",contentBody:"content__body",contentOverlay:"content--overlay",floatAll:"float-all",floatContent:"float--content",resizeHandle:"resize-handle",resizeHandleBar:"resize-handle-bar"},M={actionBar:"action-bar",header:"header"},N={dragVertical:"drag-resize-vertical",dragHorizontal:"drag-resize-horizontal"},T=g`:host{pointer-events:none;position:relative;display:flex;flex:0 1 auto;align-items:stretch;z-index:var(--calcite-shell-panel-z-index, var(--calcite-z-index));--calcite-shell-panel-max-height: unset;--calcite-internal-shell-panel-shadow-block-start: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-block-end: 0 -4px 8px -1px rgba(0, 0, 0, .08), 0 -2px 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-start: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-end: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04)}.calcite--rtl.content--overlay{--calcite-internal-shell-panel-shadow-inline-start: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-end: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04)}:host([layout=vertical]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index) + 1))}:host([layout=vertical][display-mode=overlay]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index-header) + 1))}:host([layout=vertical][display-mode=float-all]) .content{flex:2}:host([layout=vertical]:not([display-mode=float-all])) .width-s{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 300px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical][display-mode=float-all]) .width-s{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical]:not([display-mode=float-all])) .width-m{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 420px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical][display-mode=float-all]) .width-m{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical]:not([display-mode=float-all])) .width-l{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 680px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px)}:host([layout=vertical][display-mode=float-all]) .width-l{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px)}:host([layout=horizontal]) .content{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 30vh)}:host([layout=horizontal]) .height-s{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 20vh)}:host([layout=horizontal]) .height-l{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 40vh)}:host([display-mode=float-all][height=s]),:host([display-mode=float-all][height-scale=s]) .content{min-block-size:var(--calcite-shell-panel-height, 20vh)}:host([display-mode=float-all][height=m]),:host([display-mode=float-all][height-scale=m]) .content{min-block-size:var(--calcite-shell-panel-height, 30vh)}:host([display-mode=float-all][height=l]),:host([display-mode=float-all][height-scale=l]) .content{min-block-size:var(--calcite-shell-panel-height, 40vh)}.container{pointer-events:none;box-sizing:border-box;display:flex;block-size:100%;flex:1 1 auto;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-shell-panel-text-color, var(--calcite-color-text-2))}.container *{box-sizing:border-box}.container.float-all{margin-block:var(--calcite-spacing-sm);margin-inline:var(--calcite-spacing-sm)}.float-all{max-block-size:var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem) );box-shadow:var(--calcite-shell-panel-shadow, var(--calcite-shadow-sm));border-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));overflow:hidden}:host([layout=vertical][position=start]) .float-all{border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-shell-panel-border-color, var(--calcite-color-border-3))}:host([layout=vertical][position=end]) .float-all{border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-shell-panel-border-color, var(--calcite-color-border-3)))}:host([layout=horizontal]) .float-all{border-inline:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-shell-panel-border-color, var(--calcite-color-border-3)))}:host([layout=horizontal]) .container{block-size:auto;inline-size:100%;flex-direction:column}.resize-handle{position:absolute;box-sizing:border-box;display:flex;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center;outline:2px solid transparent;outline-offset:2px;--calcite-internal-shell-panel-resize-handle-offset: calc( (var(--calcite-size-fixed-xxl) - var(--calcite-size-fixed-sm-plus)) / 2 * -1 );z-index:var(--calcite-z-index-header)}.resize-handle:active .resize-handle-bar,.resize-handle:hover .resize-handle-bar{color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-text-1));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-foreground-3))}.resize-handle-bar{pointer-events:none;display:flex;align-items:center;justify-content:center;color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-background))}.resize-handle:focus .resize-handle-bar{outline-color:transparent;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)))}:host([position=start][layout=vertical]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-end:var(--calcite-internal-shell-panel-resize-handle-offset);block-size:100%}:host([position=start][layout=vertical]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start][layout=vertical]):host([display-mode^=float]) .resize-handle-bar{border-start-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=end][layout=vertical]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-start:var(--calcite-internal-shell-panel-resize-handle-offset);block-size:100%}:host([position=end][layout=vertical]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=end][layout=vertical]):host([display-mode^=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=start][layout=horizontal]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-end:var(--calcite-internal-shell-panel-resize-handle-offset)}:host([position=start][layout=horizontal]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start][layout=horizontal]):host([display-mode^=float]) .resize-handle-bar{border-end-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=end][layout=horizontal]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-start:var(--calcite-internal-shell-panel-resize-handle-offset)}:host([position=end][layout=horizontal]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=end][layout=horizontal]):host([display-mode^=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-start-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%;inline-size:100%;flex:1 1 auto;max-block-size:unset;max-inline-size:unset}.action-bar-container{pointer-events:auto;box-sizing:border-box;display:flex;flex:1 1 auto}.content-container{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;align-items:stretch;align-self:stretch}:host([layout=horizontal]) .action-bar-container,:host([layout=horizontal]) .content-container{flex-direction:column}.content{pointer-events:auto;position:relative;box-sizing:border-box;display:flex;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;align-self:stretch;padding:0;background-color:var(--calcite-shell-panel-background-color, var(--calcite-color-background));transition:max-block-size var(--calcite-animation-timing),max-inline-size var(--calcite-animation-timing)}:host([layout=vertical]:not([display-mode=float-all])) .content{inline-size:var(--calcite-internal-shell-panel-width);max-inline-size:var(--calcite-internal-shell-panel-max-width);min-inline-size:var(--calcite-internal-shell-panel-min-width)}:host([layout=vertical][display-mode=float-all]) .content{inline-size:var(--calcite-internal-shell-panel-width);min-inline-size:var(--calcite-internal-shell-panel-min-width)}:host([layout=horizontal]) .content{block-size:var(--calcite-internal-shell-panel-height);max-block-size:var(--calcite-internal-shell-panel-max-height);min-block-size:var(--calcite-internal-shell-panel-min-height)}:host([resizable][layout=vertical][position=start]) .content{padding-inline-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=vertical][position=end]) .content{padding-inline-start:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=horizontal][position=start]) .content{padding-block-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=horizontal][position=end]) .content{padding-block-start:var(--calcite-size-fixed-sm-plus)}.content__header{display:flex;flex:0 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch}.content__body{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.content--overlay{position:absolute;box-shadow:var(--calcite-shell-panel-shadow, var(--calcite-shadow-sm))}:host([layout=vertical]) .content--overlay{inset-block-start:0px;block-size:100%}:host([layout=horizontal]) .content--overlay{inset-inline-start:0px;inline-size:100%}:host([layout=vertical][position=start]) .content--overlay{inset-inline-start:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-inline-start)}:host([layout=vertical][position=end]) .content--overlay{inset-inline-end:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-inline-end)}:host([layout=horizontal][position=start]) .content--overlay{inset-block-start:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-block-start)}:host([layout=horizontal][position=end]) .content--overlay{inset-block-end:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-block-end)}.float--content{margin-block-end:auto;block-size:auto;overflow:hidden;box-shadow:var(--calcite-shell-panel-shadow, var(--calcite-shadow-sm));border-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));margin-inline:var(--calcite-spacing-sm);margin-block-start:var(--calcite-spacing-sm);max-block-size:var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem) )}.float--content ::slotted(calcite-panel),.float--content ::slotted(calcite-flow){max-block-size:unset}:host([layout=horizontal]) .float--content{margin-block:var(--calcite-spacing-sm)}:host([position=start]) .float--content ::slotted(calcite-panel),:host([position=start]) .float--content ::slotted(calcite-flow),:host([position=end]) .float--content ::slotted(calcite-panel),:host([position=end]) .float--content ::slotted(calcite-flow){border-style:none}slot[name=action-bar]::slotted(calcite-action-bar),.content ::slotted(calcite-flow),.content ::slotted(calcite-panel:not([closed])){border:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start]:not([slot=panel-end])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-flow),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-panel),:host([position=end][slot=panel-start]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end][slot=panel-start]) .content ::slotted(calcite-flow),:host([position=end][slot=panel-start]) .content ::slotted(calcite-panel){border-inline-start:none}:host([resizable][layout=vertical]) .content ::slotted(calcite-flow),:host([resizable][layout=vertical]) .content ::slotted(calcite-panel){border-inline-start:none;border-inline-end:none}:host([resizable][layout=horizontal]) .content ::slotted(calcite-flow),:host([resizable][layout=horizontal]) .content ::slotted(calcite-panel){border-block-start:none;border-block-end:none}:host([position=end]:not([slot=panel-start])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-flow),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-panel),:host([position=start][slot=panel-end]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start][slot=panel-end]) .content ::slotted(calcite-flow),:host([position=start][slot=panel-end]) .content ::slotted(calcite-panel){border-inline-end:none}:host([layout=horizontal]) slot[name=action-bar]::slotted(calcite-action-bar){border-inline:0}:host([layout=horizontal][position=start]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=start]) .content ::slotted(calcite-panel){border-inline:0;border-block-start:0}:host([layout=horizontal][position=end]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=end]) .content ::slotted(calcite-panel){border-inline:0;border-block-end:0}:host([display-mode=dock]) .resize-handle-bar,:host([display-mode=float-all]) .resize-handle-bar,:host([display-mode=overlay]) .resize-handle-bar{border-block-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}:host([hidden]){display:none}[hidden]{display:none}`,R=class extends V{constructor(){super(...arguments),this.direction=U(),this.resizeHandleRef=k(),this.actionBars=[],this.contentRef=k(),this.messages=L(),this.sizeOverride=P({targetElement:this.contentRef,getBounds:()=>({inline:{min:this.resizeValues.minInlineSize,max:this.resizeValues.maxInlineSize},block:{min:this.resizeValues.minBlockSize,max:this.resizeValues.maxBlockSize}}),onResize:e=>{this.resizeValues=e}}),this.resizeValues={inlineSize:null,blockSize:null,minInlineSize:null,minBlockSize:null,maxInlineSize:null,maxBlockSize:null},this.hasHeader=!1,this.collapsed=!1,this.displayMode="dock",this.layout="vertical",this.position="start",this.resizable=!1,this.widthScale="m",this.calciteInternalShellPanelResizeEnd=b({cancelable:!1}),this.calciteInternalShellPanelResizeStart=b({cancelable:!1}),this.calciteShellPanelCollapse=b({cancelable:!1}),this.calciteShellPanelExpand=b({cancelable:!1})}static{this.properties={resizeValues:[16,{},{state:!0}],hasHeader:[16,{},{state:!0}],collapsed:[7,{},{reflect:!0,type:Boolean}],displayMode:[3,{},{reflect:!0}],heightScale:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],position:[3,{},{reflect:!0}],resizable:[7,{},{reflect:!0,type:Boolean}],height:[3,{},{reflect:!0}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=[T,K]}async updateSize(e){this.updateSizeInternal(e)}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this.refreshResize()}willUpdate(e){let t=!1;e.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&(this.setActionBarsLayout(this.actionBars),this.updateSizeInternal({inline:null,block:null}),t=!0),(e.has("direction")&&this.hasUpdated||e.has("position")&&(this.hasUpdated||this.position!=="start"))&&(t=!0),(e.has("collapsed")&&(this.hasUpdated||this.collapsed!==!1)||e.has("resizable")&&(this.hasUpdated||this.resizable!==!1))&&(t=this.resizable&&!this.collapsed,t||this.cleanUpInteractions()),t&&this.refreshResize(),e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calciteShellPanelCollapse.emit():this.calciteShellPanelExpand.emit())}disconnectedCallback(){super.disconnectedCallback(),this.cleanUpInteractions()}getContentElDOMRect(){return this.contentRef.value.getBoundingClientRect()}updateSizeInternal(e){this.contentRef.value&&this.sizeOverride.resize(e)}handleKeyDown(e){let{key:t,defaultPrevented:h,shiftKey:r}=e,{position:l,layout:a,resizable:n,contentRef:i,resizeValues:{maxBlockSize:u,maxInlineSize:z,minBlockSize:v,minInlineSize:C}}=this,$=[...a==="horizontal"?["ArrowUp","ArrowDown"]:["ArrowLeft","ArrowRight"],"Home","End"];if(!n||!i.value||h||!$.includes(t))return;let x=this.getContentElDOMRect(),H=this.direction==="rtl"?-1:1,c=r?D:A;switch(t){case"ArrowUp":this.updateSizeInternal({block:x.height+(a==="horizontal"&&l==="end"?c:-c)}),e.preventDefault();break;case"ArrowDown":this.updateSizeInternal({block:x.height+(a==="horizontal"&&l==="end"?-c:c)}),e.preventDefault();break;case"ArrowLeft":this.updateSizeInternal({inline:x.width+(a==="vertical"&&l==="end"?c:-c)*H}),e.preventDefault();break;case"ArrowRight":this.updateSizeInternal({inline:x.width+(a==="vertical"&&l==="end"?-c:c)*H}),e.preventDefault();break;case"Home":this.updateSizeInternal(a==="horizontal"?{block:v}:{inline:C}),e.preventDefault();break;case"End":this.updateSizeInternal(a==="horizontal"?{block:u}:{inline:z}),e.preventDefault();break}}cleanUpInteractions(){this.interaction?.unset()}updateResizeValues(){let{contentRef:e}=this;if(!e.value)return;let t=window.getComputedStyle(e.value);this.resizeValues={inlineSize:m(t.inlineSize),blockSize:m(t.blockSize),minInlineSize:m(t.minInlineSize),minBlockSize:m(t.minBlockSize),maxInlineSize:m(t.maxInlineSize)||window.innerWidth,maxBlockSize:m(t.maxBlockSize)||window.innerHeight}}async refreshResize(){await this.componentOnReady(),await this.updateComplete,this.updateResizeValues(),this.setUpResizeInteractions()}setUpResizeInteractions(){this.cleanUpInteractions();let{el:e,contentRef:t,resizable:h,position:r,collapsed:l,resizeHandleRef:a,layout:n}=this,i=a.value;if(!t.value||l||!h||!i)return;let u=this.direction==="rtl";this.interaction=I(t.value,{context:e.ownerDocument}).resizable({edges:{top:r==="end"&&n==="horizontal"?i:!1,right:r===(u?"end":"start")&&n==="vertical"?i:!1,bottom:r==="start"&&n==="horizontal"?i:!1,left:r===(u?"start":"end")&&n==="vertical"?i:!1},modifiers:[I.modifiers.restrictSize({min:{width:this.resizeValues.minInlineSize,height:this.resizeValues.minBlockSize},max:{width:this.resizeValues.maxInlineSize,height:this.resizeValues.maxBlockSize}})],listeners:{resizestart:()=>{this.calciteInternalShellPanelResizeStart.emit()},resizeend:()=>{this.calciteInternalShellPanelResizeEnd.emit()},move:({rect:z})=>{let v=n==="horizontal";this.updateSize(v?{block:z.height}:{inline:z.width})}}})}setActionBarsLayout(e){e.forEach(t=>t.layout=this.layout)}handleActionBarSlotChange(e){let t=O(e).filter(h=>h?.matches("calcite-action-bar"));this.actionBars=t,this.setActionBarsLayout(t)}handleHeaderSlotChange(e){this.hasHeader=E(e)}getResizeIcon(){let{layout:e}=this;return e==="horizontal"?N.dragVertical:N.dragHorizontal}renderHeader(){return f("header",d`<div class=${s(o.contentHeader)} .hidden=${!this.hasHeader}><slot name=${M.header} @slotchange=${this.handleHeaderSlotChange}></slot></div>`)}render(){let{collapsed:e,position:t,resizable:h,layout:r,displayMode:l,resizeValues:a}=this,n=this.direction,i=r==="horizontal",u=!e&&h?f("resize-handle",d`<div .ariaLabel=${this.messages.resize} .ariaOrientation=${i?"vertical":"horizontal"} .ariaValueMax=${y(i?"block":"inline",a.maxBlockSize,a.maxInlineSize)} .ariaValueMin=${y(i?"block":"inline",a.minBlockSize,a.minInlineSize)} .ariaValueNow=${y(i?"block":"inline",a.blockSize,a.inlineSize)} class=${s(o.resizeHandle)} @keydown=${this.handleKeyDown} role=separator tabindex=0 touch-action=none ${S(this.resizeHandleRef)}><div class=${s(o.resizeHandleBar)}><calcite-icon .icon=${this.getResizeIcon()} scale=s></calcite-icon></div></div>`):null,z=()=>r==="horizontal"?t==="start"?p.calciteAnimateInDown:p.calciteAnimateInUp:n==="ltr"&&t==="end"||n==="rtl"&&t==="start"?p.calciteAnimateInLeft:p.calciteAnimateInRight,v=d`<div class=${s(o.contentContainer)}>${f("content",d`<div class=${s({[p.rtl]:n==="rtl",[o.content]:!0,[o.contentOverlay]:l==="overlay",[o.floatContent]:l==="float-content"||l==="float",[p.calciteAnimate]:l==="overlay",[z()]:l==="overlay",[B("width",this.width,this.widthScale)]:!!(this.width||this.widthScale),[B("height",this.height,this.heightScale)]:!!(this.height||this.heightScale)})} .hidden=${e} ${S(this.contentRef)}>${this.renderHeader()}<div class=${s(o.contentBody)}><slot></slot></div>${u}</div>`)}</div>`,w=[f("action-bar-container",d`<div class=${s(o.actionBarContainer)}><slot name=${M.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`),v];return t==="end"&&w.reverse(),d`<div class=${s({[o.container]:!0,[o.floatAll]:l==="float-all"})}>${w}</div>`}};_("calcite-shell-panel",R);export{R as ShellPanel};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as l}from"./
|
|
2
|
+
import{a as l}from"./YCBJZOJS.js";import{F as c,H as a,h,i as e,l as s}from"./PGOMURMZ.js";var d={arrow:"calcite-floating-ui-arrow",arrowStroke:"calcite-floating-ui-arrow__stroke"},m={width:12,height:6,strokeWidth:1},S=({floatingLayout:w,key:g,ref:f})=>{let{width:t,height:r,strokeWidth:o}=m,i=t/2,$=w==="vertical",n=`M0,0 H${t} L${t-i},${r} Q${i},${r} ${i},${r} Z`;return l(g,h`<svg aria-hidden=true class=${a(d.arrow)} height=${t} viewBox=${`0 0 ${t} ${t+($?0:o)}`} width=${t+($?o:0)} ${c(f)}>${e`${e`<path class=${a(d.arrowStroke)} d=${n??s} fill=none stroke-width=${o+1} />`||""}<path d=${n??s} stroke=none />`}</svg>`)};export{S as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{b as oe}from"./
|
|
2
|
+
import{b as oe}from"./EH5Y2TRK.js";import{a as ue,l as se}from"./DVG3NA3H.js";import{Q as ie}from"./PGOMURMZ.js";var le=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],M=le.join(","),fe=typeof Element>"u",O=fe?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,_=!fe&&Element.prototype.getRootNode?function(a){var e;return a==null||(e=a.getRootNode)===null||e===void 0?void 0:e.call(a)}:function(a){return a?.ownerDocument},G=function(e,t){var n;t===void 0&&(t=!0);var u=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),s=u===""||u==="true",r=s||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):G(e.parentNode));return r},Re=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},de=function(e,t,n){if(G(e))return[];var u=Array.prototype.slice.apply(e.querySelectorAll(M));return t&&O.call(e,M)&&u.unshift(e),u=u.filter(n),u},V=function(e,t,n){for(var u=[],s=Array.from(e);s.length;){var r=s.shift();if(!G(r,!1))if(r.tagName==="SLOT"){var l=r.assignedElements(),p=l.length?l:r.children,g=V(p,!0,n);n.flatten?u.push.apply(u,g):u.push({scopeParent:r,candidates:g})}else{var S=O.call(r,M);S&&n.filter(r)&&(t||!e.includes(r))&&u.push(r);var F=r.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(r),k=!G(F,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(r));if(F&&k){var A=V(F===!0?r.children:F.children,!0,n);n.flatten?u.push.apply(u,A):u.push({scopeParent:r,candidates:A})}else s.unshift.apply(s,r.children)}}return u},ve=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},C=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Re(e))&&!ve(e)?0:e.tabIndex},Ie=function(e,t){var n=C(e);return n<0&&t&&!ve(e)?0:n},Ce=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},be=function(e){return e.tagName==="INPUT"},Oe=function(e){return be(e)&&e.type==="hidden"},Pe=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},Le=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},xe=function(e){if(!e.name)return!0;var t=e.form||_(e),n=function(l){return t.querySelectorAll('input[type="radio"][name="'+l+'"]')},u;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")u=n(window.CSS.escape(e.name));else try{u=n(e.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var s=Le(u,e.form);return!s||s===e},je=function(e){return be(e)&&e.type==="radio"},Be=function(e){return je(e)&&!xe(e)},Ke=function(e){var t,n=e&&_(e),u=(t=n)===null||t===void 0?void 0:t.host,s=!1;if(n&&n!==e){var r,l,p;for(s=!!((r=u)!==null&&r!==void 0&&(l=r.ownerDocument)!==null&&l!==void 0&&l.contains(u)||e!=null&&(p=e.ownerDocument)!==null&&p!==void 0&&p.contains(e));!s&&u;){var g,S,F;n=_(u),u=(g=n)===null||g===void 0?void 0:g.host,s=!!((S=u)!==null&&S!==void 0&&(F=S.ownerDocument)!==null&&F!==void 0&&F.contains(u))}}return s},ce=function(e){var t=e.getBoundingClientRect(),n=t.width,u=t.height;return n===0&&u===0},Me=function(e,t){var n=t.displayCheck,u=t.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e){var s=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(e).visibility==="hidden")return!0;var r=O.call(e,"details>summary:first-of-type"),l=r?e.parentElement:e;if(O.call(l,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof u=="function"){for(var p=e;e;){var g=e.parentElement,S=_(e);if(g&&!g.shadowRoot&&u(g)===!0)return ce(e);e.assignedSlot?e=e.assignedSlot:!g&&S!==e.ownerDocument?e=S.host:e=g}e=p}if(Ke(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return ce(e);return!1},_e=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n<t.children.length;n++){var u=t.children.item(n);if(u.tagName==="LEGEND")return O.call(t,"fieldset[disabled] *")?!0:!u.contains(e)}return!0}t=t.parentElement}return!1},q=function(e,t){return!(t.disabled||Oe(t)||Me(t,e)||Pe(t)||_e(t))},X=function(e,t){return!(Be(t)||C(t)<0||!q(e,t))},Ge=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},pe=function(e){var t=[],n=[];return e.forEach(function(u,s){var r=!!u.scopeParent,l=r?u.scopeParent:u,p=Ie(l,r),g=r?pe(u.candidates):l;p===0?r?t.push.apply(t,g):t.push(l):n.push({documentOrder:s,tabIndex:p,item:u,isScope:r,content:g})}),n.sort(Ce).reduce(function(u,s){return s.isScope?u.push.apply(u,s.content):u.push(s.content),u},[]).concat(t)},he=function(e,t){t=t||{};var n;return t.getShadowRoot?n=V([e],t.includeContainer,{filter:X.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ge}):n=de(e,t.includeContainer,X.bind(null,t)),pe(n)},ye=function(e,t){t=t||{};var n;return t.getShadowRoot?n=V([e],t.includeContainer,{filter:q.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=de(e,t.includeContainer,q.bind(null,t)),n},P=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return O.call(e,M)===!1?!1:X(t,e)},Ve=le.concat("iframe:not([inert]):not([inert] *)").join(","),U=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return O.call(e,Ve)===!1?!1:q(t,e)};function $(a,e){(e==null||e>a.length)&&(e=a.length);for(var t=0,n=Array(e);t<e;t++)n[t]=a[t];return n}function qe(a){if(Array.isArray(a))return $(a)}function me(a,e){var t=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(!t){if(Array.isArray(a)||(t=Se(a))||e){t&&(a=t);var n=0,u=function(){};return{s:u,n:function(){return n>=a.length?{done:!0}:{done:!1,value:a[n++]}},e:function(p){throw p},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,r=!0,l=!1;return{s:function(){t=t.call(a)},n:function(){var p=t.next();return r=p.done,p},e:function(p){l=!0,s=p},f:function(){try{r||t.return==null||t.return()}finally{if(l)throw s}}}}function Ue(a,e,t){return(e=ze(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function We(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function Ye(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ge(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);e&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(a,u).enumerable})),t.push.apply(t,n)}return t}function we(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ge(Object(t),!0).forEach(function(n){Ue(a,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):ge(Object(t)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(t,n))})}return a}function He(a){return qe(a)||We(a)||Se(a)||Ye()}function Ze(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var n=t.call(a,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function ze(a){var e=Ze(a,"string");return typeof e=="symbol"?e:e+""}function Se(a,e){if(a){if(typeof a=="string")return $(a,e);var t={}.toString.call(a).slice(8,-1);return t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set"?Array.from(a):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?$(a,e):void 0}}var D={getActiveTrap:function(e){return e?.length>0?e[e.length-1]:null},activateTrap:function(e,t){var n=D.getActiveTrap(e);t!==n&&D.pauseTrap(e);var u=e.indexOf(t);u===-1||e.splice(u,1),e.push(t)},deactivateTrap:function(e,t){var n=e.indexOf(t);n!==-1&&e.splice(n,1),D.unpauseTrap(e)},pauseTrap:function(e){var t=D.getActiveTrap(e);t?._setPausedState(!0)},unpauseTrap:function(e){var t=D.getActiveTrap(e);t&&!t._isManuallyPaused()&&t._setPausedState(!1)}},Xe=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},$e=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},j=function(e){return e?.key==="Tab"||e?.keyCode===9},Je=function(e){return j(e)&&!e.shiftKey},Qe=function(e){return j(e)&&e.shiftKey},Te=function(e){return setTimeout(e,0)},x=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),u=1;u<t;u++)n[u-1]=arguments[u];return typeof e=="function"?e.apply(void 0,n):e},W=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},et=[],Fe=function(e,t){var n=t?.document||document,u=t?.trapStack||et,s=we({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,delayReturnFocus:!0,isolateSubtrees:!1,isKeyForward:Je,isKeyBackward:Qe},t),r={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},l,p=function(i,o,c){return i&&i[o]!==void 0?i[o]:s[c||o]},g=function(i,o){var c=typeof o?.composedPath=="function"?o.composedPath():void 0;return r.containerGroups.findIndex(function(v){var d=v.container,y=v.tabbableNodes;return d.contains(i)||c?.includes(d)||y.find(function(f){return f===i})})},S=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=o.hasFallback,v=c===void 0?!1:c,d=o.params,y=d===void 0?[]:d,f=s[i];if(typeof f=="function"&&(f=f.apply(void 0,He(y))),f===!0&&(f=void 0),!f){if(f===void 0||f===!1)return f;throw new Error("`".concat(i,"` was specified but was not a node, or did not return a node"))}var h=f;if(typeof f=="string"){try{h=n.querySelector(f)}catch(b){throw new Error("`".concat(i,'` appears to be an invalid selector; error="').concat(b.message,'"'))}if(!h&&!v)throw new Error("`".concat(i,"` as selector refers to no known node"))}return h},F=function(i){var o=i.activeElement;return o?o.shadowRoot&&o.shadowRoot.activeElement!==null?F(o.shadowRoot):o:null},k=function(){var i=S("initialFocus",{hasFallback:!0});if(i===!1)return!1;if(i===void 0||i&&!U(i,s.tabbableOptions)){var o=F(n);if(g(o)>=0)i=o;else{var c=r.tabbableGroups[0],v=c&&c.firstTabbableNode;i=v||S("fallbackFocus")}}else i===null&&(i=S("fallbackFocus"));if(!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i},A=function(){if(r.containerGroups=r.containers.map(function(i){var o=he(i,s.tabbableOptions),c=ye(i,s.tabbableOptions),v=o.length>0?o[0]:void 0,d=o.length>0?o[o.length-1]:void 0,y=c.find(function(b){return P(b)}),f=c.slice().reverse().find(function(b){return P(b)}),h=!!o.find(function(b){return C(b)>0});return{container:i,tabbableNodes:o,focusableNodes:c,posTabIndexesFound:h,firstTabbableNode:v,lastTabbableNode:d,firstDomTabbableNode:y,lastDomTabbableNode:f,nextTabbableNode:function(w){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,E=o.indexOf(w);return E<0?N?c.slice(c.indexOf(w)+1).find(function(R){return P(R)}):c.slice(0,c.indexOf(w)).reverse().find(function(R){return P(R)}):o[E+(N?1:-1)]}}}),r.tabbableGroups=r.containerGroups.filter(function(i){return i.tabbableNodes.length>0}),r.tabbableGroups.length<=0&&!S("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(r.containerGroups.find(function(i){return i.posTabIndexesFound})&&r.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},T=function(i){if(i!==!1&&i!==F(document)){if(!i||!i.focus){T(k());return}i.focus({preventScroll:!!s.preventScroll}),r.mostRecentlyFocusedNode=i,Xe(i)&&i.select()}},B=function(i){var o=S("setReturnFocus",{params:[i]});return o||(o===!1?!1:i)},J=function(i){var o=i.target,c=i.event,v=i.isBackward,d=v===void 0?!1:v;o=o||W(c),A();var y=null;if(r.tabbableGroups.length>0){var f=g(o,c),h=f>=0?r.containerGroups[f]:void 0;if(f<0)d?y=r.tabbableGroups[r.tabbableGroups.length-1].lastTabbableNode:y=r.tabbableGroups[0].firstTabbableNode;else if(d){var b=r.tabbableGroups.findIndex(function(Z){var z=Z.firstTabbableNode;return o===z});if(b<0&&(h.container===o||U(o,s.tabbableOptions)&&!P(o,s.tabbableOptions)&&!h.nextTabbableNode(o,!1))&&(b=f),b>=0){var w=b===0?r.tabbableGroups.length-1:b-1,N=r.tabbableGroups[w];y=C(o)>=0?N.lastTabbableNode:N.lastDomTabbableNode}else j(c)||(y=h.nextTabbableNode(o,!1))}else{var E=r.tabbableGroups.findIndex(function(Z){var z=Z.lastTabbableNode;return o===z});if(E<0&&(h.container===o||U(o,s.tabbableOptions)&&!P(o,s.tabbableOptions)&&!h.nextTabbableNode(o))&&(E=f),E>=0){var R=E===r.tabbableGroups.length-1?0:E+1,I=r.tabbableGroups[R];y=C(o)>=0?I.firstTabbableNode:I.firstDomTabbableNode}else j(c)||(y=h.nextTabbableNode(o))}}else y=S("fallbackFocus");return y},K=function(i){var o=W(i);if(!(g(o,i)>=0)){if(x(s.clickOutsideDeactivates,i)){l.deactivate({returnFocus:s.returnFocusOnDeactivate});return}x(s.allowOutsideClick,i)||i.preventDefault()}},Q=function(i){var o=W(i),c=g(o,i)>=0;if(c||o instanceof Document)c&&(r.mostRecentlyFocusedNode=o);else{i.stopImmediatePropagation();var v,d=!0;if(r.mostRecentlyFocusedNode)if(C(r.mostRecentlyFocusedNode)>0){var y=g(r.mostRecentlyFocusedNode),f=r.containerGroups[y].tabbableNodes;if(f.length>0){var h=f.findIndex(function(b){return b===r.mostRecentlyFocusedNode});h>=0&&(s.isKeyForward(r.recentNavEvent)?h+1<f.length&&(v=f[h+1],d=!1):h-1>=0&&(v=f[h-1],d=!1))}}else r.containerGroups.some(function(b){return b.tabbableNodes.some(function(w){return C(w)>0})})||(d=!1);else d=!1;d&&(v=J({target:r.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(r.recentNavEvent)})),T(v||r.mostRecentlyFocusedNode||k())}r.recentNavEvent=void 0},ke=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;r.recentNavEvent=i;var c=J({event:i,isBackward:o});c&&(j(i)&&i.preventDefault(),T(c))},ee=function(i){(s.isKeyForward(i)||s.isKeyBackward(i))&&ke(i,s.isKeyBackward(i))},te=function(i){$e(i)&&x(s.escapeDeactivates,i)!==!1&&(i.preventDefault(),l.deactivate())},ae=function(i){var o=W(i);g(o,i)>=0||x(s.clickOutsideDeactivates,i)||x(s.allowOutsideClick,i)||(i.preventDefault(),i.stopImmediatePropagation())},re=function(){if(r.active){D.activateTrap(u,l);var i;return s.delayInitialFocus?i=new Promise(function(o){r.delayInitialFocusTimer=Te(function(){T(k()),o()})}):T(k()),n.addEventListener("focusin",Q,!0),n.addEventListener("mousedown",K,{capture:!0,passive:!1}),n.addEventListener("touchstart",K,{capture:!0,passive:!1}),n.addEventListener("click",ae,{capture:!0,passive:!1}),n.addEventListener("keydown",ee,{capture:!0,passive:!1}),n.addEventListener("keydown",te),i}},Ae=function(i){r.active&&!r.paused&&l._setSubtreeIsolation(!1),r.adjacentElements.clear(),r.alreadySilent.clear();var o=new Set,c=new Set,v=me(i),d;try{for(v.s();!(d=v.n()).done;){var y=d.value;o.add(y);for(var f=typeof ShadowRoot<"u"&&y.getRootNode()instanceof ShadowRoot,h=y;h;){o.add(h);var b=h.parentElement,w=[];b?w=b.children:!b&&f&&(w=h.getRootNode().children,b=h.getRootNode().host,f=typeof ShadowRoot<"u"&&b.getRootNode()instanceof ShadowRoot);var N=me(w),E;try{for(N.s();!(E=N.n()).done;){var R=E.value;c.add(R)}}catch(I){N.e(I)}finally{N.f()}h=b}}}catch(I){v.e(I)}finally{v.f()}o.forEach(function(I){c.delete(I)}),r.adjacentElements=c},ne=function(){if(r.active)return n.removeEventListener("focusin",Q,!0),n.removeEventListener("mousedown",K,!0),n.removeEventListener("touchstart",K,!0),n.removeEventListener("click",ae,!0),n.removeEventListener("keydown",ee,!0),n.removeEventListener("keydown",te),l},De=function(i){var o=r.mostRecentlyFocusedNode;if(o){var c=i.some(function(d){var y=Array.from(d.removedNodes);return y.some(function(f){return f===o||typeof f.contains=="function"&&f.contains(o)})});if(c&&r.containers.some(function(d){return d?.isConnected})){A();var v=k();T(v)}}},H=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(De):void 0,L=function(){H&&(H.disconnect(),r.active&&!r.paused&&r.containers.map(function(i){H.observe(i,{subtree:!0,childList:!0})}))};return l={get active(){return r.active},get paused(){return r.paused},activate:function(i){if(r.active)return this;var o=p(i,"onActivate"),c=p(i,"onPostActivate"),v=p(i,"checkCanFocusTrap"),d=D.getActiveTrap(u),y=!1;if(d&&!d.paused){var f;(f=d._setSubtreeIsolation)===null||f===void 0||f.call(d,!1),y=!0}try{v||A(),r.active=!0,r.paused=!1,r.nodeFocusedBeforeActivation=F(n),o?.({trap:l});var h=function(){v&&A();var N=function(){l._setSubtreeIsolation(!0),L(),c?.({trap:l})},E=re();E?E.then(N):N()};if(v)return v(r.containers.concat()).then(h,h),this;h()}catch(w){if(d===D.getActiveTrap(u)&&y){var b;(b=d._setSubtreeIsolation)===null||b===void 0||b.call(d,!0)}throw w}return this},deactivate:function(i){if(!r.active)return this;var o=we({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},i);clearTimeout(r.delayInitialFocusTimer),r.delayInitialFocusTimer=void 0,r.paused||l._setSubtreeIsolation(!1),r.alreadySilent.clear(),ne(),r.active=!1,r.paused=!1,L(),D.deactivateTrap(u,l);var c=p(o,"onDeactivate"),v=p(o,"onPostDeactivate"),d=p(o,"checkCanReturnFocus"),y=p(o,"delayReturnFocus"),f=p(o,"returnFocus","returnFocusOnDeactivate");c?.({trap:l});var h=function(){f&&T(B(r.nodeFocusedBeforeActivation)),v?.({trap:l})},b=function(){y&&f?Te(h):h()};return f&&d?(d(B(r.nodeFocusedBeforeActivation)).then(b,b),this):(b(),this)},pause:function(i){return r.active?(r.manuallyPaused=!0,this._setPausedState(!0,i)):this},unpause:function(i){return r.active?(r.manuallyPaused=!1,u[u.length-1]!==this?this:this._setPausedState(!1,i)):this},updateContainerElements:function(i){var o=[].concat(i).filter(Boolean);return r.containers=o.map(function(c){return typeof c=="string"?n.querySelector(c):c}),s.isolateSubtrees&&Ae(r.containers),r.active&&(A(),r.paused||l._setSubtreeIsolation(!0)),L(),this}},Object.defineProperties(l,{_isManuallyPaused:{value:function(){return r.manuallyPaused}},_setPausedState:{value:function(i,o){if(r.paused===i)return this;if(r.paused=i,i){var c=p(o,"onPause"),v=p(o,"onPostPause");c?.({trap:l}),ne(),l._setSubtreeIsolation(!1),L(),v?.({trap:l})}else{var d=p(o,"onUnpause"),y=p(o,"onPostUnpause");d?.({trap:l});var f=function(){A();var b=function(){l._setSubtreeIsolation(!0),L(),y?.({trap:l})},w=re();w?w.then(b):b()};f()}return this}},_setSubtreeIsolation:{value:function(i){s.isolateSubtrees&&r.adjacentElements.forEach(function(o){var c;i?s.isolateSubtrees==="aria-hidden"?((o.ariaHidden==="true"||((c=o.getAttribute("aria-hidden"))===null||c===void 0?void 0:c.toLowerCase())==="true")&&r.alreadySilent.add(o),o.setAttribute("aria-hidden","true")):((o.inert||o.hasAttribute("inert"))&&r.alreadySilent.add(o),o.setAttribute("inert",!0)):r.alreadySilent.has(o)||(s.isolateSubtrees==="aria-hidden"?o.removeAttribute("aria-hidden"):o.removeAttribute("inert"))})}}}),l.updateContainerElements(e),l};function Ne(a,{focusTrapOptions:e},t){return!e?.extraContainers&&!t?a:[a,...Ee(e?.extraContainers),...Ee(t)]}function Ee(a=[]){return Array.isArray(a)?a:[a]}var Y=new WeakSet;function tt(a,e){let t=e&&e!==document.body&&e!==document.documentElement;return!Y.has(a)&&t&&se(e),!1}function at(a,e){let t=e?.fallbackFocus||a,n=e?.clickOutsideDeactivates??!0,u;return{fallbackFocus:t,...e,document:a.ownerDocument,tabbableOptions:ue,trapStack:ie().focusTrapStack,clickOutsideDeactivates:s=>(Y.has(a)||Y.add(a),typeof n=="function"?n(s):n),onActivate:s=>{e?.escapeDeactivates&&(u=new AbortController,a.addEventListener("keydown",r=>{if(r.key==="Escape"){let l=e?.escapeDeactivates;(typeof l=="function"?l(r):l??!0)&&s.trap.deactivate()}},{signal:u.signal})),e?.onActivate?.(s)},onDeactivate:s=>{u?.abort(),u=void 0,e?.onDeactivate?.(s)},onPostDeactivate:()=>{Y.delete(a)},setReturnFocus:s=>{let r=typeof e?.setReturnFocus=="function"?e.setReturnFocus(s):e?.setReturnFocus;return r===void 0?tt(a,s):r}}}var lt=(a={})=>oe((e,t)=>{let n,u,s,r=!1,l=a.focusTrapOptions,p=()=>a.triggerProp?!!e[a.triggerProp]:!0,g=()=>a.triggerProp?p():r,S=()=>typeof e.focusTrapDisabledOverride=="function"?!e.focusTrapDisabledOverride():!e.focusTrapDisabled,F=()=>{let T=u||e.el;T.isConnected&&(n||(s||=Ne(T,e),n=Fe(s,at(T,{...l,...e.focusTrapOptions}))),S()&&n.activate())},k=()=>{n?.deactivate()};return t.onConnected(()=>{n&&g()&&F()}),t.onUpdate(T=>{if(!(!e.hasUpdated||!T.has("focusTrapDisabled"))){if(e.focusTrapDisabled||!p()){k();return}g()&&F()}}),t.onDisconnected(()=>k()),{get _instance(){},activate:()=>{r=!0,F()},deactivate:()=>{r=!1,k()},overrideFocusTrapEl:T=>{if(n)throw new Error("Focus trap already created");u=T},setExtraContainers:T=>{let B=u||e.el;s=Ne(B,e,T)},updateContainerElements:()=>n?.updateContainerElements(s)}});export{lt as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{c as r}from"./
|
|
2
|
+
import{c as r}from"./SXELOWJI.js";import{a as o}from"./QUFMR3GW.js";import"./EH5Y2TRK.js";import"./UANLRLKZ.js";import{G as n,H as i,S as s,g as l,h as c,p as t}from"./PGOMURMZ.js";var d={container:"container",heading:"heading"},g=l`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column}:host([filter-hidden]){display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{margin:0;display:flex;flex:1 1 0%;position:sticky;inset-block-start:var(--calcite-internal-filter-enabled-offset, 0);z-index:var(--calcite-z-index-sticky);background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1));color:var(--calcite-list-color, var(--calcite-color-text-1))}.heading{font-weight:var(--calcite-font-weight-bold)}:host([scale=s]) .container{padding-inline:var(--calcite-spacing-sm)}:host([scale=s]) .heading{font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-fixed-base);padding-block:var(--calcite-spacing-sm) var(--calcite-spacing-xxs)}:host([scale=s]:not(:first-child)) .container{padding-block-start:var(--calcite-spacing-sm)}:host([scale=m]) .container{padding-inline:var(--calcite-spacing-md)}:host([scale=m]) .heading{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-fixed-base);padding-block:var(--calcite-spacing-lg) var(--calcite-spacing-sm)}:host([scale=m]:not(:first-child)) .container{padding-block-start:var(--calcite-spacing-md)}:host([scale=l]) .container{padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .heading{font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-fixed-lg);padding-block:var(--calcite-spacing-xl) var(--calcite-spacing-sm-plus, .625rem)}:host([scale=l]:not(:first-child)) .container{padding-block-start:var(--calcite-spacing-md-plus, .875rem)}.heading{padding:0}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends n{constructor(){super(...arguments),this.interactiveContainer=o(this),this.disabled=!1,this.filterHidden=!1,this.scale="m",this.calciteInternalListItemGroupDefaultSlotChange=t({cancelable:!1}),this.calciteInternalListItemGroupChange=t({cancelable:!1})}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],filterHidden:[7,{},{reflect:!0,type:Boolean}],heading:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=g}willUpdate(e){e.has("heading")&&this.calciteInternalListItemGroupChange.emit()}handleDefaultSlotChange(){this.calciteInternalListItemGroupDefaultSlotChange.emit()}render(){let{disabled:e,heading:h}=this;return this.interactiveContainer({disabled:e,children:c`<div class=${i(d.container)} role=row><div .ariaColSpan=${r} class=${i(d.heading)} role=cell>${h}</div></div><slot @slotchange=${this.handleDefaultSlotChange}></slot>`})}};s("calcite-list-item-group",a);export{a as ListItemGroup};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as t,b as w,c as S,d as l}from"./DCWL5FUH.js";import{a as K}from"./DJMAPSDY.js";import{b as _}from"./Z2GSU7Q2.js";import{a as O}from"./DEQNFOAS.js";import"./E4MGJ47Y.js";import{a as R}from"./YBFI2FQL.js";import{a as u}from"./ZBN5LXKS.js";import"./5X2CR2NN.js";import{a as D,b as N}from"./ENDXE7YY.js";import{a as L}from"./IHGSINVA.js";import{c as j}from"./RRXOB3GM.js";import{a as I}from"./ERBKUSSX.js";import{a as M}from"./WGGFNK4Z.js";import"./YNG6JO67.js";import"./4Q7PL2KY.js";import{r as A,s as z,t as c,u as x}from"./RZR44QGM.js";import"./OAOQ5BXS.js";import{E as B,F as k,G as P,H as o,S as T,g as F,h as n,l as y,p as $}from"./XTGDCTQE.js";var U=F`: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(:is([scale=s],[scale=m])){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xs);--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;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))}.content-top{padding:var(--calcite-panel-content-top-space, var(--calcite-internal-panel-default-space))}.content-bottom{padding:var(--calcite-panel-content-bottom-space, var(--calcite-internal-panel-default-space))}.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;font-size:var(--calcite-font-size-relative-base);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,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)}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;margin:auto;gap:var(--calcite-internal-panel-action-spacing)}.header-actions--start{margin-inline-start:var(--calcite-internal-panel-action-spacing)}.header-actions--end{margin-inline-end:var(--calcite-internal-panel-action-spacing)}.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-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-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);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-ui-icon-color, var(--calcite-color-text-1)))}:host([hidden]){display:none}[hidden]{display:none}`,E=class extends P{constructor(){super(),this.containerRef=B(),this.resizeObserver=D("resize",()=>this.resizeHandler()),this.messages=L(),this._closed=!1,this.focusSetter=I()(this),this.interactiveContainer=R(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.hasHeaderDescription=!1,this.hasHeaderHeading=!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=_,this.overlayPositioning="absolute",this.scale="m",this.topLayerDisabled=!1,this.calcitePanelClose=$({cancelable:!0}),this.calcitePanelCollapse=$({cancelable:!1}),this.calcitePanelExpand=$({cancelable:!1}),this.calcitePanelScroll=$({cancelable:!1}),this.calcitePanelToggle=$({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}],hasHeaderDescription:[16,{},{state:!0}],hasHeaderHeading:[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}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=[K,U]}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())}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(i=>i?.matches("calcite-action-bar"));a.forEach(i=>i.layout="horizontal"),this.hasActionBar=!!a.length}handleHeaderContentSlotChange(e){this.hasHeaderContent=c(e)}handleHeaderDescriptionSlotChange(e){this.hasHeaderDescription=z(e)||x(e).some(A)}handleHeaderHeadingSlotChange(e){this.hasHeaderHeading=z(e)||x(e).some(A)}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){N(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:i,hasHeaderContent:s,hasHeaderDescription:d,hasHeaderHeading:r,icon:m,scale:f}=this,p=!!e||r,h=!!i||d,g=p||h,v=m?n`<calcite-icon class=${o(t.icon)} .flipRtl=${this.iconFlipRtl} .icon=${m} .scale=${M(f)}></calcite-icon>`:null,b=O({class:t.heading,hidden:!p,level:a,children:n`<slot .hidden=${!r} name=${l.heading} @slotchange=${this.handleHeaderHeadingSlotChange}></slot>${r?null:e}`}),H=n`<span class=${o(t.description)} .hidden=${!h}><slot .hidden=${!d} name=${l.description} @slotchange=${this.handleHeaderDescriptionSlotChange}></slot>${d?null:i}</span>`;return u("header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerNonSlottedContent]:!0})} .hidden=${s||!g}>${v}<div class=${o(t.headingTextContent)}>${b}${H}</div></div>`)}renderActionBar(){return n`<div class=${o(t.actionBarContainer)} .hidden=${!this.hasActionBar}><slot name=${l.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=${l.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=${l.headerActionsStart} @slotchange=${this.handleHeaderActionsStartSlotChange}></slot></div>`)}renderHeaderActionsEnd(){let{hasEndActions:e,messages:a,closable:i,collapsed:s,collapseDirection:d,collapsible:r,hasMenuItems:m}=this,{collapse:f,expand:p,close:h}=a,g=[S.expand,S.collapse];d==="up"&&g.reverse();let v=r?n`<calcite-action .aria=${{expanded:!s}} .icon=${s?g[0]:g[1]} id=${w.collapse} .label=${f} @click=${this.collapse} .scale=${this.scale} .text=${f} title=${(s?p:f)??y}></calcite-action>`:null,b=i?n`<calcite-action .ariaLabel=${h} .icon=${S.close} id=${w.close} @click=${this.closeClickHandler} .scale=${this.scale} .text=${h} title=${h??y}></calcite-action>`:null,H=n`<slot name=${l.headerActionsEnd} @slotchange=${this.handleHeaderActionsEndSlotChange}></slot>`,C=e||v||b||m;return u("header-actions-end",n`<div class=${o({[t.headerActionsEnd]:!0,[t.headerActions]:!0})} .hidden=${!C}>${H}${this.renderMenu()}${v}${b}</div>`)}renderMenu(){let{hasMenuItems:e,messages:a,menuOpen:i,menuFlipPlacements:s,menuPlacement:d,scale:r}=this;return u("menu",n`<calcite-action-menu .flipPlacements=${s??["top","bottom"]} .hidden=${!e} .label=${a.options} .open=${i} .overlayPositioning=${this.overlayPositioning} .placement=${d} .scale=${r} .topLayerDisabled=${this.topLayerDisabled}><calcite-action class=${o(t.menuAction)} .icon=${S.menu} .scale=${r} slot=${j.trigger} .text=${a.options}></calcite-action><slot name=${l.headerMenuActions} @slotchange=${this.handleHeaderMenuActionsSlotChange}></slot></calcite-action-menu>`)}renderHeaderNode(){let{hasHeaderContent:e,hasHeaderDescription:a,hasHeaderHeading:i,hasStartActions:s,hasEndActions:d,closable:r,collapsible:m,hasMenuItems:f,hasActionBar:p,hasContentTop:h,heading:g,description:v}=this,b=this.renderHeaderContent(),C=e||(!!g||!!v||i||a)||s||d||m||r||f||p||h;return this.showHeaderContent=C,n`<header class=${o(t.header)} .hidden=${!(C||p||h)}><div class=${o({[t.headerContainer]:!0,[t.headerContainerBorderEnd]:p})} .hidden=${!C}>${this.renderHeaderStartActions()}${this.renderHeaderSlottedContent()}${b}${this.renderHeaderActionsEnd()}</div>${this.renderActionBar()}${this.renderContentTop()}</header>`}renderFooterNode(){let{hasFooterEndContent:e,hasFooterStartContent:a,hasFooterContent:i}=this,s=a||e||i;return n`<footer class=${o(t.footer)} .hidden=${!s}><div class=${o(t.footerContent)} .hidden=${!i}><slot name=${l.footer} @slotchange=${this.handleFooterSlotChange}></slot></div><div class=${o(t.footerStart)} .hidden=${i||!a}><slot name=${l.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot></div><div class=${o(t.footerEnd)} .hidden=${i||!e}><slot name=${l.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></div></footer>`}renderContent(){return n`<div class=${o(t.contentWrapper)} .hidden=${this.collapsible&&this.collapsed} @scroll=${this.panelScrollHandler} ${k(this.setPanelScrollEl)}><slot></slot>${this.renderFab()}</div>`}renderContentBottom(){return n`<div class=${o(t.contentBottom)} .hidden=${!this.hasContentBottom}><slot name=${l.contentBottom} @slotchange=${this.contentBottomSlotChangeHandler}></slot></div>`}renderContentTop(){return n`<div class=${o(t.contentTop)} .hidden=${!this.hasContentTop}><slot name=${l.contentTop} @slotchange=${this.contentTopSlotChangeHandler}></slot></div>`}renderFab(){return n`<div class=${o(t.fabContainer)} .hidden=${!this.hasFab}><slot name=${l.fab} @slotchange=${this.handleFabSlotChange}></slot></div>`}render(){let{disabled:e,loading:a,closed:i}=this,s=n`<article .ariaBusy=${a} class=${o(t.container)} .hidden=${i} ${k(this.containerRef)}>${this.renderHeaderNode()}${this.renderContent()}${this.renderContentBottom()}${this.renderFooterNode()}${u("alerts",n`<slot name=${l.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</article>`;return this.interactiveContainer({disabled:e,children:n`${a?n`<calcite-scrim .loading=${a}></calcite-scrim>`:null}${s}`})}};T("calcite-panel",E);export{E as Panel};
|
|
2
|
+
import{a as t,b as w,c as S,d as l}from"./EZQV6OUW.js";import{a as K}from"./UJSGNQNS.js";import{b as _}from"./7LJPLUHO.js";import{a as O}from"./WE6LDLUR.js";import"./FQZZCTBU.js";import{a as R}from"./QUFMR3GW.js";import{a as u}from"./YCBJZOJS.js";import"./CQMH7FNX.js";import{a as D,b as N}from"./ENDXE7YY.js";import{a as L}from"./D7WOEWO3.js";import{c as j}from"./RRXOB3GM.js";import{a as I}from"./TLYY3J5P.js";import{a as M}from"./WGGFNK4Z.js";import"./EH5Y2TRK.js";import"./UANLRLKZ.js";import{r as A,s as z,t as c,u as x}from"./DVG3NA3H.js";import"./OAOQ5BXS.js";import{E as B,F as k,G as P,H as o,S as T,g as F,h as n,l as y,p as $}from"./PGOMURMZ.js";var U=F`: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(:is([scale=s],[scale=m])){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xs);--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;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))}.content-top{padding:var(--calcite-panel-content-top-space, var(--calcite-internal-panel-default-space))}.content-bottom{padding:var(--calcite-panel-content-bottom-space, var(--calcite-internal-panel-default-space))}.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;font-size:var(--calcite-font-size-relative-base);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,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)}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;margin:auto;gap:var(--calcite-internal-panel-action-spacing)}.header-actions--start{margin-inline-start:var(--calcite-internal-panel-action-spacing)}.header-actions--end{margin-inline-end:var(--calcite-internal-panel-action-spacing)}.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-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-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);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-ui-icon-color, var(--calcite-color-text-1)))}:host([hidden]){display:none}[hidden]{display:none}`,E=class extends P{constructor(){super(),this.containerRef=B(),this.resizeObserver=D("resize",()=>this.resizeHandler()),this.messages=L(),this._closed=!1,this.focusSetter=I()(this),this.interactiveContainer=R(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.hasHeaderDescription=!1,this.hasHeaderHeading=!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=_,this.overlayPositioning="absolute",this.scale="m",this.topLayerDisabled=!1,this.calcitePanelClose=$({cancelable:!0}),this.calcitePanelCollapse=$({cancelable:!1}),this.calcitePanelExpand=$({cancelable:!1}),this.calcitePanelScroll=$({cancelable:!1}),this.calcitePanelToggle=$({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}],hasHeaderDescription:[16,{},{state:!0}],hasHeaderHeading:[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}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=[K,U]}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())}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(i=>i?.matches("calcite-action-bar"));a.forEach(i=>i.layout="horizontal"),this.hasActionBar=!!a.length}handleHeaderContentSlotChange(e){this.hasHeaderContent=c(e)}handleHeaderDescriptionSlotChange(e){this.hasHeaderDescription=z(e)||x(e).some(A)}handleHeaderHeadingSlotChange(e){this.hasHeaderHeading=z(e)||x(e).some(A)}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){N(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:i,hasHeaderContent:s,hasHeaderDescription:d,hasHeaderHeading:r,icon:m,scale:f}=this,p=!!e||r,h=!!i||d,g=p||h,v=m?n`<calcite-icon class=${o(t.icon)} .flipRtl=${this.iconFlipRtl} .icon=${m} .scale=${M(f)}></calcite-icon>`:null,b=O({class:t.heading,hidden:!p,level:a,children:n`<slot .hidden=${!r} name=${l.heading} @slotchange=${this.handleHeaderHeadingSlotChange}></slot>${r?null:e}`}),H=n`<span class=${o(t.description)} .hidden=${!h}><slot .hidden=${!d} name=${l.description} @slotchange=${this.handleHeaderDescriptionSlotChange}></slot>${d?null:i}</span>`;return u("header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerNonSlottedContent]:!0})} .hidden=${s||!g}>${v}<div class=${o(t.headingTextContent)}>${b}${H}</div></div>`)}renderActionBar(){return n`<div class=${o(t.actionBarContainer)} .hidden=${!this.hasActionBar}><slot name=${l.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=${l.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=${l.headerActionsStart} @slotchange=${this.handleHeaderActionsStartSlotChange}></slot></div>`)}renderHeaderActionsEnd(){let{hasEndActions:e,messages:a,closable:i,collapsed:s,collapseDirection:d,collapsible:r,hasMenuItems:m}=this,{collapse:f,expand:p,close:h}=a,g=[S.expand,S.collapse];d==="up"&&g.reverse();let v=r?n`<calcite-action .aria=${{expanded:!s}} .icon=${s?g[0]:g[1]} id=${w.collapse} .label=${f} @click=${this.collapse} .scale=${this.scale} .text=${f} title=${(s?p:f)??y}></calcite-action>`:null,b=i?n`<calcite-action .ariaLabel=${h} .icon=${S.close} id=${w.close} @click=${this.closeClickHandler} .scale=${this.scale} .text=${h} title=${h??y}></calcite-action>`:null,H=n`<slot name=${l.headerActionsEnd} @slotchange=${this.handleHeaderActionsEndSlotChange}></slot>`,C=e||v||b||m;return u("header-actions-end",n`<div class=${o({[t.headerActionsEnd]:!0,[t.headerActions]:!0})} .hidden=${!C}>${H}${this.renderMenu()}${v}${b}</div>`)}renderMenu(){let{hasMenuItems:e,messages:a,menuOpen:i,menuFlipPlacements:s,menuPlacement:d,scale:r}=this;return u("menu",n`<calcite-action-menu .flipPlacements=${s??["top","bottom"]} .hidden=${!e} .label=${a.options} .open=${i} .overlayPositioning=${this.overlayPositioning} .placement=${d} .scale=${r} .topLayerDisabled=${this.topLayerDisabled}><calcite-action class=${o(t.menuAction)} .icon=${S.menu} .scale=${r} slot=${j.trigger} .text=${a.options}></calcite-action><slot name=${l.headerMenuActions} @slotchange=${this.handleHeaderMenuActionsSlotChange}></slot></calcite-action-menu>`)}renderHeaderNode(){let{hasHeaderContent:e,hasHeaderDescription:a,hasHeaderHeading:i,hasStartActions:s,hasEndActions:d,closable:r,collapsible:m,hasMenuItems:f,hasActionBar:p,hasContentTop:h,heading:g,description:v}=this,b=this.renderHeaderContent(),C=e||(!!g||!!v||i||a)||s||d||m||r||f||p||h;return this.showHeaderContent=C,n`<header class=${o(t.header)} .hidden=${!(C||p||h)}><div class=${o({[t.headerContainer]:!0,[t.headerContainerBorderEnd]:p})} .hidden=${!C}>${this.renderHeaderStartActions()}${this.renderHeaderSlottedContent()}${b}${this.renderHeaderActionsEnd()}</div>${this.renderActionBar()}${this.renderContentTop()}</header>`}renderFooterNode(){let{hasFooterEndContent:e,hasFooterStartContent:a,hasFooterContent:i}=this,s=a||e||i;return n`<footer class=${o(t.footer)} .hidden=${!s}><div class=${o(t.footerContent)} .hidden=${!i}><slot name=${l.footer} @slotchange=${this.handleFooterSlotChange}></slot></div><div class=${o(t.footerStart)} .hidden=${i||!a}><slot name=${l.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot></div><div class=${o(t.footerEnd)} .hidden=${i||!e}><slot name=${l.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></div></footer>`}renderContent(){return n`<div class=${o(t.contentWrapper)} .hidden=${this.collapsible&&this.collapsed} @scroll=${this.panelScrollHandler} ${k(this.setPanelScrollEl)}><slot></slot>${this.renderFab()}</div>`}renderContentBottom(){return n`<div class=${o(t.contentBottom)} .hidden=${!this.hasContentBottom}><slot name=${l.contentBottom} @slotchange=${this.contentBottomSlotChangeHandler}></slot></div>`}renderContentTop(){return n`<div class=${o(t.contentTop)} .hidden=${!this.hasContentTop}><slot name=${l.contentTop} @slotchange=${this.contentTopSlotChangeHandler}></slot></div>`}renderFab(){return n`<div class=${o(t.fabContainer)} .hidden=${!this.hasFab}><slot name=${l.fab} @slotchange=${this.handleFabSlotChange}></slot></div>`}render(){let{disabled:e,loading:a,closed:i}=this,s=n`<article .ariaBusy=${a} class=${o(t.container)} .hidden=${i} ${k(this.containerRef)}>${this.renderHeaderNode()}${this.renderContent()}${this.renderContentBottom()}${this.renderFooterNode()}${u("alerts",n`<slot name=${l.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</article>`;return this.interactiveContainer({disabled:e,children:n`${a?n`<calcite-scrim .loading=${a}></calcite-scrim>`:null}${s}`})}};T("calcite-panel",E);export{E as Panel};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as w}from"./YBFI2FQL.js";import{a as u}from"./ZBN5LXKS.js";import{b as p}from"./WKR7R7AZ.js";import{a as d}from"./WGGFNK4Z.js";import{e as I}from"./YNG6JO67.js";import"./4Q7PL2KY.js";import{n as E,t as $,u as T}from"./RZR44QGM.js";import"./OAOQ5BXS.js";import{E as x,F as k,G as C,H as i,K as y,M as s,S,g,h as o,l as v,p as r}from"./XTGDCTQE.js";var n={actionsEnd:"actions-end",checkbox:"checkbox",checkboxContainer:"checkbox-container",checkboxLabel:"checkbox-label",chevron:"chevron",childrenContainer:"children-container",iconStart:"icon-start",itemExpanded:"item--expanded",nodeAndActionsContainer:"node-actions-container",nodeContainer:"node-container",selectionIcon:"selection-icon"},M={actionsEnd:"actions-end",children:"children"},l={blank:"blank",bulletPoint:"bullet-point",checkmark:"check",checkSquareF:"check-square-f",chevronRight:"chevron-right",minusSquareF:"minus-square-f",square:"square"},P=g`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-tree-item-spacing-unit: .25rem;--calcite-internal-tree-item-padding-block: .25rem;--calcite-internal-tree-item-children-container-padding: 1.25rem;--calcite-internal-tree-item-line-left-position: .75rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}:host(:is([scale=s],[scale=m])){--calcite-internal-tree-item-action-spacing: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-tree-item-spacing-unit: .5rem;--calcite-internal-tree-item-padding-block: .5rem;--calcite-internal-tree-item-children-container-padding: 1.5rem;--calcite-internal-tree-item-line-left-position: 1rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=l]){--calcite-internal-tree-item-action-spacing: var(--calcite-spacing-xs);--calcite-internal-tree-item-spacing-unit: .75rem;--calcite-internal-tree-item-padding-block: .625rem;--calcite-internal-tree-item-children-container-padding: 2.25rem;--calcite-internal-tree-item-line-left-position: 1.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host{display:block;max-inline-size:100%;cursor:pointer}:host .children-container ::slotted(*){padding-inline-start:var(--calcite-internal-tree-item-children-container-padding);overflow:hidden}.node-actions-container{display:flex}.node-actions-container .node-container,.node-actions-container .checkbox-container{gap:var(--calcite-internal-tree-item-spacing-unit)}.node-actions-container .node-container{padding-inline:var(--calcite-internal-tree-item-spacing-unit);padding-block:var(--calcite-internal-tree-item-padding-block)}.node-actions-container{color:var(--calcite-tree-text-color, var(--calcite-color-text-1))}.icon-start{--calcite-icon-color: var(--calcite-color-text-3)}:host([calcite-hydrated-hidden]){visibility:hidden!important;pointer-events:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([lines]) .children-container:after{position:absolute;inset-block-start:0px;z-index:var(--calcite-z-index);inline-size:1px;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);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;block-size:100%;inset-inline-start:var(--calcite-internal-tree-item-line-left-position);content:"";background-color:var(--calcite-color-border-2)}:host(:not([lines])) .node-container:after{display:none}::slotted(*){min-inline-size:0px;max-inline-size:100%;overflow-wrap:break-word;color:inherit;text-decoration:none!important}::slotted(*):hover{text-decoration:none!important}::slotted(a){inline-size:100%;text-decoration-line:none}:host{outline:2px solid transparent;outline-offset:2px}:host .node-container{outline-color:transparent}:host:focus .node-container,:host:active .node-container{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:focus:not([disabled])) .node-container{outline:2px solid transparent;outline-offset:2px;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:focus:not([disabled])) .checkbox{outline:2px solid transparent;outline-offset:2px}.actions-end{display:flex;flex-direction:row;align-items:center;align-self:stretch;gap:var(--calcite-internal-tree-item-action-spacing)}.checkbox-container{display:flex;align-items:center}.checkbox{line-height:0;color:var(--calcite-tree-selected-icon-color, var(--calcite-color-border-input))}.checkbox-label{pointer-events:none;display:flex;align-items:center}.children-container{display:grid;grid-template-rows:0fr;max-block-size:max-content;opacity:1;position:relative;transition:opacity var(--calcite-internal-animation-timing-slow) ease-in-out,grid-template-rows var(--calcite-internal-animation-timing-medium) ease-in-out}.item--expanded>.children-container{grid-template-rows:1fr;opacity:1;max-block-size:max-content}@starting-style{.item--expanded>.children-container{opacity:0;grid-template-rows:0fr}}.node-container{position:relative;display:flex;min-inline-size:0px;flex-grow:1;align-items:center}.node-container .selection-icon{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;color:var(--calcite-color-border-1)}.node-container:hover .selection-icon,:host([selected]) .node-container:hover .selection-icon,:host(:focus:not([disabled])) .node-container .selection-icon{opacity:1}:host([selected]) .node-container,:host([selected]) .node-container:hover{--calcite-internal-tree-item-text-color: var(--calcite-tree-text-color-selected, var(--calcite-color-text-1));font-weight:var(--calcite-font-weight-medium);color:var(--calcite-internal-tree-item-text-color)}:host([selected]) .node-container .icon-start,:host([selected]) .node-container:hover .icon-start{--calcite-icon-color: var(--calcite-internal-tree-item-text-color)}:host([selected]) .node-container .selection-icon,:host([selected]) .node-container:hover .selection-icon{opacity:1;color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([has-children]) .node-container .selection-icon{display:none}.chevron{position:relative;align-self:center;color:var(--calcite-color-text-3);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;flex:0 0 auto;transform:rotate(0)}.calcite--rtl .chevron{transform:rotate(180deg)}.item--expanded .node-container>.chevron{transform:rotate(90deg)}:host([selected]) .selection-icon{color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([selected]) .checkbox{color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([has-children][indeterminate]) .checkbox{color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([hidden]){display:none}[hidden]{display:none}`,f=class extends C{constructor(){super(),this.actionSlotWrapperRef=x(),this.childTree=null,this.direction=I(),this.isSelectionMultiLike=!1,this.userChangedValue=!1,this.interactiveContainer=w(this),this.hasEndActions=!1,this.updateAfterInitialRender=!1,this.depth=-1,this.disabled=!1,this.expanded=!1,this.indeterminate=!1,this.lines=!1,this.parentExpanded=!1,this.selected=!1,this.calciteInternalTreeItemSelect=r({cancelable:!1}),this.calciteTreeItemCollapse=r({cancelable:!1}),this.calciteTreeItemExpand=r({cancelable:!1}),this.calciteTreeItemSelect=r({cancelable:!1}),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={hasEndActions:[16,{},{state:!0}],updateAfterInitialRender:[16,{},{state:!0}],depth:[11,{},{reflect:!0,type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],hasChildren:[39,{},{reflect:!0,readOnly:!0,type:Boolean}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],indeterminate:[7,{},{reflect:!0,type:Boolean}],label:1,lines:[7,{},{reflect:!0,type:Boolean}],parentExpanded:[5,{},{type:Boolean}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=P}get hasChildren(){return!!this.childTree}connectedCallback(){super.connectedCallback(),this.parentTreeItem=this.el.parentElement?.closest("calcite-tree-item")??void 0}load(){requestAnimationFrame(()=>this.updateAfterInitialRender=!0)}willUpdate(e){this.preWillUpdate(),e.has("expanded")&&((this.hasUpdated||this.expanded!==!1)&&this.updateChildTree(),this.hasUpdated&&(this.expanded?this.calciteTreeItemExpand.emit():this.calciteTreeItemCollapse.emit())),e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.handleSelectedChange(this.selected),e.has("selectionMode")&&this.getSelectionMode()}loaded(){this.updateAncestorTree()}handleSelectedChange(e){this.selectionMode==="ancestors"&&!this.userChangedValue&&(e&&(this.indeterminate=!1),this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:!0,updateItem:!1})),this.userChangedValue&&(this.calciteTreeItemSelect.emit(),this.userChangedValue=!1)}getSelectionMode(){this.isSelectionMultiLike=this.selectionMode==="multiple"||this.selectionMode==="multichildren"}onClick(e){if(this.disabled||this.isActionEndEvent(e))return;let[t]=E(this.el,"a");if(t&&e.composedPath()[0].tagName.toLowerCase()!=="a"){let c=t.target===""?"_self":t.target;window.open(t.href,c)}this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.selectionMode==="ancestors"||this.isSelectionMultiLike,updateItem:!0}),this.userChangedValue=!0}iconClickHandler(e){e.stopPropagation(),this.expanded=!this.expanded}childrenClickHandler(e){e.stopPropagation()}keyDownHandler(e){if(!(this.isActionEndEvent(e)||e.defaultPrevented))switch(e.key){case" ":this.userChangedValue=!0,this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.isSelectionMultiLike,updateItem:!0}),e.preventDefault();break;case"Enter":{let t=Array.from(this.el.children).find(c=>c.matches("a"));this.userChangedValue=!0,t?(t.click(),this.selected=!0):this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.isSelectionMultiLike,updateItem:!0}),e.preventDefault()}}}updateChildTree(){let{childTree:e}=this;e&&(e.parentExpanded=this.expanded)}handleChildrenSlotChange(e){let t=T(e).filter(c=>c.matches("calcite-tree"))[0];this.childTree=t,this.requestUpdate("hasChildren"),this.updateChildTree()}isActionEndEvent(e){return e.composedPath().includes(this.actionSlotWrapperRef.value)}updateAncestorTree(){let e=this.parentTreeItem;if(!(this.selectionMode!=="ancestors"||!e)){if(this.selected){let t=this.el.parentElement;if(!t)return;let c=Array.from(t.children),h=c.filter(a=>a.selected);c.length===h.length?(e.selected=!0,e.indeterminate=!1):h.length>0&&(e.indeterminate=!0),Array.from(this.el.querySelectorAll("calcite-tree-item:not([disabled])")).forEach(a=>{a.selected=!0,a.indeterminate=!1})}else if(this.indeterminate){let t=this.parentTreeItem;t.indeterminate=!0}}}actionsEndSlotChangeHandler(e){this.hasEndActions=$(e)}preWillUpdate(){this.depth=0;let e=this.el.closest("calcite-tree");if(!e)return;this.selectionMode=e.selectionMode,this.scale=e.scale||"m",this.lines=e.lines;let t;for(;e&&(t=e.parentElement?.closest("calcite-tree")??null,t!==e);)e=t,this.depth=this.depth+1}getSelectionIcon(){let{selectionMode:e,hasChildren:t}=this;return e==="single"||e==="children"||e==="single-persist"?l.bulletPoint:e==="multiple"||e==="multichildren"?l.checkmark:e==="none"&&!t?l.blank:null}render(){let e=this.direction==="rtl",t=this.getSelectionIcon(),c=this.hasChildren&&this.indeterminate,h=this.hasChildren||this.selectionMode==="ancestors"?o`<calcite-icon class=${i({[n.chevron]:!0,[s.rtl]:e})} .icon=${this.hasChildren?l.chevronRight:l.blank} @click=${this.iconClickHandler} .scale=${d(this.scale)}></calcite-icon>`:null,m=u("default-slot",o`<slot></slot>`),a=this.selectionMode==="ancestors"?o`<div class=${i(n.checkboxContainer)}><calcite-icon class=${i(n.checkbox)} .icon=${this.selected?l.checkSquareF:c?l.minusSquareF:l.square} .scale=${d(this.scale)}></calcite-icon></div>`:null,A=t?o`<calcite-icon class=${i({[n.selectionIcon]:!0,[s.rtl]:e})} .icon=${t} .scale=${d(this.scale)}></calcite-icon>`:null,z=!(this.parentExpanded||this.depth===1),b=this.updateAfterInitialRender&&this.expanded,{hasEndActions:R}=this,q=u("actionsEndSlot",o`<slot name=${M.actionsEnd} @slotchange=${this.actionsEndSlotChangeHandler}></slot>`),L=o`<calcite-icon class=${i(n.iconStart)} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${d(this.scale)}></calcite-icon>`;return this.el.ariaChecked=this.selectionMode==="multiple"||this.selectionMode==="multichildren"||this.selectionMode==="ancestors"?p(this.selected):null,this.el.ariaExpanded=this.hasChildren?p(b):null,this.el.inert=z,this.el.ariaLive="polite",this.el.ariaSelected=this.selectionMode==="single"||this.selectionMode==="children"||this.selectionMode==="single-persist"?p(this.selected):null,this.el.role="treeitem",y(this.el,"tabIndex",this.disabled?-1:0),this.interactiveContainer({disabled:this.disabled,children:o`<div class=${i({[n.itemExpanded]:b})}><div class=${i(n.nodeAndActionsContainer)}><div class=${i({[n.nodeContainer]:!0,[s.rtl]:e})} data-selection-mode=${this.selectionMode??v}>${h}${A}${a||null}${this.iconStart?L:null}${a?o`<label class=${i(n.checkboxLabel)}>${m}</label>`:m}</div><div class=${i(n.actionsEnd)} .hidden=${!R} ${k(this.actionSlotWrapperRef)}>${q}</div></div><div class=${i({[n.childrenContainer]:!0,[s.rtl]:e})} @click=${this.childrenClickHandler} .role=${this.hasChildren?"group":void 0}><slot name=${M.children} @slotchange=${this.handleChildrenSlotChange}></slot></div></div>`})}};S("calcite-tree-item",f);export{f as TreeItem};
|
|
2
|
+
import{a as w}from"./QUFMR3GW.js";import{a as u}from"./YCBJZOJS.js";import{b as p}from"./WKR7R7AZ.js";import{a as d}from"./WGGFNK4Z.js";import{e as I}from"./EH5Y2TRK.js";import"./UANLRLKZ.js";import{n as E,t as $,u as T}from"./DVG3NA3H.js";import"./OAOQ5BXS.js";import{E as x,F as k,G as C,H as i,K as y,M as s,S,g,h as o,l as v,p as r}from"./PGOMURMZ.js";var n={actionsEnd:"actions-end",checkbox:"checkbox",checkboxContainer:"checkbox-container",checkboxLabel:"checkbox-label",chevron:"chevron",childrenContainer:"children-container",iconStart:"icon-start",itemExpanded:"item--expanded",nodeAndActionsContainer:"node-actions-container",nodeContainer:"node-container",selectionIcon:"selection-icon"},M={actionsEnd:"actions-end",children:"children"},l={blank:"blank",bulletPoint:"bullet-point",checkmark:"check",checkSquareF:"check-square-f",chevronRight:"chevron-right",minusSquareF:"minus-square-f",square:"square"},P=g`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-tree-item-spacing-unit: .25rem;--calcite-internal-tree-item-padding-block: .25rem;--calcite-internal-tree-item-children-container-padding: 1.25rem;--calcite-internal-tree-item-line-left-position: .75rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}:host(:is([scale=s],[scale=m])){--calcite-internal-tree-item-action-spacing: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-tree-item-spacing-unit: .5rem;--calcite-internal-tree-item-padding-block: .5rem;--calcite-internal-tree-item-children-container-padding: 1.5rem;--calcite-internal-tree-item-line-left-position: 1rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=l]){--calcite-internal-tree-item-action-spacing: var(--calcite-spacing-xs);--calcite-internal-tree-item-spacing-unit: .75rem;--calcite-internal-tree-item-padding-block: .625rem;--calcite-internal-tree-item-children-container-padding: 2.25rem;--calcite-internal-tree-item-line-left-position: 1.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host{display:block;max-inline-size:100%;cursor:pointer}:host .children-container ::slotted(*){padding-inline-start:var(--calcite-internal-tree-item-children-container-padding);overflow:hidden}.node-actions-container{display:flex}.node-actions-container .node-container,.node-actions-container .checkbox-container{gap:var(--calcite-internal-tree-item-spacing-unit)}.node-actions-container .node-container{padding-inline:var(--calcite-internal-tree-item-spacing-unit);padding-block:var(--calcite-internal-tree-item-padding-block)}.node-actions-container{color:var(--calcite-tree-text-color, var(--calcite-color-text-1))}.icon-start{--calcite-icon-color: var(--calcite-color-text-3)}:host([calcite-hydrated-hidden]){visibility:hidden!important;pointer-events:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([lines]) .children-container:after{position:absolute;inset-block-start:0px;z-index:var(--calcite-z-index);inline-size:1px;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);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;block-size:100%;inset-inline-start:var(--calcite-internal-tree-item-line-left-position);content:"";background-color:var(--calcite-color-border-2)}:host(:not([lines])) .node-container:after{display:none}::slotted(*){min-inline-size:0px;max-inline-size:100%;overflow-wrap:break-word;color:inherit;text-decoration:none!important}::slotted(*):hover{text-decoration:none!important}::slotted(a){inline-size:100%;text-decoration-line:none}:host{outline:2px solid transparent;outline-offset:2px}:host .node-container{outline-color:transparent}:host:focus .node-container,:host:active .node-container{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:focus:not([disabled])) .node-container{outline:2px solid transparent;outline-offset:2px;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:focus:not([disabled])) .checkbox{outline:2px solid transparent;outline-offset:2px}.actions-end{display:flex;flex-direction:row;align-items:center;align-self:stretch;gap:var(--calcite-internal-tree-item-action-spacing)}.checkbox-container{display:flex;align-items:center}.checkbox{line-height:0;color:var(--calcite-tree-selected-icon-color, var(--calcite-color-border-input))}.checkbox-label{pointer-events:none;display:flex;align-items:center}.children-container{display:grid;grid-template-rows:0fr;max-block-size:max-content;opacity:1;position:relative;transition:opacity var(--calcite-internal-animation-timing-slow) ease-in-out,grid-template-rows var(--calcite-internal-animation-timing-medium) ease-in-out}.item--expanded>.children-container{grid-template-rows:1fr;opacity:1;max-block-size:max-content}@starting-style{.item--expanded>.children-container{opacity:0;grid-template-rows:0fr}}.node-container{position:relative;display:flex;min-inline-size:0px;flex-grow:1;align-items:center}.node-container .selection-icon{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;color:var(--calcite-color-border-1)}.node-container:hover .selection-icon,:host([selected]) .node-container:hover .selection-icon,:host(:focus:not([disabled])) .node-container .selection-icon{opacity:1}:host([selected]) .node-container,:host([selected]) .node-container:hover{--calcite-internal-tree-item-text-color: var(--calcite-tree-text-color-selected, var(--calcite-color-text-1));font-weight:var(--calcite-font-weight-medium);color:var(--calcite-internal-tree-item-text-color)}:host([selected]) .node-container .icon-start,:host([selected]) .node-container:hover .icon-start{--calcite-icon-color: var(--calcite-internal-tree-item-text-color)}:host([selected]) .node-container .selection-icon,:host([selected]) .node-container:hover .selection-icon{opacity:1;color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([has-children]) .node-container .selection-icon{display:none}.chevron{position:relative;align-self:center;color:var(--calcite-color-text-3);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;flex:0 0 auto;transform:rotate(0)}.calcite--rtl .chevron{transform:rotate(180deg)}.item--expanded .node-container>.chevron{transform:rotate(90deg)}:host([selected]) .selection-icon{color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([selected]) .checkbox{color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([has-children][indeterminate]) .checkbox{color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([hidden]){display:none}[hidden]{display:none}`,f=class extends C{constructor(){super(),this.actionSlotWrapperRef=x(),this.childTree=null,this.direction=I(),this.isSelectionMultiLike=!1,this.userChangedValue=!1,this.interactiveContainer=w(this),this.hasEndActions=!1,this.updateAfterInitialRender=!1,this.depth=-1,this.disabled=!1,this.expanded=!1,this.indeterminate=!1,this.lines=!1,this.parentExpanded=!1,this.selected=!1,this.calciteInternalTreeItemSelect=r({cancelable:!1}),this.calciteTreeItemCollapse=r({cancelable:!1}),this.calciteTreeItemExpand=r({cancelable:!1}),this.calciteTreeItemSelect=r({cancelable:!1}),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={hasEndActions:[16,{},{state:!0}],updateAfterInitialRender:[16,{},{state:!0}],depth:[11,{},{reflect:!0,type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],hasChildren:[39,{},{reflect:!0,readOnly:!0,type:Boolean}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],indeterminate:[7,{},{reflect:!0,type:Boolean}],label:1,lines:[7,{},{reflect:!0,type:Boolean}],parentExpanded:[5,{},{type:Boolean}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=P}get hasChildren(){return!!this.childTree}connectedCallback(){super.connectedCallback(),this.parentTreeItem=this.el.parentElement?.closest("calcite-tree-item")??void 0}load(){requestAnimationFrame(()=>this.updateAfterInitialRender=!0)}willUpdate(e){this.preWillUpdate(),e.has("expanded")&&((this.hasUpdated||this.expanded!==!1)&&this.updateChildTree(),this.hasUpdated&&(this.expanded?this.calciteTreeItemExpand.emit():this.calciteTreeItemCollapse.emit())),e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.handleSelectedChange(this.selected),e.has("selectionMode")&&this.getSelectionMode()}loaded(){this.updateAncestorTree()}handleSelectedChange(e){this.selectionMode==="ancestors"&&!this.userChangedValue&&(e&&(this.indeterminate=!1),this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:!0,updateItem:!1})),this.userChangedValue&&(this.calciteTreeItemSelect.emit(),this.userChangedValue=!1)}getSelectionMode(){this.isSelectionMultiLike=this.selectionMode==="multiple"||this.selectionMode==="multichildren"}onClick(e){if(this.disabled||this.isActionEndEvent(e))return;let[t]=E(this.el,"a");if(t&&e.composedPath()[0].tagName.toLowerCase()!=="a"){let c=t.target===""?"_self":t.target;window.open(t.href,c)}this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.selectionMode==="ancestors"||this.isSelectionMultiLike,updateItem:!0}),this.userChangedValue=!0}iconClickHandler(e){e.stopPropagation(),this.expanded=!this.expanded}childrenClickHandler(e){e.stopPropagation()}keyDownHandler(e){if(!(this.isActionEndEvent(e)||e.defaultPrevented))switch(e.key){case" ":this.userChangedValue=!0,this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.isSelectionMultiLike,updateItem:!0}),e.preventDefault();break;case"Enter":{let t=Array.from(this.el.children).find(c=>c.matches("a"));this.userChangedValue=!0,t?(t.click(),this.selected=!0):this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.isSelectionMultiLike,updateItem:!0}),e.preventDefault()}}}updateChildTree(){let{childTree:e}=this;e&&(e.parentExpanded=this.expanded)}handleChildrenSlotChange(e){let t=T(e).filter(c=>c.matches("calcite-tree"))[0];this.childTree=t,this.requestUpdate("hasChildren"),this.updateChildTree()}isActionEndEvent(e){return e.composedPath().includes(this.actionSlotWrapperRef.value)}updateAncestorTree(){let e=this.parentTreeItem;if(!(this.selectionMode!=="ancestors"||!e)){if(this.selected){let t=this.el.parentElement;if(!t)return;let c=Array.from(t.children),h=c.filter(a=>a.selected);c.length===h.length?(e.selected=!0,e.indeterminate=!1):h.length>0&&(e.indeterminate=!0),Array.from(this.el.querySelectorAll("calcite-tree-item:not([disabled])")).forEach(a=>{a.selected=!0,a.indeterminate=!1})}else if(this.indeterminate){let t=this.parentTreeItem;t.indeterminate=!0}}}actionsEndSlotChangeHandler(e){this.hasEndActions=$(e)}preWillUpdate(){this.depth=0;let e=this.el.closest("calcite-tree");if(!e)return;this.selectionMode=e.selectionMode,this.scale=e.scale||"m",this.lines=e.lines;let t;for(;e&&(t=e.parentElement?.closest("calcite-tree")??null,t!==e);)e=t,this.depth=this.depth+1}getSelectionIcon(){let{selectionMode:e,hasChildren:t}=this;return e==="single"||e==="children"||e==="single-persist"?l.bulletPoint:e==="multiple"||e==="multichildren"?l.checkmark:e==="none"&&!t?l.blank:null}render(){let e=this.direction==="rtl",t=this.getSelectionIcon(),c=this.hasChildren&&this.indeterminate,h=this.hasChildren||this.selectionMode==="ancestors"?o`<calcite-icon class=${i({[n.chevron]:!0,[s.rtl]:e})} .icon=${this.hasChildren?l.chevronRight:l.blank} @click=${this.iconClickHandler} .scale=${d(this.scale)}></calcite-icon>`:null,m=u("default-slot",o`<slot></slot>`),a=this.selectionMode==="ancestors"?o`<div class=${i(n.checkboxContainer)}><calcite-icon class=${i(n.checkbox)} .icon=${this.selected?l.checkSquareF:c?l.minusSquareF:l.square} .scale=${d(this.scale)}></calcite-icon></div>`:null,A=t?o`<calcite-icon class=${i({[n.selectionIcon]:!0,[s.rtl]:e})} .icon=${t} .scale=${d(this.scale)}></calcite-icon>`:null,z=!(this.parentExpanded||this.depth===1),b=this.updateAfterInitialRender&&this.expanded,{hasEndActions:R}=this,q=u("actionsEndSlot",o`<slot name=${M.actionsEnd} @slotchange=${this.actionsEndSlotChangeHandler}></slot>`),L=o`<calcite-icon class=${i(n.iconStart)} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${d(this.scale)}></calcite-icon>`;return this.el.ariaChecked=this.selectionMode==="multiple"||this.selectionMode==="multichildren"||this.selectionMode==="ancestors"?p(this.selected):null,this.el.ariaExpanded=this.hasChildren?p(b):null,this.el.inert=z,this.el.ariaLive="polite",this.el.ariaSelected=this.selectionMode==="single"||this.selectionMode==="children"||this.selectionMode==="single-persist"?p(this.selected):null,this.el.role="treeitem",y(this.el,"tabIndex",this.disabled?-1:0),this.interactiveContainer({disabled:this.disabled,children:o`<div class=${i({[n.itemExpanded]:b})}><div class=${i(n.nodeAndActionsContainer)}><div class=${i({[n.nodeContainer]:!0,[s.rtl]:e})} data-selection-mode=${this.selectionMode??v}>${h}${A}${a||null}${this.iconStart?L:null}${a?o`<label class=${i(n.checkboxLabel)}>${m}</label>`:m}</div><div class=${i(n.actionsEnd)} .hidden=${!R} ${k(this.actionSlotWrapperRef)}>${q}</div></div><div class=${i({[n.childrenContainer]:!0,[s.rtl]:e})} @click=${this.childrenClickHandler} .role=${this.hasChildren?"group":void 0}><slot name=${M.children} @slotchange=${this.handleChildrenSlotChange}></slot></div></div>`})}};S("calcite-tree-item",f);export{f as TreeItem};
|