@esri/calcite-components 5.1.0-next.13 → 5.1.0-next.15
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/{3CTEG5OC.js → 2DCOA5UA.js} +1 -1
- package/dist/cdn/{HBYLZDXS.js → 2KY7DYIH.js} +1 -1
- package/dist/cdn/{GREPCYAX.js → 2RYH2CHU.js} +1 -1
- package/dist/cdn/{RHWJ6NSV.js → 2UEIPPER.js} +1 -1
- package/dist/cdn/{XQHQLW6O.js → 3FZO5ITQ.js} +1 -1
- package/dist/cdn/{TG26BQOY.js → 3KFZ55VT.js} +1 -1
- package/dist/cdn/{FTYQVE6T.js → 3W7VP7HE.js} +1 -1
- package/dist/cdn/{4MJZVDBE.js → 3X336DIS.js} +1 -1
- package/dist/cdn/{P3YCPKWZ.js → 4SEEGBKC.js} +1 -1
- package/dist/cdn/{C6TU2KHO.js → 4T4BV6K6.js} +1 -1
- package/dist/cdn/{5SIZALLU.js → 4UAMQFFR.js} +1 -1
- package/dist/cdn/{R76W6LVB.js → 4W74V7DC.js} +1 -1
- package/dist/cdn/{DIO5CFXN.js → 54IJ3SL3.js} +1 -1
- package/dist/cdn/{OYHIOHY2.js → 5I4OILXS.js} +1 -1
- package/dist/cdn/{CZI7XFN5.js → 5KFIPPPQ.js} +1 -1
- package/dist/cdn/{7NUEP656.js → 5TDCCZEY.js} +1 -1
- package/dist/cdn/{JMLADU7B.js → 6ETWDILO.js} +1 -1
- package/dist/cdn/{7UHIUVY4.js → 6FVJOB4R.js} +1 -1
- package/dist/cdn/{MVEASF4W.js → 6O2UN6DN.js} +1 -1
- package/dist/cdn/{5DE4KVRT.js → 6XBR3S53.js} +1 -1
- package/dist/cdn/{4SEMQUI5.js → 6XW2PDRX.js} +1 -1
- package/dist/cdn/{OL3TMXKW.js → 75ATKXHA.js} +1 -1
- package/dist/cdn/{WLX2F73G.js → 7AVI4FCA.js} +1 -1
- package/dist/cdn/{IWHXGNSP.js → 7D5C4KII.js} +1 -1
- package/dist/cdn/{LPZOPIC7.js → 7NQ3MBQG.js} +1 -1
- package/dist/cdn/{J3SNZZCJ.js → 7P27FUD5.js} +1 -1
- package/dist/cdn/{4VET23BY.js → A36CQXBJ.js} +1 -1
- package/dist/cdn/{HFEHUBJG.js → A3UHAS2D.js} +1 -1
- package/dist/cdn/{XOV2BVZT.js → A7YFDGJD.js} +1 -1
- package/dist/cdn/{5U6XUVG5.js → ABYLWTVC.js} +1 -1
- package/dist/cdn/{CTDFMC2L.js → AZ4N2OYM.js} +1 -1
- package/dist/cdn/{SZG4V4PR.js → B56QWCLL.js} +1 -1
- package/dist/cdn/{LXYWLOXP.js → B7ZPUEFE.js} +1 -1
- package/dist/cdn/{26AV55CR.js → BA5G6ACP.js} +1 -1
- package/dist/cdn/{RIVYDVF4.js → C7ZSYMX3.js} +1 -1
- package/dist/cdn/{CU2Q4KA5.js → D2VK2HTY.js} +1 -1
- package/dist/cdn/{WSYLURBF.js → D7OFYNEJ.js} +1 -1
- package/dist/cdn/{H6VM2JWW.js → E4NOUNOC.js} +1 -1
- package/dist/cdn/{BKRP34YH.js → EHWW4JPS.js} +1 -1
- package/dist/cdn/{TRAYPJCJ.js → ENCUMBE3.js} +1 -1
- package/dist/cdn/{LPBE76CV.js → EOPG2UEL.js} +1 -1
- package/dist/cdn/{I5BK6WOV.js → EUHE3GFB.js} +1 -1
- package/dist/cdn/{DMSJWJ6R.js → F35GL6WY.js} +1 -1
- package/dist/cdn/{Y53Q6FTX.js → F73CB3TB.js} +1 -1
- package/dist/cdn/{T74NIOKP.js → FBLIQCWA.js} +1 -1
- package/dist/cdn/{JQERGOAL.js → FMPGUKB2.js} +1 -1
- package/dist/cdn/{6YQDVKXT.js → FVYFCI2F.js} +1 -1
- package/dist/cdn/{YTXB5BKT.js → FXPZMADL.js} +1 -1
- package/dist/cdn/{77PEJR7C.js → FY3BQ7K4.js} +1 -1
- package/dist/cdn/{CFLYSS5A.js → FZFSELPS.js} +1 -1
- package/dist/cdn/{R3L4IZ2G.js → GBD2OLUF.js} +1 -1
- package/dist/cdn/{NF5UERIW.js → GBUXBSRO.js} +1 -1
- package/dist/cdn/{TH3QUGNP.js → GFCVJQEA.js} +1 -1
- package/dist/cdn/{34SFIDVL.js → GJTS2CVP.js} +1 -1
- package/dist/cdn/{65UMC6GN.js → GMVQGZXI.js} +1 -1
- package/dist/cdn/{BIWKEWAN.js → GS4RLV6G.js} +1 -1
- package/dist/cdn/{4OAYJZ53.js → H76TD2BB.js} +1 -1
- package/dist/cdn/{7YACGPDW.js → HCIQRW7F.js} +1 -1
- package/dist/cdn/{IT6E2HBW.js → HM3GVBDV.js} +1 -1
- package/dist/cdn/{PIN2J3IM.js → HRO4MGYI.js} +1 -1
- package/dist/cdn/{32MLXVEN.js → HWU562L3.js} +1 -1
- package/dist/cdn/{CBMJ652S.js → HXQJCTFJ.js} +1 -1
- package/dist/cdn/I5VHKATD.js +2 -0
- package/dist/cdn/{N5PSKGBC.js → IXWLTC6O.js} +1 -1
- package/dist/cdn/JAPTF7LA.js +2 -0
- package/dist/cdn/{DGUJEZZ6.js → KBTKYHDZ.js} +1 -1
- package/dist/cdn/{NI5ZZ5GK.js → KBUAHIJC.js} +1 -1
- package/dist/cdn/{OK7CYG2Q.js → KJJLMIYU.js} +1 -1
- package/dist/cdn/{57MEVGHV.js → KK3OER3E.js} +1 -1
- package/dist/cdn/{N6I5ZZ32.js → KORMMJ2N.js} +1 -1
- package/dist/cdn/{UPJOLADB.js → KPUB4RP2.js} +1 -1
- package/dist/cdn/{PVZ3EPI5.js → KQGTYD7A.js} +1 -1
- package/dist/cdn/{YB5ZE5ZG.js → KZRJ6TV4.js} +1 -1
- package/dist/cdn/{VSPXRUNP.js → LQJIDTD6.js} +1 -1
- package/dist/cdn/{CRYMTY2R.js → LS5QZMBF.js} +1 -1
- package/dist/cdn/{2AOTS7JD.js → LUWYR22H.js} +1 -1
- package/dist/cdn/ME3AGBGM.js +2 -0
- package/dist/cdn/{VYW3GC6J.js → MS7PJOOT.js} +1 -1
- package/dist/cdn/{77NFNDVJ.js → N2GSEZRL.js} +1 -1
- package/dist/cdn/{MEZL5G6M.js → N42UQOQ3.js} +1 -1
- package/dist/cdn/{LMG7CPBB.js → NNFQKUXF.js} +1 -1
- package/dist/cdn/{65AMWD6E.js → NP4TMBCQ.js} +1 -1
- package/dist/cdn/{5V4DQQ57.js → O5ALAPKG.js} +1 -1
- package/dist/cdn/{JW5AXWSR.js → O5HMJNUH.js} +1 -1
- package/dist/cdn/{LA2L7YVD.js → OCVIOYHB.js} +1 -1
- package/dist/cdn/{YUCOJPIY.js → OFIY7JBW.js} +1 -1
- package/dist/cdn/{YS5CQELP.js → OUIZYSO4.js} +1 -1
- package/dist/cdn/{C3XJZW6F.js → OVMYSNQ5.js} +1 -1
- package/dist/cdn/{XEWTMJGZ.js → P22LY77P.js} +1 -1
- package/dist/cdn/{RRNENB44.js → PB3M64UA.js} +1 -1
- package/dist/cdn/{PDQH2ROR.js → PLYYZIGF.js} +1 -1
- package/dist/cdn/{VQUDSLKM.js → PSAUJDIR.js} +1 -1
- package/dist/cdn/{CLWPGJZ5.js → PX3U76TF.js} +1 -1
- package/dist/cdn/{MOEDIY3E.js → Q4OVNEQ6.js} +1 -1
- package/dist/cdn/{FDJ63ORN.js → QMVJJ6L6.js} +1 -1
- package/dist/cdn/{DVXV5ZRZ.js → QNOCTDQT.js} +1 -1
- package/dist/cdn/{M5JMQS42.js → QRNR56LX.js} +1 -1
- package/dist/cdn/{JHFKJ4Q3.js → QZP25E4C.js} +1 -1
- package/dist/cdn/{FPG2HELI.js → R6N66QFX.js} +1 -1
- package/dist/cdn/{UBRCSTEG.js → RFCRUEGF.js} +1 -1
- package/dist/cdn/{RAEAOYKN.js → RGCPRFLO.js} +1 -1
- package/dist/cdn/{OGRWDESZ.js → RQWWN3XR.js} +1 -1
- package/dist/cdn/{G362YMP6.js → RRUB2NBK.js} +1 -1
- package/dist/cdn/{LDTOD4DT.js → RRWK742V.js} +1 -1
- package/dist/cdn/{HAP5KF3X.js → RTIDRCBM.js} +1 -1
- package/dist/cdn/{POS6BZNF.js → S4IZS2QP.js} +1 -1
- package/dist/cdn/{4TGPM7I5.js → SDTETPFU.js} +1 -1
- package/dist/cdn/{I6C4ASCI.js → SITRXXOM.js} +1 -1
- package/dist/cdn/{X6QKKRKG.js → SJ6AYVIH.js} +1 -1
- package/dist/cdn/{JX3BHPF2.js → SKQLFFXS.js} +1 -1
- package/dist/cdn/{K4WKHSIF.js → T2BSRKVZ.js} +1 -1
- package/dist/cdn/{CSXQ5Z4G.js → TJKL3NK7.js} +1 -1
- package/dist/cdn/{VGQRSLHP.js → TK35IRH2.js} +1 -1
- package/dist/cdn/{MHQCKR37.js → TMGGZMRJ.js} +1 -1
- package/dist/cdn/{M5HZRKR3.js → TQ45B5IZ.js} +1 -1
- package/dist/cdn/{JZFKU2ZM.js → TW25QJY7.js} +1 -1
- package/dist/cdn/{VXVQYSN5.js → UBL3MVBI.js} +1 -1
- package/dist/cdn/{NTGSDL2N.js → VCQ47UCT.js} +1 -1
- package/dist/cdn/{G3JTRJUS.js → VK4VN3AU.js} +1 -1
- package/dist/cdn/{KOFCDN3E.js → VRCLTSNM.js} +1 -1
- package/dist/cdn/{CDQOPSGR.js → VWAFFNRP.js} +1 -1
- package/dist/cdn/{C2E2OXI7.js → VWAMHAGD.js} +1 -1
- package/dist/cdn/{PMFWKUV5.js → VZAIGQ6S.js} +1 -1
- package/dist/cdn/{LYHUQBAV.js → W4SKTGZZ.js} +1 -1
- package/dist/cdn/{FLAY44HL.js → W7QYRRL5.js} +1 -1
- package/dist/cdn/{MNR4OSPQ.js → WCGR3K3H.js} +1 -1
- package/dist/cdn/{GTDMVZXX.js → WIZQEHYP.js} +1 -1
- package/dist/cdn/{3LVAGPAN.js → WLO5NHBS.js} +1 -1
- package/dist/cdn/{DKZ6MWAZ.js → WOYUNK24.js} +1 -1
- package/dist/cdn/{C37LO3WG.js → X5EG36JC.js} +1 -1
- package/dist/cdn/{EWU5JVMQ.js → X7R5DHDI.js} +1 -1
- package/dist/cdn/{UZ35OYI7.js → XDF3J6KO.js} +1 -1
- package/dist/cdn/{44T7OREC.js → XFDP55TG.js} +1 -1
- package/dist/cdn/{YMYA43OX.js → XQRRKELO.js} +1 -1
- package/dist/cdn/{FJRW4YMN.js → XRFHPADY.js} +1 -1
- package/dist/cdn/{K5YWIYA5.js → Y64XVQN6.js} +1 -1
- package/dist/cdn/{ACON6LGO.js → YPKO3U4W.js} +1 -1
- package/dist/cdn/{56HEEILX.js → ZGWFEIU7.js} +1 -1
- package/dist/cdn/{7PDJEKY7.js → ZJ435DGE.js} +1 -1
- package/dist/cdn/{GHT4TFQ6.js → ZW3HXUWF.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/runtime.js +4 -4
- package/dist/components/calcite-dropdown/customElement.js +140 -81
- package/dist/components/calcite-dropdown-item/customElement.js +14 -32
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +1 -1
- package/package.json +3 -2
- package/dist/cdn/3G4DHLX3.js +0 -2
- package/dist/cdn/GUF7ZXRS.js +0 -2
- package/dist/cdn/KKPPI422.js +0 -2
- package/dist/cdn/ZQLGBHLZ.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as w}from"./
|
|
2
|
+
import{a as w}from"./FMPGUKB2.js";import{c as y,d as A}from"./WCGR3K3H.js";import{a as m}from"./ENDXE7YY.js";import"./DNYAPW4C.js";import{a as b}from"./KBTKYHDZ.js";import"./RRXOB3GM.js";import{c as v}from"./G52BPUIA.js";import{a as x}from"./KORMMJ2N.js";import"./RH6ZIP65.js";import{e as g}from"./FBLIQCWA.js";import"./4W74V7DC.js";import{t as f,x as o}from"./RGCPRFLO.js";import"./OAOQ5BXS.js";import{G as u,H as c,S as h,g as p,h as s,p as i}from"./GS4RLV6G.js";var E={actionGroupEnd:"action-group--end",container:"container"},C={expandTooltip:"expand-tooltip"},D=p`: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-pad-gap: var(--calcite-action-pad-items-space, var(--calcite-spacing-xxs));--calcite-internal-action-pad-padding: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-pad-gap: var(--calcite-action-pad-items-space, var(--calcite-spacing-sm));--calcite-internal-action-pad-padding: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-pad-gap: var(--calcite-action-pad-items-space, var(--calcite-space-sm-plus));--calcite-internal-action-pad-padding: var(--calcite-spacing-sm-plus)}:host{display:block}@keyframes in{0%{opacity:0}to{opacity:1}}:host{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:var(--calcite-action-pad-corner-radius, .125rem);background:transparent}:host([expanded][layout=vertical]) .container{max-inline-size:var(--calcite-action-pad-expanded-max-width, auto)}:host([layout=vertical]) ::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:1px;padding-block-end:var(--calcite-internal-action-pad-padding)}.container{display:inline-flex;flex-direction:column;overflow:hidden;--tw-shadow: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);--tw-shadow-colored: 0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);border-radius:calc(var(--calcite-action-pad-corner-radius, .125rem) * 2);background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1));gap:var(--calcite-internal-action-pad-gap);padding:var(--calcite-internal-action-pad-padding)}.action-group--bottom{flex-grow:1;justify-content:flex-end;padding-block-end:0px}:host([layout=horizontal]) .container{flex-direction:row}:host([layout=horizontal]) .container .action-group--bottom{padding:0}:host([layout=horizontal]) .container ::slotted(calcite-action-group:not(:last-of-type)){border-inline-end-width:1px;padding-inline-end:var(--calcite-internal-action-pad-padding)}:host([hidden]){display:none}[hidden]{display:none}`,r=class extends u{constructor(){super(),this.actions=[],this.direction=g(),this.mutationObserver=m("mutation",()=>this.mutationObserverHandler()),this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionPadToggle.emit()},this.messages=b(),this.focusSetter=x()(this),this.expandDisabled=!1,this.expanded=!1,this.layout="vertical",this.overlayPositioning="absolute",this.scale="m",this.selectionAppearance="neutral",this.calciteActionPadCollapse=i({cancelable:!1}),this.calciteActionPadExpand=i({cancelable:!1}),this.calciteActionPadToggle=i({cancelable:!1}),this.listen("calciteActionMenuOpen",this.actionMenuOpenHandler),this.listen("keydown",this.handleKeyDown)}static{this.properties={expandTooltip:[16,{},{state:!0}],actionsEndGroupLabel:1,expandDisabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],position:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=D}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback(),this.updateActions(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}async load(){w.deprecated("component",{component:this,name:"action-pad",removalVersion:5,suggested:"action-bar"})}willUpdate(t){t.has("expanded")&&this.hasUpdated&&y({el:this.el,expanded:this.expanded}),t.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&this.updateGroups(),t.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteActionPadExpand.emit():this.calciteActionPadCollapse.emit()),t.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="neutral")&&this.updateActions()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}actionMenuOpenHandler(t){if(t.target.menuOpen){let a=t.composedPath();this.actionGroups?.forEach(e=>{a.includes(e)||(e.menuOpen=!1)})}}updateGroups(){let t=Array.from(this.el.querySelectorAll("calcite-action-group"));this.actionGroups=t,this.setGroupLayout(t)}setGroupLayout(t){t.forEach(a=>a.layout=this.layout)}handleDefaultSlotChange(){this.updateGroups(),this.queryAndStoreActions(),this.updateActions()}handleTooltipSlotChange(t){let a=f(t).filter(e=>e?.matches("calcite-tooltip"));this.expandTooltip=a[0]}handleKeyDown(t){this.queryAndStoreActions();let a=this.actions.filter(n=>!n.disabled),e=document.activeElement;if(v(e))switch(t.key){case"ArrowRight":case"ArrowDown":o(a,e,"next",!0),t.preventDefault();break;case"ArrowLeft":case"ArrowUp":o(a,e,"previous",!0),t.preventDefault();break;case"Home":o(a,e,"first",!0),t.preventDefault();break;case"End":o(a,e,"last",!0),t.preventDefault();break;case"Tab":this.updateTabIndexOfItems(e);break}}updateActions(){this.actions.forEach(t=>{t.selectionAppearance=this.selectionAppearance})}updateTabIndexOfItems(t){this.actions.forEach(a=>{a.tabIndex=t!==a?-1:0})}queryAndStoreActions(){this.actions=Array.from(this.el.querySelectorAll("calcite-action"))}mutationObserverHandler(){this.updateGroups(),this.queryAndStoreActions(),this.updateActions()}renderBottomActionGroup(){let{expanded:t,expandDisabled:a,messages:e,el:n,position:k,toggleExpand:T,scale:l,layout:S,actionsEndGroupLabel:G,overlayPositioning:O}=this,d=a?null:A({collapseLabel:e.collapseLabel,collapseText:e.collapse,direction:this.direction,el:n,expandLabel:e.expandLabel,expandText:e.expand,expanded:t,position:k,scale:l,toggle:T,tooltip:this.expandTooltip});return d?s`<calcite-action-group class=${c(E.actionGroupEnd)} .label=${G} .layout=${S} .overlayPositioning=${O} .scale=${l}><slot name=${C.expandTooltip} @slotchange=${this.handleTooltipSlotChange}></slot>${d}</calcite-action-group>`:null}render(){return s`<div class=${c(E.container)}><slot @slotchange=${this.handleDefaultSlotChange}></slot>${this.renderBottomActionGroup()}</div>`}};h("calcite-action-pad",r);export{r as ActionPad};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as g}from"./YS5CQELP.js";import{a as m}from"./YGX7CUXN.js";import{a as v}from"./DGUJEZZ6.js";import{a as f}from"./N6I5ZZ32.js";import"./RH6ZIP65.js";import"./T74NIOKP.js";import"./R76W6LVB.js";import{s as c}from"./RAEAOYKN.js";import"./OAOQ5BXS.js";import{E as h,F as p,G as u,H as t,S as b,g as d,h as o,p as l}from"./BIWKEWAN.js";var a={container:"container",contentWrapper:"content-wrapper",header:"header",footer:"footer",checkboxWrapper:"checkbox-wrapper",checkboxWrapperDeprecated:"checkbox-wrapper-deprecated",thumbnailWrapper:"thumbnail-wrapper",headerTextContainer:"header-text-container",cardContent:"card-content",hasSlottedContent:"has-slotted-content"},r={thumbnail:"thumbnail",heading:"heading",description:"description",footerStart:"footer-start",footerEnd:"footer-end"},i={selected:"check-square-f",unselected:"square",selectedSingle:"circle-f",unselectedSingle:"circle"},k=d`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;max-inline-size:100%}.content-wrapper{position:relative;display:flex;block-size:100%;flex-direction:column;justify-content:space-between;overflow:hidden;border:var(--calcite-border-width-sm) solid var(--calcite-card-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-card-corner-radius, var(--calcite-corner-radius-sharp));background-color:var(--calcite-card-background-color, var(--calcite-color-foreground-1));box-shadow:var(--calcite-card-shadow, var(--calcite-shadow-none));pointer-events:none}::slotted(*){pointer-events:auto}:host(:not([selectable])) .content-wrapper:not(.non-interactive){outline-color:transparent}:host(:not([selectable])) .content-wrapper: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))))}.container{position:relative;display:flex;flex:1 1 auto;flex-direction:column}:host([loading]) .content-wrapper *:not(calcite-loader):not(.calcite-card-loader-container){pointer-events:none;opacity:0}:host([loading]) .calcite-card-loader-container{position:absolute;inset:0;display:flex;align-items:center}.header{display:flex;flex-direction:row;align-items:flex-start}.footer{margin-block-start:auto;display:flex;flex-direction:row;align-content:space-between;justify-content:space-between;padding-inline:var(--calcite-spacing-md);padding-block-start:var(--calcite-spacing-xxs);padding-block-end:var(--calcite-spacing-md)}.header-text-container{display:flex;inline-size:100%;flex-direction:column;justify-content:center;padding-inline:.75rem;padding-block:.5rem}.header-text-container:not(:only-child){padding-inline-end:.125rem}.footer{margin-block-start:auto;flex-direction:row;align-content:space-between;justify-content:space-between;padding-inline:.75rem;padding-block:.25rem .75rem}.card-content{block-size:auto;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}.has-slotted-content{padding:.75rem}:host([selected]) .content-wrapper{border:1px solid var(--calcite-card-accent-color-selected, var(--calcite-color-brand))}:host([selectable]) .header{padding-inline-end:var(--calcite-spacing-xxxl)}slot[name=heading]::slotted(*),*::slotted([slot=heading]){margin:0;font-size:var(--calcite-font-size-relative-base);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1);line-height:var(--calcite-font-line-height-relative-snug)}slot[name=description]::slotted(*),*::slotted([slot=description]){margin:0;font-size:var(--calcite-font-size-relative-sm);font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2);line-height:var(--calcite-font-line-height-relative-snug)}slot[name=thumbnail]::slotted(img),img::slotted([slot=thumbnail]){min-inline-size:100%;max-inline-size:100%}slot[name=footer-start]::slotted(*),*::slotted([slot=footer-start]){align-self:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);margin-inline-end:auto}slot[name=footer-end]::slotted(*),*::slotted([slot=footer-end]){align-self:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}.checkbox-wrapper-deprecated{pointer-events:auto;position:absolute;inset-block-start:var(--calcite-spacing-sm);inset-inline-end:var(--calcite-spacing-sm);margin:0;padding:0;color:var(--calcite-card-selection-color, var(--calcite-color-text-3))}.checkbox-wrapper-deprecated:hover{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-card-selection-color-hover, var(--calcite-card-selection-icon-color-hover, var(--calcite-color-text-2)))}.checkbox-wrapper-deprecated:active{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press))}.checkbox-wrapper{pointer-events:auto;margin:.5rem;cursor:pointer;padding:.5rem;outline-color:transparent;display:flex;align-items:center;justify-items:center;color:var(--calcite-card-selection-color, var(--calcite-color-text-3))}.checkbox-wrapper:hover{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-card-selection-color-hover, var(--calcite-card-selection-icon-color-hover, var(--calcite-color-text-2)))}.checkbox-wrapper:active{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press))}.checkbox-wrapper calcite-icon{pointer-events:none}:host([selected]) .checkbox-wrapper-deprecated,:host([selected]) .checkbox-wrapper{color:var(--calcite-card-accent-color-selected, var(--calcite-card-selection-icon-color-selected, var(--calcite-color-brand)))}:host(:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper-deprecated,:host(:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-card-selection-color-hover, var(--calcite-card-selection-icon-color-hover, var(--calcite-color-text-2)))}:host([selected]:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper-deprecated,:host([selected]:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press));color:var(--calcite-card-accent-color-selected, var(--calcite-card-selection-icon-color-selected, var(--calcite-color-brand)))}.thumbnail-wrapper{display:flex}.content-wrapper.inline{flex-direction:row}.content-wrapper.inline>.container{inline-size:60%}.content-wrapper.inline>.thumbnail-wrapper{inline-size:40%;align-items:flex-start}.content-wrapper.inline slot[name=thumbnail]::slotted(img),.content-wrapper.inline img::slotted([slot=thumbnail]){inline-size:100%}slot[name=footer-start]::slotted(*),slot[name=footer-end]::slotted(*){display:flex;gap:.25rem}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,s=class extends u{constructor(){super(...arguments),this.containerRef=h(),this.messages=v(),this.focusSetter=f()(this),this.interactiveContainer=g(this),this.hasContent=!1,this.hasDescription=!1,this.hasFooterEnd=!1,this.hasFooterStart=!1,this.hasHeading=!1,this.hasThumbnail=!1,this.disabled=!1,this.loading=!1,this.selectable=!1,this.selected=!1,this.selectionMode="none",this.thumbnailPosition="block-start",this.calciteCardSelect=l({cancelable:!1}),this.calciteInternalCardKeyEvent=l({cancelable:!1})}static{this.properties={hasContent:[16,{},{state:!0}],hasDescription:[16,{},{state:!0}],hasFooterEnd:[16,{},{state:!0}],hasFooterStart:[16,{},{state:!0}],hasHeading:[16,{},{state:!0}],hasThumbnail:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],selectable:[7,{},{reflect:!0,type:Boolean}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:1,thumbnailPosition:[3,{},{reflect:!0}]}}static{this.styles=k}async setFocus(e){return this.focusSetter(()=>({target:this.containerRef.value,includeContainer:!0}),e)}handleThumbnailSlotChange(e){this.hasThumbnail=c(e)}handleHeadingSlotChange(e){this.hasHeading=c(e)}handleDescriptionSlotChange(e){this.hasDescription=c(e)}handleFooterStartSlotChange(e){this.hasFooterStart=c(e)}handleFooterEndSlotChange(e){this.hasFooterEnd=c(e)}handleDefaultSlotChange(e){this.hasContent=c(e)}keyDownHandler(e){if(e.target===this.containerRef.value&&!this.selectable&&!this.disabled)if(m(e.key)&&this.selectionMode!=="none")this.calciteCardSelect.emit(),e.preventDefault();else switch(e.key){case"ArrowRight":case"ArrowLeft":case"Home":case"End":this.calciteInternalCardKeyEvent.emit(e),e.preventDefault();break}}cardBodyClickHandler(e){e.target===this.containerRef.value&&!this.selectable&&!this.disabled&&this.selectionMode!=="none"&&this.calciteCardSelect.emit()}selectCardDeprecated(e){this.selected=e.currentTarget.checked,this.calciteCardSelect.emit()}cardSelectClick(e){this.disabled||(e.preventDefault(),this.calciteCardSelect.emit(),this.setFocus())}renderCheckboxDeprecated(){return o`<calcite-label class=${t(a.checkboxWrapperDeprecated)}><calcite-checkbox .checked=${this.selected} .label=${this.messages.select} @calciteCheckboxChange=${this.selectCardDeprecated}></calcite-checkbox></calcite-label>`}renderThumbnail(){return o`<section class=${t(a.thumbnailWrapper)} .hidden=${!this.hasThumbnail}><slot name=${r.thumbnail} @slotchange=${this.handleThumbnailSlotChange}></slot></section>`}renderSelectionIcon(){let e=this.selectionMode==="multiple"&&this.selected?i.selected:this.selectionMode==="multiple"?i.unselected:this.selected?i.selectedSingle:i.unselectedSingle;return o`<div class=${t(a.checkboxWrapper)} @pointerdown=${this.cardSelectClick} tabindex=-1><calcite-icon .icon=${e} scale=s></calcite-icon></div>`}renderHeader(){let e=this.hasHeading||this.hasDescription;return o`<header class=${t(a.header)} .hidden=${!e}>${this.selectable?this.renderCheckboxDeprecated():null}<div class=${t(a.headerTextContainer)}><slot name=${r.heading} @slotchange=${this.handleHeadingSlotChange}></slot><slot name=${r.description} @slotchange=${this.handleDescriptionSlotChange}></slot></div>${this.selectionMode!=="none"&&this.renderSelectionIcon()||""}</header>`}renderFooter(){let e=this.hasFooterStart||this.hasFooterEnd;return o`<footer class=${t(a.footer)} .hidden=${!e}><slot name=${r.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot><slot name=${r.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></footer>`}render(){let e=this.thumbnailPosition.startsWith("inline"),n=this.thumbnailPosition.endsWith("start"),x=this.selectionMode==="multiple"?"checkbox":this.selectionMode!=="none"?"radio":void 0;return this.interactiveContainer({disabled:this.disabled,children:o`<div .ariaChecked=${this.selectionMode!=="none"?this.selected:void 0} .ariaLabel=${this.label} class=${t({[a.contentWrapper]:!0,inline:e})} @click=${this.cardBodyClickHandler} @keydown=${this.keyDownHandler} .role=${x} .tabIndex=${!this.selectable||this.disabled?0:-1} ${p(this.containerRef)}>${this.loading?o`<div aria-live=polite class="calcite-card-loader-container"><calcite-loader .label=${this.messages.loading}></calcite-loader></div>`:null}${n&&this.renderThumbnail()||""}<section .ariaBusy=${this.loading} class=${t({[a.container]:!0})}>${this.renderHeader()}<div class=${t({[a.cardContent]:!0,[a.hasSlottedContent]:this.hasContent})}><slot @slotchange=${this.handleDefaultSlotChange}></slot></div>${this.renderFooter()}</section>${!n&&this.renderThumbnail()||""}</div>`})}};b("calcite-card",s);export{s as Card};
|
|
2
|
+
import{a as g}from"./OUIZYSO4.js";import{a as m}from"./YGX7CUXN.js";import{a as v}from"./KBTKYHDZ.js";import{a as f}from"./KORMMJ2N.js";import"./RH6ZIP65.js";import"./FBLIQCWA.js";import"./4W74V7DC.js";import{s as c}from"./RGCPRFLO.js";import"./OAOQ5BXS.js";import{E as h,F as p,G as u,H as t,S as b,g as d,h as o,p as l}from"./GS4RLV6G.js";var a={container:"container",contentWrapper:"content-wrapper",header:"header",footer:"footer",checkboxWrapper:"checkbox-wrapper",checkboxWrapperDeprecated:"checkbox-wrapper-deprecated",thumbnailWrapper:"thumbnail-wrapper",headerTextContainer:"header-text-container",cardContent:"card-content",hasSlottedContent:"has-slotted-content"},r={thumbnail:"thumbnail",heading:"heading",description:"description",footerStart:"footer-start",footerEnd:"footer-end"},i={selected:"check-square-f",unselected:"square",selectedSingle:"circle-f",unselectedSingle:"circle"},k=d`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;max-inline-size:100%}.content-wrapper{position:relative;display:flex;block-size:100%;flex-direction:column;justify-content:space-between;overflow:hidden;border:var(--calcite-border-width-sm) solid var(--calcite-card-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-card-corner-radius, var(--calcite-corner-radius-sharp));background-color:var(--calcite-card-background-color, var(--calcite-color-foreground-1));box-shadow:var(--calcite-card-shadow, var(--calcite-shadow-none));pointer-events:none}::slotted(*){pointer-events:auto}:host(:not([selectable])) .content-wrapper:not(.non-interactive){outline-color:transparent}:host(:not([selectable])) .content-wrapper: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))))}.container{position:relative;display:flex;flex:1 1 auto;flex-direction:column}:host([loading]) .content-wrapper *:not(calcite-loader):not(.calcite-card-loader-container){pointer-events:none;opacity:0}:host([loading]) .calcite-card-loader-container{position:absolute;inset:0;display:flex;align-items:center}.header{display:flex;flex-direction:row;align-items:flex-start}.footer{margin-block-start:auto;display:flex;flex-direction:row;align-content:space-between;justify-content:space-between;padding-inline:var(--calcite-spacing-md);padding-block-start:var(--calcite-spacing-xxs);padding-block-end:var(--calcite-spacing-md)}.header-text-container{display:flex;inline-size:100%;flex-direction:column;justify-content:center;padding-inline:.75rem;padding-block:.5rem}.header-text-container:not(:only-child){padding-inline-end:.125rem}.footer{margin-block-start:auto;flex-direction:row;align-content:space-between;justify-content:space-between;padding-inline:.75rem;padding-block:.25rem .75rem}.card-content{block-size:auto;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}.has-slotted-content{padding:.75rem}:host([selected]) .content-wrapper{border:1px solid var(--calcite-card-accent-color-selected, var(--calcite-color-brand))}:host([selectable]) .header{padding-inline-end:var(--calcite-spacing-xxxl)}slot[name=heading]::slotted(*),*::slotted([slot=heading]){margin:0;font-size:var(--calcite-font-size-relative-base);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1);line-height:var(--calcite-font-line-height-relative-snug)}slot[name=description]::slotted(*),*::slotted([slot=description]){margin:0;font-size:var(--calcite-font-size-relative-sm);font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2);line-height:var(--calcite-font-line-height-relative-snug)}slot[name=thumbnail]::slotted(img),img::slotted([slot=thumbnail]){min-inline-size:100%;max-inline-size:100%}slot[name=footer-start]::slotted(*),*::slotted([slot=footer-start]){align-self:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);margin-inline-end:auto}slot[name=footer-end]::slotted(*),*::slotted([slot=footer-end]){align-self:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}.checkbox-wrapper-deprecated{pointer-events:auto;position:absolute;inset-block-start:var(--calcite-spacing-sm);inset-inline-end:var(--calcite-spacing-sm);margin:0;padding:0;color:var(--calcite-card-selection-color, var(--calcite-color-text-3))}.checkbox-wrapper-deprecated:hover{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-card-selection-color-hover, var(--calcite-card-selection-icon-color-hover, var(--calcite-color-text-2)))}.checkbox-wrapper-deprecated:active{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press))}.checkbox-wrapper{pointer-events:auto;margin:.5rem;cursor:pointer;padding:.5rem;outline-color:transparent;display:flex;align-items:center;justify-items:center;color:var(--calcite-card-selection-color, var(--calcite-color-text-3))}.checkbox-wrapper:hover{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-card-selection-color-hover, var(--calcite-card-selection-icon-color-hover, var(--calcite-color-text-2)))}.checkbox-wrapper:active{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press))}.checkbox-wrapper calcite-icon{pointer-events:none}:host([selected]) .checkbox-wrapper-deprecated,:host([selected]) .checkbox-wrapper{color:var(--calcite-card-accent-color-selected, var(--calcite-card-selection-icon-color-selected, var(--calcite-color-brand)))}:host(:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper-deprecated,:host(:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper{background-color:var(--calcite-card-selection-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-card-selection-color-hover, var(--calcite-card-selection-icon-color-hover, var(--calcite-color-text-2)))}:host([selected]:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper-deprecated,:host([selected]:not([selectable])) .content-wrapper:not(.non-interactive):focus .checkbox-wrapper{background-color:var(--calcite-card-selection-background-color-press, var(--calcite-color-transparent-press));color:var(--calcite-card-accent-color-selected, var(--calcite-card-selection-icon-color-selected, var(--calcite-color-brand)))}.thumbnail-wrapper{display:flex}.content-wrapper.inline{flex-direction:row}.content-wrapper.inline>.container{inline-size:60%}.content-wrapper.inline>.thumbnail-wrapper{inline-size:40%;align-items:flex-start}.content-wrapper.inline slot[name=thumbnail]::slotted(img),.content-wrapper.inline img::slotted([slot=thumbnail]){inline-size:100%}slot[name=footer-start]::slotted(*),slot[name=footer-end]::slotted(*){display:flex;gap:.25rem}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,s=class extends u{constructor(){super(...arguments),this.containerRef=h(),this.messages=v(),this.focusSetter=f()(this),this.interactiveContainer=g(this),this.hasContent=!1,this.hasDescription=!1,this.hasFooterEnd=!1,this.hasFooterStart=!1,this.hasHeading=!1,this.hasThumbnail=!1,this.disabled=!1,this.loading=!1,this.selectable=!1,this.selected=!1,this.selectionMode="none",this.thumbnailPosition="block-start",this.calciteCardSelect=l({cancelable:!1}),this.calciteInternalCardKeyEvent=l({cancelable:!1})}static{this.properties={hasContent:[16,{},{state:!0}],hasDescription:[16,{},{state:!0}],hasFooterEnd:[16,{},{state:!0}],hasFooterStart:[16,{},{state:!0}],hasHeading:[16,{},{state:!0}],hasThumbnail:[16,{},{state:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],selectable:[7,{},{reflect:!0,type:Boolean}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:1,thumbnailPosition:[3,{},{reflect:!0}]}}static{this.styles=k}async setFocus(e){return this.focusSetter(()=>({target:this.containerRef.value,includeContainer:!0}),e)}handleThumbnailSlotChange(e){this.hasThumbnail=c(e)}handleHeadingSlotChange(e){this.hasHeading=c(e)}handleDescriptionSlotChange(e){this.hasDescription=c(e)}handleFooterStartSlotChange(e){this.hasFooterStart=c(e)}handleFooterEndSlotChange(e){this.hasFooterEnd=c(e)}handleDefaultSlotChange(e){this.hasContent=c(e)}keyDownHandler(e){if(e.target===this.containerRef.value&&!this.selectable&&!this.disabled)if(m(e.key)&&this.selectionMode!=="none")this.calciteCardSelect.emit(),e.preventDefault();else switch(e.key){case"ArrowRight":case"ArrowLeft":case"Home":case"End":this.calciteInternalCardKeyEvent.emit(e),e.preventDefault();break}}cardBodyClickHandler(e){e.target===this.containerRef.value&&!this.selectable&&!this.disabled&&this.selectionMode!=="none"&&this.calciteCardSelect.emit()}selectCardDeprecated(e){this.selected=e.currentTarget.checked,this.calciteCardSelect.emit()}cardSelectClick(e){this.disabled||(e.preventDefault(),this.calciteCardSelect.emit(),this.setFocus())}renderCheckboxDeprecated(){return o`<calcite-label class=${t(a.checkboxWrapperDeprecated)}><calcite-checkbox .checked=${this.selected} .label=${this.messages.select} @calciteCheckboxChange=${this.selectCardDeprecated}></calcite-checkbox></calcite-label>`}renderThumbnail(){return o`<section class=${t(a.thumbnailWrapper)} .hidden=${!this.hasThumbnail}><slot name=${r.thumbnail} @slotchange=${this.handleThumbnailSlotChange}></slot></section>`}renderSelectionIcon(){let e=this.selectionMode==="multiple"&&this.selected?i.selected:this.selectionMode==="multiple"?i.unselected:this.selected?i.selectedSingle:i.unselectedSingle;return o`<div class=${t(a.checkboxWrapper)} @pointerdown=${this.cardSelectClick} tabindex=-1><calcite-icon .icon=${e} scale=s></calcite-icon></div>`}renderHeader(){let e=this.hasHeading||this.hasDescription;return o`<header class=${t(a.header)} .hidden=${!e}>${this.selectable?this.renderCheckboxDeprecated():null}<div class=${t(a.headerTextContainer)}><slot name=${r.heading} @slotchange=${this.handleHeadingSlotChange}></slot><slot name=${r.description} @slotchange=${this.handleDescriptionSlotChange}></slot></div>${this.selectionMode!=="none"&&this.renderSelectionIcon()||""}</header>`}renderFooter(){let e=this.hasFooterStart||this.hasFooterEnd;return o`<footer class=${t(a.footer)} .hidden=${!e}><slot name=${r.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot><slot name=${r.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></footer>`}render(){let e=this.thumbnailPosition.startsWith("inline"),n=this.thumbnailPosition.endsWith("start"),x=this.selectionMode==="multiple"?"checkbox":this.selectionMode!=="none"?"radio":void 0;return this.interactiveContainer({disabled:this.disabled,children:o`<div .ariaChecked=${this.selectionMode!=="none"?this.selected:void 0} .ariaLabel=${this.label} class=${t({[a.contentWrapper]:!0,inline:e})} @click=${this.cardBodyClickHandler} @keydown=${this.keyDownHandler} .role=${x} .tabIndex=${!this.selectable||this.disabled?0:-1} ${p(this.containerRef)}>${this.loading?o`<div aria-live=polite class="calcite-card-loader-container"><calcite-loader .label=${this.messages.loading}></calcite-loader></div>`:null}${n&&this.renderThumbnail()||""}<section .ariaBusy=${this.loading} class=${t({[a.container]:!0})}>${this.renderHeader()}<div class=${t({[a.cardContent]:!0,[a.hasSlottedContent]:this.hasContent})}><slot @slotchange=${this.handleDefaultSlotChange}></slot></div>${this.renderFooter()}</section>${!n&&this.renderThumbnail()||""}</div>`})}};b("calcite-card",s);export{s as Card};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{t as f,u as g}from"./
|
|
2
|
+
import{t as f,u as g}from"./RGCPRFLO.js";import"./OAOQ5BXS.js";import{E as b,F as h,G as p,H as m,S as u,g as d,h as n}from"./GS4RLV6G.js";var v={section:"section"},x={titleGroup:"title-group"},y=d`:host{display:flex;flex-direction:column;background-color:var(--calcite-tab-background-color, var(--calcite-color-transparent))}:host([bordered]){box-shadow:inset 0 1px 0 var(--calcite-tab-border-color, var(--calcite-color-border-1));background-color:var(--calcite-tab-background-color, var(--calcite-color-foreground-1))}:host([bordered]) section{border-color:var(--calcite-tab-border-color, var(--calcite-color-border-1));border-style:solid}section{display:flex;flex-grow:1;overflow:hidden;border-width:1px;border-block-start-style:solid;border-block-start-color:var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered][position=bottom]){box-shadow:inset 0 1px 0 var(--calcite-tab-border-color, var(--calcite-color-border-1)),inset 0 -1px 0 var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered]:not([position=bottom])) ::slotted(calcite-tab-nav){margin-block-end:-1px}:host([position=bottom]){flex-direction:column-reverse}:host([position=bottom]) section{flex-direction:column-reverse;border-block-start-width:0px;border-block-end-width:1px}:host([bordered][scale=s]) section{padding:.75rem}:host([bordered][scale=m]) section{padding:.5rem}:host([bordered][scale=l]) section{padding:1rem}:host([position=bottom]:not([bordered])) section{border-block-end-style:solid;border-block-end-color:var(--calcite-tab-border-color, var(--calcite-color-border-1))}@media(forced-colors:active){:host([bordered]) section{border-block-start-width:0px;border-block-end-width:1px}:host([position=bottom][bordered]) section{border-block-start-width:1px;border-block-end-width:0px}}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends p{constructor(){super(),this.slotRef=b(),this.tabs=[],this.titles=[],this.bordered=!1,this.layout="inline",this.position="top",this.scale="m",this.listen("calciteInternalTabNavSlotChange",this.calciteInternalTabNavSlotChangeHandler)}static{this.properties={tabs:[16,{},{state:!0}],titles:[16,{},{state:!0}],bordered:[5,{},{type:Boolean}],layout:[3,{},{reflect:!0}],position:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=y}connectedCallback(){super.connectedCallback(),this.updateItems()}load(){this.updateItems()}willUpdate(e){(e.has("position")&&(this.hasUpdated||this.position!=="top")||e.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.updateItems(),(e.has("titles")||e.has("tabs"))&&this.hasUpdated&&this.titles?.length>0&&this.tabs?.length>0&&(this.updateAriaSettings(),this.updateItems())}calciteInternalTabNavSlotChangeHandler(e){e.stopPropagation(),e.detail.length!==this.titles.length&&(this.titles=e.detail)}defaultSlotChangeHandler(e){this.tabs=f(e,"calcite-tab")}async updateAriaSettings(){if(await this.componentOnReady(),!this.slotRef.value)return;let e,s,o=g(this.slotRef.value,"calcite-tab");if(o.some(t=>t.tab)||this.titles.some(t=>t.tab))e=o.sort((t,a)=>t.tab.localeCompare(a.tab)).map(t=>t.id),s=this.titles.sort((t,a)=>t.tab.localeCompare(a.tab)).map(t=>t.id);else{let t=await Promise.all(o.map(r=>r.getTabIndex())),a=await Promise.all(this.titles.map(r=>r.getTabIndex()));e=t.reduce((r,i,l)=>(r[i]=o[l].id,r),[]),s=a.reduce((r,i,l)=>(r[i]=this.titles[l].id,r),[])}o.forEach(t=>t._updateAriaInfo(e,s)),this.titles.forEach(t=>t._updateAriaInfo(e,s))}updateItems(){let{position:e,scale:s}=this,o=this.el.querySelector("calcite-tab-nav");o&&(o.position=e,o.scale=s),Array.from(this.el.querySelectorAll("calcite-tab")).forEach(t=>{t.parentElement===this.el&&(t.scale=s)}),Array.from(this.el.querySelectorAll("calcite-tab-nav > calcite-tab-title")).forEach(t=>{t.position=e,t.scale=s})}render(){return n`<slot name=${x.titleGroup}></slot><section class=${m(v.section)}><slot @slotchange=${this.defaultSlotChangeHandler} ${h(this.slotRef)}></slot></section>`}};u("calcite-tabs",c);export{c as Tabs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{F as n,H as o,h as a,l as t}from"./
|
|
2
|
+
import{F as n,H as o,h as a,l as t}from"./GS4RLV6G.js";var m={validationContainer:"validation-container"},d=()=>{},$=({scale:e,status:s,id:r,icon:l,message:c,ref:i})=>a`<div class=${o(m.validationContainer)} ${n(i||d)}><calcite-input-message aria-live=polite .icon=${l} id=${r??t} .scale=${e} .status=${s}>${c}</calcite-input-message></div>`;export{$ as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as S}from"./ENDXE7YY.js";import{a as x}from"./
|
|
2
|
+
import{a as S}from"./ENDXE7YY.js";import{a as x}from"./KBTKYHDZ.js";import"./FBLIQCWA.js";import"./4W74V7DC.js";import{t as A,x as o}from"./RGCPRFLO.js";import{a as y}from"./OAOQ5BXS.js";import{E as f,F as v,G as g,H as a,S as I,g as u,h as r,i as b,l as h,p as d}from"./GS4RLV6G.js";var p={actionIcon:"action-icon",actionContainer:"action-container",stepBarContainer:"step-bar-container",singleView:"single-view"},z={chevronLeft:"chevron-left",chevronRight:"chevron-right"},k="calcite-stepper-action",B={position:(c,e)=>`${k}-${c}-${e?"start":"end"}`},l={stepBar:"step-bar",stepBarActive:"step-bar--active",stepBarComplete:"step-bar--complete",stepBarDisabled:"step-bar--disabled",stepBarError:"step-bar--error",stepBarInActive:"step-bar--inactive"},R=({disabled:c,active:e,complete:t,error:i})=>r`<svg class=${a({[l.stepBar]:!0})}>${b`<rect class=${a({[l.stepBarActive]:e,[l.stepBarComplete]:t,[l.stepBarDisabled]:c,[l.stepBarError]:i,[l.stepBarInActive]:!0})} width=100% x=0 y=0 />`}</svg>`,T=u`:host([scale=s]){--calcite-internal-stepper-item-spacing-unit-s: .25rem;--calcite-internal-stepper-action-block-size: 2.75rem;--calcite-internal-stepper-action-inline-size: 2rem;--calcite-internal-step-bar-gap: .25rem}:host([scale=m]){--calcite-internal-stepper-item-spacing-unit-s: .5rem;--calcite-internal-stepper-action-block-size: 3.25rem;--calcite-internal-stepper-action-inline-size: 2.5rem}:host([scale=l]){--calcite-internal-stepper-item-spacing-unit-s: .75rem;--calcite-internal-stepper-action-block-size: 4rem;--calcite-internal-stepper-action-inline-size: 3rem;--calcite-internal-step-bar-gap: .75rem}:host{display:flex}.container{position:relative;display:flex;inline-size:100%;min-inline-size:fit-content;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:space-between}:host([layout=vertical]) .container{flex:1 1 auto;flex-direction:column}:host([layout=horizontal]) .container,:host([layout=horizontal-single]) .container{display:grid;grid-template-areas:"items" "content";gap:.5rem var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s));grid-template-rows:auto 1fr}:host([layout=horizontal][scale=s]) .container,:host([layout=horizontal-single][scale=s]) .container{gap:.25rem var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host([layout=horizontal][scale=l]) .container,:host([layout=horizontal-single][scale=l]) .container{gap:.75rem var(--calcite-stepper-bar-gap, var(--calcite-internal-stepper-item-spacing-unit-s))}:host([layout=horizontal]) .container.single-view{display:flex;grid-template-columns:none}.action-icon{position:relative;display:flex;flex-grow:0;block-size:var(--calcite-internal-stepper-action-block-size);inline-size:var(--calcite-internal-stepper-action-inline-size)}.action-container{position:absolute;display:flex;justify-content:space-between;padding-block:.25rem;inline-size:100%}.step-bar{display:flex;block-size:100%;inline-size:100%}.step-bar-container{position:absolute;display:flex;align-items:flex-start;justify-content:space-between;block-size:.125rem;inline-size:100%;gap:var(--calcite-stepper-bar-gap, var(--calcite-internal-step-bar-gap, .5rem))}.step-bar--inactive{fill:var(--calcite-stepper-bar-inactive-fill-color, var(--calcite-color-border-3, #dfdfdf));fill-opacity:1;block-size:100%}.step-bar--active{fill:var(--calcite-stepper-bar-active-fill-color, var(--calcite-color-brand))}.step-bar--complete{fill:var(--calcite-stepper-bar-complete-fill-color, var(--calcite-color-brand));fill-opacity:.5}.step-bar--error{fill:var(--calcite-stepper-bar-error-fill-color, var(--calcite-color-status-danger))}.step-bar--disabled{opacity:.5}:host([hidden]){display:none}[hidden]{display:none}`,m=class extends g{constructor(){super(),this.containerRef=f(),this.visibleItems=[],this.focusableItems=[],this.guid=y(),this.items=[],this.multipleViewMode=!1,this.mutationObserver=S("mutation",()=>this.updateItems()),this.messages=x(),this.icon=!1,this.layout="horizontal",this.numbered=!1,this.scale="m",this.selectedItem=null,this.calciteInternalStepperItemChange=d({cancelable:!1}),this.calciteStepperChange=d({cancelable:!1}),this.listen("calciteInternalStepperItemKeyEvent",this.calciteInternalStepperItemKeyEvent),this.listen("calciteInternalStepperItemUpdate",e=>{e.stopPropagation(),this.updateItems()}),this.listen("calciteInternalStepperItemSelect",this.updateItem),this.listen("calciteStepperItemSelect",this.handleItemSelect)}static{this.properties={currentActivePosition:[16,{},{state:!0}],icon:[7,{},{reflect:!0,type:Boolean}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numbered:[7,{},{reflect:!0,type:Boolean}],numberingSystem:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectedItem:[0,{},{attribute:!1}]}}static{this.styles=T}async endStep(){let e=this.getEnabledStepIndex(this.visibleItems.length-1,"previous");typeof e=="number"&&this.updateStep(e)}async goToStep(e){let t=e-1;this.currentActivePosition!==t&&this.updateStep(t)}async nextStep(){let e=this.getEnabledStepIndex(this.currentActivePosition+1,"next");typeof e=="number"&&this.updateStep(e)}async prevStep(){let e=this.getEnabledStepIndex(this.currentActivePosition-1,"previous");typeof e=="number"&&this.updateStep(e)}async startStep(){let e=this.getEnabledStepIndex(0,"next");typeof e=="number"&&this.updateStep(e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0}),this.updateItems()}willUpdate(e){(e.has("layout")&&(this.hasUpdated||this.layout!=="horizontal")||e.has("icon")&&(this.hasUpdated||this.icon!==!1)||e.has("numbered")&&(this.hasUpdated||this.numbered!==!1)||e.has("scale")&&(this.hasUpdated||this.scale!=="m")||e.has("numberingSystem")&&(this.hasUpdated||this.numberingSystem!==void 0))&&this.updateItems(),e.has("currentActivePosition")&&requestAnimationFrame(()=>{this.determineActiveStepper()})}loaded(){if(typeof this.currentActivePosition!="number"){let e=this.getFirstEnabledStepperPosition();e===0&&(this.currentActivePosition=e),this.calciteInternalStepperItemChange.emit({position:e})}}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}calciteInternalStepperItemKeyEvent(e){let t=e.detail.item,i=e.target;switch(t.key){case"ArrowDown":case"ArrowRight":o(this.focusableItems,i,"next");break;case"ArrowUp":case"ArrowLeft":o(this.focusableItems,i,"previous");break;case"Home":o(this.focusableItems,i,"first");break;case"End":o(this.focusableItems,i,"last");break}e.stopPropagation()}updateItem(e){let{position:t}=e.detail;typeof t=="number"&&(this.currentActivePosition=t,this.selectedItem=e.target),this.calciteInternalStepperItemChange.emit({position:t})}handleItemSelect(){this.emitItemSelect()}emitItemSelect(){this.calciteStepperChange.emit()}updateItems(){this.visibleItems=this.items.filter(e=>!e.hidden),this.determineActiveStepper(),this.focusableItems=this.visibleItems.filter(e=>!e.disabled&&!e.itemHidden),this.items.forEach(e=>{e.icon=this.icon,e.numbered=this.numbered,e.layout=this.layout,e.scale=this.scale,e.numberingSystem=this.numberingSystem})}determineActiveStepper(){let{visibleItems:e}=this;if(e.length<2)return;let{currentActivePosition:t,layout:i}=this;this.multipleViewMode=i!=="horizontal-single",e.forEach((n,s)=>{n.itemHidden=i==="horizontal-single"&&s!==(t||0)})}getEnabledStepIndex(e,t="next"){let{visibleItems:i,currentActivePosition:n}=this,s=e;for(;s>=0&&s<i.length&&i[s]?.disabled;)s=s+(t==="previous"?-1:1);return s!==n&&s<i.length&&s>=0?s:null}updateStep(e){this.currentActivePosition=e,this.calciteInternalStepperItemChange.emit({position:e})}handleActionClick(e){let t=this.currentActivePosition;e.target.getAttribute("data-position")==="start"?this.prevStep():this.nextStep(),typeof this.currentActivePosition=="number"&&t!==this.currentActivePosition&&this.visibleItems[this.currentActivePosition]&&!this.visibleItems[this.currentActivePosition].disabled&&this.emitItemSelect()}getFirstEnabledStepperPosition(){let e=this.visibleItems.findIndex(t=>!t.disabled);return e>-1?e:0}handleDefaultSlotChange(e){let t=A(e).filter(n=>n?.tagName==="CALCITE-STEPPER-ITEM");this.items=t,this.updateItems();let i=Array(this.visibleItems.length).fill("1fr").join(" ");this.containerRef.value.style.gridTemplateAreas=i,this.containerRef.value.style.gridTemplateColumns=i}render(){return this.el.ariaLabel=this.messages.label,this.el.role="region",r`<div class=${a({container:!0,[p.singleView]:this.layout==="horizontal-single"})} ${v(this.containerRef)}>${this.layout==="horizontal-single"&&r`<div class=${a({[p.stepBarContainer]:!0})}>${this.visibleItems.map((e,t)=>R({active:t===this.currentActivePosition,complete:e.complete&&t!==this.currentActivePosition&&!e.error,disabled:e.disabled&&t!==this.currentActivePosition,error:e.error&&t!==this.currentActivePosition}))}</div>`||""}${this.layout==="horizontal-single"&&r`<div class=${a({[p.actionContainer]:!0})}>${this.renderAction("start")}${this.renderAction("end")}</div>`||""}<slot @slotchange=${this.handleDefaultSlotChange}></slot></div>`}renderAction(e){let t=e==="start",i=t?z.chevronLeft:z.chevronRight,{currentActivePosition:n,multipleViewMode:s,layout:P}=this,C=B.position(this.guid,t),w=t?-1:1,E=t?"previous":"next",$=this.getEnabledStepIndex(n+w,E)===null;return P==="horizontal-single"&&!s?r`<calcite-action alignment=center class=${a({[p.actionIcon]:!0})} compact data-position=${e??h} .disabled=${$} .icon=${i} icon-flip-rtl id=${C??h} @click=${this.handleActionClick} .scale=${this.scale} .text=${t?this.messages.previousStep:this.messages.nextStep}></calcite-action>`:null}};I("calcite-stepper",m);export{m as Stepper};
|