@esri/calcite-components 5.0.0-next.8 → 5.0.0-next.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{TZVVMP6G.js → 2BARN33W.js} +2 -2
- package/dist/cdn/{ILNFBSQB.js → 2WHMNE4E.js} +2 -2
- package/dist/cdn/{K6YKNQUT.js → 2Z4E2VJV.js} +1 -1
- package/dist/cdn/{6TNABCM5.js → 3JHWRZQG.js} +2 -2
- package/dist/cdn/{A6CUDZBX.js → 3JV2AIDH.js} +2 -2
- package/dist/cdn/{6JZ7SAKS.js → 3MXGC4PM.js} +2 -2
- package/dist/cdn/{D5AJHXJ4.js → 3NFSFBMV.js} +1 -1
- package/dist/cdn/{ZXBHKMPB.js → 3USDWQBC.js} +2 -2
- package/dist/cdn/{SAAQFUEX.js → 4MRCCGKL.js} +1 -1
- package/dist/cdn/{OG6JFIXA.js → 4OVU3FW6.js} +2 -2
- package/dist/cdn/{XRMB7KTN.js → 4VY37HR4.js} +2 -2
- package/dist/cdn/{QYP3QOHJ.js → 5HHRHTU3.js} +2 -2
- package/dist/cdn/{XUA5YCUJ.js → 5KUV5IKL.js} +2 -2
- package/dist/cdn/{ADADJVGW.js → 5U655FYR.js} +2 -2
- package/dist/cdn/{KFUCMD4S.js → 5U6SMIWW.js} +2 -2
- package/dist/cdn/{3WM5V7WU.js → 5YSSGIHA.js} +2 -2
- package/dist/cdn/{VCWSYYYR.js → 6EMTL6CP.js} +2 -2
- package/dist/cdn/{DWTELDF7.js → 6GZQSZFI.js} +2 -2
- package/dist/cdn/{WWAUAZIW.js → 6UXYHOEN.js} +2 -2
- package/dist/cdn/{UGE6RUEU.js → 6Y7CFF2P.js} +2 -2
- package/dist/cdn/{XUI4FY4J.js → 7GXJ5IXP.js} +2 -2
- package/dist/cdn/{6BRNJJCK.js → 7OF5HYSI.js} +1 -1
- package/dist/cdn/{YH5XY3T5.js → 7TDHO33B.js} +1 -1
- package/dist/cdn/{OVNM342V.js → 7ZQTR6NK.js} +2 -2
- package/dist/cdn/{AFSTGVEG.js → A5UO3FOD.js} +2 -2
- package/dist/cdn/{GJYBWZ4F.js → ACYTVUCT.js} +2 -2
- package/dist/cdn/{H75ERN4L.js → ADWDUQKS.js} +2 -2
- package/dist/cdn/{X2T3MVJ3.js → AFETSCBT.js} +2 -2
- package/dist/cdn/{YMXNBBL6.js → AJYQ24UY.js} +2 -2
- package/dist/cdn/{VO4PNP35.js → AVREH5PL.js} +1 -1
- package/dist/cdn/B7EJJLL2.js +4 -0
- package/dist/cdn/{3RXJQRX6.js → B7S77EFR.js} +2 -2
- package/dist/cdn/{NTKEL3R2.js → BC3TWZWD.js} +2 -2
- package/dist/cdn/{5A5TBLVX.js → BW7IBRVY.js} +2 -2
- package/dist/cdn/{UDYHM6SW.js → BZEA3FSE.js} +2 -2
- package/dist/cdn/{52GBKQ72.js → BZES4JUF.js} +2 -2
- package/dist/cdn/{D66BW652.js → C4XQYQN6.js} +2 -2
- package/dist/cdn/{5ROFNX6V.js → C672GPOS.js} +2 -2
- package/dist/cdn/{4SVDCJ2C.js → C7TNQUUT.js} +2 -2
- package/dist/cdn/{N5RQA7GT.js → CA5VTPZL.js} +2 -2
- package/dist/cdn/{B7BE3OC2.js → CCL4VI2V.js} +1 -1
- package/dist/cdn/{72BSI674.js → CK4ZUMFM.js} +2 -2
- package/dist/cdn/{QWWIAGJI.js → CRLVBD7P.js} +2 -2
- package/dist/cdn/{Y3IIXG7L.js → CWU46FKN.js} +2 -2
- package/dist/cdn/{AANEUK6N.js → CWXQLSD7.js} +2 -2
- package/dist/cdn/{7JXFFJ5I.js → CY3EFUSW.js} +2 -2
- package/dist/cdn/{MOSOXLSY.js → DAFLODFO.js} +2 -2
- package/dist/cdn/{ILA3M6MN.js → DIGZIS6B.js} +2 -2
- package/dist/cdn/{IO7KECSB.js → DY6T4UYD.js} +2 -2
- package/dist/cdn/{6SVW4DKL.js → EGVYJA2S.js} +2 -2
- package/dist/cdn/{OV2SVHTW.js → ENA65GGI.js} +1 -1
- package/dist/cdn/{CGG5GHGL.js → ERTCOMZS.js} +2 -2
- package/dist/cdn/{3ZWBDTT6.js → EVPZCNA3.js} +2 -2
- package/dist/cdn/{SSXUT4SO.js → EXGROQJZ.js} +2 -2
- package/dist/cdn/{KB32XHZ2.js → EZ2S7UZE.js} +2 -2
- package/dist/cdn/{2VDIR3UM.js → FAJQC7QP.js} +1 -1
- package/dist/cdn/{DBOCQBDP.js → FGEDJMCA.js} +2 -2
- package/dist/cdn/{SRWVTHAI.js → FXJECCVP.js} +2 -2
- package/dist/cdn/{SIY43BTE.js → G7MA33LP.js} +2 -2
- package/dist/cdn/{LANIS3Q7.js → GCURUGG5.js} +2 -2
- package/dist/cdn/{N52XXXOX.js → GDLHJSQA.js} +2 -2
- package/dist/cdn/{IO3TQCRX.js → GL7IG32G.js} +2 -2
- package/dist/cdn/{GUV4Z2RE.js → GOE44TSL.js} +2 -2
- package/dist/cdn/{5VRUJZYQ.js → GOFQ52ME.js} +2 -2
- package/dist/cdn/{HQLMUZYT.js → GQGUPMHY.js} +2 -2
- package/dist/cdn/{EB73YT65.js → GZ4A6OM5.js} +2 -2
- package/dist/cdn/{OLQ7HEJS.js → H5MCDA7V.js} +2 -2
- package/dist/cdn/{I75S2NSE.js → H7OQ263O.js} +2 -2
- package/dist/cdn/{NHOUT2TY.js → HAE2LNHX.js} +2 -2
- package/dist/cdn/{VN5IHOLR.js → HAWWZPMY.js} +2 -2
- package/dist/cdn/{CLK2RXH5.js → HD45NZCI.js} +2 -2
- package/dist/cdn/{KWOJAFOB.js → HHVD6JIK.js} +2 -2
- package/dist/cdn/{6UQWARXC.js → HKI73DGE.js} +2 -2
- package/dist/cdn/{5RSWLWMR.js → HKJMW6F7.js} +2 -2
- package/dist/cdn/{E7WJA2UX.js → HORFTWZW.js} +2 -2
- package/dist/cdn/{IOYRGZZT.js → HQ6XWKSQ.js} +2 -2
- package/dist/cdn/{JV6NQ2EY.js → HYF2MQ7L.js} +2 -2
- package/dist/cdn/{VYTT3BPP.js → HZDFNSUQ.js} +2 -2
- package/dist/cdn/{ZALNL73E.js → I2DG3VB5.js} +2 -2
- package/dist/cdn/{7JQL7G4X.js → IDYEGHLY.js} +1 -1
- package/dist/cdn/{43FCMUZO.js → IHP6K5KF.js} +2 -2
- package/dist/cdn/{BSAWRWMD.js → IPESLF2H.js} +1 -1
- package/dist/cdn/{Y6IS26N4.js → IYZWCZKJ.js} +2 -2
- package/dist/cdn/{EEFDFXEZ.js → JGNFXJAZ.js} +2 -2
- package/dist/cdn/{67NGJUQ6.js → JXNGNH4B.js} +2 -2
- package/dist/cdn/{3OPPGCLK.js → K5X4INHR.js} +2 -2
- package/dist/cdn/{Q7IPLO4E.js → KNHROAGJ.js} +2 -2
- package/dist/cdn/{MKUKG4DY.js → L2JXAF4S.js} +2 -2
- package/dist/cdn/{7MNQ2H6V.js → LAOKZI3G.js} +2 -2
- package/dist/cdn/{DBBBLQ3P.js → LCPNCPSR.js} +2 -2
- package/dist/cdn/{GUVL23G3.js → LDYVYCUU.js} +2 -2
- package/dist/cdn/{P4FZL7MQ.js → LNJTVVPG.js} +2 -2
- package/dist/cdn/{Q3D6JULT.js → LUVJ57H6.js} +2 -2
- package/dist/cdn/{2EEZ3SDU.js → LZTB3OXW.js} +1 -1
- package/dist/cdn/{KDXI5TBS.js → M2YIO4ZJ.js} +2 -2
- package/dist/cdn/{HPTZS7SN.js → MDPYSER7.js} +2 -2
- package/dist/cdn/{3B2F6YKT.js → ME6LQTZM.js} +2 -2
- package/dist/cdn/{I6266JET.js → MTFUHEQV.js} +2 -2
- package/dist/cdn/{T7TVKMS4.js → N7SLX5TO.js} +2 -2
- package/dist/cdn/{M4TSOCC7.js → NGUJXQI6.js} +2 -2
- package/dist/cdn/{BF5NLEIK.js → NXPHYR76.js} +2 -2
- package/dist/cdn/{T72GXIPU.js → O4XYCF7J.js} +2 -2
- package/dist/cdn/{FI7XRLVT.js → O5K3YARE.js} +2 -2
- package/dist/cdn/{STRZOXRR.js → O5NEL5IP.js} +2 -2
- package/dist/cdn/{E5CDW7MP.js → OC3TJUGO.js} +2 -2
- package/dist/cdn/{QIF52SIB.js → OCCUXDGQ.js} +2 -2
- package/dist/cdn/{2KCWMN3M.js → OHSYSQBH.js} +2 -2
- package/dist/cdn/{WF7G4PIS.js → OOJ7SL22.js} +2 -2
- package/dist/cdn/{AXLATHLT.js → OOUQ3M3H.js} +1 -1
- package/dist/cdn/{6OHEPIHO.js → OQGS4JG6.js} +2 -2
- package/dist/cdn/{GPPGM6W3.js → OZBFUSM7.js} +2 -2
- package/dist/cdn/{DFFPJQ2O.js → PLYIAXQV.js} +2 -2
- package/dist/cdn/{GUO5NT4Y.js → PRFX2EAM.js} +2 -2
- package/dist/cdn/{PDXN2LCU.js → PZC4XAFW.js} +2 -2
- package/dist/cdn/{3Y56FIAJ.js → QG4PHZ7G.js} +2 -2
- package/dist/cdn/{DNT7T43R.js → QIB552RY.js} +2 -2
- package/dist/cdn/{KOWXSEUI.js → QVN4FVFC.js} +2 -2
- package/dist/cdn/{66USAUAR.js → R3OJIU67.js} +2 -2
- package/dist/cdn/{LUDIA6AI.js → R3XNL4VU.js} +1 -1
- package/dist/cdn/{RBT5VAMZ.js → RD4WRCAW.js} +2 -2
- package/dist/cdn/{XR2KWTNI.js → RQ4TTDNQ.js} +2 -2
- package/dist/cdn/{VMLFKCDV.js → RTVQKMEH.js} +2 -2
- package/dist/cdn/{PQOK7D52.js → S7RKBANA.js} +2 -2
- package/dist/cdn/{7TMD7TRE.js → SBXJLUIE.js} +2 -2
- package/dist/cdn/{Z36DZEWA.js → SDKHGNEY.js} +2 -2
- package/dist/cdn/{AUBFPVNM.js → SWBLI6J3.js} +2 -2
- package/dist/cdn/{Z3VK6RWF.js → SWOLTCYK.js} +2 -2
- package/dist/cdn/{TEBGS4JL.js → SXMENGE3.js} +2 -2
- package/dist/cdn/{WKWSO4EA.js → T24J4SO6.js} +2 -2
- package/dist/cdn/{QDW2IIGN.js → T5U6YQC7.js} +2 -2
- package/dist/cdn/{DLEUECIA.js → TAAZSDK2.js} +2 -2
- package/dist/cdn/{YVRXDXPO.js → TARQFXEC.js} +2 -2
- package/dist/cdn/{IJ3H7NUF.js → TDJUFO5X.js} +1 -1
- package/dist/cdn/{IMQJBIBS.js → TFF2SYVS.js} +2 -2
- package/dist/cdn/{R5UWVCJ3.js → U327KAZL.js} +2 -2
- package/dist/cdn/{FQU73ZOW.js → U7RWV2NO.js} +1 -1
- package/dist/cdn/{LX5MAIJS.js → U7UYAYFG.js} +2 -2
- package/dist/cdn/{U4S2SBEI.js → UGGZGIP7.js} +1 -1
- package/dist/cdn/{J4S7SKVT.js → UHJDNYW5.js} +2 -2
- package/dist/cdn/{JH55KJKU.js → UHQFCDJN.js} +2 -2
- package/dist/cdn/{UN66HRBD.js → V254M3DB.js} +2 -2
- package/dist/cdn/{MXQKDB4W.js → V3J5C46M.js} +2 -2
- package/dist/cdn/{37M36WY5.js → VAY6A44S.js} +2 -2
- package/dist/cdn/{IV3FJYA2.js → VNODFBEJ.js} +1 -1
- package/dist/cdn/{XVAZT5EX.js → VP4GPYQO.js} +1 -1
- package/dist/cdn/{3ABZ4VT7.js → VTUXQPJQ.js} +2 -2
- package/dist/cdn/{ZOS3QJHS.js → VW657LF6.js} +2 -2
- package/dist/cdn/{NFG3CNTF.js → W4AINNGC.js} +2 -2
- package/dist/cdn/{TS4GAHH3.js → W4WRYQEW.js} +2 -2
- package/dist/cdn/{T4VYVRBG.js → WLSG2C6A.js} +2 -2
- package/dist/cdn/{BBQPZBPM.js → WM3W47JD.js} +1 -1
- package/dist/cdn/{JBANHMTF.js → WQ2ZQUNQ.js} +2 -2
- package/dist/cdn/{BWWJVNFT.js → WQBWKDSF.js} +2 -2
- package/dist/cdn/{E3BEYCUA.js → WTUGGKPL.js} +2 -2
- package/dist/cdn/{RA6NCPLV.js → WVQPMRAP.js} +2 -2
- package/dist/cdn/{U7ELLX4V.js → X5W6RDKI.js} +2 -2
- package/dist/cdn/{MZTNVQCU.js → X6IPXEPZ.js} +2 -2
- package/dist/cdn/{AVJQDQ6U.js → X7RXQY3G.js} +2 -2
- package/dist/cdn/{6AGC6K3V.js → XIBMRVK5.js} +1 -1
- package/dist/cdn/{KUFTR6GQ.js → XLLV2HT3.js} +2 -2
- package/dist/cdn/{WWAYRLYV.js → XO2GKHHO.js} +2 -2
- package/dist/cdn/{67MKHCYP.js → Y3EM5KGJ.js} +2 -2
- package/dist/cdn/{IMNKA6HM.js → Y3TRVUBX.js} +2 -2
- package/dist/cdn/{46YHD4LD.js → Y5W4ANZQ.js} +2 -2
- package/dist/cdn/{NSADMJXF.js → Y6HUHLFC.js} +2 -2
- package/dist/cdn/{IZFE2HHS.js → YCNXBJHZ.js} +2 -2
- package/dist/cdn/{2Z4DZ4NF.js → YD4RWCWT.js} +1 -1
- package/dist/cdn/{2J6BEP3Q.js → YHCOPOKP.js} +2 -2
- package/dist/cdn/{APNWS7U3.js → YJKUQ32V.js} +2 -2
- package/dist/cdn/{2W6KC4PJ.js → YZRE6JPP.js} +2 -2
- package/dist/cdn/{QG5UBL5J.js → Z5X4LDXX.js} +2 -2
- package/dist/cdn/{GS4XWDOH.js → ZFPVZBJ4.js} +1 -1
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/runtime.js +4 -4
- package/dist/components/calcite-block/customElement.d.ts +1 -0
- package/dist/components/calcite-block/customElement.js +16 -5
- package/dist/components/calcite-block/resources.d.ts +2 -0
- package/dist/docs/api.json +5 -1
- package/dist/docs/docs.json +5 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +6 -2
- package/package.json +2 -2
- package/dist/cdn/O5SN2D7L.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{b as o,c as r}from"./
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
|
+
import{b as o,c as r}from"./ENA65GGI.js";var t="Global";function i(n){return o(n).countries.length===0}function a(n){if(i(n))return t;let e=n.indexOf("/");return e===-1?n:n.slice(0,e)}function c(n){return r(n)?.id??n}export{t as a,a as b,c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{d as xe}from"./BBQPZBPM.js";import{a as Ce,b as ye}from"./QYP3QOHJ.js";import{a as Ie}from"./T7TVKMS4.js";import{b as V,c as Se,d as P,f as y,g as w}from"./52GBKQ72.js";import{a as F,b as O,d as n,e as p,f as z}from"./IV3FJYA2.js";import{a as ge}from"./DBOCQBDP.js";import{b as M}from"./43FCMUZO.js";import{a as be}from"./EEFDFXEZ.js";import{c as ue,d as me,e as fe}from"./IO3TQCRX.js";import{b as ve}from"./WKWSO4EA.js";import{a as ce,c as R,d as re,e as he,f as de,g as $,h as pe}from"./FI7XRLVT.js";import{a as oe}from"./P4FZL7MQ.js";import{a as ee,c as te,e as ie,f as se,h as le}from"./MKUKG4DY.js";import{a as Y,b as Z}from"./3ABZ4VT7.js";import{a as v}from"./UGE6RUEU.js";import{a as ne}from"./OLQ7HEJS.js";import{a as ae}from"./2Z4DZ4NF.js";import{a as E,b as D}from"./YH5XY3T5.js";import{a as Q}from"./7MNQ2H6V.js";import{a as K}from"./QDW2IIGN.js";import"./JV6NQ2EY.js";import{a as H,c as T}from"./BWWJVNFT.js";import"./NSADMJXF.js";import{f as S,i as X,l as J}from"./JH55KJKU.js";import{a as j}from"./6BRNJJCK.js";import{A as W,B as C,C as f,D as U,E as r,I as G,K as N,P as _,g as q,h as d,l as u,o as g}from"./ADADJVGW.js";var ke=q`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-internal-combobox-spacing-unit-l: .5rem;--calcite-internal-combobox-spacing-unit-s: .25rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) ;--calcite-internal-close-size: 1rem}:host([scale=s]) .x-button{margin-inline:.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-internal-combobox-spacing-unit-l: .75rem;--calcite-internal-combobox-spacing-unit-s: .5rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .375rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) ;--calcite-internal-close-size: 1.5rem}:host([scale=m]) .x-button{margin-inline-end:.75rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-internal-combobox-spacing-unit-l: 1rem;--calcite-internal-combobox-spacing-unit-s: .75rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .625rem;--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(.625rem - 1px) ;--calcite-internal-close-size: 2rem}:host([scale=l]) .x-button{margin-inline-end:1rem}.x-button{align-self:center}.wrapper{display:flex;border-width:1px;border-style:solid;outline-color:transparent;padding-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);background-color:var(--calcite-combobox-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));border-color:var(--calcite-combobox-input-border-color, var(--calcite-color-border-input))}.wrapper:hover .icon{color:var(--calcite-combobox-icon-color-hover, var(--calcite-color-text-1))}:host(:focus-within) .wrapper,.wrapper--active{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;gap:var(--calcite-internal-combobox-spacing-unit-s);margin-inline-end:var(--calcite-internal-combobox-spacing-unit-s)}.grid-input.selection-display--fit,.grid-input.selection-display--single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-internal-combobox-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;width:0px;min-width:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.placeholder-icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-width:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}@media(forced-colors:active){.wrapper,.floating-ui-container{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.list-container{max-height:45vh;overflow-y:auto;inline-size:var(--calcite-dropdown-width, 100%);background-color:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1))}.list{margin:0;display:block;padding:0}.list--hide{height:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);max-inline-size:100%}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.select-all{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-1));border-block-end-color:var(--calcite-combobox-divider-color, var(--calcite-combobox-item-border-color, var(--calcite-color-border-3)));border-block-end-style:solid;border-block-end-width:var(--calcite-border-width-sm);inset-block-start:0;position:sticky;z-index:var(--calcite-z-index-sticky)}.no-matches{padding-block:var(--calcite-internal-combobox-no-matches-spacing-unit-s);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));background:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1));cursor:pointer}.no-matches-placeholder{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3));cursor:default}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.x-button{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-style:none;cursor:pointer;outline-color:transparent;align-items:center;margin:0;background-color:var(--calcite-close-background-color, var(--calcite-color-foreground-2));-webkit-appearance:none;display:flex;align-content:center;justify-content:center;color:var(--calcite-close-icon-color, var(--calcite-color-text-3));block-size:var(--calcite-internal-close-size, 1.5rem);inline-size:var(--calcite-internal-close-size, 1.5rem);min-block-size:var(--calcite-internal-close-size, 1.5rem);min-inline-size:var(--calcite-internal-close-size, 1.5rem);padding:0}.x-button:hover,.x-button:focus{background-color:var(--calcite-close-background-color-hover, var(--calcite-color-foreground-3))}.x-button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.x-button:active{background-color:var(--calcite-close-background-color-press, var(--calcite-color-transparent-press))}.x-button calcite-icon{color:inherit}.x-button--round{border-radius:9999px}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,B=class extends U{constructor(){super(),this.closeButtonRef=C(),this.selectAllComboboxItemRef=C(),this.allSelectedIndicatorChipRef=C(),this.cancelable=ne()(this),this.filterItems=(()=>{let e=(t,i)=>t&&i.some(({el:s})=>t===s);return ae((t,i=!1,s=!0)=>{let l=Ie([...this.data,...this.groupData],t,this.effectiveFilterProps),a=this.getItemsAndGroups(),o=t==="";a.forEach(c=>{if(o){c.itemHidden=!1;return}let h=!e(c,l);c.itemHidden=h;let[m,k]=c.ancestors;(e(m,l)||e(k,l))&&(c.itemHidden=!1),h||c.ancestors.forEach(b=>b.itemHidden=!1)}),this.noMatchesFound=this.filteredItems.length===0&&!!this.filterText,this.filterTextMatchPattern=this.filterText&&new RegExp(`(${M(this.filterText)})`,"i"),this.keyboardNavItems.forEach(c=>{c.filterTextMatchPattern=this.filterTextMatchPattern}),i&&(this.open=this.filterText.trim().length>0),s&&this.calciteComboboxFilterChange.emit()},N.filter)})(),this._filterText="",this.getSelectedItems=()=>{if(!this.isMulti()){let e=this.items.find(({selected:t})=>t);return e?[e]:[]}return this.items.filter(e=>e.selected&&(this.selectionMode!=="ancestors"||!P(e))).sort((e,t)=>{let i=this.selectedItems.indexOf(e),s=this.selectedItems.indexOf(t);return i>-1&&s>-1?i-s:s-i})},this.groupItems=[],this.guid=j(),this.ignoreSelectedEventsFlag=!1,this.inputHeight=0,this.internalValueChangeFlag=!1,this.mutationObserver=E("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.transitionProp="opacity",this.placement=ce,this.resizeObserver=E("resize",()=>{this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}),this.selectedIndicatorChipRef=C(),this._selectedItems=[],this.textInputRef=C(),this._value=null,this.messages=Q(),this.focusSetter=K()(this),this.customChipAddHandler=()=>{this.addCustomChip(this.filterText,!0)},this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.items=[],this.clearDisabled=!1,this.disabled=!1,this.maxItems=0,this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.readOnly=!1,this.required=!1,this.scale="m",this.selectAllEnabled=!1,this.selectionDisplay="all",this.selectionMode="multiple",this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.calciteComboboxBeforeClose=g({cancelable:!1}),this.calciteComboboxBeforeOpen=g({cancelable:!1}),this.calciteComboboxChange=g({cancelable:!1}),this.calciteComboboxChipClose=g({cancelable:!1}),this.calciteComboboxClose=g({cancelable:!1}),this.calciteComboboxFilterChange=g({cancelable:!1}),this.calciteComboboxOpen=g({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteComboboxItemChange",this.calciteComboboxItemChangeHandler),this.listen("calciteInternalComboboxItemChange",this.calciteInternalComboboxItemChangeHandler),this.listen("click",this.comboboxFocusHandler)}static{this.properties={activeChipIndex:[16,{},{state:!0}],activeDescendant:[16,{},{state:!0}],activeItemIndex:[16,{},{state:!0}],compactSelectionDisplay:[16,{},{state:!0}],selectedHiddenChipsCount:[16,{},{state:!0}],selectedVisibleChipsCount:[16,{},{state:!0}],items:[16,{},{state:!0}],noMatchesFound:[16,{},{state:!0}],allowCustomValues:[7,{},{reflect:!0,type:Boolean}],clearDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],filterText:[3,{},{reflect:!0}],filterProps:[0,{},{attribute:!1}],filteredItems:[32,{},{attribute:!1,readOnly:!0}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],label:1,labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placeholder:1,placeholderIcon:[3,{type:String},{reflect:!0}],placeholderIconFlipRtl:[7,{},{reflect:!0,type:Boolean}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectAllEnabled:[7,{},{reflect:!0,type:Boolean}],selectedItems:[0,{},{attribute:!1}],selectionDisplay:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:G,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1}}static{this.styles=ke}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(e=>e!=="el"):["description","label","metadata","shortHeading","textLabel"]}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:i,open:s}=this,l=i[0],a=l?.icon,o=y(t);return!s&&l?!!a&&o:!!e&&(!l||o)}get allSelected(){return this.selectedItems.length===this.items.length}get indeterminate(){return this.selectedItems.length>0&&!this.allSelected}get keyboardNavItems(){let{selectAllComboboxItemRef:e}=this,t=this.filteredItems.filter(i=>!i.disabled);return e.value?[e.value,...t]:t}get filterText(){return this._filterText}set filterText(e){let t=this._filterText;e!==t&&(this._filterText=e,this.filterTextChange(e))}get filteredItems(){return this.items.filter(e=>!T(e))}get selectedItems(){return this._selectedItems}set selectedItems(e){let t=this._selectedItems;e!==t&&(this._selectedItems=e,this.selectedItemsHandler())}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueHandler(e))}async reposition(e=!1){let{floatingEl:t,referenceEl:i,placement:s,overlayPositioning:l,filteredFlipPlacements:a}=this;return he(this,{floatingEl:t,referenceEl:i,overlayPositioning:l,placement:s,flipPlacements:a,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>(this.activeChipIndex=-1,this.activeItemIndex=-1,this.textInputRef.value),e)}connectedCallback(){super.connectedCallback(),ue(this),te(this),this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),$(this),this.cancelable.add(this.filterItems)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("maxItems")&&(this.hasUpdated||this.maxItems!==0)&&this.setMaxScrollerHeight(),e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")&&this.reposition(!0),(e.has("selectionMode")||e.has("scale"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler()}updated(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),Y(this),this.refreshSelectionDisplay()}async load(){this.handleSelectionModeWarning()}loaded(){se(this,this.getValue()),$(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),me(this),ie(this),pe(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open?this.floatingEl.showPopover():this.floatingEl.hidePopover())}emitComboboxChange(){this.calciteComboboxChange.emit()}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){oe(this),!this.disabled&&(this.setMaxScrollerHeight(),this.handlePopover())}handleDisabledChange(e){e||(this.open=!1)}valueHandler(e){this.internalValueChangeFlag||(this.getItems().forEach(t=>{t.selected=Array.isArray(e)?e.includes(t.value):e===t.value}),this.updateItems())}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1}async documentClickHandler(e){this.disabled||e.composedPath().includes(this.el)||(await this.componentOnReady(),!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1)),this.allowCustomValues&&this.filterText.trim().length&&this.addCustomChip(this.filterText),this.open=!1)}handleSelectAll(e){e&&this.toggleSelectAll(),this.allSelected&&this.selectedItems.forEach(t=>{let i=this.referenceEl.querySelector(`#${p.chip(t.guid)}`);i&&this.hideChip(i)})}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,i=e.composedPath().includes(this.selectAllComboboxItemRef.value);this.selectAllEnabled&&this.handleSelectAll(i);let s=this.keyboardNavItems.indexOf(i?this.selectAllComboboxItemRef.value:t);this.updateActiveItemIndex(s),this.toggleSelection(t,t.selected),this.selectedItems=this.getSelectedItems()}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.hasUpdated&&this.updateItems()}clearValue(){this.ignoreSelectedEventsFlag=!0,this.items.forEach(e=>e.selected=!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=[],this.emitComboboxChange(),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}clearInputValue(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?re(t,e):null}getValue(){let e=this.selectedItems.map(t=>t.value?.toString());return e.length?e.length>1?e:e[0]:""}comboboxInViewport(){let e=this.el.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.right<=(window.innerWidth||document.documentElement.clientWidth)&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)}toggleSelectAll(){let e=!this.allSelected;this.items.forEach(t=>t.selected=e),this.selectedItems=e?this.items:[],this.emitComboboxChange()}keyDownHandler(e){if(this.readOnly)return;let{key:t}=e;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):this.open?(this.open=!1,e.preventDefault()):!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1));break;case"ArrowLeft":(this.activeChipIndex!==-1||this.textInputRef.value.selectionStart===0)&&(this.previousChip(),e.preventDefault());break;case"ArrowRight":this.activeChipIndex!==-1&&(this.nextChip(),e.preventDefault());break;case"ArrowUp":this.keyboardNavItems.length&&(e.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView()),this.scrollToActiveOrSelectedItem();break;case"ArrowDown":this.keyboardNavItems.length&&(e.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":!this.textInputRef.value.value&&!e.defaultPrevented&&(this.open||(this.open=!0,this.shiftActiveItemIndex(1)),e.preventDefault());break;case"Home":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":!this.clearDisabled&&!this.open&&this.clearValue(),this.open=!1,e.preventDefault();break;case"Enter":this.open&&this.activeItemIndex>-1?(this.keyboardNavItems[this.activeItemIndex].toggleSelection(),e.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(),e.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):e.defaultPrevented||ee(this)&&e.preventDefault();break;case"Delete":case"Backspace":{if(this.selectionDisplay==="single"||this.selectionDisplay==="fit"&&this.selectedHiddenChipsCount>0)return;this.activeChipIndex>-1?(e.preventDefault(),this.removeActiveChip()):!this.filterText&&this.isMulti()&&(e.preventDefault(),this.removeLastChip());break}}}onBeforeOpen(){this.scrollToActiveOrSelectedItem(),this.calciteComboboxBeforeOpen.emit()}onOpen(){this.scrollToActiveOrSelectedItem(!0),this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),de(this)}async setMaxScrollerHeight(){let{listContainerEl:e,open:t,referenceEl:i}=this;if(!e||!t)return;await this.reposition(!0);let s=this.getMaxScrollerHeight();e.style.maxBlockSize=s>0?`${s}px`:"",e.style.inlineSize=`${i.clientWidth}px`,await this.reposition(!0)}calciteChipCloseHandler(e){this.open=!1;let t=this.items.find(i=>i===e);t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()}clickHandler(e){if(this.readOnly)return;let t=e.composedPath();if(t.some(i=>i.tagName==="CALCITE-CHIP")){this.open=!1,e.preventDefault();return}if(t.some(i=>i.classList?.contains(Ce.button))){this.clearValue(),e.preventDefault();return}this.open=!this.open,this.ensureRecentSelectedItemIsActive()}ensureRecentSelectedItemIsActive(){let{selectedItems:e}=this,t=e.length===0?0:this.items.indexOf(e[e.length-1]);this.updateActiveItemIndex(t)}hideChip(e){e.classList.add(n.chipInvisible)}showChip(e){e.classList.remove(n.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:i}){e.forEach(s=>{if(!s.selected)this.hideChip(s);else{let l=S(s);if(l&&l<t){t-=l+i,this.showChip(s);return}}this.hideChip(s)})}async refreshSelectionDisplay(){if(this.componentOnReady(),y(this.selectionMode)||!this.textInputRef.value||!this.chipContainerEl)return;let{allSelectedIndicatorChipRef:e,chipContainerEl:t,selectionDisplay:i,placeholder:s,selectedIndicatorChipRef:l,textInputRef:a}=this,o=parseInt(getComputedStyle(t).gap.replace("px","")),c=S(t),{fontSize:h,fontFamily:m}=getComputedStyle(a.value),b=(X(s,`${h} ${m}`)||parseInt(xe))+o,A=S(e.value),L=S(l.value),$e=Math.max(A,L);if(this.setCompactSelectionDisplay({chipContainerElGap:o,chipContainerElWidth:c,inputWidth:b,largestSelectedIndicatorChipWidth:$e}),this.allSelected&&this.selectAllEnabled&&this.selectedItems.forEach(I=>{let x=this.referenceEl.querySelector(`#${p.chip(I.guid)}`);x&&this.hideChip(x)}),this.indeterminate&&this.selectedItems.forEach(I=>{let x=this.referenceEl.querySelector(`#${p.chip(I.guid)}`);x&&this.showChip(x)}),i==="fit"){let I=Array.from(this.el.shadowRoot.querySelectorAll("calcite-chip")).filter(we=>we.closable),x=Math.round(c-((this.selectedHiddenChipsCount>0?L:0)+o+b+o));this.refreshChipDisplay({availableHorizontalChipElSpace:x,chipContainerElGap:o,chipEls:I}),this.setVisibleAndHiddenChips(I)}}setFloatingEl(e){this.floatingEl=e,$(this),this.handlePopover()}setCompactSelectionDisplay({chipContainerElGap:e,chipContainerElWidth:t,inputWidth:i,largestSelectedIndicatorChipWidth:s}){let l=Math.round(s+e+i);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<l)&&(this.maxCompactBreakpoint=l),this.compactSelectionDisplay=t<this.maxCompactBreakpoint}setContainerEl(e){D(this.resizeObserver,this.listContainerEl,e),this.listContainerEl=e,this.transitionEl=e}setChipContainerEl(e){D(this.resizeObserver,this.chipContainerEl,e),this.chipContainerEl=e}setReferenceEl(e){this.referenceEl=e,$(this)}setVisibleAndHiddenChips(e){let t=0;e.forEach(s=>{s.selected&&!s.classList.contains(n.chipInvisible)&&t++}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let i=this.getSelectedItems().length-t;i!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=i)}getMaxScrollerHeight(){let t=[...this.groupItems,...this.getItems(!0)].filter(a=>!T(a)),{maxItems:i}=this,s=0,l=0;return t.length>=i&&t.forEach(a=>{if(s<i){let o=this.calculateScrollerHeight(a);l+=o,s+=1}}),l}calculateScrollerHeight(e){if(!e)return 0;let t=e.getBoundingClientRect().height,i=`:scope > ${F}, :scope > ${O}`,s=Array.from(e.querySelectorAll(i)).reduce((l,a)=>l+a.getBoundingClientRect().height,0);return t-s}inputHandler(e){let t=e.target.value;this.filterText=t}getItemsAndGroups(){return[...this.groupItems,...this.items]}toggleSelection(e,t){!e||this.selectionMode==="single-persist"&&e.selected&&e.value===this.value&&!t||(this.isMulti()?this.handleMultiSelection(e,t):this.handleSingleSelection(e,t))}handleMultiSelection(e,t){e.selected=t,this.updateAncestors(e),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")}handleSingleSelection(e,t){this.ignoreSelectedEventsFlag=!0,this.items.forEach(i=>i.selected=i===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInputRef.value&&(this.textInputRef.value.value=w(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=V(e),i=Se(e);e.selected?t.forEach(s=>{s.selected=!0}):(i.forEach(s=>s.selected=!1),[...t].forEach(s=>{P(s)||(s.selected=!1)}))}updateItems(){this.items=this.getItems(),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.groupData=this.getGroupData(),this.updateItemProps(),this.selectedItems=this.getSelectedItems()}updateItemProps(){this.getItems(!0).forEach(e=>{e.selectionMode=this.selectionMode,e.scale=this.scale}),this.groupItems.forEach((e,t)=>(e.scale=this.scale,e.position=t)),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach((e,t,i)=>{t===0&&(e.afterEmptyGroup=!1);let s=i[t+1];s&&(s.afterEmptyGroup=e.children.length===0)})}getData(){return this.items.map(e=>({description:e.description,filterDisabled:e.filterDisabled,label:e.heading,metadata:e.metadata,shortHeading:e.shortHeading,textLabel:e.textLabel,el:e}))}getGroupData(){return this.groupItems.map(e=>({label:e.label,el:e}))}resetText(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}getItems(e=!1){return Array.from(this.el.querySelectorAll(F)).filter(i=>e||!i.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(O))}addCustomChip(e,t){let i=this.items.find(s=>(s.heading||s.textLabel)===e);if(i)this.toggleSelection(i,!0);else{let s=document.createElement("calcite-combobox-item");s.value=e,s.heading=e,this.el.prepend(s),this.updateItems(),this.toggleSelection(s,!0),this.open=!0,t&&this.setFocus()}}removeActiveChip(){this.toggleSelection(this.selectedItems[this.activeChipIndex],!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex+1;t>e?(this.activeChipIndex=-1,J(this.textInputRef.value)):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl.querySelector(`#${p.chip(e)}`):null)?.setFocus()}scrollToActiveOrSelectedItem(e=!1){let t=e&&this.selectedItems?.length?this.selectedItems[0]:this.keyboardNavItems[this.activeItemIndex],i=this.listContainerEl;if(!t||!i)return;t.scrollIntoView({block:"nearest"});let l=this.selectAllComboboxItemRef.value?.offsetHeight||0,a=t.getBoundingClientRect(),o=i.getBoundingClientRect();a.top<o.top+l&&(i.scrollTop-=o.top+l-a.top)}shiftActiveItemIndex(e){let{length:t}=this.keyboardNavItems,i=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(i),this.scrollToActiveOrSelectedItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t=null;this.keyboardNavItems.forEach((i,s)=>{s===e?(i.active=!0,t=`${p.item(i.guid)}`):i.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return!y(this.selectionMode)}comboboxFocusHandler(){this.disabled||this.textInputRef.value.focus()}createScreenReaderItem({ariaLabel:e,ariaSelected:t,id:i,textContent:s}){return d`<li aria-label=${e??u} aria-selected=${t??u} id=${i??u} role=option tabindex=-1>${s}</li>`}handleSelectionModeWarning(){this.selectionMode==="single-persist"&&this.clearDisabled&&console.warn('clearDisabled is ignored when selection-mode is set to "single-persist"')}getDescriptionMessage(){let e=Array.isArray(this.value)?this.value.join(", "):this.value;return this.readOnly?this.messages.nonEditable?.replace("{value}",`${e}`):e}renderChips(){let{activeChipIndex:e,readOnly:t,scale:i,selectionMode:s,messages:l}=this;return this.selectAllEnabled&&this.allSelected?null:this.selectedItems.map((a,o)=>{let c={[n.chip]:!0},h=[...V(a)].reverse(),m=w(a),k=[...h,a].map(A=>w(A)),b=s!=="ancestors"?m:k.join(" / ");return v(m,d`<calcite-chip .appearance=${t?"outline":"solid"} class=${r(c)} .closable=${!t} data-test-id=${`chip-${o}`} .icon=${a.icon} .iconFlipRtl=${a.iconFlipRtl} id=${(a.guid?`${p.chip(a.guid)}`:null)??u} .label=${b} .messageOverrides=${{dismissLabel:l.removeTag}} @focusin=${()=>this.activeChipIndex=o} @calciteChipClose=${()=>this.calciteChipCloseHandler(a)} .scale=${i} .selected=${a.selected} .tabIndex=${e===o?0:-1} title=${b??u} .value=${a.value}>${b}</calcite-chip>`)})}renderAllSelectedIndicatorChip(){let{allSelectedIndicatorChipRef:e,compactSelectionDisplay:t,scale:i,selectedVisibleChipsCount:s}=this,l=t?this.messages.all:this.messages.allSelected;return d`<calcite-chip class=${r({[n.chip]:!0,[n.chipInvisible]:!(this.allSelected&&!s),[n.allSelected]:!0})} data-test-id=all-selected-indicator-chip .label=${l} .scale=${i} title=${l??u} value ${f(e)}>${l}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,getSelectedItems:i,scale:s,selectedHiddenChipsCount:l,selectedVisibleChipsCount:a,selectedIndicatorChipRef:o}=this,c,h;if(e)c=!0;else if(t==="single"){let m=i().length;this.allSelected?c=!0:m>0?c=!1:c=!0,h=`${m} ${this.messages.selected}`}else t==="fit"&&(c=!!(this.allSelected&&a===0||l===0),h=a>0?`+${l}`:`${l} ${this.messages.selected}`);return d`<calcite-chip class=${r({[n.chip]:!0,[n.chipInvisible]:c})} .label=${h} .scale=${s} title=${h??u} value ${f(o)}>${h}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,getSelectedItems:i,scale:s,selectedHiddenChipsCount:l}=this,a,o;if(e){let c=i().length;this.allSelected?a=!0:t==="fit"?(a=!(l>0),o=`${l||0}`):t==="single"&&(a=!(c>0),o=`${c}`)}else a=!0;return d`<calcite-chip class=${r({[n.chip]:!0,[n.chipInvisible]:a})} .label=${o} .scale=${s} title=${o??u} value>${o}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:i,selectionMode:s,selectedItems:l,open:a}=this,o=y(s),c=l[0],h=!a&&o&&!!c&&!this.filterText;return d`<span class=${r({[n.inputWrap]:!0,[n.inputWrapSingle]:o})}>${h&&v("label",d`<span class=${r({[n.label]:!0,[n.labelIcon]:!!c?.icon})}>${w(c)}</span>`)||""}${v("input",d`<input aria-activedescendant=${this.activeDescendant??u} aria-controls=${`${p.listbox(e)}`} aria-errormessage=${p.validationMessage} aria-owns=${`${p.listbox(e)}`} aria-autocomplete=list .ariaDescription=${this.getDescriptionMessage()} .ariaExpanded=${a} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${fe(this)} class=${r({[n.input]:!0,[n.inputSingle]:!0,[n.inputHidden]:h,[n.inputIcon]:this.showingInlineIcon&&!!this.placeholderIcon})} data-test-id=input .disabled=${t} .id=${`${p.input(e)}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${i??u} .readOnly=${this.readOnly} .required=${this.required} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${W(this.filterText??"")} ${f(this.textInputRef)}>`)}</span>`}renderListBoxOptions(){let e=this.keyboardNavItems.map(t=>this.createScreenReaderItem({ariaLabel:t.label,ariaSelected:t.selected,id:`${p.item(t.guid)}`,textContent:t.heading||t.textLabel}));if(this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"){let t=this.createScreenReaderItem({ariaLabel:this.messages.selectAll,ariaSelected:this.allSelected,textContent:this.messages.selectAll});t&&e.unshift(t)}return e}renderFloatingUIContainer(){let{messages:e,setFloatingEl:t,setContainerEl:i,open:s,scale:l}=this,a={[n.listContainer]:!0,[R.animation]:!0,[R.animationActive]:s},o=(this.filterText&&e.add?.replace("{text}",`${this.filterText}`))??"";return d`<div aria-hidden=true class=${r(n.floatingUIContainer)} popover=manual ${f(t)}><div class=${r(a)} ${f(i)}><ul class=${r({[n.list]:!0,[n.listHide]:!s})}>${this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"&&d`<calcite-combobox-item class=${r(n.selectAll)} .id=${`${this.guid}-select-all-enabled-interactive`} .indeterminate=${this.indeterminate} .label=${e.selectAll} .scale=${l} .selected=${this.allSelected} tabindex=-1 text-label=${e.selectAll??u} value=select-all ${f(this.selectAllComboboxItemRef)}></calcite-combobox-item>`||""}<slot></slot>${this.noMatchesFound&&(this.allowCustomValues?d`<li aria-label=${o??u} class=${r(n.noMatches)} @click=${this.customChipAddHandler} role=option tabindex=0>${ve({text:o,pattern:new RegExp(`(${M(this.filterText)})`,"i")})}</li>`:d`<li class=${r({[n.noMatchesPlaceholder]:!0,[n.noMatches]:!0})}>${e.noMatches}</li>`)||""}</ul></div></div>`}renderSelectedOrPlaceholderIcon(){let{open:e,placeholderIcon:t,placeholderIconFlipRtl:i,selectedItems:s}=this,l=s[0],a=l?.icon,o=t&&(e||!l);return this.showingInlineIcon&&v("selected-placeholder-icon",d`<span class=${r(n.iconStart)}><calcite-icon class=${r({[n.selectedIcon]:!o,[n.placeholderIcon]:o})} .flipRtl=${o?i:l.iconFlipRtl} .icon=${o?t:a} .scale=${H(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return v("chevron",d`<span class=${r(n.iconEnd)}><calcite-icon class=${r(n.icon)} .icon=${e?z.chevronUp:z.chevronDown} .scale=${H(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:i,open:s,readOnly:l}=this,a=y(this.selectionMode),o=e==="all",c=e==="single",h=!a&&e==="fit",m=!this.clearDisabled&&this.selectionMode!=="single-persist"&&!!this.value?.length;return Z({disabled:this.disabled,children:d`${this.labelText&&be({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-live=polite class=${r({[n.wrapper]:!0,[n.wrapperSingle]:a||!this.selectedItems.length,[n.wrapperActive]:s})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${f(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${v("grid",d`<div class=${r({[n.gridInput]:!0,[n.selectionDisplayFit]:h,[n.selectionDisplaySingle]:c})} ${f(this.setChipContainerEl)}>${!a&&!c&&this.renderChips()||""}${!a&&!c&&this.selectAllEnabled&&this.renderAllSelectedIndicatorChip()||""}${!a&&!o&&[this.renderSelectedIndicatorChip(),this.renderSelectedIndicatorChipCompact(),this.renderAllSelectedIndicatorChip()]||""}<label class=${r(n.screenReadersOnly)} .htmlFor=${`${p.input(t)}`} .id=${`${p.label(t)}`}>${i}</label>${this.renderInput()}</div>`)}${!l&&m?v("close-button",ye({disabled:this.disabled,label:this.messages.clear,ref:this.closeButtonRef,scale:this.scale})):null}${!l&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${p.label(t)}`} aria-multiselectable=true class=${r(n.screenReadersOnly)} .id=${`${p.listbox(t)}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${le({component:this})}${this.validationMessage&&this.status==="invalid"?ge({icon:this.validationIcon,id:p.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};_("calcite-combobox",B);export{B as Combobox};
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
|
+
import{d as xe}from"./WM3W47JD.js";import{a as Ce,b as ye}from"./5HHRHTU3.js";import{a as Ie}from"./N7SLX5TO.js";import{b as V,c as Se,d as P,f as y,g as w}from"./BZES4JUF.js";import{a as F,b as O,d as n,e as p,f as z}from"./VNODFBEJ.js";import{a as ge}from"./FGEDJMCA.js";import{b as M}from"./IHP6K5KF.js";import{a as be}from"./JGNFXJAZ.js";import{c as ue,d as me,e as fe}from"./GL7IG32G.js";import{b as ve}from"./T24J4SO6.js";import{a as ce,c as R,d as re,e as he,f as de,g as $,h as pe}from"./O5K3YARE.js";import{a as oe}from"./LNJTVVPG.js";import{a as ee,c as te,e as ie,f as se,h as le}from"./L2JXAF4S.js";import{a as Y,b as Z}from"./VTUXQPJQ.js";import{a as v}from"./6Y7CFF2P.js";import{a as ne}from"./H5MCDA7V.js";import{a as ae}from"./YD4RWCWT.js";import{a as E,b as D}from"./7TDHO33B.js";import{a as Q}from"./LAOKZI3G.js";import{a as K}from"./T5U6YQC7.js";import"./HYF2MQ7L.js";import{a as H,c as T}from"./WQBWKDSF.js";import"./Y6HUHLFC.js";import{f as S,i as X,l as J}from"./UHQFCDJN.js";import{a as j}from"./7OF5HYSI.js";import{A as W,B as C,C as f,D as U,E as r,I as G,K as N,P as _,g as q,h as d,l as u,o as g}from"./5U655FYR.js";var ke=q`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-internal-combobox-spacing-unit-l: .5rem;--calcite-internal-combobox-spacing-unit-s: .25rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) ;--calcite-internal-close-size: 1rem}:host([scale=s]) .x-button{margin-inline:.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-internal-combobox-spacing-unit-l: .75rem;--calcite-internal-combobox-spacing-unit-s: .5rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .375rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) ;--calcite-internal-close-size: 1.5rem}:host([scale=m]) .x-button{margin-inline-end:.75rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-internal-combobox-spacing-unit-l: 1rem;--calcite-internal-combobox-spacing-unit-s: .75rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .625rem;--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(.625rem - 1px) ;--calcite-internal-close-size: 2rem}:host([scale=l]) .x-button{margin-inline-end:1rem}.x-button{align-self:center}.wrapper{display:flex;border-width:1px;border-style:solid;outline-color:transparent;padding-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);background-color:var(--calcite-combobox-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));border-color:var(--calcite-combobox-input-border-color, var(--calcite-color-border-input))}.wrapper:hover .icon{color:var(--calcite-combobox-icon-color-hover, var(--calcite-color-text-1))}:host(:focus-within) .wrapper,.wrapper--active{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;gap:var(--calcite-internal-combobox-spacing-unit-s);margin-inline-end:var(--calcite-internal-combobox-spacing-unit-s)}.grid-input.selection-display--fit,.grid-input.selection-display--single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-internal-combobox-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;width:0px;min-width:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.placeholder-icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-width:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}@media(forced-colors:active){.wrapper,.floating-ui-container{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.list-container{max-height:45vh;overflow-y:auto;inline-size:var(--calcite-dropdown-width, 100%);background-color:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1))}.list{margin:0;display:block;padding:0}.list--hide{height:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);max-inline-size:100%}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.select-all{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-1));border-block-end-color:var(--calcite-combobox-divider-color, var(--calcite-combobox-item-border-color, var(--calcite-color-border-3)));border-block-end-style:solid;border-block-end-width:var(--calcite-border-width-sm);inset-block-start:0;position:sticky;z-index:var(--calcite-z-index-sticky)}.no-matches{padding-block:var(--calcite-internal-combobox-no-matches-spacing-unit-s);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));background:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1));cursor:pointer}.no-matches-placeholder{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3));cursor:default}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.x-button{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-style:none;cursor:pointer;outline-color:transparent;align-items:center;margin:0;background-color:var(--calcite-close-background-color, var(--calcite-color-foreground-2));-webkit-appearance:none;display:flex;align-content:center;justify-content:center;color:var(--calcite-close-icon-color, var(--calcite-color-text-3));block-size:var(--calcite-internal-close-size, 1.5rem);inline-size:var(--calcite-internal-close-size, 1.5rem);min-block-size:var(--calcite-internal-close-size, 1.5rem);min-inline-size:var(--calcite-internal-close-size, 1.5rem);padding:0}.x-button:hover,.x-button:focus{background-color:var(--calcite-close-background-color-hover, var(--calcite-color-foreground-3))}.x-button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.x-button:active{background-color:var(--calcite-close-background-color-press, var(--calcite-color-transparent-press))}.x-button calcite-icon{color:inherit}.x-button--round{border-radius:9999px}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,B=class extends U{constructor(){super(),this.closeButtonRef=C(),this.selectAllComboboxItemRef=C(),this.allSelectedIndicatorChipRef=C(),this.cancelable=ne()(this),this.filterItems=(()=>{let e=(t,i)=>t&&i.some(({el:s})=>t===s);return ae((t,i=!1,s=!0)=>{let l=Ie([...this.data,...this.groupData],t,this.effectiveFilterProps),a=this.getItemsAndGroups(),o=t==="";a.forEach(c=>{if(o){c.itemHidden=!1;return}let h=!e(c,l);c.itemHidden=h;let[m,k]=c.ancestors;(e(m,l)||e(k,l))&&(c.itemHidden=!1),h||c.ancestors.forEach(b=>b.itemHidden=!1)}),this.noMatchesFound=this.filteredItems.length===0&&!!this.filterText,this.filterTextMatchPattern=this.filterText&&new RegExp(`(${M(this.filterText)})`,"i"),this.keyboardNavItems.forEach(c=>{c.filterTextMatchPattern=this.filterTextMatchPattern}),i&&(this.open=this.filterText.trim().length>0),s&&this.calciteComboboxFilterChange.emit()},N.filter)})(),this._filterText="",this.getSelectedItems=()=>{if(!this.isMulti()){let e=this.items.find(({selected:t})=>t);return e?[e]:[]}return this.items.filter(e=>e.selected&&(this.selectionMode!=="ancestors"||!P(e))).sort((e,t)=>{let i=this.selectedItems.indexOf(e),s=this.selectedItems.indexOf(t);return i>-1&&s>-1?i-s:s-i})},this.groupItems=[],this.guid=j(),this.ignoreSelectedEventsFlag=!1,this.inputHeight=0,this.internalValueChangeFlag=!1,this.mutationObserver=E("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.transitionProp="opacity",this.placement=ce,this.resizeObserver=E("resize",()=>{this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}),this.selectedIndicatorChipRef=C(),this._selectedItems=[],this.textInputRef=C(),this._value=null,this.messages=Q(),this.focusSetter=K()(this),this.customChipAddHandler=()=>{this.addCustomChip(this.filterText,!0)},this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.items=[],this.clearDisabled=!1,this.disabled=!1,this.maxItems=0,this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.readOnly=!1,this.required=!1,this.scale="m",this.selectAllEnabled=!1,this.selectionDisplay="all",this.selectionMode="multiple",this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.calciteComboboxBeforeClose=g({cancelable:!1}),this.calciteComboboxBeforeOpen=g({cancelable:!1}),this.calciteComboboxChange=g({cancelable:!1}),this.calciteComboboxChipClose=g({cancelable:!1}),this.calciteComboboxClose=g({cancelable:!1}),this.calciteComboboxFilterChange=g({cancelable:!1}),this.calciteComboboxOpen=g({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteComboboxItemChange",this.calciteComboboxItemChangeHandler),this.listen("calciteInternalComboboxItemChange",this.calciteInternalComboboxItemChangeHandler),this.listen("click",this.comboboxFocusHandler)}static{this.properties={activeChipIndex:[16,{},{state:!0}],activeDescendant:[16,{},{state:!0}],activeItemIndex:[16,{},{state:!0}],compactSelectionDisplay:[16,{},{state:!0}],selectedHiddenChipsCount:[16,{},{state:!0}],selectedVisibleChipsCount:[16,{},{state:!0}],items:[16,{},{state:!0}],noMatchesFound:[16,{},{state:!0}],allowCustomValues:[7,{},{reflect:!0,type:Boolean}],clearDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],filterText:[3,{},{reflect:!0}],filterProps:[0,{},{attribute:!1}],filteredItems:[32,{},{attribute:!1,readOnly:!0}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],label:1,labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placeholder:1,placeholderIcon:[3,{type:String},{reflect:!0}],placeholderIconFlipRtl:[7,{},{reflect:!0,type:Boolean}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectAllEnabled:[7,{},{reflect:!0,type:Boolean}],selectedItems:[0,{},{attribute:!1}],selectionDisplay:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:G,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1}}static{this.styles=ke}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(e=>e!=="el"):["description","label","metadata","shortHeading","textLabel"]}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:i,open:s}=this,l=i[0],a=l?.icon,o=y(t);return!s&&l?!!a&&o:!!e&&(!l||o)}get allSelected(){return this.selectedItems.length===this.items.length}get indeterminate(){return this.selectedItems.length>0&&!this.allSelected}get keyboardNavItems(){let{selectAllComboboxItemRef:e}=this,t=this.filteredItems.filter(i=>!i.disabled);return e.value?[e.value,...t]:t}get filterText(){return this._filterText}set filterText(e){let t=this._filterText;e!==t&&(this._filterText=e,this.filterTextChange(e))}get filteredItems(){return this.items.filter(e=>!T(e))}get selectedItems(){return this._selectedItems}set selectedItems(e){let t=this._selectedItems;e!==t&&(this._selectedItems=e,this.selectedItemsHandler())}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueHandler(e))}async reposition(e=!1){let{floatingEl:t,referenceEl:i,placement:s,overlayPositioning:l,filteredFlipPlacements:a}=this;return he(this,{floatingEl:t,referenceEl:i,overlayPositioning:l,placement:s,flipPlacements:a,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>(this.activeChipIndex=-1,this.activeItemIndex=-1,this.textInputRef.value),e)}connectedCallback(){super.connectedCallback(),ue(this),te(this),this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),$(this),this.cancelable.add(this.filterItems)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("maxItems")&&(this.hasUpdated||this.maxItems!==0)&&this.setMaxScrollerHeight(),e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")&&this.reposition(!0),(e.has("selectionMode")||e.has("scale"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler()}updated(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),Y(this),this.refreshSelectionDisplay()}async load(){this.handleSelectionModeWarning()}loaded(){se(this,this.getValue()),$(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),me(this),ie(this),pe(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open?this.floatingEl.showPopover():this.floatingEl.hidePopover())}emitComboboxChange(){this.calciteComboboxChange.emit()}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){oe(this),!this.disabled&&(this.setMaxScrollerHeight(),this.handlePopover())}handleDisabledChange(e){e||(this.open=!1)}valueHandler(e){this.internalValueChangeFlag||(this.getItems().forEach(t=>{t.selected=Array.isArray(e)?e.includes(t.value):e===t.value}),this.updateItems())}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1}async documentClickHandler(e){this.disabled||e.composedPath().includes(this.el)||(await this.componentOnReady(),!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1)),this.allowCustomValues&&this.filterText.trim().length&&this.addCustomChip(this.filterText),this.open=!1)}handleSelectAll(e){e&&this.toggleSelectAll(),this.allSelected&&this.selectedItems.forEach(t=>{let i=this.referenceEl.querySelector(`#${p.chip(t.guid)}`);i&&this.hideChip(i)})}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,i=e.composedPath().includes(this.selectAllComboboxItemRef.value);this.selectAllEnabled&&this.handleSelectAll(i);let s=this.keyboardNavItems.indexOf(i?this.selectAllComboboxItemRef.value:t);this.updateActiveItemIndex(s),this.toggleSelection(t,t.selected),this.selectedItems=this.getSelectedItems()}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.hasUpdated&&this.updateItems()}clearValue(){this.ignoreSelectedEventsFlag=!0,this.items.forEach(e=>e.selected=!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=[],this.emitComboboxChange(),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}clearInputValue(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?re(t,e):null}getValue(){let e=this.selectedItems.map(t=>t.value?.toString());return e.length?e.length>1?e:e[0]:""}comboboxInViewport(){let e=this.el.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.right<=(window.innerWidth||document.documentElement.clientWidth)&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)}toggleSelectAll(){let e=!this.allSelected;this.items.forEach(t=>t.selected=e),this.selectedItems=e?this.items:[],this.emitComboboxChange()}keyDownHandler(e){if(this.readOnly)return;let{key:t}=e;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):this.open?(this.open=!1,e.preventDefault()):!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1));break;case"ArrowLeft":(this.activeChipIndex!==-1||this.textInputRef.value.selectionStart===0)&&(this.previousChip(),e.preventDefault());break;case"ArrowRight":this.activeChipIndex!==-1&&(this.nextChip(),e.preventDefault());break;case"ArrowUp":this.keyboardNavItems.length&&(e.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView()),this.scrollToActiveOrSelectedItem();break;case"ArrowDown":this.keyboardNavItems.length&&(e.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":!this.textInputRef.value.value&&!e.defaultPrevented&&(this.open||(this.open=!0,this.shiftActiveItemIndex(1)),e.preventDefault());break;case"Home":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":!this.clearDisabled&&!this.open&&this.clearValue(),this.open=!1,e.preventDefault();break;case"Enter":this.open&&this.activeItemIndex>-1?(this.keyboardNavItems[this.activeItemIndex].toggleSelection(),e.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(),e.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):e.defaultPrevented||ee(this)&&e.preventDefault();break;case"Delete":case"Backspace":{if(this.selectionDisplay==="single"||this.selectionDisplay==="fit"&&this.selectedHiddenChipsCount>0)return;this.activeChipIndex>-1?(e.preventDefault(),this.removeActiveChip()):!this.filterText&&this.isMulti()&&(e.preventDefault(),this.removeLastChip());break}}}onBeforeOpen(){this.scrollToActiveOrSelectedItem(),this.calciteComboboxBeforeOpen.emit()}onOpen(){this.scrollToActiveOrSelectedItem(!0),this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),de(this)}async setMaxScrollerHeight(){let{listContainerEl:e,open:t,referenceEl:i}=this;if(!e||!t)return;await this.reposition(!0);let s=this.getMaxScrollerHeight();e.style.maxBlockSize=s>0?`${s}px`:"",e.style.inlineSize=`${i.clientWidth}px`,await this.reposition(!0)}calciteChipCloseHandler(e){this.open=!1;let t=this.items.find(i=>i===e);t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()}clickHandler(e){if(this.readOnly)return;let t=e.composedPath();if(t.some(i=>i.tagName==="CALCITE-CHIP")){this.open=!1,e.preventDefault();return}if(t.some(i=>i.classList?.contains(Ce.button))){this.clearValue(),e.preventDefault();return}this.open=!this.open,this.ensureRecentSelectedItemIsActive()}ensureRecentSelectedItemIsActive(){let{selectedItems:e}=this,t=e.length===0?0:this.items.indexOf(e[e.length-1]);this.updateActiveItemIndex(t)}hideChip(e){e.classList.add(n.chipInvisible)}showChip(e){e.classList.remove(n.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:i}){e.forEach(s=>{if(!s.selected)this.hideChip(s);else{let l=S(s);if(l&&l<t){t-=l+i,this.showChip(s);return}}this.hideChip(s)})}async refreshSelectionDisplay(){if(this.componentOnReady(),y(this.selectionMode)||!this.textInputRef.value||!this.chipContainerEl)return;let{allSelectedIndicatorChipRef:e,chipContainerEl:t,selectionDisplay:i,placeholder:s,selectedIndicatorChipRef:l,textInputRef:a}=this,o=parseInt(getComputedStyle(t).gap.replace("px","")),c=S(t),{fontSize:h,fontFamily:m}=getComputedStyle(a.value),b=(X(s,`${h} ${m}`)||parseInt(xe))+o,A=S(e.value),L=S(l.value),$e=Math.max(A,L);if(this.setCompactSelectionDisplay({chipContainerElGap:o,chipContainerElWidth:c,inputWidth:b,largestSelectedIndicatorChipWidth:$e}),this.allSelected&&this.selectAllEnabled&&this.selectedItems.forEach(I=>{let x=this.referenceEl.querySelector(`#${p.chip(I.guid)}`);x&&this.hideChip(x)}),this.indeterminate&&this.selectedItems.forEach(I=>{let x=this.referenceEl.querySelector(`#${p.chip(I.guid)}`);x&&this.showChip(x)}),i==="fit"){let I=Array.from(this.el.shadowRoot.querySelectorAll("calcite-chip")).filter(we=>we.closable),x=Math.round(c-((this.selectedHiddenChipsCount>0?L:0)+o+b+o));this.refreshChipDisplay({availableHorizontalChipElSpace:x,chipContainerElGap:o,chipEls:I}),this.setVisibleAndHiddenChips(I)}}setFloatingEl(e){this.floatingEl=e,$(this),this.handlePopover()}setCompactSelectionDisplay({chipContainerElGap:e,chipContainerElWidth:t,inputWidth:i,largestSelectedIndicatorChipWidth:s}){let l=Math.round(s+e+i);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<l)&&(this.maxCompactBreakpoint=l),this.compactSelectionDisplay=t<this.maxCompactBreakpoint}setContainerEl(e){D(this.resizeObserver,this.listContainerEl,e),this.listContainerEl=e,this.transitionEl=e}setChipContainerEl(e){D(this.resizeObserver,this.chipContainerEl,e),this.chipContainerEl=e}setReferenceEl(e){this.referenceEl=e,$(this)}setVisibleAndHiddenChips(e){let t=0;e.forEach(s=>{s.selected&&!s.classList.contains(n.chipInvisible)&&t++}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let i=this.getSelectedItems().length-t;i!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=i)}getMaxScrollerHeight(){let t=[...this.groupItems,...this.getItems(!0)].filter(a=>!T(a)),{maxItems:i}=this,s=0,l=0;return t.length>=i&&t.forEach(a=>{if(s<i){let o=this.calculateScrollerHeight(a);l+=o,s+=1}}),l}calculateScrollerHeight(e){if(!e)return 0;let t=e.getBoundingClientRect().height,i=`:scope > ${F}, :scope > ${O}`,s=Array.from(e.querySelectorAll(i)).reduce((l,a)=>l+a.getBoundingClientRect().height,0);return t-s}inputHandler(e){let t=e.target.value;this.filterText=t}getItemsAndGroups(){return[...this.groupItems,...this.items]}toggleSelection(e,t){!e||this.selectionMode==="single-persist"&&e.selected&&e.value===this.value&&!t||(this.isMulti()?this.handleMultiSelection(e,t):this.handleSingleSelection(e,t))}handleMultiSelection(e,t){e.selected=t,this.updateAncestors(e),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")}handleSingleSelection(e,t){this.ignoreSelectedEventsFlag=!0,this.items.forEach(i=>i.selected=i===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInputRef.value&&(this.textInputRef.value.value=w(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=V(e),i=Se(e);e.selected?t.forEach(s=>{s.selected=!0}):(i.forEach(s=>s.selected=!1),[...t].forEach(s=>{P(s)||(s.selected=!1)}))}updateItems(){this.items=this.getItems(),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.groupData=this.getGroupData(),this.updateItemProps(),this.selectedItems=this.getSelectedItems()}updateItemProps(){this.getItems(!0).forEach(e=>{e.selectionMode=this.selectionMode,e.scale=this.scale}),this.groupItems.forEach((e,t)=>(e.scale=this.scale,e.position=t)),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach((e,t,i)=>{t===0&&(e.afterEmptyGroup=!1);let s=i[t+1];s&&(s.afterEmptyGroup=e.children.length===0)})}getData(){return this.items.map(e=>({description:e.description,filterDisabled:e.filterDisabled,label:e.heading,metadata:e.metadata,shortHeading:e.shortHeading,textLabel:e.textLabel,el:e}))}getGroupData(){return this.groupItems.map(e=>({label:e.label,el:e}))}resetText(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}getItems(e=!1){return Array.from(this.el.querySelectorAll(F)).filter(i=>e||!i.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(O))}addCustomChip(e,t){let i=this.items.find(s=>(s.heading||s.textLabel)===e);if(i)this.toggleSelection(i,!0);else{let s=document.createElement("calcite-combobox-item");s.value=e,s.heading=e,this.el.prepend(s),this.updateItems(),this.toggleSelection(s,!0),this.open=!0,t&&this.setFocus()}}removeActiveChip(){this.toggleSelection(this.selectedItems[this.activeChipIndex],!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex+1;t>e?(this.activeChipIndex=-1,J(this.textInputRef.value)):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl.querySelector(`#${p.chip(e)}`):null)?.setFocus()}scrollToActiveOrSelectedItem(e=!1){let t=e&&this.selectedItems?.length?this.selectedItems[0]:this.keyboardNavItems[this.activeItemIndex],i=this.listContainerEl;if(!t||!i)return;t.scrollIntoView({block:"nearest"});let l=this.selectAllComboboxItemRef.value?.offsetHeight||0,a=t.getBoundingClientRect(),o=i.getBoundingClientRect();a.top<o.top+l&&(i.scrollTop-=o.top+l-a.top)}shiftActiveItemIndex(e){let{length:t}=this.keyboardNavItems,i=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(i),this.scrollToActiveOrSelectedItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t=null;this.keyboardNavItems.forEach((i,s)=>{s===e?(i.active=!0,t=`${p.item(i.guid)}`):i.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return!y(this.selectionMode)}comboboxFocusHandler(){this.disabled||this.textInputRef.value.focus()}createScreenReaderItem({ariaLabel:e,ariaSelected:t,id:i,textContent:s}){return d`<li aria-label=${e??u} aria-selected=${t??u} id=${i??u} role=option tabindex=-1>${s}</li>`}handleSelectionModeWarning(){this.selectionMode==="single-persist"&&this.clearDisabled&&console.warn('clearDisabled is ignored when selection-mode is set to "single-persist"')}getDescriptionMessage(){let e=Array.isArray(this.value)?this.value.join(", "):this.value;return this.readOnly?this.messages.nonEditable?.replace("{value}",`${e}`):e}renderChips(){let{activeChipIndex:e,readOnly:t,scale:i,selectionMode:s,messages:l}=this;return this.selectAllEnabled&&this.allSelected?null:this.selectedItems.map((a,o)=>{let c={[n.chip]:!0},h=[...V(a)].reverse(),m=w(a),k=[...h,a].map(A=>w(A)),b=s!=="ancestors"?m:k.join(" / ");return v(m,d`<calcite-chip .appearance=${t?"outline":"solid"} class=${r(c)} .closable=${!t} data-test-id=${`chip-${o}`} .icon=${a.icon} .iconFlipRtl=${a.iconFlipRtl} id=${(a.guid?`${p.chip(a.guid)}`:null)??u} .label=${b} .messageOverrides=${{dismissLabel:l.removeTag}} @focusin=${()=>this.activeChipIndex=o} @calciteChipClose=${()=>this.calciteChipCloseHandler(a)} .scale=${i} .selected=${a.selected} .tabIndex=${e===o?0:-1} title=${b??u} .value=${a.value}>${b}</calcite-chip>`)})}renderAllSelectedIndicatorChip(){let{allSelectedIndicatorChipRef:e,compactSelectionDisplay:t,scale:i,selectedVisibleChipsCount:s}=this,l=t?this.messages.all:this.messages.allSelected;return d`<calcite-chip class=${r({[n.chip]:!0,[n.chipInvisible]:!(this.allSelected&&!s),[n.allSelected]:!0})} data-test-id=all-selected-indicator-chip .label=${l} .scale=${i} title=${l??u} value ${f(e)}>${l}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,getSelectedItems:i,scale:s,selectedHiddenChipsCount:l,selectedVisibleChipsCount:a,selectedIndicatorChipRef:o}=this,c,h;if(e)c=!0;else if(t==="single"){let m=i().length;this.allSelected?c=!0:m>0?c=!1:c=!0,h=`${m} ${this.messages.selected}`}else t==="fit"&&(c=!!(this.allSelected&&a===0||l===0),h=a>0?`+${l}`:`${l} ${this.messages.selected}`);return d`<calcite-chip class=${r({[n.chip]:!0,[n.chipInvisible]:c})} .label=${h} .scale=${s} title=${h??u} value ${f(o)}>${h}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,getSelectedItems:i,scale:s,selectedHiddenChipsCount:l}=this,a,o;if(e){let c=i().length;this.allSelected?a=!0:t==="fit"?(a=!(l>0),o=`${l||0}`):t==="single"&&(a=!(c>0),o=`${c}`)}else a=!0;return d`<calcite-chip class=${r({[n.chip]:!0,[n.chipInvisible]:a})} .label=${o} .scale=${s} title=${o??u} value>${o}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:i,selectionMode:s,selectedItems:l,open:a}=this,o=y(s),c=l[0],h=!a&&o&&!!c&&!this.filterText;return d`<span class=${r({[n.inputWrap]:!0,[n.inputWrapSingle]:o})}>${h&&v("label",d`<span class=${r({[n.label]:!0,[n.labelIcon]:!!c?.icon})}>${w(c)}</span>`)||""}${v("input",d`<input aria-activedescendant=${this.activeDescendant??u} aria-controls=${`${p.listbox(e)}`} aria-errormessage=${p.validationMessage} aria-owns=${`${p.listbox(e)}`} aria-autocomplete=list .ariaDescription=${this.getDescriptionMessage()} .ariaExpanded=${a} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${fe(this)} class=${r({[n.input]:!0,[n.inputSingle]:!0,[n.inputHidden]:h,[n.inputIcon]:this.showingInlineIcon&&!!this.placeholderIcon})} data-test-id=input .disabled=${t} .id=${`${p.input(e)}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${i??u} .readOnly=${this.readOnly} .required=${this.required} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${W(this.filterText??"")} ${f(this.textInputRef)}>`)}</span>`}renderListBoxOptions(){let e=this.keyboardNavItems.map(t=>this.createScreenReaderItem({ariaLabel:t.label,ariaSelected:t.selected,id:`${p.item(t.guid)}`,textContent:t.heading||t.textLabel}));if(this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"){let t=this.createScreenReaderItem({ariaLabel:this.messages.selectAll,ariaSelected:this.allSelected,textContent:this.messages.selectAll});t&&e.unshift(t)}return e}renderFloatingUIContainer(){let{messages:e,setFloatingEl:t,setContainerEl:i,open:s,scale:l}=this,a={[n.listContainer]:!0,[R.animation]:!0,[R.animationActive]:s},o=(this.filterText&&e.add?.replace("{text}",`${this.filterText}`))??"";return d`<div aria-hidden=true class=${r(n.floatingUIContainer)} popover=manual ${f(t)}><div class=${r(a)} ${f(i)}><ul class=${r({[n.list]:!0,[n.listHide]:!s})}>${this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"&&d`<calcite-combobox-item class=${r(n.selectAll)} .id=${`${this.guid}-select-all-enabled-interactive`} .indeterminate=${this.indeterminate} .label=${e.selectAll} .scale=${l} .selected=${this.allSelected} tabindex=-1 text-label=${e.selectAll??u} value=select-all ${f(this.selectAllComboboxItemRef)}></calcite-combobox-item>`||""}<slot></slot>${this.noMatchesFound&&(this.allowCustomValues?d`<li aria-label=${o??u} class=${r(n.noMatches)} @click=${this.customChipAddHandler} role=option tabindex=0>${ve({text:o,pattern:new RegExp(`(${M(this.filterText)})`,"i")})}</li>`:d`<li class=${r({[n.noMatchesPlaceholder]:!0,[n.noMatches]:!0})}>${e.noMatches}</li>`)||""}</ul></div></div>`}renderSelectedOrPlaceholderIcon(){let{open:e,placeholderIcon:t,placeholderIconFlipRtl:i,selectedItems:s}=this,l=s[0],a=l?.icon,o=t&&(e||!l);return this.showingInlineIcon&&v("selected-placeholder-icon",d`<span class=${r(n.iconStart)}><calcite-icon class=${r({[n.selectedIcon]:!o,[n.placeholderIcon]:o})} .flipRtl=${o?i:l.iconFlipRtl} .icon=${o?t:a} .scale=${H(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return v("chevron",d`<span class=${r(n.iconEnd)}><calcite-icon class=${r(n.icon)} .icon=${e?z.chevronUp:z.chevronDown} .scale=${H(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:i,open:s,readOnly:l}=this,a=y(this.selectionMode),o=e==="all",c=e==="single",h=!a&&e==="fit",m=!this.clearDisabled&&this.selectionMode!=="single-persist"&&!!this.value?.length;return Z({disabled:this.disabled,children:d`${this.labelText&&be({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-live=polite class=${r({[n.wrapper]:!0,[n.wrapperSingle]:a||!this.selectedItems.length,[n.wrapperActive]:s})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${f(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${v("grid",d`<div class=${r({[n.gridInput]:!0,[n.selectionDisplayFit]:h,[n.selectionDisplaySingle]:c})} ${f(this.setChipContainerEl)}>${!a&&!c&&this.renderChips()||""}${!a&&!c&&this.selectAllEnabled&&this.renderAllSelectedIndicatorChip()||""}${!a&&!o&&[this.renderSelectedIndicatorChip(),this.renderSelectedIndicatorChipCompact(),this.renderAllSelectedIndicatorChip()]||""}<label class=${r(n.screenReadersOnly)} .htmlFor=${`${p.input(t)}`} .id=${`${p.label(t)}`}>${i}</label>${this.renderInput()}</div>`)}${!l&&m?v("close-button",ye({disabled:this.disabled,label:this.messages.clear,ref:this.closeButtonRef,scale:this.scale})):null}${!l&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${p.label(t)}`} aria-multiselectable=true class=${r(n.screenReadersOnly)} .id=${`${p.listbox(t)}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${le({component:this})}${this.validationMessage&&this.status==="invalid"?ge({icon:this.validationIcon,id:p.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};_("calcite-combobox",B);export{B as Combobox};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
4
|
var r=["date","datetime-local","month","number","range","time","week"],x=["email","password","search","tel","text","url"],u=["email","password","search","tel","text","textarea","url"];function a(e,n,t,c){let s=t.toLowerCase(),i=e[t];c&&i!=null?n.setAttribute(s,`${i}`):n.removeAttribute(s)}function m(e,n,t){t.type=e==="textarea"?"text":e;let c=r.includes(e),s=n;a(s,t,"min",c),a(s,t,"max",c),a(s,t,"step",c);let i=u.includes(e),o=n;a(o,t,"minLength",i),a(o,t,"maxLength",i);let l=x.includes(e);a(o,t,"pattern",l)}export{m as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as C}from"./U4S2SBEI.js";import{a as H}from"./GS4XWDOH.js";import{a as P}from"./D5AJHXJ4.js";import{a as y}from"./UGE6RUEU.js";import{a as O}from"./7MNQ2H6V.js";import"./JV6NQ2EY.js";import{D as z,e as B,t as L,u as M}from"./JH55KJKU.js";import"./6BRNJJCK.js";import{B as R,C as $,D,E as s,J as u,L as _,M as E,P as V,g as I,h as p,o as w}from"./ADADJVGW.js";var K=I`.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"},N={actionBar:"action-bar",header:"header"},U={dragVertical:"drag-resize-vertical",dragHorizontal:"drag-resize-horizontal"},T=I`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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)}.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--1);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:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-color:transparent;outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus)}: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;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--calcite-shell-panel-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow))}: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;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--calcite-shell-panel-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow));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([hidden]){display:none}[hidden]{display:none}`,A=class extends D{constructor(){super(...arguments),this.actionBars=[],this.contentRef=R(),this.messages=O(),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=w({cancelable:!1}),this.calciteInternalShellPanelResizeStart=w({cancelable:!1}),this.calciteShellPanelCollapse=w({cancelable:!1}),this.calciteShellPanelExpand=w({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]}willUpdate(e){e.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&this.setActionBarsLayout(this.actionBars),e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calciteShellPanelCollapse.emit():this.calciteShellPanelExpand.emit())}disconnectedCallback(){super.disconnectedCallback(),this.cleanupInteractions()}getContentElDOMRect(){return this.contentRef.value.getBoundingClientRect()}handleKeyDown(e){let{key:a,defaultPrevented:r,shiftKey:l}=e,{position:i,layout:t,resizable:n,contentRef:c,el:b,resizeValues:{maxBlockSize:x,maxInlineSize:g,minBlockSize:v,minInlineSize:k}}=this,S=[...t==="horizontal"?["ArrowUp","ArrowDown"]:["ArrowLeft","ArrowRight"],"Home","End"];if(!n||!c.value||r||!S.includes(a))return;let h=this.getContentElDOMRect(),f=B(b)==="rtl"?-1:1,d=l?E:_;switch(a){case"ArrowUp":this.updateSize({size:h.height+(t==="horizontal"&&i==="end"?d:-d),type:"blockSize"}),e.preventDefault();break;case"ArrowDown":this.updateSize({size:h.height+(t==="horizontal"&&i==="end"?-d:d),type:"blockSize"}),e.preventDefault();break;case"ArrowLeft":this.updateSize({size:h.width+(t==="vertical"&&i==="end"?d:-d)*f,type:"inlineSize"}),e.preventDefault();break;case"ArrowRight":this.updateSize({size:h.width+(t==="vertical"&&i==="end"?-d:d)*f,type:"inlineSize"}),e.preventDefault();break;case"Home":this.updateSize({size:t==="horizontal"?v:k,type:t==="horizontal"?"blockSize":"inlineSize"}),e.preventDefault();break;case"End":this.updateSize({size:t==="horizontal"?x:g,type:t==="horizontal"?"blockSize":"inlineSize"}),e.preventDefault();break}}updateSize({type:e,size:a}){let{contentRef:r,resizeValues:l}=this;if(!r.value)return;let i=e==="blockSize"?"minBlockSize":"minInlineSize",t=e==="blockSize"?"maxBlockSize":"maxInlineSize",n=l[i]&&l[t]?P(a,l[i],l[t]):a,c=Math.round(n);this.resizeValues={...l,[e]:c},r.value.style[e]=a!==null?`${c}px`:null}cleanupInteractions(){this.interaction?.unset()}async setupInteractions(){this.cleanupInteractions();let{el:e,contentRef:a,resizable:r,position:l,collapsed:i,resizeHandleEl:t,layout:n}=this;if(!a.value||i||!r||!t)return;await this.el.componentOnReady();let{inlineSize:c,minInlineSize:b,blockSize:x,minBlockSize:g,maxInlineSize:v,maxBlockSize:k}=window.getComputedStyle(a.value),m={inlineSize:z(c),blockSize:z(x),minInlineSize:z(b),minBlockSize:z(g),maxInlineSize:z(v)||window.innerWidth,maxBlockSize:z(k)||window.innerHeight};this.resizeValues=m;let S=B(e)==="rtl";this.interaction=C(a.value,{context:e.ownerDocument}).resizable({edges:{top:l==="end"&&n==="horizontal"?t:!1,right:l===(S?"end":"start")&&n==="vertical"?t:!1,bottom:l==="start"&&n==="horizontal"?t:!1,left:l===(S?"start":"end")&&n==="vertical"?t:!1},modifiers:[C.modifiers.restrictSize({min:{width:m.minInlineSize,height:m.minBlockSize},max:{width:m.maxInlineSize,height:m.maxBlockSize}})],listeners:{resizestart:()=>{this.calciteInternalShellPanelResizeStart.emit()},resizeend:()=>{this.calciteInternalShellPanelResizeEnd.emit()},move:({rect:h})=>{let f=n==="horizontal";this.updateSize({size:f?h.height:h.width,type:f?"blockSize":"inlineSize"})}}})}setResizeHandleEl(e){this.resizeHandleEl=e,this.setupInteractions()}setActionBarsLayout(e){e.forEach(a=>a.layout=this.layout)}handleActionBarSlotChange(e){let a=M(e).filter(r=>r?.matches("calcite-action-bar"));this.actionBars=a,this.setActionBarsLayout(a)}handleHeaderSlotChange(e){this.hasHeader=L(e)}getResizeIcon(){let{layout:e}=this;return e==="horizontal"?U.dragVertical:U.dragHorizontal}renderHeader(){return y("header",p`<div class=${s(o.contentHeader)} .hidden=${!this.hasHeader}><slot name=${N.header} @slotchange=${this.handleHeaderSlotChange}></slot></div>`)}render(){let{collapsed:e,position:a,resizable:r,layout:l,displayMode:i,resizeValues:t}=this,n=B(this.el),c=!e&&r?y("resize-handle",p`<div .ariaLabel=${this.messages.resize} .ariaOrientation=${l==="horizontal"?"vertical":"horizontal"} .ariaValueMax=${l=="horizontal"?t.maxBlockSize:t.maxInlineSize} .ariaValueMin=${l=="horizontal"?t.minBlockSize:t.minInlineSize} .ariaValueNow=${l=="horizontal"?t.blockSize:t.inlineSize} class=${s(o.resizeHandle)} @keydown=${this.handleKeyDown} role=separator tabindex=0 touch-action=none ${$(this.setResizeHandleEl)}><div class=${s(o.resizeHandleBar)}><calcite-icon .icon=${this.getResizeIcon()} scale=s></calcite-icon></div></div>`):null,b=()=>l==="horizontal"?a==="start"?u.calciteAnimateInDown:u.calciteAnimateInUp:n==="ltr"&&a==="end"||n==="rtl"&&a==="start"?u.calciteAnimateInLeft:u.calciteAnimateInRight,x=p`<div class=${s(o.contentContainer)}>${y("content",p`<div class=${s({[u.rtl]:n==="rtl",[o.content]:!0,[o.contentOverlay]:i==="overlay",[o.floatContent]:i==="float-content"||i==="float",[u.calciteAnimate]:i==="overlay",[b()]:i==="overlay",[H("width",this.width,this.widthScale)]:!!(this.width||this.widthScale),[H("height",this.height,this.heightScale)]:!!(this.height||this.heightScale)})} .hidden=${e} ${$(this.contentRef)}>${this.renderHeader()}<div class=${s(o.contentBody)}><slot></slot></div>${c}</div>`)}</div>`,v=[y("action-bar-container",p`<div class=${s(o.actionBarContainer)}><slot name=${N.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`),x];return a==="end"&&v.reverse(),p`<div class=${s({[o.container]:!0,[o.floatAll]:i==="float-all"})}>${v}</div>`}};V("calcite-shell-panel",A);export{A as ShellPanel};
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
|
+
import{a as C}from"./UGGZGIP7.js";import{a as H}from"./ZFPVZBJ4.js";import{a as P}from"./3NFSFBMV.js";import{a as y}from"./6Y7CFF2P.js";import{a as O}from"./LAOKZI3G.js";import"./HYF2MQ7L.js";import{D as z,e as B,t as L,u as M}from"./UHQFCDJN.js";import"./7OF5HYSI.js";import{B as R,C as $,D,E as s,J as u,L as _,M as E,P as V,g as I,h as p,o as w}from"./5U655FYR.js";var K=I`.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"},N={actionBar:"action-bar",header:"header"},U={dragVertical:"drag-resize-vertical",dragHorizontal:"drag-resize-horizontal"},T=I`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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)}.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--1);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:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-color:transparent;outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus)}: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;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--calcite-shell-panel-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow))}: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;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--calcite-shell-panel-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow));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([hidden]){display:none}[hidden]{display:none}`,A=class extends D{constructor(){super(...arguments),this.actionBars=[],this.contentRef=R(),this.messages=O(),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=w({cancelable:!1}),this.calciteInternalShellPanelResizeStart=w({cancelable:!1}),this.calciteShellPanelCollapse=w({cancelable:!1}),this.calciteShellPanelExpand=w({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]}willUpdate(e){e.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&this.setActionBarsLayout(this.actionBars),e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calciteShellPanelCollapse.emit():this.calciteShellPanelExpand.emit())}disconnectedCallback(){super.disconnectedCallback(),this.cleanupInteractions()}getContentElDOMRect(){return this.contentRef.value.getBoundingClientRect()}handleKeyDown(e){let{key:a,defaultPrevented:r,shiftKey:l}=e,{position:i,layout:t,resizable:n,contentRef:c,el:b,resizeValues:{maxBlockSize:x,maxInlineSize:g,minBlockSize:v,minInlineSize:k}}=this,S=[...t==="horizontal"?["ArrowUp","ArrowDown"]:["ArrowLeft","ArrowRight"],"Home","End"];if(!n||!c.value||r||!S.includes(a))return;let h=this.getContentElDOMRect(),f=B(b)==="rtl"?-1:1,d=l?E:_;switch(a){case"ArrowUp":this.updateSize({size:h.height+(t==="horizontal"&&i==="end"?d:-d),type:"blockSize"}),e.preventDefault();break;case"ArrowDown":this.updateSize({size:h.height+(t==="horizontal"&&i==="end"?-d:d),type:"blockSize"}),e.preventDefault();break;case"ArrowLeft":this.updateSize({size:h.width+(t==="vertical"&&i==="end"?d:-d)*f,type:"inlineSize"}),e.preventDefault();break;case"ArrowRight":this.updateSize({size:h.width+(t==="vertical"&&i==="end"?-d:d)*f,type:"inlineSize"}),e.preventDefault();break;case"Home":this.updateSize({size:t==="horizontal"?v:k,type:t==="horizontal"?"blockSize":"inlineSize"}),e.preventDefault();break;case"End":this.updateSize({size:t==="horizontal"?x:g,type:t==="horizontal"?"blockSize":"inlineSize"}),e.preventDefault();break}}updateSize({type:e,size:a}){let{contentRef:r,resizeValues:l}=this;if(!r.value)return;let i=e==="blockSize"?"minBlockSize":"minInlineSize",t=e==="blockSize"?"maxBlockSize":"maxInlineSize",n=l[i]&&l[t]?P(a,l[i],l[t]):a,c=Math.round(n);this.resizeValues={...l,[e]:c},r.value.style[e]=a!==null?`${c}px`:null}cleanupInteractions(){this.interaction?.unset()}async setupInteractions(){this.cleanupInteractions();let{el:e,contentRef:a,resizable:r,position:l,collapsed:i,resizeHandleEl:t,layout:n}=this;if(!a.value||i||!r||!t)return;await this.el.componentOnReady();let{inlineSize:c,minInlineSize:b,blockSize:x,minBlockSize:g,maxInlineSize:v,maxBlockSize:k}=window.getComputedStyle(a.value),m={inlineSize:z(c),blockSize:z(x),minInlineSize:z(b),minBlockSize:z(g),maxInlineSize:z(v)||window.innerWidth,maxBlockSize:z(k)||window.innerHeight};this.resizeValues=m;let S=B(e)==="rtl";this.interaction=C(a.value,{context:e.ownerDocument}).resizable({edges:{top:l==="end"&&n==="horizontal"?t:!1,right:l===(S?"end":"start")&&n==="vertical"?t:!1,bottom:l==="start"&&n==="horizontal"?t:!1,left:l===(S?"start":"end")&&n==="vertical"?t:!1},modifiers:[C.modifiers.restrictSize({min:{width:m.minInlineSize,height:m.minBlockSize},max:{width:m.maxInlineSize,height:m.maxBlockSize}})],listeners:{resizestart:()=>{this.calciteInternalShellPanelResizeStart.emit()},resizeend:()=>{this.calciteInternalShellPanelResizeEnd.emit()},move:({rect:h})=>{let f=n==="horizontal";this.updateSize({size:f?h.height:h.width,type:f?"blockSize":"inlineSize"})}}})}setResizeHandleEl(e){this.resizeHandleEl=e,this.setupInteractions()}setActionBarsLayout(e){e.forEach(a=>a.layout=this.layout)}handleActionBarSlotChange(e){let a=M(e).filter(r=>r?.matches("calcite-action-bar"));this.actionBars=a,this.setActionBarsLayout(a)}handleHeaderSlotChange(e){this.hasHeader=L(e)}getResizeIcon(){let{layout:e}=this;return e==="horizontal"?U.dragVertical:U.dragHorizontal}renderHeader(){return y("header",p`<div class=${s(o.contentHeader)} .hidden=${!this.hasHeader}><slot name=${N.header} @slotchange=${this.handleHeaderSlotChange}></slot></div>`)}render(){let{collapsed:e,position:a,resizable:r,layout:l,displayMode:i,resizeValues:t}=this,n=B(this.el),c=!e&&r?y("resize-handle",p`<div .ariaLabel=${this.messages.resize} .ariaOrientation=${l==="horizontal"?"vertical":"horizontal"} .ariaValueMax=${l=="horizontal"?t.maxBlockSize:t.maxInlineSize} .ariaValueMin=${l=="horizontal"?t.minBlockSize:t.minInlineSize} .ariaValueNow=${l=="horizontal"?t.blockSize:t.inlineSize} class=${s(o.resizeHandle)} @keydown=${this.handleKeyDown} role=separator tabindex=0 touch-action=none ${$(this.setResizeHandleEl)}><div class=${s(o.resizeHandleBar)}><calcite-icon .icon=${this.getResizeIcon()} scale=s></calcite-icon></div></div>`):null,b=()=>l==="horizontal"?a==="start"?u.calciteAnimateInDown:u.calciteAnimateInUp:n==="ltr"&&a==="end"||n==="rtl"&&a==="start"?u.calciteAnimateInLeft:u.calciteAnimateInRight,x=p`<div class=${s(o.contentContainer)}>${y("content",p`<div class=${s({[u.rtl]:n==="rtl",[o.content]:!0,[o.contentOverlay]:i==="overlay",[o.floatContent]:i==="float-content"||i==="float",[u.calciteAnimate]:i==="overlay",[b()]:i==="overlay",[H("width",this.width,this.widthScale)]:!!(this.width||this.widthScale),[H("height",this.height,this.heightScale)]:!!(this.height||this.heightScale)})} .hidden=${e} ${$(this.contentRef)}>${this.renderHeader()}<div class=${s(o.contentBody)}><slot></slot></div>${c}</div>`)}</div>`,v=[y("action-bar-container",p`<div class=${s(o.actionBarContainer)}><slot name=${N.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`),x];return a==="end"&&v.reverse(),p`<div class=${s({[o.container]:!0,[o.floatAll]:i==="float-all"})}>${v}</div>`}};V("calcite-shell-panel",A);export{A as ShellPanel};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as S,b as C}from"./
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
|
+
import{a as S,b as C}from"./OOUQ3M3H.js";import{a as O,b as x}from"./VTUXQPJQ.js";import{a as g}from"./7TDHO33B.js";import{a as y}from"./Y6HUHLFC.js";import{l as v}from"./UHQFCDJN.js";import"./7OF5HYSI.js";import{D as b,E as p,P as f,g as h,h as u,o as m}from"./5U655FYR.js";var l={container:"container",containerHorizontal:"container--horizontal",containerVertical:"container--vertical"},E=h`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{display:flex;flex:1 1 auto}.container--vertical{flex-direction:column}.container--horizontal{flex-direction:row}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends b{constructor(){super(),this.dragEnabled=!0,this.items=[],this.mutationObserver=g("mutation",()=>{this.setUpSorting()}),this.disabled=!1,this.handleSelector="calcite-handle",this.layout="vertical",this.loading=!1,this.calciteListOrderChange=m({cancelable:!1}),this.listen("calciteHandleNudge",this.calciteHandleNudgeNextHandler)}static{this.properties={canPull:[0,{},{attribute:!1}],canPut:[0,{},{attribute:!1}],disabled:[7,{},{reflect:!0,type:Boolean}],dragSelector:[3,{},{reflect:!0}],group:[3,{},{reflect:!0}],handleSelector:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],loading:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=E}connectedCallback(){super.connectedCallback(),this.setUpSorting(),this.beginObserving()}load(){y.deprecated("component",{name:"sortable-list",removalVersion:4,suggested:"block-group"})}updated(){O(this)}disconnectedCallback(){super.disconnectedCallback(),C(this),this.endObserving()}calciteHandleNudgeNextHandler(e){this.handleNudgeEvent(e)}onGlobalDragStart(){this.endObserving()}onGlobalDragEnd(){this.beginObserving()}onDragEnd(){}onDragStart(){}onDragSort(){this.items=Array.from(this.el.children),this.calciteListOrderChange.emit()}handleNudgeEvent(e){let{direction:a}=e.detail,t=e.composedPath().find(r=>r.matches(this.handleSelector)),i=this.items.find(r=>r.contains(t)||e.composedPath().includes(r)),d=this.items.length-1,s=this.items.indexOf(i),o=!1,n;a==="up"?s===0?o=!0:n=s-1:s===d?n=0:s===d-1?o=!0:n=s+2,this.endObserving(),o?i.parentElement.appendChild(i):i.parentElement.insertBefore(i,this.items[n]),this.items=Array.from(this.el.children),this.beginObserving(),requestAnimationFrame(()=>v(t)),"selected"in t&&(t.selected=!0)}setUpSorting(){this.items=Array.from(this.el.children),S(this)}beginObserving(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}endObserving(){this.mutationObserver?.disconnect()}render(){let{disabled:e,layout:a}=this,t=a==="horizontal"||!1;return x({disabled:e,children:u`<div class=${p({[l.container]:!0,[l.containerVertical]:!t,[l.containerHorizontal]:t})}><slot></slot></div>`})}};f("calcite-sortable-list",c);export{c as SortableList};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{c as g,d as b}from"./
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
|
+
import{c as g,d as b}from"./LDYVYCUU.js";import{a as u}from"./7TDHO33B.js";import"./AVREH5PL.js";import{a as f}from"./LAOKZI3G.js";import"./IPESLF2H.js";import{a as m}from"./T5U6YQC7.js";import"./HYF2MQ7L.js";import"./WQBWKDSF.js";import{a as x}from"./Y6HUHLFC.js";import{u as h}from"./UHQFCDJN.js";import"./7OF5HYSI.js";import{D as d,E as s,P as p,g as r,h as i,o as a}from"./5U655FYR.js";var y={actionGroupEnd:"action-group--end",container:"container"},G={expandTooltip:"expand-tooltip"},C=r`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{display:block}@keyframes in{0%{opacity:0}to{opacity:1}}:host{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:var(--calcite-action-pad-corner-radius, .125rem);background:transparent}:host([expanded][layout=vertical]) .container{max-inline-size:var(--calcite-action-pad-expanded-max-width, auto)}:host([layout=vertical]) ::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:1px}.container{display:inline-flex;flex-direction:column;overflow:hidden;--tw-shadow: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);--tw-shadow-colored: 0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);gap:var(--calcite-action-pad-items-space, 0);border-radius:calc(var(--calcite-action-pad-corner-radius, .125rem) * 2);background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1))}.action-group--bottom{flex-grow:1;justify-content:flex-end;padding-block-end:0px}:host([layout=horizontal]) .container{flex-direction:row}:host([layout=horizontal]) .container .action-group--bottom{padding:0}:host([layout=horizontal]) .container ::slotted(calcite-action-group:not(:last-of-type)){border-inline-end-width:1px}:host([hidden]){display:none}[hidden]{display:none}`,n=class extends d{constructor(){super(),this.actions=[],this.mutationObserver=u("mutation",()=>this.mutationObserverHandler()),this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionPadToggle.emit()},this.messages=f(),this.focusSetter=m()(this),this.expandDisabled=!1,this.expanded=!1,this.layout="vertical",this.overlayPositioning="absolute",this.scale="m",this.selectionAppearance="neutral",this.calciteActionPadCollapse=a({cancelable:!1}),this.calciteActionPadExpand=a({cancelable:!1}),this.calciteActionPadToggle=a({cancelable:!1}),this.listen("calciteActionMenuOpen",this.actionMenuOpenHandler)}static{this.properties={expandTooltip:[16,{},{state:!0}],actionsEndGroupLabel:1,expandDisabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],position:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=C}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback(),this.updateActions(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}async load(){x.deprecated("component",{name:"action-pad",removalVersion:4,suggested:"action-bar"})}willUpdate(t){t.has("expanded")&&this.hasUpdated&&g({el:this.el,expanded:this.expanded}),t.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&this.updateGroups(),t.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteActionPadExpand.emit():this.calciteActionPadCollapse.emit()),t.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="neutral")&&this.updateActions()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}actionMenuOpenHandler(t){if(t.target.menuOpen){let o=t.composedPath();this.actionGroups?.forEach(e=>{o.includes(e)||(e.menuOpen=!1)})}}updateGroups(){let t=Array.from(this.el.querySelectorAll("calcite-action-group"));this.actionGroups=t,this.setGroupLayout(t)}setGroupLayout(t){t.forEach(o=>o.layout=this.layout)}handleDefaultSlotChange(){this.updateGroups(),this.queryAndStoreActions(),this.updateActions()}handleTooltipSlotChange(t){let o=h(t).filter(e=>e?.matches("calcite-tooltip"));this.expandTooltip=o[0]}updateActions(){this.actions.forEach(t=>{t.selectionAppearance=this.selectionAppearance})}queryAndStoreActions(){this.actions=Array.from(this.el.querySelectorAll("calcite-action"))}mutationObserverHandler(){this.updateGroups(),this.queryAndStoreActions(),this.updateActions()}renderBottomActionGroup(){let{expanded:t,expandDisabled:o,messages:e,el:v,position:A,toggleExpand:w,scale:l,layout:E,actionsEndGroupLabel:S,overlayPositioning:T}=this,c=o?null:b({collapseLabel:e.collapseLabel,collapseText:e.collapse,el:v,expandLabel:e.expandLabel,expandText:e.expand,expanded:t,position:A,scale:l,toggle:w,tooltip:this.expandTooltip});return c?i`<calcite-action-group class=${s(y.actionGroupEnd)} .label=${S} .layout=${E} .overlayPositioning=${T} .scale=${l}><slot name=${G.expandTooltip} @slotchange=${this.handleTooltipSlotChange}></slot>${c}</calcite-action-group>`:null}render(){return i`<div class=${s(y.container)}><slot @slotchange=${this.handleDefaultSlotChange}></slot>${this.renderBottomActionGroup()}</div>`}};p("calcite-action-pad",n);export{n as ActionPad};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
4
|
var m=(t,e,n)=>Math.max(e,Math.min(t,n)),c=new RegExp(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/),s=t=>{let e=(""+t).match(c);return!e||parseInt(e[1])===0?0:Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0))};function i(t){return s(t)>0&&t>0?parseFloat(`0.${t.toString().split(".")[1]}`):t}function o(t,e,n,a,r){return(t-e)*(r-a)/(n-e)+a}function g(t,e,n){return t<n?-1:t>e-n?1:0}export{m as a,s as b,i as c,o as d,g as e};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{e as u}from"./
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
|
+
import{e as u}from"./YD4RWCWT.js";import{a as d}from"./7TDHO33B.js";import{D as c,P as h,h as r,o}from"./5U655FYR.js";var b=[" ",`
|
|
5
5
|
`," ","\r"],m=/[^\S\u00A0]+/g,a=class extends c{constructor(){super(...arguments),this.mutationObserver=d("mutation",()=>{this.ensureTextContentDependentProps(),this.calciteInternalOptionChange.emit()}),this.disabled=!1,this.calciteInternalOptionChange=o({cancelable:!1})}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],label:1,selected:[7,{},{reflect:!0,type:Boolean}],value:1}}connectedCallback(){super.connectedCallback(),this.ensureTextContentDependentProps(),this.mutationObserver?.observe(this.el,{attributeFilter:["label","value"],characterData:!0,childList:!0,subtree:!0})}willUpdate(e){e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handlePropChange(this.disabled,e.get("disabled"),"disabled"),e.has("label")&&this.handlePropChange(this.label,e.get("label"),"label"),e.has("selected")&&this.handlePropChange(this.selected,e.get("selected"),"selected"),e.has("value")&&this.handlePropChange(this.value,e.get("value"),"value")}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}handlePropChange(e,s,t){(t==="label"||t==="value")&&this.ensureTextContentDependentProps(),this.calciteInternalOptionChange.emit()}ensureTextContentDependentProps(){let{el:e,internallySetLabel:s,internallySetValue:t,label:p,value:i}=this,l=u(e.textContent,b).replaceAll(m," "),n=p;(!n||n===s)&&(this.label=l,this.internallySetLabel=l),(i==null||i===t)&&(this.value=l,this.internallySetValue=l)}render(){return r`<slot>${this.label}</slot>`}};h("calcite-option",a);export{a as Option};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
4
|
var a=class{constructor(){this._formatterCache=new Map,this._commonDateTimeFormatterOptions={year:"numeric",month:"2-digit",day:"2-digit",timeZoneName:"shortOffset"}}get name(){return"native"}create(t){return new Date(t)}increase(t){return new Date(t.getTime()+864e5)}formatToIsoDateString(t){let e=t.getFullYear(),n=t.getMonth()+1,r=t.getDate();return`${e}-${n.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}`}isoToTimeZone(t,e){let n=this._toDate(t),o=this._getFormatter(e).formatToParts(n),[i]=o.filter(({type:s})=>s==="timeZoneName").map(({value:s})=>s),m=this._getTimeZoneOffsetInMins(i),c=n.getMinutes()-(n.getTimezoneOffset()-m);return n.setMinutes(c),n}same(t,e){return t.getTime()===e.getTime()}_toDate(t){return new Date(t)}_getFormatter(t){t==="Factory"&&(t="Etc/GMT");let e=this._formatterCache.get(t);return e||(e=new Intl.DateTimeFormat("en-US",{timeZone:t,...this._commonDateTimeFormatterOptions}),this._formatterCache.set(t,e)),e}_getTimeZoneOffsetInMins(t){let[e,...n]=t.slice(3),[r,o]=n.join("").split(":");return(e==="+"?1:-1)*(Number(r)*60+Number(o||0))}};export{a as DateEngine};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{h as m,i as p,j as S}from"./
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
|
+
import{h as m,i as p,j as S}from"./5U655FYR.js";var u=Symbol.for(""),d=t=>{if(t?.r===u)return t?._$litStatic$},_=t=>({_$litStatic$:t,r:u}),w=(t,...a)=>({_$litStatic$:a.reduce(((l,i,o)=>l+(e=>{if(e._$litStatic$!==void 0)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but
|
|
5
5
|
take care to ensure page security.`)})(i)+t[o+1]),t[0]),r:u}),v=new Map,c=t=>(a,...l)=>{let i=l.length,o,e,r=[],$=[],n,s=0,f=!1;for(;s<i;){for(n=a[s];s<i&&(e=l[s],(o=d(e))!==void 0);)n+=o+a[++s],f=!0;s!==i&&$.push(e),r.push(n),s++}if(s===i&&r.push(a[i]),f){let h=r.join("$$lit$$");(a=v.get(h))===void 0&&(r.raw=r,v.set(h,a=r)),l=$}return t(a,...l)},b=c(m),y=c(p),j=c(S);export{_ as a,w as b,b as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as b}from"./
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
|
+
import{a as b}from"./OC3TJUGO.js";import{a as f,b as g}from"./2BARN33W.js";import"./ENA65GGI.js";var M=new Date,T=M.toISOString(),v=365,y=v,R={groupDateRange:y,startDate:T},S=(t,r,e)=>{let o=[],n=e.create(t);for(let l=0;l<=r;l++)n=e.increase(n),o.push(e.formatToIsoDateString(n));return o},w=(t,r,e,o)=>{let n=new Map,l=S(r,e,o);return t.map(c=>{let{label:s}=c,a=g(s),u=l.map(m=>{let d=`${m}-${s}`,i=n.get(d);return i||(i=o.isoToTimeZone(m,s),n.set(d,i),i)});return{...c,continent:a,isRegularContinent:a!==f,dates:u}})},J=(t,r,e)=>t.length===r.length&&t.every((o,n)=>e.same(o,r[n])),Z=(t,r=5)=>{let e=t.filter(({label:n})=>g(n)!==f);if(e.length===0)return[0];let o=e.map(n=>t.indexOf(n));return x(o,r)};function x(t,r=5){let e=t.length;if(e<=r)return t;let o=Math.min(e-2,r-2),n=(e-1)/(o+1);return[t[0],...Array.from({length:o},(l,c)=>t[Math.round((c+1)*n)]),t[e-1]]}async function G(t){let{groupDateRange:r,startDate:e,dateEngine:o}={...R,...t},n=[];if(!o)throw new Error("dateEngine is required");let l=b.map(s=>({label:s})),c=w(l,e,r,o);for(let s of c){let{label:a,continent:u,dates:m}=s;if(s.visited)continue;s.visited=!0;let d={labelIdx:[],tzs:[{label:a}]};for(let i of c.filter(p=>!p.visited)){let{label:p,continent:h,isRegularContinent:z,dates:D}=i;if((u===h||!z)&&J(m,D,o)){let I={label:p};d.tzs.push(I),i.visited=!0}}n.push(d)}return n.map(s=>(s.tzs=s.tzs.sort((a,u)=>a.label.localeCompare(u.label)),{labelTzIdx:Z(s.tzs,7),tzs:s.tzs.map(a=>a.label)})).sort((s,a)=>a.tzs.length-s.tzs.length)}export{G as groupByOffset};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as u}from"./
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
|
+
import{a as u}from"./6Y7CFF2P.js";import{a}from"./WQBWKDSF.js";import{C as e,E as r,h as o,l as n}from"./5U655FYR.js";var i={button:"x-button",buttonRound:"x-button--round"},k=({disabled:c,focusable:b,key:m,label:s,onClick:l,ref:$,round:f=!0,scale:t,title:p})=>u(m,o`<button .ariaLabel=${s} class=${r({[(d=>`x-button--${d}`)(t)]:!0,[i.button]:!0,[i.buttonRound]:f})} .disabled=${c} @click=${l} .tabIndex=${b?0:-1} title=${p??n} type=button ${e($)}><calcite-icon icon=x .scale=${a(t)}></calcite-icon></button>`);export{i as a,k as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as O}from"./
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
|
+
import{a as O}from"./H5MCDA7V.js";import{a as z}from"./YD4RWCWT.js";import{a as S,b as C,c as D,d as T}from"./LDYVYCUU.js";import{a as f}from"./7TDHO33B.js";import"./AVREH5PL.js";import{a as E}from"./LAOKZI3G.js";import"./IPESLF2H.js";import{a as y}from"./T5U6YQC7.js";import"./HYF2MQ7L.js";import"./WQBWKDSF.js";import"./Y6HUHLFC.js";import{t as A,u as w}from"./UHQFCDJN.js";import"./7OF5HYSI.js";import{D as x,E as u,K as v,P as m,g,h as p,o as c}from"./5U655FYR.js";var $=({bufferSize:r=0,containerSize:e,itemSizes:t})=>{let o=e-r,s=t.length,a=0;for(let[n,i]of t.entries())if(a=a+i,a>o){s=n;break}else continue;return s},B=({bufferSize:r=0,containerSize:e,itemSizes:t})=>Math.max(t.length-$({bufferSize:r,itemSizes:t,containerSize:e}),0),G={container:"container",actionGroupEnd:"action-group--end"},H={actionsEnd:"actions-end",expandTooltip:"expand-tooltip"},L=g`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{display:inline-flex;align-self:stretch;background:transparent}.container{display:inline-flex;flex:1 1 auto;flex-direction:column;gap:var(--calcite-action-bar-items-space, 0);background-color:var(--calcite-action-bar-background-color, var(--calcite-color-foreground-1))}@keyframes in{0%{opacity:0}to{opacity:1}}:host([floating]) .container{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;overflow:hidden;border-radius:var(--calcite-action-bar-corner-radius, var(--calcite-corner-radius-round));--tw-shadow: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);--tw-shadow-colored: 0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--calcite-action-bar-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow))}:host([layout=vertical]){flex-direction:column}:host([layout=vertical]):host([overflow-actions-disabled]) .container{overflow-y:auto}:host([layout=vertical]):host([expanded]) .container{max-inline-size:var(--calcite-action-bar-expanded-max-width, auto)}:host([layout=vertical]) .action-group--end{margin-block-start:auto}:host([layout=vertical]) ::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm)}:host([layout=horizontal]){flex-direction:row}:host([layout=horizontal]) .container{flex-direction:row}:host([layout=horizontal]):host([overflow-actions-disabled]) .container{overflow-x:auto}:host([layout=horizontal]) .action-group--end{margin-inline-start:auto}:host([layout=horizontal]) ::slotted(calcite-action-group:not(:last-of-type)){border-inline-end-width:var(--calcite-border-width-sm)}.action-group--end{justify-content:flex-end}:host([hidden]){display:none}[hidden]{display:none}`,b=class extends x{constructor(){super(),this.actions=[],this.mutationObserver=f("mutation",()=>this.mutationObserverHandler()),this.cancelable=O()(this),this.resize=z(({width:e,height:t})=>{let{expanded:o,expandDisabled:s,layout:a,overflowActionsDisabled:n,actionGroups:i}=this;if(n||a==="vertical"&&!t||a==="horizontal"&&!e)return;let l=this.getItemSizes();this.updateGroups();let d=this.hasActionsEnd||!s?i.length+1:i.length,h=B({bufferSize:d,containerSize:a==="horizontal"?e:t,itemSizes:l});C({actionGroups:i,expanded:o,overflowCount:h})},v.resize),this.resizeHandler=e=>{let{width:t,height:o}=e.contentRect;this.resize({width:t,height:o})},this.resizeObserver=f("resize",e=>this.resizeHandlerEntries(e)),this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionBarToggle.emit()},this.messages=E(),this.focusSetter=y()(this),this.setExpandToggleEl=e=>{this.expandToggleEl=e},this.hasActionsEnd=!1,this.floating=!1,this.expandDisabled=!1,this.expanded=!1,this.layout="vertical",this.overflowActionsDisabled=!1,this.overlayPositioning="absolute",this.scale="m",this.selectionAppearance="neutral",this.calciteActionBarCollapse=c({cancelable:!1}),this.calciteActionBarExpand=c({cancelable:!1}),this.calciteActionBarToggle=c({cancelable:!1}),this.listen("calciteActionMenuOpen",this.actionMenuOpenHandler)}static{this.properties={expandTooltip:[16,{},{state:!0}],hasActionsEnd:[16,{},{state:!0}],actionsEndGroupLabel:1,floating:[7,{},{reflect:!0,type:Boolean}],expandDisabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overflowActionsDisabled:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],position:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.styles=L}async overflowActions(){this.resize({width:this.el.clientWidth,height:this.el.clientHeight})}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),this.updateGroups(),this.overflowActions(),this.updateActions(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.overflowActionsDisabledHandler(this.overflowActionsDisabled),this.cancelable.add(this.resize)}willUpdate(e){e.has("expandDisabled")&&(this.hasUpdated||this.expandDisabled!==!1)&&this.overflowActions(),e.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&this.updateGroups(),e.has("overflowActionsDisabled")&&(this.hasUpdated||this.overflowActionsDisabled!==!1)&&this.overflowActionsDisabledHandler(this.overflowActionsDisabled),e.has("expanded")&&this.hasUpdated&&(this.expandedHandler(),this.expanded?this.calciteActionBarExpand.emit():this.calciteActionBarCollapse.emit()),e.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="neutral")&&this.updateActions()}loaded(){this.overflowActions()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect()}getItemSizes(){let{el:e,layout:t,expandToggleEl:o}=this,s=S(e);o&&s.push(o);let a=t==="horizontal"?"clientWidth":"clientHeight",n=Math.max(...s.map(i=>i[a]||0));return s.map(i=>i[a]||n)}expandedHandler(){let{el:e,expanded:t}=this;D({el:e,expanded:t}),this.overflowActions()}overflowActionsDisabledHandler(e){if(e){this.resizeObserver?.disconnect();return}this.resizeObserver?.observe(this.el),this.overflowActions()}actionMenuOpenHandler(e){if(e.target.menuOpen){let t=e.composedPath();this.actionGroups?.forEach(o=>{t.includes(o)||(o.menuOpen=!1)})}}mutationObserverHandler(){this.updateGroups(),this.overflowActions(),this.queryAndStoreActions(),this.updateActions()}resizeHandlerEntries(e){e.forEach(this.resizeHandler)}updateGroups(){let e=Array.from(this.el.querySelectorAll("calcite-action-group"));this.actionGroups=e,e.forEach(t=>{t.layout=this.layout,t.scale=this.scale})}handleDefaultSlotChange(){this.updateGroups(),this.queryAndStoreActions(),this.updateActions()}handleActionsEndSlotChange(e){this.hasActionsEnd=A(e)}handleTooltipSlotChange(e){let t=w(e).filter(o=>o?.matches("calcite-tooltip"));this.expandTooltip=t[0]}updateActions(){this.actions.forEach(e=>{e.selectionAppearance=this.selectionAppearance})}queryAndStoreActions(){this.actions=Array.from(this.el.querySelectorAll("calcite-action"))}renderBottomActionGroup(){let{expanded:e,expandDisabled:t,el:o,position:s,toggleExpand:a,scale:n,layout:i,messages:l,actionsEndGroupLabel:d,overlayPositioning:h}=this,k=t?null:T({collapseLabel:l.collapseLabel,collapseText:l.collapse,el:o,expandLabel:l.expandLabel,expandText:l.expand,expanded:e,position:s,ref:this.setExpandToggleEl,scale:n,toggle:a,tooltip:this.expandTooltip});return p`<calcite-action-group class=${u(G.actionGroupEnd)} .hidden=${this.expandDisabled&&!this.hasActionsEnd} .label=${d} .layout=${i} .overlayPositioning=${h} .scale=${n}><slot name=${H.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot><slot name=${H.expandTooltip} @slotchange=${this.handleTooltipSlotChange}></slot>${k}</calcite-action-group>`}render(){return p`<div class=${u(G.container)}><slot @slotchange=${this.handleDefaultSlotChange}></slot>${this.renderBottomActionGroup()}</div>`}};m("calcite-action-bar",b);export{b as ActionBar};
|