@esri/calcite-components 5.0.0-next.6 → 5.0.0-next.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/calcite/{XQAX6FNF.js → 24UNOSYB.js} +2 -2
- package/dist/calcite/{2IIGKMQ6.js → 2ECRIOED.js} +2 -2
- package/dist/calcite/{WBXWOFF6.js → 2HYBRHEU.js} +2 -2
- package/dist/calcite/{LX3J3Q7Q.js → 2IQPS5BW.js} +1 -1
- package/dist/calcite/{PMWGEAYN.js → 2KVMN7YW.js} +2 -2
- package/dist/calcite/{FSNEMWMV.js → 2OCIK6EF.js} +2 -2
- package/dist/calcite/{EOWCTVN7.js → 2RX7VGW7.js} +2 -2
- package/dist/calcite/{JSS6WCPJ.js → 35ODAW6Y.js} +2 -2
- package/dist/calcite/{6EKZQPKT.js → 3BUYFS42.js} +2 -2
- package/dist/calcite/{7EIPWPP6.js → 3DKJFWNF.js} +1 -1
- package/dist/calcite/{VCXMHEPN.js → 3HF47TJO.js} +2 -2
- package/dist/calcite/{JD5Y5FIJ.js → 3I3IVUOR.js} +2 -2
- package/dist/calcite/{NHRWRXH2.js → 3ND3NKAM.js} +2 -2
- package/dist/calcite/{DN6V2M24.js → 3Y3BABEA.js} +1 -1
- package/dist/calcite/{5T7WLABP.js → 4I7T7O63.js} +2 -2
- package/dist/calcite/{A7OBU3ZB.js → 4PHM5LVD.js} +1 -1
- package/dist/calcite/{JD35MQMV.js → 4VLHPNAN.js} +2 -2
- package/dist/calcite/{B36ZLEKI.js → 4ZGFBBWU.js} +2 -2
- package/dist/calcite/{43KOILAW.js → 54C7JZCX.js} +2 -2
- package/dist/calcite/{QYN6LQ5J.js → 5CNBXVWP.js} +2 -2
- package/dist/calcite/{OXZ2Y5YM.js → 5RCYTHKP.js} +1 -1
- package/dist/calcite/{FWMD4ANX.js → 63DWWG4C.js} +2 -2
- package/dist/calcite/{4FSJL2OC.js → 64ADIWEN.js} +2 -2
- package/dist/calcite/{PBO64SRK.js → 6LFC7HO5.js} +1 -1
- package/dist/calcite/{GWC7UZVN.js → 6PCOKKOU.js} +2 -2
- package/dist/calcite/{VUYRIPVA.js → 6V5G43HO.js} +2 -2
- package/dist/calcite/{AANSYYFF.js → 6YPBRY3A.js} +2 -2
- package/dist/calcite/{5HV6X5DX.js → 76NBXXTM.js} +2 -2
- package/dist/calcite/{6GKHPG2T.js → 77YWD3SD.js} +2 -2
- package/dist/calcite/{WYLLIW2W.js → 7AGPEFKM.js} +2 -2
- package/dist/calcite/{X46HC2YH.js → 7EYTTVZ5.js} +2 -2
- package/dist/calcite/{RLF4GWLJ.js → 7IYMG4ER.js} +2 -2
- package/dist/calcite/{6YVXONLB.js → 7LUAHEOY.js} +2 -2
- package/dist/calcite/{XJ4SR7WO.js → 7RLP2DKK.js} +1 -1
- package/dist/calcite/{MYWUD5PR.js → 7TMYLJNL.js} +2 -2
- package/dist/calcite/{PPV5DY5L.js → 7TUINXH2.js} +2 -2
- package/dist/calcite/{NKYR42W6.js → 7ZHPTFVA.js} +2 -2
- package/dist/calcite/{CZF6KYOX.js → AD2NNFBJ.js} +1 -1
- package/dist/calcite/{KR5QX3PG.js → AK3MQKBH.js} +2 -2
- package/dist/calcite/{VS3YLYMZ.js → AKL3TSYT.js} +1 -1
- package/dist/calcite/{JTAYXV5Y.js → ALBSZ4AH.js} +1 -1
- package/dist/calcite/{UROEAN4Q.js → ATPINFYW.js} +2 -2
- package/dist/calcite/{JNCHO6X5.js → B45OJKRH.js} +2 -2
- package/dist/calcite/{3COSYM4H.js → B7BMLZ2H.js} +2 -2
- package/dist/calcite/{LFYXGVGK.js → BAESWKYQ.js} +2 -2
- package/dist/calcite/{6PMY6MUE.js → BC4ZMTFC.js} +2 -2
- package/dist/calcite/{NSIT4HJE.js → BES467QA.js} +2 -2
- package/dist/calcite/{SL3VKZG5.js → BOWHKIKV.js} +2 -2
- package/dist/calcite/{CYUZWU4F.js → D54UBP4E.js} +2 -2
- package/dist/calcite/{U74QHS5H.js → D6WKHYT4.js} +2 -2
- package/dist/calcite/{PCGNN5RO.js → DDSPVSLH.js} +2 -2
- package/dist/calcite/{BTK24FM2.js → DIWZOGSO.js} +2 -2
- package/dist/calcite/{OFHMIOCW.js → DQ3HNJFH.js} +2 -2
- package/dist/calcite/{WXESTAXY.js → EFJ3XPYN.js} +2 -2
- package/dist/calcite/{ABRDCSJF.js → ENP5M2UC.js} +1 -1
- package/dist/calcite/{53JXVKUS.js → EZFMZ526.js} +2 -2
- package/dist/calcite/{ZAD5LV3P.js → F3FMRPUL.js} +2 -2
- package/dist/calcite/{A6ZYDDPX.js → FJGFRFXA.js} +2 -2
- package/dist/calcite/{VYLJCYTD.js → FSBWTOKG.js} +2 -2
- package/dist/calcite/{ZOBQ5UTK.js → FZSVZEO4.js} +2 -2
- package/dist/calcite/{EHZXDIG5.js → G5DFRKUT.js} +2 -2
- package/dist/calcite/{IODUDIBK.js → G6YXDPGD.js} +2 -2
- package/dist/calcite/{B53J7Q5J.js → G7Z7TBM3.js} +2 -2
- package/dist/calcite/{XTDUXEIX.js → GCM5UXYU.js} +2 -2
- package/dist/calcite/{UCG3QU7A.js → GQKPWPHX.js} +2 -2
- package/dist/calcite/{6EEMG3AJ.js → GZGGTN2Z.js} +2 -2
- package/dist/calcite/{OYVYZ6ZO.js → H4XP55OC.js} +2 -2
- package/dist/calcite/{KDHLLH5G.js → HIAAXHAL.js} +1 -1
- package/dist/calcite/{K2RWUB5W.js → HIJA3ZQC.js} +2 -2
- package/dist/calcite/{56HP62NE.js → HJDKPRY3.js} +1 -1
- package/dist/calcite/{44XNJNTA.js → HWDBQK2D.js} +1 -1
- package/dist/calcite/{NOOPM2CL.js → HZH2MCFD.js} +1 -1
- package/dist/calcite/{SLWHNU7X.js → HZPG2SWG.js} +2 -2
- package/dist/calcite/{ZPU3MCWK.js → IC5WCEPX.js} +2 -2
- package/dist/calcite/{SZXBPZ7S.js → IDJNYNZL.js} +2 -2
- package/dist/calcite/{2XFESLAQ.js → IGUWR4FW.js} +2 -2
- package/dist/calcite/{ID4WJFNU.js → ILIB7POV.js} +2 -2
- package/dist/calcite/{UKQ6KSXO.js → IQOVIHRV.js} +2 -2
- package/dist/calcite/{FQKP2XIR.js → IQROUFUT.js} +2 -2
- package/dist/calcite/{P6BUUDOL.js → IQY3P34D.js} +2 -2
- package/dist/calcite/{YG5VYPTQ.js → J4UVTWRA.js} +2 -2
- package/dist/calcite/{WC4TGTDM.js → J5N7X673.js} +2 -2
- package/dist/calcite/{ZEMRH6DW.js → JDCUDQFO.js} +2 -2
- package/dist/calcite/{RW5EELAZ.js → JERKEE6O.js} +2 -2
- package/dist/calcite/{LFSTWFMB.js → JOGTHWSZ.js} +2 -2
- package/dist/calcite/{LNKZ4ULL.js → JSFR3YQ3.js} +2 -2
- package/dist/calcite/{OFO7DXMT.js → JVPR6YZA.js} +1 -1
- package/dist/calcite/{IFQNEPTP.js → K5KOFFWP.js} +2 -2
- package/dist/calcite/{76DFVIQ3.js → KEVLNRNX.js} +2 -2
- package/dist/calcite/{3M2X4DMO.js → KINXAP24.js} +2 -2
- package/dist/calcite/{HZJQA7EQ.js → KJ6B56VZ.js} +2 -2
- package/dist/calcite/{TYPQP3Q3.js → KPSSR45E.js} +2 -2
- package/dist/calcite/{65HZ2HOS.js → LDHSD3M6.js} +2 -2
- package/dist/calcite/{OBY2JHHI.js → LHYFZTCS.js} +2 -2
- package/dist/calcite/{3W422TPV.js → LKORF2QC.js} +2 -2
- package/dist/calcite/{ULXDFGLX.js → LLZVI27K.js} +2 -2
- package/dist/calcite/{4YTONN4P.js → LOPTIQJU.js} +2 -2
- package/dist/calcite/{TBM5T67T.js → LZ3EBLID.js} +2 -2
- package/dist/calcite/{JVYKUU2B.js → M3RKWDE5.js} +2 -2
- package/dist/calcite/{E5NO42AW.js → M4K4HY3K.js} +1 -1
- package/dist/calcite/{OD7IPBKO.js → MJWAQ2DA.js} +2 -2
- package/dist/calcite/{TWGPU2HX.js → MXNI5GI4.js} +2 -2
- package/dist/calcite/{NKMBE4R4.js → MYURWUJP.js} +2 -2
- package/dist/calcite/{PRLHDLWI.js → N6NZ2GPW.js} +2 -2
- package/dist/calcite/{ZJD56MA6.js → NNOPKVPT.js} +2 -2
- package/dist/calcite/{6OLYWF6Z.js → O7MZFL34.js} +2 -2
- package/dist/calcite/{57TYRZR3.js → OOLTKMQJ.js} +2 -2
- package/dist/calcite/{HBSTMWBE.js → OVNV2JKE.js} +2 -2
- package/dist/calcite/{PQDB6CTL.js → OVVNV5BW.js} +2 -2
- package/dist/calcite/{MPYXWS5E.js → OWSWQHLM.js} +1 -1
- package/dist/calcite/{FMB23RBB.js → OZ3WSD3P.js} +1 -1
- package/dist/calcite/{DUM3R2CL.js → OZMAX3VQ.js} +2 -2
- package/dist/calcite/{L63HBU2O.js → PN64O3P6.js} +2 -2
- package/dist/calcite/{SHFV6LYT.js → POAMCSPF.js} +2 -2
- package/dist/calcite/{T3QJCLEX.js → PUPMRTUL.js} +2 -2
- package/dist/calcite/{AIANT2RL.js → PWZGTFQO.js} +2 -2
- package/dist/calcite/{JJP2FEER.js → Q3THBLRM.js} +1 -1
- package/dist/calcite/{LX7GBILP.js → QGI3TWNX.js} +2 -2
- package/dist/calcite/{XIXFKVFZ.js → QR2HL6XI.js} +1 -1
- package/dist/calcite/{5BQ76NQW.js → QVSPMDDW.js} +2 -2
- package/dist/calcite/{7AG2R6XN.js → QYBWEPW5.js} +2 -2
- package/dist/calcite/{SSLEHUOY.js → R7Q2LFGI.js} +2 -2
- package/dist/calcite/{XTYQVPDC.js → REXSF55X.js} +2 -2
- package/dist/calcite/{FHRBYILV.js → RHBRNWUQ.js} +2 -2
- package/dist/calcite/{TOSB6ECB.js → RIB7K6T6.js} +2 -2
- package/dist/calcite/{7DQ4G2FS.js → SBARVI35.js} +2 -2
- package/dist/calcite/{IJDY7EKO.js → SBJ5HVNQ.js} +2 -2
- package/dist/calcite/{DATE73WS.js → SH7VNOTQ.js} +2 -2
- package/dist/calcite/{6FCYAKPP.js → SIVW7YY5.js} +2 -2
- package/dist/calcite/{EFDQMGZP.js → SJGZNFSY.js} +2 -2
- package/dist/calcite/{4M5YCJ4Q.js → T36PZDA3.js} +2 -2
- package/dist/calcite/{Q4IQBOWU.js → T7VT42NJ.js} +2 -2
- package/dist/calcite/{IAOITTID.js → THGJ3ZD3.js} +2 -2
- package/dist/calcite/{A6DNGYP7.js → TPQICMSC.js} +2 -2
- package/dist/calcite/{QCGVJHJ6.js → TRYMHQWX.js} +2 -2
- package/dist/calcite/TSJA4LWX.js +4 -0
- package/dist/calcite/{H2NP25UI.js → UE627G6U.js} +1 -1
- package/dist/calcite/{GWYUQTSG.js → UERWI2LS.js} +2 -2
- package/dist/calcite/{SXOKB2BX.js → UFHAJ3AG.js} +2 -2
- package/dist/calcite/{REY2OA4D.js → UHKUQQRT.js} +2 -2
- package/dist/calcite/{SXMKRRD6.js → UIHFYOPH.js} +2 -2
- package/dist/calcite/{7XEO6UJ3.js → ULUKHLQN.js} +2 -2
- package/dist/calcite/{MTRDCPVY.js → USBSH7KC.js} +2 -2
- package/dist/calcite/{KLLDUBU7.js → UTWEOJW6.js} +2 -2
- package/dist/calcite/{CFWXX2ZT.js → UVFQM6FI.js} +2 -2
- package/dist/calcite/{NQF73COG.js → UWREJ25T.js} +2 -2
- package/dist/calcite/{BKNGM5YO.js → UWUSKJIU.js} +2 -2
- package/dist/calcite/{HURJRVCG.js → V6VV5MRC.js} +2 -2
- package/dist/calcite/{ZOINAXKM.js → VFQAYOAN.js} +2 -2
- package/dist/calcite/{H3GTITDX.js → W4XITGKA.js} +2 -2
- package/dist/calcite/{TTLR3A5P.js → W4Y22TCR.js} +2 -2
- package/dist/calcite/{AHOADFZ7.js → WG7RY7HV.js} +2 -2
- package/dist/calcite/{GLUJXIHJ.js → WR7PEL2H.js} +2 -2
- package/dist/calcite/{ABFHGJOG.js → WW6CS7FX.js} +2 -2
- package/dist/calcite/{BOFKO4PD.js → WZGZ5PZT.js} +2 -2
- package/dist/calcite/{N3QXJKKO.js → X7OME6SM.js} +2 -2
- package/dist/calcite/{LDFECFWX.js → XECJM3YP.js} +2 -2
- package/dist/calcite/{YQQN42G5.js → XGARHDI3.js} +2 -2
- package/dist/calcite/{SXK4ATVN.js → XGPCFFL2.js} +2 -2
- package/dist/calcite/{HM4RW4PL.js → XLJGRDO4.js} +2 -2
- package/dist/calcite/{GS2BRYGH.js → XU6PDNU5.js} +2 -2
- package/dist/calcite/{3ISWQGU4.js → Y3X3JA73.js} +2 -2
- package/dist/calcite/{VMEYQQVI.js → YFY6OPEB.js} +2 -2
- package/dist/calcite/{62XLJEVX.js → YHUESRZY.js} +2 -2
- package/dist/calcite/{MEWZXHJ6.js → YNIG5SX5.js} +2 -2
- package/dist/calcite/{O72KETNZ.js → YR554YXQ.js} +2 -2
- package/dist/calcite/{TUAQEJC4.js → YUOZM346.js} +2 -2
- package/dist/calcite/{BMB7PJZB.js → ZIA4F7R5.js} +2 -2
- package/dist/calcite/{GSSIFYMO.js → ZIABK7KW.js} +2 -2
- package/dist/calcite/{UQ4HIO7J.js → ZOYJ4343.js} +2 -2
- package/dist/calcite/{7GYHOBTA.js → ZV3IGLDE.js} +2 -2
- package/dist/calcite/{POOA337X.js → ZVCPJCBM.js} +1 -1
- package/dist/calcite/calcite.esm.js +2 -2
- package/dist/chunks/runtime.js +4 -4
- package/dist/components/calcite-card/customElement.js +1 -1
- package/dist/docs/api.json +26 -26
- package/dist/docs/docs.json +76 -76
- package/dist/docs/supported-browsers.json +1 -1
- package/dist/docs/web-types.json +26 -26
- package/package.json +2 -2
- package/dist/calcite/DEJFI4YA.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{e as d}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{e as d}from"./SBARVI35.js";import"./HWDBQK2D.js";import{D as l,E as t,F as n,J as s,P as c,g as o,h as r}from"./2ECRIOED.js";var v=o`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{position:relative;display:block;inline-size:100%}.track,.bar{position:absolute;inset-block-start:0px;block-size:2px}.track{z-index:var(--calcite-z-index);inline-size:100%;overflow:hidden;background-color:var(--calcite-progress-background-color, var(--calcite-color-border-3))}.bar{z-index:var(--calcite-z-index);background-color:var(--calcite-progress-fill-color, var(--calcite-color-brand))}@media(forced-colors:active){.track{background-color:highlightText}.bar{background-color:linkText}}.indeterminate{inline-size:20%;animation:looping-progress-bar-ani calc(var(--calcite-internal-animation-timing-medium) / var(--calcite-internal-duration-factor) * 11 / var(--calcite-internal-duration-factor)) linear infinite}.indeterminate.calcite--rtl{animation-name:looping-progress-bar-ani-rtl}.reversed{animation-direction:reverse}.text{padding-inline:0px;padding-block:1rem 0px;text-align:center;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-progress-text-color, var(--calcite-color-text-2))}@keyframes looping-progress-bar-ani{0%{transform:translate3d(-100%,0,0)}50%{inline-size:40%}to{transform:translate3d(600%,0,0)}}@keyframes looping-progress-bar-ani-rtl{0%{transform:translate3d(100%,0,0)}50%{inline-size:40%}to{transform:translate3d(-600%,0,0)}}:host([hidden]){display:none}[hidden]{display:none}`,i={track:"track",bar:"bar",text:"text"},a=class extends l{constructor(){super(...arguments),this.reversed=!1,this.type="determinate",this.value=0}static{this.properties={label:1,reversed:[7,{},{reflect:!0,type:Boolean}],text:1,type:[3,{},{reflect:!0}],value:[9,{},{type:Number}]}}static{this.styles=v}render(){let e=this.type==="determinate",m=e?{width:`${this.value}%`}:{},p=d(this.el);return r`<div .ariaLabel=${this.label||this.text} .ariaValueMax=${e?"100":void 0} .ariaValueMin=${e?"0":void 0} .ariaValueNow=${e?this.value:void 0} role=progressbar><div class=${t(i.track)}><div class=${t({[i.bar]:!0,indeterminate:this.type==="indeterminate",[s.rtl]:p==="rtl",reversed:this.reversed})} style=${n(m)}></div></div>${this.text?r`<div class=${t(i.text)}>${this.text}</div>`:null}</div>`}};c("calcite-progress",a);export{a as Progress};
|
|
@@ -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{E as c,h as s}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{E as c,h as s}from"./2ECRIOED.js";var i={textMatch:"text-match"};function o(t){return t.charAt(0).toUpperCase()+t.slice(1)}function n({text:t,pattern:r}){if(!r||!t)return t;let a=t.split(r);return a.length>1&&(a[1]=s`<mark class=${c(i.textMatch)}>${a[1]}</mark>`),a}export{o as a,n 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 u,b as I}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as u,b as I}from"./ZOYJ4343.js";import{a as f}from"./XGPCFFL2.js";import"./BC4ZMTFC.js";import"./DDSPVSLH.js";import"./W4XITGKA.js";import{u as m,y as l}from"./SBARVI35.js";import"./HWDBQK2D.js";import{B as r,C as h,D as d,P as p,g as a,h as o,o as n}from"./2ECRIOED.js";var S=a`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}.container{display:flex;inline-size:100%;flex-wrap:wrap;gap:.5rem}::slotted(calcite-chip){flex:none}:host([scale=s]) .container{gap:.25rem}:host([scale=l]) .container{gap:.75rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends d{constructor(){super(),this.items=[],this.slotRef=r(),this.focusSetter=f()(this),this.disabled=!1,this.scale="m",this.selectedItems=[],this.selectionMode="none",this.calciteChipGroupSelect=n({cancelable:!1}),this.listen("calciteInternalChipKeyEvent",this.calciteInternalChipKeyEventListener),this.listen("calciteChipClose",this.calciteChipCloseListener),this.listen("calciteChipSelect",this.calciteChipSelectListener),this.listen("calciteInternalChipSelect",this.calciteInternalChipSelectListener),this.listen("calciteInternalSyncSelectedChips",this.calciteInternalSyncSelectedChips)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],label:1,scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=S}async setFocus(e){return this.focusSetter(()=>this.selectedItems[0]||this.items[0],e)}willUpdate(e){e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")&&this.updateItems()}updated(){u(this)}calciteInternalChipKeyEventListener(e){if(e.composedPath().includes(this.el)){let t={ArrowRight:"next",ArrowLeft:"previous",Home:"first",End:"last"}[e.detail.key];if(t){let i=this.items?.filter(g=>!g.disabled);l(i,e.detail.target,t,!0,!0,!0)}}e.stopPropagation()}calciteChipCloseListener(e){let s=e.target;this.items?.includes(s)&&(this.items?.indexOf(s)>0?l(this.items,s,"previous",!1,!1):this.items?.indexOf(s)===0?l(this.items,s,"next",!1,!1):l(this.items,s,"first",!1,!1)),this.items=this.items?.filter(t=>t!==s),e.stopPropagation()}calciteChipSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(!0,e.target),e.stopPropagation()}calciteInternalChipSelectListener(e){e.composedPath().includes(this.el)&&this.setSelectedItems(!1,e.target),e.stopPropagation()}calciteInternalSyncSelectedChips(e){e.composedPath().includes(this.el)&&(this.updateSelectedItems(),this.selectionMode==="single"&&this.selectedItems.length>1&&this.setSelectedItems(!1,e.target)),e.stopPropagation()}updateItems(e){let s=this.slotRef.value?.assignedElements({flatten:!0}).filter(t=>t?.matches("calcite-chip"));this.items=e?m(e):s,!(this.items?.length<1)&&(this.items?.forEach(t=>{t.interactive=!0,t.scale=this.scale,t.selectionMode=this.selectionMode,t.parentChipGroup=this.el}),this.setSelectedItems(!1))}updateSelectedItems(){this.selectedItems=this.items?.filter(e=>e.selected)}setSelectedItems(e,s){s&&this.items?.forEach(t=>{let i=s===t;switch(this.selectionMode){case"multiple":i&&(t.selected=!t.selected);break;case"single":t.selected=i?!t.selected:!1;break;case"single-persist":t.selected=!!i;break}}),this.updateSelectedItems(),e&&this.calciteChipGroupSelect.emit()}render(){let e=this.selectionMode==="none"||this.selectionMode==="multiple"?"group":"radiogroup",{disabled:s}=this;return I({disabled:s,children:o`<div .ariaLabel=${this.label} class="container" .role=${e}><slot @slotchange=${this.updateItems} ${h(this.slotRef)}></slot></div>`})}};p("calcite-chip-group",c);export{c as ChipGroup};
|
|
@@ -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.7 */
|
|
4
4
|
function r(n,$,o){return $?`${n}-${$}`:o?`${n}-${o}`:`${n}-m`}export{r 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 S}from"./LFSTWFMB.js";import{c as h,e as C,f as L,g as O,h as R,i as p}from"./IJDY7EKO.js";import{a as H}from"./LFYXGVGK.js";import"./7XEO6UJ3.js";import"./MPYXWS5E.js";import{h as k,j as y}from"./7DQ4G2FS.js";import{a as b}from"./44XNJNTA.js";import{B as c,C as d,D as T,E as l,H as w,P as E,g as v,h as g,o as r}from"./2IIGKMQ6.js";var P={positionContainer:"position-container",container:"container"},U="calcite-tooltip",z={host:n=>`${U}-${n}`},m=300,F=m/3,N=m*1.5,x="aria-describedby";function I(n){let{referenceElement:e}=n;return(typeof e=="string"?y(n,{id:e}):e)||null}var f=class{constructor(){this.registeredElements=new WeakMap,this.registeredShadowRootCounts=new WeakMap,this.hoverOpenTimeout=null,this.hoverCloseTimeout=null,this.activeTooltip=null,this.registeredElementCount=0,this.clickedTooltip=null,this.hoveredTooltip=null,this.queryTooltip=e=>{let{registeredElements:t}=this,i=e.find(o=>t.has(o));return t.get(i)},this.keyDownHandler=e=>{if(e.key==="Escape"&&!e.defaultPrevented){let{activeTooltip:t}=this;if(t?.open){this.clearHoverTimeout(),this.closeActiveTooltip();let i=I(t),o=e.composedPath();(i instanceof Element&&o.includes(i)||o.includes(t))&&e.preventDefault()}}},this.pointerLeaveHandler=e=>{e.defaultPrevented||(this.clearHoverTimeout(),this.closeHoveredTooltip())},this.pointerMoveHandler=e=>{if(e.defaultPrevented){this.closeHoveredTooltip();return}let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}i!==this.clickedTooltip&&(i!==this.hoveredTooltip&&this.clearHoverOpenTimeout(),this.hoveredTooltip=i,i?this.openHoveredTooltip(i):this.activeTooltip?.open&&this.closeHoveredTooltip(),this.clickedTooltip=null)},this.clickHandler=e=>{if(e.defaultPrevented)return;this.clickedTooltip=null;let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}if(this.closeActiveTooltip(),!!i){if(this.clearHoverTimeout(),i.closeOnClick){this.clickedTooltip=i,this.toggleTooltip(i,!1);return}this.toggleTooltip(i,!0)}},this.blurHandler=()=>{this.closeActiveTooltip()},this.focusInHandler=e=>{if(e.defaultPrevented)return;let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}i!==this.clickedTooltip&&(this.clickedTooltip=null,this.closeTooltipIfNotActive(i),i&&this.toggleFocusedTooltip(i,!0))},this.openHoveredTooltip=e=>{this.hoverOpenTimeout=window.setTimeout(()=>{this.hoverOpenTimeout===null||e!==this.hoveredTooltip||(this.clearHoverCloseTimeout(),this.closeTooltipIfNotActive(e),this.toggleTooltip(e,!0))},this.activeTooltip?.open?F:m)},this.closeHoveredTooltip=()=>{this.hoverCloseTimeout=window.setTimeout(()=>{this.hoverCloseTimeout!==null&&this.closeActiveTooltip()},N)}}registerElement(e,t){this.registeredElementCount++,this.registeredElements.set(e,t);let i=this.getReferenceElShadowRootNode(e);i&&this.registerShadowRoot(i),this.registeredElementCount===1&&this.addListeners()}unregisterElement(e){let t=this.getReferenceElShadowRootNode(e);t&&this.unregisterShadowRoot(t),this.registeredElements.delete(e)&&this.registeredElementCount--,this.registeredElementCount===0&&this.removeListeners()}pathHasOpenTooltip(e,t){let{activeTooltip:i}=this;return i?.open&&t.includes(i)||e?.open&&t.includes(e)}addShadowListeners(e){e.addEventListener("focusin",this.focusInHandler)}removeShadowListeners(e){e.removeEventListener("focusin",this.focusInHandler)}addListeners(){window.addEventListener("keydown",this.keyDownHandler),window.addEventListener("pointermove",this.pointerMoveHandler),window.addEventListener("click",this.clickHandler),window.addEventListener("focusin",this.focusInHandler),window.addEventListener("blur",this.blurHandler),document.addEventListener("pointerleave",this.pointerLeaveHandler)}removeListeners(){window.removeEventListener("keydown",this.keyDownHandler),window.removeEventListener("pointermove",this.pointerMoveHandler),window.removeEventListener("click",this.clickHandler),window.removeEventListener("focusin",this.focusInHandler),window.removeEventListener("blur",this.blurHandler),document.removeEventListener("pointerleave",this.pointerLeaveHandler)}clearHoverOpenTimeout(){window.clearTimeout(this.hoverOpenTimeout),this.hoverOpenTimeout=null}clearHoverCloseTimeout(){window.clearTimeout(this.hoverCloseTimeout),this.hoverCloseTimeout=null}clearHoverTimeout(){this.clearHoverOpenTimeout(),this.clearHoverCloseTimeout()}closeTooltipIfNotActive(e){this.activeTooltip!==e&&this.closeActiveTooltip()}closeActiveTooltip(){let{activeTooltip:e}=this;e?.open&&this.toggleTooltip(e,!1)}toggleFocusedTooltip(e,t){t&&this.clearHoverTimeout(),this.toggleTooltip(e,t)}toggleTooltip(e,t){e.open=t,this.activeTooltip=t?e:null}registerShadowRoot(e){let{registeredShadowRootCounts:t}=this,i=t.get(e),o=Math.min((typeof i=="number"?i:0)+1,1);o===1&&this.addShadowListeners(e),t.set(e,o)}unregisterShadowRoot(e){let{registeredShadowRootCounts:t}=this,i=t.get(e),o=Math.max((typeof i=="number"?i:1)-1,0);o===0&&this.removeShadowListeners(e),t.set(e,o)}getReferenceElShadowRootNode(e){return e instanceof Element?k(e):null}},B=v`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:contents}.position-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-tooltip-max-size-x, 20rem);max-block-size:20rem}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-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}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}.container{position:relative;overflow:hidden;padding:.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1.375;font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word;border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round));color:var(--calcite-tooltip-text-color, var(--calcite-color-text-1));text-align:start}.position-container .calcite-floating-ui-anim{border-width:1px;border-style:solid;background-color:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-tooltip-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round))}.calcite-floating-ui-arrow{fill:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-tooltip-border-color, var(--calcite-color-border-3))}:host([hidden]){display:none}[hidden]{display:none}`,A=new f,u=class extends T{constructor(){super(...arguments),this.arrowRef=c(),this.guid=z.host(b()),this.transitionProp="opacity",this.transitionRef=c(),this.floatingLayout="vertical",this.closeOnClick=!1,this.offsetDistance=p,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.calciteTooltipBeforeClose=r({cancelable:!1}),this.calciteTooltipBeforeOpen=r({cancelable:!1}),this.calciteTooltipClose=r({cancelable:!1}),this.calciteTooltipOpen=r({cancelable:!1})}static{this.properties={floatingLayout:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],closeOnClick:[7,{},{reflect:!0,type:Boolean}],label:1,offsetDistance:[11,{},{type:Number,reflect:!0}],offsetSkidding:[11,{},{reflect:!0,type:Number}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],referenceElement:1}}static{this.styles=B}async reposition(e=!1){let{referenceEl:t,placement:i,overlayPositioning:o,offsetDistance:s,offsetSkidding:a,arrowRef:D,floatingEl:_}=this;return C(this,{floatingEl:_,referenceEl:t,overlayPositioning:o,placement:i,offsetDistance:s,offsetSkidding:a,arrowEl:D.value,type:"tooltip"},e)}connectedCallback(){super.connectedCallback(),this.setUpReferenceElement(!0)}willUpdate(e){(e.has("offsetDistance")&&(this.hasUpdated||this.offsetDistance!==p)||e.has("offsetSkidding")&&(this.hasUpdated||this.offsetSkidding!==0)||e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!=="auto"))&&this.reposition(!0),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("referenceElement")&&this.setUpReferenceElement()}loaded(){this.referenceElement&&!this.referenceEl&&this.setUpReferenceElement()}disconnectedCallback(){super.disconnectedCallback(),this.removeReferences(),R(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open&&this.referenceEl?this.floatingEl.showPopover():this.floatingEl.hidePopover())}openHandler(){H(this),this.reposition(!0),this.handlePopover()}onBeforeOpen(){this.calciteTooltipBeforeOpen.emit()}onOpen(){this.calciteTooltipOpen.emit()}onBeforeClose(){this.calciteTooltipBeforeClose.emit()}onClose(){this.calciteTooltipClose.emit(),L(this)}setFloatingEl(e){this.floatingEl=e,e&&requestAnimationFrame(()=>this.setUpReferenceElement())}setUpReferenceElement(e=!0){this.removeReferences(),this.referenceEl=I(this.el),O(this);let{el:t,referenceElement:i,referenceEl:o}=this;e&&i&&!o&&console.warn(`${t.tagName}: reference-element id "${i}" was not found.`,{el:t}),this.addReferences(),this.handlePopover()}getId(){return this.el.id||this.guid}addReferences(){let{referenceEl:e}=this;if(!e)return;let t=this.getId();"setAttribute"in e&&e.setAttribute(x,t),A.registerElement(e,this.el)}removeReferences(){let{referenceEl:e}=this;e&&("removeAttribute"in e&&e.removeAttribute(x),A.unregisterElement(e))}render(){let{referenceEl:e,label:t,open:i,floatingLayout:o}=this,s=e&&i,a=!s;return this.el.inert=a,this.el.ariaLabel=t,this.el.ariaLive="polite",w(this.el,"id",this.getId()),this.el.role="tooltip",g`<div class=${l(P.positionContainer)} popover=manual ${d(this.setFloatingEl)}><div class=${l({[h.animation]:!0,[h.animationActive]:s})} ${d(this.transitionRef)}>${S({floatingLayout:o,ref:this.arrowRef})}<div class=${l(P.container)}><slot></slot></div></div></div>`}};E("calcite-tooltip",u);export{u as Tooltip};
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as S}from"./JOGTHWSZ.js";import{c as h,e as C,f as L,g as O,h as R,i as p}from"./SBJ5HVNQ.js";import{a as H}from"./BAESWKYQ.js";import"./ULUKHLQN.js";import"./OWSWQHLM.js";import{h as k,j as y}from"./SBARVI35.js";import{a as b}from"./HWDBQK2D.js";import{B as c,C as d,D as T,E as l,H as w,P as E,g as v,h as g,o as r}from"./2ECRIOED.js";var P={positionContainer:"position-container",container:"container"},U="calcite-tooltip",z={host:n=>`${U}-${n}`},m=300,F=m/3,N=m*1.5,x="aria-describedby";function I(n){let{referenceElement:e}=n;return(typeof e=="string"?y(n,{id:e}):e)||null}var f=class{constructor(){this.registeredElements=new WeakMap,this.registeredShadowRootCounts=new WeakMap,this.hoverOpenTimeout=null,this.hoverCloseTimeout=null,this.activeTooltip=null,this.registeredElementCount=0,this.clickedTooltip=null,this.hoveredTooltip=null,this.queryTooltip=e=>{let{registeredElements:t}=this,i=e.find(o=>t.has(o));return t.get(i)},this.keyDownHandler=e=>{if(e.key==="Escape"&&!e.defaultPrevented){let{activeTooltip:t}=this;if(t?.open){this.clearHoverTimeout(),this.closeActiveTooltip();let i=I(t),o=e.composedPath();(i instanceof Element&&o.includes(i)||o.includes(t))&&e.preventDefault()}}},this.pointerLeaveHandler=e=>{e.defaultPrevented||(this.clearHoverTimeout(),this.closeHoveredTooltip())},this.pointerMoveHandler=e=>{if(e.defaultPrevented){this.closeHoveredTooltip();return}let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}i!==this.clickedTooltip&&(i!==this.hoveredTooltip&&this.clearHoverOpenTimeout(),this.hoveredTooltip=i,i?this.openHoveredTooltip(i):this.activeTooltip?.open&&this.closeHoveredTooltip(),this.clickedTooltip=null)},this.clickHandler=e=>{if(e.defaultPrevented)return;this.clickedTooltip=null;let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}if(this.closeActiveTooltip(),!!i){if(this.clearHoverTimeout(),i.closeOnClick){this.clickedTooltip=i,this.toggleTooltip(i,!1);return}this.toggleTooltip(i,!0)}},this.blurHandler=()=>{this.closeActiveTooltip()},this.focusInHandler=e=>{if(e.defaultPrevented)return;let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}i!==this.clickedTooltip&&(this.clickedTooltip=null,this.closeTooltipIfNotActive(i),i&&this.toggleFocusedTooltip(i,!0))},this.openHoveredTooltip=e=>{this.hoverOpenTimeout=window.setTimeout(()=>{this.hoverOpenTimeout===null||e!==this.hoveredTooltip||(this.clearHoverCloseTimeout(),this.closeTooltipIfNotActive(e),this.toggleTooltip(e,!0))},this.activeTooltip?.open?F:m)},this.closeHoveredTooltip=()=>{this.hoverCloseTimeout=window.setTimeout(()=>{this.hoverCloseTimeout!==null&&this.closeActiveTooltip()},N)}}registerElement(e,t){this.registeredElementCount++,this.registeredElements.set(e,t);let i=this.getReferenceElShadowRootNode(e);i&&this.registerShadowRoot(i),this.registeredElementCount===1&&this.addListeners()}unregisterElement(e){let t=this.getReferenceElShadowRootNode(e);t&&this.unregisterShadowRoot(t),this.registeredElements.delete(e)&&this.registeredElementCount--,this.registeredElementCount===0&&this.removeListeners()}pathHasOpenTooltip(e,t){let{activeTooltip:i}=this;return i?.open&&t.includes(i)||e?.open&&t.includes(e)}addShadowListeners(e){e.addEventListener("focusin",this.focusInHandler)}removeShadowListeners(e){e.removeEventListener("focusin",this.focusInHandler)}addListeners(){window.addEventListener("keydown",this.keyDownHandler),window.addEventListener("pointermove",this.pointerMoveHandler),window.addEventListener("click",this.clickHandler),window.addEventListener("focusin",this.focusInHandler),window.addEventListener("blur",this.blurHandler),document.addEventListener("pointerleave",this.pointerLeaveHandler)}removeListeners(){window.removeEventListener("keydown",this.keyDownHandler),window.removeEventListener("pointermove",this.pointerMoveHandler),window.removeEventListener("click",this.clickHandler),window.removeEventListener("focusin",this.focusInHandler),window.removeEventListener("blur",this.blurHandler),document.removeEventListener("pointerleave",this.pointerLeaveHandler)}clearHoverOpenTimeout(){window.clearTimeout(this.hoverOpenTimeout),this.hoverOpenTimeout=null}clearHoverCloseTimeout(){window.clearTimeout(this.hoverCloseTimeout),this.hoverCloseTimeout=null}clearHoverTimeout(){this.clearHoverOpenTimeout(),this.clearHoverCloseTimeout()}closeTooltipIfNotActive(e){this.activeTooltip!==e&&this.closeActiveTooltip()}closeActiveTooltip(){let{activeTooltip:e}=this;e?.open&&this.toggleTooltip(e,!1)}toggleFocusedTooltip(e,t){t&&this.clearHoverTimeout(),this.toggleTooltip(e,t)}toggleTooltip(e,t){e.open=t,this.activeTooltip=t?e:null}registerShadowRoot(e){let{registeredShadowRootCounts:t}=this,i=t.get(e),o=Math.min((typeof i=="number"?i:0)+1,1);o===1&&this.addShadowListeners(e),t.set(e,o)}unregisterShadowRoot(e){let{registeredShadowRootCounts:t}=this,i=t.get(e),o=Math.max((typeof i=="number"?i:1)-1,0);o===0&&this.removeShadowListeners(e),t.set(e,o)}getReferenceElShadowRootNode(e){return e instanceof Element?k(e):null}},B=v`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:contents}.position-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-tooltip-max-size-x, 20rem);max-block-size:20rem}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-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}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}.container{position:relative;overflow:hidden;padding:.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1.375;font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word;border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round));color:var(--calcite-tooltip-text-color, var(--calcite-color-text-1));text-align:start}.position-container .calcite-floating-ui-anim{border-width:1px;border-style:solid;background-color:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-tooltip-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round))}.calcite-floating-ui-arrow{fill:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-tooltip-border-color, var(--calcite-color-border-3))}:host([hidden]){display:none}[hidden]{display:none}`,A=new f,u=class extends T{constructor(){super(...arguments),this.arrowRef=c(),this.guid=z.host(b()),this.transitionProp="opacity",this.transitionRef=c(),this.floatingLayout="vertical",this.closeOnClick=!1,this.offsetDistance=p,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.calciteTooltipBeforeClose=r({cancelable:!1}),this.calciteTooltipBeforeOpen=r({cancelable:!1}),this.calciteTooltipClose=r({cancelable:!1}),this.calciteTooltipOpen=r({cancelable:!1})}static{this.properties={floatingLayout:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],closeOnClick:[7,{},{reflect:!0,type:Boolean}],label:1,offsetDistance:[11,{},{type:Number,reflect:!0}],offsetSkidding:[11,{},{reflect:!0,type:Number}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],referenceElement:1}}static{this.styles=B}async reposition(e=!1){let{referenceEl:t,placement:i,overlayPositioning:o,offsetDistance:s,offsetSkidding:a,arrowRef:D,floatingEl:_}=this;return C(this,{floatingEl:_,referenceEl:t,overlayPositioning:o,placement:i,offsetDistance:s,offsetSkidding:a,arrowEl:D.value,type:"tooltip"},e)}connectedCallback(){super.connectedCallback(),this.setUpReferenceElement(!0)}willUpdate(e){(e.has("offsetDistance")&&(this.hasUpdated||this.offsetDistance!==p)||e.has("offsetSkidding")&&(this.hasUpdated||this.offsetSkidding!==0)||e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!=="auto"))&&this.reposition(!0),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("referenceElement")&&this.setUpReferenceElement()}loaded(){this.referenceElement&&!this.referenceEl&&this.setUpReferenceElement()}disconnectedCallback(){super.disconnectedCallback(),this.removeReferences(),R(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open&&this.referenceEl?this.floatingEl.showPopover():this.floatingEl.hidePopover())}openHandler(){H(this),this.reposition(!0),this.handlePopover()}onBeforeOpen(){this.calciteTooltipBeforeOpen.emit()}onOpen(){this.calciteTooltipOpen.emit()}onBeforeClose(){this.calciteTooltipBeforeClose.emit()}onClose(){this.calciteTooltipClose.emit(),L(this)}setFloatingEl(e){this.floatingEl=e,e&&requestAnimationFrame(()=>this.setUpReferenceElement())}setUpReferenceElement(e=!0){this.removeReferences(),this.referenceEl=I(this.el),O(this);let{el:t,referenceElement:i,referenceEl:o}=this;e&&i&&!o&&console.warn(`${t.tagName}: reference-element id "${i}" was not found.`,{el:t}),this.addReferences(),this.handlePopover()}getId(){return this.el.id||this.guid}addReferences(){let{referenceEl:e}=this;if(!e)return;let t=this.getId();"setAttribute"in e&&e.setAttribute(x,t),A.registerElement(e,this.el)}removeReferences(){let{referenceEl:e}=this;e&&("removeAttribute"in e&&e.removeAttribute(x),A.unregisterElement(e))}render(){let{referenceEl:e,label:t,open:i,floatingLayout:o}=this,s=e&&i,a=!s;return this.el.inert=a,this.el.ariaLabel=t,this.el.ariaLive="polite",w(this.el,"id",this.getId()),this.el.role="tooltip",g`<div class=${l(P.positionContainer)} popover=manual ${d(this.setFloatingEl)}><div class=${l({[h.animation]:!0,[h.animationActive]:s})} ${d(this.transitionRef)}>${S({floatingLayout:o,ref:this.arrowRef})}<div class=${l(P.container)}><slot></slot></div></div></div>`}};E("calcite-tooltip",u);export{u as Tooltip};
|
|
@@ -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.7 */
|
|
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,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.7 */
|
|
4
4
|
function e(r){return r.map(o=>{let t="";for(let n=0;n<o;n++)t+=((1+Math.random())*65536|0).toString(16).substring(1);return t}).join("-")}var i=()=>e([2,1,1,1,3]);export{i 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.
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
4
|
var e={actionBarContainer:"action-bar-container",container:"container",contentBottom:"content-bottom",contentTop:"content-top",header:"header",headerContainer:"header-container",headerContainerBorderEnd:"header-container--border-end",headingTextContent:"heading-text-content",heading:"heading",description:"description",headerContent:"header-content",headerActions:"header-actions",headerActionsEnd:"header-actions--end",headerActionsStart:"header-actions--start",icon:"icon",contentWrapper:"content-wrapper",fabContainer:"fab-container",footer:"footer",footerContent:"footer-content",footerStart:"footer-start",footerEnd:"footer-end",headerSlottedContent:"header--slotted-content",headerNonSlottedContent:"header--non-slotted-content",menuAction:"menu-action"},t={close:"close",collapse:"collapse"},n={close:"x",menu:"ellipsis",expand:"chevron-down",collapse:"chevron-up"},o={actionBar:"action-bar",alerts:"alerts",contentBottom:"content-bottom",contentTop:"content-top",headerActionsStart:"header-actions-start",headerActionsEnd:"header-actions-end",headerMenuActions:"header-menu-actions",headerContent:"header-content",fab:"fab",footer:"footer",footerEnd:"footer-end",footerStart:"footer-start"};export{e as a,t as b,n as c,o as d};
|
|
@@ -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.7 */
|
|
4
|
+
import{a as b}from"./3ND3NKAM.js";import{a as f,b as g}from"./YFY6OPEB.js";import"./QR2HL6XI.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 C}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as C}from"./AD2NNFBJ.js";import{a as $}from"./W4XITGKA.js";import{e as z,q as I}from"./SBARVI35.js";import"./HWDBQK2D.js";import{D as g,E as v,P as x,Q as y,g as m,h as b,i as u,l as r}from"./2ECRIOED.js";var D={flipRtl:"flip-rtl",svg:"svg"},k={},f={},w={s:16,m:24,l:32};function N({icon:e,scale:t}){let s=w[t],i=L(e),n=i.charAt(i.length-1)==="F";return`${n?i.substring(0,i.length-1):i}${s}${n?"F":""}`}async function U(e){let t=N(e),s=P(t);if(s)return s;f[t]||(f[t]=fetch(y(`./assets/icon/${t}.json`)).then(n=>n.json()).catch(()=>($.error(`${e.icon} (${e.scale}) icon failed to load`),"")));let i=await f[t];return k[t]=i,i}function B(e){return P(N(e))}function P(e){return k[e]}function L(e){let t=!isNaN(Number(e.charAt(0))),s=e.split("-");if(s.length>0){let n=/[a-z]/i;e=s.map((c,l)=>c.replace(n,function(a,p){return l===0&&p===0?a:a.toUpperCase()})).join("")}return t?`i${e}`:e}var R=m`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:inline-flex;color:var(--calcite-icon-color, var(--calcite-ui-icon-color, currentColor))}:host([scale=s]){inline-size:16px;block-size:16px;min-inline-size:16px;min-block-size:16px}:host([scale=m]){inline-size:24px;block-size:24px;min-inline-size:24px;min-block-size:24px}:host([scale=l]){inline-size:32px;block-size:32px;min-inline-size:32px;min-block-size:32px}.flip-rtl{transform:scaleX(-1)}.svg{display:block}:host([hidden]){display:none}[hidden]{display:none}`,d=class extends g{constructor(){super(...arguments),this.visible=!1,this.flipRtl=!1,this.icon=null,this.preload=!1,this.scale="m"}static{this.properties={pathData:[16,{},{state:!0}],visible:[16,{},{state:!0}],flipRtl:[7,{},{reflect:!0,type:Boolean}],icon:[3,{type:String},{reflect:!0}],preload:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],textLabel:1}}static{this.styles=R}connectedCallback(){if(super.connectedCallback(),this.preload){this.visible=!0,this.loadIconPathData();return}this.visible||this.waitUntilVisible(()=>{this.visible=!0,this.loadIconPathData()})}willUpdate(t){(t.has("icon")&&(this.hasUpdated||this.icon!==null)||t.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.loadIconPathData()}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver?.disconnect(),this.intersectionObserver=null}async loadIconPathData(){let{icon:t,scale:s,visible:i}=this;if(!t||!i)return;let n={icon:t,scale:s},c=B(n)||await U(n);t===this.icon&&(this.pathData=c)}waitUntilVisible(t){if(this.intersectionObserver=C("intersection",s=>{s.forEach(i=>{i.isIntersecting&&(this.intersectionObserver.disconnect(),this.intersectionObserver=null,t())})},{rootMargin:"50px"}),!this.intersectionObserver){t();return}this.intersectionObserver.observe(this.el)}render(){let{el:t,flipRtl:s,pathData:i,scale:n,textLabel:c}=this,l=z(t),h=w[n],a=!!c,p=[].concat(i||"");return this.el.ariaHidden=I(!a),this.el.ariaLabel=a?c:null,this.el.role=a?"img":null,b`<svg aria-hidden=true class=${v({[D.flipRtl]:l==="rtl"&&s,[D.svg]:!0})} fill=currentColor height=100% viewBox=${`0 0 ${h} ${h}`} width=100% xmlns=http://www.w3.org/2000/svg>${p.map(o=>typeof o=="string"?u`<path d=${o??r} />`:u`<path d=${o.d??r} opacity=${("opacity"in o?o.opacity:1)??r} />`)}</svg>`}};x("calcite-icon",d);export{d as Icon};
|
|
@@ -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 i,P as o,g as s,h as l,o as a}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{D as i,P as o,g as s,h as l,o as a}from"./2ECRIOED.js";var c=s`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:block}:host([hidden]){display:none}[hidden]{display:none}`,t=class extends i{constructor(){super(...arguments),this.disabled=!1,this.calciteInternalOptionGroupChange=a({cancelable:!1})}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],label:1}}static{this.styles=c}willUpdate(e){(e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)||e.has("label"))&&this.calciteInternalOptionGroupChange.emit()}render(){return l`<div>${this.label}</div><slot></slot>`}};o("calcite-option-group",t);export{t as OptionGroup};
|
|
@@ -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 w,b as C}from"./UQ4HIO7J.js";import{a as y}from"./SXK4ATVN.js";import"./6PMY6MUE.js";import"./PCGNN5RO.js";import"./H3GTITDX.js";import{t as z}from"./7DQ4G2FS.js";import"./44XNJNTA.js";import{C as g,D as m,E as i,G as x,P as k,g as b,h as n,o as h}from"./2IIGKMQ6.js";var t={container:"container",contentContainer:"content-container",contentContainerHasContent:"content-container--has-content",contentContainerHasOnlyContentTopAndBottom:"content-container--has-only-content-top-and-bottom",textContentContainer:"text-content-container",description:"description",heading:"heading",icon:"icon",interactive:"interactive",largeVisualDeprecated:"large-visual-deprecated",row:"row",selected:"selected",selectionIcon:"selection-icon",textContent:"text-content"},s={selectedMultiple:"check-square-f",selectedSingle:"circle-f",unselectedMultiple:"square",unselectedSingle:"circle"},$={contentBottom:"content-bottom",contentTop:"content-top"},A=b`: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{box-shadow:var(--calcite-tile-shadow, var(--calcite-shadow-none));box-sizing:border-box;display:inline-block}calcite-link{--calcite-link-text-color: var(--calcite-tile-link-text-color)}.container{background-color:var(--calcite-tile-background-color, var(--calcite-color-foreground-1));block-size:var(--calcite-container-size-content-fluid);border-radius:var(--calcite-tile-corner-radius, var(--calcite-corner-radius));box-sizing:border-box;color:var(--calcite-tile-text-color, var(--calcite-color-text-3));inline-size:var(--calcite-container-size-content-fluid);outline:var(--calcite-border-width-sm, 1px) solid var(--calcite-tile-border-color, var(--calcite-color-border-2));padding:var(--calcite-internal-tile-spacing);position:relative;-webkit-user-select:none;user-select:none}.container .selection-icon{color:var(--calcite-tile-text-color, var(--calcite-color-text-3))}.container.interactive{cursor:pointer}.container.interactive:hover,.container.interactive:focus,.container.interactive.selected{outline-color:var(--calcite-tile-accent-color-press, var(--calcite-color-brand));z-index:var(--calcite-z-index)}.container.interactive:hover .selection-icon,.container.interactive:focus .selection-icon,.container.interactive.selected .selection-icon{color:var(--calcite-tile-accent-color-press, var(--calcite-color-brand))}.container.interactive:focus{box-shadow:inset 0 0 0 1px var(--calcite-tile-accent-color-press, var(--calcite-color-brand));z-index:calc(var(--calcite-z-index) + 1)}.content-container,.row{align-items:flex-start;display:flex}.content-container{flex-direction:column;word-wrap:break-word;word-break:break-word;inline-size:var(--calcite-container-size-content-fluid)}.text-content-container{inline-size:100%;outline-color:transparent;padding:0}.text-content{display:flex;flex-direction:column}.heading{color:var(--calcite-tile-heading-text-color, var(--calcite-color-text-2));font-weight:var(--calcite-font-weight-medium);line-height:1.20313rem;overflow-wrap:break-word}.description{font-weight:var(--calcite-font-weight-regular);overflow-wrap:break-word}.large-visual-deprecated{align-items:center;justify-content:center;min-block-size:12rem;text-align:center}.large-visual-deprecated .icon{align-self:center;block-size:64px;inline-size:64px}.large-visual-deprecated .selection-icon{position:absolute;inset-inline-start:var(--calcite-internal-tile-spacing);inset-block-start:var(--calcite-internal-tile-spacing);z-index:var(--calcite-z-index)}.large-visual-deprecated .text-content-container{justify-content:center}:host([alignment=center]) .icon{align-self:center}:host([alignment=center]) .text-content-container{justify-content:center}:host([alignment=center]) .text-content{text-align:center}:host([alignment=center]) slot[name=content-bottom]::slotted(*),:host([alignment=center]) slot[name=content-top]::slotted(*){align-self:center}:host([scale=s]){--calcite-internal-tile-spacing: var(--calcite-spacing-sm);max-inline-size:400px;min-inline-size:100px}:host([scale=s]) .heading{font-size:var(--calcite-font-size--2);line-height:1.03125rem}:host([scale=s]) .description{font-size:var(--calcite-font-size--3);line-height:.85938rem}:host([scale=m]){--calcite-internal-tile-spacing: var(--calcite-spacing-md);max-inline-size:460px;min-inline-size:140px}:host([scale=m]) .heading{font-size:var(--calcite-font-size--1);line-height:1.20313rem}:host([scale=m]) .description{font-size:var(--calcite-font-size--2);line-height:1.03125rem}:host([scale=l]){--calcite-internal-tile-spacing: var(--calcite-spacing-lg);max-inline-size:520px;min-inline-size:160px}:host([scale=l]) .heading{font-size:var(--calcite-font-size-0);line-height:1.375rem}:host([scale=l]) .description{font-size:var(--calcite-font-size--1);line-height:1.20313rem}.content-container--has-content,.row{gap:var(--calcite-internal-tile-spacing)}.content-container--has-only-content-top-and-bottom slot[name=content-top]::slotted(*){margin-block-end:var(--calcite-internal-tile-spacing)}:host([selection-appearance=border][layout=horizontal]) .container.selected:focus:before,:host([selection-appearance=border][layout=vertical]) .container.selected:focus:before{block-size:100%;box-shadow:inset 0 0 0 1px var(--calcite-tile-accent-color-press, var(--calcite-color-brand));content:"";display:block;inline-size:100%;inset-block-start:0;inset-inline-start:0;position:absolute}:host([selection-appearance=border][layout=horizontal]) .container.selected{box-shadow:inset 0 -4px 0 0 var(--calcite-tile-accent-color-press, var(--calcite-color-brand))}:host([selection-appearance=border][layout=vertical]) .container.selected{box-shadow:inset 4px 0 0 0 var(--calcite-tile-accent-color-press, var(--calcite-color-brand))}:host(:hover:not([disabled])) .heading,:host([active]:not([disabled])) .heading{color:var(--calcite-tile-heading-text-color, var(--calcite-color-text-1))}:host(:hover:not([disabled])) .description,:host([active]:not([disabled])) .description{color:var(--calcite-tile-text-color, var(--calcite-color-text-2))}:host([href]:focus:not([disabled])) .container,:host([href]:hover:not([disabled])) .container{outline-color:var(--calcite-tile-link-color, var(--calcite-color-text-link));z-index:var(--calcite-z-index)}:host([href]:focus:not([disabled])) .icon,:host([href]:hover:not([disabled])) .icon{color:var(--calcite-tile-link-color, var(--calcite-color-text-link))}:host([href]:focus:not([disabled])) .heading,:host([href]:hover:not([disabled])) .heading{color:var(--calcite-tile-link-color, var(--calcite-color-text-link))}:host([href]:active:not([disabled])) .container{box-shadow:inset 0 0 0 1px var(--calcite-tile-link-color, var(--calcite-color-text-link));outline-color:var(--calcite-tile-link-color, var(--calcite-color-text-link))}:host([embed]) .container{padding:0}:host([selection-mode=none]) .container:hover,:host([selection-mode=none]) .container.selected{outline-color:var(--calcite-tile-border-color, var(--calcite-color-border-2))}:host([selection-mode=none]) .container:focus{outline-color:var(--calcite-tile-accent-color-press, var(--calcite-color-brand))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}::slotted(*){max-inline-size:100%}`,p=class extends m{constructor(){super(),this.focusSetter=y()(this),this.hasContentBottom=!1,this.hasContentTop=!1,this.active=!1,this.alignment="start",this.disabled=!1,this.embed=!1,this.iconFlipRtl=!1,this.interactive=!1,this.layout="horizontal",this.scale="m",this.selected=!1,this.selectionAppearance="icon",this.selectionMode="none",this.calciteInternalTileKeyEvent=h({cancelable:!1}),this.calciteTileSelect=h(),this.listen("keydown",this.keyDownHandler)}static{this.properties={hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],active:[7,{},{reflect:!0,type:Boolean}],alignment:[3,{},{reflect:!0}],description:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],embed:[7,{},{reflect:!0,type:Boolean}],heading:[3,{},{reflect:!0}],href:[3,{},{reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],interactive:[5,{},{type:Boolean}],label:1,layout:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=A}async setFocus(e){return this.focusSetter(()=>this.interactive?this.containerEl:void 0,e)}updated(){w(this)}clickHandler(){this.interactive&&(this.setFocus(),this.handleSelectEvent())}handleSelectEvent(){this.disabled||!this.interactive||this.selectionMode==="single-persist"&&this.selected===!0||this.calciteTileSelect.emit()}handleSlotChange(e){let c=e.target.dataset.name;this[`has${c}`]=z(e)}setContainerEl(e){this.containerEl=e}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.handleSelectEvent(),e.preventDefault();break;case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"Home":case"End":this.calciteInternalTileKeyEvent.emit(e),e.preventDefault();break}}renderSelectionIcon(){let{selected:e,selectionAppearance:c,selectionMode:a}=this;if(c==="icon"&&a!=="none")return n`<calcite-icon class=${i(t.selectionIcon)} .icon=${e?a==="multiple"?s.selectedMultiple:s.selectedSingle:a==="multiple"?s.unselectedMultiple:s.unselectedSingle} scale=s></calcite-icon>`}renderTile(){let{description:e,disabled:c,hasContentBottom:a,hasContentTop:S,heading:l,icon:r,iconFlipRtl:B,interactive:o,selectionMode:d}=this,E=l&&r&&!e,v=!!this.href||!o,u=d==="multiple"&&o?"checkbox":d!=="none"&&o?"radio":o?"button":void 0,f=!!(e||l||r),T=!f&&S&&a;return n`<div .ariaChecked=${d!=="none"&&o?this.selected:void 0} .ariaDisabled=${v?c:void 0} .ariaLabel=${u&&this.label} class=${i({[t.container]:!0,[t.interactive]:o,[t.largeVisualDeprecated]:E,[t.row]:!0,[t.selected]:this.selected})} @click=${this.clickHandler} .role=${u} tabindex=${(v?void 0:0)??x} ${g(this.setContainerEl)}>${this.renderSelectionIcon()}<div class=${i({[t.contentContainer]:!0,[t.contentContainerHasContent]:f,[t.contentContainerHasOnlyContentTopAndBottom]:T})}><slot name=${$.contentTop} @slotchange=${this.handleSlotChange}></slot>${r&&n`<calcite-icon class=${i(t.icon)} .flipRtl=${B} .icon=${r} scale=l></calcite-icon>`||""}<div class=${i({[t.textContentContainer]:!0,[t.row]:!0})}><div class=${i(t.textContent)}>${l&&n`<div class=${i(t.heading)}>${l}</div>`||""}${e&&n`<div class=${i(t.description)}>${e}</div>`||""}</div></div><slot name=${$.contentBottom} @slotchange=${this.handleSlotChange}></slot></div></div>`}render(){let{disabled:e}=this;return C({disabled:e,children:this.href?n`<calcite-link .disabled=${e} .href=${this.href}>${this.renderTile()}</calcite-link>`:this.renderTile()})}};k("calcite-tile",p);export{p as Tile};
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as w,b as C}from"./ZOYJ4343.js";import{a as y}from"./XGPCFFL2.js";import"./BC4ZMTFC.js";import"./DDSPVSLH.js";import"./W4XITGKA.js";import{t as z}from"./SBARVI35.js";import"./HWDBQK2D.js";import{C as g,D as m,E as i,G as x,P as k,g as b,h as n,o as h}from"./2ECRIOED.js";var t={container:"container",contentContainer:"content-container",contentContainerHasContent:"content-container--has-content",contentContainerHasOnlyContentTopAndBottom:"content-container--has-only-content-top-and-bottom",textContentContainer:"text-content-container",description:"description",heading:"heading",icon:"icon",interactive:"interactive",largeVisualDeprecated:"large-visual-deprecated",row:"row",selected:"selected",selectionIcon:"selection-icon",textContent:"text-content"},s={selectedMultiple:"check-square-f",selectedSingle:"circle-f",unselectedMultiple:"square",unselectedSingle:"circle"},$={contentBottom:"content-bottom",contentTop:"content-top"},A=b`: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{box-shadow:var(--calcite-tile-shadow, var(--calcite-shadow-none));box-sizing:border-box;display:inline-block}calcite-link{--calcite-link-text-color: var(--calcite-tile-link-text-color)}.container{background-color:var(--calcite-tile-background-color, var(--calcite-color-foreground-1));block-size:var(--calcite-container-size-content-fluid);border-radius:var(--calcite-tile-corner-radius, var(--calcite-corner-radius));box-sizing:border-box;color:var(--calcite-tile-text-color, var(--calcite-color-text-3));inline-size:var(--calcite-container-size-content-fluid);outline:var(--calcite-border-width-sm, 1px) solid var(--calcite-tile-border-color, var(--calcite-color-border-2));padding:var(--calcite-internal-tile-spacing);position:relative;-webkit-user-select:none;user-select:none}.container .selection-icon{color:var(--calcite-tile-text-color, var(--calcite-color-text-3))}.container.interactive{cursor:pointer}.container.interactive:hover,.container.interactive:focus,.container.interactive.selected{outline-color:var(--calcite-tile-accent-color-press, var(--calcite-color-brand));z-index:var(--calcite-z-index)}.container.interactive:hover .selection-icon,.container.interactive:focus .selection-icon,.container.interactive.selected .selection-icon{color:var(--calcite-tile-accent-color-press, var(--calcite-color-brand))}.container.interactive:focus{box-shadow:inset 0 0 0 1px var(--calcite-tile-accent-color-press, var(--calcite-color-brand));z-index:calc(var(--calcite-z-index) + 1)}.content-container,.row{align-items:flex-start;display:flex}.content-container{flex-direction:column;word-wrap:break-word;word-break:break-word;inline-size:var(--calcite-container-size-content-fluid)}.text-content-container{inline-size:100%;outline-color:transparent;padding:0}.text-content{display:flex;flex-direction:column}.heading{color:var(--calcite-tile-heading-text-color, var(--calcite-color-text-2));font-weight:var(--calcite-font-weight-medium);line-height:1.20313rem;overflow-wrap:break-word}.description{font-weight:var(--calcite-font-weight-regular);overflow-wrap:break-word}.large-visual-deprecated{align-items:center;justify-content:center;min-block-size:12rem;text-align:center}.large-visual-deprecated .icon{align-self:center;block-size:64px;inline-size:64px}.large-visual-deprecated .selection-icon{position:absolute;inset-inline-start:var(--calcite-internal-tile-spacing);inset-block-start:var(--calcite-internal-tile-spacing);z-index:var(--calcite-z-index)}.large-visual-deprecated .text-content-container{justify-content:center}:host([alignment=center]) .icon{align-self:center}:host([alignment=center]) .text-content-container{justify-content:center}:host([alignment=center]) .text-content{text-align:center}:host([alignment=center]) slot[name=content-bottom]::slotted(*),:host([alignment=center]) slot[name=content-top]::slotted(*){align-self:center}:host([scale=s]){--calcite-internal-tile-spacing: var(--calcite-spacing-sm);max-inline-size:400px;min-inline-size:100px}:host([scale=s]) .heading{font-size:var(--calcite-font-size--2);line-height:1.03125rem}:host([scale=s]) .description{font-size:var(--calcite-font-size--3);line-height:.85938rem}:host([scale=m]){--calcite-internal-tile-spacing: var(--calcite-spacing-md);max-inline-size:460px;min-inline-size:140px}:host([scale=m]) .heading{font-size:var(--calcite-font-size--1);line-height:1.20313rem}:host([scale=m]) .description{font-size:var(--calcite-font-size--2);line-height:1.03125rem}:host([scale=l]){--calcite-internal-tile-spacing: var(--calcite-spacing-lg);max-inline-size:520px;min-inline-size:160px}:host([scale=l]) .heading{font-size:var(--calcite-font-size-0);line-height:1.375rem}:host([scale=l]) .description{font-size:var(--calcite-font-size--1);line-height:1.20313rem}.content-container--has-content,.row{gap:var(--calcite-internal-tile-spacing)}.content-container--has-only-content-top-and-bottom slot[name=content-top]::slotted(*){margin-block-end:var(--calcite-internal-tile-spacing)}:host([selection-appearance=border][layout=horizontal]) .container.selected:focus:before,:host([selection-appearance=border][layout=vertical]) .container.selected:focus:before{block-size:100%;box-shadow:inset 0 0 0 1px var(--calcite-tile-accent-color-press, var(--calcite-color-brand));content:"";display:block;inline-size:100%;inset-block-start:0;inset-inline-start:0;position:absolute}:host([selection-appearance=border][layout=horizontal]) .container.selected{box-shadow:inset 0 -4px 0 0 var(--calcite-tile-accent-color-press, var(--calcite-color-brand))}:host([selection-appearance=border][layout=vertical]) .container.selected{box-shadow:inset 4px 0 0 0 var(--calcite-tile-accent-color-press, var(--calcite-color-brand))}:host(:hover:not([disabled])) .heading,:host([active]:not([disabled])) .heading{color:var(--calcite-tile-heading-text-color, var(--calcite-color-text-1))}:host(:hover:not([disabled])) .description,:host([active]:not([disabled])) .description{color:var(--calcite-tile-text-color, var(--calcite-color-text-2))}:host([href]:focus:not([disabled])) .container,:host([href]:hover:not([disabled])) .container{outline-color:var(--calcite-tile-link-color, var(--calcite-color-text-link));z-index:var(--calcite-z-index)}:host([href]:focus:not([disabled])) .icon,:host([href]:hover:not([disabled])) .icon{color:var(--calcite-tile-link-color, var(--calcite-color-text-link))}:host([href]:focus:not([disabled])) .heading,:host([href]:hover:not([disabled])) .heading{color:var(--calcite-tile-link-color, var(--calcite-color-text-link))}:host([href]:active:not([disabled])) .container{box-shadow:inset 0 0 0 1px var(--calcite-tile-link-color, var(--calcite-color-text-link));outline-color:var(--calcite-tile-link-color, var(--calcite-color-text-link))}:host([embed]) .container{padding:0}:host([selection-mode=none]) .container:hover,:host([selection-mode=none]) .container.selected{outline-color:var(--calcite-tile-border-color, var(--calcite-color-border-2))}:host([selection-mode=none]) .container:focus{outline-color:var(--calcite-tile-accent-color-press, var(--calcite-color-brand))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}::slotted(*){max-inline-size:100%}`,p=class extends m{constructor(){super(),this.focusSetter=y()(this),this.hasContentBottom=!1,this.hasContentTop=!1,this.active=!1,this.alignment="start",this.disabled=!1,this.embed=!1,this.iconFlipRtl=!1,this.interactive=!1,this.layout="horizontal",this.scale="m",this.selected=!1,this.selectionAppearance="icon",this.selectionMode="none",this.calciteInternalTileKeyEvent=h({cancelable:!1}),this.calciteTileSelect=h(),this.listen("keydown",this.keyDownHandler)}static{this.properties={hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],active:[7,{},{reflect:!0,type:Boolean}],alignment:[3,{},{reflect:!0}],description:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],embed:[7,{},{reflect:!0,type:Boolean}],heading:[3,{},{reflect:!0}],href:[3,{},{reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],interactive:[5,{},{type:Boolean}],label:1,layout:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=A}async setFocus(e){return this.focusSetter(()=>this.interactive?this.containerEl:void 0,e)}updated(){w(this)}clickHandler(){this.interactive&&(this.setFocus(),this.handleSelectEvent())}handleSelectEvent(){this.disabled||!this.interactive||this.selectionMode==="single-persist"&&this.selected===!0||this.calciteTileSelect.emit()}handleSlotChange(e){let c=e.target.dataset.name;this[`has${c}`]=z(e)}setContainerEl(e){this.containerEl=e}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.handleSelectEvent(),e.preventDefault();break;case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"Home":case"End":this.calciteInternalTileKeyEvent.emit(e),e.preventDefault();break}}renderSelectionIcon(){let{selected:e,selectionAppearance:c,selectionMode:a}=this;if(c==="icon"&&a!=="none")return n`<calcite-icon class=${i(t.selectionIcon)} .icon=${e?a==="multiple"?s.selectedMultiple:s.selectedSingle:a==="multiple"?s.unselectedMultiple:s.unselectedSingle} scale=s></calcite-icon>`}renderTile(){let{description:e,disabled:c,hasContentBottom:a,hasContentTop:S,heading:l,icon:r,iconFlipRtl:B,interactive:o,selectionMode:d}=this,E=l&&r&&!e,v=!!this.href||!o,u=d==="multiple"&&o?"checkbox":d!=="none"&&o?"radio":o?"button":void 0,f=!!(e||l||r),T=!f&&S&&a;return n`<div .ariaChecked=${d!=="none"&&o?this.selected:void 0} .ariaDisabled=${v?c:void 0} .ariaLabel=${u&&this.label} class=${i({[t.container]:!0,[t.interactive]:o,[t.largeVisualDeprecated]:E,[t.row]:!0,[t.selected]:this.selected})} @click=${this.clickHandler} .role=${u} tabindex=${(v?void 0:0)??x} ${g(this.setContainerEl)}>${this.renderSelectionIcon()}<div class=${i({[t.contentContainer]:!0,[t.contentContainerHasContent]:f,[t.contentContainerHasOnlyContentTopAndBottom]:T})}><slot name=${$.contentTop} @slotchange=${this.handleSlotChange}></slot>${r&&n`<calcite-icon class=${i(t.icon)} .flipRtl=${B} .icon=${r} scale=l></calcite-icon>`||""}<div class=${i({[t.textContentContainer]:!0,[t.row]:!0})}><div class=${i(t.textContent)}>${l&&n`<div class=${i(t.heading)}>${l}</div>`||""}${e&&n`<div class=${i(t.description)}>${e}</div>`||""}</div></div><slot name=${$.contentBottom} @slotchange=${this.handleSlotChange}></slot></div></div>`}render(){let{disabled:e}=this;return C({disabled:e,children:this.href?n`<calcite-link .disabled=${e} .href=${this.href}>${this.renderTile()}</calcite-link>`:this.renderTile()})}};k("calcite-tile",p);export{p as Tile};
|
|
@@ -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 r}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{c as r}from"./ZVCPJCBM.js";import{a as n,b as o}from"./ZOYJ4343.js";import{D as l,E as e,P as s,g as a,h as i,o as c}from"./2ECRIOED.js";var d={container:"container",heading:"heading"},p=a`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column}:host([filter-hidden]){display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{margin:0;display:flex;flex:1 1 0%;background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1));color:var(--calcite-list-color, var(--calcite-color-text-1))}.heading{font-weight:var(--calcite-font-weight-bold)}:host([scale=s]) .container{padding-inline:var(--calcite-spacing-sm)}:host([scale=s]) .heading{font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-fixed-base);padding-block:var(--calcite-spacing-sm) var(--calcite-spacing-xxs)}:host([scale=s]:not(:first-child)) .container{padding-block-start:var(--calcite-spacing-sm)}:host([scale=m]) .container{padding-inline:var(--calcite-spacing-md)}:host([scale=m]) .heading{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-fixed-base);padding-block:var(--calcite-spacing-lg) var(--calcite-spacing-sm)}:host([scale=m]:not(:first-child)) .container{padding-block-start:var(--calcite-spacing-md)}:host([scale=l]) .container{padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .heading{font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-fixed-lg);padding-block:var(--calcite-spacing-xl) var(--calcite-spacing-sm-plus, .625rem)}:host([scale=l]:not(:first-child)) .container{padding-block-start:var(--calcite-spacing-md-plus, .875rem)}.heading{padding:0}:host([hidden]){display:none}[hidden]{display:none}`,t=class extends l{constructor(){super(...arguments),this.disabled=!1,this.filterHidden=!1,this.scale="m",this.calciteInternalListItemGroupDefaultSlotChange=c({cancelable:!1})}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],filterHidden:[7,{},{reflect:!0,type:Boolean}],heading:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=p}updated(){n(this)}handleDefaultSlotChange(){this.calciteInternalListItemGroupDefaultSlotChange.emit()}render(){let{disabled:h,heading:g}=this;return o({disabled:h,children:i`<div class=${e(d.container)} role=row><div .ariaColSpan=${r} class=${e(d.heading)} role=cell>${g}</div></div><slot @slotchange=${this.handleDefaultSlotChange}></slot>`})}};s("calcite-list-item-group",t);export{t as ListItemGroup};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as $}from"./JVYKUU2B.js";import{a as O}from"./6YVXONLB.js";import{c as k,d as T,e as S}from"./O72KETNZ.js";import{c as y,e as I,f as z,h as N}from"./OBY2JHHI.js";import{a as E,b as C}from"./UQ4HIO7J.js";import{a as b}from"./CZF6KYOX.js";import{a as x}from"./CFWXX2ZT.js";import{a as w}from"./SXK4ATVN.js";import"./6PMY6MUE.js";import{a as g}from"./PCGNN5RO.js";import"./H3GTITDX.js";import"./7DQ4G2FS.js";import"./44XNJNTA.js";import{B as p,C as u,D as v,E as l,I as m,P as f,g as d,h as r,o as h}from"./2IIGKMQ6.js";var A=d`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column;font-size:var(--calcite-select-font-size);font-weight:var(--calcite-internal-select-font-weight, var(--calcite-font-weight-regular))}.wrapper{position:relative;display:flex;align-items:stretch;inline-size:var(--select-width);block-size:var(--calcite-internal-select-block-size, 32px)}.wrapper:focus-within .icon,.wrapper:active .icon,.wrapper:hover .icon{color:var(--calcite-select-icon-color-hover, var(--calcite-color-text-1))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-select-font-size: var(--calcite-font-size--2);--calcite-select-spacing-inline: .5rem 2rem;--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-sm);--calcite-internal-select-block-size: 24px}:host([scale=m]){--calcite-internal-select-font-size: var(--calcite-font-size--1);--calcite-select-spacing-inline: .75rem 2.5rem;--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-md)}:host([scale=l]){--calcite-internal-select-font-size: var(--calcite-font-size-0);--calcite-select-spacing-inline: 1rem 3rem;--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-lg);--calcite-internal-select-block-size: 44px}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}.select{margin:0;box-sizing:border-box;inline-size:100%;cursor:pointer;appearance:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-style:solid;font-family:inherit;outline-color:transparent;font-weight:inherit;font-size:var(--calcite-select-font-size, var(--calcite-internal-select-font-size));color:var(--calcite-select-text-color, var(--calcite-color-text-2));border-color:var(--calcite-select-border-color, var(--calcite-color-border-input));border-width:var(--calcite-select-internal-border-width, var(--calcite-border-width-sm));padding-inline:var(--calcite-select-spacing-inline);padding-block:var(--calcite-internal-select-spacing-block);border-inline-end-width:0;line-height:var(--calcite-internal-select-line-height, normal);background-color:var(--calcite-select-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));box-shadow:var(--calcite-select-shadow, var(--calcite-shadow-small))}.select: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))))}select:disabled{border-color:var(--calcite-color-border-input);--tw-bg-opacity: 1}.icon-container{pointer-events:none;position:absolute;inset-block:0px;display:flex;align-items:center;border-width:0px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:transparent;color:var(--calcite-color-text-2);inset-inline-end:0px;border-start-start-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-start-end-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-end-start-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-end-end-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-color:var(--calcite-select-border-color, var(--calcite-color-border-input));border-inline-width:0 var(--calcite-select-internal-icon-border-inline-end-width, var(--calcite-border-width-sm));padding-inline:var(--calcite-internal-select-icon-container-padding-inline)}.icon-container .icon{color:var(--calcite-select-icon-color, var(--calcite-color-text-3))}:host([status=invalid]) select,:host([status=invalid]) .icon-container{border-color:var(--calcite-color-status-danger)}:host([status=invalid]) select:focus,:host([status=invalid]) .icon-container:focus{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))))}.select:focus~.icon-container{border-color:transparent}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,c={icon:"icon",iconContainer:"icon-container",select:"select",wrapper:"wrapper"},L={validationMessage:"selectValidationMessage"};function s(n){return n.tagName==="CALCITE-OPTION"}function F(n){return n.tagName==="CALCITE-OPTION-GROUP"}var o=class extends v{constructor(){super(),this.componentToNativeEl=new Map,this.mutationObserver=b("mutation",()=>this.populateInternalSelect()),this.selectRef=p(),this.messages=x(),this.focusSetter=w()(this),this.disabled=!1,this.required=!1,this.scale="m",this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.value=null,this.width="auto",this.calciteSelectChange=h({cancelable:!1}),this.listen("calciteInternalOptionChange",this.handleOptionOrGroupChange),this.listen("calciteInternalOptionGroupChange",this.handleOptionOrGroupChange)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],label:1,labelText:1,name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectedOption:[0,{},{attribute:!1}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:m,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1,width:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}]}}static{this.styles=A}async setFocus(e){return this.focusSetter(()=>this.selectRef.value,e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{subtree:!0,childList:!0}),k(this),y(this)}willUpdate(e){e.has("value")&&(this.hasUpdated||this.value!==null)&&this.updateItemsFromValue(this.value),e.has("selectedOption")&&(this.value=this.selectedOption?.value)}updated(){E(this)}loaded(){typeof this.value=="string"&&this.updateItemsFromValue(this.value),this.populateInternalSelect();let e=this.selectRef.value?.selectedOptions[0];this.selectFromNativeOption(e),z(this,this.selectedOption?.value??"")}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),T(this),I(this)}handleInternalSelectChange(){let e=this.selectRef.value.selectedOptions[0];this.selectFromNativeOption(e),requestAnimationFrame(()=>this.emitChangeEvent())}handleOptionOrGroupChange(e){e.stopPropagation();let t=e.target,a=this.componentToNativeEl.get(t);a&&(this.updateNativeElement(t,a),s(t)&&t.selected&&(this.deselectAllExcept(t),this.selectedOption=t))}onLabelClick(){this.setFocus()}updateItemsFromValue(e){this.el.querySelectorAll("calcite-option").forEach(t=>t.selected=t.value===e)}updateNativeElement(e,t){if(t.disabled=e.disabled,t.label=e.label,s(e)){let a=t;a.selected=e.selected,a.value=e.value,a.innerText=e.label}}populateInternalSelect(){let e=Array.from(this.el.children).filter(t=>t.tagName==="CALCITE-OPTION"||t.tagName==="CALCITE-OPTION-GROUP");this.clearInternalSelect(),e.forEach(t=>this.selectRef.value?.append(this.toNativeElement(t)))}clearInternalSelect(){this.componentToNativeEl.forEach(e=>e.remove()),this.componentToNativeEl.clear()}selectFromNativeOption(e){if(!e)return;let t;this.componentToNativeEl.forEach((a,i)=>{s(i)&&a===e&&(i.selected=!0,t=i,this.deselectAllExcept(i))}),t&&(this.selectedOption=t)}toNativeElement(e){if(s(e)){let t=document.createElement("option");return this.updateNativeElement(e,t),this.componentToNativeEl.set(e,t),t}if(F(e)){let t=document.createElement("optgroup");return this.updateNativeElement(e,t),Array.from(e.children).forEach(a=>{let i=this.toNativeElement(a);t.append(i),this.componentToNativeEl.set(e,i)}),this.componentToNativeEl.set(e,t),t}throw new Error("unsupported element child provided")}deselectAllExcept(e){this.el.querySelectorAll("calcite-option").forEach(t=>{t!==e&&(t.selected=!1)})}emitChangeEvent(){this.calciteSelectChange.emit()}renderChevron(){return r`<div class=${l(c.iconContainer)}><calcite-icon class=${l(c.icon)} icon=chevron-down .scale=${g(this.scale)}></calcite-icon></div>`}render(){let{disabled:e}=this;return C({disabled:e,children:r`${this.labelText&&O({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div class=${l(c.wrapper)}><select aria-errormessage=${L.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${S(this)} class=${l(c.select)} .disabled=${e} @change=${this.handleInternalSelectChange} .required=${this.required} ${u(this.selectRef)}><slot></slot></select>${this.renderChevron()}${N({component:this})}</div>${this.validationMessage&&this.status==="invalid"?$({icon:this.validationIcon,id:L.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};f("calcite-select",o);export{o as Select};
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as $}from"./M3RKWDE5.js";import{a as O}from"./7LUAHEOY.js";import{c as k,d as T,e as S}from"./YR554YXQ.js";import{c as y,e as I,f as z,h as N}from"./LHYFZTCS.js";import{a as E,b as C}from"./ZOYJ4343.js";import{a as b}from"./AD2NNFBJ.js";import{a as x}from"./UVFQM6FI.js";import{a as w}from"./XGPCFFL2.js";import"./BC4ZMTFC.js";import{a as g}from"./DDSPVSLH.js";import"./W4XITGKA.js";import"./SBARVI35.js";import"./HWDBQK2D.js";import{B as p,C as u,D as v,E as l,I as m,P as f,g as d,h as r,o as h}from"./2ECRIOED.js";var A=d`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column;font-size:var(--calcite-select-font-size);font-weight:var(--calcite-internal-select-font-weight, var(--calcite-font-weight-regular))}.wrapper{position:relative;display:flex;align-items:stretch;inline-size:var(--select-width);block-size:var(--calcite-internal-select-block-size, 32px)}.wrapper:focus-within .icon,.wrapper:active .icon,.wrapper:hover .icon{color:var(--calcite-select-icon-color-hover, var(--calcite-color-text-1))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-select-font-size: var(--calcite-font-size--2);--calcite-select-spacing-inline: .5rem 2rem;--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-sm);--calcite-internal-select-block-size: 24px}:host([scale=m]){--calcite-internal-select-font-size: var(--calcite-font-size--1);--calcite-select-spacing-inline: .75rem 2.5rem;--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-md)}:host([scale=l]){--calcite-internal-select-font-size: var(--calcite-font-size-0);--calcite-select-spacing-inline: 1rem 3rem;--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-lg);--calcite-internal-select-block-size: 44px}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}.select{margin:0;box-sizing:border-box;inline-size:100%;cursor:pointer;appearance:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-style:solid;font-family:inherit;outline-color:transparent;font-weight:inherit;font-size:var(--calcite-select-font-size, var(--calcite-internal-select-font-size));color:var(--calcite-select-text-color, var(--calcite-color-text-2));border-color:var(--calcite-select-border-color, var(--calcite-color-border-input));border-width:var(--calcite-select-internal-border-width, var(--calcite-border-width-sm));padding-inline:var(--calcite-select-spacing-inline);padding-block:var(--calcite-internal-select-spacing-block);border-inline-end-width:0;line-height:var(--calcite-internal-select-line-height, normal);background-color:var(--calcite-select-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));box-shadow:var(--calcite-select-shadow, var(--calcite-shadow-small))}.select: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))))}select:disabled{border-color:var(--calcite-color-border-input);--tw-bg-opacity: 1}.icon-container{pointer-events:none;position:absolute;inset-block:0px;display:flex;align-items:center;border-width:0px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:transparent;color:var(--calcite-color-text-2);inset-inline-end:0px;border-start-start-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-start-end-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-end-start-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-end-end-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-color:var(--calcite-select-border-color, var(--calcite-color-border-input));border-inline-width:0 var(--calcite-select-internal-icon-border-inline-end-width, var(--calcite-border-width-sm));padding-inline:var(--calcite-internal-select-icon-container-padding-inline)}.icon-container .icon{color:var(--calcite-select-icon-color, var(--calcite-color-text-3))}:host([status=invalid]) select,:host([status=invalid]) .icon-container{border-color:var(--calcite-color-status-danger)}:host([status=invalid]) select:focus,:host([status=invalid]) .icon-container:focus{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))))}.select:focus~.icon-container{border-color:transparent}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,c={icon:"icon",iconContainer:"icon-container",select:"select",wrapper:"wrapper"},L={validationMessage:"selectValidationMessage"};function s(n){return n.tagName==="CALCITE-OPTION"}function F(n){return n.tagName==="CALCITE-OPTION-GROUP"}var o=class extends v{constructor(){super(),this.componentToNativeEl=new Map,this.mutationObserver=b("mutation",()=>this.populateInternalSelect()),this.selectRef=p(),this.messages=x(),this.focusSetter=w()(this),this.disabled=!1,this.required=!1,this.scale="m",this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.value=null,this.width="auto",this.calciteSelectChange=h({cancelable:!1}),this.listen("calciteInternalOptionChange",this.handleOptionOrGroupChange),this.listen("calciteInternalOptionGroupChange",this.handleOptionOrGroupChange)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],label:1,labelText:1,name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectedOption:[0,{},{attribute:!1}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:m,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1,width:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}]}}static{this.styles=A}async setFocus(e){return this.focusSetter(()=>this.selectRef.value,e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{subtree:!0,childList:!0}),k(this),y(this)}willUpdate(e){e.has("value")&&(this.hasUpdated||this.value!==null)&&this.updateItemsFromValue(this.value),e.has("selectedOption")&&(this.value=this.selectedOption?.value)}updated(){E(this)}loaded(){typeof this.value=="string"&&this.updateItemsFromValue(this.value),this.populateInternalSelect();let e=this.selectRef.value?.selectedOptions[0];this.selectFromNativeOption(e),z(this,this.selectedOption?.value??"")}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),T(this),I(this)}handleInternalSelectChange(){let e=this.selectRef.value.selectedOptions[0];this.selectFromNativeOption(e),requestAnimationFrame(()=>this.emitChangeEvent())}handleOptionOrGroupChange(e){e.stopPropagation();let t=e.target,a=this.componentToNativeEl.get(t);a&&(this.updateNativeElement(t,a),s(t)&&t.selected&&(this.deselectAllExcept(t),this.selectedOption=t))}onLabelClick(){this.setFocus()}updateItemsFromValue(e){this.el.querySelectorAll("calcite-option").forEach(t=>t.selected=t.value===e)}updateNativeElement(e,t){if(t.disabled=e.disabled,t.label=e.label,s(e)){let a=t;a.selected=e.selected,a.value=e.value,a.innerText=e.label}}populateInternalSelect(){let e=Array.from(this.el.children).filter(t=>t.tagName==="CALCITE-OPTION"||t.tagName==="CALCITE-OPTION-GROUP");this.clearInternalSelect(),e.forEach(t=>this.selectRef.value?.append(this.toNativeElement(t)))}clearInternalSelect(){this.componentToNativeEl.forEach(e=>e.remove()),this.componentToNativeEl.clear()}selectFromNativeOption(e){if(!e)return;let t;this.componentToNativeEl.forEach((a,i)=>{s(i)&&a===e&&(i.selected=!0,t=i,this.deselectAllExcept(i))}),t&&(this.selectedOption=t)}toNativeElement(e){if(s(e)){let t=document.createElement("option");return this.updateNativeElement(e,t),this.componentToNativeEl.set(e,t),t}if(F(e)){let t=document.createElement("optgroup");return this.updateNativeElement(e,t),Array.from(e.children).forEach(a=>{let i=this.toNativeElement(a);t.append(i),this.componentToNativeEl.set(e,i)}),this.componentToNativeEl.set(e,t),t}throw new Error("unsupported element child provided")}deselectAllExcept(e){this.el.querySelectorAll("calcite-option").forEach(t=>{t!==e&&(t.selected=!1)})}emitChangeEvent(){this.calciteSelectChange.emit()}renderChevron(){return r`<div class=${l(c.iconContainer)}><calcite-icon class=${l(c.icon)} icon=chevron-down .scale=${g(this.scale)}></calcite-icon></div>`}render(){let{disabled:e}=this;return C({disabled:e,children:r`${this.labelText&&O({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div class=${l(c.wrapper)}><select aria-errormessage=${L.validationMessage} .ariaInvalid=${this.status==="invalid"} .ariaLabel=${S(this)} class=${l(c.select)} .disabled=${e} @change=${this.handleInternalSelectChange} .required=${this.required} ${u(this.selectRef)}><slot></slot></select>${this.renderChevron()}${N({component:this})}</div>${this.validationMessage&&this.status==="invalid"?$({icon:this.validationIcon,id:L.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};f("calcite-select",o);export{o as Select};
|
|
@@ -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.7 */
|
|
4
|
+
import{a as u}from"./ULUKHLQN.js";import{a}from"./DDSPVSLH.js";import{C as e,E as r,h as o,l as n}from"./2ECRIOED.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 g,b as T}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as g,b as T}from"./ZOYJ4343.js";import{a}from"./ULUKHLQN.js";import{a as k}from"./JVPR6YZA.js";import{a as y}from"./DDSPVSLH.js";import"./W4XITGKA.js";import{y as c}from"./SBARVI35.js";import"./HWDBQK2D.js";import{B as m,C as h,D as f,E as C,P as R,g as p,h as o,m as w,o as r}from"./2ECRIOED.js";var S={lastVisibleRow:"last-visible-row"},d={checkSquare:"check-square-f",square:"square",circleF:"circle-f",circle:"circle"},A=p`@charset "UTF-8";: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:contents}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) tr{pointer-events:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}calcite-table-cell{--calcite-internal-table-cell-background-color: var( --calcite-table-row-background-color, var(--calcite-table-row-background, var(--calcite-color-foreground-1)) )}:host([selected]) calcite-table-cell{--calcite-internal-table-cell-background-color: var( --calcite-table-row-background-color-selected, var(--calcite-color-foreground-1) )}tr{border-block-end:var(--calcite-border-width-sm) solid var(--calcite-table-row-border-color, transparent);background-color:var(--calcite-table-row-background-color, var(--calcite-table-row-background, var(--calcite-color-foreground-1)))}tr.last-visible-row{border-block-end:0}@-moz-document url-prefix(){tr{box-shadow:inset 0 -1px 0 0 var(--calcite-table-row-border-color)}tr.last-visible-row{box-shadow:inset 0 -1px 0 0 transparent}}:host([item-hidden]){display:none}`,u=class extends f{constructor(){super(),this.rowCells=[],this.tableRowSlotRef=m(),this.userTriggered=!1,this._selected=!1,this.clickHandler=()=>{this.handleRowSelection()},this.handleKeyboardSelection=e=>{k(e.key)&&(e.key===" "&&e.preventDefault(),this.handleRowSelection())},this.itemHidden=!1,this.disabled=!1,this.interactionMode="interactive",this.numbered=!1,this.selectionMode="none",this.calciteInternalTableRowFocusRequest=r({cancelable:!1}),this.calciteInternalTableRowSelect=r({cancelable:!1}),this.calciteTableRowSelect=r({cancelable:!1}),this.listenOn(document,"calciteInternalTableRowFocusChange",this.calciteInternalTableRowFocusChangeHandler)}static{this.properties={alignment:[3,{},{reflect:!0}],itemHidden:[7,{},{reflect:!0,type:Boolean}],bodyRowCount:[9,{},{type:Number}],cellCount:[9,{},{type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],interactionMode:1,lastVisibleRow:[5,{},{type:Boolean}],numbered:[5,{},{type:Boolean}],positionAll:[9,{},{type:Number}],positionSection:[9,{},{type:Number}],positionSectionLocalized:1,readCellContentsToAT:[5,{},{type:Boolean}],rowType:1,scale:1,selected:[7,{},{reflect:!0,type:Boolean}],selectedRowCount:[9,{},{type:Number}],selectedRowCountLocalized:1,selectionMode:1}}static{this.styles=A}get selected(){return this._selected}set selected(e){let l=this._selected;e!==l&&(this._selected=e,this.handleCellChanges())}load(){this.listenOn(this.el.shadowRoot,"slotchange",this.handleSlotChange)}willUpdate(e){(e.has("bodyRowCount")||e.has("scale")||e.has("selectedRowCount")||e.has("interactionMode")&&(this.hasUpdated||this.interactionMode!=="interactive"))&&this.handleCellChanges(),(e.has("numbered")&&(this.hasUpdated||this.numbered!==!1)||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none"))&&this.handleDelayedCellChanges(),e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&!this.userTriggered&&this.calciteInternalTableRowSelect.emit()}updated(){g(this)}loaded(){this.tableRowEl&&this.rowCells.length>0&&this.updateCells()}handleSlotChange(){this.updateCells()}handleCellChanges(){this.tableRowEl&&this.rowCells.length>0&&this.updateCells()}handleDelayedCellChanges(){this.tableRowEl&&this.rowCells.length>0&&requestAnimationFrame(()=>this.updateCells())}calciteInternalTableRowFocusChangeHandler(e){if(e.target.contains(this.el)){let l=e.detail.cellPosition,s=e.detail.rowPosition,i=e.detail.destination,t=e.detail.lastCell;if(s===this.positionAll){if(this.disabled){let b=i==="last"?"previous":i==="first"?"next":i;this.emitTableRowFocusRequest(l,this.positionAll,b);return}let n=t?this.rowCells[this.rowCells.length-1]:this.rowCells?.find((b,$)=>$+1===l);n&&n.setFocus()}}}keyDownHandler(e){if(this.interactionMode!=="interactive")return;let l=e.target,s=e.key,i=e.ctrlKey,t=this.rowCells;if(l.matches("calcite-table-cell")||l.matches("calcite-table-header"))switch(s){case"ArrowUp":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"previous"),e.preventDefault();break;case"ArrowDown":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"next"),e.preventDefault();break;case"PageUp":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"first"),e.preventDefault();break;case"PageDown":this.emitTableRowFocusRequest(l.positionInRow,this.positionAll,"last"),e.preventDefault();break;case"ArrowLeft":c(t,l,"previous",!1,!1),e.preventDefault();break;case"ArrowRight":c(t,l,"next",!1,!1),e.preventDefault();break;case"Home":i?(this.emitTableRowFocusRequest(1,this.positionAll,"first"),e.preventDefault()):(c(t,l,"first",!1,!1),e.preventDefault());break;case"End":i?(this.emitTableRowFocusRequest(this.rowCells?.length,this.positionAll,"last",!0),e.preventDefault()):(c(t,l,"last",!1,!1),e.preventDefault());break}}emitTableRowFocusRequest(e,l,s,i){this.calciteInternalTableRowFocusRequest.emit({cellPosition:e,rowPosition:l,destination:s,lastCell:i})}updateCells(){let e=this.alignment?this.alignment:this.rowType!=="head"?"center":"start",l=this.tableRowSlotRef.value?.assignedElements({flatten:!0})?.filter(t=>t.matches("calcite-table-cell")||t.matches("calcite-table-header")),s=Array.from(this.tableRowEl?.querySelectorAll("calcite-table-header, calcite-table-cell"))?.filter(t=>t.numberCell||t.selectionCell),i=s?s.concat(l):l;i.length>0&&i?.forEach((t,n)=>{t.interactionMode=this.interactionMode,t.lastCell=n===i.length-1,t.parentRowAlignment=e,t.parentRowIsSelected=this.selected,t.parentRowType=this.rowType,t.positionInRow=n+1,t.scale=this.scale,t.nodeName==="CALCITE-TABLE-CELL"&&(t.readCellContentsToAT=this.readCellContentsToAT,t.disabled=this.disabled)}),this.rowCells=i||[],this.cellCount=i?.length}async handleRowSelection(){(this.rowType==="body"||this.rowType==="head"&&this.selectionMode==="multiple")&&(this.userTriggered=!0,this.selected=!this.selected,await this.updateComplete,this.calciteTableRowSelect.emit())}renderSelectionIcon(){let e=this.selectionMode==="multiple"&&this.selected?d.checkSquare:this.selectionMode==="multiple"?d.square:this.selected?d.circleF:d.circle;return o`<calcite-icon .icon=${e} .scale=${y(this.scale)}></calcite-icon>`}renderSelectableCell(){return this.rowType==="head"?a("selection-head",o`<calcite-table-header alignment=center .bodyRowCount=${this.bodyRowCount} @click=${this.clickHandler} @keydown=${this.handleKeyboardSelection} .parentRowAlignment=${this.alignment} .selectedRowCount=${this.selectedRowCount} .selectedRowCountLocalized=${this.selectedRowCountLocalized} .selectionCell=${!0} .selectionMode=${this.selectionMode}></calcite-table-header>`):this.rowType==="body"?a("selection-body",o`<calcite-table-cell alignment=center @click=${this.clickHandler} @keydown=${this.handleKeyboardSelection} .parentRowAlignment=${this.alignment} .parentRowIsSelected=${this.selected} .parentRowPositionLocalized=${this.positionSectionLocalized} .selectionCell=${!0}>${this.renderSelectionIcon()}</calcite-table-cell>`):a("selection-foot",o`<calcite-table-cell alignment=center .parentRowAlignment=${this.alignment} .selectionCell=${!0}></calcite-table-cell>`)}renderNumberedCell(){return this.rowType==="head"?a("numbered-head",o`<calcite-table-header alignment=center .numberCell=${!0} .parentRowAlignment=${this.alignment}></calcite-table-header>`):this.rowType==="body"?a("numbered-body",o`<calcite-table-cell alignment=center .numberCell=${!0} .parentRowAlignment=${this.alignment}>${this.positionSectionLocalized}</calcite-table-cell>`):a("numbered-foot",o`<calcite-table-cell alignment=center .numberCell=${!0} .parentRowAlignment=${this.alignment}></calcite-table-cell>`)}render(){return T({disabled:this.disabled,children:o`<tr .ariaRowIndex=${this.positionAll+1} .ariaSelected=${this.selected} class=${C({[S.lastVisibleRow]:this.lastVisibleRow})} @keydown=${this.keyDownHandler} ${h(e=>{e&&(this.tableRowEl=e,w(o`${this.numbered&&this.renderNumberedCell()||""}${this.selectionMode!=="none"&&this.renderSelectableCell()||""}<slot ${h(this.tableRowSlotRef)}></slot>`,e))})}></tr>`})}};R("calcite-table-row",u);export{u as TableRow};
|
|
@@ -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{k as P,s as k,t as w,u as V,v as m,w as h,x as A,y as D,z as y}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{k as P,s as k,t as w,u as V,v as m,w as h,x as A,y as D,z as y}from"./2ECRIOED.js";var b=(s,f,c)=>{let p=new Map;for(let e=f;e<=c;e++)p.set(s[e],e);return p},I=w(class extends V{constructor(s){if(super(s),s.type!==k.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,f,c){let p;c===void 0?c=f:f!==void 0&&(p=f);let e=[],n=[],o=0;for(let a of s)e[o]=p?p(a,o):o,n[o]=c(a,o),o++;return{values:n,keys:e}}render(s,f,c){return this.dt(s,f,c).values}update(s,[f,c,p]){let e=D(s),{values:n,keys:o}=this.dt(f,c,p);if(!Array.isArray(e))return this.ut=o,n;let a=this.ut??=[],u=[],v,g,t=0,l=e.length-1,r=0,i=n.length-1;for(;t<=l&&r<=i;)if(e[t]===null)t++;else if(e[l]===null)l--;else if(a[t]===o[r])u[r]=h(e[t],n[r]),t++,r++;else if(a[l]===o[i])u[i]=h(e[l],n[i]),l--,i--;else if(a[t]===o[i])u[i]=h(e[t],n[i]),m(s,u[i+1],e[t]),t++,i--;else if(a[l]===o[r])u[r]=h(e[l],n[r]),m(s,e[t],e[l]),l--,r++;else if(v===void 0&&(v=b(o,r,i),g=b(a,t,l)),v.has(a[t]))if(v.has(a[l])){let d=g.get(o[r]),x=d!==void 0?e[d]:null;if(x===null){let C=m(s,e[t]);h(C,n[r]),u[r]=C}else u[r]=h(x,n[r]),m(s,e[t],x),e[d]=null;r++}else y(e[l]),l--;else y(e[t]),t++;for(;r<=i;){let d=m(s,u[i+1]);h(d,n[r]),u[r++]=d}for(;t<=l;){let d=e[t++];d!==null&&y(d)}return this.ut=o,A(s,u),P}});export{I 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{g as e}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{g as e}from"./2ECRIOED.js";var a=e`.header{margin:0;display:flex;align-content:space-between;align-items:center;fill:var(--calcite-color-text-2);color:var(--calcite-color-text-2)}.heading{margin:0;padding:0;font-weight:var(--calcite-font-weight-medium)}.header .heading{flex:1 1 auto;padding:.5rem}`;export{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 X}from"./LFSTWFMB.js";import{a as _}from"./AANSYYFF.js";import{c as v,d as S,e as U,f as I,g as N,h as q,i as g}from"./IJDY7EKO.js";import{a as T}from"./LFYXGVGK.js";import{a as O}from"./BMB7PJZB.js";import"./BTK24FM2.js";import{a as c}from"./7XEO6UJ3.js";import"./MPYXWS5E.js";import{a as z}from"./OFO7DXMT.js";import{a as C}from"./CZF6KYOX.js";import{a as R}from"./CFWXX2ZT.js";import{a as $}from"./SXK4ATVN.js";import"./6PMY6MUE.js";import{a as H}from"./PCGNN5RO.js";import"./H3GTITDX.js";import{j as A,q as B,w as L,x as F}from"./7DQ4G2FS.js";import{a as D}from"./44XNJNTA.js";import{B as y,C as m,D as P,E as n,H as k,P as x,g as E,h as l,o as s}from"./2IIGKMQ6.js";var G=5;function J({startX:d,startY:e,endX:t,endY:i}){return Math.hypot(t-d,i-e)>G}var b=class{constructor(){this.registeredElements=new Map,this.registeredElementCount=0,this.queryPopover=e=>{let{registeredElements:t}=this,i=e.find(r=>t.has(r));return t.get(i)},this.togglePopovers=e=>{let t=e.composedPath(),i=this.queryPopover(t);i&&!i.triggerDisabled&&(i.open=!i.open),Array.from(this.registeredElements.values()).filter(r=>r!==i&&r.autoClose&&r.open&&!t.includes(r)).forEach(r=>r.open=!1)},this.keyDownHandler=e=>{e.defaultPrevented||(e.key==="Escape"?this.closeAllPopovers():z(e.key)&&this.togglePopovers(e))},this.pointerDownHandler=e=>{if(e.defaultPrevented||!L(e))return;let{clientX:t,clientY:i}=e;this.pointerDownPosition={x:t,y:i}},this.clickHandler=e=>{F(e)||e.defaultPrevented||this.pointerDownPosition&&J({endY:e.clientY,endX:e.clientX,startY:this.pointerDownPosition.y,startX:this.pointerDownPosition.x})||(this.pointerDownPosition=void 0,this.togglePopovers(e))}}registerElement(e,t){this.registeredElementCount++,this.registeredElements.set(e,t),this.registeredElementCount===1&&this.addListeners()}unregisterElement(e){this.registeredElements.delete(e)&&this.registeredElementCount--,this.registeredElementCount===0&&this.removeListeners()}closeAllPopovers(){Array.from(this.registeredElements.values()).forEach(e=>e.open=!1)}addListeners(){window.addEventListener("pointerdown",this.pointerDownHandler),window.addEventListener("click",this.clickHandler),window.addEventListener("keydown",this.keyDownHandler)}removeListeners(){window.removeEventListener("pointerdown",this.pointerDownHandler),window.removeEventListener("click",this.clickHandler),window.removeEventListener("keydown",this.keyDownHandler)}},o={positionContainer:"position-container",container:"container",closeButtonContainer:"close-button-container",closeButton:"close-button",content:"content",hasHeader:"has-header",header:"header",headerContainer:"header-container",heading:"heading"},Y="auto",K="aria-controls",M="aria-expanded",Q=E`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:contents}.position-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-popover-max-size-x, 100vw)}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-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}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}:host([scale=s]) .heading{padding:.5rem .75rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) .heading{padding:.75rem 1rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) .heading{padding:1rem 1.25rem;font-size:var(--calcite-font-size-1);line-height:1.375}.position-container .calcite-floating-ui-anim{border-width:1px;border-style:solid;background-color:var(--calcite-popover-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-popover-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-popover-corner-radius, var(--calcite-corner-radius-round))}.calcite-floating-ui-arrow{fill:var(--calcite-popover-background-color, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-popover-border-color, var(--calcite-color-border-3))}.header{display:flex;flex:1 1 auto;align-items:stretch;justify-content:flex-start;border-width:0px;border-bottom-width:1px;border-style:solid;border-block-end-color:var(--calcite-popover-border-color, var(--calcite-color-border-3))}.heading{margin:0;display:block;flex:1 1 auto;align-self:center;white-space:normal;font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word;color:var(--calcite-popover-text-color, var(--calcite-color-text-1))}.header-container{position:relative;display:flex;height:100%;flex-direction:row;flex-wrap:nowrap;border-radius:.25rem;color:var(--calcite-popover-text-color, var(--calcite-color-text-1))}.header-container.has-header{flex-direction:column}.content{display:flex;height:100%;width:100%;flex-direction:column;flex-wrap:nowrap;align-self:center;word-wrap:break-word;word-break:break-word}.close-button-container{display:flex;overflow:hidden;flex:0 0 auto;border-start-end-radius:var(--calcite-popover-corner-radius, var(--calcite-corner-radius-round));border-end-end-radius:var(--calcite-popover-corner-radius, var(--calcite-corner-radius-round));--calcite-action-corner-radius-start-end: var(--calcite-popover-corner-radius, var(--calcite-corner-radius-sharp));--calcite-action-corner-radius-end-end: var(--calcite-popover-corner-radius, var(--calcite-corner-radius-sharp))}::slotted(calcite-panel),::slotted(calcite-flow){height:100%}:host([hidden]){display:none}[hidden]{display:none}`,j=new b,w=class extends P{constructor(){super(...arguments),this.focusTrap=_({triggerProp:"open",focusTrapOptions:{allowOutsideClick:!0,escapeDeactivates:e=>(e.defaultPrevented||(this.open=!1,e.preventDefault()),!1)}})(this),this.guid=`calcite-popover-${D()}`,this.hasLoaded=!1,this.mutationObserver=C("mutation",()=>this.focusTrap.updateContainerElements()),this.transitionProp="opacity",this.transitionRef=y(),this.messages=R(),this.focusSetter=$()(this),this.floatingLayout="vertical",this.autoClose=!1,this.closable=!1,this.flipDisabled=!1,this.focusTrapDisabled=!1,this.offsetDistance=g,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement=Y,this.pointerDisabled=!1,this.scale="m",this.triggerDisabled=!1,this.calcitePopoverBeforeClose=s({cancelable:!1}),this.calcitePopoverBeforeOpen=s({cancelable:!1}),this.calcitePopoverClose=s({cancelable:!1}),this.calcitePopoverOpen=s({cancelable:!1})}static{this.properties={floatingLayout:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],autoClose:[7,{},{reflect:!0,type:Boolean}],closable:[7,{},{reflect:!0,type:Boolean}],flipDisabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],focusTrapDisabled:[7,{},{reflect:!0,type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],label:1,messageOverrides:[0,{},{attribute:!1}],offsetDistance:[11,{},{type:Number,reflect:!0}],offsetSkidding:[11,{},{reflect:!0,type:Number}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],pointerDisabled:[7,{},{reflect:!0,type:Boolean}],referenceElement:1,scale:[3,{},{reflect:!0}],triggerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=Q}async reposition(e=!1){let{referenceEl:t,placement:i,overlayPositioning:r,flipDisabled:p,filteredFlipPlacements:h,offsetDistance:a,offsetSkidding:f,arrowEl:u,floatingEl:V}=this;return U(this,{floatingEl:V,referenceEl:t,overlayPositioning:r,placement:i,flipDisabled:p,flipPlacements:h,offsetDistance:a,offsetSkidding:f,arrowEl:u,type:"popover"},e)}async setFocus(e){return this.focusSetter(()=>this.el,e)}async updateFocusTrapElements(){this.focusTrap.updateContainerElements()}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),requestAnimationFrame(()=>this.setUpReferenceElement(this.hasLoaded))}willUpdate(e){e.has("flipPlacements")&&this.flipPlacementsHandler(),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),(e.has("offsetDistance")&&(this.hasUpdated||this.offsetDistance!==g)||e.has("offsetSkidding")&&(this.hasUpdated||this.offsetSkidding!==0)||e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!==Y))&&this.reposition(!0),e.has("referenceElement")&&this.referenceElementHandler()}loaded(){this.referenceElement&&!this.referenceEl&&this.setUpReferenceElement(),this.hasLoaded=!0}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.removeReferences(),q(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open&&this.referenceEl?this.floatingEl.showPopover():this.floatingEl.hidePopover())}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}openHandler(){T(this),this.reposition(!0),this.setExpandedAttr(),this.handlePopover()}referenceElementHandler(){this.setUpReferenceElement(),this.reposition(!0)}setFloatingEl(e){this.floatingEl=e,e&&requestAnimationFrame(()=>this.setUpReferenceElement())}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?S(t,e):null}setUpReferenceElement(e=!0){this.removeReferences(),this.referenceEl=this.getReferenceElement(),N(this);let{el:t,referenceElement:i,referenceEl:r}=this;e&&i&&!r&&console.warn(`${t.tagName}: reference-element id "${i}" was not found.`,{el:t}),this.addReferences(),this.handlePopover()}getId(){return this.el.id||this.guid}setExpandedAttr(){let{referenceEl:e,open:t}=this;e&&"setAttribute"in e&&e.setAttribute(M,B(t))}addReferences(){let{referenceEl:e}=this;if(!e)return;let t=this.getId();"setAttribute"in e&&e.setAttribute(K,t),j.registerElement(e,this.el),this.setExpandedAttr()}removeReferences(){let{referenceEl:e}=this;e&&("removeAttribute"in e&&(e.removeAttribute(K),e.removeAttribute(M)),j.unregisterElement(e))}getReferenceElement(){let{referenceElement:e,el:t}=this;return(typeof e=="string"?A(t,{id:e}):e)||null}hide(){this.open=!1}onBeforeOpen(){this.calcitePopoverBeforeOpen.emit()}onOpen(){this.calcitePopoverOpen.emit(),this.focusTrap.activate()}onBeforeClose(){this.calcitePopoverBeforeClose.emit()}onClose(){this.calcitePopoverClose.emit(),I(this),this.focusTrap.deactivate()}setArrowEl(e){this.arrowEl=e,this.reposition(!0)}renderCloseButton(){let{messages:e,closable:t}=this;return t?c(o.closeButtonContainer,l`<div class=${n(o.closeButtonContainer)}><calcite-action appearance=transparent class=${n(o.closeButton)} @click=${this.hide} .scale=${this.scale} .text=${e.close}><calcite-icon icon=x .scale=${H(this.scale)}></calcite-icon></calcite-action></div>`):null}renderHeader(){let{heading:e,headingLevel:t}=this,i=e?O({class:o.heading,level:t,children:e}):null;return i?c(o.header,l`<div class=${n(o.header)}>${i}${this.renderCloseButton()}</div>`):null}render(){let{referenceEl:e,heading:t,label:i,open:r,pointerDisabled:p,floatingLayout:h}=this,a=e&&r,f=!a,u=p?null:c("floating-arrow",X({floatingLayout:h,ref:this.setArrowEl}));return this.el.inert=f,this.el.ariaLabel=i,this.el.ariaLive="polite",k(this.el,"id",this.getId()),this.el.role="dialog",l`<div class=${n(o.positionContainer)} popover=manual ${m(this.setFloatingEl)}><div class=${n({[o.container]:!0,[v.animation]:!0,[v.animationActive]:a})} ${m(this.transitionRef)}>${u}<div class=${n({[o.hasHeader]:!!t,[o.headerContainer]:!0})}>${this.renderHeader()}<div class=${n(o.content)}><slot></slot></div>${t?null:this.renderCloseButton()}</div></div></div>`}};x("calcite-popover",w);export{w as Popover};
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as X}from"./JOGTHWSZ.js";import{a as _}from"./6YPBRY3A.js";import{c as v,d as S,e as U,f as I,g as N,h as q,i as g}from"./SBJ5HVNQ.js";import{a as T}from"./BAESWKYQ.js";import{a as O}from"./ZIA4F7R5.js";import"./DIWZOGSO.js";import{a as c}from"./ULUKHLQN.js";import"./OWSWQHLM.js";import{a as z}from"./JVPR6YZA.js";import{a as C}from"./AD2NNFBJ.js";import{a as R}from"./UVFQM6FI.js";import{a as $}from"./XGPCFFL2.js";import"./BC4ZMTFC.js";import{a as H}from"./DDSPVSLH.js";import"./W4XITGKA.js";import{j as A,q as B,w as L,x as F}from"./SBARVI35.js";import{a as D}from"./HWDBQK2D.js";import{B as y,C as m,D as P,E as n,H as k,P as x,g as E,h as l,o as s}from"./2ECRIOED.js";var G=5;function J({startX:d,startY:e,endX:t,endY:i}){return Math.hypot(t-d,i-e)>G}var b=class{constructor(){this.registeredElements=new Map,this.registeredElementCount=0,this.queryPopover=e=>{let{registeredElements:t}=this,i=e.find(r=>t.has(r));return t.get(i)},this.togglePopovers=e=>{let t=e.composedPath(),i=this.queryPopover(t);i&&!i.triggerDisabled&&(i.open=!i.open),Array.from(this.registeredElements.values()).filter(r=>r!==i&&r.autoClose&&r.open&&!t.includes(r)).forEach(r=>r.open=!1)},this.keyDownHandler=e=>{e.defaultPrevented||(e.key==="Escape"?this.closeAllPopovers():z(e.key)&&this.togglePopovers(e))},this.pointerDownHandler=e=>{if(e.defaultPrevented||!L(e))return;let{clientX:t,clientY:i}=e;this.pointerDownPosition={x:t,y:i}},this.clickHandler=e=>{F(e)||e.defaultPrevented||this.pointerDownPosition&&J({endY:e.clientY,endX:e.clientX,startY:this.pointerDownPosition.y,startX:this.pointerDownPosition.x})||(this.pointerDownPosition=void 0,this.togglePopovers(e))}}registerElement(e,t){this.registeredElementCount++,this.registeredElements.set(e,t),this.registeredElementCount===1&&this.addListeners()}unregisterElement(e){this.registeredElements.delete(e)&&this.registeredElementCount--,this.registeredElementCount===0&&this.removeListeners()}closeAllPopovers(){Array.from(this.registeredElements.values()).forEach(e=>e.open=!1)}addListeners(){window.addEventListener("pointerdown",this.pointerDownHandler),window.addEventListener("click",this.clickHandler),window.addEventListener("keydown",this.keyDownHandler)}removeListeners(){window.removeEventListener("pointerdown",this.pointerDownHandler),window.removeEventListener("click",this.clickHandler),window.removeEventListener("keydown",this.keyDownHandler)}},o={positionContainer:"position-container",container:"container",closeButtonContainer:"close-button-container",closeButton:"close-button",content:"content",hasHeader:"has-header",header:"header",headerContainer:"header-container",heading:"heading"},Y="auto",K="aria-controls",M="aria-expanded",Q=E`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:contents}.position-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-popover-max-size-x, 100vw)}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-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}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}:host([scale=s]) .heading{padding:.5rem .75rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) .heading{padding:.75rem 1rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) .heading{padding:1rem 1.25rem;font-size:var(--calcite-font-size-1);line-height:1.375}.position-container .calcite-floating-ui-anim{border-width:1px;border-style:solid;background-color:var(--calcite-popover-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-popover-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-popover-corner-radius, var(--calcite-corner-radius-round))}.calcite-floating-ui-arrow{fill:var(--calcite-popover-background-color, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-popover-border-color, var(--calcite-color-border-3))}.header{display:flex;flex:1 1 auto;align-items:stretch;justify-content:flex-start;border-width:0px;border-bottom-width:1px;border-style:solid;border-block-end-color:var(--calcite-popover-border-color, var(--calcite-color-border-3))}.heading{margin:0;display:block;flex:1 1 auto;align-self:center;white-space:normal;font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word;color:var(--calcite-popover-text-color, var(--calcite-color-text-1))}.header-container{position:relative;display:flex;height:100%;flex-direction:row;flex-wrap:nowrap;border-radius:.25rem;color:var(--calcite-popover-text-color, var(--calcite-color-text-1))}.header-container.has-header{flex-direction:column}.content{display:flex;height:100%;width:100%;flex-direction:column;flex-wrap:nowrap;align-self:center;word-wrap:break-word;word-break:break-word}.close-button-container{display:flex;overflow:hidden;flex:0 0 auto;border-start-end-radius:var(--calcite-popover-corner-radius, var(--calcite-corner-radius-round));border-end-end-radius:var(--calcite-popover-corner-radius, var(--calcite-corner-radius-round));--calcite-action-corner-radius-start-end: var(--calcite-popover-corner-radius, var(--calcite-corner-radius-sharp));--calcite-action-corner-radius-end-end: var(--calcite-popover-corner-radius, var(--calcite-corner-radius-sharp))}::slotted(calcite-panel),::slotted(calcite-flow){height:100%}:host([hidden]){display:none}[hidden]{display:none}`,j=new b,w=class extends P{constructor(){super(...arguments),this.focusTrap=_({triggerProp:"open",focusTrapOptions:{allowOutsideClick:!0,escapeDeactivates:e=>(e.defaultPrevented||(this.open=!1,e.preventDefault()),!1)}})(this),this.guid=`calcite-popover-${D()}`,this.hasLoaded=!1,this.mutationObserver=C("mutation",()=>this.focusTrap.updateContainerElements()),this.transitionProp="opacity",this.transitionRef=y(),this.messages=R(),this.focusSetter=$()(this),this.floatingLayout="vertical",this.autoClose=!1,this.closable=!1,this.flipDisabled=!1,this.focusTrapDisabled=!1,this.offsetDistance=g,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement=Y,this.pointerDisabled=!1,this.scale="m",this.triggerDisabled=!1,this.calcitePopoverBeforeClose=s({cancelable:!1}),this.calcitePopoverBeforeOpen=s({cancelable:!1}),this.calcitePopoverClose=s({cancelable:!1}),this.calcitePopoverOpen=s({cancelable:!1})}static{this.properties={floatingLayout:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],autoClose:[7,{},{reflect:!0,type:Boolean}],closable:[7,{},{reflect:!0,type:Boolean}],flipDisabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],focusTrapDisabled:[7,{},{reflect:!0,type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],label:1,messageOverrides:[0,{},{attribute:!1}],offsetDistance:[11,{},{type:Number,reflect:!0}],offsetSkidding:[11,{},{reflect:!0,type:Number}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],pointerDisabled:[7,{},{reflect:!0,type:Boolean}],referenceElement:1,scale:[3,{},{reflect:!0}],triggerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=Q}async reposition(e=!1){let{referenceEl:t,placement:i,overlayPositioning:r,flipDisabled:p,filteredFlipPlacements:h,offsetDistance:a,offsetSkidding:f,arrowEl:u,floatingEl:V}=this;return U(this,{floatingEl:V,referenceEl:t,overlayPositioning:r,placement:i,flipDisabled:p,flipPlacements:h,offsetDistance:a,offsetSkidding:f,arrowEl:u,type:"popover"},e)}async setFocus(e){return this.focusSetter(()=>this.el,e)}async updateFocusTrapElements(){this.focusTrap.updateContainerElements()}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),requestAnimationFrame(()=>this.setUpReferenceElement(this.hasLoaded))}willUpdate(e){e.has("flipPlacements")&&this.flipPlacementsHandler(),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),(e.has("offsetDistance")&&(this.hasUpdated||this.offsetDistance!==g)||e.has("offsetSkidding")&&(this.hasUpdated||this.offsetSkidding!==0)||e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!==Y))&&this.reposition(!0),e.has("referenceElement")&&this.referenceElementHandler()}loaded(){this.referenceElement&&!this.referenceEl&&this.setUpReferenceElement(),this.hasLoaded=!0}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.removeReferences(),q(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open&&this.referenceEl?this.floatingEl.showPopover():this.floatingEl.hidePopover())}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}openHandler(){T(this),this.reposition(!0),this.setExpandedAttr(),this.handlePopover()}referenceElementHandler(){this.setUpReferenceElement(),this.reposition(!0)}setFloatingEl(e){this.floatingEl=e,e&&requestAnimationFrame(()=>this.setUpReferenceElement())}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?S(t,e):null}setUpReferenceElement(e=!0){this.removeReferences(),this.referenceEl=this.getReferenceElement(),N(this);let{el:t,referenceElement:i,referenceEl:r}=this;e&&i&&!r&&console.warn(`${t.tagName}: reference-element id "${i}" was not found.`,{el:t}),this.addReferences(),this.handlePopover()}getId(){return this.el.id||this.guid}setExpandedAttr(){let{referenceEl:e,open:t}=this;e&&"setAttribute"in e&&e.setAttribute(M,B(t))}addReferences(){let{referenceEl:e}=this;if(!e)return;let t=this.getId();"setAttribute"in e&&e.setAttribute(K,t),j.registerElement(e,this.el),this.setExpandedAttr()}removeReferences(){let{referenceEl:e}=this;e&&("removeAttribute"in e&&(e.removeAttribute(K),e.removeAttribute(M)),j.unregisterElement(e))}getReferenceElement(){let{referenceElement:e,el:t}=this;return(typeof e=="string"?A(t,{id:e}):e)||null}hide(){this.open=!1}onBeforeOpen(){this.calcitePopoverBeforeOpen.emit()}onOpen(){this.calcitePopoverOpen.emit(),this.focusTrap.activate()}onBeforeClose(){this.calcitePopoverBeforeClose.emit()}onClose(){this.calcitePopoverClose.emit(),I(this),this.focusTrap.deactivate()}setArrowEl(e){this.arrowEl=e,this.reposition(!0)}renderCloseButton(){let{messages:e,closable:t}=this;return t?c(o.closeButtonContainer,l`<div class=${n(o.closeButtonContainer)}><calcite-action appearance=transparent class=${n(o.closeButton)} @click=${this.hide} .scale=${this.scale} .text=${e.close}><calcite-icon icon=x .scale=${H(this.scale)}></calcite-icon></calcite-action></div>`):null}renderHeader(){let{heading:e,headingLevel:t}=this,i=e?O({class:o.heading,level:t,children:e}):null;return i?c(o.header,l`<div class=${n(o.header)}>${i}${this.renderCloseButton()}</div>`):null}render(){let{referenceEl:e,heading:t,label:i,open:r,pointerDisabled:p,floatingLayout:h}=this,a=e&&r,f=!a,u=p?null:c("floating-arrow",X({floatingLayout:h,ref:this.setArrowEl}));return this.el.inert=f,this.el.ariaLabel=i,this.el.ariaLive="polite",k(this.el,"id",this.getId()),this.el.role="dialog",l`<div class=${n(o.positionContainer)} popover=manual ${m(this.setFloatingEl)}><div class=${n({[o.container]:!0,[v.animation]:!0,[v.animationActive]:a})} ${m(this.transitionRef)}>${u}<div class=${n({[o.hasHeader]:!!t,[o.headerContainer]:!0})}>${this.renderHeader()}<div class=${n(o.content)}><slot></slot></div>${t?null:this.renderCloseButton()}</div></div></div>`}};x("calcite-popover",w);export{w as Popover};
|
|
@@ -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"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as c}from"./3ND3NKAM.js";import{b as m}from"./YFY6OPEB.js";import"./QR2HL6XI.js";var u=n=>n.map(o=>{let{label:a}=o,t=m(a);return{...o,continent:t}});async function v(){let n=[],o=c.map(t=>({label:t})),a=u(o);for(let t of a){let{label:e,continent:l}=t;if(t.visited)continue;t.visited=!0;let i={label:l,tzs:[{label:e}]};for(let r of a.filter(s=>!s.visited)){let{label:s,continent:b}=r;if(l===b){let p={label:s};i.tzs.push(p),r.visited=!0}}n.push(i)}return n.map(t=>(t.tzs=t.tzs.sort((e,l)=>e.label.localeCompare(l.label)),{label:t.label,tzs:t.tzs.map(e=>e.label)})).sort((t,e)=>t.label.localeCompare(e.label))}export{v as groupByRegion};
|
|
@@ -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 l}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as l}from"./ULUKHLQN.js";import{C as c,E as a,h,i as e,l as s}from"./2ECRIOED.js";var d={arrow:"calcite-floating-ui-arrow",arrowStroke:"calcite-floating-ui-arrow__stroke"},m={width:12,height:6,strokeWidth:1},S=({floatingLayout:w,key:g,ref:f})=>{let{width:t,height:r,strokeWidth:o}=m,i=t/2,$=w==="vertical",n=`M0,0 H${t} L${t-i},${r} Q${i},${r} ${i},${r} Z`;return l(g,h`<svg aria-hidden=true class=${a(d.arrow)} height=${t} viewBox=${`0 0 ${t} ${t+($?0:o)}`} width=${t+($?o:0)} ${c(f)}>${e`${e`<path class=${a(d.arrowStroke)} d=${n??s} fill=none stroke-width=${o+1} />`||""}<path d=${n??s} stroke=none />`}</svg>`)};export{S as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! 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 x,h as y,l as B,n as g,o as b,p,q as I,r as d,s as r,t as h,u as D}from"./
|
|
3
|
+
v5.0.0-next.7 */
|
|
4
|
+
import{a as x,h as y,l as B,n as g,o as b,p,q as I,r as d,s as r,t as h,u as D}from"./QVSPMDDW.js";import"./7RLP2DKK.js";import{a as T}from"./ULUKHLQN.js";import{a as E}from"./XGPCFFL2.js";import"./BC4ZMTFC.js";import"./DDSPVSLH.js";import"./W4XITGKA.js";import"./SBARVI35.js";import"./HWDBQK2D.js";import{B as v,C,D as F,E as f,P as O,g as k,h as m,o as R}from"./2ECRIOED.js";var $={container:"container",hexInput:"hex-input",opacityInput:"opacity-input"},U=k`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{display:block}.container{display:flex;inline-size:100%;flex-wrap:nowrap;align-items:center}.hex-input{--calcite-input-text-background-color: var(--calcite-color-picker-input-background-color);--calcite-input-text-border-color: var(--calcite-color-picker-input-border-color);--calcite-input-text-text-color: var(--calcite-color-picker-input-text-color);--calcite-input-prefix-text-color: var(--calcite-color-picker-input-prefix-text-color)}.opacity-input{--calcite-input-number-background-color: var(--calcite-color-picker-input-background-color);--calcite-input-number-border-color: var(--calcite-color-picker-input-border-color);--calcite-input-number-text-color: var(--calcite-color-picker-input-text-color);--calcite-input-suffix-text-color: var(--calcite-color-picker-input-suffix-text-color)}.hex-input{flex-grow:1;text-transform:uppercase}.opacity-input{inline-size:100px;margin-inline-start:-1px}:host([hidden]){display:none}[hidden]{display:none}`,V=x(),w=class extends F{constructor(){super(...arguments),this.hexInputRef=v(),this.opacityInputRef=v(),this.focusSetter=E()(this),this.internalColor=V,this.alphaChannel=!1,this.allowEmpty=!1,this.hexLabel="Hex",this.scale="m",this.value=r(h(V,this.alphaChannel),this.alphaChannel,!0),this.calciteColorPickerHexInputChange=R({cancelable:!1})}static{this.properties={internalColor:[16,{},{state:!0}],alphaChannel:[5,{},{type:Boolean}],allowEmpty:[5,{},{type:Boolean}],hexLabel:1,messages:[0,{},{attribute:!1}],numberingSystem:1,scale:[3,{},{reflect:!0}],value:[3,{},{reflect:!0}]}}static{this.styles=U}async setFocus(t){return this.focusSetter(()=>this.hexInputRef.value,t)}connectedCallback(){super.connectedCallback(),this.previousNonNullValue=this.value;let{allowEmpty:t,alphaChannel:e,value:a}=this;if(a){let n=r(a,e);p(n,e)&&this.internalSetValue(n,n,!1);return}t&&this.internalSetValue(void 0,void 0,!1)}willUpdate(t){t.has("value")&&(this.hasUpdated||this.value!==r(h(V,this.alphaChannel),this.alphaChannel,!0))&&this.internalSetValue(this.value,t.get("value"),!1)}onHexInputBlur(){let t=this.hexInputRef.value,e=t.value,a=`#${e}`,{allowEmpty:n,internalColor:l}=this,o=n&&!e,i=d(a);(I(a,!0)||I(a,!1))&&this.onHexInputChange(),!(o||p(a)&&i)&&(t.value=n&&!l?"":this.formatHexForInternalInput(D(l.object())))}onOpacityInputBlur(){let t=this.opacityInputRef.value,e=t.value,{allowEmpty:a,internalColor:n}=this;a&&!e||(t.value=a&&!n?"":this.formatOpacityForInternalInput(n))}onOpacityInputInput(){this.onOpacityInputChange()}onHexInputChange(){let e=this.hexInputRef.value.value;if(e){let a=r(e,!1);if(p(a)&&this.alphaChannel&&this.internalColor){let l=r(this.internalColor.hexa(),!0).slice(-2);e=`${a+l}`}}this.internalSetValue(e,this.value)}onOpacityInputChange(){let t=this.opacityInputRef.value,e;if(!t.value)e=t.value;else{let a=b(Number(t.value));e=this.internalColor?.alpha(a).hexa()}this.internalSetValue(e,this.value)}onInputFocus(t){(t.type==="calciteInternalInputTextFocus"?this.hexInputRef:this.opacityInputRef).value.selectText()}onHexInputInput(){let t=`#${this.hexInputRef.value.value}`,e=this.value;p(t,this.alphaChannel)&&d(t,this.alphaChannel)&&this.internalSetValue(t,e)}onInputKeyDown(t){let{altKey:e,ctrlKey:a,metaKey:n,shiftKey:l}=t,{alphaChannel:o,hexInputRef:i,internalColor:s,value:u}=this,{key:c}=t,H=t.composedPath();if(c==="Tab"&&I(u,this.alphaChannel)||c==="Enter"){H.includes(i.value)?this.onHexInputChange():this.onOpacityInputChange(),c==="Enter"&&t.preventDefault();return}let L=c==="ArrowDown"||c==="ArrowUp",S=this.value;if(L){if(!u){this.internalSetValue(this.previousNonNullValue,S),t.preventDefault();return}let z=c==="ArrowUp"?1:-1,P=l?10:1;this.internalSetValue(h(this.nudgeRGBChannels(s,P*z,H.includes(i.value)?"rgb":"a"),o),S),t.preventDefault();return}let N=e||a||n,A=c.length===1,K=B.test(c);A&&!N&&!K&&t.preventDefault()}onHexInputPaste(t){let e=t.clipboardData.getData("text");p(e,this.alphaChannel)&&d(e,this.alphaChannel)&&(t.preventDefault(),this.hexInputRef.value.value=e.slice(1),this.internalSetValue(e,this.value))}internalSetValue(t,e,a=!0){if(t){let{alphaChannel:n}=this,l=r(t,n,n);if(p(l,n)){let{internalColor:o}=this,i=x(l),s=r(h(i,n),n),u=!o||s!==r(h(o,n),n);this.internalColor=i,this.previousNonNullValue=s,this.value=s,u&&a&&this.calciteColorPickerHexInputChange.emit();return}}else if(this.allowEmpty){this.internalColor=void 0,this.value=void 0,a&&this.calciteColorPickerHexInputChange.emit();return}this.value=e}formatHexForInternalInput(t){return t?t.replace("#","").slice(0,6):""}formatOpacityForInternalInput(t){return t?`${g(t.alpha())}`:""}nudgeRGBChannels(t,e,a){let n,l=t.array(),o=l.slice(0,3);if(a==="rgb")n=[...o.map(s=>s+e),this.alphaChannel?l[3]:void 0];else{let i=b(g(t.alpha())+e);n=[...o,i]}return x(n)}render(){let{alphaChannel:t,hexLabel:e,internalColor:a,messages:n,scale:l,value:o}=this,i=this.formatHexForInternalInput(o),s=this.formatOpacityForInternalInput(a),u=l==="l"?"m":"s";return m`<div class=${f($.container)}><calcite-input-text class=${f($.hexInput)} .label=${n?.hex||e} .maxLength=${this.alphaChannel?8:6} @keydown=${this.onInputKeyDown} @paste=${this.onHexInputPaste} @calciteInputTextChange=${this.onHexInputChange} @calciteInputTextInput=${this.onHexInputInput} @calciteInternalInputTextBlur=${this.onHexInputBlur} @calciteInternalInputTextFocus=${this.onInputFocus} prefix-text=# .scale=${u} .value=${i} ${C(this.hexInputRef)}></calcite-input-text>${t?T("opacity-input",m`<calcite-input-number class=${f($.opacityInput)} .label=${n?.opacity} .max=${y.max} max-length=3 .min=${y.min} number-button-type=none .numberingSystem=${this.numberingSystem} @keydown=${this.onInputKeyDown} @calciteInputNumberInput=${this.onOpacityInputInput} @calciteInternalInputNumberBlur=${this.onOpacityInputBlur} @calciteInternalInputNumberFocus=${this.onInputFocus} .scale=${u} suffix-text=% .value=${s} ${C(this.opacityInputRef)}></calcite-input-number>`):null}</div>`}};O("calcite-color-picker-hex-input",w);export{w as ColorPickerHexInput};
|
|
@@ -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.7 */
|
|
4
4
|
function t(n){return n==="Enter"||n===" "}var e=["0","1","2","3","4","5","6","7","8","9"];export{t as a,e as b};
|