@esri/calcite-components 5.1.0-next.21 → 5.1.0-next.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{4DLBLTZG.js → 24JBQUML.js} +1 -1
- package/dist/cdn/{7Z2BQLCJ.js → 2QKFWQAR.js} +1 -1
- package/dist/cdn/{6WWLMCSS.js → 36S2MKM5.js} +1 -1
- package/dist/cdn/{LRTBBK2V.js → 3AOHCUPH.js} +1 -1
- package/dist/cdn/{HAMHXQU7.js → 3HSJBPWW.js} +1 -1
- package/dist/cdn/{3UU67AJS.js → 3LKOO3K6.js} +1 -1
- package/dist/cdn/{5JXDTISP.js → 3MK43MJV.js} +1 -1
- package/dist/cdn/{QDB6LPRV.js → 3RBPKGKR.js} +1 -1
- package/dist/cdn/{ON2PWFTQ.js → 3UD24R55.js} +1 -1
- package/dist/cdn/{QHJAFGYD.js → 45JTE6T6.js} +1 -1
- package/dist/cdn/{4YKC4AKA.js → 4GJ5RYRM.js} +1 -1
- package/dist/cdn/{OPABFIJF.js → 4KL23L6P.js} +1 -1
- package/dist/cdn/{UMC6ABLD.js → 4PQXMF4A.js} +1 -1
- package/dist/cdn/{ZJNX357Y.js → 4SV7E3ZD.js} +1 -1
- package/dist/cdn/{KFUGSMJN.js → 5CCAKYX6.js} +1 -1
- package/dist/cdn/{RTEY5TE7.js → 5JFIU3CD.js} +1 -1
- package/dist/cdn/{VR35BMUS.js → 5KHKSIC2.js} +1 -1
- package/dist/cdn/{XBDVCWK7.js → 5MN7GMPJ.js} +1 -1
- package/dist/cdn/{DUGE5E4O.js → 5QLWQHNF.js} +1 -1
- package/dist/cdn/{OGCLMRGI.js → 5RR3QB66.js} +1 -1
- package/dist/cdn/{IVO4D5WT.js → 5X2OW77P.js} +1 -1
- package/dist/cdn/{DXSS645W.js → 5XHXX5PA.js} +1 -1
- package/dist/cdn/{7F3TEKMC.js → 5XWYCI3B.js} +1 -1
- package/dist/cdn/{SESFWPDV.js → 5Y2SYDFK.js} +1 -1
- package/dist/cdn/{KEZYSYTR.js → 6FCKHXZ4.js} +1 -1
- package/dist/cdn/{UICSO2JV.js → 6I5N7CGB.js} +1 -1
- package/dist/cdn/{YJJ2KXXT.js → 7CM3HVAM.js} +1 -1
- package/dist/cdn/{266C6B7L.js → 7WQHPXCF.js} +1 -1
- package/dist/cdn/{MN6DYH4C.js → ABSHFEHZ.js} +1 -1
- package/dist/cdn/{JSB33HO7.js → AG3J6KRW.js} +1 -1
- package/dist/cdn/{O7PXIGUT.js → AMIIMSFY.js} +1 -1
- package/dist/cdn/{4MLNKMPR.js → ATHKJ24A.js} +1 -1
- package/dist/cdn/{QHWS5UXA.js → AWST2IEV.js} +1 -1
- package/dist/cdn/{GRR24FYN.js → AXBS7YHA.js} +1 -1
- package/dist/cdn/{FPP7GZ6E.js → BDGHQZNT.js} +1 -1
- package/dist/cdn/{5GS6DQT3.js → BP3KQREU.js} +1 -1
- package/dist/cdn/{5SAPL7CN.js → CI3LNA6Y.js} +1 -1
- package/dist/cdn/{D65RYUME.js → D5W3HTAM.js} +1 -1
- package/dist/cdn/{E67DP4BP.js → D62MDZ5F.js} +1 -1
- package/dist/cdn/{HSWFA4KL.js → DDUWQSR5.js} +1 -1
- package/dist/cdn/{OYDHYCUL.js → EMBXSNKW.js} +1 -1
- package/dist/cdn/{EGZJYJJW.js → EUB5GIVH.js} +1 -1
- package/dist/cdn/{SK5TFGXO.js → EUMO5FFS.js} +1 -1
- package/dist/cdn/{2DQJ2I4Y.js → F3XZFJPM.js} +1 -1
- package/dist/cdn/{GXUK5C3W.js → FAZG45OT.js} +1 -1
- package/dist/cdn/{FOJVWJ6C.js → FD66DUJ7.js} +1 -1
- package/dist/cdn/{4VV4E4PU.js → FFK3DJRR.js} +1 -1
- package/dist/cdn/{TZSVZLNF.js → G7HRKB4C.js} +1 -1
- package/dist/cdn/{AOZONY26.js → G7MWSXRO.js} +1 -1
- package/dist/cdn/{R6NQQ7K3.js → HCPN3TCS.js} +1 -1
- package/dist/cdn/{SM3RGVKO.js → HPPMXUC7.js} +1 -1
- package/dist/cdn/{RP2QPWWQ.js → HQ3RO7HZ.js} +1 -1
- package/dist/cdn/{YR67WANP.js → HXVK2SXP.js} +1 -1
- package/dist/cdn/{CXHXX4VI.js → HZQWXFI2.js} +1 -1
- package/dist/cdn/{YOIBVBHZ.js → IA4LSBAJ.js} +1 -1
- package/dist/cdn/{IXZNUPKS.js → IAER2UAU.js} +1 -1
- package/dist/cdn/{5FYTW7Q4.js → IGILM3SL.js} +1 -1
- package/dist/cdn/{32MVCUVZ.js → JKP5CB3U.js} +1 -1
- package/dist/cdn/{YMQRXBCD.js → JP2ORECS.js} +1 -1
- package/dist/cdn/{C5X7D3B4.js → JQ7IKYXY.js} +1 -1
- package/dist/cdn/{ZBNWKVLJ.js → JTAQMLR4.js} +1 -1
- package/dist/cdn/{EX3FVXQA.js → JTZZ6FO4.js} +1 -1
- package/dist/cdn/{XZDKIB6T.js → K4ZM5XME.js} +1 -1
- package/dist/cdn/{3ONW33AA.js → KB4LXKB6.js} +1 -1
- package/dist/cdn/{JT7MEAER.js → KCHOBSCU.js} +1 -1
- package/dist/cdn/{IGVFN6O3.js → KCYU7DJT.js} +1 -1
- package/dist/cdn/{332ZKLGA.js → KLI5KRV5.js} +1 -1
- package/dist/cdn/{T7KULWHY.js → KWBN272K.js} +1 -1
- package/dist/cdn/{LBJTLSJL.js → KYEUWQD6.js} +1 -1
- package/dist/cdn/{2ZLM6QUA.js → LJOGD57I.js} +1 -1
- package/dist/cdn/{VKTSVO6N.js → LMDQ5VCE.js} +1 -1
- package/dist/cdn/{WHHT3DBR.js → MV5Y2LSX.js} +1 -1
- package/dist/cdn/{DWB5XJJ5.js → NA3IEDGS.js} +1 -1
- package/dist/cdn/{F4GJISXI.js → NBNMWXEU.js} +1 -1
- package/dist/cdn/{ONWQHRUW.js → O3CAGCNX.js} +1 -1
- package/dist/cdn/{MTAGASDB.js → O66EGRQK.js} +1 -1
- package/dist/cdn/{P7A62Q32.js → O6K2YZF4.js} +1 -1
- package/dist/cdn/{VWZV5HUY.js → OHLR7MKW.js} +1 -1
- package/dist/cdn/{P6B6VNYO.js → OTW2NWBL.js} +1 -1
- package/dist/cdn/{RQ6E3N5N.js → OW4HMHLS.js} +1 -1
- package/dist/cdn/{TFQRAUBW.js → PA2VEPJK.js} +1 -1
- package/dist/cdn/{3RW7ABF6.js → PSTGQVFG.js} +1 -1
- package/dist/cdn/{S74CLMSQ.js → PWGYJEL3.js} +1 -1
- package/dist/cdn/{UELBFRKC.js → PXTG7ABV.js} +1 -1
- package/dist/cdn/{KJIN3EBT.js → PY6CWYEI.js} +1 -1
- package/dist/cdn/{QPMJGVKH.js → Q4J2C66B.js} +1 -1
- package/dist/cdn/{IR2LIQEB.js → QAHGQKO4.js} +1 -1
- package/dist/cdn/{RE7H56HU.js → QCVMA222.js} +1 -1
- package/dist/cdn/{2YBB7MN2.js → QJEHQ7YA.js} +1 -1
- package/dist/cdn/{V5764UWN.js → QRDO6N2C.js} +1 -1
- package/dist/cdn/{MDUZG3GB.js → QXKTF2C5.js} +1 -1
- package/dist/cdn/{EBNU26IM.js → R2MLOWES.js} +1 -1
- package/dist/cdn/{SX7WZPAE.js → R4VBMXRU.js} +1 -1
- package/dist/cdn/{RNCNGVIF.js → RMHRXWD6.js} +1 -1
- package/dist/cdn/{C2C2XHNX.js → RPCLA5HS.js} +1 -1
- package/dist/cdn/{HSOVQWPY.js → RVUTGHRC.js} +1 -1
- package/dist/cdn/{NMBDGLXA.js → RY3EQEVF.js} +1 -1
- package/dist/cdn/{QZ2UDVXV.js → S6FPIBBB.js} +1 -1
- package/dist/cdn/{DOD7FRNY.js → SNFUEIAD.js} +1 -1
- package/dist/cdn/{LB7EAAGP.js → SPMORAEP.js} +1 -1
- package/dist/cdn/{HGMWBXA6.js → ST7ZDDBQ.js} +1 -1
- package/dist/cdn/{FK353KEJ.js → SVPVJGSK.js} +1 -1
- package/dist/cdn/{RFXTJ3XD.js → T2MR7D45.js} +1 -1
- package/dist/cdn/{UNB4IPAN.js → T2OUFIRX.js} +1 -1
- package/dist/cdn/{XTHKZFKL.js → T3EO6CFL.js} +1 -1
- package/dist/cdn/{ZPBCDUTD.js → TBLV4SNI.js} +1 -1
- package/dist/cdn/{GF32HNMV.js → THQ7E7DL.js} +1 -1
- package/dist/cdn/{3UAJT4ZL.js → U3SJENTN.js} +1 -1
- package/dist/cdn/{AAOVTCMB.js → UGMYVI5A.js} +1 -1
- package/dist/cdn/{KZDHO73C.js → UNLSW4SD.js} +1 -1
- package/dist/cdn/{ZVKMBNZW.js → UQ3PGORE.js} +1 -1
- package/dist/cdn/{H7DBKEAC.js → UX5ODKM3.js} +1 -1
- package/dist/cdn/{ZLC353RS.js → VBQ5OIO5.js} +1 -1
- package/dist/cdn/{5ZMVPAMA.js → VEHGPGPC.js} +1 -1
- package/dist/cdn/{2HICKZRY.js → VGIZUYRR.js} +1 -1
- package/dist/cdn/{V6YNWE5G.js → VGZE73WL.js} +1 -1
- package/dist/cdn/{OVDF2LTA.js → VNMFFP6N.js} +1 -1
- package/dist/cdn/{3PAJEHPF.js → VSF2M7IZ.js} +1 -1
- package/dist/cdn/{5WXCYI4E.js → VSHGI5YU.js} +1 -1
- package/dist/cdn/{3MJZVDEX.js → VTUWYRM6.js} +1 -1
- package/dist/cdn/{APTTKIUK.js → W3NXWDKD.js} +1 -1
- package/dist/cdn/{EYSUQHNA.js → W7VRTMG3.js} +1 -1
- package/dist/cdn/{K55YOIMI.js → WLSSSL5A.js} +1 -1
- package/dist/cdn/{IVBK6XYN.js → WOFBWRHW.js} +1 -1
- package/dist/cdn/{2KRA4MT3.js → WSQUFSSV.js} +1 -1
- package/dist/cdn/{2FAHHGBT.js → WUDDS5EE.js} +1 -1
- package/dist/cdn/{CMHGTY7Z.js → X2VTPZ2C.js} +1 -1
- package/dist/cdn/{YJYV5YC2.js → XKVBSCBE.js} +1 -1
- package/dist/cdn/{C72AKL73.js → XYKSWCIC.js} +1 -1
- package/dist/cdn/{ONSL6BXX.js → YMG56BXS.js} +1 -1
- package/dist/cdn/{ZZV4XD43.js → YVWGNXUX.js} +1 -1
- package/dist/cdn/{BT5M3VRT.js → Z6DK533T.js} +1 -1
- package/dist/cdn/{JGAQ7WI3.js → ZC4ET7MV.js} +1 -1
- package/dist/cdn/{WXISUG5Z.js → ZCC5VEEF.js} +1 -1
- package/dist/cdn/{CAAPPBSL.js → ZI3NPPIT.js} +1 -1
- package/dist/cdn/{ZND7DYSJ.js → ZKMJZ7YN.js} +1 -1
- package/dist/cdn/{S2JOZ7UT.js → ZN6FDJEL.js} +1 -1
- package/dist/cdn/{NDYF2A3V.js → ZNU4R72A.js} +1 -1
- package/dist/cdn/{SHZKKKAC.js → ZW33PDMU.js} +1 -1
- package/dist/cdn/{KVJUFKYF.js → ZXZ7JV6H.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/runtime.js +3 -3
- package/dist/components/calcite-meter/customElement.js +1 -1
- package/dist/components/calcite-stepper/customElement.d.ts +2 -2
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.css-custom-data.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +5 -5
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{c as m,d as k,e as y}from"./
|
|
2
|
+
import{c as m,d as k,e as y}from"./FFK3DJRR.js";import{a as E}from"./7WQHPXCF.js";import{a as f}from"./YMG56BXS.js";import{a as g}from"./RVUTGHRC.js";import"./RH6ZIP65.js";import"./PXTG7ABV.js";import"./QJEHQ7YA.js";import{t as p}from"./ZNU4R72A.js";import"./OAOQ5BXS.js";import{E as c,F as o,G as b,H as i,J as s,S as h,g as u,h as a,p as l}from"./XKVBSCBE.js";var C=u`: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:block}:host([scale=s]) .controls-wrapper{block-size:1.5rem}:host([scale=m]) .controls-wrapper{block-size:2rem}:host([scale=l]) .controls-wrapper{block-size:2.75rem}.wrapper{box-sizing:border-box;display:flex;justify-content:space-between;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;background-color:var(--calcite-inline-editable-background-color, var(--calcite-color-foreground-1))}.wrapper .input-wrapper{flex:1 1 0%}:host(:not([editing-enabled]):not([disabled])) .wrapper:hover{background-color:var(--calcite-inline-editable-background-color-hover, var(--calcite-color-foreground-2))}.controls-wrapper{display:flex}.cancel-editing-button[appearance=transparent][kind=neutral]{--calcite-internal-button-text-color: var(--calcite-color-text-3);--calcite-internal-button-border-block-start-color: var(--calcite-color-border-input);--calcite-internal-button-border-block-end-color: var(--calcite-color-border-input)}.cancel-editing-button[appearance=transparent][kind=neutral]:hover{--calcite-internal-button-text-color: var(--calcite-color-text-1)}.enable-editing-button--hidden{pointer-events:none;opacity:0;inline-size:0}.enable-editing-button[appearance=transparent][kind=neutral]{--calcite-internal-button-background-color: transparent}calcite-button{--calcite-button-background-color: var(--calcite-inline-editable-button-background-color);--calcite-button-corner-radius: var(--calcite-inline-editable-button-corner-radius);--calcite-button-loader-color: var(--calcite-inline-editable-button-loader-color);--calcite-button-text-color: var(--calcite-inline-editable-button-text-color)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,n={wrapper:"wrapper",confirmChangesButton:"confirm-changes-button",cancelEditingButton:"cancel-editing-button",inputWrapper:"input-wrapper",cancelEditingButtonWrapper:"cancel-editing-button-wrapper",enableEditingButton:"enable-editing-button",enableEditingButtonHidden:"enable-editing-button--hidden",controlsWrapper:"controls-wrapper"},r={check:"check",close:"x",pencil:"pencil"},d=class extends b{constructor(){super(),this.cancelEditingButtonRef=c(),this._editingEnabled=!1,this.enableEditingButtonRef=c(),this.messages=f(),this.focusSetter=g()(this),this.interactiveContainer=E(this),this.controls=!1,this.disabled=!1,this.loading=!1,this.scale="m",this.calciteInlineEditableEditCancel=l({cancelable:!1}),this.calciteInlineEditableEditConfirm=l({cancelable:!1}),this.calciteInternalInlineEditableEnableEditingChange=l({cancelable:!1}),this.listen("calciteInternalInputBlur",this.blurHandler)}static{this.properties={afterConfirm:[0,{},{attribute:!1}],controls:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],editingEnabled:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=C}get shouldShowControls(){return this.editingEnabled&&this.controls}get editingEnabled(){return this._editingEnabled}set editingEnabled(t){let e=this._editingEnabled;t!==e&&(this._editingEnabled=t,this.editingEnabledWatcher(t,e))}async setFocus(t){return this.focusSetter(()=>this.inputEl,t)}connectedCallback(){super.connectedCallback(),m(this)}disconnectedCallback(){super.disconnectedCallback(),k(this)}editingEnabledWatcher(t,e){this.inputEl&&(this.inputEl.editingEnabled=t),!t&&e&&(this.shouldEmitCancel=!0)}blurHandler(){this.controls||this.disableEditing()}async handleDefaultSlotChange(t){let e=p(t).filter(v=>v.matches("calcite-input"))[0];this.inputEl=e,e&&(await e.componentOnReady(),e.editingEnabled=this.editingEnabled,e.label=e.label||y(this))}onLabelClick(){this.setFocus()}enableEditing(){this.valuePriorToEditing=this.inputEl?.value,this.editingEnabled=!0,this.inputEl?.setFocus(),this.calciteInternalInlineEditableEnableEditingChange.emit()}disableEditing(){this.editingEnabled=!1}cancelEditing(){this.inputEl&&(this.inputEl.value=this.valuePriorToEditing),this.disableEditing(),this.enableEditingButtonRef.value?.setFocus(),!this.editingEnabled&&this.shouldEmitCancel&&this.calciteInlineEditableEditCancel.emit()}escapeKeyHandler(t){t.defaultPrevented||(t.key==="Escape"&&(t.preventDefault(),this.cancelEditing()),t.key==="Tab"&&this.shouldShowControls&&(!t.shiftKey&&t.target===this.inputEl&&(t.preventDefault(),this.cancelEditingButtonRef.value.setFocus()),t.shiftKey&&t.target===this.cancelEditingButtonRef.value&&(t.preventDefault(),this.inputEl?.setFocus())))}async cancelEditingHandler(t){t.preventDefault(),this.cancelEditing()}enableEditingHandler(t){this.disabled||t.target!==this.enableEditingButtonRef.value&&t.target!==this.inputEl||(t.preventDefault(),this.editingEnabled||this.enableEditing())}async confirmChangesHandler(t){t.preventDefault(),this.calciteInlineEditableEditConfirm.emit();try{this.afterConfirm&&(this.loading=!0,await this.afterConfirm(),this.disableEditing(),this.enableEditingButtonRef.value?.setFocus())}catch{}finally{this.loading=!1}}render(){return this.interactiveContainer({disabled:this.disabled,children:a`<div class=${i(n.wrapper)} @click=${this.enableEditingHandler} @keydown=${this.escapeKeyHandler}><div class=${i(n.inputWrapper)}><slot @slotchange=${this.handleDefaultSlotChange}></slot></div><div class=${i(n.controlsWrapper)}><calcite-button appearance=transparent class=${i({[n.enableEditingButton]:!0,[n.enableEditingButtonHidden]:this.editingEnabled})} .iconStart=${r.pencil} kind=neutral .label=${this.messages.enableEditing} @click=${this.enableEditingHandler} .scale=${this.scale} title=${this.messages.enableEditing??s} type=button ${o(this.enableEditingButtonRef)}></calcite-button>${this.shouldShowControls&&[a`<div class=${i(n.cancelEditingButtonWrapper)}><calcite-button appearance=transparent class=${i(n.cancelEditingButton)} .iconStart=${r.close} kind=neutral .label=${this.messages.cancelEditing} @click=${this.cancelEditingHandler} .scale=${this.scale} title=${this.messages.cancelEditing??s} type=button ${o(this.cancelEditingButtonRef)}></calcite-button></div>`,a`<calcite-button appearance=solid class=${i(n.confirmChangesButton)} .iconStart=${r.check} kind=brand .label=${this.messages.confirmChanges} .loading=${this.loading} @click=${this.confirmChangesHandler} .scale=${this.scale} title=${this.messages.confirmChanges??s} type=button></calcite-button>`]||""}</div></div>`})}};h("calcite-inline-editable",d);export{d as InlineEditable};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as p}from"./ENDXE7YY.js";import{a as g}from"./
|
|
2
|
+
import{a as p}from"./ENDXE7YY.js";import{a as g}from"./RVUTGHRC.js";import"./RH6ZIP65.js";import"./PXTG7ABV.js";import"./QJEHQ7YA.js";import{z as w}from"./ZNU4R72A.js";import"./OAOQ5BXS.js";import{E as d,F as m,G as f,H as h,S as u,g as c,h as l}from"./XKVBSCBE.js";var n={frame:"frame",frameAdvancing:"frame--advancing",frameRetreating:"frame--retreating"},b=c`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{position:relative;display:flex;inline-size:100%;flex:1 1 auto;align-items:stretch;overflow:hidden;background-color:transparent}:host .frame{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;padding:0;animation-name:none;animation-duration:var(--calcite-animation-timing);background-color:var(--calcite-flow-background-color)}:host ::slotted(*){display:none;block-size:100%}:host ::slotted(*[selected]){display:flex}:host .frame--advancing{animation-name:calcite-frame-advance}:host .frame--retreating{animation-name:calcite-frame-retreat}@keyframes calcite-frame-advance{0%{--tw-bg-opacity: .5;transform:translate3d(50px,0,0)}to{--tw-bg-opacity: 1;transform:translateZ(0)}}@keyframes calcite-frame-retreat{0%{--tw-bg-opacity: .5;transform:translate3d(-50px,0,0)}to{--tw-bg-opacity: 1;transform:translateZ(0)}}:host([hidden]){display:none}[hidden]{display:none}`,r=class extends f{constructor(){super(),this.frameRef=d(),this.itemMutationObserver=p("mutation",()=>this.updateItemsAndProps()),this.items=[],this.selectedIndex=-1,this.focusSetter=g()(this),this.flowDirection="standby",this.listen("calciteInternalFlowItemChange",this.handleCalciteInternalFlowItemChange),this.listen("calciteFlowItemBack",this.handleItemBackClick)}static{this.properties={flowDirection:[16,{},{state:!0}],customItemSelectors:1}}static{this.styles=b}async back(){let{items:e,selectedIndex:i}=this,t=e[i],a=e[i-1];if(!t||!a)return;let s=t.beforeBack?t.beforeBack:()=>Promise.resolve();try{await s.call(t)}catch{return}return t.selected=!1,a.selected=!0,a}async setFocus(e){return this.focusSetter(()=>this.items[this.selectedIndex],e)}connectedCallback(){super.connectedCallback(),this.itemMutationObserver?.observe(this.el,{childList:!0,subtree:!0})}willUpdate(e){e.has("flowDirection")&&(this.hasUpdated||this.flowDirection!=="standby")&&this.handleFlowDirectionChange(this.flowDirection)}loaded(){this.updateItemsAndProps()}disconnectedCallback(){super.disconnectedCallback(),this.itemMutationObserver?.disconnect()}async handleFlowDirectionChange(e){e==="standby"||!this.frameRef.value||(await w(this.frameRef.value,e==="retreating"?"calcite-frame-retreat":"calcite-frame-advance"),this.resetFlowDirection())}handleCalciteInternalFlowItemChange(e){e.stopPropagation(),this.updateFlowProps()}async handleItemBackClick(e){if(!e.defaultPrevented)return await this.back(),this.setFocus()}resetFlowDirection(){this.flowDirection="standby"}getFlowDirection(e,i){let t=e>0;return!(e>-1&&i>0)&&!t?"standby":i<e?"retreating":"advancing"}updateItemsAndProps(){let{customItemSelectors:e,el:i}=this,t=Array.from(i.querySelectorAll(`calcite-flow-item${e?`,${e}`:""}`)).filter(a=>a.closest("calcite-flow")===i);this.items=t,this.ensureSelectedFlowItemExists(),this.updateFlowProps()}updateFlowProps(){let{selectedIndex:e,items:i}=this,t=this.findSelectedFlowItemIndex(i);i.forEach((a,s)=>{let o=s===t;o||(a.menuOpen=!1),a.showBackButton=o&&t>0}),t!==-1&&(e!==t&&(this.flowDirection=this.getFlowDirection(e,t)),this.selectedIndex=t)}findSelectedFlowItemIndex(e){let i=e.slice(0).reverse().find(t=>!!t.selected);return e.indexOf(i)}ensureSelectedFlowItemExists(){let{items:e}=this;if(this.findSelectedFlowItemIndex(e)!==-1)return;let t=e[e.length-1];t&&(t.selected=!0)}render(){let{flowDirection:e}=this,i={[n.frame]:!0,[n.frameAdvancing]:e==="advancing",[n.frameRetreating]:e==="retreating"};return l`<div class=${h(i)} ${m(this.frameRef)}><slot></slot></div>`}};u("calcite-flow",r);export{r as Flow};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as S,b as T,d as O}from"./QZ2UDVXV.js";import{a as D}from"./266C6B7L.js";import{a as b}from"./H7DBKEAC.js";import{a as B}from"./ENDXE7YY.js";import{a as L}from"./ONSL6BXX.js";import{a as i,b as H}from"./G52BPUIA.js";import{a as F}from"./HSOVQWPY.js";import{a as R}from"./RH6ZIP65.js";import"./UELBFRKC.js";import"./2YBB7MN2.js";import"./NDYF2A3V.js";import{a as I}from"./OAOQ5BXS.js";import{E as g,F as h,G as C,H as a,J as l,S as E,g as w,h as e}from"./YJYV5YC2.js";var j=w`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-action-font-size: var(--calcite-font-size--2);--calcite-internal-action-height: var(--calcite-size-sm);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-font-size: var(--calcite-font-size--1);--calcite-internal-action-height: var(--calcite-size-md);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-font-size: var(--calcite-font-size-0);--calcite-internal-action-height: var(--calcite-size-lg);--calcite-internal-action-line-height: 1.25rem;--calcite-internal-action-spacing: var(--calcite-spacing-sm-plus)}:host{display:flex;cursor:pointer;background-color:transparent;--calcite-internal-action-text-color: var(--calcite-color-text-3);border-radius:var(--calcite-action-corner-radius, var(--calcite-action-corner-radius-start-start, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-start-end, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-end-end, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-end-start, var(--calcite-corner-radius-xs)))}.interaction-container{border-radius:inherit}:host([width=full]){flex:1 0 auto}:host([width=full]) .button{justify-content:center}:host([width=full]) .button .text-container--visible{flex:none}:host([drag-handle]){cursor:move;--calcite-internal-action-text-color: var(--calcite-color-border-input);--calcite-internal-action-padding-inline: var(--calcite-spacing-xxs)}.button{position:relative;margin:0;display:flex;inline-size:auto;align-items:center;justify-content:flex-start;border-style:none;outline-color:transparent;background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1));border-radius:inherit;color:var(--calcite-action-text-color, var(--calcite-internal-action-text-color));cursor:inherit;flex:1 0 auto;font-family:inherit;font-size:var(--calcite-internal-action-font-size);font-weight:var(--calcite-font-weight-normal);line-height:var(--calcite-internal-action-line-height);min-block-size:var(--calcite-internal-action-height);padding-block:var(--calcite-internal-action-padding-block, var(--calcite-internal-action-spacing));padding-inline:var(--calcite-internal-action-padding-inline, var(--calcite-internal-action-spacing));text-align:start}.button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-action-text-color-press, var(--calcite-action-text-color-pressed, var(--calcite-color-text-1)))}.button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3)))}.button--text-visible{gap:var(--calcite-internal-action-spacing);inline-size:100%}.icon-container{pointer-events:none;margin:0;display:flex;align-items:center;justify-content:center}.text-container{margin:0;inline-size:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:0;transition-property:opacity;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:inline-size}.text-container--visible{inline-size:auto;flex:1 1 auto;opacity:1}:host([active]) .button{background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-3));color:var(--calcite-action-text-color-press, var(--calcite-action-text-color-pressed, var(--calcite-color-text-1)))}:host([active]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-foreground-3))}:host([active]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3)))}:host([loading]) .button:hover,:host([loading]) .button:focus{background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1))}:host([loading]) calcite-loader[inline]{margin-inline-end:0px}:host([appearance=transparent]):host([active]) .button{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-transparent-press)))}:host([appearance=transparent]) .button{transition-property:box-shadow;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);background-color:var(--calcite-action-background-color, var(--calcite-color-transparent))}:host([appearance=transparent]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-transparent-hover))}:host([appearance=transparent]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-transparent-press)))}:host([selection-appearance=highlight]):host([active]) .button{background-color:var(--calcite-color-surface-highlight);color:var(--calcite-color-text-highlight)}:host([active-descendant]) .button{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([alignment=center]) .button{justify-content:center}:host([alignment=end]) .button{justify-content:flex-end}:host([alignment=center]) .button .text-container--visible,:host([alignment=end]) .button .text-container--visible{flex:0 1 auto}:host([scale=s][compact]) .button,:host([scale=m][compact]) .button,:host([scale=l][compact]) .button{padding-inline:0px}.slot-container{display:flex}.slot-container--hidden{display:none}.indicator-with-icon{position:relative}.indicator-with-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}.indicator-without-icon{margin-inline:.25rem;inline-size:1rem;position:relative}.indicator-without-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}:host([scale=s]) .indicator-with-icon{position:relative}:host([scale=s]) .indicator-with-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.125rem;inset-inline-end:-.125rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand));block-size:.375rem;inline-size:.375rem}:host([scale=s]) .indicator-without-icon{position:relative}:host([scale=s]) .indicator-without-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.175rem;inset-inline-end:-.175rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand));block-size:.375rem;inline-size:.375rem}.indicator-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,x=class extends C{constructor(){super(...arguments),this.guid=I(),this.buttonRef=g(),this.buttonId=H.button(this.guid),this.mutationObserver=B("mutation",()=>this.requestUpdate()),this.messages=L({blocking:!0}),this.focusSetter=F()(this),this.indicatorRef=g(),this.interactiveContainer=D(this),this.active=!1,this.activeDescendant=!1,this.appearance="transparent",this.compact=!1,this.disabled=!1,this.dragHandle=!1,this.iconFlipRtl=!1,this.indicator=!1,this.loading=!1,this.scale="m",this.width="auto",this.textEnabled=!1,this.type="button"}static{this.properties={aria:[0,{},{attribute:!1}],active:[7,{},{reflect:!0,type:Boolean}],activeDescendant:[7,{},{reflect:!0,type:Boolean}],alignment:[3,{},{reflect:!0}],appearance:[3,{},{reflect:!0}],compact:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],indicator:[7,{},{reflect:!0,type:Boolean}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}],text:1,textEnabled:[7,{},{reflect:!0,type:Boolean}],type:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.styles=j}async setFocus(t){return this.focusSetter(()=>this.buttonRef.value,t)}connectedCallback(){super.connectedCallback(),this.formEl=O(this),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectedCallback(){super.disconnectedCallback(),this.formEl=null,this.mutationObserver?.disconnect()}handleClick(){let{type:t}=this;t==="submit"?S(this):t==="reset"&&T(this)}renderTextContainer(){let{text:t,textEnabled:o}=this,n={[i.textContainer]:!0,[i.textContainerVisible]:o};return t?b("text-container",e`<div class=${a(n)}>${t}</div>`):null}renderIndicatorText(){let{indicator:t,messages:o,buttonId:n}=this;return e`<div aria-labelledby=${n??l} aria-live=polite class=${a(i.indicatorText)} role=region ${h(this.indicatorRef)}>${t?o.indicator:null}</div>`}renderIconContainer(){let{loading:t,icon:o,scale:n,el:s,iconFlipRtl:p,indicator:v}=this,m=n==="l"?"l":"m",r=t?e`<calcite-loader inline .label=${this.messages.loading} .scale=${m}></calcite-loader>`:null,d=o?e`<calcite-icon class=${a({[i.indicatorWithIcon]:v})} .flipRtl=${p} .icon=${o} .scale=${R(this.scale)}></calcite-icon>`:null,c=r||d,f=c||s.children?.length,u=e`<div class=${a({[i.slotContainer]:!0,[i.slotContainerHidden]:t})}><slot></slot></div>`;return f?b("icon-container",e`<div aria-hidden=true class=${a(i.iconContainer)}>${c}${u}</div>`):null}renderButton(){let{compact:t,disabled:o,icon:n,loading:s,textEnabled:p,label:v,text:m,indicator:r,indicatorRef:d,buttonId:c,messages:f}=this,u=v||m||"",k=r?f.indicatorLabel.replace("{label}",u):u,y={[i.button]:!0,[i.buttonTextVisible]:p,[i.buttonCompact]:t},$=e`${this.renderIconContainer()}${this.renderTextContainer()}${!n&&r&&b("indicator-no-icon",e`<div class=${a(i.indicatorWithoutIcon)}></div>`)||""}`,P=r&&d.value?[d.value]:[],z=[...this.aria?.controlsElements??[],...P];return this.dragHandle?e`<span .ariaBusy=${s} .ariaControlsElements=${z} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabel=${k} .ariaLabelledByElements=${this.aria?.labelledByElements} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${a(y)} id=${c??l} role=button tabindex=${(this.disabled?null:0)??l} ${h(this.buttonRef)}>${$}</span>`:e`<button .ariaBusy=${s} .ariaChecked=${this.aria?.checked} .ariaControlsElements=${z} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabel=${k} .ariaLabelledByElements=${this.aria?.labelledByElements} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${a(y)} .disabled=${o} id=${c??l} @click=${this.handleClick} .role=${this.aria?.role} ${h(this.buttonRef)}>${$}</button>`}render(){return this.interactiveContainer({disabled:this.disabled,children:e`${this.renderButton()}${this.renderIndicatorText()}`})}};E("calcite-action",x);export{x as Action};
|
|
2
|
+
import{a as S,b as T,d as O}from"./S6FPIBBB.js";import{a as D}from"./7WQHPXCF.js";import{a as b}from"./UX5ODKM3.js";import{a as B}from"./ENDXE7YY.js";import{a as L}from"./YMG56BXS.js";import{a as i,b as H}from"./G52BPUIA.js";import{a as F}from"./RVUTGHRC.js";import{a as R}from"./RH6ZIP65.js";import"./PXTG7ABV.js";import"./QJEHQ7YA.js";import"./ZNU4R72A.js";import{a as I}from"./OAOQ5BXS.js";import{E as g,F as h,G as C,H as a,J as l,S as E,g as w,h as e}from"./XKVBSCBE.js";var j=w`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-action-font-size: var(--calcite-font-size--2);--calcite-internal-action-height: var(--calcite-size-sm);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-font-size: var(--calcite-font-size--1);--calcite-internal-action-height: var(--calcite-size-md);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-font-size: var(--calcite-font-size-0);--calcite-internal-action-height: var(--calcite-size-lg);--calcite-internal-action-line-height: 1.25rem;--calcite-internal-action-spacing: var(--calcite-spacing-sm-plus)}:host{display:flex;cursor:pointer;background-color:transparent;--calcite-internal-action-text-color: var(--calcite-color-text-3);border-radius:var(--calcite-action-corner-radius, var(--calcite-action-corner-radius-start-start, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-start-end, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-end-end, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-end-start, var(--calcite-corner-radius-xs)))}.interaction-container{border-radius:inherit}:host([width=full]){flex:1 0 auto}:host([width=full]) .button{justify-content:center}:host([width=full]) .button .text-container--visible{flex:none}:host([drag-handle]){cursor:move;--calcite-internal-action-text-color: var(--calcite-color-border-input);--calcite-internal-action-padding-inline: var(--calcite-spacing-xxs)}.button{position:relative;margin:0;display:flex;inline-size:auto;align-items:center;justify-content:flex-start;border-style:none;outline-color:transparent;background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1));border-radius:inherit;color:var(--calcite-action-text-color, var(--calcite-internal-action-text-color));cursor:inherit;flex:1 0 auto;font-family:inherit;font-size:var(--calcite-internal-action-font-size);font-weight:var(--calcite-font-weight-normal);line-height:var(--calcite-internal-action-line-height);min-block-size:var(--calcite-internal-action-height);padding-block:var(--calcite-internal-action-padding-block, var(--calcite-internal-action-spacing));padding-inline:var(--calcite-internal-action-padding-inline, var(--calcite-internal-action-spacing));text-align:start}.button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-action-text-color-press, var(--calcite-action-text-color-pressed, var(--calcite-color-text-1)))}.button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3)))}.button--text-visible{gap:var(--calcite-internal-action-spacing);inline-size:100%}.icon-container{pointer-events:none;margin:0;display:flex;align-items:center;justify-content:center}.text-container{margin:0;inline-size:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:0;transition-property:opacity;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:inline-size}.text-container--visible{inline-size:auto;flex:1 1 auto;opacity:1}:host([active]) .button{background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-3));color:var(--calcite-action-text-color-press, var(--calcite-action-text-color-pressed, var(--calcite-color-text-1)))}:host([active]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-foreground-3))}:host([active]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3)))}:host([loading]) .button:hover,:host([loading]) .button:focus{background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1))}:host([loading]) calcite-loader[inline]{margin-inline-end:0px}:host([appearance=transparent]):host([active]) .button{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-transparent-press)))}:host([appearance=transparent]) .button{transition-property:box-shadow;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);background-color:var(--calcite-action-background-color, var(--calcite-color-transparent))}:host([appearance=transparent]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-transparent-hover))}:host([appearance=transparent]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-transparent-press)))}:host([selection-appearance=highlight]):host([active]) .button{background-color:var(--calcite-color-surface-highlight);color:var(--calcite-color-text-highlight)}:host([active-descendant]) .button{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([alignment=center]) .button{justify-content:center}:host([alignment=end]) .button{justify-content:flex-end}:host([alignment=center]) .button .text-container--visible,:host([alignment=end]) .button .text-container--visible{flex:0 1 auto}:host([scale=s][compact]) .button,:host([scale=m][compact]) .button,:host([scale=l][compact]) .button{padding-inline:0px}.slot-container{display:flex}.slot-container--hidden{display:none}.indicator-with-icon{position:relative}.indicator-with-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}.indicator-without-icon{margin-inline:.25rem;inline-size:1rem;position:relative}.indicator-without-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}:host([scale=s]) .indicator-with-icon{position:relative}:host([scale=s]) .indicator-with-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.125rem;inset-inline-end:-.125rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand));block-size:.375rem;inline-size:.375rem}:host([scale=s]) .indicator-without-icon{position:relative}:host([scale=s]) .indicator-without-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.175rem;inset-inline-end:-.175rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand));block-size:.375rem;inline-size:.375rem}.indicator-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,x=class extends C{constructor(){super(...arguments),this.guid=I(),this.buttonRef=g(),this.buttonId=H.button(this.guid),this.mutationObserver=B("mutation",()=>this.requestUpdate()),this.messages=L({blocking:!0}),this.focusSetter=F()(this),this.indicatorRef=g(),this.interactiveContainer=D(this),this.active=!1,this.activeDescendant=!1,this.appearance="transparent",this.compact=!1,this.disabled=!1,this.dragHandle=!1,this.iconFlipRtl=!1,this.indicator=!1,this.loading=!1,this.scale="m",this.width="auto",this.textEnabled=!1,this.type="button"}static{this.properties={aria:[0,{},{attribute:!1}],active:[7,{},{reflect:!0,type:Boolean}],activeDescendant:[7,{},{reflect:!0,type:Boolean}],alignment:[3,{},{reflect:!0}],appearance:[3,{},{reflect:!0}],compact:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],indicator:[7,{},{reflect:!0,type:Boolean}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}],text:1,textEnabled:[7,{},{reflect:!0,type:Boolean}],type:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.styles=j}async setFocus(t){return this.focusSetter(()=>this.buttonRef.value,t)}connectedCallback(){super.connectedCallback(),this.formEl=O(this),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectedCallback(){super.disconnectedCallback(),this.formEl=null,this.mutationObserver?.disconnect()}handleClick(){let{type:t}=this;t==="submit"?S(this):t==="reset"&&T(this)}renderTextContainer(){let{text:t,textEnabled:o}=this,n={[i.textContainer]:!0,[i.textContainerVisible]:o};return t?b("text-container",e`<div class=${a(n)}>${t}</div>`):null}renderIndicatorText(){let{indicator:t,messages:o,buttonId:n}=this;return e`<div aria-labelledby=${n??l} aria-live=polite class=${a(i.indicatorText)} role=region ${h(this.indicatorRef)}>${t?o.indicator:null}</div>`}renderIconContainer(){let{loading:t,icon:o,scale:n,el:s,iconFlipRtl:p,indicator:v}=this,m=n==="l"?"l":"m",r=t?e`<calcite-loader inline .label=${this.messages.loading} .scale=${m}></calcite-loader>`:null,d=o?e`<calcite-icon class=${a({[i.indicatorWithIcon]:v})} .flipRtl=${p} .icon=${o} .scale=${R(this.scale)}></calcite-icon>`:null,c=r||d,f=c||s.children?.length,u=e`<div class=${a({[i.slotContainer]:!0,[i.slotContainerHidden]:t})}><slot></slot></div>`;return f?b("icon-container",e`<div aria-hidden=true class=${a(i.iconContainer)}>${c}${u}</div>`):null}renderButton(){let{compact:t,disabled:o,icon:n,loading:s,textEnabled:p,label:v,text:m,indicator:r,indicatorRef:d,buttonId:c,messages:f}=this,u=v||m||"",k=r?f.indicatorLabel.replace("{label}",u):u,y={[i.button]:!0,[i.buttonTextVisible]:p,[i.buttonCompact]:t},$=e`${this.renderIconContainer()}${this.renderTextContainer()}${!n&&r&&b("indicator-no-icon",e`<div class=${a(i.indicatorWithoutIcon)}></div>`)||""}`,P=r&&d.value?[d.value]:[],z=[...this.aria?.controlsElements??[],...P];return this.dragHandle?e`<span .ariaBusy=${s} .ariaControlsElements=${z} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabel=${k} .ariaLabelledByElements=${this.aria?.labelledByElements} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${a(y)} id=${c??l} role=button tabindex=${(this.disabled?null:0)??l} ${h(this.buttonRef)}>${$}</span>`:e`<button .ariaBusy=${s} .ariaChecked=${this.aria?.checked} .ariaControlsElements=${z} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabel=${k} .ariaLabelledByElements=${this.aria?.labelledByElements} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${a(y)} .disabled=${o} id=${c??l} @click=${this.handleClick} .role=${this.aria?.role} ${h(this.buttonRef)}>${$}</button>`}render(){return this.interactiveContainer({disabled:this.disabled,children:e`${this.renderButton()}${this.renderIndicatorText()}`})}};E("calcite-action",x);export{x as Action};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as d}from"./UM6KICQF.js";import{a as n}from"./ENDXE7YY.js";import{G as l,H as i,S as c,g as o,h as t,p as r}from"./
|
|
2
|
+
import{a as d}from"./UM6KICQF.js";import{a as n}from"./ENDXE7YY.js";import{G as l,H as i,S as c,g as o,h as t,p as r}from"./XKVBSCBE.js";var s={title:"title",firstTitle:"first-title",separator:"separator"},h=o`:host{display:block}.container{text-align:start}.title{margin-block-end:-1px;display:block;cursor:default;overflow-wrap:break-word;border-width:0px;font-weight:var(--calcite-font-weight-bold);color:var(--calcite-dropdown-group-title-text-color, var(--calcite-color-text-1))}.separator{display:block;block-size:1px;background-color:var(--calcite-dropdown-group-border-color, var(--calcite-color-border-3))}:host([scale=s]){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}:host([scale=s]) .title{padding-block:var(--calcite-spacing-xxs);padding-inline:var(--calcite-spacing-sm)}:host([scale=s]) .first-title{padding-block-start:var(--calcite-spacing-sm)}:host([scale=s]) .separator{margin-block:var(--calcite-spacing-xxs);margin-inline:var(--calcite-spacing-sm)}:host([scale=m]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=m]) .title{padding-block:var(--calcite-spacing-sm);padding-inline:var(--calcite-spacing-md)}:host([scale=m]) .first-title{padding-block-start:var(--calcite-spacing-lg)}:host([scale=m]) .separator{margin-block:var(--calcite-spacing-sm);margin-inline:var(--calcite-spacing-md)}:host([scale=l]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=l]) .title{padding-block:var(--calcite-spacing-sm-plus);padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .first-title{padding-block-start:var(--calcite-spacing-xl)}:host([scale=l]) .separator{margin-block:var(--calcite-spacing-sm-plus);margin-inline:var(--calcite-spacing-lg)}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends l{constructor(){super(),this.mutationObserver=n("mutation",()=>this.updateItems()),this.position=-1,this.scale="m",this.selectionMode="single",this.calciteInternalDropdownItemChange=r({cancelable:!1}),this.listen("calciteInternalDropdownItemSelect",this.updateActiveItemOnChange)}static{this.properties={groupTitle:[3,{},{reflect:!0}],position:[9,{},{type:Number}],scale:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=h}connectedCallback(){super.connectedCallback(),this.updateItems(),this.mutationObserver?.observe(this.el,{childList:!0})}willUpdate(e){e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="single")&&this.updateItems()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}updateActiveItemOnChange(e){this.requestedDropdownGroup=e.detail.requestedDropdownGroup,this.requestedDropdownItem=e.detail.requestedDropdownItem,this.calciteInternalDropdownItemChange.emit({requestedDropdownGroup:this.requestedDropdownGroup,requestedDropdownItem:this.requestedDropdownItem})}updateItems(){Array.from(this.el.querySelectorAll("calcite-dropdown-item")).forEach(e=>e.selectionMode=this.selectionMode)}render(){let e=this.groupTitle?t`<span aria-hidden=true class=${i({[s.title]:!0,[s.firstTitle]:this.position===0})}>${this.groupTitle}</span>`:null,p=this.position>0?t`<div class=${i(s.separator)} role=separator></div>`:null;return this.el.ariaLabel=this.groupTitle,this.el.role="group",t`<div class=${i({[d.container]:!0})}>${p}${e}<slot></slot></div>`}};c("calcite-dropdown-group",a);export{a as DropdownGroup};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as M,b as P}from"./WJXZ7BPV.js";import{a as y}from"./
|
|
2
|
+
import{a as M,b as P}from"./WJXZ7BPV.js";import{a as y}from"./7WQHPXCF.js";import{a as A}from"./UGMYVI5A.js";import{a as G}from"./AP2LDRUV.js";import{a as S}from"./ENDXE7YY.js";import{a as x}from"./RVUTGHRC.js";import"./RH6ZIP65.js";import"./PXTG7ABV.js";import"./QJEHQ7YA.js";import{f as C,t as D}from"./ZNU4R72A.js";import{a as O}from"./OAOQ5BXS.js";import{G as I,H as h,N as E,S as B,g as k,h as u,p as d}from"./XKVBSCBE.js";function p(c){return c.tagName==="CALCITE-BLOCK"}var m={container:"container",groupContainer:"group-container",scrim:"scrim",assistiveText:"assistive-text"},b="calcite-block-group",f="calcite-block",H=k`: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:block}.container{position:relative}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`;function T(c){c.forEach(e=>{e.setPosition=c.indexOf(e)+1,e.setSize=c.length})}var g=class extends I{constructor(){super(),this.dragSelector=f,this.handleSelector="calcite-sort-handle",this.mutationObserver=S("mutation",()=>{this.updateBlockItemsDebounced()}),this.blockAndGroups=[],this.cancelable=A()(this),this.focusSetter=x()(this),this.updateBlockItemsDebounced=G(this.updateBlockItems,E.nextTick),this.interactiveContainer=y(this),this.sortHandleMenuItems=[],this.disabled=!1,this.dragEnabled=!1,this.loading=!1,this.scale="m",this.sortDisabled=!1,this.calciteBlockGroupDragEnd=d({cancelable:!1}),this.calciteBlockGroupDragStart=d({cancelable:!1}),this.calciteBlockGroupMoveHalt=d({cancelable:!1}),this.calciteBlockGroupOrderChange=d({cancelable:!1}),this.listen("calciteInternalAssistiveTextChange",this.handleCalciteInternalAssistiveTextChange),this.listen("calciteBlockSortHandleBeforeOpen",this.updateBlockItemsDebounced),this.listen("calciteSortHandleReorder",this.handleSortReorder),this.listen("calciteSortHandleMove",this.handleSortMove),this.listen("calciteSortHandleAdd",this.handleSortAdd)}static{this.properties={assistiveText:[16,{},{state:!0}],sortHandleMenuItems:[16,{},{state:!0}],canPull:[0,{},{attribute:!1}],canPut:[0,{},{attribute:!1}],disabled:[7,{},{reflect:!0,type:Boolean}],dragEnabled:[7,{},{reflect:!0,type:Boolean}],group:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],sortDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=H}emitOrderChangeEvent(e){this.calciteBlockGroupOrderChange.emit(e)}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),this.connectObserver(),this.updateBlockItemsDebounced(),this.setUpSorting(),this.setParentBlockGroup(),this.cancelable.add(this.updateBlockItemsDebounced)}willUpdate(e){(e.has("group")||e.has("canPull")&&this.hasUpdated||e.has("canPut")&&this.hasUpdated||e.has("dragEnabled")&&(this.hasUpdated||this.dragEnabled!==!1)||e.has("sortDisabled")&&(this.hasUpdated||this.sortDisabled!==!1))&&this.updateBlockItemsDebounced(),e.has("scale")&&this.hasUpdated&&this.updateBlockAndGroupScale()}disconnectedCallback(){super.disconnectedCallback(),this.disconnectObserver(),P(this)}updateBlockItems(){this.updateGroupItems();let{dragEnabled:e,el:a,sortDisabled:t,sortHandleMenuItems:o}=this,s=Array.from(this.el.querySelectorAll(f)),l=a,n=Array.from(l.children).filter(p);s.forEach(r=>{r.closest(b)===a&&(r.moveToItems=o.filter(i=>this.validateSortMenuItem({type:"move",fromEl:l,toEl:i.element,dragEl:r,newIndex:0,oldIndex:n.indexOf(r)})),r.addToItems=this.sortHandleMenuItems.filter(i=>this.validateSortMenuItem({type:"add",fromEl:l,toEl:i.element,dragEl:r,newIndex:0,oldIndex:n.indexOf(r)})),r.dragHandle=e,r.sortDisabled=t)}),this.setUpSorting()}updateGroupItems(){let{el:e,group:a}=this,t=C(e),o=a?Array.from(t.querySelectorAll(`${b}[group="${a}"]`)).filter(s=>!s.disabled&&s.dragEnabled):[];this.sortHandleMenuItems=o.map(s=>({element:s,label:s.label??s.id,id:O()}))}handleCalciteInternalAssistiveTextChange(e){this.assistiveText=e.detail.message,e.stopPropagation()}handleSortReorder(e){this.parentBlockGroupEl||e.defaultPrevented||(e.preventDefault(),this.handleReorder(e))}handleSortAdd(e){this.parentBlockGroupEl||e.defaultPrevented||(e.preventDefault(),this.handleAdd(e))}handleSortMove(e){this.parentBlockGroupEl||e.defaultPrevented||(e.preventDefault(),this.handleMove(e))}connectObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectObserver(){this.mutationObserver?.disconnect()}setUpSorting(){let{dragEnabled:e}=this;e&&M(this)}onGlobalDragStart(){this.disconnectObserver()}onGlobalDragEnd(){this.connectObserver()}onDragEnd(e){this.calciteBlockGroupDragEnd.emit(e)}onDragStart(e){e.dragEl.sortHandleOpen=!1,this.calciteBlockGroupDragStart.emit(e)}onDragSort(e){this.setParentBlockGroup(),this.updateBlockItemsDebounced(),this.calciteBlockGroupOrderChange.emit(e)}setParentBlockGroup(){this.parentBlockGroupEl=this.el.parentElement?.closest(b)}handleDefaultSlotChange(e){let a=[];this.blockAndGroups=D(e).filter(t=>(t.matches(f)&&a.push(t),t.matches(f)||t.matches(b))),T(a),this.updateBlockAndGroupScale()}updateBlockAndGroupScale(){this.blockAndGroups.forEach(e=>{e.scale=this.scale})}validateSortMenuItem({fromEl:e,toEl:a,dragEl:t,newIndex:o,oldIndex:s,type:l}){if(!e||!a||a===e||t.contains(a))return!1;let n=e.canPull?.({toEl:a,fromEl:e,dragEl:t,newIndex:o,oldIndex:s})??!0,r=a.canPut?.({toEl:a,fromEl:e,dragEl:t,newIndex:o,oldIndex:s})??!0;return(l==="add"?n==="clone":n===!0)&&r}handleAdd(e){let{addTo:a}=e.detail,t=e.target,o=t?.parentElement,s=a.element,n=Array.from(o.children).filter(p).indexOf(t),r=0;if(!this.validateSortMenuItem({type:"add",fromEl:o,toEl:s,dragEl:t,newIndex:r,oldIndex:n}))return;t.sortHandleOpen=!1,this.disconnectObserver();let i=t.cloneNode();s.prepend(i),this.updateBlockItemsDebounced(),this.connectObserver();let v={dragEl:t,fromEl:o,toEl:s,newIndex:r,oldIndex:n};this.calciteBlockGroupOrderChange.emit(v),s.emitOrderChangeEvent(v)}handleMove(e){let{moveTo:a}=e.detail,t=e.target,o=t?.parentElement,s=a.element,n=Array.from(o.children).filter(p).indexOf(t),r=0;if(!this.validateSortMenuItem({type:"move",fromEl:o,toEl:s,dragEl:t,newIndex:r,oldIndex:n}))return;t.sortHandleOpen=!1,this.disconnectObserver(),s.prepend(t),this.updateBlockItemsDebounced(),this.connectObserver();let i={dragEl:t,fromEl:o,toEl:s,newIndex:r,oldIndex:n};this.calciteBlockGroupOrderChange.emit(i),s.emitOrderChangeEvent(i)}handleReorder(e){let{reorder:a}=e.detail,t=e.target,o=t?.parentElement;if(!o)return;t.sortHandleOpen=!1;let s=Array.from(o.children).filter(p),l=s.length-1,n=s.indexOf(t),r=n;switch(a){case"top":r=0;break;case"bottom":r=l;break;case"up":r=n===0?0:n-1;break;case"down":r=n===l?l:n+1;break}this.disconnectObserver();let i=a==="up"||a==="top"?s[r]:s[r].nextSibling;o.insertBefore(t,i),this.updateBlockItemsDebounced(),this.connectObserver(),this.calciteBlockGroupOrderChange.emit({dragEl:t,fromEl:o,toEl:o,newIndex:r,oldIndex:n})}render(){let{loading:e,label:a}=this;return this.interactiveContainer({disabled:this.disabled,children:u`<div class=${h(m.container)}>${this.dragEnabled?u`<span aria-live=assertive class=${h(m.assistiveText)}>${this.assistiveText}</span>`:null}${e?u`<calcite-scrim class=${h(m.scrim)} .loading=${e}></calcite-scrim>`:null}<div .ariaBusy=${e} .ariaLabel=${a||""} class=${h(m.groupContainer)} role=group><slot @slotchange=${this.handleDefaultSlotChange}></slot></div></div>`})}};B("calcite-block-group",g);export{g as BlockGroup};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{c as S,d as T,e as O}from"./4VV4E4PU.js";import{b as i,c as w}from"./32MVCUVZ.js";import{a as z,b as $,d as E}from"./QZ2UDVXV.js";import{a as C}from"./266C6B7L.js";import{a as c,b as f}from"./ENDXE7YY.js";import{a as y}from"./ONSL6BXX.js";import{a as x}from"./HSOVQWPY.js";import{a as l}from"./RH6ZIP65.js";import{c as m}from"./UELBFRKC.js";import"./2YBB7MN2.js";import{r as k}from"./NDYF2A3V.js";import"./OAOQ5BXS.js";import{E as p,F as r,G as h,H as a,L as v,S as g,g as b,h as o,l as n}from"./YJYV5YC2.js";var e={buttonLoader:"calcite-button--loader",content:"content",contentSlotted:"content--slotted",icon:"icon",iconStart:"icon--start",iconEnd:"icon--end",loadingIn:"loading-in",loadingOut:"loading-out",iconStartEmpty:"icon-start-empty",iconEndEmpty:"icon-end-empty",buttonPadding:"button-padding",buttonPaddingShrunk:"button-padding--shrunk"},A=b`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block;inline-size:auto;vertical-align:middle;border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0))}:host a,:host button{--calcite-internal-button-content-margin: .5rem;--calcite-internal-button-padding-x: 7px;--calcite-internal-button-padding-y: 3px;position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-user-select:none;user-select:none;appearance:none;align-items:center;justify-content:center;border-style:none;text-align:center;font-family:inherit;font-weight:var(--calcite-font-weight-normal);text-decoration-line:none;outline-color:transparent;box-shadow:var(--calcite-button-shadow, var(--calcite-shadow-none));background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color, var(--calcite-color-transparent)));border-block-start-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-block-start-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-block-end-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-block-end-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-inline-start-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-inline-start-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-inline-end-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-inline-end-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-style:solid;border-width:var(--calcite-border-width-sm);border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0));color:var(--calcite-button-text-color, var(--calcite-internal-button-text-color, currentColor));padding-block:var(--calcite-internal-button-padding-y);padding-inline:var(--calcite-internal-button-padding-x);transition:color var(--calcite-animation-timing) ease-in-out,background-color var(--calcite-animation-timing) ease-in-out,box-shadow var(--calcite-animation-timing) ease-in-out,outline-color var(--calcite-internal-animation-timing-fast) ease-in-out}:host a:hover,:host button:hover{text-decoration-line:none;background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color-hover, var(--calcite-color-transparent)))}:host a:focus,:host button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color))}:host a:active,:host button:active{background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color-press, var(--calcite-color-transparent)))}:host a span,:host button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host a calcite-loader,:host button calcite-loader{color:var(--calcite-button-loader-color, var(--calcite-internal-button-loader-color, var(--calcite-button-text-color, var(--calcite-internal-button-text-color))))}:host([round]){--calcite-internal-button-corner-radius: 50px}.content{margin-inline:var(--calcite-internal-button-content-margin)}.icon-start-empty .content{margin-inline-start:unset}.icon-end-empty .content{margin-inline-end:unset}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-content-margin: .75rem}:host([scale=l]) button,:host([scale=l]) a{--calcite-internal-button-content-margin: 1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([alignment=center]:not([width=auto])) a,:host([alignment=center]:not([width=auto])) button{justify-content:center}:host([alignment=start]:not([width=auto])) a,:host([alignment=start]:not([width=auto])) button{justify-content:flex-start}:host([alignment=end]:not([width=auto])) a,:host([alignment=end]:not([width=auto])) button{justify-content:flex-end}:host([alignment*=space-between]:not([width=auto])) a,:host([alignment*=space-between]:not([width=auto])) button{justify-content:space-between}:host([alignment=icon-start-space-between]:not([width=auto])) .icon--start{margin-inline-end:auto}:host([alignment=icon-start-space-between]:not([width=auto])) a,:host([alignment=icon-start-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-end-space-between]:not([width=auto])) .icon--end{margin-inline-start:auto}:host([alignment=icon-end-space-between]:not([width=auto])) a,:host([alignment=icon-end-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=center]) a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) button:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:var(--calcite-internal-button-content-margin)}.icon--start,.icon--end{color:var(--calcite-button-icon-color, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}@keyframes loader-in{0%{inline-size:0;opacity:0;transform:scale(.5)}to{inline-size:1em;opacity:1;transform:scale(1)}}@keyframes loader-out{0%{inline-size:1em;opacity:1;transform:scale(1)}to{inline-size:0;opacity:0;transform:scale(.5)}}.calcite-button--loader{display:flex}.calcite-button--loader calcite-loader{margin:0}:host([loading]) button.content--slotted .calcite-button--loader calcite-loader,:host([loading]) a.content--slotted .calcite-button--loader calcite-loader{margin-inline-end:var(--calcite-internal-button-content-margin)}:host([loading]) button:not(.content--slotted) .icon--start,:host([loading]) button:not(.content--slotted) .icon--end,:host([loading]) a:not(.content--slotted) .icon--start,:host([loading]) a:not(.content--slotted) .icon--end{display:none}:host([appearance]) button,:host([appearance]) a{--calcite-internal-button-border-color: var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([kind=brand]){--calcite-internal-button-background-color: var(--calcite-color-brand);--calcite-internal-button-background-color-hover: var(--calcite-color-brand-hover);--calcite-internal-button-background-color-press: var(--calcite-color-brand-press);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse);--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([kind=danger]){--calcite-internal-button-background-color: var(--calcite-color-status-danger);--calcite-internal-button-background-color-hover: var(--calcite-color-status-danger-hover);--calcite-internal-button-background-color-press: var(--calcite-color-status-danger-press);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse);--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([kind=neutral]){--calcite-internal-button-background-color: var(--calcite-color-foreground-3);--calcite-internal-button-background-color-hover: var(--calcite-color-foreground-2);--calcite-internal-button-background-color-press: var(--calcite-color-foreground-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1);--calcite-internal-button-text-color: var(--calcite-color-text-1)}:host([kind=inverse]){--calcite-internal-button-background-color: var(--calcite-color-inverse);--calcite-internal-button-background-color-hover: var(--calcite-color-inverse-hover);--calcite-internal-button-background-color-press: var(--calcite-color-inverse-press);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse);--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([appearance=outline-fill]){--calcite-internal-button-background-color: var(--calcite-color-foreground-1);--calcite-internal-button-background-color-hover: var(--calcite-color-foreground-2);--calcite-internal-button-background-color-press: var(--calcite-color-foreground-3)}:host([appearance=outline-fill]) button,:host([appearance=outline-fill]) a{border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline-fill][kind=brand]) button,:host([appearance=outline-fill][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:hover,:host([appearance=outline-fill][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=outline-fill][kind=brand]) button:focus,:host([appearance=outline-fill][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:active,:host([appearance=outline-fill][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=outline-fill][kind=brand]) button calcite-loader,:host([appearance=outline-fill][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=danger]) button,:host([appearance=outline-fill][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:hover,:host([appearance=outline-fill][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline-fill][kind=danger]) button:focus,:host([appearance=outline-fill][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:active,:host([appearance=outline-fill][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=outline-fill][kind=danger]) button calcite-loader,:host([appearance=outline-fill][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=neutral]) button,:host([appearance=outline-fill][kind=neutral]) a{--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=neutral]) button:hover,:host([appearance=outline-fill][kind=neutral]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-border-input)}:host([appearance=outline-fill][kind=neutral]) button:focus,:host([appearance=outline-fill][kind=neutral]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:active,:host([appearance=outline-fill][kind=neutral]) a:active{--calcite-internal-button-border-color: var(--calcite-color-text-3)}:host([appearance=solid][kind=neutral]){--calcite-internal-button-background-color-hover: var(--calcite-color-border-2);--calcite-internal-button-background-color-press: var(--calcite-color-border-1)}:host([appearance=outline-fill][kind=inverse]) button,:host([appearance=outline-fill][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=inverse]) button:hover,:host([appearance=outline-fill][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover)}:host([appearance=outline-fill][kind=inverse]) button:focus,:host([appearance=outline-fill][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline-fill][kind=inverse]) button:active,:host([appearance=outline-fill][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press)}:host([appearance=outline]){--calcite-internal-button-background-color: var(--calcite-color-transparent);--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=outline]) button,:host([appearance=outline]) a{border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline][kind=brand]) button,:host([appearance=outline][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:hover,:host([appearance=outline][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=outline][kind=brand]) button:focus,:host([appearance=outline][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:active,:host([appearance=outline][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=outline][kind=brand]) button calcite-loader,:host([appearance=outline][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=danger]) button,:host([appearance=outline][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:hover,:host([appearance=outline][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline][kind=danger]) button:focus,:host([appearance=outline][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:active,:host([appearance=outline][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=outline][kind=danger]) button calcite-loader,:host([appearance=outline][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=neutral]) button,:host([appearance=outline][kind=neutral]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline][kind=neutral]) button:hover,:host([appearance=outline][kind=neutral]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-border-input)}:host([appearance=outline][kind=neutral]) button:focus,:host([appearance=outline][kind=neutral]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-foreground-3)}:host([appearance=outline][kind=neutral]) button:active,:host([appearance=outline][kind=neutral]) a:active{--calcite-internal-button-border-color: var(--calcite-color-text-3)}:host([appearance=outline][kind=inverse]) button,:host([appearance=outline][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline][kind=inverse]) button:hover,:host([appearance=outline][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover)}:host([appearance=outline][kind=inverse]) button:focus,:host([appearance=outline][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline][kind=inverse]) button:active,:host([appearance=outline][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press)}:host([appearance=outline-fill][split-child=primary]) button,:host([appearance=outline][split-child=primary]) button,:host([appearance=outline-fill][split-child=primary]) a,:host([appearance=outline][split-child=primary]) a{border-inline-end-width:0;border-inline-start-width:1px}:host([appearance=outline-fill][split-child=secondary]) button,:host([appearance=outline][split-child=secondary]) button,:host([appearance=outline-fill][split-child=secondary]) a,:host([appearance=outline][split-child=secondary]) a{border-inline-start-width:0;border-inline-end-width:1px}:host([appearance=transparent]){--calcite-internal-button-background-color: var(--calcite-color-transparent);--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=transparent]:not(.enable-editing-button)){--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=transparent][kind=brand]) button,:host([appearance=transparent][kind=brand]) a{--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:hover,:host([appearance=transparent][kind=brand]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=transparent][kind=brand]) button:focus,:host([appearance=transparent][kind=brand]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:active,:host([appearance=transparent][kind=brand]) a:active{--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=transparent][kind=brand]) button calcite-loader,:host([appearance=transparent][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=danger]) button,:host([appearance=transparent][kind=danger]) a{--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:hover,:host([appearance=transparent][kind=danger]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=transparent][kind=danger]) button:focus,:host([appearance=transparent][kind=danger]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:active,:host([appearance=transparent][kind=danger]) a:active{--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=transparent][kind=danger]) button calcite-loader,:host([appearance=transparent][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) button,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) a,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-1)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button{--calcite-internal-button-text-color: var(--calcite-color-text-3)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button:hover{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-padding-y: 0}:host(.confirm-changes-button) button:focus,:host(.cancel-editing-button) button:focus,:host(.enable-editing-button) button:focus{outline-offset:-2px}:host([appearance=transparent][kind=inverse]){--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=transparent][kind=inverse]) button calcite-loader,:host([appearance=transparent][kind=inverse]) a calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([scale=s]) button.content--slotted,:host([scale=s]) a.content--slotted{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}:host([scale=s][appearance=transparent]) button.content--slotted,:host([scale=s][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .5rem}:host([scale=s]) button,:host([scale=s]) a{--calcite-internal-button-padding-y: 3px}:host([scale=m]) button.content--slotted,:host([scale=m]) a.content--slotted{--calcite-internal-button-padding-x: 11px;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-padding-y: 7px}:host([scale=m][appearance=transparent]) button.content--slotted,:host([scale=m][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .75rem}:host([scale=l]) button.content--slotted,:host([scale=l]) a.content--slotted{--calcite-internal-button-padding-x: 15px;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=l]) .button-padding{--calcite-internal-button-padding-x: 1rem;--calcite-internal-button-padding-y: 11px}:host([scale=l]) .button-padding--shrunk{--calcite-internal-button-padding-y: 9px}:host([scale=s]) button:not(.content--slotted),:host([scale=s]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 3px;inline-size:1.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);min-block-size:1.5rem}:host([scale=m]) button:not(.content--slotted),:host([scale=m]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 7px;inline-size:2rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);min-block-size:2rem}:host([scale=l]) button:not(.content--slotted),:host([scale=l]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 9px;inline-size:2.75rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);min-block-size:2.75rem}:host(:is([scale=s],[scale=m],[scale=l])[width=full]) a:not(.content--slotted),:host(:is([scale=s],[scale=m],[scale=l])[width=full]) button:not(.content--slotted){inline-size:var(--calcite-container-size-content-fluid)}:host([scale=l][appearance=transparent]) button:not(.content--slotted),:host([scale=l][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-y: var(--calcite-space-sm-plus)}:host([scale=s][icon-start][icon-end]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 23px;block-size:1.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=s][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 1.5rem}:host([scale=m][icon-start][icon-end]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2rem;block-size:2rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=m][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 33px}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 43px;block-size:2.75rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted) .icon--start+.icon--end,:host([scale=l][icon-start][icon-end]) a:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:1rem}:host([scale=l][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2.75rem}:host([hidden]){display:none}[hidden]{display:none}`,s=class extends h{constructor(){super(...arguments),this.attributeWatch=m(["aria-expanded"],this.handleGlobalAttributesChanged),this.contentRef=p(),this.mutationObserver=c("mutation",()=>this.updateHasContent()),this.resizeObserver=c("resize",()=>this.setTooltipText()),this.focusSetter=x()(this),this.messages=y(),this.interactiveContainer=C(this),this.hasContent=!1,this.alignment="center",this.appearance="solid",this.disabled=!1,this.download=!1,this.kind="brand",this.loading=!1,this.round=!1,this.scale="m",this.splitChild=!1,this.type="button",this.width="auto"}static{this.properties={hasContent:[16,{},{state:!0}],tooltipText:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],download:[3,{converter:v},{reflect:!0}],form:[3,{},{reflect:!0}],href:[3,{},{reflect:!0}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],kind:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],rel:[3,{},{reflect:!0}],round:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],splitChild:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],type:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=A}async setFocus(t){return this.focusSetter(()=>this.childEl,t)}connectedCallback(){super.connectedCallback(),this.setupTextContentObserver(),S(this),this.formEl=E(this)}async load(){this.updateHasContent()}loaded(){this.setTooltipText()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),T(this),this.resizeObserver?.disconnect(),this.formEl=null}handleGlobalAttributesChanged(){this.requestUpdate()}updateHasContent(){this.hasContent=k(this.el)}setupTextContentObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}onLabelClick(){this.handleClick(),this.setFocus()}handleClick(){let{type:t}=this;this.href||(t==="submit"?z(this):t==="reset"&&$(this))}setTooltipText(){let{contentRef:{value:t}}=this;t&&(this.tooltipText=t.offsetWidth<t.scrollWidth&&this.el.innerText||null)}setChildEl(t){f(this.resizeObserver,this.childEl,t),this.childEl=t}render(){let t=this.href?"a":"button",d=this.href?i`a`:i`button`,R=this.loading?o`<div class=${a(e.buttonLoader)}><calcite-loader class=${a(this.loading?e.loadingIn:e.loadingOut)} inline .label=${this.messages.loading} .scale=${this.scale==="l"?"m":"s"}></calcite-loader></div>`:null,u=!this.iconStart&&!this.iconEnd,F=o`<calcite-icon class=${a({[e.icon]:!0,[e.iconStart]:!0})} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${l(this.scale)}></calcite-icon>`,L=o`<calcite-icon class=${a({[e.icon]:!0,[e.iconEnd]:!0})} .flipRtl=${this.iconFlipRtl==="end"||this.iconFlipRtl==="both"} .icon=${this.iconEnd} .scale=${l(this.scale)}></calcite-icon>`,j=o`<span class=${a(e.content)} ${r(this.contentRef)}><slot></slot></span>`;return this.interactiveContainer({disabled:this.disabled,children:w`<${d} .ariaBusy=${this.loading} .ariaExpanded=${this.el.ariaExpanded?this.el.ariaExpanded:null} .ariaLabel=${this.loading?this.messages.loading:O(this)} aria-live=polite class=${a({[e.buttonPadding]:u,[e.buttonPaddingShrunk]:!u,[e.contentSlotted]:this.hasContent,[e.iconStartEmpty]:!this.iconStart,[e.iconEndEmpty]:!this.iconEnd})} .disabled=${t==="button"?this.disabled:null} download=${(t==="a"?this.download===!0||this.download===""?"":this.download||null:null)??n} href=${(t==="a"&&this.href)??n} name=${(t==="button"&&this.name)??n} @click=${this.handleClick} rel=${(t==="a"&&this.rel)??n} tabindex=${(this.disabled?-1:null)??n} target=${(t==="a"&&this.target)??n} title=${this.tooltipText??n} type=${(t==="button"?this.type:null)??n} ${r(this.setChildEl)}>${R}${this.iconStart?F:null}${this.hasContent?j:null}${this.iconEnd?L:null}</${d}>`})}};g("calcite-button",s);export{s as Button};
|
|
2
|
+
import{c as S,d as T,e as O}from"./FFK3DJRR.js";import{b as i,c as w}from"./JKP5CB3U.js";import{a as z,b as $,d as E}from"./S6FPIBBB.js";import{a as C}from"./7WQHPXCF.js";import{a as c,b as f}from"./ENDXE7YY.js";import{a as y}from"./YMG56BXS.js";import{a as x}from"./RVUTGHRC.js";import{a as l}from"./RH6ZIP65.js";import{c as m}from"./PXTG7ABV.js";import"./QJEHQ7YA.js";import{r as k}from"./ZNU4R72A.js";import"./OAOQ5BXS.js";import{E as p,F as r,G as h,H as a,L as v,S as g,g as b,h as o,l as n}from"./XKVBSCBE.js";var e={buttonLoader:"calcite-button--loader",content:"content",contentSlotted:"content--slotted",icon:"icon",iconStart:"icon--start",iconEnd:"icon--end",loadingIn:"loading-in",loadingOut:"loading-out",iconStartEmpty:"icon-start-empty",iconEndEmpty:"icon-end-empty",buttonPadding:"button-padding",buttonPaddingShrunk:"button-padding--shrunk"},A=b`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block;inline-size:auto;vertical-align:middle;border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0))}:host a,:host button{--calcite-internal-button-content-margin: .5rem;--calcite-internal-button-padding-x: 7px;--calcite-internal-button-padding-y: 3px;position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-user-select:none;user-select:none;appearance:none;align-items:center;justify-content:center;border-style:none;text-align:center;font-family:inherit;font-weight:var(--calcite-font-weight-normal);text-decoration-line:none;outline-color:transparent;box-shadow:var(--calcite-button-shadow, var(--calcite-shadow-none));background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color, var(--calcite-color-transparent)));border-block-start-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-block-start-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-block-end-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-block-end-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-inline-start-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-inline-start-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-inline-end-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-inline-end-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-style:solid;border-width:var(--calcite-border-width-sm);border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0));color:var(--calcite-button-text-color, var(--calcite-internal-button-text-color, currentColor));padding-block:var(--calcite-internal-button-padding-y);padding-inline:var(--calcite-internal-button-padding-x);transition:color var(--calcite-animation-timing) ease-in-out,background-color var(--calcite-animation-timing) ease-in-out,box-shadow var(--calcite-animation-timing) ease-in-out,outline-color var(--calcite-internal-animation-timing-fast) ease-in-out}:host a:hover,:host button:hover{text-decoration-line:none;background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color-hover, var(--calcite-color-transparent)))}:host a:focus,:host button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color))}:host a:active,:host button:active{background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color-press, var(--calcite-color-transparent)))}:host a span,:host button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host a calcite-loader,:host button calcite-loader{color:var(--calcite-button-loader-color, var(--calcite-internal-button-loader-color, var(--calcite-button-text-color, var(--calcite-internal-button-text-color))))}:host([round]){--calcite-internal-button-corner-radius: 50px}.content{margin-inline:var(--calcite-internal-button-content-margin)}.icon-start-empty .content{margin-inline-start:unset}.icon-end-empty .content{margin-inline-end:unset}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-content-margin: .75rem}:host([scale=l]) button,:host([scale=l]) a{--calcite-internal-button-content-margin: 1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([alignment=center]:not([width=auto])) a,:host([alignment=center]:not([width=auto])) button{justify-content:center}:host([alignment=start]:not([width=auto])) a,:host([alignment=start]:not([width=auto])) button{justify-content:flex-start}:host([alignment=end]:not([width=auto])) a,:host([alignment=end]:not([width=auto])) button{justify-content:flex-end}:host([alignment*=space-between]:not([width=auto])) a,:host([alignment*=space-between]:not([width=auto])) button{justify-content:space-between}:host([alignment=icon-start-space-between]:not([width=auto])) .icon--start{margin-inline-end:auto}:host([alignment=icon-start-space-between]:not([width=auto])) a,:host([alignment=icon-start-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-end-space-between]:not([width=auto])) .icon--end{margin-inline-start:auto}:host([alignment=icon-end-space-between]:not([width=auto])) a,:host([alignment=icon-end-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=center]) a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) button:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:var(--calcite-internal-button-content-margin)}.icon--start,.icon--end{color:var(--calcite-button-icon-color, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}@keyframes loader-in{0%{inline-size:0;opacity:0;transform:scale(.5)}to{inline-size:1em;opacity:1;transform:scale(1)}}@keyframes loader-out{0%{inline-size:1em;opacity:1;transform:scale(1)}to{inline-size:0;opacity:0;transform:scale(.5)}}.calcite-button--loader{display:flex}.calcite-button--loader calcite-loader{margin:0}:host([loading]) button.content--slotted .calcite-button--loader calcite-loader,:host([loading]) a.content--slotted .calcite-button--loader calcite-loader{margin-inline-end:var(--calcite-internal-button-content-margin)}:host([loading]) button:not(.content--slotted) .icon--start,:host([loading]) button:not(.content--slotted) .icon--end,:host([loading]) a:not(.content--slotted) .icon--start,:host([loading]) a:not(.content--slotted) .icon--end{display:none}:host([appearance]) button,:host([appearance]) a{--calcite-internal-button-border-color: var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([kind=brand]){--calcite-internal-button-background-color: var(--calcite-color-brand);--calcite-internal-button-background-color-hover: var(--calcite-color-brand-hover);--calcite-internal-button-background-color-press: var(--calcite-color-brand-press);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse);--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([kind=danger]){--calcite-internal-button-background-color: var(--calcite-color-status-danger);--calcite-internal-button-background-color-hover: var(--calcite-color-status-danger-hover);--calcite-internal-button-background-color-press: var(--calcite-color-status-danger-press);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse);--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([kind=neutral]){--calcite-internal-button-background-color: var(--calcite-color-foreground-3);--calcite-internal-button-background-color-hover: var(--calcite-color-foreground-2);--calcite-internal-button-background-color-press: var(--calcite-color-foreground-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1);--calcite-internal-button-text-color: var(--calcite-color-text-1)}:host([kind=inverse]){--calcite-internal-button-background-color: var(--calcite-color-inverse);--calcite-internal-button-background-color-hover: var(--calcite-color-inverse-hover);--calcite-internal-button-background-color-press: var(--calcite-color-inverse-press);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse);--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([appearance=outline-fill]){--calcite-internal-button-background-color: var(--calcite-color-foreground-1);--calcite-internal-button-background-color-hover: var(--calcite-color-foreground-2);--calcite-internal-button-background-color-press: var(--calcite-color-foreground-3)}:host([appearance=outline-fill]) button,:host([appearance=outline-fill]) a{border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline-fill][kind=brand]) button,:host([appearance=outline-fill][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:hover,:host([appearance=outline-fill][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=outline-fill][kind=brand]) button:focus,:host([appearance=outline-fill][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:active,:host([appearance=outline-fill][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=outline-fill][kind=brand]) button calcite-loader,:host([appearance=outline-fill][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=danger]) button,:host([appearance=outline-fill][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:hover,:host([appearance=outline-fill][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline-fill][kind=danger]) button:focus,:host([appearance=outline-fill][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:active,:host([appearance=outline-fill][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=outline-fill][kind=danger]) button calcite-loader,:host([appearance=outline-fill][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=neutral]) button,:host([appearance=outline-fill][kind=neutral]) a{--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=neutral]) button:hover,:host([appearance=outline-fill][kind=neutral]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-border-input)}:host([appearance=outline-fill][kind=neutral]) button:focus,:host([appearance=outline-fill][kind=neutral]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:active,:host([appearance=outline-fill][kind=neutral]) a:active{--calcite-internal-button-border-color: var(--calcite-color-text-3)}:host([appearance=solid][kind=neutral]){--calcite-internal-button-background-color-hover: var(--calcite-color-border-2);--calcite-internal-button-background-color-press: var(--calcite-color-border-1)}:host([appearance=outline-fill][kind=inverse]) button,:host([appearance=outline-fill][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=inverse]) button:hover,:host([appearance=outline-fill][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover)}:host([appearance=outline-fill][kind=inverse]) button:focus,:host([appearance=outline-fill][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline-fill][kind=inverse]) button:active,:host([appearance=outline-fill][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press)}:host([appearance=outline]){--calcite-internal-button-background-color: var(--calcite-color-transparent);--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=outline]) button,:host([appearance=outline]) a{border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline][kind=brand]) button,:host([appearance=outline][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:hover,:host([appearance=outline][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=outline][kind=brand]) button:focus,:host([appearance=outline][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:active,:host([appearance=outline][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=outline][kind=brand]) button calcite-loader,:host([appearance=outline][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=danger]) button,:host([appearance=outline][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:hover,:host([appearance=outline][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline][kind=danger]) button:focus,:host([appearance=outline][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:active,:host([appearance=outline][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=outline][kind=danger]) button calcite-loader,:host([appearance=outline][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=neutral]) button,:host([appearance=outline][kind=neutral]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline][kind=neutral]) button:hover,:host([appearance=outline][kind=neutral]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-border-input)}:host([appearance=outline][kind=neutral]) button:focus,:host([appearance=outline][kind=neutral]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-foreground-3)}:host([appearance=outline][kind=neutral]) button:active,:host([appearance=outline][kind=neutral]) a:active{--calcite-internal-button-border-color: var(--calcite-color-text-3)}:host([appearance=outline][kind=inverse]) button,:host([appearance=outline][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline][kind=inverse]) button:hover,:host([appearance=outline][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover)}:host([appearance=outline][kind=inverse]) button:focus,:host([appearance=outline][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline][kind=inverse]) button:active,:host([appearance=outline][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press)}:host([appearance=outline-fill][split-child=primary]) button,:host([appearance=outline][split-child=primary]) button,:host([appearance=outline-fill][split-child=primary]) a,:host([appearance=outline][split-child=primary]) a{border-inline-end-width:0;border-inline-start-width:1px}:host([appearance=outline-fill][split-child=secondary]) button,:host([appearance=outline][split-child=secondary]) button,:host([appearance=outline-fill][split-child=secondary]) a,:host([appearance=outline][split-child=secondary]) a{border-inline-start-width:0;border-inline-end-width:1px}:host([appearance=transparent]){--calcite-internal-button-background-color: var(--calcite-color-transparent);--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=transparent]:not(.enable-editing-button)){--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=transparent][kind=brand]) button,:host([appearance=transparent][kind=brand]) a{--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:hover,:host([appearance=transparent][kind=brand]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=transparent][kind=brand]) button:focus,:host([appearance=transparent][kind=brand]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:active,:host([appearance=transparent][kind=brand]) a:active{--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=transparent][kind=brand]) button calcite-loader,:host([appearance=transparent][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=danger]) button,:host([appearance=transparent][kind=danger]) a{--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:hover,:host([appearance=transparent][kind=danger]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=transparent][kind=danger]) button:focus,:host([appearance=transparent][kind=danger]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:active,:host([appearance=transparent][kind=danger]) a:active{--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=transparent][kind=danger]) button calcite-loader,:host([appearance=transparent][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) button,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) a,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-1)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button{--calcite-internal-button-text-color: var(--calcite-color-text-3)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button:hover{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-padding-y: 0}:host(.confirm-changes-button) button:focus,:host(.cancel-editing-button) button:focus,:host(.enable-editing-button) button:focus{outline-offset:-2px}:host([appearance=transparent][kind=inverse]){--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=transparent][kind=inverse]) button calcite-loader,:host([appearance=transparent][kind=inverse]) a calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([scale=s]) button.content--slotted,:host([scale=s]) a.content--slotted{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}:host([scale=s][appearance=transparent]) button.content--slotted,:host([scale=s][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .5rem}:host([scale=s]) button,:host([scale=s]) a{--calcite-internal-button-padding-y: 3px}:host([scale=m]) button.content--slotted,:host([scale=m]) a.content--slotted{--calcite-internal-button-padding-x: 11px;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-padding-y: 7px}:host([scale=m][appearance=transparent]) button.content--slotted,:host([scale=m][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .75rem}:host([scale=l]) button.content--slotted,:host([scale=l]) a.content--slotted{--calcite-internal-button-padding-x: 15px;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=l]) .button-padding{--calcite-internal-button-padding-x: 1rem;--calcite-internal-button-padding-y: 11px}:host([scale=l]) .button-padding--shrunk{--calcite-internal-button-padding-y: 9px}:host([scale=s]) button:not(.content--slotted),:host([scale=s]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 3px;inline-size:1.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);min-block-size:1.5rem}:host([scale=m]) button:not(.content--slotted),:host([scale=m]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 7px;inline-size:2rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);min-block-size:2rem}:host([scale=l]) button:not(.content--slotted),:host([scale=l]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 9px;inline-size:2.75rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);min-block-size:2.75rem}:host(:is([scale=s],[scale=m],[scale=l])[width=full]) a:not(.content--slotted),:host(:is([scale=s],[scale=m],[scale=l])[width=full]) button:not(.content--slotted){inline-size:var(--calcite-container-size-content-fluid)}:host([scale=l][appearance=transparent]) button:not(.content--slotted),:host([scale=l][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-y: var(--calcite-space-sm-plus)}:host([scale=s][icon-start][icon-end]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 23px;block-size:1.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=s][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 1.5rem}:host([scale=m][icon-start][icon-end]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2rem;block-size:2rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=m][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 33px}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 43px;block-size:2.75rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted) .icon--start+.icon--end,:host([scale=l][icon-start][icon-end]) a:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:1rem}:host([scale=l][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2.75rem}:host([hidden]){display:none}[hidden]{display:none}`,s=class extends h{constructor(){super(...arguments),this.attributeWatch=m(["aria-expanded"],this.handleGlobalAttributesChanged),this.contentRef=p(),this.mutationObserver=c("mutation",()=>this.updateHasContent()),this.resizeObserver=c("resize",()=>this.setTooltipText()),this.focusSetter=x()(this),this.messages=y(),this.interactiveContainer=C(this),this.hasContent=!1,this.alignment="center",this.appearance="solid",this.disabled=!1,this.download=!1,this.kind="brand",this.loading=!1,this.round=!1,this.scale="m",this.splitChild=!1,this.type="button",this.width="auto"}static{this.properties={hasContent:[16,{},{state:!0}],tooltipText:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],download:[3,{converter:v},{reflect:!0}],form:[3,{},{reflect:!0}],href:[3,{},{reflect:!0}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],kind:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],rel:[3,{},{reflect:!0}],round:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],splitChild:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],type:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=A}async setFocus(t){return this.focusSetter(()=>this.childEl,t)}connectedCallback(){super.connectedCallback(),this.setupTextContentObserver(),S(this),this.formEl=E(this)}async load(){this.updateHasContent()}loaded(){this.setTooltipText()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),T(this),this.resizeObserver?.disconnect(),this.formEl=null}handleGlobalAttributesChanged(){this.requestUpdate()}updateHasContent(){this.hasContent=k(this.el)}setupTextContentObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}onLabelClick(){this.handleClick(),this.setFocus()}handleClick(){let{type:t}=this;this.href||(t==="submit"?z(this):t==="reset"&&$(this))}setTooltipText(){let{contentRef:{value:t}}=this;t&&(this.tooltipText=t.offsetWidth<t.scrollWidth&&this.el.innerText||null)}setChildEl(t){f(this.resizeObserver,this.childEl,t),this.childEl=t}render(){let t=this.href?"a":"button",d=this.href?i`a`:i`button`,R=this.loading?o`<div class=${a(e.buttonLoader)}><calcite-loader class=${a(this.loading?e.loadingIn:e.loadingOut)} inline .label=${this.messages.loading} .scale=${this.scale==="l"?"m":"s"}></calcite-loader></div>`:null,u=!this.iconStart&&!this.iconEnd,F=o`<calcite-icon class=${a({[e.icon]:!0,[e.iconStart]:!0})} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${l(this.scale)}></calcite-icon>`,L=o`<calcite-icon class=${a({[e.icon]:!0,[e.iconEnd]:!0})} .flipRtl=${this.iconFlipRtl==="end"||this.iconFlipRtl==="both"} .icon=${this.iconEnd} .scale=${l(this.scale)}></calcite-icon>`,j=o`<span class=${a(e.content)} ${r(this.contentRef)}><slot></slot></span>`;return this.interactiveContainer({disabled:this.disabled,children:w`<${d} .ariaBusy=${this.loading} .ariaExpanded=${this.el.ariaExpanded?this.el.ariaExpanded:null} .ariaLabel=${this.loading?this.messages.loading:O(this)} aria-live=polite class=${a({[e.buttonPadding]:u,[e.buttonPaddingShrunk]:!u,[e.contentSlotted]:this.hasContent,[e.iconStartEmpty]:!this.iconStart,[e.iconEndEmpty]:!this.iconEnd})} .disabled=${t==="button"?this.disabled:null} download=${(t==="a"?this.download===!0||this.download===""?"":this.download||null:null)??n} href=${(t==="a"&&this.href)??n} name=${(t==="button"&&this.name)??n} @click=${this.handleClick} rel=${(t==="a"&&this.rel)??n} tabindex=${(this.disabled?-1:null)??n} target=${(t==="a"&&this.target)??n} title=${this.tooltipText??n} type=${(t==="button"?this.type:null)??n} ${r(this.setChildEl)}>${R}${this.iconStart?F:null}${this.hasContent?j:null}${this.iconEnd?L:null}</${d}>`})}};g("calcite-button",s);export{s as Button};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as G}from"./ZPBCDUTD.js";import{b as h}from"./QS4T2NHO.js";import{a as _}from"./EX3FVXQA.js";import{b as u}from"./IVBK6XYN.js";import{a as j}from"./332ZKLGA.js";import{a as K}from"./GF32HNMV.js";import{c as U,d as A,e as N}from"./4VV4E4PU.js";import"./ZLC353RS.js";import{a as V}from"./266C6B7L.js";import"./YGX7CUXN.js";import{a as L}from"./ONSL6BXX.js";import{a as q}from"./HSOVQWPY.js";import{a as B}from"./RH6ZIP65.js";import{e as D}from"./UELBFRKC.js";import"./2YBB7MN2.js";import"./NDYF2A3V.js";import"./OAOQ5BXS.js";import{E as l,F as o,G as O,H as r,L as E,S as M,g as z,h as c,l as t,p}from"./YJYV5YC2.js";var se=z`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}::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}calcite-time-picker{--calcite-time-picker-color: var(--calcite-input-time-picker-digit-text-color);--calcite-time-picker-icon-color: var(--calcite-input-time-picker-digit-icon-color);--calcite-time-picker-border-color: var(--calcite-input-time-picker-border-color);--calcite-time-picker-button-background-color-hover: var(--calcite-input-time-picker-action-background-color-hover);--calcite-time-picker-button-background-color-press: var(--calcite-input-time-picker-action-background-color-press);--calcite-time-picker-input-border-color-hover: var(--calcite-input-time-picker-digit-border-color-hover);--calcite-time-picker-input-border-color-press: var(--calcite-input-time-picker-digit-border-color-press)}.container{--calcite-icon-color: var( --calcite-input-time-picker-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-3)) );align-items:center;background-color:var(--calcite-input-time-picker-input-background-color, var(--calcite-color-foreground-1));border:1px solid var(--calcite-input-time-picker-input-border-color, var(--calcite-color-border-input));border-radius:var(--calcite-input-time-picker-input-corner-radius, var(--calcite-corner-radius-none));box-shadow:var(--calcite-input-time-picker-input-shadow, var(--calcite-shadow-none));box-sizing:border-box;display:flex;color:var(--calcite-input-time-picker-input-text-color, var(--calcite-color-text-1));flex-wrap:nowrap;font-weight:var(--calcite-font-weight-normal);inline-size:100%;padding-block:var(--calcite-spacing-base);-webkit-user-select:none;user-select:none}.container:focus-within{border-color:var(--calcite-color-brand);outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.container.read-only{background-color:var(--calcite-color-background);font-weight:var(--calcite-font-weight-medium)}.clock-icon{--calcite-icon-color: var( --calcite-input-time-picker-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-3)) )}.hour-suffix,.minute-suffix,.second-suffix{white-space:pre}.input-container{display:flex;flex-grow:1}.input{align-items:center;display:flex;block-size:100%;justify-content:center;min-inline-size:max-content}.input.empty{inline-size:var(--calcite-spacing-xl)}.input:focus,.input:hover:focus{background-color:Highlight;color:HighlightText;outline:2px solid transparent;outline-offset:2px}.toggle-icon{--calcite-icon-color: var(--calcite-input-time-picker-icon-color, var(--calcite-color-text-3));align-items:center;block-size:24px;cursor:pointer;display:flex;inline-size:24px;justify-content:center}.toggle-icon:hover{--calcite-icon-color: var(--calcite-input-time-picker-icon-color-hover, var(--calcite-color-text-1))}:host([scale=s]) .container{block-size:1.5rem;font-size:var(--calcite-font-size-sm);gap:var(--calcite-spacing-sm);padding-inline-start:var(--calcite-spacing-sm);padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s]) .input-container{line-height:1rem}:host([scale=m]) .container{block-size:2rem;font-size:var(--calcite-font-size);gap:var(--calcite-spacing-md);padding-inline-start:var(--calcite-spacing-md);padding-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .input-container{line-height:1.5rem}:host([scale=l]) .container{block-size:2.75rem;font-size:var(--calcite-font-size-md);gap:var(--calcite-spacing-lg);padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .input-container{line-height:2.25rem}:host([status=invalid]) .container{border-color:var(--calcite-color-status-danger)}:host([status=invalid]) .container:focus-within{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))))}calcite-time-picker{--calcite-time-picker-background-color: var(--calcite-input-time-picker-background-color);--calcite-time-picker-border-color: var(--calcite-input-time-picker-border-color, transparent);--calcite-time-picker-corner-radius: var( --calcite-input-time-picker-corner-radius, var(--calcite-corner-radius-round) )}calcite-popover{--calcite-popover-corner-radius: var(--calcite-input-time-picker-corner-radius, var(--calcite-corner-radius-round))}.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}:host([hidden]){display:none}[hidden]{display:none}`,i={clockIcon:"clock-icon",container:"container",decimalSeparator:"decimal-separator",empty:"empty",fractionalSecond:"fractional-second",hour:"hour",hourSuffix:"hour-suffix",input:"input",inputContainer:"input-container",meridiem:"meridiem",minute:"minute",minuteSuffix:"minute-suffix",readOnly:"read-only",second:"second",secondSuffix:"second-suffix",toggleIcon:"toggle-icon"},f={inputContainer:"inputContainer",validationMessage:"inputTimePickerValidationMessage"},w={clock:"clock",chevronUp:"chevron-up",chevronDown:"chevron-down"},P=class extends O{constructor(){super(),this.messages=L(),this.containerRef=l(),this.direction=D(),this.focusSetter=q()(this),this.formSupport=_({inputType:"time"})(this),this.fractionalSecondRef=l(),this.hourRef=l(),this.meridiemRef=l(),this.minuteRef=l(),this.secondRef=l(),this.time=G(this),this.interactiveContainer=V(this),this.timePickerRef=l(),this.disabled=!1,this.focusTrapDisabled=!1,this.hourFormat="user",this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.step=60,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.calciteInputTimePickerBeforeClose=p({cancelable:!1}),this.calciteInputTimePickerBeforeOpen=p({cancelable:!1}),this.calciteInputTimePickerChange=p(),this.calciteInputTimePickerClose=p({cancelable:!1}),this.calciteInputTimePickerOpen=p({cancelable:!1}),this.listen("blur",this.blurHandler),this.listen("keydown",this.keyDownHandler),this.listen("calciteTimeChange",this.timeChangeHandler)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],focusTrapDisabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],hourFormat:[3,{},{reflect:!0}],label:1,labelText:1,max:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],min:[3,{},{reflect:!0}],name:1,numberingSystem:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:1,placement:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],step:[11,{},{reflect:!0,type:Number}],validationIcon:[3,{converter:E,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=se}async reposition(e=!1){this.popoverEl?.reposition(e)}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),U(this)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&(this.disabled||(this.open=!1)),e.has("readOnly")&&(this.hasUpdated||this.readOnly!==!1)&&(this.readOnly||(this.open=!1)),e.has("value")&&(this.hasUpdated?(this.time.userChangedValue||(this.previousEmittedValue=this.value),this.time.setValue(this.value),this.requestTimePickerUpdate()):this.previousEmittedValue=this.value)}disconnectedCallback(){super.disconnectedCallback(),A(this)}blurHandler(){this.changeEventHandler()}changeEventHandler(){let{previousEmittedValue:e,value:s}=this;e!==s&&(this.calciteInputTimePickerChange.emit().defaultPrevented?this.time.setValue(this.previousEmittedValue):this.previousEmittedValue=s)}keyDownHandler(e){let{defaultPrevented:s,key:a}=e,{hourFormat:n,meridiemOrder:d}=this.time;if(!s)if(a==="Enter")this.formSupport.active&&(this.formSupport.requestSubmit(),e.preventDefault()),this.changeEventHandler();else if(this.open&&a==="Escape")this.open=!1,e.preventDefault();else{let v=h(this.step)>0,g=this.step<60;switch(this.activeEl){case this.hourRef.value:a==="ArrowRight"?this.setFocusPart("minute"):a==="ArrowLeft"&&n==="12"&&d===0&&this.setFocusPart("meridiem");break;case this.minuteRef.value:switch(a){case"ArrowLeft":this.setFocusPart("hour");break;case"ArrowRight":this.step!==60?this.setFocusPart("second"):n==="12"&&this.setFocusPart("meridiem");break}break;case this.secondRef.value:switch(a){case"ArrowLeft":this.setFocusPart("minute");break;case"ArrowRight":h(this.step)>0?this.setFocusPart("fractionalSecond"):n==="12"&&this.setFocusPart("meridiem");break}break;case this.fractionalSecondRef.value:switch(a){case"ArrowLeft":this.setFocusPart("second");break;case"ArrowRight":n==="12"&&d!==0&&this.setFocusPart("meridiem");break}break;case this.meridiemRef.value:a==="ArrowLeft"&&d!==0?v?this.setFocusPart("fractionalSecond"):g?this.setFocusPart("second"):this.setFocusPart("minute"):a==="ArrowRight"&&d===0&&this.setFocusPart("hour");break}}}onLabelClick(){this.setFocus()}openHandler(){this.disabled||this.readOnly||this.popoverEl&&(this.popoverEl.open=this.open)}popoverBeforeOpenHandler(e){e.stopPropagation(),this.calciteInputTimePickerBeforeOpen.emit()}popoverOpenHandler(e){e.stopPropagation(),this.calciteInputTimePickerOpen.emit()}popoverBeforeCloseHandler(e){e.stopPropagation(),this.calciteInputTimePickerBeforeClose.emit()}popoverCloseHandler(e){e.stopPropagation(),this.calciteInputTimePickerClose.emit(),this.open=!1}requestTimePickerUpdate(){this.timePickerRef.value.manager?.component.requestUpdate()}setCalcitePopoverEl(e){this.popoverEl=e,this.openHandler()}async setFocusPart(e){(e==="hour"?this.hourRef:e==="minute"?this.minuteRef:e==="second"?this.secondRef:e==="fractionalSecond"?this.fractionalSecondRef:this.meridiemRef).value?.focus()}timeChangeHandler(e){if(e.stopPropagation(),this.disabled)return;let s=e.detail;s!==this.value?this.value=s:this.requestTimePickerUpdate()}timePartFocusHandler(e){this.activeEl=e.currentTarget}timePickerChangeHandler(e){e.stopPropagation()}toggleIconClickHandler(){this.open=!this.open}render(){let{messages:e,readOnly:s,scale:a}=this,{fractionalSecond:n,handleHourKeyDownEvent:d,handleMinuteKeyDownEvent:v,handleSecondKeyDownEvent:g,handleFractionalSecondKeyDownEvent:J,hour:b,hourFormat:Q,localizedDecimalSeparator:W,localizedFractionalSecond:k,localizedHour:S,localizedHourSuffix:X,localizedMinute:C,localizedMinuteSuffix:Y,localizedSecond:F,localizedSecondSuffix:I,meridiemOrder:Z,minute:$,second:y}=this.time,x="--",ee=u(n),ie=u(b),te=u($),ae=u(y),H=h(this.step)>0,R=Q==="12",re=this.step<60,T=Z===0||this.direction==="rtl",m=!this.disabled&&!this.readOnly;return this.interactiveContainer({disabled:this.disabled,children:c`${this.labelText&&K({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-controls=${f.inputContainer} aria-labelledby=${f.inputContainer} class=${r({[i.container]:!0,[i.readOnly]:s})} role=combobox ${o(this.containerRef)}><calcite-icon class=${r(i.clockIcon)} .icon=${w.clock} .scale=${a==="l"?"m":"s"}></calcite-icon><div aria-label=${N(this)??t} .ariaRequired=${this.required} class=${r(i.inputContainer)} dir=ltr id=${f.inputContainer} role=group>${R&&T&&this.renderMeridiem()||""}<span aria-label=${this.messages.hour??t} aria-valuemax=23 aria-valuemin=1 aria-valuenow=${(ie&&parseInt(b)||"0")??t} aria-valuetext=${b??t} class=${r({[i.empty]:!S,[i.hour]:!0,[i.input]:!0})} @focus=${this.timePartFocusHandler} @keydown=${m?d:void 0} role=spinbutton tabindex=0 ${o(this.hourRef)}>${S||x}</span><span class=${r(i.hourSuffix)}>${X}</span><span aria-label=${this.messages.minute??t} aria-valuemax=12 aria-valuemin=1 aria-valuenow=${(te&&parseInt($)||"0")??t} aria-valuetext=${$??t} class=${r({[i.empty]:!C,[i.input]:!0,[i.minute]:!0})} @focus=${this.timePartFocusHandler} @keydown=${m?v:void 0} role=spinbutton tabindex=0 ${o(this.minuteRef)}>${C||x}</span><span class=${r(i.minuteSuffix)}>${Y}</span>${re&&c`<span aria-label=${this.messages.second??t} aria-valuemax=59 aria-valuemin=0 aria-valuenow=${(ae&&parseInt(y)||"0")??t} aria-valuetext=${y??t} class=${r({[i.empty]:!F,[i.input]:!0,[i.second]:!0})} @focus=${this.timePartFocusHandler} @keydown=${m?g:void 0} role=spinbutton tabindex=0 ${o(this.secondRef)}>${F||x}</span>`||""}${H&&c`<span class=${r(i.decimalSeparator)}>${W}</span>`||""}${H&&c`<span aria-label=${this.messages.fractionalSecond??t} aria-valuemax=999 aria-valuemin=1 aria-valuenow=${(ee&&parseInt(n)||"0")??t} aria-valuetext=${k??t} class=${r({[i.empty]:!k,[i.fractionalSecond]:!0,[i.input]:!0})} @focus=${this.timePartFocusHandler} @keydown=${m?J:void 0} role=spinbutton tabindex=0 ${o(this.fractionalSecondRef)}>${k||"".padStart(h(this.step),"-")}</span>`||""}${I&&c`<span class=${r(i.secondSuffix)}>${I}</span>`||""}${R&&!T&&this.renderMeridiem()||""}</div>${!this.readOnly&&this.renderToggleIcon(this.open)||""}</div><calcite-popover auto-close .focusTrapDisabled=${this.focusTrapDisabled} .focusTrapOptions=${{initialFocus:!1}} .label=${e.chooseTime} lang=${this.messages._lang??t} offset-distance=0 @calcitePopoverBeforeClose=${this.popoverBeforeCloseHandler} @calcitePopoverBeforeOpen=${this.popoverBeforeOpenHandler} @calcitePopoverClose=${this.popoverCloseHandler} @calcitePopoverOpen=${this.popoverOpenHandler} .overlayPositioning=${this.overlayPositioning} .placement=${this.placement} pointer-disabled .referenceElement=${this.containerRef.value} trigger-disabled ${o(this.setCalcitePopoverEl)}><calcite-time-picker .hourFormat=${this.time.hourFormat} lang=${this.messages._lang??t} .messageOverrides=${this.messageOverrides} .numberingSystem=${this.numberingSystem} @calciteTimePickerChange=${this.timePickerChangeHandler} .scale=${this.scale} .step=${this.step} tabindex=${(this.open?void 0:-1)??t} .time=${this.time} .value=${this.value} ${o(this.timePickerRef)}></calcite-time-picker></calcite-popover>${this.validationMessage&&this.status==="invalid"?j({icon:this.validationIcon,id:f.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderMeridiem(){let{handleMeridiemKeyDownEvent:e,localizedMeridiem:s,meridiem:a}=this.time,n=!this.disabled&&!this.readOnly;return c`<span aria-label=${this.messages.meridiem??t} aria-valuemax=2 aria-valuemin=1 aria-valuenow=${a==="PM"&&"2"||"1"} aria-valuetext=${a??t} class=${r({[i.empty]:!s,[i.input]:!0,[i.meridiem]:!0})} @focus=${this.timePartFocusHandler} @keydown=${n?e:void 0} role=spinbutton tabindex=0 ${o(this.meridiemRef)}>${s||"--"}</span>`}renderToggleIcon(e){return c`<span class=${r(i.toggleIcon)} @click=${this.toggleIconClickHandler}><calcite-icon .icon=${e?w.chevronUp:w.chevronDown} .scale=${B(this.scale)}></calcite-icon></span>`}};M("calcite-input-time-picker",P);export{P as InputTimePicker};
|
|
2
|
+
import{a as G}from"./TBLV4SNI.js";import{b as h}from"./QS4T2NHO.js";import{a as _}from"./JTZZ6FO4.js";import{b as u}from"./WOFBWRHW.js";import{a as j}from"./KLI5KRV5.js";import{a as K}from"./THQ7E7DL.js";import{c as U,d as A,e as N}from"./FFK3DJRR.js";import"./VBQ5OIO5.js";import{a as V}from"./7WQHPXCF.js";import"./YGX7CUXN.js";import{a as L}from"./YMG56BXS.js";import{a as q}from"./RVUTGHRC.js";import{a as B}from"./RH6ZIP65.js";import{e as D}from"./PXTG7ABV.js";import"./QJEHQ7YA.js";import"./ZNU4R72A.js";import"./OAOQ5BXS.js";import{E as l,F as o,G as O,H as r,L as E,S as M,g as z,h as c,l as t,p}from"./XKVBSCBE.js";var se=z`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}::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}calcite-time-picker{--calcite-time-picker-color: var(--calcite-input-time-picker-digit-text-color);--calcite-time-picker-icon-color: var(--calcite-input-time-picker-digit-icon-color);--calcite-time-picker-border-color: var(--calcite-input-time-picker-border-color);--calcite-time-picker-button-background-color-hover: var(--calcite-input-time-picker-action-background-color-hover);--calcite-time-picker-button-background-color-press: var(--calcite-input-time-picker-action-background-color-press);--calcite-time-picker-input-border-color-hover: var(--calcite-input-time-picker-digit-border-color-hover);--calcite-time-picker-input-border-color-press: var(--calcite-input-time-picker-digit-border-color-press)}.container{--calcite-icon-color: var( --calcite-input-time-picker-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-3)) );align-items:center;background-color:var(--calcite-input-time-picker-input-background-color, var(--calcite-color-foreground-1));border:1px solid var(--calcite-input-time-picker-input-border-color, var(--calcite-color-border-input));border-radius:var(--calcite-input-time-picker-input-corner-radius, var(--calcite-corner-radius-none));box-shadow:var(--calcite-input-time-picker-input-shadow, var(--calcite-shadow-none));box-sizing:border-box;display:flex;color:var(--calcite-input-time-picker-input-text-color, var(--calcite-color-text-1));flex-wrap:nowrap;font-weight:var(--calcite-font-weight-normal);inline-size:100%;padding-block:var(--calcite-spacing-base);-webkit-user-select:none;user-select:none}.container:focus-within{border-color:var(--calcite-color-brand);outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.container.read-only{background-color:var(--calcite-color-background);font-weight:var(--calcite-font-weight-medium)}.clock-icon{--calcite-icon-color: var( --calcite-input-time-picker-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-3)) )}.hour-suffix,.minute-suffix,.second-suffix{white-space:pre}.input-container{display:flex;flex-grow:1}.input{align-items:center;display:flex;block-size:100%;justify-content:center;min-inline-size:max-content}.input.empty{inline-size:var(--calcite-spacing-xl)}.input:focus,.input:hover:focus{background-color:Highlight;color:HighlightText;outline:2px solid transparent;outline-offset:2px}.toggle-icon{--calcite-icon-color: var(--calcite-input-time-picker-icon-color, var(--calcite-color-text-3));align-items:center;block-size:24px;cursor:pointer;display:flex;inline-size:24px;justify-content:center}.toggle-icon:hover{--calcite-icon-color: var(--calcite-input-time-picker-icon-color-hover, var(--calcite-color-text-1))}:host([scale=s]) .container{block-size:1.5rem;font-size:var(--calcite-font-size-sm);gap:var(--calcite-spacing-sm);padding-inline-start:var(--calcite-spacing-sm);padding-inline-end:var(--calcite-spacing-xxs)}:host([scale=s]) .input-container{line-height:1rem}:host([scale=m]) .container{block-size:2rem;font-size:var(--calcite-font-size);gap:var(--calcite-spacing-md);padding-inline-start:var(--calcite-spacing-md);padding-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .input-container{line-height:1.5rem}:host([scale=l]) .container{block-size:2.75rem;font-size:var(--calcite-font-size-md);gap:var(--calcite-spacing-lg);padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .input-container{line-height:2.25rem}:host([status=invalid]) .container{border-color:var(--calcite-color-status-danger)}:host([status=invalid]) .container:focus-within{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))))}calcite-time-picker{--calcite-time-picker-background-color: var(--calcite-input-time-picker-background-color);--calcite-time-picker-border-color: var(--calcite-input-time-picker-border-color, transparent);--calcite-time-picker-corner-radius: var( --calcite-input-time-picker-corner-radius, var(--calcite-corner-radius-round) )}calcite-popover{--calcite-popover-corner-radius: var(--calcite-input-time-picker-corner-radius, var(--calcite-corner-radius-round))}.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}:host([hidden]){display:none}[hidden]{display:none}`,i={clockIcon:"clock-icon",container:"container",decimalSeparator:"decimal-separator",empty:"empty",fractionalSecond:"fractional-second",hour:"hour",hourSuffix:"hour-suffix",input:"input",inputContainer:"input-container",meridiem:"meridiem",minute:"minute",minuteSuffix:"minute-suffix",readOnly:"read-only",second:"second",secondSuffix:"second-suffix",toggleIcon:"toggle-icon"},f={inputContainer:"inputContainer",validationMessage:"inputTimePickerValidationMessage"},w={clock:"clock",chevronUp:"chevron-up",chevronDown:"chevron-down"},P=class extends O{constructor(){super(),this.messages=L(),this.containerRef=l(),this.direction=D(),this.focusSetter=q()(this),this.formSupport=_({inputType:"time"})(this),this.fractionalSecondRef=l(),this.hourRef=l(),this.meridiemRef=l(),this.minuteRef=l(),this.secondRef=l(),this.time=G(this),this.interactiveContainer=V(this),this.timePickerRef=l(),this.disabled=!1,this.focusTrapDisabled=!1,this.hourFormat="user",this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.step=60,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.calciteInputTimePickerBeforeClose=p({cancelable:!1}),this.calciteInputTimePickerBeforeOpen=p({cancelable:!1}),this.calciteInputTimePickerChange=p(),this.calciteInputTimePickerClose=p({cancelable:!1}),this.calciteInputTimePickerOpen=p({cancelable:!1}),this.listen("blur",this.blurHandler),this.listen("keydown",this.keyDownHandler),this.listen("calciteTimeChange",this.timeChangeHandler)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],focusTrapDisabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],hourFormat:[3,{},{reflect:!0}],label:1,labelText:1,max:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],min:[3,{},{reflect:!0}],name:1,numberingSystem:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:1,placement:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],step:[11,{},{reflect:!0,type:Number}],validationIcon:[3,{converter:E,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=se}async reposition(e=!1){this.popoverEl?.reposition(e)}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),U(this)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&(this.disabled||(this.open=!1)),e.has("readOnly")&&(this.hasUpdated||this.readOnly!==!1)&&(this.readOnly||(this.open=!1)),e.has("value")&&(this.hasUpdated?(this.time.userChangedValue||(this.previousEmittedValue=this.value),this.time.setValue(this.value),this.requestTimePickerUpdate()):this.previousEmittedValue=this.value)}disconnectedCallback(){super.disconnectedCallback(),A(this)}blurHandler(){this.changeEventHandler()}changeEventHandler(){let{previousEmittedValue:e,value:s}=this;e!==s&&(this.calciteInputTimePickerChange.emit().defaultPrevented?this.time.setValue(this.previousEmittedValue):this.previousEmittedValue=s)}keyDownHandler(e){let{defaultPrevented:s,key:a}=e,{hourFormat:n,meridiemOrder:d}=this.time;if(!s)if(a==="Enter")this.formSupport.active&&(this.formSupport.requestSubmit(),e.preventDefault()),this.changeEventHandler();else if(this.open&&a==="Escape")this.open=!1,e.preventDefault();else{let v=h(this.step)>0,g=this.step<60;switch(this.activeEl){case this.hourRef.value:a==="ArrowRight"?this.setFocusPart("minute"):a==="ArrowLeft"&&n==="12"&&d===0&&this.setFocusPart("meridiem");break;case this.minuteRef.value:switch(a){case"ArrowLeft":this.setFocusPart("hour");break;case"ArrowRight":this.step!==60?this.setFocusPart("second"):n==="12"&&this.setFocusPart("meridiem");break}break;case this.secondRef.value:switch(a){case"ArrowLeft":this.setFocusPart("minute");break;case"ArrowRight":h(this.step)>0?this.setFocusPart("fractionalSecond"):n==="12"&&this.setFocusPart("meridiem");break}break;case this.fractionalSecondRef.value:switch(a){case"ArrowLeft":this.setFocusPart("second");break;case"ArrowRight":n==="12"&&d!==0&&this.setFocusPart("meridiem");break}break;case this.meridiemRef.value:a==="ArrowLeft"&&d!==0?v?this.setFocusPart("fractionalSecond"):g?this.setFocusPart("second"):this.setFocusPart("minute"):a==="ArrowRight"&&d===0&&this.setFocusPart("hour");break}}}onLabelClick(){this.setFocus()}openHandler(){this.disabled||this.readOnly||this.popoverEl&&(this.popoverEl.open=this.open)}popoverBeforeOpenHandler(e){e.stopPropagation(),this.calciteInputTimePickerBeforeOpen.emit()}popoverOpenHandler(e){e.stopPropagation(),this.calciteInputTimePickerOpen.emit()}popoverBeforeCloseHandler(e){e.stopPropagation(),this.calciteInputTimePickerBeforeClose.emit()}popoverCloseHandler(e){e.stopPropagation(),this.calciteInputTimePickerClose.emit(),this.open=!1}requestTimePickerUpdate(){this.timePickerRef.value.manager?.component.requestUpdate()}setCalcitePopoverEl(e){this.popoverEl=e,this.openHandler()}async setFocusPart(e){(e==="hour"?this.hourRef:e==="minute"?this.minuteRef:e==="second"?this.secondRef:e==="fractionalSecond"?this.fractionalSecondRef:this.meridiemRef).value?.focus()}timeChangeHandler(e){if(e.stopPropagation(),this.disabled)return;let s=e.detail;s!==this.value?this.value=s:this.requestTimePickerUpdate()}timePartFocusHandler(e){this.activeEl=e.currentTarget}timePickerChangeHandler(e){e.stopPropagation()}toggleIconClickHandler(){this.open=!this.open}render(){let{messages:e,readOnly:s,scale:a}=this,{fractionalSecond:n,handleHourKeyDownEvent:d,handleMinuteKeyDownEvent:v,handleSecondKeyDownEvent:g,handleFractionalSecondKeyDownEvent:J,hour:b,hourFormat:Q,localizedDecimalSeparator:W,localizedFractionalSecond:k,localizedHour:S,localizedHourSuffix:X,localizedMinute:C,localizedMinuteSuffix:Y,localizedSecond:F,localizedSecondSuffix:I,meridiemOrder:Z,minute:$,second:y}=this.time,x="--",ee=u(n),ie=u(b),te=u($),ae=u(y),H=h(this.step)>0,R=Q==="12",re=this.step<60,T=Z===0||this.direction==="rtl",m=!this.disabled&&!this.readOnly;return this.interactiveContainer({disabled:this.disabled,children:c`${this.labelText&&K({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-controls=${f.inputContainer} aria-labelledby=${f.inputContainer} class=${r({[i.container]:!0,[i.readOnly]:s})} role=combobox ${o(this.containerRef)}><calcite-icon class=${r(i.clockIcon)} .icon=${w.clock} .scale=${a==="l"?"m":"s"}></calcite-icon><div aria-label=${N(this)??t} .ariaRequired=${this.required} class=${r(i.inputContainer)} dir=ltr id=${f.inputContainer} role=group>${R&&T&&this.renderMeridiem()||""}<span aria-label=${this.messages.hour??t} aria-valuemax=23 aria-valuemin=1 aria-valuenow=${(ie&&parseInt(b)||"0")??t} aria-valuetext=${b??t} class=${r({[i.empty]:!S,[i.hour]:!0,[i.input]:!0})} @focus=${this.timePartFocusHandler} @keydown=${m?d:void 0} role=spinbutton tabindex=0 ${o(this.hourRef)}>${S||x}</span><span class=${r(i.hourSuffix)}>${X}</span><span aria-label=${this.messages.minute??t} aria-valuemax=12 aria-valuemin=1 aria-valuenow=${(te&&parseInt($)||"0")??t} aria-valuetext=${$??t} class=${r({[i.empty]:!C,[i.input]:!0,[i.minute]:!0})} @focus=${this.timePartFocusHandler} @keydown=${m?v:void 0} role=spinbutton tabindex=0 ${o(this.minuteRef)}>${C||x}</span><span class=${r(i.minuteSuffix)}>${Y}</span>${re&&c`<span aria-label=${this.messages.second??t} aria-valuemax=59 aria-valuemin=0 aria-valuenow=${(ae&&parseInt(y)||"0")??t} aria-valuetext=${y??t} class=${r({[i.empty]:!F,[i.input]:!0,[i.second]:!0})} @focus=${this.timePartFocusHandler} @keydown=${m?g:void 0} role=spinbutton tabindex=0 ${o(this.secondRef)}>${F||x}</span>`||""}${H&&c`<span class=${r(i.decimalSeparator)}>${W}</span>`||""}${H&&c`<span aria-label=${this.messages.fractionalSecond??t} aria-valuemax=999 aria-valuemin=1 aria-valuenow=${(ee&&parseInt(n)||"0")??t} aria-valuetext=${k??t} class=${r({[i.empty]:!k,[i.fractionalSecond]:!0,[i.input]:!0})} @focus=${this.timePartFocusHandler} @keydown=${m?J:void 0} role=spinbutton tabindex=0 ${o(this.fractionalSecondRef)}>${k||"".padStart(h(this.step),"-")}</span>`||""}${I&&c`<span class=${r(i.secondSuffix)}>${I}</span>`||""}${R&&!T&&this.renderMeridiem()||""}</div>${!this.readOnly&&this.renderToggleIcon(this.open)||""}</div><calcite-popover auto-close .focusTrapDisabled=${this.focusTrapDisabled} .focusTrapOptions=${{initialFocus:!1}} .label=${e.chooseTime} lang=${this.messages._lang??t} offset-distance=0 @calcitePopoverBeforeClose=${this.popoverBeforeCloseHandler} @calcitePopoverBeforeOpen=${this.popoverBeforeOpenHandler} @calcitePopoverClose=${this.popoverCloseHandler} @calcitePopoverOpen=${this.popoverOpenHandler} .overlayPositioning=${this.overlayPositioning} .placement=${this.placement} pointer-disabled .referenceElement=${this.containerRef.value} trigger-disabled ${o(this.setCalcitePopoverEl)}><calcite-time-picker .hourFormat=${this.time.hourFormat} lang=${this.messages._lang??t} .messageOverrides=${this.messageOverrides} .numberingSystem=${this.numberingSystem} @calciteTimePickerChange=${this.timePickerChangeHandler} .scale=${this.scale} .step=${this.step} tabindex=${(this.open?void 0:-1)??t} .time=${this.time} .value=${this.value} ${o(this.timePickerRef)}></calcite-time-picker></calcite-popover>${this.validationMessage&&this.status==="invalid"?j({icon:this.validationIcon,id:f.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}renderMeridiem(){let{handleMeridiemKeyDownEvent:e,localizedMeridiem:s,meridiem:a}=this.time,n=!this.disabled&&!this.readOnly;return c`<span aria-label=${this.messages.meridiem??t} aria-valuemax=2 aria-valuemin=1 aria-valuenow=${a==="PM"&&"2"||"1"} aria-valuetext=${a??t} class=${r({[i.empty]:!s,[i.input]:!0,[i.meridiem]:!0})} @focus=${this.timePartFocusHandler} @keydown=${n?e:void 0} role=spinbutton tabindex=0 ${o(this.meridiemRef)}>${s||"--"}</span>`}renderToggleIcon(e){return c`<span class=${r(i.toggleIcon)} @click=${this.toggleIconClickHandler}><calcite-icon .icon=${e?w.chevronUp:w.chevronDown} .scale=${B(this.scale)}></calcite-icon></span>`}};M("calcite-input-time-picker",P);export{P as InputTimePicker};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{b as r}from"./
|
|
2
|
+
import{b as r}from"./PXTG7ABV.js";var n=0,u="",f=()=>{function t(){n++,n===1&&(u=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden")}function o(){n--,n===0&&(document.documentElement.style.overflow=u)}return r((e,l)=>{l.onConnected(()=>{e.opened&&e.preventDocumentScroll&&t()}),l.onUpdate(d=>{e.hasUpdated&&(d.has("opened")&&e.preventDocumentScroll?e.opened?t():o():d.has("preventDocumentScroll")&&e.opened&&(e.preventDocumentScroll?t():o()))}),l.onDisconnected(()=>{e.opened&&e.preventDocumentScroll&&o()})})};export{f as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as p,b as $,c as S}from"./DNYAPW4C.js";import{a as v}from"./
|
|
2
|
+
import{a as p,b as $,c as S}from"./DNYAPW4C.js";import{a as v}from"./YMG56BXS.js";import{c as m}from"./RRXOB3GM.js";import{c as M}from"./G52BPUIA.js";import{a as x}from"./RVUTGHRC.js";import"./RH6ZIP65.js";import"./PXTG7ABV.js";import"./QJEHQ7YA.js";import{s as b}from"./ZNU4R72A.js";import"./OAOQ5BXS.js";import{G as g,H as A,S as y,g as f,h,p as l}from"./XKVBSCBE.js";var a=(n,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(n,e,t),t);function C(n){return(e,t)=>{let{slot:i,selector:o}=n??{},s="slot"+(i?`[name=${i}]`:":not([name])");return a(e,t,{get(){let r=this.renderRoot?.querySelector(s),c=r?.assignedElements(n)??[];return o===void 0?c:c.filter((d=>d.matches(o)))}})}}var E=f`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([scale=s]){--calcite-internal-action-group-gap: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-group-gap: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-group-gap: var(--calcite-spacing-sm-plus)}:host{display:flex;flex-direction:column;padding:0;background-color:transparent;border-color:var(--calcite-action-group-border-color, var(--calcite-color-border-3));border-style:solid;border-width:0;gap:var(--calcite-internal-action-group-gap)}.container{display:flex;flex-grow:1;flex-direction:column;gap:inherit}:host([columns="1"]){--calcite-internal-action-group-columns: 1}:host([columns="2"]){--calcite-internal-action-group-columns: 2}:host([columns="3"]){--calcite-internal-action-group-columns: 3}:host([columns="4"]){--calcite-internal-action-group-columns: 4}:host([columns="5"]){--calcite-internal-action-group-columns: 5}:host([columns="6"]){--calcite-internal-action-group-columns: 6}:host(:first-child){padding-block-start:0px}:host([layout=horizontal]),:host([layout=horizontal]) .container{flex-direction:row}:host([layout=grid]){display:grid}:host([layout=grid]) .container{display:grid;place-content:stretch;background-color:transparent;gap:var(--calcite-action-group-gap, var(--calcite-internal-action-group-gap));grid-template-columns:repeat(var(--calcite-action-group-columns, var(--calcite-internal-action-group-columns, 3)),auto);padding:var(--calcite-action-group-gap, 1px)}:host([layout=horizontal]) ::slotted(calcite-action-group){border-inline-end:var(--calcite-size-px)}:host([hidden]){display:none}[hidden]{display:none}`,k=Object.defineProperty,P=(n,e,t,i)=>{for(var o=void 0,s=n.length-1,r;s>=0;s--)(r=n[s])&&(o=r(e,t,o)||o);return o&&k(e,t,o),o},u=class extends g{constructor(){super(),this.messages=v(),this.focusSetter=x()(this),this.hasMenuActions=!1,this.expanded=!1,this.layout="vertical",this.menuOpen=!1,this.overlayPositioning="absolute",this.scale="m",this.selectionMode="none",this.topLayerDisabled=!1,this.selectedActions=[],this.calciteActionGroupCollapse=l({cancelable:!1}),this.calciteActionGroupExpand=l({cancelable:!1}),this.calciteActionGroupChange=l({cancelable:!1}),this.listen("click",this.handleActionClick)}static{this.properties={hasMenuActions:[16,{},{state:!0}],columns:[11,{},{type:Number,reflect:!0}],expanded:[7,{},{reflect:!0,type:Boolean}],label:1,layout:[3,{},{reflect:!0}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],selectedActions:[0,{},{attribute:!1}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=E}async setFocus(e){return this.focusSetter(()=>this.el,e)}willUpdate(e){if(this.hasUpdated||e.has("selectionMode")){if(this.selectionMode!=="none"?this.setRoleOnActions():this.selectionMode==="none"&&this.clearActionAriaAttributes(),this.selectionMode==="single"||this.selectionMode==="single-persist"){let t=this.actions?.filter(i=>i.active)??[];t.length>1&&this.actions.forEach(i=>this.updateAction(i,i===t[t.length-1]))}this.updateSelectedActions(this.selectionMode==="none"?[]:this.actions?.filter(t=>t.active)??[])}e.has("expanded")&&((this.hasUpdated||this.expanded!==!1)&&(this.menuOpen=!1),this.hasUpdated&&(this.expanded?this.calciteActionGroupExpand.emit():this.calciteActionGroupCollapse.emit()))}setActiveAction(e,t){if(this.selectionMode==="multiple"){let i=!t.active;this.updateAction(t,i),this.updateSelectedActions(this.actions.filter(o=>o.active)),this.calciteActionGroupChange.emit();return}if(this.selectionMode==="single"){let i=!t.active;this.actions.forEach((o,s)=>this.updateAction(o,s===e&&i)),this.updateSelectedActions(this.actions.filter(o=>o.active)),this.calciteActionGroupChange.emit();return}if(this.selectionMode==="single-persist"){this.actions[e].active||(this.actions.forEach((i,o)=>this.updateAction(i,o===e)),this.updateSelectedActions([t]),this.calciteActionGroupChange.emit());return}}setMenuOpen(e){this.menuOpen=!!e.currentTarget.open}handleMenuActionsSlotChange(e){this.hasMenuActions=b(e)}handleActionClick(e){let t=e.composedPath().find(o=>M(o));if(!t||t.disabled)return;let i=this.actions.indexOf(t);i===-1||this.selectionMode==="none"||this.setActiveAction(i,t)}setRoleOnActions(){this.actions.forEach(e=>{e.aria={...e.aria,role:this.selectionMode==="single"||this.selectionMode==="single-persist"?"radio":"checkbox"},this.setActionAriaChecked(e,e.active)})}setActionAriaChecked(e,t){e.aria={...e.aria,checked:t?"true":"false"}}clearActionAriaAttributes(){this.selectionMode==="none"&&this.actions.forEach(e=>{e.aria&&(e.aria.checked=void 0,e.aria.role=void 0,e.aria={...e.aria})})}updateAction(e,t){e.active=t,this.setActionAriaChecked(e,t)}updateSelectedActions(e){let t=this.selectedActions;t.length===e.length&&t.every((o,s)=>o===e[s])||(this.selectedActions=e)}renderMenu(){let{expanded:e,menuOpen:t,scale:i,layout:o,messages:s,overlayPositioning:r,hasMenuActions:c,menuFlipPlacements:d,menuPlacement:O}=this;return h`<calcite-action-menu .expanded=${e} .flipPlacements=${d??(o==="horizontal"?["top","bottom"]:["left","right"])} .hidden=${!c} .label=${s.more} @calciteActionMenuOpen=${this.setMenuOpen} .open=${t} .overlayPositioning=${r} .placement=${O??(o==="horizontal"?"bottom-start":"leading-start")} .scale=${i} .topLayerDisabled=${this.topLayerDisabled}><calcite-action .aria=${{expanded:e}} .icon=${$.menu} .scale=${i} slot=${m.trigger} .text=${s.more} .textEnabled=${e}></calcite-action><slot name=${p.menuActions} @slotchange=${this.handleMenuActionsSlotChange}></slot><slot name=${p.menuTooltip} slot=${m.tooltip}></slot></calcite-action-menu>`}render(){return h`<div .ariaLabel=${this.label} class=${A(S.container)} .role=${this.selectionMode==="multiple"||this.selectionMode==="none"?"group":"radiogroup"}><slot></slot>${this.renderMenu()}</div>`}};P([C({selector:"calcite-action"})],u.prototype,"actions");y("calcite-action-group",u);export{u as ActionGroup};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as o,b as r,f as d}from"./
|
|
2
|
+
import{a as o,b as r,f as d}from"./FFK3DJRR.js";import"./ZNU4R72A.js";import"./OAOQ5BXS.js";import{G as n,H as c,S as s,g as a,h as l,p as i}from"./XKVBSCBE.js";var h={container:"container"},b=a`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}:host([alignment=start]){text-align:start}:host([alignment=end]){text-align:end}:host([alignment=center]){text-align:center}:host([scale=s]) .container{gap:.25rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);margin-block-end:var(--calcite-label-margin-bottom, .5rem)}:host([scale=m]) .container{gap:.5rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);margin-block-end:var(--calcite-label-margin-bottom, .75rem)}:host([scale=l]) .container{gap:.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);margin-block-end:var(--calcite-label-margin-bottom, 1rem)}:host .container{margin-inline:0px;margin-block-start:0px;inline-size:100%;line-height:1.375;color:var(--calcite-color-text-1);color:var(--calcite-label-text-color, var(--calcite-color-text-1))}:host([layout=block]) .container,:host([layout=default]) .container{display:flex;flex-direction:column}:host([layout=inline]) .container,:host([layout=inline-space-between]) .container{display:flex;flex-direction:row;align-items:center;gap:.5rem}:host([layout=inline][scale=l]) .container{gap:.75rem}:host([layout=inline-space-between]) .container{justify-content:space-between}:host([disabled])>.container{opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted(*[disabled]),:host([disabled]) ::slotted(*[disabled] *){--tw-bg-opacity: 1}:host([disabled]) ::slotted(calcite-input-message:not([active])){--tw-bg-opacity: 0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,t=class extends n{constructor(){super(),this.alignment="start",this.layout="default",this.scale="m",this.calciteInternalLabelClick=i({bubbles:!1,cancelable:!1}),this.listen("click",this.labelClickHandler)}static{this.properties={alignment:[3,{},{reflect:!0}],for:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=b}connectedCallback(){super.connectedCallback(),document.dispatchEvent(new CustomEvent(o))}willUpdate(e){e.has("for")&&d(this.el)}disconnectedCallback(){super.disconnectedCallback(),document.dispatchEvent(new CustomEvent(r))}labelClickHandler(e){window.getSelection()?.type!=="Range"&&this.calciteInternalLabelClick.emit({sourceEvent:e})}render(){return l`<div class=${c(h.container)}><slot></slot></div>`}};s("calcite-label",t);export{t as Label};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as I,t as g}from"./DSQ47C3C.js";import"./CUJ2U3RS.js";import{a as k}from"./266C6B7L.js";import{a as C}from"./H7DBKEAC.js";import{a as z}from"./HSOVQWPY.js";import"./RH6ZIP65.js";import"./UELBFRKC.js";import"./2YBB7MN2.js";import{s as x}from"./NDYF2A3V.js";import"./OAOQ5BXS.js";import{E as S,F as $,G as b,H as s,S as y,g as m,h as l,i as o,l as i,p as d}from"./YJYV5YC2.js";var t={imageContainer:"image-container",container:"container",selectable:"selectable",nonInteractive:"non-interactive",selected:"selected",internalSvgContainer:"internal-svg-container",internalSvgDisabled:"internal-svg-disabled",internalSvgEmpty:"internal-svg-empty",swatch:"swatch",checker:"checker",noColorSwatch:"swatch--no-color"},D={image:"image"},E=4,n={squareSize:E,size:E*2},w={checker:"checker",shape:"shape",swatchRect:"swatch-rect",swatchSolid:"swatch-solid",swatchTransparent:"swatch-transparent"},P=m`:host{display:block;--calcite-internal-swatch-inset: var(--calcite-spacing-xxs)}:host([scale=s]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xl)}:host([scale=m]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xxl)}:host([scale=l]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xxxl)}.container{position:relative;box-sizing:border-box;justify-content:center;overflow:hidden;outline-color:transparent;font-size:var(--calcite-internal-swatch-font-size, var(--calcite-font-size));block-size:var(--calcite-internal-swatch-size, auto);inline-size:var(--calcite-internal-swatch-size, auto);min-inline-size:var(--calcite-internal-swatch-size, auto);border-radius:var(--calcite-swatch-corner-radius, 0)}.container:not(.non-interactive):hover{cursor:pointer;box-shadow:0 0 0 var(--calcite-border-width-md) var(--calcite-color-border-1)}.container.selectable{cursor:pointer}.container:not(.non-interactive):focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.swatch{position:absolute;display:inline-flex;overflow:hidden;z-index:calc(var(--calcite-z-index) + 1);block-size:var(--calcite-internal-swatch-size, auto);inline-size:var(--calcite-internal-swatch-size, auto);min-inline-size:var(--calcite-internal-swatch-size, auto);border-radius:var(--calcite-swatch-corner-radius, 0)}:host([selected]) .swatch{inset:var(--calcite-internal-swatch-inset);block-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset));inline-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset));min-inline-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset))}:host([selected]) .container{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-color-text-1),inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-color-foreground-1)}:host([selected]) .image-container{inset:var(--calcite-internal-swatch-inset)}.image-container{position:absolute;display:inline-flex;overflow:hidden;z-index:calc(var(--calcite-z-index) + 2);inset:var(--calcite-spacing-px);display:flex;align-items:center;justify-content:center;pointer-events:none;border-radius:var(--calcite-swatch-corner-radius, 0)}.internal-svg-container{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:calc(var(--calcite-z-index) + 2)}.swatch{overflow:hidden;block-size:inherit;inline-size:inherit}.swatch--no-color rect{fill:var(--calcite-color-foreground-1)}:host([selected]) #swatch-rect,:host([selected]) #swatch-solid,:host([selected]) #swatch-transparent{stroke-width:0}#swatch-rect,#swatch-solid,#swatch-transparent{stroke:var(--calcite-color-text-1);stroke-width:var(--calcite-border-width-md);stroke-opacity:.3;rx:var(--calcite-swatch-corner-radius)}.internal-svg-disabled{stroke:#6a6a6a;fill:#fff}.internal-svg-empty{stroke:var(--calcite-color-status-danger);stroke-width:3}.checker{fill:#cacaca}:host([hidden]){display:none}[hidden]{display:none}`,u=class extends b{constructor(){super(),this.containerRef=S(),this.focusSetter=z()(this),this.interactiveContainer=k(this),this.hasImage=!1,this.disabled=!1,this.interactive=!1,this.scale="m",this.selected=!1,this.selectionMode="none",this.calciteInternalSwatchKeyEvent=d({cancelable:!1}),this.calciteInternalSwatchSelect=d({cancelable:!1}),this.calciteInternalSyncSelectedSwatches=d({cancelable:!1}),this.calciteSwatchSelect=d({cancelable:!1}),this.listen("keydown",this.keyDownHandler)}static{this.properties={hasImage:[16,{},{state:!0}],color:1,disabled:[7,{},{reflect:!0,type:Boolean}],interactive:[5,{},{type:Boolean}],label:1,parentSwatchGroup:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:1,value:1}}static{this.styles=P}async setFocus(e){return this.focusSetter(()=>this.el,e)}async load(){this.handleColorChange(this.color)}willUpdate(e){e.has("selected")&&this.hasUpdated&&this.watchSelected(this.selected),e.has("color")&&this.handleColorChange(this.color)}loaded(){this.selectionMode!=="none"&&this.interactive&&this.selected&&this.handleSelectionPropertyChange(this.selected)}watchSelected(e){this.selectionMode!=="none"&&this.handleSelectionPropertyChange(e)}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.handleEmittingEvent(),e.preventDefault();break;case"ArrowRight":case"ArrowLeft":case"Home":case"End":this.calciteInternalSwatchKeyEvent.emit(e),e.preventDefault();break}}handleSlotImageChange(e){this.hasImage=x(e)}handleEmittingEvent(){this.interactive&&this.calciteSwatchSelect.emit()}handleSelectionPropertyChange(e){this.selectionMode==="single"&&this.calciteInternalSyncSelectedSwatches.emit(),!this.parentSwatchGroup.selectedItems.includes(this.el)&&e&&this.selectionMode!=="multiple"&&this.calciteInternalSwatchSelect.emit(),this.selectionMode!=="single"&&this.calciteInternalSyncSelectedSwatches.emit()}handleColorChange(e){this.internalColor=e?I(e):null}renderSwatchImage(){return l`<div class=${s(t.imageContainer)}><slot name=${D.image} @slotchange=${this.handleSlotImageChange}></slot></div>`}renderEmptyDisplay(){let e=this.scale==="s"?"12":this.scale==="m"?"16":"20";return l`<div class=${s(t.internalSvgContainer)}><svg fill=none height=${e??i} viewBox=${`0 0 ${e} ${e}`} width=${e??i} xmlns=http://www.w3.org/2000/svg>${o`<path class=${s(t.internalSvgEmpty)} d=${`M${e} 0L0 ${e}`} />`}</svg></div>`}renderDisabledDisplay(){let e=l`<svg fill=none height=14 viewBox="0 0 14 14" width=14 xmlns=http://www.w3.org/2000/svg>${o`<path class=${s(t.internalSvgDisabled)} d="M7 0.5C10.5899 0.5 13.5 3.41015 13.5 7C13.5 10.5899 10.5899 13.5 7 13.5C3.41015 13.5 0.5 10.5899 0.5 7C0.5 3.41015 3.41015 0.5 7 0.5ZM4.78906 10.917C5.44221 11.2866 6.19529 11.5 7 11.5C9.48528 11.5 11.5 9.48528 11.5 7C11.5 6.19529 11.2866 5.44221 10.917 4.78906L4.78906 10.917ZM7 2.5C4.51472 2.5 2.5 4.51472 2.5 7C2.5 7.95644 2.79808 8.84235 3.30664 9.57129L9.57129 3.30664C8.84235 2.79808 7.95644 2.5 7 2.5Z" />`}</svg>`,a=l`<svg fill=none height=18 viewBox="0 0 18 18" width=18 xmlns=http://www.w3.org/2000/svg>${o`<path class=${s(t.internalSvgDisabled)} d="M9 0.5C13.6944 0.5 17.5 4.30558 17.5 9C17.5 13.6944 13.6944 17.5 9 17.5C4.30558 17.5 0.5 13.6944 0.5 9C0.5 4.30558 4.30558 0.5 9 0.5ZM5.78125 14.2588C6.71828 14.8337 7.81941 15.167 9 15.167C12.4058 15.167 15.167 12.4058 15.167 9C15.167 7.81941 14.8337 6.71828 14.2588 5.78125L5.78125 14.2588ZM9 2.83301C5.59424 2.83301 2.83301 5.59424 2.83301 9C2.83301 10.3817 3.28731 11.6565 4.05469 12.6846L12.6846 4.05469C11.6565 3.28731 10.3817 2.83301 9 2.83301Z" />`}</svg>`;return l`<div class=${s(t.internalSvgContainer)}>${this.scale==="l"?a:e}</div>`}renderSwatch(){let{internalColor:e}=this,a="0",h=!e,c={height:"100%",rx:a,width:"100%"};if(h)return o`<clipPath id=${w.shape}><rect height=100% rx=${a} width=100% /></clipPath>${this.renderSwatchRect({clipPath:`inset(0 round "${a}")`,...c})}<line clip-path=url(#shape) x1=100% x2=0 y1=0 y2=100% />`;let r=e.alpha(),v=g(e),p=g(e,r<1);return o`<defs><pattern height=${n.size} id=${w.checker} patternUnits=userSpaceOnUse width=${n.size} x=0 y=0><rect class=${s(t.checker)} height=${n.squareSize} width=${n.squareSize} x=0 y=0 /><rect class=${s(t.checker)} height=${n.squareSize} width=${n.squareSize} x=${n.squareSize} y=${n.squareSize} /></pattern></defs>${this.renderSwatchRect({fill:"url(#checker)",rx:c.rx,height:c.height,width:c.width})}${this.renderSwatchRect({clipPath:r<1?"polygon(100% 0, 0 0, 0 100%)":`inset(0 round "${a}")`,fill:v,id:w.swatchSolid,...c})}${r<1?this.renderSwatchRect({clipPath:"polygon(100% 0, 100% 100%, 0 100%)",fill:p,id:w.swatchTransparent,key:"opacity-fill",...c}):null}`}renderSwatchRect({clipPath:e,fill:a,height:h,key:c,rx:r,stroke:v,strokeWidth:p,width:M,id:f}){return C(c,o`<rect clip-path=${e??i} fill=${a??i} height=${h??i} id=${(f||w.swatchRect)??i} rx=${r??i} stroke=${v??i} stroke-width=${p??i} width=${M??i} />`)}render(){let{disabled:e}=this,a=e||!e&&!this.interactive,h=this.selectionMode==="multiple"&&this.interactive?"checkbox":this.selectionMode!=="none"&&this.interactive?"radio":this.interactive?"button":"presentation",c=!this.internalColor,r={[t.swatch]:!0,[t.noColorSwatch]:c||this.hasImage&&!this.internalColor};return this.interactiveContainer({disabled:e,children:l`<div .ariaChecked=${this.selectionMode!=="none"&&this.interactive?this.selected:void 0} .ariaLabel=${h!=="presentation"?this.label:""} class=${s({[t.container]:!0,[t.selectable]:this.selectionMode!=="none",[t.selected]:this.selected,[t.nonInteractive]:!this.interactive})} @click=${this.handleEmittingEvent} .role=${h} .tabIndex=${a?-1:0} title=${this.label??i} ${$(this.containerRef)}>${this.renderSwatchImage()}${!this.internalColor&&!this.hasImage&&this.renderEmptyDisplay()||""}${this.disabled&&this.renderDisabledDisplay()||""}<svg class=${s(r)} role=presentation xmlns=http://www.w3.org/2000/svg>${this.renderSwatch()}</svg></div>`})}};y("calcite-swatch",u);export{u as Swatch};
|
|
2
|
+
import{a as I,t as g}from"./DSQ47C3C.js";import"./CUJ2U3RS.js";import{a as k}from"./7WQHPXCF.js";import{a as C}from"./UX5ODKM3.js";import{a as z}from"./RVUTGHRC.js";import"./RH6ZIP65.js";import"./PXTG7ABV.js";import"./QJEHQ7YA.js";import{s as x}from"./ZNU4R72A.js";import"./OAOQ5BXS.js";import{E as S,F as $,G as b,H as s,S as y,g as m,h as l,i as o,l as i,p as d}from"./XKVBSCBE.js";var t={imageContainer:"image-container",container:"container",selectable:"selectable",nonInteractive:"non-interactive",selected:"selected",internalSvgContainer:"internal-svg-container",internalSvgDisabled:"internal-svg-disabled",internalSvgEmpty:"internal-svg-empty",swatch:"swatch",checker:"checker",noColorSwatch:"swatch--no-color"},D={image:"image"},E=4,n={squareSize:E,size:E*2},w={checker:"checker",shape:"shape",swatchRect:"swatch-rect",swatchSolid:"swatch-solid",swatchTransparent:"swatch-transparent"},P=m`:host{display:block;--calcite-internal-swatch-inset: var(--calcite-spacing-xxs)}:host([scale=s]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xl)}:host([scale=m]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xxl)}:host([scale=l]) .container{--calcite-internal-swatch-size: var(--calcite-spacing-xxxl)}.container{position:relative;box-sizing:border-box;justify-content:center;overflow:hidden;outline-color:transparent;font-size:var(--calcite-internal-swatch-font-size, var(--calcite-font-size));block-size:var(--calcite-internal-swatch-size, auto);inline-size:var(--calcite-internal-swatch-size, auto);min-inline-size:var(--calcite-internal-swatch-size, auto);border-radius:var(--calcite-swatch-corner-radius, 0)}.container:not(.non-interactive):hover{cursor:pointer;box-shadow:0 0 0 var(--calcite-border-width-md) var(--calcite-color-border-1)}.container.selectable{cursor:pointer}.container:not(.non-interactive):focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.swatch{position:absolute;display:inline-flex;overflow:hidden;z-index:calc(var(--calcite-z-index) + 1);block-size:var(--calcite-internal-swatch-size, auto);inline-size:var(--calcite-internal-swatch-size, auto);min-inline-size:var(--calcite-internal-swatch-size, auto);border-radius:var(--calcite-swatch-corner-radius, 0)}:host([selected]) .swatch{inset:var(--calcite-internal-swatch-inset);block-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset));inline-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset));min-inline-size:calc(var(--calcite-internal-swatch-size, auto) - 2 * var(--calcite-internal-swatch-inset))}:host([selected]) .container{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-color-text-1),inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-color-foreground-1)}:host([selected]) .image-container{inset:var(--calcite-internal-swatch-inset)}.image-container{position:absolute;display:inline-flex;overflow:hidden;z-index:calc(var(--calcite-z-index) + 2);inset:var(--calcite-spacing-px);display:flex;align-items:center;justify-content:center;pointer-events:none;border-radius:var(--calcite-swatch-corner-radius, 0)}.internal-svg-container{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:calc(var(--calcite-z-index) + 2)}.swatch{overflow:hidden;block-size:inherit;inline-size:inherit}.swatch--no-color rect{fill:var(--calcite-color-foreground-1)}:host([selected]) #swatch-rect,:host([selected]) #swatch-solid,:host([selected]) #swatch-transparent{stroke-width:0}#swatch-rect,#swatch-solid,#swatch-transparent{stroke:var(--calcite-color-text-1);stroke-width:var(--calcite-border-width-md);stroke-opacity:.3;rx:var(--calcite-swatch-corner-radius)}.internal-svg-disabled{stroke:#6a6a6a;fill:#fff}.internal-svg-empty{stroke:var(--calcite-color-status-danger);stroke-width:3}.checker{fill:#cacaca}:host([hidden]){display:none}[hidden]{display:none}`,u=class extends b{constructor(){super(),this.containerRef=S(),this.focusSetter=z()(this),this.interactiveContainer=k(this),this.hasImage=!1,this.disabled=!1,this.interactive=!1,this.scale="m",this.selected=!1,this.selectionMode="none",this.calciteInternalSwatchKeyEvent=d({cancelable:!1}),this.calciteInternalSwatchSelect=d({cancelable:!1}),this.calciteInternalSyncSelectedSwatches=d({cancelable:!1}),this.calciteSwatchSelect=d({cancelable:!1}),this.listen("keydown",this.keyDownHandler)}static{this.properties={hasImage:[16,{},{state:!0}],color:1,disabled:[7,{},{reflect:!0,type:Boolean}],interactive:[5,{},{type:Boolean}],label:1,parentSwatchGroup:[0,{},{attribute:!1}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:1,value:1}}static{this.styles=P}async setFocus(e){return this.focusSetter(()=>this.el,e)}async load(){this.handleColorChange(this.color)}willUpdate(e){e.has("selected")&&this.hasUpdated&&this.watchSelected(this.selected),e.has("color")&&this.handleColorChange(this.color)}loaded(){this.selectionMode!=="none"&&this.interactive&&this.selected&&this.handleSelectionPropertyChange(this.selected)}watchSelected(e){this.selectionMode!=="none"&&this.handleSelectionPropertyChange(e)}keyDownHandler(e){if(e.target===this.el)switch(e.key){case" ":case"Enter":this.handleEmittingEvent(),e.preventDefault();break;case"ArrowRight":case"ArrowLeft":case"Home":case"End":this.calciteInternalSwatchKeyEvent.emit(e),e.preventDefault();break}}handleSlotImageChange(e){this.hasImage=x(e)}handleEmittingEvent(){this.interactive&&this.calciteSwatchSelect.emit()}handleSelectionPropertyChange(e){this.selectionMode==="single"&&this.calciteInternalSyncSelectedSwatches.emit(),!this.parentSwatchGroup.selectedItems.includes(this.el)&&e&&this.selectionMode!=="multiple"&&this.calciteInternalSwatchSelect.emit(),this.selectionMode!=="single"&&this.calciteInternalSyncSelectedSwatches.emit()}handleColorChange(e){this.internalColor=e?I(e):null}renderSwatchImage(){return l`<div class=${s(t.imageContainer)}><slot name=${D.image} @slotchange=${this.handleSlotImageChange}></slot></div>`}renderEmptyDisplay(){let e=this.scale==="s"?"12":this.scale==="m"?"16":"20";return l`<div class=${s(t.internalSvgContainer)}><svg fill=none height=${e??i} viewBox=${`0 0 ${e} ${e}`} width=${e??i} xmlns=http://www.w3.org/2000/svg>${o`<path class=${s(t.internalSvgEmpty)} d=${`M${e} 0L0 ${e}`} />`}</svg></div>`}renderDisabledDisplay(){let e=l`<svg fill=none height=14 viewBox="0 0 14 14" width=14 xmlns=http://www.w3.org/2000/svg>${o`<path class=${s(t.internalSvgDisabled)} d="M7 0.5C10.5899 0.5 13.5 3.41015 13.5 7C13.5 10.5899 10.5899 13.5 7 13.5C3.41015 13.5 0.5 10.5899 0.5 7C0.5 3.41015 3.41015 0.5 7 0.5ZM4.78906 10.917C5.44221 11.2866 6.19529 11.5 7 11.5C9.48528 11.5 11.5 9.48528 11.5 7C11.5 6.19529 11.2866 5.44221 10.917 4.78906L4.78906 10.917ZM7 2.5C4.51472 2.5 2.5 4.51472 2.5 7C2.5 7.95644 2.79808 8.84235 3.30664 9.57129L9.57129 3.30664C8.84235 2.79808 7.95644 2.5 7 2.5Z" />`}</svg>`,a=l`<svg fill=none height=18 viewBox="0 0 18 18" width=18 xmlns=http://www.w3.org/2000/svg>${o`<path class=${s(t.internalSvgDisabled)} d="M9 0.5C13.6944 0.5 17.5 4.30558 17.5 9C17.5 13.6944 13.6944 17.5 9 17.5C4.30558 17.5 0.5 13.6944 0.5 9C0.5 4.30558 4.30558 0.5 9 0.5ZM5.78125 14.2588C6.71828 14.8337 7.81941 15.167 9 15.167C12.4058 15.167 15.167 12.4058 15.167 9C15.167 7.81941 14.8337 6.71828 14.2588 5.78125L5.78125 14.2588ZM9 2.83301C5.59424 2.83301 2.83301 5.59424 2.83301 9C2.83301 10.3817 3.28731 11.6565 4.05469 12.6846L12.6846 4.05469C11.6565 3.28731 10.3817 2.83301 9 2.83301Z" />`}</svg>`;return l`<div class=${s(t.internalSvgContainer)}>${this.scale==="l"?a:e}</div>`}renderSwatch(){let{internalColor:e}=this,a="0",h=!e,c={height:"100%",rx:a,width:"100%"};if(h)return o`<clipPath id=${w.shape}><rect height=100% rx=${a} width=100% /></clipPath>${this.renderSwatchRect({clipPath:`inset(0 round "${a}")`,...c})}<line clip-path=url(#shape) x1=100% x2=0 y1=0 y2=100% />`;let r=e.alpha(),v=g(e),p=g(e,r<1);return o`<defs><pattern height=${n.size} id=${w.checker} patternUnits=userSpaceOnUse width=${n.size} x=0 y=0><rect class=${s(t.checker)} height=${n.squareSize} width=${n.squareSize} x=0 y=0 /><rect class=${s(t.checker)} height=${n.squareSize} width=${n.squareSize} x=${n.squareSize} y=${n.squareSize} /></pattern></defs>${this.renderSwatchRect({fill:"url(#checker)",rx:c.rx,height:c.height,width:c.width})}${this.renderSwatchRect({clipPath:r<1?"polygon(100% 0, 0 0, 0 100%)":`inset(0 round "${a}")`,fill:v,id:w.swatchSolid,...c})}${r<1?this.renderSwatchRect({clipPath:"polygon(100% 0, 100% 100%, 0 100%)",fill:p,id:w.swatchTransparent,key:"opacity-fill",...c}):null}`}renderSwatchRect({clipPath:e,fill:a,height:h,key:c,rx:r,stroke:v,strokeWidth:p,width:M,id:f}){return C(c,o`<rect clip-path=${e??i} fill=${a??i} height=${h??i} id=${(f||w.swatchRect)??i} rx=${r??i} stroke=${v??i} stroke-width=${p??i} width=${M??i} />`)}render(){let{disabled:e}=this,a=e||!e&&!this.interactive,h=this.selectionMode==="multiple"&&this.interactive?"checkbox":this.selectionMode!=="none"&&this.interactive?"radio":this.interactive?"button":"presentation",c=!this.internalColor,r={[t.swatch]:!0,[t.noColorSwatch]:c||this.hasImage&&!this.internalColor};return this.interactiveContainer({disabled:e,children:l`<div .ariaChecked=${this.selectionMode!=="none"&&this.interactive?this.selected:void 0} .ariaLabel=${h!=="presentation"?this.label:""} class=${s({[t.container]:!0,[t.selectable]:this.selectionMode!=="none",[t.selected]:this.selected,[t.nonInteractive]:!this.interactive})} @click=${this.handleEmittingEvent} .role=${h} .tabIndex=${a?-1:0} title=${this.label??i} ${$(this.containerRef)}>${this.renderSwatchImage()}${!this.internalColor&&!this.hasImage&&this.renderEmptyDisplay()||""}${this.disabled&&this.renderDisabledDisplay()||""}<svg class=${s(r)} role=presentation xmlns=http://www.w3.org/2000/svg>${this.renderSwatch()}</svg></div>`})}};y("calcite-swatch",u);export{u as Swatch};
|