@patternfly/elements 4.0.2 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +34 -1
- package/package.json +3 -3
- package/pf-accordion/pf-accordion-header.js +1 -1
- package/pf-accordion/pf-accordion-panel.js +1 -1
- package/pf-accordion/pf-accordion.js +1 -1
- package/pf-avatar/pf-avatar.js +1 -1
- package/pf-back-to-top/pf-back-to-top.js +5 -2
- package/pf-back-to-top/pf-back-to-top.js.map +1 -1
- package/pf-background-image/pf-background-image.js +1 -1
- package/pf-badge/pf-badge.js +1 -1
- package/pf-banner/pf-banner.js +1 -1
- package/pf-button/pf-button.js +1 -1
- package/pf-card/pf-card.js +1 -1
- package/pf-card/test/pf-card.e2e.js +20 -1
- package/pf-card/test/pf-card.e2e.js.map +1 -1
- package/pf-chip/pf-chip-group.js +1 -1
- package/pf-chip/pf-chip.js +1 -1
- package/pf-clipboard-copy/pf-clipboard-copy.js +6 -4
- package/pf-clipboard-copy/pf-clipboard-copy.js.map +1 -1
- package/pf-code-block/pf-code-block.js +1 -1
- package/pf-dropdown/pf-dropdown-group.js +1 -1
- package/pf-dropdown/pf-dropdown-item.js +1 -1
- package/pf-dropdown/pf-dropdown-menu.js +1 -1
- package/pf-dropdown/pf-dropdown.js +1 -1
- package/pf-icon/pf-icon.js +1 -1
- package/pf-jump-links/pf-jump-links-item.js +1 -1
- package/pf-jump-links/pf-jump-links-list.js +1 -1
- package/pf-jump-links/pf-jump-links.js +1 -1
- package/pf-label/pf-label.js +1 -1
- package/pf-modal/pf-modal.js +1 -1
- package/pf-panel/pf-panel.js +1 -1
- package/pf-popover/pf-popover.js +1 -1
- package/pf-progress/pf-progress.js +1 -1
- package/pf-progress-stepper/pf-progress-step.js +1 -1
- package/pf-progress-stepper/pf-progress-stepper.js +1 -1
- package/pf-select/pf-option-group.js +1 -1
- package/pf-select/pf-option.js +1 -1
- package/pf-select/pf-select.js +1 -1
- package/pf-spinner/pf-spinner.js +1 -1
- package/pf-switch/pf-switch.js +1 -1
- package/pf-table/context.d.ts +3 -0
- package/pf-table/context.js +3 -0
- package/pf-table/context.js.map +1 -0
- package/pf-table/pf-caption.js +1 -1
- package/pf-table/pf-table.d.ts +1 -0
- package/pf-table/pf-table.js +9 -3
- package/pf-table/pf-table.js.map +1 -1
- package/pf-table/pf-tbody.js +1 -1
- package/pf-table/pf-td.js +1 -1
- package/pf-table/pf-th.d.ts +1 -0
- package/pf-table/pf-th.js +8 -6
- package/pf-table/pf-th.js.map +1 -1
- package/pf-table/pf-thead.d.ts +1 -0
- package/pf-table/pf-thead.js +7 -1
- package/pf-table/pf-thead.js.map +1 -1
- package/pf-table/pf-tr.js +1 -1
- package/pf-tabs/pf-tab-panel.js +1 -1
- package/pf-tabs/pf-tab.d.ts +1 -1
- package/pf-tabs/pf-tab.js +4 -3
- package/pf-tabs/pf-tab.js.map +1 -1
- package/pf-tabs/pf-tabs.js +1 -1
- package/pf-tabs/test/pf-tabs.spec.js +9 -0
- package/pf-tabs/test/pf-tabs.spec.js.map +1 -1
- package/pf-text-area/pf-text-area.js +1 -1
- package/pf-text-input/pf-text-input.js +1 -1
- package/pf-tile/pf-tile.js +1 -1
- package/pf-timestamp/pf-timestamp.js +1 -1
- package/pf-tooltip/pf-tooltip.js +3 -3
- package/pf-tooltip/pf-tooltip.js.map +1 -1
- package/pfe.min.js +271 -271
- package/pfe.min.js.map +4 -4
package/pfe.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var np=Object.defineProperty;var jm=Object.getOwnPropertyDescriptor;var Vo=(l,t)=>()=>(l&&(t=l(l=0)),t);var lc=(l,t)=>{for(var o in t)np(l,o,{get:t[o],enumerable:!0})};var r=(l,t,o,e)=>{for(var a=e>1?void 0:e?jm(t,o):t,c=l.length-1,p;c>=0;c--)(p=l[c])&&(a=(e?p(t,o,a):p(a))||a);return e&&a&&np(t,o,a),a};var ic=(l,t,o)=>{if(!t.has(l))throw TypeError("Cannot "+o)};var i=(l,t,o)=>(ic(l,t,"read from private field"),o?o.call(l):t.get(l)),n=(l,t,o)=>{if(t.has(l))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(l):t.set(l,o)},_=(l,t,o,e)=>(ic(l,t,"write to private field"),e?e.call(l,o):t.set(l,o),o);var s=(l,t,o)=>(ic(l,t,"access private method"),o);import{__classPrivateFieldGet as H,__classPrivateFieldSet as Yo}from"tslib";import{autoUpdate as qm,computePosition as Vm,offset as Ym,shift as Xm,flip as Km,arrow as Gm}from"@floating-ui/dom";var lt,yr,xe,Ce,xl,Cl,Bl,kr,Vt,nc,cc,cp,sc,Xo,wr=Vo(()=>{"use strict";Xo=class{get alignment(){return H(this,Cl,"f")??"center"}get anchor(){return H(this,xl,"f")??""}get open(){return H(this,yr,"f")}get placement(){return H(this,kr,"f")??"top"}get styles(){return H(this,Bl,"f")??{}}constructor(t,o){lt.add(this),this.host=t,yr.set(this,!1),xe.set(this,!1),Ce.set(this,void 0),xl.set(this,void 0),Cl.set(this,void 0),Bl.set(this,void 0),kr.set(this,void 0),Vt.set(this,void 0),t.addController(this),Yo(this,Vt,{invoker:()=>t,shift:!0,...o},"f")}hostDisconnected(){H(this,Ce,"f")?.call(this)}async show({offset:t,placement:o,flip:e,fallbackPlacements:a}={}){let c=H(this,lt,"a",nc),p=H(this,lt,"a",cc);if(!(!c||!p)){if(!H(this,xe,"f")){Yo(this,xe,!0,"f");let f=H(this,lt,"m",sc).call(this,o,t,e,a);Yo(this,Ce,H(this,Ce,"f")??qm(c,p,()=>H(this,lt,"m",sc).call(this,o,t,e,a)),"f"),await f,Yo(this,xe,!1,"f")}Yo(this,yr,!0,"f"),this.host.requestUpdate()}}async hide(){for(await this.host.updateComplete;H(this,xe,"f")&&!this.open;)await new Promise(requestAnimationFrame);Yo(this,yr,!1,"f"),H(this,Ce,"f")?.call(this),this.host.requestUpdate(),await this.host.updateComplete}};yr=new WeakMap,xe=new WeakMap,Ce=new WeakMap,xl=new WeakMap,Cl=new WeakMap,Bl=new WeakMap,kr=new WeakMap,Vt=new WeakMap,lt=new WeakSet,nc=function(){let{invoker:t}=H(this,Vt,"f");return typeof t=="function"?t():t},cc=function(){let{content:t}=H(this,Vt,"f");return typeof t=="function"?t():t},cp=function(){let{arrow:t}=H(this,Vt,"f");return typeof t=="function"?t():t},sc=async function(t="top",o,e=!0,a){var c,p;let{padding:f,shift:v}=H(this,Vt,"f"),C=H(this,lt,"a",nc),w=H(this,lt,"a",cc),E=H(this,lt,"a",cp);if(!C||!w)return;let{x:X,y:U,placement:qo,middlewareData:ac}=await Vm(C,w,{strategy:"absolute",placement:t,middleware:[Ym(o),v&&Xm({padding:f}),E&&Gm({element:E,padding:E.offsetHeight/2}),e&&Km({padding:f,fallbackPlacements:a})].filter(Boolean)});if(E){let{x:Et,y:vl}=ac.arrow||{},_l={top:"bottom",right:"left",bottom:"top",left:"right"}[qo.split("-")[0]]||"";Object.assign(E.style,{left:Et!=null?`${Et}px`:"",top:vl!=null&&!["top"].includes(qo)?`${vl}px`:"",right:"",bottom:"",[_l]:`-${E.offsetHeight/2}px`})}Yo(this,kr,qo,"f"),c=this,p=this,[{set value(Et){Yo(c,xl,Et,"f")}}.value,{set value(Et){Yo(p,Cl,Et,"f")}}.value]=H(this,kr,"f").split("-")??[],Yo(this,Bl,{"--_floating-content-translate":`${X}px ${U}px`},"f"),this.host.requestUpdate()}});function D(l,t,o){if(typeof o?.value!="function")throw new TypeError(`Only methods can be decorated with @bound. <${t??l.name}> is not a method!`);return{configurable:!0,get(){let e=o.value.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}var Rt=Vo(()=>{"use strict"});function sp(l){return{fromAttribute(t){return typeof t!="string"?null:t.split(",").map(l)},toAttribute(t){return t.join(",")}}}var pp,yl,To,Sr=Vo(()=>{"use strict";pp=sp(l=>parseInt(l?.trim(),10)),yl=sp(l=>l.trim()),To=class extends Event{constructor(t,o){super(t,{bubbles:!0,composed:!0,...o})}}});import{css as Zm}from"lit";var Qm,dp,fp=Vo(()=>{"use strict";Qm=Zm`:host {
|
|
2
2
|
--_timestamp-text-decoration: underline dashed 1px;
|
|
3
3
|
--_timestamp-text-underline-offset: 4px;
|
|
4
4
|
display: inline;
|
|
@@ -96,20 +96,20 @@ var ep=Object.defineProperty;var Pm=Object.getOwnPropertyDescriptor;var qo=(l,t)
|
|
|
96
96
|
.bottom.start #tooltip::after { left: var(--_floating-arrow-size); }
|
|
97
97
|
.bottom.end #tooltip::after { right: var(--_floating-arrow-size); }
|
|
98
98
|
|
|
99
|
-
`,
|
|
99
|
+
`,dp=Qm});var hp={};lc(hp,{PfTooltip:()=>go});import{LitElement as Jm,html as og,isServer as tg}from"lit";import{customElement as eg}from"lit/decorators/custom-element.js";import{property as Lr}from"lit/decorators/property.js";import{styleMap as mp}from"lit/directives/style-map.js";import{classMap as rg}from"lit/directives/class-map.js";var ag,lg,it,Yt,kl,gp,Eo,Be,zr,pc,wl,bp,Wr,dc,go,Sl=Vo(()=>{"use strict";wr();Rt();Sr();fp();ag=["focusin","tap","click","mouseenter"],lg=["focusout","blur","mouseleave"],go=class extends Jm{constructor(){super(...arguments);n(this,it);n(this,kl);n(this,zr);n(this,wl);n(this,Wr);this.position="top";this.noFlip=!1;n(this,Eo,void 0);n(this,Be,new Xo(this,{content:()=>i(this,kl,gp),invoker:()=>i(this,Eo)?i(this,Eo):i(this,it,Yt)instanceof HTMLSlotElement&&i(this,it,Yt).assignedElements().length>0?i(this,it,Yt).assignedElements().at(0):i(this,it,Yt)}))}connectedCallback(){super.connectedCallback(),s(this,zr,pc).call(this),s(this,Wr,dc).call(this)}willUpdate(o){o.has("trigger")&&s(this,Wr,dc).call(this)}render(){let{alignment:o,anchor:e,open:a,styles:c}=i(this,Be),f=i(this,it,Yt)?.assignedElements().length===0&&i(this,it,Yt)?.assignedNodes().length>0?"block":"contents";return og`
|
|
100
100
|
<div id="container"
|
|
101
|
-
style="${
|
|
102
|
-
class="${
|
|
101
|
+
style="${mp(c)}"
|
|
102
|
+
class="${rg({open:a,[e]:!!e,[o]:!!o})}">
|
|
103
103
|
<div role="tooltip"
|
|
104
|
-
style="${
|
|
104
|
+
style="${mp({display:f})}"
|
|
105
105
|
aria-labelledby="tooltip">
|
|
106
|
-
<slot id="invoker" @slotchange="${s(this,
|
|
106
|
+
<slot id="invoker" @slotchange="${s(this,zr,pc)}"></slot>
|
|
107
107
|
</div>
|
|
108
108
|
<div aria-hidden="${String(!a)}">
|
|
109
109
|
<slot id="tooltip" name="content">${this.content}</slot>
|
|
110
110
|
</div>
|
|
111
111
|
</div>
|
|
112
|
-
`}async show(){await this.updateComplete;let o=this.position,e=o?.match(/top|bottom/)?{mainAxis:15,alignmentAxis:-4}:15;await i(this,
|
|
112
|
+
`}async show(){await this.updateComplete;let o=this.position,e=o?.match(/top|bottom/)?{mainAxis:15,alignmentAxis:-4}:15;await i(this,Be).show({offset:e,placement:o,flip:!this.noFlip,fallbackPlacements:this.flipBehavior})}async hide(){await i(this,Be).hide()}};it=new WeakSet,Yt=function(){return this.shadowRoot?.querySelector?.("#invoker")??null},kl=new WeakSet,gp=function(){return this.shadowRoot?.querySelector?.("#tooltip")??null},Eo=new WeakMap,Be=new WeakMap,zr=new WeakSet,pc=function(){this.requestUpdate()},wl=new WeakSet,bp=function(){return this.getRootNode().getElementById(this.trigger?.normalize()??"")},Wr=new WeakSet,dc=function(){if(!tg){let o=i(this,Eo);_(this,Eo,this.trigger instanceof HTMLElement?this.trigger:typeof this.trigger=="string"?s(this,wl,bp).call(this):null);for(let e of ag)i(this,Eo)?(this.removeEventListener(e,this.show),i(this,Eo).addEventListener(e,this.show)):(o?.removeEventListener(e,this.show),this.addEventListener(e,this.show));for(let e of lg)i(this,Eo)?(this.removeEventListener(e,this.hide),i(this,Eo).addEventListener(e,this.hide)):(o?.removeEventListener(e,this.hide),this.addEventListener(e,this.hide))}},go.styles=[dp],r([Lr()],go.prototype,"position",2),r([Lr()],go.prototype,"content",2),r([Lr({type:Boolean,attribute:"no-flip"})],go.prototype,"noFlip",2),r([Lr()],go.prototype,"trigger",2),r([Lr({attribute:"flip-behavior",converter:yl})],go.prototype,"flipBehavior",2),r([D],go.prototype,"show",1),r([D],go.prototype,"hide",1),go=r([eg("pf-tooltip")],go)});import{isServer as zg}from"lit";var S,ho=Vo(()=>{"use strict";S=class l{get prefix(){return!zg&&this.host instanceof HTMLElement?`[${this.host.localName}${this.host.id?`#${this.host.id}`:""}]`:`[${this.host.constructor.name}]`}static debugLog(t=null){try{return t!==null&&(l.logDebug=!!t,localStorage.pfeLog=!!t),localStorage.pfeLog==="true"}catch{return l.logDebug}}static debug(...t){l.debugLog()&&console.debug(...t)}static info(...t){l.debugLog()&&console.info(...t)}static log(...t){l.debugLog()&&console.log(...t)}static warn(...t){console.warn(...t)}static error(...t){console.error([...t].join(" "))}debug(...t){l.debug(this.prefix,...t)}info(...t){l.info(this.prefix,...t)}log(...t){l.log(this.prefix,...t)}warn(...t){l.warn(this.prefix,...t)}error(...t){l.error(this.prefix,...t)}constructor(t){if(this.host=t,l.instances.get(t))return l.instances.get(t);t.addController(this),l.instances.set(t,this)}hostConnected(){this.debug("connected")}};S.instances=new WeakMap});import{css as ab}from"lit";var lb,Vp,Yp=Vo(()=>{"use strict";lb=ab`:host {
|
|
113
113
|
position: relative;
|
|
114
114
|
display: inline-block;
|
|
115
115
|
line-height: 0;
|
|
@@ -143,12 +143,12 @@ svg {
|
|
|
143
143
|
min-height: var(--pf-icon--size, var(--_size));
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
`,
|
|
146
|
+
`,Vp=lb});var Ic={};lc(Ic,{IconResolveError:()=>oi,PfIcon:()=>W});import{LitElement as ib,html as nb}from"lit";import{customElement as cb}from"lit/decorators/custom-element.js";import{property as Ql}from"lit/decorators/property.js";import{state as sb}from"lit/decorators/state.js";var Xp,oi,Re,ti,ei,Kp,Me,Jl,ri,Gp,W,ko=Vo(()=>{"use strict";ho();Yp();Xp=globalThis.requestIdleCallback??globalThis.requestAnimationFrame??(async l=>Promise.resolve().then(l)),oi=class extends ErrorEvent{constructor(o,e,a){super("error",{message:`Could not load icon "${e}" from set "${o}".`});this.originalError=a}},W=class extends ib{constructor(){super(...arguments);n(this,ei);n(this,Me);n(this,ri);this.set="fas";this.icon="";this.size="sm";this.loading="lazy";n(this,Re,!1);n(this,ti,new S(this))}static addIconSet(o,e){var a;if(typeof o!="string")S.warn(`[${this.name}]: the first argument to addIconSet must be a string.`);else if(typeof e!="function")S.warn(`[${this.name}]: the second argument to addIconSet must be a function.`);else{this.resolvers.set(o,e);for(let c of this.instances)s(a=c,Me,Jl).call(a)}}static reset(){this.resolvers.clear(),this.resolve=this.defaultResolve}connectedCallback(){super.connectedCallback(),W.instances.add(this)}willUpdate(o){o.has("icon")&&s(this,Me,Jl).call(this)}disconnectedCallback(){super.disconnectedCallback(),W.io.unobserve(this),W.instances.delete(this)}render(){let o=this.content??"";return nb`
|
|
147
147
|
<div id="container" aria-hidden="true">${o}<span part="fallback"
|
|
148
148
|
?hidden=${!!o}><slot></slot>
|
|
149
149
|
</span>
|
|
150
150
|
</div>
|
|
151
|
-
`}async load(){let{set:o,icon:e}=this,a=W.resolvers.get(o)??W.resolve;if(o&&e&&typeof a=="function")try{this.content=await a(o,e),s(this,
|
|
151
|
+
`}async load(){let{set:o,icon:e}=this,a=W.resolvers.get(o)??W.resolve;if(o&&e&&typeof a=="function")try{this.content=await a(o,e),s(this,ri,Gp).call(this)}catch(c){i(this,ti).error(c.message),this.dispatchEvent?.(new oi(o,e,c))}}};Re=new WeakMap,ti=new WeakMap,ei=new WeakSet,Kp=function(){W.io.observe(this),i(this,Re)&&this.load()},Me=new WeakSet,Jl=function(){switch(this.loading){case"idle":return void Xp(()=>this.load());case"lazy":return void s(this,ei,Kp).call(this);case"eager":return void this.load()}},ri=new WeakSet,Gp=async function(){await this.updateComplete,this.dispatchEvent?.(new Event("load",{bubbles:!0}))},W.styles=[Vp],W.onIntersect=o=>o.forEach(({isIntersecting:e,target:a})=>{let c=a;_(c,Re,e),Xp(()=>{var p;i(c,Re)&&s(p=c,Me,Jl).call(p)})}),W.defaultResolve=(o,e)=>import(`@patternfly/icons/${o}/${e}.js`).then(a=>a.default.cloneNode(!0)),W.io=new IntersectionObserver(W.onIntersect),W.resolvers=new Map,W.instances=new Set,W.resolve=W.defaultResolve,r([Ql()],W.prototype,"set",2),r([Ql({reflect:!0})],W.prototype,"icon",2),r([Ql({reflect:!0})],W.prototype,"size",2),r([Ql()],W.prototype,"loading",2),r([sb()],W.prototype,"content",2),W=r([cb("pf-icon")],W)});import{css as Gh}from"lit";var Zh,Jd,of=Vo(()=>{"use strict";Zh=Gh`:host {
|
|
152
152
|
position: relative;
|
|
153
153
|
white-space: nowrap;
|
|
154
154
|
text-align: center;
|
|
@@ -186,9 +186,9 @@ svg {
|
|
|
186
186
|
--pf-c-badge--BackgroundColor: var(--pf-c-badge--m-unread--BackgroundColor,
|
|
187
187
|
var(--pf-global--palette--blue-400, #06c));
|
|
188
188
|
}
|
|
189
|
-
`,
|
|
189
|
+
`,Jd=Zh});var tf={};lc(tf,{PfBadge:()=>kt});import{LitElement as Qh,html as Jh}from"lit";import{customElement as ou}from"lit/decorators/custom-element.js";import{property as as}from"lit/decorators/property.js";var kt,ls=Vo(()=>{"use strict";of();kt=class extends Qh{render(){let{threshold:t,number:o,textContent:e}=this,a=t&&o&&t<o?`${t.toString()}+`:o!=null?o.toString():e??"";return Jh`
|
|
190
190
|
<span>${a}</span>
|
|
191
|
-
`}};
|
|
191
|
+
`}};kt.styles=[Jd],r([as({reflect:!0})],kt.prototype,"state",2),r([as({reflect:!0,type:Number})],kt.prototype,"number",2),r([as({reflect:!0,type:Number})],kt.prototype,"threshold",2),kt=r([ou("pf-badge")],kt)});Sl();import{LitElement as sg,html as pg}from"lit";import{customElement as dg}from"lit/decorators/custom-element.js";import{property as nt}from"lit/decorators/property.js";import{__classPrivateFieldGet as $,__classPrivateFieldSet as up}from"tslib";var fc,Ll,vp,Mt,lo,zl,_p,ig={dateFormat:void 0,timeFormat:void 0,customFormat:void 0,displaySuffix:"",locale:void 0,relative:!1,utc:!1,hour12:!1},Tr=class{get localeString(){return $(this,Mt,"f").toLocaleString($(this,lo,"f").locale)}get date(){return $(this,Mt,"f")}set date(t){up(this,Mt,new Date(t),"f")}get isoString(){return $(this,Mt,"f").toISOString()}get time(){if($(this,lo,"f").relative)return $(this,fc,"m",_p).call(this);{let{displaySuffix:t}=$(this,lo,"f"),{locale:o}=$(this,lo,"f");return $(this,lo,"f").utc&&(t||(t="UTC")),`${$(this,Mt,"f").toLocaleString(o,$(this,lo,"f").customFormat??{hour12:$(this,lo,"f").hour12,timeStyle:$(this,lo,"f").timeFormat,dateStyle:$(this,lo,"f").dateFormat,...$(this,lo,"f").utc&&{timeZone:"UTC"}})} ${t??""}`.trim()}}constructor(t,o){fc.add(this),Mt.set(this,new Date),lo.set(this,{}),zl.set(this,void 0),up(this,zl,t,"f"),t.addController(this);for(let[e,a]of Object.entries($(this,lo,"f")))$(this,lo,"f")[e]=o?.[e]??a}set(t,o){$(Ll,Ll,"m",vp).call(Ll,t)&&($(this,lo,"f")[t]=o,$(this,zl,"f").requestUpdate())}};Ll=Tr,Mt=new WeakMap,lo=new WeakMap,zl=new WeakMap,fc=new WeakSet,vp=function(t){return t in ig},_p=function(){let t=$(this,Mt,"f"),{locale:o}=$(this,lo,"f"),e=new Intl.RelativeTimeFormat(o,{localeMatcher:"best fit",numeric:"auto",style:"long"}),a=t.getTime()-Date.now(),c=a>0?1:-1,p=0,f,v=Math.round(Math.abs(a)/1e3),C=Math.round(v/60),w=Math.round(C/60),E=Math.round(w/24),X=Math.round(E/30),U=Math.round(X/12);return X>=12?(p=U,f="year"):E>=30?(p=X,f="month"):w>=24?(p=E,f="day"):C>=45?(p=w,f="hour"):v>=45?(p=C,f="minute"):v>=10&&(p=v,f="second"),typeof f<"u"?e.format(c*p,f):"just now"};import{css as ng}from"lit";var cg=ng`:host {
|
|
192
192
|
display: inline;
|
|
193
193
|
}
|
|
194
194
|
|
|
@@ -196,9 +196,9 @@ time {
|
|
|
196
196
|
text-decoration: var(--_timestamp-text-decoration, none);
|
|
197
197
|
text-underline-offset: var(--_timestamp-text-underline-offset, initial);
|
|
198
198
|
}
|
|
199
|
-
`,
|
|
200
|
-
<time datetime="${i(this,
|
|
201
|
-
`}};
|
|
199
|
+
`,xp=cg;var fg={fromAttribute(l){return!l||l==="true"}},Ro,fo=class extends sg{constructor(){super(...arguments);n(this,Ro,new Tr(this))}get date(){return i(this,Ro).localeString}set date(o){i(this,Ro).date=new Date(o)}get isoString(){return i(this,Ro).isoString}get time(){return i(this,Ro).time}connectedCallback(){super.connectedCallback(),this.hasAttribute("date")&&(i(this,Ro).date=new Date(this.getAttribute("date")))}willUpdate(o){for(let[e]of o)i(this,Ro).set(e,this[e])}render(){return pg`
|
|
200
|
+
<time datetime="${i(this,Ro).isoString}">${i(this,Ro).time}</time>
|
|
201
|
+
`}};Ro=new WeakMap,fo.styles=[xp],r([nt({reflect:!0,attribute:"date-format"})],fo.prototype,"dateFormat",2),r([nt({reflect:!0,attribute:"time-format"})],fo.prototype,"timeFormat",2),r([nt({attribute:!1})],fo.prototype,"customFormat",2),r([nt({reflect:!0,attribute:"display-suffix"})],fo.prototype,"displaySuffix",2),r([nt({reflect:!0})],fo.prototype,"locale",2),r([nt({reflect:!0,type:Boolean})],fo.prototype,"relative",2),r([nt({reflect:!0,type:Boolean})],fo.prototype,"utc",2),r([nt({reflect:!0,attribute:"hour-12",converter:fg})],fo.prototype,"hour12",2),r([nt({reflect:!0})],fo.prototype,"date",1),fo=r([dg("pf-timestamp")],fo);import{LitElement as bg,html as hg}from"lit";import{customElement as ug}from"lit/decorators/custom-element.js";import{property as Bp}from"lit/decorators/property.js";import{css as mg}from"lit";var gg=mg`:host {
|
|
202
202
|
position: relative;
|
|
203
203
|
display: inline-grid;
|
|
204
204
|
padding: var(--pf-c-tile--PaddingTop, var(--pf-global--spacer--lg, 1.5rem))
|
|
@@ -326,7 +326,7 @@ time {
|
|
|
326
326
|
margin-block: 0;
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
-
`,
|
|
329
|
+
`,Cp=gg;var Xt=class extends bg{constructor(){super(...arguments);this.selected=!1}render(){return hg`
|
|
330
330
|
<div part="header">
|
|
331
331
|
<div part="icon">
|
|
332
332
|
<slot id="icon" name="icon"></slot>
|
|
@@ -338,7 +338,7 @@ time {
|
|
|
338
338
|
<div part="body">
|
|
339
339
|
<slot id="body"></slot>
|
|
340
340
|
</div>
|
|
341
|
-
`}};
|
|
341
|
+
`}};Xt.styles=[Cp],r([Bp({reflect:!0,type:Boolean})],Xt.prototype,"selected",2),r([Bp({reflect:!0})],Xt.prototype,"stacked",2),Xt=r([ug("pf-tile")],Xt);import{LitElement as Sp,html as Bg,isServer as yg}from"lit";import{customElement as kg}from"lit/decorators/custom-element.js";import{property as J}from"lit/decorators/property.js";import{ifDefined as hc}from"lit/directives/if-defined.js";import{styleMap as wg}from"lit/directives/style-map.js";import{__classPrivateFieldGet as vg,__decorate as b}from"tslib";import{isServer as bc}from"lit";var gc,yp;function kp(l){return l==="role"||l.startsWith("aria")}var Wl=new WeakMap,mc=!1;function h(l,t){if(Wl.has(l)||Wl.set(l,new Set),!Wl.get(l).has(t)){if(!kp(t))throw new Error("@aria can only be called on ARIAMixin properties");Object.defineProperty(l,t,{enumerable:!0,configurable:!1,get(){return this.attachOrRetrieveInternals()[t]},set(o){let e=this.attachOrRetrieveInternals();e[t]=o,this.host.requestUpdate()}}),Wl.get(l).add(t)}}function _g(l){return l.hidden?"":l.getAttribute?.("aria-label")??l.textContent}var m=class l{static getLabels(t){return Array.from(this.instances.get(t)?.internals.labels??[])}static of(t,o){mc=!0;let e=l.instances.get(t)??new l(t,o);return e.initializeOptions(o),mc=!1,e}get formDisabled(){return bc?this._formDisabled:this.element?.matches(":disabled")||this._formDisabled}get labels(){return this.internals.labels}get validity(){return this.internals.validity}get computedLabelText(){return this.internals.ariaLabel||Array.from(this.internals.labels).reduce((t,o)=>`${t}${_g(o)}`,"")}get element(){return bc?this.host:this.host instanceof HTMLElement?this.host:this.options?.getHTMLElement?.()}constructor(t,o){if(gc.add(this),this.host=t,this.options=o,this.role=null,this.ariaActivedescendant=null,this.ariaAtomic=null,this.ariaAutoComplete=null,this.ariaBusy=null,this.ariaBrailleLabel=null,this.ariaBrailleRoleDescription=null,this.ariaChecked=null,this.ariaColCount=null,this.ariaColIndex=null,this.ariaColIndexText=null,this.ariaColSpan=null,this.ariaCurrent=null,this.ariaDescription=null,this.ariaDisabled=null,this.ariaExpanded=null,this.ariaHasPopup=null,this.ariaHidden=null,this.ariaInvalid=null,this.ariaKeyShortcuts=null,this.ariaLabel=null,this.ariaLevel=null,this.ariaLive=null,this.ariaModal=null,this.ariaMultiLine=null,this.ariaMultiSelectable=null,this.ariaOrientation=null,this.ariaPlaceholder=null,this.ariaPosInSet=null,this.ariaPressed=null,this.ariaReadOnly=null,this.ariaRequired=null,this.ariaRoleDescription=null,this.ariaRowCount=null,this.ariaRowIndex=null,this.ariaRowIndexText=null,this.ariaRowSpan=null,this.ariaSelected=null,this.ariaSetSize=null,this.ariaSort=null,this.ariaValueMax=null,this.ariaValueMin=null,this.ariaValueNow=null,this.ariaValueText=null,this.ariaActiveDescendantElement=null,this.ariaControlsElements=null,this.ariaDescribedByElements=null,this.ariaDetailsElements=null,this.ariaErrorMessageElements=null,this.ariaFlowToElements=null,this.ariaLabelledByElements=null,this.ariaOwnsElements=null,this._formDisabled=!1,!mc)throw new Error("InternalsController must be constructed with `InternalsController.for()`");if(!this.element)throw new Error("InternalsController must be instantiated with an HTMLElement or a `getHTMLElement` function");this.attachOrRetrieveInternals(),this.initializeOptions(o),l.instances.set(t,this),vg(this,gc,"m",yp).call(this)}attachOrRetrieveInternals(){return this.internals??(this.internals=this.element.attachInternals()),this.internals}initializeOptions(t){var o;this.options??(this.options=t??{});let{getHTMLElement:e,...a}=this.options;(o=this.options).getHTMLElement??(o.getHTMLElement=e);for(let[c,p]of Object.entries(a))kp(c)&&(this[c]=p)}setFormValue(...t){return this.internals.setFormValue(...t)}setValidity(...t){return this.internals.setValidity(...t)}checkValidity(...t){return this.internals.checkValidity(...t)}reportValidity(...t){return this.internals.reportValidity(...t)}submit(){this.internals.form?.requestSubmit()}reset(){this.internals.form?.reset()}};gc=new WeakSet,yp=function(){let t=this.element.formDisabledCallback;this.element.formDisabledCallback=o=>{this._formDisabled=o,t?.call(this.host,o)}};m.instances=new WeakMap;m.isSafari=!bc&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent);b([h],m.prototype,"role",void 0);b([h],m.prototype,"ariaActivedescendant",void 0);b([h],m.prototype,"ariaAtomic",void 0);b([h],m.prototype,"ariaAutoComplete",void 0);b([h],m.prototype,"ariaBusy",void 0);b([h],m.prototype,"ariaBrailleLabel",void 0);b([h],m.prototype,"ariaBrailleRoleDescription",void 0);b([h],m.prototype,"ariaChecked",void 0);b([h],m.prototype,"ariaColCount",void 0);b([h],m.prototype,"ariaColIndex",void 0);b([h],m.prototype,"ariaColIndexText",void 0);b([h],m.prototype,"ariaColSpan",void 0);b([h],m.prototype,"ariaCurrent",void 0);b([h],m.prototype,"ariaDescription",void 0);b([h],m.prototype,"ariaDisabled",void 0);b([h],m.prototype,"ariaExpanded",void 0);b([h],m.prototype,"ariaHasPopup",void 0);b([h],m.prototype,"ariaHidden",void 0);b([h],m.prototype,"ariaInvalid",void 0);b([h],m.prototype,"ariaKeyShortcuts",void 0);b([h],m.prototype,"ariaLabel",void 0);b([h],m.prototype,"ariaLevel",void 0);b([h],m.prototype,"ariaLive",void 0);b([h],m.prototype,"ariaModal",void 0);b([h],m.prototype,"ariaMultiLine",void 0);b([h],m.prototype,"ariaMultiSelectable",void 0);b([h],m.prototype,"ariaOrientation",void 0);b([h],m.prototype,"ariaPlaceholder",void 0);b([h],m.prototype,"ariaPosInSet",void 0);b([h],m.prototype,"ariaPressed",void 0);b([h],m.prototype,"ariaReadOnly",void 0);b([h],m.prototype,"ariaRequired",void 0);b([h],m.prototype,"ariaRoleDescription",void 0);b([h],m.prototype,"ariaRowCount",void 0);b([h],m.prototype,"ariaRowIndex",void 0);b([h],m.prototype,"ariaRowIndexText",void 0);b([h],m.prototype,"ariaRowSpan",void 0);b([h],m.prototype,"ariaSelected",void 0);b([h],m.prototype,"ariaSetSize",void 0);b([h],m.prototype,"ariaSort",void 0);b([h],m.prototype,"ariaValueMax",void 0);b([h],m.prototype,"ariaValueMin",void 0);b([h],m.prototype,"ariaValueNow",void 0);b([h],m.prototype,"ariaValueText",void 0);b([h],m.prototype,"ariaActiveDescendantElement",void 0);b([h],m.prototype,"ariaControlsElements",void 0);b([h],m.prototype,"ariaDescribedByElements",void 0);b([h],m.prototype,"ariaDetailsElements",void 0);b([h],m.prototype,"ariaErrorMessageElements",void 0);b([h],m.prototype,"ariaFlowToElements",void 0);b([h],m.prototype,"ariaLabelledByElements",void 0);b([h],m.prototype,"ariaOwnsElements",void 0);import{css as xg}from"lit";var Cg=xg`:host {
|
|
342
342
|
--pf-c-form-control--Color: var(--pf-global--Color--100, #151515);
|
|
343
343
|
--pf-c-form-control--FontSize: var(--pf-global--FontSize--md, 1rem);
|
|
344
344
|
--pf-c-form-control--LineHeight: var(--pf-global--LineHeight--md, 1.5);
|
|
@@ -605,23 +605,23 @@ input::placeholder {
|
|
|
605
605
|
--pf-c-form-control__select--invalid--BackgroundPosition: var(--pf-c-form-control--m-icon-sprite__select--invalid--BackgroundPosition);
|
|
606
606
|
}
|
|
607
607
|
*/
|
|
608
|
-
`,
|
|
608
|
+
`,wp=Cg;var bo,Er,Rr,El,Lp,Mr,uc,Rl,zp,Ml,Wp,Fr,vc,ye,Tl,R=class extends Sp{constructor(){super(...arguments);n(this,El);n(this,Mr);n(this,Rl);n(this,Ml);n(this,Fr);n(this,ye);this.leftTruncated=!1;this.plain=!1;this.disabled=!1;this.required=!1;this.readonly=!1;this.value="";n(this,bo,m.of(this));n(this,Er,"");n(this,Rr,!1)}willUpdate(){_(this,Er,this.accessibleLabel||i(this,bo).computedLabelText)}render(){let{valid:o}=i(this,bo).validity;return Bg`
|
|
609
609
|
<input id="input"
|
|
610
610
|
.placeholder="${this.placeholder??""}"
|
|
611
611
|
.value="${this.value}"
|
|
612
|
-
pattern="${
|
|
613
|
-
@input="${s(this,
|
|
614
|
-
@keydown="${s(this,
|
|
615
|
-
@blur="${s(this,
|
|
616
|
-
?disabled="${i(this,
|
|
612
|
+
pattern="${hc(this.pattern)}"
|
|
613
|
+
@input="${s(this,Rl,zp)}"
|
|
614
|
+
@keydown="${s(this,Ml,Wp)}"
|
|
615
|
+
@blur="${s(this,Fr,vc)}"
|
|
616
|
+
?disabled="${i(this,El,Lp)}"
|
|
617
617
|
?readonly="${this.readonly}"
|
|
618
618
|
?required="${this.required}"
|
|
619
|
-
aria-label="${i(this,
|
|
620
|
-
type="${
|
|
621
|
-
style="${
|
|
619
|
+
aria-label="${i(this,Er)}"
|
|
620
|
+
type="${hc(this.type)}"
|
|
621
|
+
style="${hc(this.customIconUrl&&wg({backgroundImage:`url('${this.customIconUrl}')`,backgroundSize:this.customIconDimensions}))}">
|
|
622
622
|
<span id="helper-text" ?hidden="${!this.helperText||o}">${this.helperText}</span>
|
|
623
|
-
<span id="error-text" ?hidden="${o}">${i(this,
|
|
624
|
-
`}async formStateRestoreCallback(o,e){if(e==="restore"){let[a,c]=o.split("/");this.value=c??a,this.requestUpdate(),await this.updateComplete,s(this,
|
|
623
|
+
<span id="error-text" ?hidden="${o}">${i(this,bo).validationMessage}</span>
|
|
624
|
+
`}async formStateRestoreCallback(o,e){if(e==="restore"){let[a,c]=o.split("/");this.value=c??a,this.requestUpdate(),await this.updateComplete,s(this,ye,Tl).call(this)}}async formDisabledCallback(){await this.updateComplete,this.requestUpdate()}setCustomValidity(o){i(this,bo).setValidity({},o),this.requestUpdate()}checkValidity(){s(this,ye,Tl).call(this);let o=i(this,bo).checkValidity();return this.requestUpdate(),o}reportValidity(){return s(this,ye,Tl).call(this),i(this,bo).reportValidity()}};bo=new WeakMap,Er=new WeakMap,Rr=new WeakMap,El=new WeakSet,Lp=function(){return!yg&&this.matches(":disabled")||this.disabled},Mr=new WeakSet,uc=function(){return this.shadowRoot?.getElementById("input")??null},Rl=new WeakSet,zp=function(o){let{value:e}=o.target;this.value=e,i(this,bo).setFormValue(e),i(this,Rr)&&!i(this,bo).validity.valid&&s(this,Fr,vc).call(this),_(this,Rr,!0)},Ml=new WeakSet,Wp=function(o){switch(o.key){case"Enter":this.reportValidity()&&i(this,bo).form?.requestSubmit(null)}},Fr=new WeakSet,vc=function(){this.validateOn==="blur"&&this.checkValidity()},ye=new WeakSet,Tl=function(){i(this,bo).setValidity(i(this,Mr,uc)?.validity,this.errorText??i(this,Mr,uc).validationMessage),this.requestUpdate()},R.styles=[wp],R.formAssociated=!0,R.shadowRootOptions={...Sp.shadowRootOptions,delegatesFocus:!0},r([J({type:Boolean,reflect:!0,attribute:"left-truncated"})],R.prototype,"leftTruncated",2),r([J({reflect:!0})],R.prototype,"validated",2),r([J({reflect:!0})],R.prototype,"icon",2),r([J({reflect:!0,attribute:"accessible-label"})],R.prototype,"accessibleLabel",2),r([J({reflect:!0,attribute:"custom-icon-url"})],R.prototype,"customIconUrl",2),r([J({reflect:!0,attribute:"custom-icon-dimensions"})],R.prototype,"customIconDimensions",2),r([J({type:Boolean,reflect:!0})],R.prototype,"plain",2),r([J({reflect:!0})],R.prototype,"type",2),r([J({type:Boolean,reflect:!0})],R.prototype,"disabled",2),r([J({type:Boolean,reflect:!0})],R.prototype,"required",2),r([J()],R.prototype,"pattern",2),r([J({type:Boolean,reflect:!0})],R.prototype,"readonly",2),r([J({attribute:"helper-text"})],R.prototype,"helperText",2),r([J({attribute:"validate-on"})],R.prototype,"validateOn",2),r([J({attribute:"error-text"})],R.prototype,"errorText",2),r([J()],R.prototype,"placeholder",2),r([J()],R.prototype,"value",2),R=r([kg("pf-text-input")],R);import{LitElement as Ep,html as Wg,isServer as Tg}from"lit";import{customElement as Eg}from"lit/decorators/custom-element.js";import{property as ct}from"lit/decorators/property.js";import{ifDefined as Rp}from"lit/directives/if-defined.js";import{classMap as Rg}from"lit/directives/class-map.js";import{css as Sg}from"lit";var Lg=Sg`:host {
|
|
625
625
|
display: block;
|
|
626
626
|
|
|
627
627
|
/* .pf-c-form-control */
|
|
@@ -814,18 +814,18 @@ textarea[readonly] {
|
|
|
814
814
|
.horizontal { resize: horizontal; }
|
|
815
815
|
.both { resize: both; }
|
|
816
816
|
|
|
817
|
-
`,
|
|
818
|
-
<textarea id="textarea" class="${
|
|
819
|
-
@input="${s(this,
|
|
820
|
-
@change="${s(this,
|
|
821
|
-
?disabled="${i(this,
|
|
817
|
+
`,Tp=Lg;ho();var Fl,st,Pr,Pl,Mp,pt,Kt,Ir,_c,Hr,xc,$r,Cc,io=class extends Ep{constructor(){super(...arguments);n(this,Pl);n(this,pt);n(this,Ir);n(this,Hr);n(this,$r);this.disabled=!1;this.required=!1;this.readonly=!1;this.value="";this.autoResize=!1;n(this,Fl,new S(this));n(this,st,m.of(this));n(this,Pr,"")}willUpdate(){_(this,Pr,this.accessibleLabel||i(this,st).computedLabelText)}render(){let o={[String(this.resize)]:!!this.resize};return Wg`
|
|
818
|
+
<textarea id="textarea" class="${Rg(o)}"
|
|
819
|
+
@input="${s(this,Ir,_c)}"
|
|
820
|
+
@change="${s(this,Ir,_c)}"
|
|
821
|
+
?disabled="${i(this,Pl,Mp)}"
|
|
822
822
|
?readonly="${this.readonly}"
|
|
823
823
|
?required="${this.required}"
|
|
824
|
-
aria-label="${
|
|
825
|
-
placeholder="${
|
|
824
|
+
aria-label="${Rp(i(this,Pr))}"
|
|
825
|
+
placeholder="${Rp(this.placeholder)}"
|
|
826
826
|
.value="${this.value}"
|
|
827
827
|
></textarea>
|
|
828
|
-
`}firstUpdated(){this.autoResize&&s(this,Tr,mc).call(this)}async formDisabledCallback(){await this.updateComplete,this.requestUpdate()}setCustomValidity(o){i(this,nt).setValidity({},o)}checkValidity(){return s(this,Er,gc).call(this),i(this,nt).checkValidity()}reportValidity(){return s(this,Er,gc).call(this),i(this,nt).reportValidity()}};zl=new WeakMap,nt=new WeakMap,zr=new WeakMap,Wl=new WeakSet,zp=function(){return!Cg&&this.matches(":disabled")||this.disabled},ct=new WeakSet,qt=function(){return this.shadowRoot?.getElementById("textarea")??null},Wr=new WeakSet,fc=function(o){if(o.target instanceof HTMLTextAreaElement){let{value:e}=o.target;this.value=e,i(this,nt).setFormValue(e)}this.autoResize&&s(this,Tr,mc).call(this)},Tr=new WeakSet,mc=function(){i(this,ct,qt).style.setProperty("--pf-c-form-control--textarea--Height","auto"),i(this,ct,qt).style.setProperty("--pf-c-form-control--textarea--Height",`${i(this,ct,qt).scrollHeight}px`)},Er=new WeakSet,gc=function(){i(this,ct,qt)?i(this,nt).setValidity(i(this,ct,qt).validity,i(this,ct,qt).validationMessage):i(this,zl).warn("await updateComplete before validating")},ao.styles=[wp],ao.formAssociated=!0,ao.shadowRootOptions={...Sp.shadowRootOptions,delegatesFocus:!0},r([it({reflect:!0,attribute:"accessible-label"})],ao.prototype,"accessibleLabel",2),r([it({reflect:!0})],ao.prototype,"validated",2),r([it({type:Boolean,reflect:!0})],ao.prototype,"disabled",2),r([it({type:Boolean,reflect:!0})],ao.prototype,"required",2),r([it({type:Boolean,reflect:!0})],ao.prototype,"readonly",2),r([it()],ao.prototype,"placeholder",2),r([it()],ao.prototype,"value",2),r([it()],ao.prototype,"resize",2),r([it({type:Boolean,attribute:"auto-resize"})],ao.prototype,"autoResize",2),ao=r([Bg("pf-text-area")],ao);import{html as Tc,LitElement as ob}from"lit";import{customElement as tb}from"lit/decorators/custom-element.js";import{property as mt}from"lit/decorators/property.js";import{query as eb}from"lit/decorators/query.js";var st=class extends Event{constructor(t,o,e){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.callback=o,this.subscribe=e??!1}};function bc(l){return l}var xe=class{constructor(t,o,e,a){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(c,p)=>{this.unsubscribe&&(this.unsubscribe!==p&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=c,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(c,p)),this.unsubscribe=p},this.host=t,o.context!==void 0){let c=o;this.context=c.context,this.callback=c.callback,this.subscribe=c.subscribe??!1}else this.context=o,this.callback=e,this.subscribe=a??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new st(this.context,this.t,this.subscribe))}};var Tl=class{get value(){return this.o}set value(t){this.setValue(t)}setValue(t,o=!1){let e=o||!Object.is(t,this.o);this.o=t,e&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(let[o,{disposer:e}]of this.subscriptions)o(this.o,e)},t!==void 0&&(this.value=t)}addCallback(t,o,e){if(!e)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:o});let{disposer:a}=this.subscriptions.get(t);t(this.value,a)}clearCallbacks(){this.subscriptions.clear()}};var hc=class extends Event{constructor(t){super("context-provider",{bubbles:!0,composed:!0}),this.context=t}},Ce=class extends Tl{constructor(t,o,e){super(o.context!==void 0?o.initialValue:e),this.onContextRequest=a=>{let c=a.composedPath()[0];a.context===this.context&&c!==this.host&&(a.stopPropagation(),this.addCallback(a.callback,c,a.subscribe))},this.onProviderRequest=a=>{let c=a.composedPath()[0];if(a.context!==this.context||c===this.host)return;let p=new Set;for(let[f,{consumerHost:b}]of this.subscriptions)p.has(f)||(p.add(f),b.dispatchEvent(new st(this.context,f,!0)));a.stopPropagation()},this.host=t,o.context!==void 0?this.context=o.context:this.context=o,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new hc(this.context))}};var Rr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let o=this.pendingContextRequests.get(t.context);if(o===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:e}=o;for(let{elementRef:a,callbackRef:c}of e){let p=a.deref(),f=c.deref();p===void 0||f===void 0||p.dispatchEvent(new st(t.context,f,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let o=t.composedPath()[0],e=t.callback,a=this.pendingContextRequests.get(t.context);a===void 0&&this.pendingContextRequests.set(t.context,a={callbacks:new WeakMap,requests:[]});let c=a.callbacks.get(o);c===void 0&&a.callbacks.set(o,c=new WeakSet),c.has(e)||(c.add(e),a.requests.push({elementRef:new WeakRef(o),callbackRef:new WeakRef(e)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};function Mr({context:l}){return(t,o)=>{let e=new WeakMap;if(typeof o=="object")return o.addInitializer(function(){e.set(this,new Ce(this,{context:l}))}),{get(){return t.get.call(this)},set(a){return e.get(this)?.setValue(a),t.set.call(this,a)},init(a){return e.get(this)?.setValue(a),a}};{t.constructor.addInitializer(p=>{e.set(p,new Ce(p,{context:l}))});let a=Object.getOwnPropertyDescriptor(t,o),c;if(a===void 0){let p=new WeakMap;c={get(){return p.get(this)},set(f){e.get(this).setValue(f),p.set(this,f)},configurable:!0,enumerable:!0}}else{let p=a.set;c={...a,set(f){e.get(this).setValue(f),p?.call(this,f)}}}return void Object.defineProperty(t,o,c)}}}function pt({context:l,subscribe:t}){return(o,e)=>{typeof e=="object"?e.addInitializer(function(){new xe(this,{context:l,callback:a=>{o.set.call(this,a)},subscribe:t})}):o.constructor.addInitializer(a=>{new xe(a,{context:l,callback:c=>{a[e]=c},subscribe:t})})}}mo();import{classMap as rb}from"lit/directives/class-map.js";import{__classPrivateFieldGet as B,__classPrivateFieldSet as Fr}from"tslib";function uc(l,t,o=!1,e=!1){if(!l||!t)return!1;let a=l.getBoundingClientRect(),c=t.getBoundingClientRect(),p=Math.ceil(a.left),f=Math.floor(a.right),b=Math.ceil(c.left),x=Math.floor(c.right),S=b>=p&&x<=f,E=(o||!e&&a.width<c.width)&&(b<p&&x>p||x>f&&b<f);return S||E}var dt,Ir,xc,Q,Pr,El,Rl,Be,vc,_c,Et,Hr=class{get firstItem(){return B(this,Pr,"f").at(0)}get lastItem(){return B(this,Pr,"f").at(-1)}constructor(t,o){dt.add(this),this.host=t,this.options=o,Q.set(this,void 0),Pr.set(this,[]),El.set(this,void 0),Rl.set(this,void 0),Be.set(this,void 0),vc.set(this,new MutationObserver(e=>{for(let a of e)a.type==="childList"&&B(this,dt,"m",Et).call(this)})),_c.set(this,new ResizeObserver(()=>{requestAnimationFrame(()=>{B(this,dt,"m",Et).call(this)})})),this.showScrollButtons=!1,this.overflowLeft=!1,this.overflowRight=!1,this.onScroll=()=>{clearTimeout(B(this,Rl,"f")),Fr(this,Rl,setTimeout(()=>B(this,dt,"m",Et).call(this),B(this,El,"f")),"f")},Fr(this,Be,o?.hideOverflowButtons??!1,"f"),Fr(this,El,o?.scrollTimeoutDelay??0,"f"),t.isConnected&&B(Ir,Ir,"f",xc).add(this),t.addController(this),t.isConnected&&this.hostConnected()}init(t,o){Fr(this,Q,t,"f"),Fr(this,Pr,o,"f")}scrollLeft(){if(!B(this,Q,"f"))return;let t=B(this,Q,"f").scrollLeft-B(this,Q,"f").clientWidth;B(this,Q,"f").scroll({left:t,behavior:"smooth"}),B(this,dt,"m",Et).call(this)}scrollRight(){if(!B(this,Q,"f"))return;let t=B(this,Q,"f").scrollLeft+B(this,Q,"f").clientWidth;B(this,Q,"f").scroll({left:t,behavior:"smooth"}),B(this,dt,"m",Et).call(this)}update(){B(this,dt,"m",Et).call(this)}hostConnected(){B(this,vc,"f").observe(this.host,{attributes:!1,childList:!0,subtree:!0}),B(this,_c,"f").observe(this.host),this.onScroll(),B(this,dt,"m",Et).call(this)}};Ir=Hr,Q=new WeakMap,Pr=new WeakMap,El=new WeakMap,Rl=new WeakMap,Be=new WeakMap,vc=new WeakMap,_c=new WeakMap,dt=new WeakSet,Et=function(){if(!this.firstItem||!this.lastItem||!B(this,Q,"f"))return;let t=this.overflowLeft,o=this.overflowRight;this.overflowLeft=!B(this,Be,"f")&&!uc(B(this,Q,"f"),this.firstItem),this.overflowRight=!B(this,Be,"f")&&!uc(B(this,Q,"f"),this.lastItem);let e=0;(this.overflowLeft||this.overflowRight)&&(e=(B(this,Q,"f").parentElement?.querySelector("button")?.getBoundingClientRect().width||0)*2),this.showScrollButtons=!B(this,Be,"f")&&B(this,Q,"f").scrollWidth>B(this,Q,"f").clientWidth+e,(t!==this.overflowLeft||o!==this.overflowRight)&&this.host.requestUpdate()};xc={value:new Set};globalThis.addEventListener?.("resize",()=>{for(let l of B(Ir,Ir,"f",xc))l.onScroll()},{capture:!1,passive:!0});import{__classPrivateFieldGet as Bc,__classPrivateFieldSet as Tp,__decorate as Sg}from"tslib";import{isServer as Lg}from"lit";Wt();import{__classPrivateFieldGet as Xo,__classPrivateFieldSet as Wp}from"tslib";import{isServer as kg}from"lit";var Ml,ft,$r,Cc;function wg(l){return!!l&&l.ariaHidden!=="true"&&!l.hasAttribute("inert")&&!l.hasAttribute("hidden")}var ye=class{get atFocusedItemIndex(){return Xo(this,$r,"f")}set atFocusedItemIndex(t){let o=Xo(this,$r,"f"),e=t>o?1:-1,{items:a,atFocusableItems:c}=this,p=a.indexOf(this.atFocusableItems.at(-1)),f=a.at(t),b=c.includes(f);if(c.length){let x=0;for(;!f||!b&&x++<=1e3;)t<0?t=p:t>=p?t=0:t=t+e,f=a.at(t),b=c.includes(f);if(x>=1e3)throw new Error("Could not atFocusedItemIndex")}Wp(this,$r,t,"f")}get controlsElements(){return this.options.getControlsElements?.()??[]}get atFocusableItems(){return this._items.filter(wg)}get itemsContainerElement(){return Xo(this,ft,"f")??null}set itemsContainerElement(t){t!==Xo(this,ft,"f")&&(Xo(this,ft,"f")?.removeEventListener("keydown",this.onKeydown),Wp(this,ft,t,"f"),Xo(this,ft,"f")?.addEventListener("keydown",this.onKeydown),this.host.requestUpdate())}constructor(t,o){Ml.add(this),this.host=t,this.options=o,ft.set(this,null),$r.set(this,-1),this._items=[],this.host.updateComplete.then(()=>this.initItems())}initItems(){this.items=this.options.getItems(),this.itemsContainerElement??(this.itemsContainerElement=Xo(this,Ml,"m",Cc).call(this))}hostConnected(){this.hostUpdate()}hostDisconnected(){Xo(this,ft,"f")?.removeEventListener("keydown",this.onKeydown)}hostUpdate(){this.itemsContainerElement??(this.itemsContainerElement=Xo(this,Ml,"m",Cc).call(this))}onKeydown(t){let o=this.options.getOrientation?.()??Xo(this,ft,"f")?.getAttribute("aria-orientation"),e=this._items.at(this.atFocusedItemIndex),a=o==="horizontal"||e?.tagName==="SELECT"||e?.getAttribute("role")==="spinbutton",c=o==="vertical";switch(t.key){case"ArrowLeft":if(c)return;this.atFocusedItemIndex--,t.stopPropagation(),t.preventDefault();break;case"ArrowRight":if(c)return;this.atFocusedItemIndex++,t.stopPropagation(),t.preventDefault();break;case"ArrowUp":if(a)return;this.atFocusedItemIndex--,t.stopPropagation(),t.preventDefault();break;case"ArrowDown":if(a)return;this.atFocusedItemIndex++,t.stopPropagation(),t.preventDefault();break;case"Home":t.target instanceof HTMLElement&&(t.target.hasAttribute("aria-activedescendant")||t.target.ariaActiveDescendantElement)||(this.atFocusedItemIndex=0,t.stopPropagation(),t.preventDefault());break;case"End":t.target instanceof HTMLElement&&(t.target.hasAttribute("aria-activedescendant")||t.target.ariaActiveDescendantElement)||(this.atFocusedItemIndex=this.items.length-1,t.stopPropagation(),t.preventDefault());break;default:break}this.host.requestUpdate()}};ft=new WeakMap,$r=new WeakMap,Ml=new WeakSet,Cc=function(){return this.options.getItemsContainer?.()??(!kg&&this.host instanceof HTMLElement?this.host:null)};mo();Wt();var yc,Fl,Pl,co=class l extends ye{static of(t,o){return new l(t,o)}get atFocusedItemIndex(){return super.atFocusedItemIndex}set atFocusedItemIndex(t){super.atFocusedItemIndex=t;let o=this.items.at(this.atFocusedItemIndex);for(let e of this.items)e.tabIndex=o===e?0:-1;Bc(this,Fl,"f")&&o?.focus(),this.host.requestUpdate()}get items(){return this._items}set items(t){this._items=t,Tp(this,Pl,new Set(t),"f");let o=Math.max(0,this.atFocusedItemIndex),[e]=this.atFocusableItems,a=e?t.indexOf(e):-1,c=t.indexOf(this.items.slice(o).concat(this.items.slice(0,o)).find(p=>this.atFocusableItems.includes(p)));this.atFocusedItemIndex=Math.max(a,c),this.host.requestUpdate()}constructor(t,o){super(t,o),this.host=t,yc.set(this,new k(this.host)),Fl.set(this,!1),Pl.set(this,new Set),this.initItems();let e=o.getItemsContainer?.()??this.host;Lg||(e instanceof HTMLElement?e.addEventListener("focusin",()=>Tp(this,Fl,!0,"f"),{once:!0}):Bc(this,yc,"f").warn("RovingTabindexController requires a getItemsContainer function"))}onKeydown(t){!t.ctrlKey&&!t.altKey&&!t.metaKey&&this.atFocusableItems.length&&t.composedPath().some(o=>Bc(this,Pl,"f").has(o))&&super.onKeydown(t)}};yc=new WeakMap,Fl=new WeakMap,Pl=new WeakMap;Sg([A],co.prototype,"onKeydown",null);mo();import{__classPrivateFieldGet as O,__classPrivateFieldSet as Ar}from"tslib";var Or,Dr,$l,Rt,Mt,ke,Il,Hl,Al=class{get tabs(){return[...O(this,Mt,"f").keys()]}get activeTab(){return this.tabs.find(t=>O(this,ke,"f").isActiveTab(t))}constructor(t,o){if(Or.add(this),Dr.set(this,void 0),$l.set(this,void 0),Rt.set(this,void 0),Mt.set(this,new Map),ke.set(this,void 0),Il.set(this,new MutationObserver(O(this,Or,"m",Hl).bind(this))),Ar(this,ke,o,"f"),Ar(this,Dr,new k(t),"f"),t instanceof HTMLElement)Ar(this,Rt,t,"f");else{let e=o.getHTMLElement?.();if(!e)throw new Error("TabsController must be instantiated with an HTMLElement or a `getHTMLElement()` option");Ar(this,Rt,e,"f")}Ar(this,$l,t,"f").addController(this),O(this,Rt,"f").addEventListener("slotchange",O(this,Or,"m",Hl)),O(this,Rt,"f").isConnected&&this.hostConnected()}hostConnected(){O(this,Il,"f").observe(O(this,Rt,"f"),{attributes:!1,childList:!0,subtree:!1}),O(this,Or,"m",Hl).call(this)}hostUpdated(){for(let[t,o]of O(this,Mt,"f"))o.setAttribute("aria-labelledby",t.id),t.setAttribute("aria-controls",o.id)}hostDisconnected(){O(this,Il,"f").disconnect()}panelFor(t){return O(this,Mt,"f").get(t)}tabFor(t){for(let[o,e]of O(this,Mt,"f"))if(t===e)return o}};Dr=new WeakMap,$l=new WeakMap,Rt=new WeakMap,Mt=new WeakMap,ke=new WeakMap,Il=new WeakMap,Or=new WeakSet,Hl=function(){O(this,Mt,"f").clear();let t=[],o=[];for(let e of O(this,Rt,"f").children)O(this,ke,"f").isTab(e)?(t.push(e),e.role??(e.role="tab")):O(this,ke,"f").isPanel(e)&&(o.push(e),e.role??(e.role="tabpanel"));for(t.length>o.length?O(this,Dr,"f").warn("Too many tabs!"):o.length>t.length&&O(this,Dr,"f").warn("Too many panels!");t.length;)O(this,Mt,"f").set(t.shift(),o.shift());O(this,$l,"f").requestUpdate()};import{LitElement as Pg,html as Ig}from"lit";import{customElement as Hg}from"lit/decorators/custom-element.js";import{property as zc}from"lit/decorators/property.js";import{queryAssignedElements as $g}from"lit/decorators/query-assigned-elements.js";import{classMap as Ag}from"lit/directives/class-map.js";Wt();Wt();import{__decorate as zg}from"tslib";function Ep(l,t,o=!1){let e;return function(...a){let c=this,p=function(){e=null,o||l.apply(c,a)},f=o&&!e;clearTimeout(e),e=window.setTimeout(p,t),f&&l.apply(c,a)}}mo();var Ur=class l{constructor(t,o){this.host=t,this.options=o,this.mo=new MutationObserver(this.parse),this.cache=new Map,this.class=t.constructor,this.logger=new k(this.host),l.instances.set(t,this);let e=this.options?.properties??{};for(let[a,c]of Object.entries(e))this.initProp(a,c);t.addController(this),this.cascadeProperties=Ep(this.cascadeProperties,1)}hostUpdated(){this.cascadeProperties()}hostConnected(){this.mo.observe(this.host,{attributes:!0,childList:!0}),this.cascadeProperties()}hostDisconnected(){this.mo.disconnect()}cascadeProperties(t=this.host.children){if(this.host.isConnected){let o=this.cache.keys();if(!t)return this._cascadeAttributes(o,this.cache);for(let e of t)if(e instanceof Element){for(let a of o)if(e.matches(a)){let c=this.cache.get(a);for(let p of c??[])this._copyAttribute(p,e)}}}}initProp(t,o){for(let e of[o].flat(1/0).filter(Boolean)){let{attribute:a}=this.class.getPropertyOptions(t),c=typeof a=="string"?a:t.toLowerCase();this.cache.get(e)?this.cache.get(e)?.push(c):this.cache.set(e,[c])}}parse(t){for(let o of t??[])o.type==="childList"&&o.addedNodes.length?this.cascadeProperties(o.addedNodes):o.type==="attributes"&&this._cascadeAttributes(this.cache.keys(),this.cache)}async _copyAttribute(t,o){this.logger.log(`copying ${t} to ${o}`);let e=this.host.getAttribute(t);o.isConnected&&(e==null?o.removeAttribute(t):o.setAttribute(t,e))}_cascadeAttributes(t,o){for(let e of t)for(let a of o.get(e)??[])this._cascadeAttribute(a,e)}_cascadeAttribute(t,o){let e=[...this.host.querySelectorAll(o),...this.host.shadowRoot?.querySelectorAll(o)??[]];for(let a of e)this._copyAttribute(t,a)}};Ur.instances=new WeakMap;zg([A],Ur.prototype,"parse",null);mo();function Rp(l){return function(t,o){let{alias:e,...a}=l,c=t.constructor,p=c.getPropertyOptions(e);c.createProperty(o,{...p,...a}),c.addInitializer(f=>{f.addController(new kc(f,l,o))})}}var kc=class{constructor(t,o,e){this.host=t,this.options=o,this.deprecatedKey=e,this.logged=!1,this.logger=new k(t)}hostUpdate(){let{deprecatedKey:t,options:{alias:o}}=this;this.host[t]&&this.host[o]!==this.host[t]&&(this.logged||(this.logger.warn(`${t} is deprecated, use ${o} instead`),this.logged=!0),this.host[o]=this.host[t])}};mo();var Ol=class{constructor(t,o,e){this.host=t,this.options=e,this.initializer=o.bind(t),this.mo=new MutationObserver(this.initializer),this.logger=new k(this.host),t.addController(this)}hostConnected(){this.hasLightDOM()?this.initializer():this.options?.emptyWarning&&this.logger.warn(this.options?.emptyWarning),this.initObserver()}hostDisconnected(){this.mo.disconnect()}initObserver(){(this.options?.observe??!0)&&this.mo.observe(this.host,typeof this.options?.observe!="object"?{childList:!0}:this.options?.observe)}hasLightDOM(){return this.host.children.length>0||(this.host.textContent??"").trim().length>0}};function Mp(l){return function(t,o){t.constructor.addInitializer(e=>{let a=t[o],c=new Ol(e,a,l);e.isConnected&&c.hostConnected()})}}function wc(l,t){return function(o,e){let a=o.connectedCallback,c=o.disconnectedCallback,p=o[e];o.connectedCallback=function(){a?.call(this),this.addEventListener(l,p,t)},o.disconnectedCallback=function(){c?.call(this),this.removeEventListener(l,p,t)}}}import{__classPrivateFieldGet as Sc,__classPrivateFieldSet as Wg}from"tslib";import{notEqual as Tg}from"lit";var Dl,Ul,Lc,Fp=Symbol("uninitialized"),Nr=class{constructor(t,o){Dl.add(this),this.host=t,this.options=o,this.oldVal=Fp,Ul.set(this,!0)}hostConnected(){Sc(this,Dl,"m",Lc).call(this)}async hostUpdate(){Sc(this,Dl,"m",Lc).call(this);let{oldVal:t,options:{waitFor:o,propertyName:e,callback:a}}=this;if(!a)throw new Error(`no callback for ${e}`);let c=this.host[e];if(this.oldVal=c,c!==t)switch(o){case"connected":if(!this.host.isConnected){let b=this.host.connectedCallback;await new Promise(x=>{this.host.connectedCallback=function(){x(b?.call(this))}})}break;case"firstUpdated":this.host.hasUpdated||await this.host.updateComplete;break;case"updated":await this.host.updateComplete;break}let f=this.host.constructor.getPropertyOptions(this.options.propertyName).hasChanged??Tg;(Sc(this,Ul,"f")||f(t,c))&&(a.call(this.host,t,c),Wg(this,Ul,!1,"f"))}};Ul=new WeakMap,Dl=new WeakSet,Lc=function(){this.oldVal===Fp&&(this.oldVal=this.host[this.options.propertyName])};function L(l,t){return function(o,e){let a=o[e];if(typeof a!="function")throw new Error("@observes must decorate a class method");o.constructor.addInitializer(p=>{p.addController(new Nr(p,{...t,propertyName:l,callback:a}))})}}function N(l="pfe"){return`${l}-${Math.random().toString(36).substr(2,9)}`}import{isServer as Eg}from"lit";var Pp;function Rg(){let l=new Rr;return Eg||l.attach(document.body),l}function Nl(...l){return Pp??(Pp=Rg()),bc(...l)}var Vt=class extends Event{constructor(o){super("expand",{bubbles:!0,cancelable:!0});this.tab=o}},we=Nl(Symbol("pf-tabs-context"));import{css as Mg}from"lit";var Fg=Mg`[hidden] {
|
|
828
|
+
`}firstUpdated(){this.autoResize&&s(this,Hr,xc).call(this)}async formDisabledCallback(){await this.updateComplete,this.requestUpdate()}setCustomValidity(o){i(this,st).setValidity({},o)}checkValidity(){return s(this,$r,Cc).call(this),i(this,st).checkValidity()}reportValidity(){return s(this,$r,Cc).call(this),i(this,st).reportValidity()}};Fl=new WeakMap,st=new WeakMap,Pr=new WeakMap,Pl=new WeakSet,Mp=function(){return!Tg&&this.matches(":disabled")||this.disabled},pt=new WeakSet,Kt=function(){return this.shadowRoot?.getElementById("textarea")??null},Ir=new WeakSet,_c=function(o){if(o.target instanceof HTMLTextAreaElement){let{value:e}=o.target;this.value=e,i(this,st).setFormValue(e)}this.autoResize&&s(this,Hr,xc).call(this)},Hr=new WeakSet,xc=function(){i(this,pt,Kt).style.setProperty("--pf-c-form-control--textarea--Height","auto"),i(this,pt,Kt).style.setProperty("--pf-c-form-control--textarea--Height",`${i(this,pt,Kt).scrollHeight}px`)},$r=new WeakSet,Cc=function(){i(this,pt,Kt)?i(this,st).setValidity(i(this,pt,Kt).validity,i(this,pt,Kt).validationMessage):i(this,Fl).warn("await updateComplete before validating")},io.styles=[Tp],io.formAssociated=!0,io.shadowRootOptions={...Ep.shadowRootOptions,delegatesFocus:!0},r([ct({reflect:!0,attribute:"accessible-label"})],io.prototype,"accessibleLabel",2),r([ct({reflect:!0})],io.prototype,"validated",2),r([ct({type:Boolean,reflect:!0})],io.prototype,"disabled",2),r([ct({type:Boolean,reflect:!0})],io.prototype,"required",2),r([ct({type:Boolean,reflect:!0})],io.prototype,"readonly",2),r([ct()],io.prototype,"placeholder",2),r([ct()],io.prototype,"value",2),r([ct()],io.prototype,"resize",2),r([ct({type:Boolean,attribute:"auto-resize"})],io.prototype,"autoResize",2),io=r([Eg("pf-text-area")],io);import{html as Hc,LitElement as fb}from"lit";import{customElement as mb}from"lit/decorators/custom-element.js";import{property as bt}from"lit/decorators/property.js";import{query as gb}from"lit/decorators/query.js";var dt=class extends Event{constructor(t,o,e){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.callback=o,this.subscribe=e??!1}};function Bc(l){return l}var ke=class{constructor(t,o,e,a){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(c,p)=>{this.unsubscribe&&(this.unsubscribe!==p&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=c,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(c,p)),this.unsubscribe=p},this.host=t,o.context!==void 0){let c=o;this.context=c.context,this.callback=c.callback,this.subscribe=c.subscribe??!1}else this.context=o,this.callback=e,this.subscribe=a??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new dt(this.context,this.t,this.subscribe))}};var Il=class{get value(){return this.o}set value(t){this.setValue(t)}setValue(t,o=!1){let e=o||!Object.is(t,this.o);this.o=t,e&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(let[o,{disposer:e}]of this.subscriptions)o(this.o,e)},t!==void 0&&(this.value=t)}addCallback(t,o,e){if(!e)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:o});let{disposer:a}=this.subscriptions.get(t);t(this.value,a)}clearCallbacks(){this.subscriptions.clear()}};var yc=class extends Event{constructor(t){super("context-provider",{bubbles:!0,composed:!0}),this.context=t}},we=class extends Il{constructor(t,o,e){super(o.context!==void 0?o.initialValue:e),this.onContextRequest=a=>{let c=a.composedPath()[0];a.context===this.context&&c!==this.host&&(a.stopPropagation(),this.addCallback(a.callback,c,a.subscribe))},this.onProviderRequest=a=>{let c=a.composedPath()[0];if(a.context!==this.context||c===this.host)return;let p=new Set;for(let[f,{consumerHost:v}]of this.subscriptions)p.has(f)||(p.add(f),v.dispatchEvent(new dt(this.context,f,!0)));a.stopPropagation()},this.host=t,o.context!==void 0?this.context=o.context:this.context=o,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new yc(this.context))}};var Ar=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let o=this.pendingContextRequests.get(t.context);if(o===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:e}=o;for(let{elementRef:a,callbackRef:c}of e){let p=a.deref(),f=c.deref();p===void 0||f===void 0||p.dispatchEvent(new dt(t.context,f,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let o=t.composedPath()[0],e=t.callback,a=this.pendingContextRequests.get(t.context);a===void 0&&this.pendingContextRequests.set(t.context,a={callbacks:new WeakMap,requests:[]});let c=a.callbacks.get(o);c===void 0&&a.callbacks.set(o,c=new WeakSet),c.has(e)||(c.add(e),a.requests.push({elementRef:new WeakRef(o),callbackRef:new WeakRef(e)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};function ft({context:l}){return(t,o)=>{let e=new WeakMap;if(typeof o=="object")return o.addInitializer(function(){e.set(this,new we(this,{context:l}))}),{get(){return t.get.call(this)},set(a){return e.get(this)?.setValue(a),t.set.call(this,a)},init(a){return e.get(this)?.setValue(a),a}};{t.constructor.addInitializer(p=>{e.set(p,new we(p,{context:l}))});let a=Object.getOwnPropertyDescriptor(t,o),c;if(a===void 0){let p=new WeakMap;c={get(){return p.get(this)},set(f){e.get(this).setValue(f),p.set(this,f)},configurable:!0,enumerable:!0}}else{let p=a.set;c={...a,set(f){e.get(this).setValue(f),p?.call(this,f)}}}return void Object.defineProperty(t,o,c)}}}function Mo({context:l,subscribe:t}){return(o,e)=>{typeof e=="object"?e.addInitializer(function(){new ke(this,{context:l,callback:a=>{o.set.call(this,a)},subscribe:t})}):o.constructor.addInitializer(a=>{new ke(a,{context:l,callback:c=>{a[e]=c},subscribe:t})})}}ho();import{classMap as bb}from"lit/directives/class-map.js";import{__classPrivateFieldGet as y,__classPrivateFieldSet as Dr}from"tslib";function kc(l,t,o=!1,e=!1){if(!l||!t)return!1;let a=l.getBoundingClientRect(),c=t.getBoundingClientRect(),p=Math.ceil(a.left),f=Math.floor(a.right),v=Math.ceil(c.left),C=Math.floor(c.right),w=v>=p&&C<=f,E=(o||!e&&a.width<c.width)&&(v<p&&C>p||C>f&&v<f);return w||E}var mt,Ur,Lc,oo,Or,Hl,$l,Se,wc,Sc,Ft,Nr=class{get firstItem(){return y(this,Or,"f").at(0)}get lastItem(){return y(this,Or,"f").at(-1)}constructor(t,o){mt.add(this),this.host=t,this.options=o,oo.set(this,void 0),Or.set(this,[]),Hl.set(this,void 0),$l.set(this,void 0),Se.set(this,void 0),wc.set(this,new MutationObserver(e=>{for(let a of e)a.type==="childList"&&y(this,mt,"m",Ft).call(this)})),Sc.set(this,new ResizeObserver(()=>{requestAnimationFrame(()=>{y(this,mt,"m",Ft).call(this)})})),this.showScrollButtons=!1,this.overflowLeft=!1,this.overflowRight=!1,this.onScroll=()=>{clearTimeout(y(this,$l,"f")),Dr(this,$l,setTimeout(()=>y(this,mt,"m",Ft).call(this),y(this,Hl,"f")),"f")},Dr(this,Se,o?.hideOverflowButtons??!1,"f"),Dr(this,Hl,o?.scrollTimeoutDelay??0,"f"),t.isConnected&&y(Ur,Ur,"f",Lc).add(this),t.addController(this),t.isConnected&&this.hostConnected()}init(t,o){Dr(this,oo,t,"f"),Dr(this,Or,o,"f")}scrollLeft(){if(!y(this,oo,"f"))return;let t=y(this,oo,"f").scrollLeft-y(this,oo,"f").clientWidth;y(this,oo,"f").scroll({left:t,behavior:"smooth"}),y(this,mt,"m",Ft).call(this)}scrollRight(){if(!y(this,oo,"f"))return;let t=y(this,oo,"f").scrollLeft+y(this,oo,"f").clientWidth;y(this,oo,"f").scroll({left:t,behavior:"smooth"}),y(this,mt,"m",Ft).call(this)}update(){y(this,mt,"m",Ft).call(this)}hostConnected(){y(this,wc,"f").observe(this.host,{attributes:!1,childList:!0,subtree:!0}),y(this,Sc,"f").observe(this.host),this.onScroll(),y(this,mt,"m",Ft).call(this)}};Ur=Nr,oo=new WeakMap,Or=new WeakMap,Hl=new WeakMap,$l=new WeakMap,Se=new WeakMap,wc=new WeakMap,Sc=new WeakMap,mt=new WeakSet,Ft=function(){if(!this.firstItem||!this.lastItem||!y(this,oo,"f"))return;let t=this.overflowLeft,o=this.overflowRight;this.overflowLeft=!y(this,Se,"f")&&!kc(y(this,oo,"f"),this.firstItem),this.overflowRight=!y(this,Se,"f")&&!kc(y(this,oo,"f"),this.lastItem);let e=0;(this.overflowLeft||this.overflowRight)&&(e=(y(this,oo,"f").parentElement?.querySelector("button")?.getBoundingClientRect().width||0)*2),this.showScrollButtons=!y(this,Se,"f")&&y(this,oo,"f").scrollWidth>y(this,oo,"f").clientWidth+e,(t!==this.overflowLeft||o!==this.overflowRight)&&this.host.requestUpdate()};Lc={value:new Set};globalThis.addEventListener?.("resize",()=>{for(let l of y(Ur,Ur,"f",Lc))l.onScroll()},{capture:!1,passive:!0});import{__classPrivateFieldGet as Wc,__classPrivateFieldSet as Pp,__decorate as Pg}from"tslib";import{isServer as Ig}from"lit";Rt();import{__classPrivateFieldGet as Ko,__classPrivateFieldSet as Fp}from"tslib";import{isServer as Mg}from"lit";var Al,gt,jr,zc;function Fg(l){return!!l&&l.ariaHidden!=="true"&&!l.hasAttribute("inert")&&!l.hasAttribute("hidden")}var Le=class{get atFocusedItemIndex(){return Ko(this,jr,"f")}set atFocusedItemIndex(t){let o=Ko(this,jr,"f"),e=t>o?1:-1,{items:a,atFocusableItems:c}=this,p=a.indexOf(this.atFocusableItems.at(-1)),f=a.at(t),v=c.includes(f);if(c.length){let C=0;for(;!f||!v&&C++<=1e3;)t<0?t=p:t>=p?t=0:t=t+e,f=a.at(t),v=c.includes(f);if(C>=1e3)throw new Error("Could not atFocusedItemIndex")}Fp(this,jr,t,"f")}get controlsElements(){return this.options.getControlsElements?.()??[]}get atFocusableItems(){return this._items.filter(Fg)}get itemsContainerElement(){return Ko(this,gt,"f")??null}set itemsContainerElement(t){t!==Ko(this,gt,"f")&&(Ko(this,gt,"f")?.removeEventListener("keydown",this.onKeydown),Fp(this,gt,t,"f"),Ko(this,gt,"f")?.addEventListener("keydown",this.onKeydown),this.host.requestUpdate())}constructor(t,o){Al.add(this),this.host=t,this.options=o,gt.set(this,null),jr.set(this,-1),this._items=[],this.host.updateComplete.then(()=>this.initItems())}initItems(){this.items=this.options.getItems(),this.itemsContainerElement??(this.itemsContainerElement=Ko(this,Al,"m",zc).call(this))}hostConnected(){this.hostUpdate()}hostDisconnected(){Ko(this,gt,"f")?.removeEventListener("keydown",this.onKeydown)}hostUpdate(){this.itemsContainerElement??(this.itemsContainerElement=Ko(this,Al,"m",zc).call(this))}onKeydown(t){let o=this.options.getOrientation?.()??Ko(this,gt,"f")?.getAttribute("aria-orientation"),e=this._items.at(this.atFocusedItemIndex),a=o==="horizontal"||e?.tagName==="SELECT"||e?.getAttribute("role")==="spinbutton",c=o==="vertical";switch(t.key){case"ArrowLeft":if(c)return;this.atFocusedItemIndex--,t.stopPropagation(),t.preventDefault();break;case"ArrowRight":if(c)return;this.atFocusedItemIndex++,t.stopPropagation(),t.preventDefault();break;case"ArrowUp":if(a)return;this.atFocusedItemIndex--,t.stopPropagation(),t.preventDefault();break;case"ArrowDown":if(a)return;this.atFocusedItemIndex++,t.stopPropagation(),t.preventDefault();break;case"Home":t.target instanceof HTMLElement&&(t.target.hasAttribute("aria-activedescendant")||t.target.ariaActiveDescendantElement)||(this.atFocusedItemIndex=0,t.stopPropagation(),t.preventDefault());break;case"End":t.target instanceof HTMLElement&&(t.target.hasAttribute("aria-activedescendant")||t.target.ariaActiveDescendantElement)||(this.atFocusedItemIndex=this.items.length-1,t.stopPropagation(),t.preventDefault());break;default:break}this.host.requestUpdate()}};gt=new WeakMap,jr=new WeakMap,Al=new WeakSet,zc=function(){return this.options.getItemsContainer?.()??(!Mg&&this.host instanceof HTMLElement?this.host:null)};ho();Rt();var Tc,Dl,Ol,co=class l extends Le{static of(t,o){return new l(t,o)}get atFocusedItemIndex(){return super.atFocusedItemIndex}set atFocusedItemIndex(t){super.atFocusedItemIndex=t;let o=this.items.at(this.atFocusedItemIndex);for(let e of this.items)e.tabIndex=o===e?0:-1;Wc(this,Dl,"f")&&o?.focus(),this.host.requestUpdate()}get items(){return this._items}set items(t){this._items=t,Pp(this,Ol,new Set(t),"f");let o=Math.max(0,this.atFocusedItemIndex),[e]=this.atFocusableItems,a=e?t.indexOf(e):-1,c=t.indexOf(this.items.slice(o).concat(this.items.slice(0,o)).find(p=>this.atFocusableItems.includes(p)));this.atFocusedItemIndex=Math.max(a,c),this.host.requestUpdate()}constructor(t,o){super(t,o),this.host=t,Tc.set(this,new S(this.host)),Dl.set(this,!1),Ol.set(this,new Set),this.initItems();let e=o.getItemsContainer?.()??this.host;Ig||(e instanceof HTMLElement?e.addEventListener("focusin",()=>Pp(this,Dl,!0,"f"),{once:!0}):Wc(this,Tc,"f").warn("RovingTabindexController requires a getItemsContainer function"))}onKeydown(t){!t.ctrlKey&&!t.altKey&&!t.metaKey&&this.atFocusableItems.length&&t.composedPath().some(o=>Wc(this,Ol,"f").has(o))&&super.onKeydown(t)}};Tc=new WeakMap,Dl=new WeakMap,Ol=new WeakMap;Pg([D],co.prototype,"onKeydown",null);ho();import{__classPrivateFieldGet as O,__classPrivateFieldSet as qr}from"tslib";import{isServer as Hg}from"lit";var Vr,Yr,jl,Pt,It,ze,Ul,Nl,ql=class{get tabs(){return[...O(this,It,"f").keys()]}get activeTab(){return this.tabs.find(t=>O(this,ze,"f").isActiveTab(t))}constructor(t,o){if(Vr.add(this),Yr.set(this,void 0),jl.set(this,void 0),Pt.set(this,void 0),It.set(this,new Map),ze.set(this,void 0),Ul.set(this,new MutationObserver(O(this,Vr,"m",Nl).bind(this))),qr(this,ze,o,"f"),qr(this,Yr,new S(t),"f"),qr(this,jl,t,"f").addController(this),!Hg){if(t instanceof HTMLElement)qr(this,Pt,t,"f");else{let e=o.getHTMLElement?.();if(!e)throw new Error("TabsController must be instantiated with an HTMLElement or a `getHTMLElement()` option");qr(this,Pt,e,"f")}O(this,Pt,"f").addEventListener("slotchange",O(this,Vr,"m",Nl)),O(this,Pt,"f").isConnected&&this.hostConnected()}}hostConnected(){O(this,Ul,"f").observe(O(this,Pt,"f"),{attributes:!1,childList:!0,subtree:!1}),O(this,Vr,"m",Nl).call(this)}hostUpdated(){for(let[t,o]of O(this,It,"f"))o.setAttribute("aria-labelledby",t.id),t.setAttribute("aria-controls",o.id)}hostDisconnected(){O(this,Ul,"f").disconnect()}panelFor(t){return O(this,It,"f").get(t)}tabFor(t){for(let[o,e]of O(this,It,"f"))if(t===e)return o}};Yr=new WeakMap,jl=new WeakMap,Pt=new WeakMap,It=new WeakMap,ze=new WeakMap,Ul=new WeakMap,Vr=new WeakSet,Nl=function(){O(this,It,"f").clear();let t=[],o=[];for(let e of O(this,Pt,"f")?.children??[])O(this,ze,"f").isTab(e)?(t.push(e),e.role??(e.role="tab")):O(this,ze,"f").isPanel(e)&&(o.push(e),e.role??(e.role="tabpanel"));for(t.length>o.length?O(this,Yr,"f").warn("Too many tabs!"):o.length>t.length&&O(this,Yr,"f").warn("Too many panels!");t.length;)O(this,It,"f").set(t.shift(),o.shift());O(this,jl,"f").requestUpdate()};import{LitElement as Vg,html as Yg,isServer as Xg}from"lit";import{customElement as Kg}from"lit/decorators/custom-element.js";import{property as Pc}from"lit/decorators/property.js";import{queryAssignedElements as Gg}from"lit/decorators/query-assigned-elements.js";import{classMap as Zg}from"lit/directives/class-map.js";Rt();Rt();import{__decorate as $g}from"tslib";function Ip(l,t,o=!1){let e;return function(...a){let c=this,p=function(){e=null,o||l.apply(c,a)},f=o&&!e;clearTimeout(e),e=window.setTimeout(p,t),f&&l.apply(c,a)}}ho();var Xr=class l{constructor(t,o){this.host=t,this.options=o,this.mo=new MutationObserver(this.parse),this.cache=new Map,this.class=t.constructor,this.logger=new S(this.host),l.instances.set(t,this);let e=this.options?.properties??{};for(let[a,c]of Object.entries(e))this.initProp(a,c);t.addController(this),this.cascadeProperties=Ip(this.cascadeProperties,1)}hostUpdated(){this.cascadeProperties()}hostConnected(){this.mo.observe(this.host,{attributes:!0,childList:!0}),this.cascadeProperties()}hostDisconnected(){this.mo.disconnect()}cascadeProperties(t=this.host.children){if(this.host.isConnected){let o=this.cache.keys();if(!t)return this._cascadeAttributes(o,this.cache);for(let e of t)if(e instanceof Element){for(let a of o)if(e.matches(a)){let c=this.cache.get(a);for(let p of c??[])this._copyAttribute(p,e)}}}}initProp(t,o){for(let e of[o].flat(1/0).filter(Boolean)){let{attribute:a}=this.class.getPropertyOptions(t),c=typeof a=="string"?a:t.toLowerCase();this.cache.get(e)?this.cache.get(e)?.push(c):this.cache.set(e,[c])}}parse(t){for(let o of t??[])o.type==="childList"&&o.addedNodes.length?this.cascadeProperties(o.addedNodes):o.type==="attributes"&&this._cascadeAttributes(this.cache.keys(),this.cache)}async _copyAttribute(t,o){this.logger.log(`copying ${t} to ${o}`);let e=this.host.getAttribute(t);o.isConnected&&(e==null?o.removeAttribute(t):o.setAttribute(t,e))}_cascadeAttributes(t,o){for(let e of t)for(let a of o.get(e)??[])this._cascadeAttribute(a,e)}_cascadeAttribute(t,o){let e=[...this.host.querySelectorAll(o),...this.host.shadowRoot?.querySelectorAll(o)??[]];for(let a of e)this._copyAttribute(t,a)}};Xr.instances=new WeakMap;$g([D],Xr.prototype,"parse",null);ho();function Hp(l){return function(t,o){let{alias:e,...a}=l,c=t.constructor,p=c.getPropertyOptions(e);c.createProperty(o,{...p,...a}),c.addInitializer(f=>{f.addController(new Ec(f,l,o))})}}var Ec=class{constructor(t,o,e){this.host=t,this.options=o,this.deprecatedKey=e,this.logged=!1,this.logger=new S(t)}hostUpdate(){let{deprecatedKey:t,options:{alias:o}}=this;this.host[t]&&this.host[o]!==this.host[t]&&(this.logged||(this.logger.warn(`${t} is deprecated, use ${o} instead`),this.logged=!0),this.host[o]=this.host[t])}};ho();import{isServer as Ag}from"lit";var Vl=class{constructor(t,o,e){this.host=t,this.options=e,this.initializer=o.bind(t),this.mo=new MutationObserver(this.initializer),this.logger=new S(this.host),t.addController(this)}hostConnected(){this.hasLightDOM()?this.initializer():this.options?.emptyWarning&&this.logger.warn(this.options?.emptyWarning),this.initObserver()}hostDisconnected(){this.mo.disconnect()}initObserver(){(this.options?.observe??!0)&&this.mo.observe(this.host,typeof this.options?.observe!="object"?{childList:!0}:this.options?.observe)}hasLightDOM(){return Ag?!1:this.host.children.length>0||(this.host.textContent??"").trim().length>0}};function $p(l){return function(t,o){t.constructor.addInitializer(e=>{let a=t[o],c=new Vl(e,a,l);e.isConnected&&c.hostConnected()})}}function Rc(l,t){return function(o,e){let a=o.connectedCallback,c=o.disconnectedCallback,p=o[e];o.connectedCallback=function(){a?.call(this),this.addEventListener(l,p,t)},o.disconnectedCallback=function(){c?.call(this),this.removeEventListener(l,p,t)}}}import{__classPrivateFieldGet as Mc,__classPrivateFieldSet as Dg}from"tslib";import{notEqual as Og}from"lit";var Yl,Xl,Fc,Ap=Symbol("uninitialized"),Kr=class{constructor(t,o){Yl.add(this),this.host=t,this.options=o,this.oldVal=Ap,Xl.set(this,!0)}hostConnected(){Mc(this,Yl,"m",Fc).call(this)}async hostUpdate(){Mc(this,Yl,"m",Fc).call(this);let{oldVal:t,options:{waitFor:o,propertyName:e,callback:a}}=this;if(!a)throw new Error(`no callback for ${e}`);let c=this.host[e];if(this.oldVal=c,c!==t)switch(o){case"connected":if(!this.host.isConnected){let v=this.host.connectedCallback;await new Promise(C=>{this.host.connectedCallback=function(){C(v?.call(this))}})}break;case"firstUpdated":this.host.hasUpdated||await this.host.updateComplete;break;case"updated":await this.host.updateComplete;break}let f=this.host.constructor.getPropertyOptions(this.options.propertyName).hasChanged??Og;(Mc(this,Xl,"f")||f(t,c))&&(a.call(this.host,t,c),Dg(this,Xl,!1,"f"))}};Xl=new WeakMap,Yl=new WeakSet,Fc=function(){this.oldVal===Ap&&(this.oldVal=this.host[this.options.propertyName])};function L(l,t){return function(o,e){let a=o[e];if(typeof a!="function")throw new Error("@observes must decorate a class method");o.constructor.addInitializer(p=>{p.addController(new Kr(p,{...t,propertyName:l,callback:a}))})}}function N(l="pfe"){return`${l}-${Math.random().toString(36).substr(2,9)}`}import{isServer as Ug}from"lit";var Dp;function Ng(){let l=new Ar;return Ug?l.attach(globalThis.litServerRoot):l.attach(document.body),l}function We(...l){return Dp??(Dp=Ng()),Bc(...l)}var Gt=class extends Event{constructor(o){super("expand",{bubbles:!0,cancelable:!0});this.tab=o}},Te=We(Symbol("pf-tabs-context"));import{css as jg}from"lit";var qg=jg`[hidden] {
|
|
829
829
|
display: none !important;
|
|
830
830
|
}
|
|
831
831
|
|
|
@@ -1011,17 +1011,17 @@ slot[name="icon"] {
|
|
|
1011
1011
|
:host([aria-disabled="true"][border-bottom="false"]) #button {
|
|
1012
1012
|
--pf-c-tabs__link--before--BorderBottomWidth: 0;
|
|
1013
1013
|
}
|
|
1014
|
-
`,
|
|
1014
|
+
`,Op=qg;var Zr,Kl,Up,Gl,Np,Zl,jp,Zt,Gr,Fo=class extends Vg{constructor(){super(...arguments);n(this,Kl);n(this,Gl);n(this,Zl);n(this,Zt);this.active=!1;this.disabled=!1;n(this,Zr,m.of(this,{role:"tab"}))}connectedCallback(){super.connectedCallback(),this.id||=N(this.localName),this.addEventListener("click",s(this,Kl,Up)),this.addEventListener("keydown",s(this,Gl,Np)),this.addEventListener("focus",s(this,Zl,jp))}willUpdate(){let{borderBottom:o,box:e,fill:a,manual:c,vertical:p}=this.ctx??{};this.toggleAttribute("fill",a),this.toggleAttribute("manual",c),this.toggleAttribute("vertical",p),e?this.setAttribute("box",e):this.removeAttribute("box"),o?this.setAttribute("border-bottom",o):this.removeAttribute("border-bottom")}render(){let{active:o}=this,{box:e,fill:a=!1,vertical:c=!1}=this.ctx??{},p=e==="light",f=e==="dark",v=Xg?[]:this.icons;return Yg`
|
|
1015
1015
|
<div id="button"
|
|
1016
1016
|
part="button"
|
|
1017
|
-
class="${
|
|
1017
|
+
class="${Zg({active:o,box:!!e,dark:f,light:p,fill:a,vertical:c})}">
|
|
1018
1018
|
<slot name="icon"
|
|
1019
1019
|
part="icon"
|
|
1020
|
-
?hidden="${!
|
|
1020
|
+
?hidden="${!v?.length}"
|
|
1021
1021
|
@slotchange="${()=>this.requestUpdate()}"></slot>
|
|
1022
1022
|
<slot part="text"></slot>
|
|
1023
1023
|
</div>
|
|
1024
|
-
`}activeChanged(o,e){i(this,
|
|
1024
|
+
`}activeChanged(o,e){i(this,Zr).ariaSelected=String(!!e),e&&!o&&s(this,Zt,Gr).call(this)}disabledChanged(){i(this,Zr).ariaDisabled=this.disabled?"true":this.ariaDisabled??"false"}};Zr=new WeakMap,Kl=new WeakSet,Up=function(){this.disabled||s(this,Zt,Gr).call(this)},Gl=new WeakSet,Np=function(o){if(!this.disabled)switch(o.key){case"Enter":s(this,Zt,Gr).call(this)}},Zl=new WeakSet,jp=function(){!this.ctx?.manual&&!this.disabled&&s(this,Zt,Gr).call(this)},Zt=new WeakSet,Gr=async function(){this.dispatchEvent(new Gt(this))},Fo.styles=[Op],r([Gg({slot:"icon",flatten:!0})],Fo.prototype,"icons",2),r([Pc({reflect:!0,type:Boolean})],Fo.prototype,"active",2),r([Pc({reflect:!0,type:Boolean})],Fo.prototype,"disabled",2),r([Mo({context:Te,subscribe:!0}),Pc({attribute:!1})],Fo.prototype,"ctx",2),r([L("active")],Fo.prototype,"activeChanged",1),r([L("disabled")],Fo.prototype,"disabledChanged",1),Fo=r([Kg("pf-tab")],Fo);import{LitElement as ob,html as tb}from"lit";import{customElement as eb}from"lit/decorators/custom-element.js";import{state as rb}from"lit/decorators/state.js";import{css as Qg}from"lit";var Jg=Qg`:host {
|
|
1025
1025
|
display: block;
|
|
1026
1026
|
}
|
|
1027
1027
|
|
|
@@ -1032,9 +1032,9 @@ slot[name="icon"] {
|
|
|
1032
1032
|
:host([box="light"]) {
|
|
1033
1033
|
background-color: var(--pf-c-tab-content--m-light-300, var(--pf-global--BackgroundColor--light-300, #f0f0f0));
|
|
1034
1034
|
}
|
|
1035
|
-
`,
|
|
1035
|
+
`,qp=Jg;var Ee=class extends ob{render(){return tb`
|
|
1036
1036
|
<slot></slot>
|
|
1037
|
-
`}connectedCallback(){super.connectedCallback(),this.id||=N("pf-tab-panel"),this.hidden??=!0,this.tabIndex=0}willUpdate(){let{box:t,vertical:o}=this.ctx??{};this.toggleAttribute("vertical",o),t?this.setAttribute("box",t):this.removeAttribute("box")}};
|
|
1037
|
+
`}connectedCallback(){super.connectedCallback(),this.id||=N("pf-tab-panel"),this.hidden??=!0,this.tabIndex=0}willUpdate(){let{box:t,vertical:o}=this.ctx??{};this.toggleAttribute("vertical",o),t?this.setAttribute("box",t):this.removeAttribute("box")}};Ee.styles=[qp],r([Mo({context:Te,subscribe:!0}),rb()],Ee.prototype,"ctx",2),Ee=r([eb("pf-tab-panel")],Ee);ko();import{css as pb}from"lit";var db=pb`:host {
|
|
1038
1038
|
display: block;
|
|
1039
1039
|
}
|
|
1040
1040
|
|
|
@@ -1303,30 +1303,30 @@ button:disabled {
|
|
|
1303
1303
|
--pf-c-tabs--before--BorderBottomWidth: 0; /* *override user setting* when border-bottom is false border bottom styles should be 0; */
|
|
1304
1304
|
--pf-c-tabs__link--before--BorderBottomWidth: 0;
|
|
1305
1305
|
}
|
|
1306
|
-
`,
|
|
1306
|
+
`,Zp=db;var Qr,Jr,$c,uo,oa,Qt,ai,li,Qp,ii,Jp,ni,od,ci,td,K=class extends fb{constructor(){super(...arguments);n(this,Jr);n(this,li);n(this,ii);n(this,ni);n(this,ci);this.labelScrollLeft="Scroll left";this.labelScrollRight="Scroll left";this.box=null;this.vertical=!1;this.fill=!1;this.borderBottom="true";this.manual=!1;n(this,Qr,-1);this.ctx=i(this,Jr,$c);n(this,uo,new Nr(this,{scrollTimeoutDelay:200}));n(this,oa,new ql(this,{isTab:o=>o.localName==="pf-tab",isPanel:o=>o.localName==="pf-tab-panel",isActiveTab:o=>o.active}));n(this,Qt,co.of(this,{getItemsContainer:()=>this.tabsContainer??null,getItems:()=>this.tabs??[]}));n(this,ai,new S(this))}static isExpandEvent(o){return o instanceof Gt}get activeIndex(){return i(this,Qr)}set activeIndex(o){i(this,Qt).atFocusedItemIndex=o,_(this,Qr,o),this.activeTab=this.tabs[o];for(let e of this.tabs)this.activeTab?.disabled||(e.active=e===this.activeTab),i(this,oa).panelFor(e)?.toggleAttribute("hidden",!e.active)}get tabs(){return i(this,oa).tabs}connectedCallback(){super.connectedCallback(),this.addEventListener("expand",s(this,ci,td)),this.id||=N(this.localName),this.activeIndex=i(this,Qt).atFocusedItemIndex}async getUpdateComplete(){let o=await super.getUpdateComplete(),e=await Promise.all(Array.from(this.querySelectorAll("pf-tab, pf-tab-panel"),a=>a.updateComplete));return o&&e.every(a=>!!a)}willUpdate(){!this.manual&&this.activeIndex!==i(this,Qt).atFocusedItemIndex&&(this.activeIndex=i(this,Qt).atFocusedItemIndex),i(this,uo).update(),this.ctx=i(this,Jr,$c)}activeTabChanged(o,e){e?.disabled&&(i(this,ai).warn("Active tab is disabled. Setting to first focusable tab"),this.activeIndex=0),e&&(this.activeIndex=this.tabs.indexOf(e))}firstUpdated(){this.tabs.length&&this.activeIndex===-1&&this.select(this.tabs.findIndex(o=>!o.disabled))}render(){return Hc`
|
|
1307
1307
|
<div part="container"
|
|
1308
|
-
class="${
|
|
1309
|
-
<div part="tabs-container">${i(this,uo).showScrollButtons?
|
|
1308
|
+
class="${bb({overflow:i(this,uo).showScrollButtons})}">
|
|
1309
|
+
<div part="tabs-container">${i(this,uo).showScrollButtons?Hc`
|
|
1310
1310
|
<button id="previousTab" tabindex="-1"
|
|
1311
1311
|
aria-label="${this.labelScrollLeft}"
|
|
1312
1312
|
?disabled="${!i(this,uo).overflowLeft}"
|
|
1313
|
-
@click="${s(this,
|
|
1313
|
+
@click="${s(this,li,Qp)}">
|
|
1314
1314
|
<pf-icon icon="angle-left" set="fas" loading="eager"></pf-icon>
|
|
1315
1315
|
</button>`:""}
|
|
1316
1316
|
<div id="tabs" part="tabs" role="tablist">
|
|
1317
|
-
<slot name="tab" @slotchange="${s(this,
|
|
1317
|
+
<slot name="tab" @slotchange="${s(this,ni,od)}" @scroll="${i(this,uo).onScroll}"></slot>
|
|
1318
1318
|
</div>
|
|
1319
|
-
${i(this,uo).showScrollButtons?
|
|
1319
|
+
${i(this,uo).showScrollButtons?Hc`
|
|
1320
1320
|
<button id="nextTab" tabindex="-1"
|
|
1321
1321
|
aria-label="${this.labelScrollRight}"
|
|
1322
1322
|
?disabled="${!i(this,uo).overflowRight}"
|
|
1323
|
-
@click="${s(this,
|
|
1323
|
+
@click="${s(this,ii,Jp)}">
|
|
1324
1324
|
<pf-icon icon="angle-right" set="fas" loading="eager"></pf-icon>
|
|
1325
1325
|
</button>`:""}
|
|
1326
1326
|
</div>
|
|
1327
1327
|
<slot part="panels"></slot>
|
|
1328
1328
|
</div>
|
|
1329
|
-
`}select(o){typeof o=="number"?this.activeIndex=o:this.activeIndex=this.tabs.indexOf(o)}};
|
|
1329
|
+
`}select(o){typeof o=="number"?this.activeIndex=o:this.activeIndex=this.tabs.indexOf(o)}};Qr=new WeakMap,Jr=new WeakSet,$c=function(){let{activeTab:o,borderBottom:e,box:a,fill:c,manual:p,vertical:f}=this;return{activeTab:o,borderBottom:e,box:a,fill:c,manual:p,vertical:f}},uo=new WeakMap,oa=new WeakMap,Qt=new WeakMap,ai=new WeakMap,li=new WeakSet,Qp=function(){i(this,uo).scrollLeft()},ii=new WeakSet,Jp=function(){i(this,uo).scrollRight()},ni=new WeakSet,od=function(){this.tabs&&i(this,uo).init(this.tabsContainer,this.tabs)},ci=new WeakSet,td=function(o){o instanceof Gt&&!o.defaultPrevented&&this.tabs.includes(o.tab)&&this.select(o.tab)},K.styles=[Zp],K.scrollTimeoutDelay=150,r([bt({reflect:!1,attribute:"label-scroll-left"})],K.prototype,"labelScrollLeft",2),r([bt({reflect:!1,attribute:"label-scroll-right"})],K.prototype,"labelScrollRight",2),r([bt({reflect:!0})],K.prototype,"box",2),r([bt({reflect:!0,type:Boolean})],K.prototype,"vertical",2),r([bt({reflect:!0,type:Boolean})],K.prototype,"fill",2),r([bt({attribute:"border-bottom"})],K.prototype,"borderBottom",2),r([bt({reflect:!0,type:Boolean})],K.prototype,"manual",2),r([bt({attribute:"active-index",reflect:!0,type:Number})],K.prototype,"activeIndex",1),r([bt({attribute:!1})],K.prototype,"activeTab",2),r([gb("#tabs")],K.prototype,"tabsContainer",2),r([ft({context:Te})],K.prototype,"ctx",2),r([L("activeTab")],K.prototype,"activeTabChanged",1),K=r([mb("pf-tabs")],K);import{LitElement as Fb,html as ra}from"lit";import{customElement as Pb}from"lit/decorators/custom-element.js";import{property as md}from"lit/decorators/property.js";import{css as hb}from"lit";var ub=hb`:host {
|
|
1330
1330
|
display: grid;
|
|
1331
1331
|
align-items: center;
|
|
1332
1332
|
padding-inline-start: calc(50px * var(--_pf-table--expandable-rows, 0));
|
|
@@ -1413,7 +1413,7 @@ button:disabled {
|
|
|
1413
1413
|
:host([expanded]) #toggle-icon {
|
|
1414
1414
|
transform: rotate(90deg);
|
|
1415
1415
|
}
|
|
1416
|
-
`,
|
|
1416
|
+
`,ed=ub;import{ifDefined as Ib}from"lit/directives/if-defined.js";import{LitElement as Rb,html as Dc}from"lit";import{customElement as Mb}from"lit/decorators/custom-element.js";import{property as to}from"lit/decorators/property.js";import{ifDefined as Oc}from"lit/directives/if-defined.js";import{classMap as dd}from"lit/directives/class-map.js";import{__classPrivateFieldGet as V,__classPrivateFieldSet as Fe}from"tslib";var Ht,oe,ht,di,Jt,ta,si,ld,pi,rd,ad;function vb(l){return l.length===1&&typeof l[0]=="object"&&l[0]!==null}var _b=l=>t=>l===T.default?!t.hasAttribute("slot"):t.getAttribute("slot")===l,T=class{constructor(t,...o){Ht.add(this),this.host=t,ht.set(this,new Map),di.set(this,!1),Jt.set(this,[]),ta.set(this,{}),si.set(this,new MutationObserver(V(this,Ht,"m",pi).bind(this))),V(this,Ht,"m",ld).call(this,...o),t.addController(this),V(this,Jt,"f").length||Fe(this,Jt,[null],"f")}async hostConnected(){V(this,si,"f").observe(this.host,{childList:!0}),V(this,ht,"f").clear(),V(this,Ht,"m",pi).call(this),await this.host.updateComplete,this.host.requestUpdate()}hostUpdated(){V(this,di,"f")||V(this,Ht,"m",pi).call(this)}hostDisconnected(){V(this,si,"f").disconnect()}getSlotted(...t){return t.length?t.flatMap(o=>V(this,ht,"f").get(o)?.elements??[]):V(this,ht,"f").get(oe.default)?.elements??[]}hasSlotted(...t){let o=Array.from(t,e=>e??oe.default);return o.length||o.push(oe.default),o.some(e=>V(this,ht,"f").get(e)?.hasContent??!1)}isEmpty(...t){return!this.hasSlotted(...t)}};oe=T,ht=new WeakMap,di=new WeakMap,Jt=new WeakMap,ta=new WeakMap,si=new WeakMap,Ht=new WeakSet,ld=function(...t){if(vb(t)){let[{slots:o,deprecations:e}]=t;Fe(this,Jt,o,"f"),Fe(this,ta,e??{},"f")}else t.length>=1&&(Fe(this,Jt,t,"f"),Fe(this,ta,{},"f"))},pi=function(){for(let t of V(this,Jt,"f").concat(Object.values(V(this,ta,"f")))){let o=t||oe.default,e=t??"",a=V(this,Ht,"m",ad).call(this,o),c=V(this,Ht,"m",rd).call(this,o),p=!!a.length||!!c?.assignedNodes?.()?.filter(f=>f.textContent?.trim()).length;V(this,ht,"f").set(o,{elements:a,name:e,hasContent:p,slot:c})}this.host.requestUpdate(),Fe(this,di,!0,"f")},rd=function(t){let o=t===oe.default?"slot:not([name])":`slot[name="${t}"]`;return this.host.shadowRoot?.querySelector?.(o)??null},ad=function(t){return V(this,ht,"f").has(t)?V(this,ht,"f").get(t).slot?.assignedElements?.()??[]:Array.from(this.host.children).filter(_b(t))};T.default=Symbol("default slot");T.anonymous=oe.default;ko();import{LitElement as Bb,html as yb}from"lit";import{customElement as kb}from"lit/decorators/custom-element.js";import{styleMap as wb}from"lit/directives/style-map.js";import{property as nd}from"lit/decorators/property.js";import{css as xb}from"lit";var Cb=xb`:host {
|
|
1417
1417
|
display: inline-block;
|
|
1418
1418
|
width: min-content;
|
|
1419
1419
|
min-height: 0;
|
|
@@ -1499,12 +1499,12 @@ circle {
|
|
|
1499
1499
|
transform: rotate(720deg);
|
|
1500
1500
|
}
|
|
1501
1501
|
}
|
|
1502
|
-
`,
|
|
1502
|
+
`,id=Cb;var Ac,te=class extends Bb{constructor(){super(...arguments);n(this,Ac,m.of(this,{role:"progressbar"}));this.size="xl"}render(){return yb`
|
|
1503
1503
|
<svg viewBox="0 0 100 100"
|
|
1504
|
-
style="${
|
|
1504
|
+
style="${wb({"--pf-c-spinner--diameter":this.diameter})}">
|
|
1505
1505
|
<circle cx="50" cy="50" r="45" fill="none" />
|
|
1506
1506
|
</svg>
|
|
1507
|
-
`}};
|
|
1507
|
+
`}};Ac=new WeakMap,te.styles=[id],r([nd({reflect:!0})],te.prototype,"size",2),r([nd({reflect:!0})],te.prototype,"diameter",2),te=r([kb("pf-spinner")],te);import{css as Sb}from"lit";var Lb=Sb`:host {
|
|
1508
1508
|
--pf-c-button--PaddingTop: var(--pf-global--spacer--form-element, 0.375rem);
|
|
1509
1509
|
--pf-c-button--PaddingRight: var(--pf-global--spacer--md, 1rem);
|
|
1510
1510
|
--pf-c-button--PaddingBottom: var(--pf-global--spacer--form-element, 0.375rem);
|
|
@@ -1677,7 +1677,7 @@ circle {
|
|
|
1677
1677
|
--_button-color: var(--pf-c-button--m-primary--Color);
|
|
1678
1678
|
--_button-background-color: var(--pf-c-button--m-primary--BackgroundColor);
|
|
1679
1679
|
}
|
|
1680
|
-
`,
|
|
1680
|
+
`,cd=Lb;import{css as zb}from"lit";var Wb=zb`/******************************
|
|
1681
1681
|
* *
|
|
1682
1682
|
* ICON *
|
|
1683
1683
|
* *
|
|
@@ -1688,7 +1688,7 @@ circle {
|
|
|
1688
1688
|
var(--pf-global--spacer--xs, 0.25rem)));
|
|
1689
1689
|
}
|
|
1690
1690
|
|
|
1691
|
-
`,
|
|
1691
|
+
`,sd=Wb;import{css as Tb}from"lit";var Eb=Tb`:host {
|
|
1692
1692
|
font-size: var(--pf-c-button--FontSize);
|
|
1693
1693
|
font-weight: var(--pf-c-button--FontWeight);
|
|
1694
1694
|
line-height: var(--pf-c-button--LineHeight);
|
|
@@ -2326,49 +2326,49 @@ pf-icon,
|
|
|
2326
2326
|
var(--pf-global--danger-color--100, #c9190b));
|
|
2327
2327
|
}
|
|
2328
2328
|
|
|
2329
|
-
`,
|
|
2329
|
+
`,pd=Eb;var Go,mi,ea,Uc,Pe,fi,gi,fd,F=class extends Rb{constructor(){super(...arguments);n(this,ea);n(this,Pe);n(this,gi);this.disabled=!1;this.loading=!1;this.warning=!1;this.danger=!1;this.plain=!1;this.variant="primary";this.inline=!1;this.block=!1;n(this,Go,m.of(this,{role:this.variant==="link"?"none":"button"}));n(this,mi,new T(this,"icon",null))}connectedCallback(){super.connectedCallback(),this.addEventListener("click",s(this,Pe,fi)),this.addEventListener("keydown",s(this,gi,fd))}willUpdate(){i(this,Go).ariaLabel=this.label||null,i(this,Go).ariaDisabled=String(!!this.disabled),this.variant==="link"&&this.href?(this.removeAttribute("tabindex"),i(this,Go).role="none"):(this.tabIndex=0,i(this,Go).role="button")}async formDisabledCallback(){await this.updateComplete,this.requestUpdate()}render(){let o=!!this.icon||!!this.loading||i(this,mi).hasSlotted("icon"),{warning:e,variant:a,danger:c,loading:p,plain:f,inline:v,block:C,size:w,href:E,target:X}=this,U=i(this,ea,Uc),qo=Dc`
|
|
2330
2330
|
<slot id="icon"
|
|
2331
2331
|
part="icon"
|
|
2332
2332
|
name="icon"
|
|
2333
2333
|
?hidden="${!o}">
|
|
2334
2334
|
<pf-icon role="presentation"
|
|
2335
|
-
icon="${
|
|
2336
|
-
set="${
|
|
2335
|
+
icon="${Oc(this.icon)}"
|
|
2336
|
+
set="${Oc(this.iconSet)}"
|
|
2337
2337
|
?hidden="${!this.icon||this.loading}"></pf-icon>
|
|
2338
2338
|
<pf-spinner size="md"
|
|
2339
2339
|
?hidden="${!this.loading}"
|
|
2340
2340
|
aria-label="${this.getAttribute("loading-label")??"loading"}"></pf-spinner>
|
|
2341
2341
|
</slot>
|
|
2342
2342
|
<slot id="text"></slot>
|
|
2343
|
-
`;return a==="link"&&E?
|
|
2343
|
+
`;return a==="link"&&E?Dc`
|
|
2344
2344
|
<a id="button"
|
|
2345
2345
|
href="${E}"
|
|
2346
|
-
target="${
|
|
2347
|
-
class="${
|
|
2346
|
+
target="${Oc(X)}"
|
|
2347
|
+
class="${dd({[a]:!0,[w??""]:!!w,anchor:!0,inline:v,block:C,danger:c,disabled:U,hasIcon:o,loading:p,plain:f,warning:e})}">${qo}</a>`:Dc`
|
|
2348
2348
|
<div id="button"
|
|
2349
|
-
class="${
|
|
2349
|
+
class="${dd({[a]:!0,[w??""]:!!w,inline:v,block:C,danger:c,disabled:U,hasIcon:o,loading:p,plain:f,warning:e})}">${qo}</div>`}};Go=new WeakMap,mi=new WeakMap,ea=new WeakSet,Uc=function(){return this.disabled||i(this,Go).formDisabled},Pe=new WeakSet,fi=function(){if(!i(this,ea,Uc))switch(this.type){case"reset":return i(this,Go).reset();default:return i(this,Go).submit()}},gi=new WeakSet,fd=function(o){switch(o.key){case" ":o.preventDefault(),o.stopPropagation(),this.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}))&&s(this,Pe,fi).call(this);break;case"Enter":this.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}))&&s(this,Pe,fi).call(this)}},F.formAssociated=!0,F.styles=[cd,sd,pd],r([to({reflect:!0})],F.prototype,"type",2),r([to()],F.prototype,"label",2),r([to()],F.prototype,"value",2),r([to()],F.prototype,"name",2),r([to({reflect:!0,type:Boolean})],F.prototype,"disabled",2),r([to({type:Boolean,reflect:!0})],F.prototype,"loading",2),r([to({reflect:!0})],F.prototype,"size",2),r([to({type:Boolean,reflect:!0})],F.prototype,"warning",2),r([to({type:Boolean,reflect:!0})],F.prototype,"danger",2),r([to({type:Boolean,reflect:!0})],F.prototype,"plain",2),r([to({reflect:!0})],F.prototype,"variant",2),r([to({reflect:!0,type:Boolean})],F.prototype,"inline",2),r([to({reflect:!0,type:Boolean})],F.prototype,"block",2),r([to()],F.prototype,"icon",2),r([to({attribute:"icon-set"})],F.prototype,"iconSet",2),r([to({reflect:!0})],F.prototype,"href",2),r([to({reflect:!0})],F.prototype,"target",2),F=r([Mb("pf-button")],F);ko();var $t=class extends Event{constructor(o,e){super("request-expand",{bubbles:!0,cancelable:!0});this.compoundExpanded=!1;e&&(this.compoundExpanded=o??!1,this.row=e)}};function Hb(...l){let t=new Set(l);return{fromAttribute(o){return o&&t.has(o.toLowerCase())?o:o!=null},toAttribute(o){return o?o==="compound"?o:"":null}}}var $b={fromAttribute(l){return l||l!==null},toAttribute(l){return l?typeof l=="string"?l:"":null}},bi,gd,aa,Nc,hi,bd,ut=class extends Fb{constructor(){super(...arguments);n(this,bi);n(this,aa);n(this,hi);this.expandable=!1;this.expanded=!1}connectedCallback(){super.connectedCallback(),s(this,aa,Nc).call(this)}willUpdate(o){o.has("expandable")&&s(this,aa,Nc).call(this),o.has("expanded")&&s(this,bi,gd).call(this)}render(){return[this.expandable&&this.expandable!=="compound"&&ra`
|
|
2350
2350
|
<pf-td id="toggle-cell">
|
|
2351
2351
|
<pf-button id="toggle-button"
|
|
2352
2352
|
aria-expanded=${String(this.expanded)}
|
|
2353
2353
|
plain
|
|
2354
|
-
@click=${s(this,
|
|
2354
|
+
@click=${s(this,hi,bd)}>
|
|
2355
2355
|
<pf-icon id="toggle-icon"
|
|
2356
2356
|
icon="angle-right"
|
|
2357
2357
|
size="md"
|
|
2358
2358
|
></pf-icon>
|
|
2359
2359
|
</pf-button>
|
|
2360
2360
|
</pf-td>
|
|
2361
|
-
`,
|
|
2362
|
-
<div id="container" role="${
|
|
2361
|
+
`,ra`
|
|
2362
|
+
<div id="container" role="${Ib(this.expandable?"row":void 0)}">
|
|
2363
2363
|
<slot></slot>
|
|
2364
2364
|
</div>
|
|
2365
|
-
`,this.expandable&&this.expandable!=="compound"&&this.expanded&&
|
|
2365
|
+
`,this.expandable&&this.expandable!=="compound"&&this.expanded&&ra`
|
|
2366
2366
|
<div id="expansion" role="row"><slot name="expansion"></slot></div>
|
|
2367
|
-
`,this.expandable==="compound"&&
|
|
2368
|
-
<div id="expansion">${this.expanded?
|
|
2367
|
+
`,this.expandable==="compound"&&ra`
|
|
2368
|
+
<div id="expansion">${this.expanded?ra`
|
|
2369
2369
|
<slot name="${this.expanded}"></slot>`:""}
|
|
2370
2370
|
</div>
|
|
2371
|
-
`].filter(Boolean)}};
|
|
2371
|
+
`].filter(Boolean)}};bi=new WeakSet,gd=function(){this.expanded&&!this.expandable&&(this.expanded=!1)},aa=new WeakSet,Nc=function(){switch(this.expandable){case"compound":break;case!0:this.setAttribute("role","rowgroup");break;default:this.setAttribute("role","row")}},hi=new WeakSet,bd=function(){this.dispatchEvent(new $t)},ut.styles=[ed],r([md({reflect:!0,converter:Hb("compound")})],ut.prototype,"expandable",2),r([md({reflect:!0,converter:$b})],ut.prototype,"expanded",2),ut=r([Pb("pf-tr")],ut);import{LitElement as Ob,html as Ub}from"lit";import{customElement as Nb}from"lit/decorators/custom-element.js";var Ie=We("pf-th-role");import{css as Ab}from"lit";var Db=Ab`:host {
|
|
2372
2372
|
--pf-c-table--cell--MinWidth: var(--pf-c-table--m-truncate--cell--MinWidth);
|
|
2373
2373
|
--pf-c-table--cell--MaxWidth: var(--pf-c-table--m-truncate--cell--MaxWidth);
|
|
2374
2374
|
--pf-c-table--cell--Overflow: hidden;
|
|
@@ -2386,9 +2386,9 @@ pf-icon,
|
|
|
2386
2386
|
display: none;
|
|
2387
2387
|
visibility: hidden;
|
|
2388
2388
|
}
|
|
2389
|
-
}`,
|
|
2390
|
-
<slot @slotchange=${s(this,
|
|
2391
|
-
`}};
|
|
2389
|
+
}`,hd=Db;var ui,ud,He=class extends Ob{constructor(){super(...arguments);n(this,ui);this.thRowContext="colheader"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","rowgroup")}render(){return Ub`
|
|
2390
|
+
<slot @slotchange=${s(this,ui,ud)}></slot>
|
|
2391
|
+
`}};ui=new WeakSet,ud=function(){for(let o of this.querySelectorAll(":scope > pf-th"))o.setAttribute("role","columnheader")},He.styles=[hd],r([ft({context:Ie})],He.prototype,"thRowContext",2),He=r([Nb("pf-thead")],He);import{LitElement as Vb,html as _d,svg as Yb}from"lit";import{customElement as Xb}from"lit/decorators/custom-element.js";import{property as vi}from"lit/decorators/property.js";import{classMap as Kb}from"lit/directives/class-map.js";import{css as jb}from"lit";var qb=jb`:host {
|
|
2392
2392
|
font-weight: bold;
|
|
2393
2393
|
padding: 1rem;
|
|
2394
2394
|
position: relative;
|
|
@@ -2481,22 +2481,22 @@ button.selected {
|
|
|
2481
2481
|
white-space: nowrap;
|
|
2482
2482
|
border: 0;
|
|
2483
2483
|
}
|
|
2484
|
-
`,
|
|
2484
|
+
`,vd=qb;var Gb={asc:"desc",desc:"asc"},la=class extends Event{constructor(o,e){super("request-sort",{bubbles:!0,cancelable:!0});this.key=o;this.direction=e}},Zb=new Map(Object.entries({asc:"M88 166.059V468c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12V166.059h46.059c21.382 0 32.09-25.851 16.971-40.971l-86.059-86.059c-9.373-9.373-24.569-9.373-33.941 0l-86.059 86.059c-15.119 15.119-4.411 40.971 16.971 40.971H88z",desc:"M168 345.941V44c0-6.627-5.373-12-12-12h-56c-6.627 0-12 5.373-12 12v301.941H41.941c-21.382 0-32.09 25.851-16.971 40.971l86.059 86.059c9.373 9.373 24.569 9.373 33.941 0l86.059-86.059c15.119-15.119 4.411-40.971-16.971-40.971H168z",sort:"M214.059 377.941H168V134.059h46.059c21.382 0 32.09-25.851 16.971-40.971L144.971 7.029c-9.373-9.373-24.568-9.373-33.941 0L24.971 93.088c-15.119 15.119-4.411 40.971 16.971 40.971H88v243.882H41.941c-21.382 0-32.09 25.851-16.971 40.971l86.059 86.059c9.373 9.373 24.568 9.373 33.941 0l86.059-86.059c15.12-15.119 4.412-40.971-16.97-40.971z"})),_i,xd,wo=class extends Vb{constructor(){super(...arguments);n(this,_i);this.sortable=!1;this.selected=!1;this.contextualRole="rowheader"}connectedCallback(){super.connectedCallback(),this.setAttribute("role",this.contextualRole)}render(){let o=!!this.selected;return this.sortable?_d`
|
|
2485
2485
|
<button id="sort-button"
|
|
2486
|
-
class="sortable ${
|
|
2486
|
+
class="sortable ${Kb({selected:o})}"
|
|
2487
2487
|
part="sort-button"
|
|
2488
|
-
@click="${s(this,
|
|
2488
|
+
@click="${s(this,_i,xd)}">
|
|
2489
2489
|
<slot></slot>
|
|
2490
2490
|
<span class="visually-hidden">${this.sortDirection?`(sorted ${this.sortDirection==="asc"?"ascending":"descending"})`:""}</span>
|
|
2491
2491
|
<span id="sort-indicator">
|
|
2492
|
-
<svg fill="currentColor" height="1em" width="1em" viewBox="0 0 256 512" aria-hidden="true" role="img" style="vertical-align: -0.125em;">${
|
|
2493
|
-
<path d="${
|
|
2492
|
+
<svg fill="currentColor" height="1em" width="1em" viewBox="0 0 256 512" aria-hidden="true" role="img" style="vertical-align: -0.125em;">${Yb`
|
|
2493
|
+
<path d="${Zb.get(this.sortDirection??"sort")}"></path>`}
|
|
2494
2494
|
</svg>
|
|
2495
2495
|
</span>
|
|
2496
2496
|
</button>
|
|
2497
|
-
`:
|
|
2497
|
+
`:_d`
|
|
2498
2498
|
<slot></slot>
|
|
2499
|
-
`}sort(){let o
|
|
2499
|
+
`}sort(){let o=Gb[this.sortDirection??"asc"];this.dispatchEvent(new la(this.key,o))}};_i=new WeakSet,xd=function(){this.sortable&&this.sort()},wo.styles=[vd],r([vi({type:Boolean,reflect:!0})],wo.prototype,"sortable",2),r([vi({type:Boolean,reflect:!0})],wo.prototype,"selected",2),r([vi({reflect:!0,attribute:"sort-direction"})],wo.prototype,"sortDirection",2),r([vi()],wo.prototype,"key",2),r([Mo({context:Ie})],wo.prototype,"contextualRole",2),wo=r([Xb("pf-th")],wo);import{LitElement as oh,html as Bd}from"lit";import{customElement as th}from"lit/decorators/custom-element.js";import{property as yd}from"lit/decorators/property.js";import{css as Qb}from"lit";var Jb=Qb`:host(:empty),
|
|
2500
2500
|
:host([compound-expand]) {
|
|
2501
2501
|
padding: 0;
|
|
2502
2502
|
}
|
|
@@ -2601,13 +2601,13 @@ button:hover {
|
|
|
2601
2601
|
color: var(--pf-c-table__button--hover--Color);
|
|
2602
2602
|
}
|
|
2603
2603
|
|
|
2604
|
-
`,
|
|
2605
|
-
<button @click="${s(this,
|
|
2604
|
+
`,Cd=Jb;var xi,kd,vt=class extends oh{constructor(){super(...arguments);n(this,xi);this.expanded=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","cell")}render(){return this.compoundExpand?Bd`
|
|
2605
|
+
<button @click="${s(this,xi,kd)}">
|
|
2606
2606
|
<slot></slot>
|
|
2607
2607
|
</button>
|
|
2608
|
-
`:
|
|
2608
|
+
`:Bd`
|
|
2609
2609
|
<slot></slot>
|
|
2610
|
-
`}};
|
|
2610
|
+
`}};xi=new WeakSet,kd=function(){let o=this.closest("pf-tr"),e=this.compoundExpand,a=o?new $t(o.expanded===e||e||!1,o):new $t;this.dispatchEvent(a)},vt.styles=[Cd],r([yd({attribute:"compound-expand"})],vt.prototype,"compoundExpand",2),r([yd({type:Boolean,reflect:!0})],vt.prototype,"expanded",2),vt=r([th("pf-td")],vt);import{LitElement as ah,html as lh}from"lit";import{customElement as ih}from"lit/decorators/custom-element.js";import{css as eh}from"lit";var rh=eh`:host {
|
|
2611
2611
|
--pf-c-table--cell--PaddingTop: var(--pf-c-table--tbody--cell--PaddingTop);
|
|
2612
2612
|
--pf-c-table--cell--PaddingBottom: var(--pf-c-table--tbody--cell--PaddingBottom);
|
|
2613
2613
|
display: grid;
|
|
@@ -2623,9 +2623,9 @@ button:hover {
|
|
|
2623
2623
|
}
|
|
2624
2624
|
}
|
|
2625
2625
|
|
|
2626
|
-
`,
|
|
2626
|
+
`,wd=rh;var ia=class extends ah{connectedCallback(){super.connectedCallback(),this.setAttribute("role","rowgroup")}render(){return lh`
|
|
2627
2627
|
<slot></slot>
|
|
2628
|
-
`}};
|
|
2628
|
+
`}};ia.styles=[wd],ia=r([ih("pf-tbody")],ia);import{LitElement as gh,html as bh}from"lit";import{customElement as hh}from"lit/decorators/custom-element.js";import{styleMap as uh}from"lit/directives/style-map.js";import{state as vh}from"lit/decorators/state.js";import{LitElement as sh,html as ph}from"lit";import{customElement as dh}from"lit/decorators/custom-element.js";import{css as nh}from"lit";var ch=nh`:host {
|
|
2629
2629
|
display: table-caption;
|
|
2630
2630
|
/* stylelint-disable-next-line max-line-length */
|
|
2631
2631
|
padding: var(--pf-c-table-caption--PaddingTop, var(--pf-global--spacer--md, 1rem)) var(--pf-c-table-caption--PaddingRight, var(--pf-global--spacer--lg, 1.5rem)) var(--pf-c-table-caption--PaddingBottom, var(--pf-global--spacer--md, 1rem)) var(--pf-c-table-caption--PaddingLeft, var(--pf-global--spacer--lg, 1.5rem));
|
|
@@ -2633,9 +2633,9 @@ button:hover {
|
|
|
2633
2633
|
color: var(--pf-c-table-caption--Color, var(--pf-global--Color--200, #6a6e73));
|
|
2634
2634
|
text-align: left;
|
|
2635
2635
|
background-color: var(--pf-c-table--BackgroundColor);
|
|
2636
|
-
}`,
|
|
2636
|
+
}`,Sd=ch;var na=class extends sh{render(){return ph`
|
|
2637
2637
|
<slot></slot>
|
|
2638
|
-
`}};
|
|
2638
|
+
`}};na.styles=[Sd],na=r([dh("pf-caption")],na);import{css as fh}from"lit";var mh=fh`:host {
|
|
2639
2639
|
--pf-c-table--BackgroundColor: var(--pf-global--BackgroundColor--100, #fff);
|
|
2640
2640
|
--pf-c-table--BorderColor: var(--pf-global--BorderColor--100, #d2d2d2);
|
|
2641
2641
|
--pf-c-table--border-width--base: var(--pf-global--BorderWidth--sm, 1px);
|
|
@@ -2858,16 +2858,16 @@ button:hover {
|
|
|
2858
2858
|
border: none;
|
|
2859
2859
|
}
|
|
2860
2860
|
}
|
|
2861
|
-
`,
|
|
2862
|
-
<slot @slotchange="${s(this,
|
|
2863
|
-
@request-expand="${s(this,
|
|
2864
|
-
@request-sort="${s(this,
|
|
2865
|
-
style="${
|
|
2861
|
+
`,Ld=mh;var _h=[":scope > pf-tbody:not([expandable]) > pf-tr",":scope > pf-tbody > pf-tr[expandable]",":scope > pf-tr",":scope > pf-tr[expandable]"].join(),Ci,zd,ca,jc,Bi,Wd,yi,Td,Zo=class extends gh{constructor(){super(...arguments);n(this,Ci);n(this,ca);n(this,Bi);n(this,yi);this.columns=0;this.thRowContext="rowheader"}get rows(){return this.querySelectorAll?.(_h)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","table"),s(this,ca,jc).call(this)}render(){let e=!!this.querySelector?.("pf-tr[expandable]")?"1":"0";return bh`
|
|
2862
|
+
<slot @slotchange="${s(this,ca,jc)}"
|
|
2863
|
+
@request-expand="${s(this,Ci,zd)}"
|
|
2864
|
+
@request-sort="${s(this,Bi,Wd)}"
|
|
2865
|
+
style="${uh({"--_pf-table--expandable-rows":e,"--_pf-table--number-of-columns":this.columns})}"
|
|
2866
2866
|
></slot>
|
|
2867
2867
|
`}static getNodeContentForSort(o,e){let a=e.querySelector(`
|
|
2868
2868
|
:scope > :is(pf-th, pf-td):nth-child(${o+1}),
|
|
2869
2869
|
:scope > pf-tr > :is(pf-th, pf-td):nth-child(${o+1})
|
|
2870
|
-
`.trim())?.textContent?.trim()?.toLowerCase()??"";return{node:e,content:a}}static sortByContent(o,e,a){return o==="asc"?e.content<a.content?-1:e.content>a.content?1:0:a.content<e.content?-1:a.content>e.content?1:0}};
|
|
2870
|
+
`.trim())?.textContent?.trim()?.toLowerCase()??"";return{node:e,content:a}}static sortByContent(o,e,a){return o==="asc"?e.content<a.content?-1:e.content>a.content?1:0:a.content<e.content?-1:a.content>e.content?1:0}};Ci=new WeakSet,zd=function(o){if(o instanceof $t&&!o.defaultPrevented){if(o.stopPropagation(),o.target instanceof ut)o.target.expanded=!!o.target.expandable&&!o.target.expanded;else if(o.target instanceof vt&&o.row){o.row.expanded=o.compoundExpanded;for(let e of o.row.querySelectorAll("pf-td"))e.expanded=o.compoundExpanded===e.compoundExpand}}},ca=new WeakSet,jc=function(){this.columns=this.querySelector?.("pf-tr")?.querySelectorAll("pf-th")?.length??0,this.requestUpdate()},Bi=new WeakSet,Wd=function(o){if(o instanceof la){for(let e of this.querySelectorAll("pf-th[sortable]"))e.selected=e===o.target,e!==o.target&&e.removeAttribute("sort-direction");!o.defaultPrevented&&o.target instanceof wo&&(o.target.sortDirection=o.direction,s(this,yi,Td).call(this,o.target,o.direction))}},yi=new WeakSet,Td=function(o,e){let a=o.parentElement?.children;if(a){let c=[...a].indexOf(o);Array.from(this.rows,p=>Zo.getNodeContentForSort(c,p)).sort((p,f)=>Zo.sortByContent(e,p,f)).forEach(({node:p},f)=>{let v=this.rows[f];if(this.rows[f]!==p){let C=e==="desc"?"afterend":"beforebegin";v.insertAdjacentElement(C,p)}})}},Zo.styles=[Ld],r([vh()],Zo.prototype,"columns",2),r([ft({context:Ie})],Zo.prototype,"thRowContext",2),Zo=r([hh("pf-table")],Zo);import{LitElement as Bh,html as yh}from"lit";import{customElement as kh}from"lit/decorators/custom-element.js";import{property as ki}from"lit/decorators/property.js";import{css as xh}from"lit";var Ch=xh`:host {
|
|
2871
2871
|
display: inline-block;
|
|
2872
2872
|
outline: none;
|
|
2873
2873
|
}
|
|
@@ -2999,7 +2999,7 @@ svg {
|
|
|
2999
2999
|
color: var(--pf-c-switch__toggle-icon--Color,
|
|
3000
3000
|
var(--pf-global--Color--light-100, #fff));
|
|
3001
3001
|
}
|
|
3002
|
-
`,
|
|
3002
|
+
`,Ed=Ch;var $e,wi,Rd,Si,Md,Li,Fd,sa,qc,pa,Vc,Qo=class extends Bh{constructor(){super(...arguments);n(this,wi);n(this,Si);n(this,Li);n(this,sa);n(this,pa);n(this,$e,m.of(this,{role:"switch"}));this.showCheckIcon=!1;this.checked=!1;this.disabled=!1}get labels(){return i(this,$e).labels}connectedCallback(){super.connectedCallback(),this.tabIndex=0,this.addEventListener("click",s(this,wi,Rd)),this.addEventListener("keyup",s(this,Si,Md)),this.addEventListener("keydown",s(this,Li,Fd)),s(this,pa,Vc).call(this)}formDisabledCallback(o){this.disabled=o,this.requestUpdate()}willUpdate(){i(this,$e).ariaChecked=String(!!this.checked),i(this,$e).ariaDisabled=String(!!this.disabled)}render(){return yh`
|
|
3003
3003
|
<div id="container">
|
|
3004
3004
|
<svg id="toggle"
|
|
3005
3005
|
role="presentation"
|
|
@@ -3011,7 +3011,7 @@ svg {
|
|
|
3011
3011
|
<path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" />
|
|
3012
3012
|
</svg>
|
|
3013
3013
|
</div>
|
|
3014
|
-
`}};Ee=new WeakMap,_i=new WeakSet,wd=function(o){let{originalTarget:e,explicitOriginalTarget:a}=o;if(a){let c;if(e===o.target&&!(c=Array.from(this.labels)).includes(a)&&c.includes(this.closest("label")))return}s(this,la,Dc).call(this)},xi=new WeakSet,Sd=function(o){switch(o.key){case" ":case"Enter":o.preventDefault(),s(this,la,Dc).call(this)}},Ci=new WeakSet,Ld=function(o){o.key===" "&&(o.preventDefault(),o.stopPropagation())},la=new WeakSet,Dc=function(){this.disabled||(this.checked=!this.checked,s(this,ia,Uc).call(this),this.dispatchEvent(new Event("change",{bubbles:!0})))},ia=new WeakSet,Uc=function(){let o=this.checked?"on":"off";this.labels.forEach(e=>{e.querySelectorAll("[data-state]").forEach(c=>{c&&(c.hidden=c.dataset.state!==o)})})},Go.styles=[kd],Go.formAssociated=!0,r([vi({reflect:!0})],Go.prototype,"label",2),r([vi({reflect:!0,type:Boolean,attribute:"show-check-icon"})],Go.prototype,"showCheckIcon",2),r([vi({reflect:!0,type:Boolean})],Go.prototype,"checked",2),r([vi({reflect:!0,type:Boolean})],Go.prototype,"disabled",2),Go=r([fh("pf-switch")],Go);import{LitElement as Kd,html as ha,isServer as Nh}from"lit";import{customElement as jh}from"lit/decorators/custom-element.js";import{property as So}from"lit/decorators/property.js";import{query as Oe}from"lit/decorators/query.js";import{repeat as qh}from"lit/directives/repeat.js";import{styleMap as Gd}from"lit/directives/style-map.js";import{classMap as es}from"lit/directives/class-map.js";import{ifDefined as Vh}from"lit/directives/if-defined.js";import{__classPrivateFieldGet as d,__classPrivateFieldSet as Qo}from"tslib";import{nothing as vh}from"lit";import{__classPrivateFieldGet as g,__classPrivateFieldSet as Zo}from"tslib";import{isServer as mh}from"lit";function Re(l,t){if(!Array.isArray(l)||!Array.isArray(t))return l===t;if(l.length!==t.length)return!1;if(!l.length&&!t.length)return!0;for(let[o,e]of l.entries())if(e!==t[o])return!1;return!0}var Fo,ut,z,Qt,vo,na,vt,jc,zd,Bi,yi,Me,Fe,ki;function gh(l,t){t?l.setAttribute("aria-selected","true"):l.removeAttribute("aria-selected")}function qc(l){return l instanceof Element&&l?.parentElement?.role==="listbox"&&l?.role!=="presentation"&&l?.localName!=="hr"}function Vc(l){return"disabled"in l&&typeof l.disabled=="boolean"&&l.disabled||l.getAttribute("aria-disabled")==="true"||l.hasAttribute("disabled")||l.hasAttribute("inert")||l.matches(":disabled")}var Nc=!1,ca=class l{static of(t,o){Nc=!0;let e=new l(t,o);return Nc=!1,e}get container(){return g(this,z,"f").getItemsContainer?.()??this.host}get multi(){return!!g(this,z,"f").multi}set multi(t){g(this,z,"f").multi=t,this.host.requestUpdate()}get items(){return g(this,Qt,"f")}set items(t){Zo(this,Qt,t,"f"),g(this,Qt,"f").forEach((o,e,a)=>{o.ariaSetSize=a.length.toString(),o.ariaPosInSet=(e+1).toString()})}set selected(t){if(!Re(t,Array.from(g(this,vo,"f")))){Zo(this,vo,new Set(t),"f");for(let o of this.items)g(this,z,"f").setItemSelected(o,g(this,vo,"f").has(o));this.host.requestUpdate()}}get selected(){return[...g(this,vo,"f")]}constructor(t,o){if(Fo.add(this),this.host=t,ut.set(this,null),z.set(this,void 0),Qt.set(this,[]),vo.set(this,new Set),na.set(this,!1),this.disabled=!1,vt.set(this,[]),yi.set(this,a=>{let c=g(this,Fo,"m",Bi).call(this,a);if(Zo(this,ut,g(this,ut,"f")??g(this,Fo,"m",Bi).call(this,a),"f"),c&&!g(this,z,"f").isItemDisabled(c))if(!this.multi)this.selected=[c];else if(!a.shiftKey)this.selected=this.items.filter(p=>g(this,vo,"f").has(p)?p!==c:p===c);else{let p=g(this,ut,"f"),f=g(this,vo,"f").has(p),[b,x]=[this.items.indexOf(p),this.items.indexOf(c)].sort();this.selected=this.items.filter((S,E)=>E>=b&&E<=x?f:g(this,vo,"f").has(S))}Zo(this,ut,c,"f"),this.host.requestUpdate()}),Me.set(this,a=>{a.key==="Shift"&&Zo(this,ut,null,"f")}),Fe.set(this,a=>{let c=g(this,Fo,"m",Bi).call(this,a);if(!(this.disabled||a.altKey||a.metaKey||!g(this,Fo,"a",zd))){switch(a.key==="Shift"&&this.multi&&Zo(this,ut,g(this,ut,"f")??g(this,z,"f").getATFocusedItem()??null,"f"),a.key){case"a":case"A":if(a.ctrlKey&&(a.target===this.container||g(this,z,"f").isItem(a.target))){let p=this.items.filter(f=>!g(this,z,"f").isItemDisabled(f));Re(this.selected,p)?this.selected=[]:this.selected=p,a.preventDefault()}break;case"Enter":if(c&&!a.shiftKey){let p=c;g(this,Fo,"m",ki).call(this,p,a.shiftKey),a.preventDefault()}break;case"ArrowUp":if(this.multi&&a.shiftKey&&g(this,z,"f").isItem(a.target)){let p=a.target;this.selected=this.items.filter((f,b)=>g(this,vo,"f").has(f)||b===this.items.indexOf(p)-1).filter(f=>!g(this,z,"f").isItemDisabled(f))}break;case"ArrowDown":if(this.multi&&a.shiftKey&&g(this,z,"f").isItem(a.target)){let p=a.target;this.selected=this.items.filter((f,b)=>g(this,vo,"f").has(f)||b===this.items.indexOf(p)+1).filter(f=>!g(this,z,"f").isItemDisabled(f))}break;case" ":c&&a.target===this.container?(g(this,Fo,"m",ki).call(this,c,a.shiftKey),a.preventDefault()):g(this,z,"f").isItem(a.target)&&(g(this,Fo,"m",ki).call(this,a.target,a.shiftKey),a.preventDefault());break;default:break}this.host.requestUpdate()}}),Zo(this,z,{setItemSelected:gh,isItemDisabled:Vc,isItem:qc,...o},"f"),!Nc)throw new Error("ListboxController must be constructed with `ListboxController.of()`");if(!mh&&!(t instanceof HTMLElement)&&typeof o.getItemsContainer!="function")throw new Error(["ListboxController requires the host to be an HTMLElement","or for the initializer to include a getItemsContainer() function"].join(" "));let e=l.instances.get(t);if(e)return e;l.instances.set(t,this),this.host.addController(this),this.multi=g(this,z,"f").multi??!1,this.container?.isConnected&&this.hostConnected()}async hostConnected(){await this.host.updateComplete,this.hostUpdate(),this.hostUpdated()}hostUpdate(){let t=g(this,vt,"f");if(Zo(this,vt,g(this,z,"f").getControlsElements?.()??[],"f"),!Re(t,g(this,vt,"f"))){g(this,Fo,"m",jc).call(this,t);for(let o of g(this,vt,"f"))o.addEventListener("keydown",g(this,Fe,"f")),o.addEventListener("keyup",g(this,Me,"f"))}}hostUpdated(){g(this,na,"f")||(this.container?.addEventListener("click",g(this,yi,"f")),this.container?.addEventListener("keydown",g(this,Fe,"f")),this.container?.addEventListener("keyup",g(this,Me,"f")),Zo(this,na,!0,"f")),this.container?.setAttribute("role","listbox"),this.container?.setAttribute("aria-disabled",String(!!this.disabled)),this.container?.setAttribute("aria-multiselectable",String(!!g(this,z,"f").multi))}hostDisconnected(){this.container?.removeEventListener("click",g(this,yi,"f")),this.container?.removeEventListener("keydown",g(this,Fe,"f")),this.container?.removeEventListener("keyup",g(this,Me,"f")),g(this,Fo,"m",jc).call(this),Zo(this,na,!1,"f")}isSelected(t){return g(this,vo,"f").has(t)}};ut=new WeakMap,z=new WeakMap,Qt=new WeakMap,vo=new WeakMap,na=new WeakMap,vt=new WeakMap,yi=new WeakMap,Me=new WeakMap,Fe=new WeakMap,Fo=new WeakSet,jc=function(t=g(this,vt,"f")){for(let o of t)o.removeEventListener("keydown",g(this,Fe,"f")),o.removeEventListener("keyup",g(this,Me,"f"))},zd=function(){return g(this,vt,"f").length?g(this,vt,"f").every(t=>t.ariaExpanded==="true"):!0},Bi=function(t){let o=t.composedPath();if(this.items.some(a=>a.hasAttribute("tabindex"))){let a=o.find(g(this,z,"f").isItem);if(a)return a}else{if(g(this,z,"f").isItem(t.target)&&t.target.getRootNode()!==this.container.getRootNode()&&"ariaActiveDescendantElement"in HTMLElement.prototype)return t.target;if(t.target instanceof HTMLElement&&t.target.ariaActiveDescendantElement)return t.target.ariaActiveDescendantElement;if(t.type==="click"&&g(this,z,"f").isItem(t.target)&&t.target.id){let a=t.target,c=a.getRootNode();if(c instanceof ShadowRoot&&this.container.getRootNode()===c){let p=this.container,f=a;if(f&&p){if(this.items.includes(f))return f;{let b=Array.from(p?.children??[]).filter(g(this,z,"f").isItem).filter(x=>!x.hidden).indexOf(f);return g(this,Qt,"f").filter(x=>!x.hidden)[b]}}}}else{let a=t.target,c=a.getRootNode(),p=a?.getAttribute("aria-controls"),f=g(this,z,"f").isItem(a)?this.container:p?c.getElementById(p):null,x=c.querySelector(`[aria-controls="${f?.id}"][aria-activedescendant]`)?.getAttribute("aria-activedescendant"),S=x&&c.getElementById(x);if(S&&f){if(this.items.includes(S))return S;{let Y=Array.from(f?.children??[]).filter(g(this,z,"f").isItem).filter(U=>!U.hidden).indexOf(S);return g(this,Qt,"f").filter(U=>!U.hidden)[Y]}}let E=f||o.find(Y=>Y instanceof HTMLElement&&Y.role==="listbox");if(E){let U=Array.from(E.children).filter(g(this,z,"f").isItem).findIndex(jo=>o.includes(jo));if(U>=0)return this.items[U]??null}}}return null},ki=function(t,o=!1){g(this,z,"f").isItemDisabled(t)||(this.multi&&o?this.selected=[...this.selected,t]:this.multi&&g(this,vo,"f").has(t)?this.selected=this.selected.filter(e=>e!==t):this.multi?this.selected=this.selected.concat(t):this.selected=[t])};ca.instances=new WeakMap;import{__classPrivateFieldGet as $,__classPrivateFieldSet as Yc,__decorate as bh}from"tslib";import{isServer as hh,nothing as uh}from"lit";Wt();var pa,He,da,wi,Pe,sa,Si,Ie,Wd,Td,Ed,Jt=class l extends ye{static get supportsCrossRootActiveDescendant(){return!hh&&"ariaActiveDescendantElement"in HTMLElement.prototype}static of(t,o){return new l(t,o)}get atFocusedItemIndex(){return super.atFocusedItemIndex}set atFocusedItemIndex(t){super.atFocusedItemIndex=t;let o=this._items.at(this.atFocusedItemIndex);for(let a of this.items)this.options.setItemActive?.(a,a===o);let e=this.options.getActiveDescendantContainer();l.supportsCrossRootActiveDescendant?e&&(e.ariaActiveDescendantElement=o??null):e?.setAttribute("aria-activedescendant",o?.id??""),this.host.requestUpdate()}get controlsElements(){return $(this,Pe,"f")}set controlsElements(t){for(let o of $(this,Pe,"f"))o?.removeEventListener("keydown",this.onKeydown);Yc(this,Pe,t,"f");for(let o of $(this,Pe,"f"))o.addEventListener("keydown",this.onKeydown)}get items(){return this._items}set items(t){let o=this.options.getItemsContainer?.()??this.host;if(!(o instanceof HTMLElement))throw new Error("items container must be an HTMLElement");this.itemsContainerElement=o;let{supportsCrossRootActiveDescendant:e}=l;e||[o].concat(this.controlsElements).concat(t).every((a,c,p)=>a.getRootNode()===p[0].getRootNode())?this._items=t.map(a=>(e||a.id||(a.id=N()),a)):this._items=t?.map(a=>{if(a.removeAttribute("tabindex"),o.contains(a))return a.id||(a.id=N()),$(this,wi,"f").add(a),$(this,da,"f").set(a,a),a;{let c=a.cloneNode(!0);return c.id=N(),$(this,He,"f").set(a,c),$(this,da,"f").set(c,a),$(this,Ie,"f").observe(c,{attributes:!0}),$(this,Ie,"f").observe(a,{attributes:!0}),c}})}constructor(t,o){var e;super(t,o),pa.add(this),this.host=t,this.options=o,He.set(this,new WeakMap),da.set(this,new WeakMap),wi.set(this,new WeakSet),Pe.set(this,[]),sa.set(this,!1),Si.set(this,new MutationObserver(a=>$(this,pa,"m",Td).call(this,a))),Ie.set(this,new MutationObserver(a=>$(this,pa,"m",Ed).call(this,a))),(e=this.options).getItemValue??(e.getItemValue=function(){return this.value})}initItems(){$(this,Ie,"f").disconnect(),super.initItems(),this.controlsElements=this.options.getControlsElements?.()??[],!$(this,sa,"f")&&this.itemsContainerElement&&this.itemsContainerElement.isConnected&&($(this,Si,"f").observe(this.itemsContainerElement,{childList:!0}),Yc(this,sa,!0,"f"))}hostDisconnected(){this.controlsElements=[],Yc(this,sa,!1,"f"),$(this,Si,"f").disconnect(),$(this,Ie,"f").disconnect()}onKeydown(t){!t.ctrlKey&&!t.altKey&&!t.metaKey&&this.atFocusableItems.length&&super.onKeydown(t)}renderItemsToShadowRoot(){return l.supportsCrossRootActiveDescendant?uh:this.items?.filter(t=>!$(this,wi,"f").has(t))}};He=new WeakMap,da=new WeakMap,wi=new WeakMap,Pe=new WeakMap,sa=new WeakMap,Si=new WeakMap,Ie=new WeakMap,pa=new WeakSet,Wd=function(t,o){let e=$(this,da,"f").get(o)??$(this,He,"f").get(o),a=o.getAttribute(t),c=e?.getAttribute(t);o.hasAttribute(t)?c!==a&&e?.setAttribute(t,a):e?.removeAttribute(t)},Td=function(t){for(let{removedNodes:o}of t)for(let e of o)$(this,He,"f").get(e)?.remove(),$(this,He,"f").delete(e)},Ed=function(t){for(let{target:o,attributeName:e}of t)e&&$(this,pa,"m",Wd).call(this,e,o)};bh([A],Jt.prototype,"onKeydown",null);var _,G,$e,Qc,wo,oo,fa,P,V,K,zi,Wi,Xc,oe,Hi,Ti,Id,Rd,Md,Fd,Kc,Pd,Gc,Ht,_t,Hd,Li,$d,Zc,Ae,Ei,ma,Ri,Mi,Fi,Pi,Ii;function _h(l,t){let o=l?.closest(t),e=l?.getRootNode(),a=0;for(;a<500&&!o&&l;){if(a++,e=l.getRootNode(),e instanceof ShadowRoot)l=e.host;else if(e instanceof Document)l=document.documentElement;else return null;o=l.closest(t)}return o}function Ad(l){return"value"in l&&typeof l.value=="string"?l.value:""}function xh(l,t){return!Ad(l).toLowerCase().startsWith(t.toLowerCase())}function Ch(l,t){l.hidden=t}function Bh(l,t){if("value"in l)l.value=t;else return console.warn(`Cannot set value on combobox element ${l.localName}`)}function yh(l){return"value"in l&&typeof l.value=="string"?l.value:(console.warn(`Cannot get value from combobox element ${l.localName}`),"")}var $t=class{static of(t,o){return new G(t,o)}static get supportsCrossRootActiveDescendant(){return Jt.supportsCrossRootActiveDescendant}get items(){return d(this,wo,"f").items}set items(t){d(this,wo,"f").items=t}get disabled(){return d(this,wo,"f").disabled}set disabled(t){d(this,wo,"f").disabled=t}get multi(){return d(this,wo,"f").multi}set multi(t){d(this,wo,"f").multi=t}get selected(){return d(this,wo,"f").selected}set selected(t){d(this,wo,"f").selected=t}constructor(t,o){_.add(this),this.host=t,wo.set(this,void 0),oo.set(this,void 0),fa.set(this,!1),P.set(this,null),V.set(this,null),K.set(this,null),zi.set(this,null),Wi.set(this,new MutationObserver(()=>d(this,_,"m",Gc).call(this))),Xc.set(this,new Map(Object.entries({dimmed:{en:"dimmed",es:"atenuada",de:"gedimmt",it:"oscurato",fr:"att\xE9nu\xE9",ja:"\u6697\u304F\u306A\u3063\u305F",zh:"\u53D8\u6697"},selected:{en:"selected",es:"seleccionado",de:"ausgew\xE4hlt",fr:"choisie",it:"selezionato",ja:"\u9078\u3070\u308C\u305F",zh:"\u9009"},of:{en:"of",es:"de",de:"von",fr:"sur",it:"di",ja:"\u4EF6\u76EE",zh:"\u7684"}}))),Ae.set(this,()=>{this.options.isExpanded()?d(this,_,"m",_t).call(this):d(this,_,"m",Ht).call(this)}),Ei.set(this,e=>{!this.multi&&e.composedPath().some(this.options.isItem)&&d(this,_,"m",_t).call(this)}),ma.set(this,e=>{if(!(e.ctrlKey||e.shiftKey||!d(this,P,"f")))switch(e.key){case"ArrowDown":case"ArrowUp":this.options.isExpanded()||(Qo(this,fa,e.altKey,"f"),d(this,_,"m",Ht).call(this));break;case"Enter":this.multi||d(this,_,"m",_t).call(this);break;case"Escape":this.options.isExpanded()||(this.options.setComboboxValue(d(this,P,"f"),""),this.host.requestUpdate()),d(this,_,"m",_t).call(this);break;case"Alt":case"AltGraph":case"Shift":case"Control":case"Fn":case"Symbol":case"Hyper":case"Super":case"Meta":case"CapsLock":case"FnLock":case"NumLock":case"Tab":case"ScrollLock":case"SymbolLock":case" ":break;default:this.options.isExpanded()||d(this,_,"m",Ht).call(this)}}),Ri.set(this,e=>{if(d(this,P,"f"))switch(e.key){case"ArrowUp":case"ArrowDown":d(this,_,"a",Hi)&&this.options.getComboboxInput()&&m.isSafari&&d(this,_,"m",$d).call(this,d(this,_,"a",Hi));break;default:d(this,_,"m",Zc).call(this)}}),Mi.set(this,e=>d(this,_,"a",oe)?d(this,ma,"f").call(this,e):d(this,Ii,"f").call(this,e)),Fi.set(this,e=>{if(!d(this,_,"a",oe))switch(e.key){case"Home":case"End":d(this,Ii,"f").call(this,e);break;case"Escape":d(this,_,"m",_t).call(this),d(this,V,"f")?.focus();break;case"Enter":case" ":{let a=e.composedPath().find(this.options.isItem);a&&!this.multi&&this.options.isExpanded()&&!this.options.isItemDisabled(a)&&(d(this,_,"m",_t).call(this),d(this,V,"f")?.focus())}}}),Pi.set(this,e=>{if(!d(this,_,"a",oe)&&this.options.isExpanded()){let a=d(this,_,"a",Ti)?.getRootNode();(a instanceof ShadowRoot||a instanceof Document)&&!this.items.includes(e.relatedTarget)&&d(this,_,"m",_t).call(this)}}),Ii.set(this,async e=>{switch(e.key){case"ArrowDown":case"ArrowUp":this.options.isExpanded()||d(this,_,"m",Ht).call(this);break;case"Home":this.options.isExpanded()||await d(this,_,"m",Ht).call(this),d(this,oo,"f")&&(d(this,oo,"f").atFocusedItemIndex=0);break;case"End":this.options.isExpanded()||await d(this,_,"m",Ht).call(this),d(this,oo,"f")&&(d(this,oo,"f").atFocusedItemIndex=this.items.length-1);break;case" ":case"Enter":e.preventDefault(),await d(this,_,"m",Hd).call(this),await this.host.updateComplete,this.options.isExpanded()||d(this,V,"f")?.focus();break}}),t.addController(this),this.options={isItem:qc,getItemValue:Ad,isItemFiltered:xh,isItemDisabled:Vc,getComboboxValue:yh,setComboboxValue:Bh,setItemHidden:Ch,getOrientation:()=>"vertical",...o},Qo(this,wo,ca.of(t,{isItem:this.options.isItem,getItemsContainer:this.options.getListboxElement,getControlsElements:()=>[this.options.getToggleButton(),this.options.getComboboxInput()].filter(e=>!!e),getATFocusedItem:()=>this.items[d(this,oo,"f")?.atFocusedItemIndex??-1]??null,isItemDisabled:this.options.isItemDisabled,setItemSelected:this.options.setItemSelected}),"f")}async hostConnected(){await this.host.updateComplete,this.hostUpdated()}hostUpdated(){d(this,oo,"f")||d(this,_,"m",Id).call(this);let t=this.options.isExpanded();d(this,V,"f")?.setAttribute("aria-expanded",String(t)),d(this,P,"f")?.setAttribute("aria-expanded",String(t)),d(this,_,"a",oe)?d(this,V,"f")?.setAttribute("tabindex","-1"):d(this,V,"f")?.removeAttribute("tabindex"),d(this,_,"m",Kc).call(this)}hostDisconnected(){d(this,oo,"f")?.hostDisconnected()}renderItemsToShadowRoot(){return d(this,oo,"f")instanceof Jt?d(this,oo,"f").renderItemsToShadowRoot():vh}};G=$t,wo=new WeakMap,oo=new WeakMap,fa=new WeakMap,P=new WeakMap,V=new WeakMap,K=new WeakMap,zi=new WeakMap,Wi=new WeakMap,Xc=new WeakMap,Ae=new WeakMap,Ei=new WeakMap,ma=new WeakMap,Ri=new WeakMap,Mi=new WeakMap,Fi=new WeakMap,Pi=new WeakMap,Ii=new WeakMap,_=new WeakSet,oe=function(){return this.options.getComboboxInput()},Hi=function(){return d(this,oo,"f")?.items.at(Math.max(d(this,oo,"f")?.atFocusedItemIndex??-1,0))??null},Ti=function(){if(this.host instanceof HTMLElement)return this.host;if(this.options.getListboxElement()instanceof HTMLElement)return this.options.getListboxElement()},Id=async function(){await this.host.updateComplete,d(this,_,"m",Rd).call(this),d(this,_,"m",Gc).call(this),d(this,_,"m",Md).call(this),d(this,_,"m",Fd).call(this),d(this,_,"m",Kc).call(this),d(this,_,"m",Pd).call(this)},Rd=function(){var t;if(d(this,Wi,"f").disconnect(),d(this,K,"f")?.removeEventListener("focusout",d(this,Pi,"f")),d(this,K,"f")?.removeEventListener("keydown",d(this,Fi,"f")),d(this,K,"f")?.removeEventListener("click",d(this,Ei,"f")),Qo(this,K,this.options.getListboxElement(),"f"),!d(this,K,"f"))throw new Error("ComboboxController getListboxElement() option must return an element");d(this,K,"f").addEventListener("focusout",d(this,Pi,"f")),d(this,K,"f").addEventListener("keydown",d(this,Fi,"f")),d(this,K,"f").addEventListener("click",d(this,Ei,"f")),(t=d(this,K,"f")).id??(t.id=N()),d(this,Wi,"f").observe(d(this,K,"f"),{childList:!0})},Md=function(){if(d(this,V,"f")?.removeEventListener("click",d(this,Ae,"f")),d(this,V,"f")?.removeEventListener("keydown",d(this,Mi,"f")),Qo(this,V,this.options.getToggleButton(),"f"),!d(this,V,"f"))throw new Error("ComboboxController getToggleButton() option must return an element");Qo(this,zi,d(this,V,"f").role,"f"),d(this,V,"f").role="combobox",d(this,V,"f").setAttribute("aria-controls",d(this,K,"f")?.id??""),d(this,V,"f").addEventListener("click",d(this,Ae,"f")),d(this,V,"f").addEventListener("keydown",d(this,Mi,"f"))},Fd=function(){if(d(this,P,"f")?.removeEventListener("click",d(this,Ae,"f")),d(this,P,"f")?.removeEventListener("keyup",d(this,Ri,"f")),d(this,P,"f")?.removeEventListener("keydown",d(this,ma,"f")),Qo(this,P,this.options.getComboboxInput(),"f"),d(this,P,"f")&&!("value"in d(this,P,"f")))throw new Error("ComboboxController getToggleInput() option must return an element with a value property");d(this,P,"f")&&(d(this,P,"f").role="combobox",d(this,V,"f").role=d(this,zi,"f"),d(this,P,"f").setAttribute("aria-autocomplete","both"),d(this,P,"f").setAttribute("aria-controls",d(this,K,"f")?.id??""),d(this,P,"f").addEventListener("click",d(this,Ae,"f")),d(this,P,"f").addEventListener("keyup",d(this,Ri,"f")),d(this,P,"f").addEventListener("keydown",d(this,ma,"f")))},Kc=function(){let t=m.getLabels(this.host)??d(this,_,"a",Ti)?.ariaLabelledByElements??[],o=this.options.getFallbackLabel()||d(this,_,"a",Ti)?.ariaLabelledByElements?.map(e=>e.textContent).join("")||null;for(let e of[d(this,V,"f"),d(this,K,"f"),d(this,P,"f")].filter(a=>!!a))"ariaLabelledByElements"in HTMLElement.prototype&&t.filter(a=>!!a).length?e.ariaLabelledByElements=[...t??[]]:e.ariaLabel=o},Pd=function(){d(this,oo,"f")?.hostDisconnected();let{getOrientation:t}=this.options,o=()=>this.items,e=()=>d(this,K,"f");d(this,_,"a",oe)?Qo(this,oo,Jt.of(this.host,{getItems:o,getItemsContainer:e,getOrientation:t,getActiveDescendantContainer:()=>d(this,P,"f"),getControlsElements:()=>[this.options.getToggleButton(),this.options.getComboboxInput()].filter(a=>!!a),setItemActive:this.options.setItemActive}),"f"):Qo(this,oo,co.of(this.host,{getItems:o,getItemsContainer:e,getOrientation:t,getControlsElements:()=>[this.options.getToggleButton()].filter(a=>!!a)}),"f")},Gc=function(){d(this,K,"f")&&(this.items=this.options.getItems())},Ht=async function(){let t=await this.options.requestShowListbox();d(this,_,"m",Zc).call(this),t!==!1&&!d(this,_,"a",oe)&&(d(this,fa,"f")||((d(this,_,"a",Hi)??d(this,oo,"f")?.items.at(0))?.focus(),Qo(this,fa,!1,"f")))},_t=async function(){await this.options.requestHideListbox()},Hd=async function(){return this.options.isExpanded()?d(this,_,"m",_t).call(this):d(this,_,"m",Ht).call(this)},Li=function(t,o){return d(this,Xc,"f").get(t)?.[o]??t},$d=function(t){let o=this.options.getItemValue(t);d(G,G,"f",$e)?.remove();let e=d(G,G,"f",Qc).content.cloneNode(!0);Qo(G,G,e.firstElementChild,"f",$e);let a=o,c=_h(d(this,K,"f"),"[lang]")?.getAttribute("lang")??"en",p=c?.match(G.langsRE)?.at(0)??"en";this.options.isItemDisabled(t)&&(a+=` (${d(this,_,"m",Li).call(this,"dimmed",p)})`),d(this,wo,"f").isSelected(t)&&(a+=`, (${d(this,_,"m",Li).call(this,"selected",p)})`),t.hasAttribute("aria-setsize")&&t.hasAttribute("aria-posinset")&&(p==="ja"?a+=`, (${t.getAttribute("aria-setsize")} \u4EF6\u4E2D ${t.getAttribute("aria-posinset")} \u4EF6\u76EE)`:a+=`, (${t.getAttribute("aria-posinset")} ${d(this,_,"m",Li).call(this,"of",p)} ${t.getAttribute("aria-setsize")})`),d(G,G,"f",$e).lang=c,d(G,G,"f",$e).innerText=a,document.body.append(d(G,G,"f",$e))},Zc=function(){if(d(this,P,"f")){let t;for(let o of this.items){let e=!!this.options.isExpanded()&&!!(t=this.options.getComboboxValue(d(this,P,"f")))&&this.options.isItemFiltered?.(o,t)||!1;this.options.setItemHidden(o,e)}}};$e={value:void 0};Qc={value:document.createElement("template")};$t.langs=["en","es","de","fr","it","ja","zh"];$t.langsRE=new RegExp(G.langs.join("|"));d(G,G,"f",Qc).innerHTML=`
|
|
3014
|
+
`}};$e=new WeakMap,wi=new WeakSet,Rd=function(o){let{originalTarget:e,explicitOriginalTarget:a}=o;if(a){let c;if(e===o.target&&!(c=Array.from(this.labels)).includes(a)&&c.includes(this.closest("label")))return}s(this,sa,qc).call(this)},Si=new WeakSet,Md=function(o){switch(o.key){case" ":case"Enter":o.preventDefault(),s(this,sa,qc).call(this)}},Li=new WeakSet,Fd=function(o){o.key===" "&&(o.preventDefault(),o.stopPropagation())},sa=new WeakSet,qc=function(){this.disabled||(this.checked=!this.checked,s(this,pa,Vc).call(this),this.dispatchEvent(new Event("change",{bubbles:!0})))},pa=new WeakSet,Vc=function(){let o=this.checked?"on":"off";this.labels.forEach(e=>{e.querySelectorAll("[data-state]").forEach(c=>{c&&(c.hidden=c.dataset.state!==o)})})},Qo.styles=[Ed],Qo.formAssociated=!0,r([ki({reflect:!0})],Qo.prototype,"label",2),r([ki({reflect:!0,type:Boolean,attribute:"show-check-icon"})],Qo.prototype,"showCheckIcon",2),r([ki({reflect:!0,type:Boolean})],Qo.prototype,"checked",2),r([ki({reflect:!0,type:Boolean})],Qo.prototype,"disabled",2),Qo=r([kh("pf-switch")],Qo);import{LitElement as ef,html as xa,isServer as tu}from"lit";import{customElement as eu}from"lit/decorators/custom-element.js";import{property as Lo}from"lit/decorators/property.js";import{query as Ye}from"lit/decorators/query.js";import{repeat as ru}from"lit/directives/repeat.js";import{styleMap as rf}from"lit/directives/style-map.js";import{classMap as is}from"lit/directives/class-map.js";import{ifDefined as au}from"lit/directives/if-defined.js";import{__classPrivateFieldGet as d,__classPrivateFieldSet as ot}from"tslib";import{nothing as Th}from"lit";import{__classPrivateFieldGet as g,__classPrivateFieldSet as Jo}from"tslib";import{isServer as wh}from"lit";function Ae(l,t){if(!Array.isArray(l)||!Array.isArray(t))return l===t;if(l.length!==t.length)return!1;if(!l.length&&!t.length)return!0;for(let[o,e]of l.entries())if(e!==t[o])return!1;return!0}var Po,_t,z,ee,vo,da,xt,Xc,Pd,zi,Wi,De,Oe,Ti;function Sh(l,t){t?l.setAttribute("aria-selected","true"):l.removeAttribute("aria-selected")}function Kc(l){return l instanceof Element&&l?.parentElement?.role==="listbox"&&l?.role!=="presentation"&&l?.localName!=="hr"}function Gc(l){return"disabled"in l&&typeof l.disabled=="boolean"&&l.disabled||l.getAttribute("aria-disabled")==="true"||l.hasAttribute("disabled")||l.hasAttribute("inert")||l.matches(":disabled")}var Yc=!1,fa=class l{static of(t,o){Yc=!0;let e=new l(t,o);return Yc=!1,e}get container(){return g(this,z,"f").getItemsContainer?.()??this.host}get multi(){return!!g(this,z,"f").multi}set multi(t){g(this,z,"f").multi=t,this.host.requestUpdate()}get items(){return g(this,ee,"f")}set items(t){Jo(this,ee,t,"f"),g(this,ee,"f").forEach((o,e,a)=>{o.ariaSetSize=a.length.toString(),o.ariaPosInSet=(e+1).toString()})}set selected(t){if(!Ae(t,Array.from(g(this,vo,"f")))){Jo(this,vo,new Set(t),"f");for(let o of this.items)g(this,z,"f").setItemSelected(o,g(this,vo,"f").has(o));this.host.requestUpdate()}}get selected(){return[...g(this,vo,"f")]}constructor(t,o){if(Po.add(this),this.host=t,_t.set(this,null),z.set(this,void 0),ee.set(this,[]),vo.set(this,new Set),da.set(this,!1),this.disabled=!1,xt.set(this,[]),Wi.set(this,a=>{let c=g(this,Po,"m",zi).call(this,a);if(Jo(this,_t,g(this,_t,"f")??g(this,Po,"m",zi).call(this,a),"f"),c&&!g(this,z,"f").isItemDisabled(c))if(!this.multi)this.selected=[c];else if(!a.shiftKey)this.selected=this.items.filter(p=>g(this,vo,"f").has(p)?p!==c:p===c);else{let p=g(this,_t,"f"),f=g(this,vo,"f").has(p),[v,C]=[this.items.indexOf(p),this.items.indexOf(c)].sort();this.selected=this.items.filter((w,E)=>E>=v&&E<=C?f:g(this,vo,"f").has(w))}Jo(this,_t,c,"f"),this.host.requestUpdate()}),De.set(this,a=>{a.key==="Shift"&&Jo(this,_t,null,"f")}),Oe.set(this,a=>{let c=g(this,Po,"m",zi).call(this,a);if(!(this.disabled||a.altKey||a.metaKey||!g(this,Po,"a",Pd))){switch(a.key==="Shift"&&this.multi&&Jo(this,_t,g(this,_t,"f")??g(this,z,"f").getATFocusedItem()??null,"f"),a.key){case"a":case"A":if(a.ctrlKey&&(a.target===this.container||g(this,z,"f").isItem(a.target))){let p=this.items.filter(f=>!g(this,z,"f").isItemDisabled(f));Ae(this.selected,p)?this.selected=[]:this.selected=p,a.preventDefault()}break;case"Enter":if(c&&!a.shiftKey){let p=c;g(this,Po,"m",Ti).call(this,p,a.shiftKey),a.preventDefault()}break;case"ArrowUp":if(this.multi&&a.shiftKey&&g(this,z,"f").isItem(a.target)){let p=a.target;this.selected=this.items.filter((f,v)=>g(this,vo,"f").has(f)||v===this.items.indexOf(p)-1).filter(f=>!g(this,z,"f").isItemDisabled(f))}break;case"ArrowDown":if(this.multi&&a.shiftKey&&g(this,z,"f").isItem(a.target)){let p=a.target;this.selected=this.items.filter((f,v)=>g(this,vo,"f").has(f)||v===this.items.indexOf(p)+1).filter(f=>!g(this,z,"f").isItemDisabled(f))}break;case" ":c&&a.target===this.container?(g(this,Po,"m",Ti).call(this,c,a.shiftKey),a.preventDefault()):g(this,z,"f").isItem(a.target)&&(g(this,Po,"m",Ti).call(this,a.target,a.shiftKey),a.preventDefault());break;default:break}this.host.requestUpdate()}}),Jo(this,z,{setItemSelected:Sh,isItemDisabled:Gc,isItem:Kc,...o},"f"),!Yc)throw new Error("ListboxController must be constructed with `ListboxController.of()`");if(!wh&&!(t instanceof HTMLElement)&&typeof o.getItemsContainer!="function")throw new Error(["ListboxController requires the host to be an HTMLElement","or for the initializer to include a getItemsContainer() function"].join(" "));let e=l.instances.get(t);if(e)return e;l.instances.set(t,this),this.host.addController(this),this.multi=g(this,z,"f").multi??!1,this.container?.isConnected&&this.hostConnected()}async hostConnected(){await this.host.updateComplete,this.hostUpdate(),this.hostUpdated()}hostUpdate(){let t=g(this,xt,"f");if(Jo(this,xt,g(this,z,"f").getControlsElements?.()??[],"f"),!Ae(t,g(this,xt,"f"))){g(this,Po,"m",Xc).call(this,t);for(let o of g(this,xt,"f"))o.addEventListener("keydown",g(this,Oe,"f")),o.addEventListener("keyup",g(this,De,"f"))}}hostUpdated(){g(this,da,"f")||(this.container?.addEventListener("click",g(this,Wi,"f")),this.container?.addEventListener("keydown",g(this,Oe,"f")),this.container?.addEventListener("keyup",g(this,De,"f")),Jo(this,da,!0,"f")),this.container?.setAttribute("role","listbox"),this.container?.setAttribute("aria-disabled",String(!!this.disabled)),this.container?.setAttribute("aria-multiselectable",String(!!g(this,z,"f").multi))}hostDisconnected(){this.container?.removeEventListener("click",g(this,Wi,"f")),this.container?.removeEventListener("keydown",g(this,Oe,"f")),this.container?.removeEventListener("keyup",g(this,De,"f")),g(this,Po,"m",Xc).call(this),Jo(this,da,!1,"f")}isSelected(t){return g(this,vo,"f").has(t)}};_t=new WeakMap,z=new WeakMap,ee=new WeakMap,vo=new WeakMap,da=new WeakMap,xt=new WeakMap,Wi=new WeakMap,De=new WeakMap,Oe=new WeakMap,Po=new WeakSet,Xc=function(t=g(this,xt,"f")){for(let o of t)o.removeEventListener("keydown",g(this,Oe,"f")),o.removeEventListener("keyup",g(this,De,"f"))},Pd=function(){return g(this,xt,"f").length?g(this,xt,"f").every(t=>t.ariaExpanded==="true"):!0},zi=function(t){let o=t.composedPath();if(this.items.some(a=>a.hasAttribute("tabindex"))){let a=o.find(g(this,z,"f").isItem);if(a)return a}else{if(g(this,z,"f").isItem(t.target)&&t.target.getRootNode()!==this.container.getRootNode()&&"ariaActiveDescendantElement"in HTMLElement.prototype)return t.target;if(t.target instanceof HTMLElement&&t.target.ariaActiveDescendantElement)return t.target.ariaActiveDescendantElement;if(t.type==="click"&&g(this,z,"f").isItem(t.target)&&t.target.id){let a=t.target,c=a.getRootNode();if(c instanceof ShadowRoot&&this.container.getRootNode()===c){let p=this.container,f=a;if(f&&p){if(this.items.includes(f))return f;{let v=Array.from(p?.children??[]).filter(g(this,z,"f").isItem).filter(C=>!C.hidden).indexOf(f);return g(this,ee,"f").filter(C=>!C.hidden)[v]}}}}else{let a=t.target,c=a.getRootNode(),p=a?.getAttribute("aria-controls"),f=g(this,z,"f").isItem(a)?this.container:p?c.getElementById(p):null,C=c.querySelector(`[aria-controls="${f?.id}"][aria-activedescendant]`)?.getAttribute("aria-activedescendant"),w=C&&c.getElementById(C);if(w&&f){if(this.items.includes(w))return w;{let X=Array.from(f?.children??[]).filter(g(this,z,"f").isItem).filter(U=>!U.hidden).indexOf(w);return g(this,ee,"f").filter(U=>!U.hidden)[X]}}let E=f||o.find(X=>X instanceof HTMLElement&&X.role==="listbox");if(E){let U=Array.from(E.children).filter(g(this,z,"f").isItem).findIndex(qo=>o.includes(qo));if(U>=0)return this.items[U]??null}}}return null},Ti=function(t,o=!1){g(this,z,"f").isItemDisabled(t)||(this.multi&&o?this.selected=[...this.selected,t]:this.multi&&g(this,vo,"f").has(t)?this.selected=this.selected.filter(e=>e!==t):this.multi?this.selected=this.selected.concat(t):this.selected=[t])};fa.instances=new WeakMap;import{__classPrivateFieldGet as A,__classPrivateFieldSet as Zc,__decorate as Lh}from"tslib";import{isServer as zh,nothing as Wh}from"lit";Rt();var ga,je,ba,Ei,Ue,ma,Ri,Ne,Id,Hd,$d,re=class l extends Le{static get supportsCrossRootActiveDescendant(){return!zh&&"ariaActiveDescendantElement"in HTMLElement.prototype}static of(t,o){return new l(t,o)}get atFocusedItemIndex(){return super.atFocusedItemIndex}set atFocusedItemIndex(t){super.atFocusedItemIndex=t;let o=this._items.at(this.atFocusedItemIndex);for(let a of this.items)this.options.setItemActive?.(a,a===o);let e=this.options.getActiveDescendantContainer();l.supportsCrossRootActiveDescendant?e&&(e.ariaActiveDescendantElement=o??null):e?.setAttribute("aria-activedescendant",o?.id??""),this.host.requestUpdate()}get controlsElements(){return A(this,Ue,"f")}set controlsElements(t){for(let o of A(this,Ue,"f"))o?.removeEventListener("keydown",this.onKeydown);Zc(this,Ue,t,"f");for(let o of A(this,Ue,"f"))o.addEventListener("keydown",this.onKeydown)}get items(){return this._items}set items(t){let o=this.options.getItemsContainer?.()??this.host;if(!(o instanceof HTMLElement))throw new Error("items container must be an HTMLElement");this.itemsContainerElement=o;let{supportsCrossRootActiveDescendant:e}=l;e||[o].concat(this.controlsElements).concat(t).every((a,c,p)=>a.getRootNode()===p[0].getRootNode())?this._items=t.map(a=>(e||a.id||(a.id=N()),a)):this._items=t?.map(a=>{if(a.removeAttribute("tabindex"),o.contains(a))return a.id||(a.id=N()),A(this,Ei,"f").add(a),A(this,ba,"f").set(a,a),a;{let c=a.cloneNode(!0);return c.id=N(),A(this,je,"f").set(a,c),A(this,ba,"f").set(c,a),A(this,Ne,"f").observe(c,{attributes:!0}),A(this,Ne,"f").observe(a,{attributes:!0}),c}})}constructor(t,o){var e;super(t,o),ga.add(this),this.host=t,this.options=o,je.set(this,new WeakMap),ba.set(this,new WeakMap),Ei.set(this,new WeakSet),Ue.set(this,[]),ma.set(this,!1),Ri.set(this,new MutationObserver(a=>A(this,ga,"m",Hd).call(this,a))),Ne.set(this,new MutationObserver(a=>A(this,ga,"m",$d).call(this,a))),(e=this.options).getItemValue??(e.getItemValue=function(){return this.value})}initItems(){A(this,Ne,"f").disconnect(),super.initItems(),this.controlsElements=this.options.getControlsElements?.()??[],!A(this,ma,"f")&&this.itemsContainerElement&&this.itemsContainerElement.isConnected&&(A(this,Ri,"f").observe(this.itemsContainerElement,{childList:!0}),Zc(this,ma,!0,"f"))}hostDisconnected(){this.controlsElements=[],Zc(this,ma,!1,"f"),A(this,Ri,"f").disconnect(),A(this,Ne,"f").disconnect()}onKeydown(t){!t.ctrlKey&&!t.altKey&&!t.metaKey&&this.atFocusableItems.length&&super.onKeydown(t)}renderItemsToShadowRoot(){return l.supportsCrossRootActiveDescendant?Wh:this.items?.filter(t=>!A(this,Ei,"f").has(t))}};je=new WeakMap,ba=new WeakMap,Ei=new WeakMap,Ue=new WeakMap,ma=new WeakMap,Ri=new WeakMap,Ne=new WeakMap,ga=new WeakSet,Id=function(t,o){let e=A(this,ba,"f").get(o)??A(this,je,"f").get(o),a=o.getAttribute(t),c=e?.getAttribute(t);o.hasAttribute(t)?c!==a&&e?.setAttribute(t,a):e?.removeAttribute(t)},Hd=function(t){for(let{removedNodes:o}of t)for(let e of o)A(this,je,"f").get(e)?.remove(),A(this,je,"f").delete(e)},$d=function(t){for(let{target:o,attributeName:e}of t)e&&A(this,ga,"m",Id).call(this,e,o)};Lh([D],re.prototype,"onKeydown",null);var x,Z,qe,es,So,eo,ha,P,Y,G,Fi,Pi,Qc,ae,Ni,Ii,Nd,Ad,Dd,Od,Jc,Ud,os,At,Ct,jd,Mi,qd,ts,Ve,Hi,ua,$i,Ai,Di,Oi,Ui;function Eh(l,t){let o=l?.closest(t),e=l?.getRootNode(),a=0;for(;a<500&&!o&&l;){if(a++,e=l.getRootNode(),e instanceof ShadowRoot)l=e.host;else if(e instanceof Document)l=document.documentElement;else return null;o=l.closest(t)}return o}function Vd(l){return"value"in l&&typeof l.value=="string"?l.value:""}function Rh(l,t){return!Vd(l).toLowerCase().startsWith(t.toLowerCase())}function Mh(l,t){l.hidden=t}function Fh(l,t){if("value"in l)l.value=t;else return console.warn(`Cannot set value on combobox element ${l.localName}`)}function Ph(l){return"value"in l&&typeof l.value=="string"?l.value:(console.warn(`Cannot get value from combobox element ${l.localName}`),"")}var Dt=class{static of(t,o){return new Z(t,o)}static get supportsCrossRootActiveDescendant(){return re.supportsCrossRootActiveDescendant}get items(){return d(this,So,"f").items}set items(t){d(this,So,"f").items=t}get disabled(){return d(this,So,"f").disabled}set disabled(t){d(this,So,"f").disabled=t}get multi(){return d(this,So,"f").multi}set multi(t){d(this,So,"f").multi=t}get selected(){return d(this,So,"f").selected}set selected(t){d(this,So,"f").selected=t}constructor(t,o){x.add(this),this.host=t,So.set(this,void 0),eo.set(this,void 0),ha.set(this,!1),P.set(this,null),Y.set(this,null),G.set(this,null),Fi.set(this,null),Pi.set(this,new MutationObserver(()=>d(this,x,"m",os).call(this))),Qc.set(this,new Map(Object.entries({dimmed:{en:"dimmed",es:"atenuada",de:"gedimmt",it:"oscurato",fr:"att\xE9nu\xE9",ja:"\u6697\u304F\u306A\u3063\u305F",zh:"\u53D8\u6697"},selected:{en:"selected",es:"seleccionado",de:"ausgew\xE4hlt",fr:"choisie",it:"selezionato",ja:"\u9078\u3070\u308C\u305F",zh:"\u9009"},of:{en:"of",es:"de",de:"von",fr:"sur",it:"di",ja:"\u4EF6\u76EE",zh:"\u7684"}}))),Ve.set(this,()=>{this.options.isExpanded()?d(this,x,"m",Ct).call(this):d(this,x,"m",At).call(this)}),Hi.set(this,e=>{!this.multi&&e.composedPath().some(this.options.isItem)&&d(this,x,"m",Ct).call(this)}),ua.set(this,e=>{if(!(e.ctrlKey||e.shiftKey||!d(this,P,"f")))switch(e.key){case"ArrowDown":case"ArrowUp":this.options.isExpanded()||(ot(this,ha,e.altKey,"f"),d(this,x,"m",At).call(this));break;case"Enter":this.multi||d(this,x,"m",Ct).call(this);break;case"Escape":this.options.isExpanded()||(this.options.setComboboxValue(d(this,P,"f"),""),this.host.requestUpdate()),d(this,x,"m",Ct).call(this);break;case"Alt":case"AltGraph":case"Shift":case"Control":case"Fn":case"Symbol":case"Hyper":case"Super":case"Meta":case"CapsLock":case"FnLock":case"NumLock":case"Tab":case"ScrollLock":case"SymbolLock":case" ":break;default:this.options.isExpanded()||d(this,x,"m",At).call(this)}}),$i.set(this,e=>{if(d(this,P,"f"))switch(e.key){case"ArrowUp":case"ArrowDown":d(this,x,"a",Ni)&&this.options.getComboboxInput()&&m.isSafari&&d(this,x,"m",qd).call(this,d(this,x,"a",Ni));break;default:d(this,x,"m",ts).call(this)}}),Ai.set(this,e=>d(this,x,"a",ae)?d(this,ua,"f").call(this,e):d(this,Ui,"f").call(this,e)),Di.set(this,e=>{if(!d(this,x,"a",ae))switch(e.key){case"Home":case"End":d(this,Ui,"f").call(this,e);break;case"Escape":d(this,x,"m",Ct).call(this),d(this,Y,"f")?.focus();break;case"Enter":case" ":{let a=e.composedPath().find(this.options.isItem);a&&!this.multi&&this.options.isExpanded()&&!this.options.isItemDisabled(a)&&(d(this,x,"m",Ct).call(this),d(this,Y,"f")?.focus())}}}),Oi.set(this,e=>{if(!d(this,x,"a",ae)&&this.options.isExpanded()){let a=d(this,x,"a",Ii)?.getRootNode();(a instanceof ShadowRoot||a instanceof Document)&&!this.items.includes(e.relatedTarget)&&d(this,x,"m",Ct).call(this)}}),Ui.set(this,async e=>{switch(e.key){case"ArrowDown":case"ArrowUp":this.options.isExpanded()||d(this,x,"m",At).call(this);break;case"Home":this.options.isExpanded()||await d(this,x,"m",At).call(this),d(this,eo,"f")&&(d(this,eo,"f").atFocusedItemIndex=0);break;case"End":this.options.isExpanded()||await d(this,x,"m",At).call(this),d(this,eo,"f")&&(d(this,eo,"f").atFocusedItemIndex=this.items.length-1);break;case" ":case"Enter":e.preventDefault(),await d(this,x,"m",jd).call(this),await this.host.updateComplete,this.options.isExpanded()||d(this,Y,"f")?.focus();break}}),t.addController(this),this.options={isItem:Kc,getItemValue:Vd,isItemFiltered:Rh,isItemDisabled:Gc,getComboboxValue:Ph,setComboboxValue:Fh,setItemHidden:Mh,getOrientation:()=>"vertical",...o},ot(this,So,fa.of(t,{isItem:this.options.isItem,getItemsContainer:this.options.getListboxElement,getControlsElements:()=>[this.options.getToggleButton(),this.options.getComboboxInput()].filter(e=>!!e),getATFocusedItem:()=>this.items[d(this,eo,"f")?.atFocusedItemIndex??-1]??null,isItemDisabled:this.options.isItemDisabled,setItemSelected:this.options.setItemSelected}),"f")}async hostConnected(){await this.host.updateComplete,this.hostUpdated()}hostUpdated(){d(this,eo,"f")||d(this,x,"m",Nd).call(this);let t=this.options.isExpanded();d(this,Y,"f")?.setAttribute("aria-expanded",String(t)),d(this,P,"f")?.setAttribute("aria-expanded",String(t)),d(this,x,"a",ae)?d(this,Y,"f")?.setAttribute("tabindex","-1"):d(this,Y,"f")?.removeAttribute("tabindex"),d(this,x,"m",Jc).call(this)}hostDisconnected(){d(this,eo,"f")?.hostDisconnected()}renderItemsToShadowRoot(){return d(this,eo,"f")instanceof re?d(this,eo,"f").renderItemsToShadowRoot():Th}};Z=Dt,So=new WeakMap,eo=new WeakMap,ha=new WeakMap,P=new WeakMap,Y=new WeakMap,G=new WeakMap,Fi=new WeakMap,Pi=new WeakMap,Qc=new WeakMap,Ve=new WeakMap,Hi=new WeakMap,ua=new WeakMap,$i=new WeakMap,Ai=new WeakMap,Di=new WeakMap,Oi=new WeakMap,Ui=new WeakMap,x=new WeakSet,ae=function(){return this.options.getComboboxInput()},Ni=function(){return d(this,eo,"f")?.items.at(Math.max(d(this,eo,"f")?.atFocusedItemIndex??-1,0))??null},Ii=function(){if(this.host instanceof HTMLElement)return this.host;if(this.options.getListboxElement()instanceof HTMLElement)return this.options.getListboxElement()},Nd=async function(){await this.host.updateComplete,d(this,x,"m",Ad).call(this),d(this,x,"m",os).call(this),d(this,x,"m",Dd).call(this),d(this,x,"m",Od).call(this),d(this,x,"m",Jc).call(this),d(this,x,"m",Ud).call(this)},Ad=function(){var t;if(d(this,Pi,"f").disconnect(),d(this,G,"f")?.removeEventListener("focusout",d(this,Oi,"f")),d(this,G,"f")?.removeEventListener("keydown",d(this,Di,"f")),d(this,G,"f")?.removeEventListener("click",d(this,Hi,"f")),ot(this,G,this.options.getListboxElement(),"f"),!d(this,G,"f"))throw new Error("ComboboxController getListboxElement() option must return an element");d(this,G,"f").addEventListener("focusout",d(this,Oi,"f")),d(this,G,"f").addEventListener("keydown",d(this,Di,"f")),d(this,G,"f").addEventListener("click",d(this,Hi,"f")),(t=d(this,G,"f")).id??(t.id=N()),d(this,Pi,"f").observe(d(this,G,"f"),{childList:!0})},Dd=function(){if(d(this,Y,"f")?.removeEventListener("click",d(this,Ve,"f")),d(this,Y,"f")?.removeEventListener("keydown",d(this,Ai,"f")),ot(this,Y,this.options.getToggleButton(),"f"),!d(this,Y,"f"))throw new Error("ComboboxController getToggleButton() option must return an element");ot(this,Fi,d(this,Y,"f").role,"f"),d(this,Y,"f").role="combobox",d(this,Y,"f").setAttribute("aria-controls",d(this,G,"f")?.id??""),d(this,Y,"f").addEventListener("click",d(this,Ve,"f")),d(this,Y,"f").addEventListener("keydown",d(this,Ai,"f"))},Od=function(){if(d(this,P,"f")?.removeEventListener("click",d(this,Ve,"f")),d(this,P,"f")?.removeEventListener("keyup",d(this,$i,"f")),d(this,P,"f")?.removeEventListener("keydown",d(this,ua,"f")),ot(this,P,this.options.getComboboxInput(),"f"),d(this,P,"f")&&!("value"in d(this,P,"f")))throw new Error("ComboboxController getToggleInput() option must return an element with a value property");d(this,P,"f")&&(d(this,P,"f").role="combobox",d(this,Y,"f").role=d(this,Fi,"f"),d(this,P,"f").setAttribute("aria-autocomplete","both"),d(this,P,"f").setAttribute("aria-controls",d(this,G,"f")?.id??""),d(this,P,"f").addEventListener("click",d(this,Ve,"f")),d(this,P,"f").addEventListener("keyup",d(this,$i,"f")),d(this,P,"f").addEventListener("keydown",d(this,ua,"f")))},Jc=function(){let t=m.getLabels(this.host)??d(this,x,"a",Ii)?.ariaLabelledByElements??[],o=this.options.getFallbackLabel()||d(this,x,"a",Ii)?.ariaLabelledByElements?.map(e=>e.textContent).join("")||null;for(let e of[d(this,Y,"f"),d(this,G,"f"),d(this,P,"f")].filter(a=>!!a))"ariaLabelledByElements"in HTMLElement.prototype&&t.filter(a=>!!a).length?e.ariaLabelledByElements=[...t??[]]:e.ariaLabel=o},Ud=function(){d(this,eo,"f")?.hostDisconnected();let{getOrientation:t}=this.options,o=()=>this.items,e=()=>d(this,G,"f");d(this,x,"a",ae)?ot(this,eo,re.of(this.host,{getItems:o,getItemsContainer:e,getOrientation:t,getActiveDescendantContainer:()=>d(this,P,"f"),getControlsElements:()=>[this.options.getToggleButton(),this.options.getComboboxInput()].filter(a=>!!a),setItemActive:this.options.setItemActive}),"f"):ot(this,eo,co.of(this.host,{getItems:o,getItemsContainer:e,getOrientation:t,getControlsElements:()=>[this.options.getToggleButton()].filter(a=>!!a)}),"f")},os=function(){d(this,G,"f")&&(this.items=this.options.getItems())},At=async function(){let t=await this.options.requestShowListbox();d(this,x,"m",ts).call(this),t!==!1&&!d(this,x,"a",ae)&&(d(this,ha,"f")||((d(this,x,"a",Ni)??d(this,eo,"f")?.items.at(0))?.focus(),ot(this,ha,!1,"f")))},Ct=async function(){await this.options.requestHideListbox()},jd=async function(){return this.options.isExpanded()?d(this,x,"m",Ct).call(this):d(this,x,"m",At).call(this)},Mi=function(t,o){return d(this,Qc,"f").get(t)?.[o]??t},qd=function(t){let o=this.options.getItemValue(t);d(Z,Z,"f",qe)?.remove();let e=d(Z,Z,"f",es).content.cloneNode(!0);ot(Z,Z,e.firstElementChild,"f",qe);let a=o,c=Eh(d(this,G,"f"),"[lang]")?.getAttribute("lang")??"en",p=c?.match(Z.langsRE)?.at(0)??"en";this.options.isItemDisabled(t)&&(a+=` (${d(this,x,"m",Mi).call(this,"dimmed",p)})`),d(this,So,"f").isSelected(t)&&(a+=`, (${d(this,x,"m",Mi).call(this,"selected",p)})`),t.hasAttribute("aria-setsize")&&t.hasAttribute("aria-posinset")&&(p==="ja"?a+=`, (${t.getAttribute("aria-setsize")} \u4EF6\u4E2D ${t.getAttribute("aria-posinset")} \u4EF6\u76EE)`:a+=`, (${t.getAttribute("aria-posinset")} ${d(this,x,"m",Mi).call(this,"of",p)} ${t.getAttribute("aria-setsize")})`),d(Z,Z,"f",qe).lang=c,d(Z,Z,"f",qe).innerText=a,document.body.append(d(Z,Z,"f",qe))},ts=function(){if(d(this,P,"f")){let t;for(let o of this.items){let e=!!this.options.isExpanded()&&!!(t=this.options.getComboboxValue(d(this,P,"f")))&&this.options.isItemFiltered?.(o,t)||!1;this.options.setItemHidden(o,e)}}};qe={value:void 0};es={value:document.createElement("template")};Dt.langs=["en","es","de","fr","it","ja","zh"];Dt.langsRE=new RegExp(Z.langs.join("|"));d(Z,Z,"f",es).innerHTML=`
|
|
3015
3015
|
<div role="alert" style="
|
|
3016
3016
|
border: 0;
|
|
3017
3017
|
clip: rect(0, 0, 0, 0);
|
|
@@ -3023,7 +3023,7 @@ svg {
|
|
|
3023
3023
|
white-space: nowrap;
|
|
3024
3024
|
inline-size: 1px;
|
|
3025
3025
|
"></div>
|
|
3026
|
-
`;
|
|
3026
|
+
`;wr();import{LitElement as $h,html as Ah}from"lit";import{customElement as Dh}from"lit/decorators/custom-element.js";import{queryAssignedNodes as Oh}from"lit/decorators/query-assigned-nodes.js";import{property as va}from"lit/decorators/property.js";import{classMap as Uh}from"lit/directives/class-map.js";import{css as Ih}from"lit";var Hh=Ih`:host {
|
|
3027
3027
|
display: block;
|
|
3028
3028
|
}
|
|
3029
3029
|
|
|
@@ -3097,8 +3097,8 @@ slot[name="description"] {
|
|
|
3097
3097
|
margin-inline-end: 0.5em;
|
|
3098
3098
|
}
|
|
3099
3099
|
|
|
3100
|
-
`,
|
|
3101
|
-
<div id="outer" class="${
|
|
3100
|
+
`,Yd=Hh;var _a,Bt,so=class extends $h{constructor(){super(...arguments);this.disabled=!1;this.selected=!1;this.active=!1;this.description="";n(this,_a,void 0);n(this,Bt,m.of(this,{role:"option"}))}get value(){return(i(this,_a)??this.textContent??"").trim()}set value(o){_(this,_a,o)}set posInSet(o){i(this,Bt).ariaPosInSet=`${Math.max(0,o??0)}`}get posInSet(){let o=parseInt(i(this,Bt).ariaPosInSet??"0");return Number.isNaN(o)?null:o}set setSize(o){i(this,Bt).ariaSetSize=`${Math.max(0,o??0)}`}get setSize(){try{let o=parseInt(i(this,Bt).ariaSetSize??"0");return Number.isNaN(o)?0:o}catch{return 0}}render(){let{disabled:o,active:e,selected:a}=this;return Ah`
|
|
3101
|
+
<div id="outer" class="${Uh({active:e,disabled:o,selected:a})}">
|
|
3102
3102
|
<input type="checkbox"
|
|
3103
3103
|
inert
|
|
3104
3104
|
role="presentation"
|
|
@@ -3118,7 +3118,7 @@ slot[name="description"] {
|
|
|
3118
3118
|
</svg>
|
|
3119
3119
|
<slot id="description" name="description">${this.description??""}</slot>
|
|
3120
3120
|
</div>
|
|
3121
|
-
`}selectedChanged(){i(this,
|
|
3121
|
+
`}selectedChanged(){i(this,Bt).ariaSelected=String(!!this.selected)}disabledChanged(){i(this,Bt).ariaDisabled=String(!!this.disabled)}get optionText(){return this._slottedText.map(o=>o.textContent).join("").trim()}};_a=new WeakMap,Bt=new WeakMap,so.styles=[Yd],r([va({type:Boolean,reflect:!0})],so.prototype,"disabled",2),r([va({reflect:!0})],so.prototype,"value",1),r([va({type:Boolean,reflect:!0})],so.prototype,"selected",2),r([va({type:Boolean,reflect:!0})],so.prototype,"active",2),r([va()],so.prototype,"description",2),r([Oh({slot:"",flatten:!0})],so.prototype,"_slottedText",2),r([L("selected")],so.prototype,"selectedChanged",1),r([L("disabled")],so.prototype,"disabledChanged",1),so=r([Dh("pf-option")],so);import{LitElement as Kd,html as Gd}from"lit";import{customElement as Yh}from"lit/decorators/custom-element.js";import{property as rs}from"lit/decorators/property.js";import{css as Nh}from"lit";var jh=Nh`:host {
|
|
3122
3122
|
--pf-c-chip--PaddingTop: var(--pf-global--spacer--xs, 0.25rem);
|
|
3123
3123
|
--pf-c-chip--PaddingRight: var(--pf-global--spacer--sm, 0.5rem);
|
|
3124
3124
|
--pf-c-chip--PaddingBottom: var(--pf-global--spacer--xs, 0.25rem);
|
|
@@ -3218,7 +3218,7 @@ button#outer span {
|
|
|
3218
3218
|
margin: 0 0 0 var(--pf-global--spacer--xs, 0.25rem) !important;
|
|
3219
3219
|
min-width: unset;
|
|
3220
3220
|
}
|
|
3221
|
-
`,
|
|
3221
|
+
`,Xd=jh;import{css as qh}from"lit";var Vh=qh`:host {
|
|
3222
3222
|
--pf-c-chip__c-button--PaddingTop: var(--pf-global--spacer--xs, 0.25rem);
|
|
3223
3223
|
--pf-c-chip__c-button--PaddingRight: var(--pf-global--spacer--sm, 0.5rem);
|
|
3224
3224
|
--pf-c-chip__c-button--PaddingBottom: var(--pf-global--spacer--xs, 0.25rem);
|
|
@@ -3229,13 +3229,13 @@ button#outer span {
|
|
|
3229
3229
|
--pf-c-chip__c-button--FontSize: var(--pf-global--FontSize--xs, 0.75rem);
|
|
3230
3230
|
--pf-c-chip__c-badge--MarginLeft: var(--pf-global--spacer--xs, 0.25rem);
|
|
3231
3231
|
}
|
|
3232
|
-
|
|
3232
|
+
`,ji=Vh;var le=class extends Event{constructor(o){super("remove",{bubbles:!0});this.chip=o}},qi,Zd,yt=class extends Kd{constructor(){super(...arguments);n(this,qi);this.accessibleCloseLabel="Close";this.readonly=!1;this.overflowChip=!1}render(){return this.overflowChip?Gd`
|
|
3233
3233
|
<button id="outer">
|
|
3234
3234
|
<span part="text">
|
|
3235
3235
|
<slot></slot>
|
|
3236
3236
|
</span>
|
|
3237
3237
|
</button>
|
|
3238
|
-
`:
|
|
3238
|
+
`:Gd`
|
|
3239
3239
|
<div id="outer">
|
|
3240
3240
|
<span id="chip-text" part="text">
|
|
3241
3241
|
<slot></slot>
|
|
@@ -3246,9 +3246,9 @@ button#outer span {
|
|
|
3246
3246
|
label="${this.accessibleCloseLabel}"
|
|
3247
3247
|
aria-describedby="chip-text"
|
|
3248
3248
|
?hidden="${this.readonly||this.overflowChip}"
|
|
3249
|
-
@click="${s(this,
|
|
3249
|
+
@click="${s(this,qi,Zd)}"></pf-button>
|
|
3250
3250
|
</div>
|
|
3251
|
-
`}};
|
|
3251
|
+
`}};qi=new WeakSet,Zd=function(){this.dispatchEvent(new le(this))&&this.remove()},yt.styles=[ji,Xd],yt.shadowRootOptions={...Kd.shadowRootOptions,delegatesFocus:!0},r([rs({attribute:"accessible-close-label",type:String})],yt.prototype,"accessibleCloseLabel",2),r([rs({reflect:!0,type:Boolean})],yt.prototype,"readonly",2),r([rs({attribute:"overflow-chip",reflect:!0,type:Boolean})],yt.prototype,"overflowChip",2),yt=r([Yh("pf-chip")],yt);import{css as Xh}from"lit";var Kh=Xh`:host {
|
|
3252
3252
|
font-family: var(--pf-global--FontFamily--sans-serif, "RedHatTextUpdated", "Overpass", overpass, helvetica, arial, sans-serif);
|
|
3253
3253
|
font-size: var(--pf-global--FontSize--md, 16px);
|
|
3254
3254
|
font-weight: var(--pf-global--FontWeight--normal, 400);
|
|
@@ -3627,29 +3627,29 @@ pf-badge {
|
|
|
3627
3627
|
background-color: var(--pf-c-divider--after--BackgroundColor);
|
|
3628
3628
|
flex: 1 0 100%;
|
|
3629
3629
|
}
|
|
3630
|
-
`,
|
|
3630
|
+
`,Qd=Kh;var ns=class extends Event{constructor(){super("change",{bubbles:!0})}},Vi,Ca,Xe,Ke,_o,Yi,af,Ba,cs,Xi,lf,Ki,nf,Gi,cf,ya,ss,k=class extends ef{constructor(){super(...arguments);n(this,Yi);n(this,Ba);n(this,Xi);n(this,Ki);n(this,Gi);n(this,ya);this.variant="single";this.accessibleCurrentSelectionsLabel="Current selections";this.itemsSelectedText="items selected";this.disabled=!1;this.expanded=!1;this.enableFlip=!1;this.position="bottom";this.checkboxSelectionBadgeHidden=!1;n(this,Vi,o=>o!==this._placeholder);n(this,Ca,m.of(this));n(this,Xe,new Xo(this,{content:()=>this._listboxContainer}));n(this,Ke,new T(this,null,"placeholder"));n(this,_o,Dt.of(this,{multi:this.variant==="typeaheadmulti"||this.variant==="checkbox",getItems:()=>this.options,getFallbackLabel:()=>this.accessibleLabel||i(this,Ca).computedLabelText||this.placeholder||i(this,Ke).getSlotted("placeholder").map(o=>o.textContent).join(""),getListboxElement:()=>this._listbox??null,getToggleButton:()=>this._toggleButton??null,getComboboxInput:()=>this._toggleInput??null,isExpanded:()=>this.expanded,requestShowListbox:()=>void(this.expanded||=!0),requestHideListbox:()=>void(this.expanded&&=!1),setItemHidden:(o,e)=>o.id!=="placeholder"&&void(o.hidden=e),isItem:o=>o instanceof so,setItemActive:(o,e)=>o.active=e,setItemSelected:(o,e)=>o.selected=e}))}set selected(o){let e=Array.isArray(o)?o:[o];i(this,_o).selected=e}get selected(){return i(this,_o).selected}get options(){return tu?[]:[this._placeholder,...Array.from(this.querySelectorAll("pf-option"))].filter(o=>!!o&&!o.hidden)}render(){let{disabled:o,expanded:e,variant:a,placeholder:c}=this,{anchor:p="bottom",alignment:f="start",styles:v={}}=i(this,Xe),{height:C,width:w}=this.getBoundingClientRect?.()||{},E=i(this,Yi,af),X=i(this,_o).selected??[],U=a.startsWith("typeahead"),qo=a==="checkbox",ac=E&&"badge",Et=!!(Array.isArray(this.selected)?this.selected.length:this.selected),vl=U&&!Dt.supportsCrossRootActiveDescendant,_l=!c&&i(this,Ke).isEmpty("placeholder");return xa`
|
|
3631
3631
|
<div id="outer"
|
|
3632
|
-
style="${
|
|
3633
|
-
class="${
|
|
3632
|
+
style="${rf(v)}"
|
|
3633
|
+
class="${is({disabled:o,typeahead:U,expanded:e,[p]:!!p,[f]:!!f})}">
|
|
3634
3634
|
<div id="toggle">
|
|
3635
|
-
${U&&
|
|
3635
|
+
${U&&X.length<1?xa`
|
|
3636
3636
|
<pf-chip-group label="${this.accessibleCurrentSelectionsLabel}">
|
|
3637
|
-
${
|
|
3638
|
-
<pf-chip id="chip-${
|
|
3637
|
+
${ru(X,Br=>Br.id,Br=>xa`
|
|
3638
|
+
<pf-chip id="chip-${Br.textContent}"
|
|
3639
3639
|
.readonly="${this.disabled}"
|
|
3640
|
-
@remove="${s(this,
|
|
3640
|
+
@remove="${s(this,Gi,cf).bind(this,Br)}">${Br.textContent}</pf-chip>`)}
|
|
3641
3641
|
</pf-chip-group>`:""}
|
|
3642
|
-
${U?
|
|
3642
|
+
${U?xa`
|
|
3643
3643
|
<input id="toggle-input"
|
|
3644
3644
|
?hidden="${!U}"
|
|
3645
3645
|
?disabled="${o}"
|
|
3646
|
-
placeholder="${c||i(this,
|
|
3646
|
+
placeholder="${c||i(this,Ba,cs)}">`:""}
|
|
3647
3647
|
<button id="toggle-button">
|
|
3648
3648
|
<span id="button-text" style="display: contents;">
|
|
3649
3649
|
<span id="toggle-text"
|
|
3650
|
-
class="${
|
|
3650
|
+
class="${is({"visually-hidden":!!U,badge:ac})}">${i(this,Ba,cs)}</span>${E?xa`
|
|
3651
3651
|
<span id="toggle-badge">
|
|
3652
|
-
<pf-badge number="${
|
|
3652
|
+
<pf-badge number="${X.length}">${X.length}</pf-badge>
|
|
3653
3653
|
</span>`:""}
|
|
3654
3654
|
</span>
|
|
3655
3655
|
<svg viewBox="0 0 320 512"
|
|
@@ -3661,20 +3661,20 @@ pf-badge {
|
|
|
3661
3661
|
</div>
|
|
3662
3662
|
<div id="listbox-container"
|
|
3663
3663
|
?hidden="${!e}"
|
|
3664
|
-
style="${
|
|
3665
|
-
<div id="listbox" class="${
|
|
3664
|
+
style="${rf({marginTop:`${C||0}px`,width:w?`${w}px`:"auto"})}">
|
|
3665
|
+
<div id="listbox" class="${is({checkboxes:qo})}">
|
|
3666
3666
|
<pf-option id="placeholder"
|
|
3667
3667
|
disabled
|
|
3668
|
-
?inert="${
|
|
3669
|
-
aria-hidden="${
|
|
3670
|
-
?hidden="${!c&&i(this,
|
|
3668
|
+
?inert="${_l}"
|
|
3669
|
+
aria-hidden="${au(_l?void 0:String(!!Et))}"
|
|
3670
|
+
?hidden="${!c&&i(this,Ke).isEmpty("placeholder")}"
|
|
3671
3671
|
><slot name="placeholder">${c??""}</slot></pf-option>
|
|
3672
3672
|
${i(this,_o).renderItemsToShadowRoot()}
|
|
3673
|
-
<slot ?hidden="${
|
|
3673
|
+
<slot ?hidden="${vl}"></slot>
|
|
3674
3674
|
</div>
|
|
3675
3675
|
</div>
|
|
3676
3676
|
</div>
|
|
3677
|
-
`}disabledChanged(){i(this,_o).disabled=this.disabled}async expandedChanged(o,e){this.dispatchEvent(new Event(this.expanded?"close":"open"))&&(e?s(this,
|
|
3677
|
+
`}disabledChanged(){i(this,_o).disabled=this.disabled}async expandedChanged(o,e){this.dispatchEvent(new Event(this.expanded?"close":"open"))&&(e?s(this,Xi,lf).call(this):s(this,Ki,nf).call(this))}async selectedChanged(o,e){switch(this.value=e.map(a=>a.value).join(),await this.updateComplete,this.variant){case"single":this.hide(),this._toggleButton?.focus();break;case"typeahead":this._toggleInput.value=this.value}}async variantChanged(){i(this,_o).hostDisconnected(),i(this,_o).multi=this.variant==="typeaheadmulti"||this.variant==="checkbox",i(this,_o).hostConnected(),this.variant==="checkbox"&&Promise.resolve().then(()=>(ls(),tf))}valueChanged(){i(this,Ca).setFormValue(this.value??""),this.dispatchEvent(new ns)}focusChips(){if(this.variant==="typeaheadmulti"&&this._toggleInput?.value){let e=this.shadowRoot?.querySelector(`pf-chip#chip-${this._toggleInput?.value}`);e&&this._chipGroup&&(this._chipGroup.focusOnChip(e),this._toggleInput.value="")}}async show(){this.expanded=!0,await this.updateComplete}async hide(){this.expanded=!1,await this.updateComplete}async toggle(){this.expanded?await this.hide():await this.show()}};Vi=new WeakMap,Ca=new WeakMap,Xe=new WeakMap,Ke=new WeakMap,_o=new WeakMap,Yi=new WeakSet,af=function(){return this.variant==="checkbox"&&!this.checkboxSelectionBadgeHidden},Ba=new WeakSet,cs=function(){let{selected:o}=i(this,_o);switch(this.variant){case"typeaheadmulti":return`${o?.length??0} ${this.itemsSelectedText}`;case"checkbox":return s(this,ya,ss).call(this)||"Options";default:return(o?this.value:"")||s(this,ya,ss).call(this)||"Select a value"}},Xi=new WeakSet,lf=async function(){try{return await i(this,Xe).show({placement:this.position||"bottom",flip:!!this.enableFlip}),!0}catch{return!1}},Ki=new WeakSet,nf=async function(){try{return await i(this,Xe).hide(),!0}catch{return!1}},Gi=new WeakSet,cf=function(o,e){e instanceof le&&(o.selected=!1,this._toggleInput?.focus())},ya=new WeakSet,ss=function(){return this.placeholder||this.querySelector?.("[slot=placeholder]")?.assignedNodes()?.reduce((o,e)=>`${o}${e.textContent}`,"")?.trim()||i(this,_o).items.filter(i(this,Vi)).at(0)?.value||""},k.styles=[Qd],k.formAssociated=!0,k.shadowRootOptions={...ef.shadowRootOptions,delegatesFocus:!0},r([Lo()],k.prototype,"variant",2),r([Lo({attribute:"accessible-label"})],k.prototype,"accessibleLabel",2),r([Lo({attribute:"accessible-current-selections-label"})],k.prototype,"accessibleCurrentSelectionsLabel",2),r([Lo({attribute:"items-selected-text"})],k.prototype,"itemsSelectedText",2),r([Lo({type:Boolean,reflect:!0})],k.prototype,"disabled",2),r([Lo({type:Boolean,reflect:!0})],k.prototype,"expanded",2),r([Lo({attribute:"enable-flip",type:Boolean})],k.prototype,"enableFlip",2),r([Lo()],k.prototype,"value",2),r([Lo()],k.prototype,"placeholder",2),r([Lo({reflect:!0})],k.prototype,"position",2),r([Lo({attribute:"checkbox-selection-badge-hidden",type:Boolean})],k.prototype,"checkboxSelectionBadgeHidden",2),r([Ye("pf-chip-group")],k.prototype,"_chipGroup",2),r([Ye("#toggle-input")],k.prototype,"_toggleInput",2),r([Ye("#toggle-button")],k.prototype,"_toggleButton",2),r([Ye("#listbox")],k.prototype,"_listbox",2),r([Ye("#listbox-container")],k.prototype,"_listboxContainer",2),r([Ye("#placeholder")],k.prototype,"_placeholder",2),r([Lo({hasChanged:(o,e)=>!Ae(o,e)})],k.prototype,"selected",1),r([L("disabled")],k.prototype,"disabledChanged",1),r([L("expanded")],k.prototype,"expandedChanged",1),r([L("selected")],k.prototype,"selectedChanged",1),r([L("variant")],k.prototype,"variantChanged",1),r([L("value")],k.prototype,"valueChanged",1),r([L("variant"),L("value")],k.prototype,"focusChips",1),k=r([eu("pf-select")],k);import{LitElement as nu,html as cu}from"lit";import{classMap as pf}from"lit/directives/class-map.js";import{customElement as su}from"lit/decorators/custom-element.js";import{property as df}from"lit/decorators/property.js";import{css as lu}from"lit";var iu=lu`:host {
|
|
3678
3678
|
display: block;
|
|
3679
3679
|
border-bottom: 1px solid var(--pf-global--BorderColor--100, #d2d2d2);
|
|
3680
3680
|
}
|
|
@@ -3699,14 +3699,14 @@ slot[name="label"] {
|
|
|
3699
3699
|
color: var(--pf-global--Color--dark-200, #6a6e73);
|
|
3700
3700
|
padding: var(--pf-global--spacer--md, 1rem) var(--pf-global--spacer--md, 1rem) 0;
|
|
3701
3701
|
}
|
|
3702
|
-
`,
|
|
3702
|
+
`,sf=iu;var ps,ie=class extends nu{constructor(){super(...arguments);this.disabled=!1;n(this,ps,m.of(this,{role:"group"}))}render(){let{disabled:o}=this;return cu`
|
|
3703
3703
|
<div id="label-container"
|
|
3704
3704
|
role="presentation">
|
|
3705
|
-
<slot class="${
|
|
3705
|
+
<slot class="${pf({disabled:o})}"
|
|
3706
3706
|
name="label">${this.label}</slot>
|
|
3707
3707
|
</div>
|
|
3708
|
-
<slot class="${
|
|
3709
|
-
`}};
|
|
3708
|
+
<slot class="${pf({disabled:o})}"></slot>
|
|
3709
|
+
`}};ps=new WeakMap,ie.styles=[sf],r([df()],ie.prototype,"label",2),r([df({type:Boolean,reflect:!0})],ie.prototype,"disabled",2),ie=r([su("pf-option-group")],ie);import{LitElement as uu,html as vu}from"lit";import{customElement as _u}from"lit/decorators/custom-element.js";import{property as ds}from"lit/decorators/property.js";import{css as pu}from"lit";var du=pu`[hidden] {
|
|
3710
3710
|
display: none !important;
|
|
3711
3711
|
}
|
|
3712
3712
|
|
|
@@ -3934,7 +3934,7 @@ slot[name="label"] {
|
|
|
3934
3934
|
grid-template-columns: var(--pf-c-progress-stepper--m-compact--GridTemplateColumns);
|
|
3935
3935
|
grid-auto-flow: var(--pf-c-progress-stepper--m-compact--GridAutoFlow);
|
|
3936
3936
|
}
|
|
3937
|
-
`,
|
|
3937
|
+
`,ff=du;import{LitElement as gu,html as bu}from"lit";import{customElement as hu}from"lit/decorators/custom-element.js";import{property as ka}from"lit/decorators/property.js";import{ifDefined as gf}from"lit/directives/if-defined.js";import{classMap as bf}from"lit/directives/class-map.js";import{css as fu}from"lit";var mu=fu`[hidden] {
|
|
3938
3938
|
display: none !important;
|
|
3939
3939
|
}
|
|
3940
3940
|
|
|
@@ -4058,19 +4058,19 @@ slot[name="label"] {
|
|
|
4058
4058
|
--pf-c-progress-stepper__step-title--m-help-text--hover--TextDecorationColor: var(--pf-c-progress-stepper__step--m-danger__step-title--m-help-text--hover--TextDecorationColor);
|
|
4059
4059
|
--pf-c-progress-stepper__step-title--m-help-text--focus--TextDecorationColor: var(--pf-c-progress-stepper__step--m-danger__step-title--m-help-text--focus--TextDecorationColor);
|
|
4060
4060
|
}
|
|
4061
|
-
`,
|
|
4062
|
-
<div id="connector" class="${
|
|
4061
|
+
`,mf=mu;var hf=new Map(Object.entries({success:{icon:"check-circle"},danger:{icon:"exclamation-circle"},warning:{icon:"exclamation-triangle"},info:{icon:"resources-full",set:"patternfly"}})),Zi,Qi,Io=class extends gu{constructor(){super(...arguments);this.current=!1;n(this,Zi,new T(this,"title","description"));n(this,Qi,m.of(this,{role:"listitem"}))}render(){let o=!!(this.description??i(this,Zi).hasSlotted("description")),e=this.icon??hf.get(this.variant??"default")?.icon,a=this.iconSet??hf.get(this.variant??"default")?.set,{parentTagName:c}=this.constructor,{compact:p=!1}=this.closest?.(c)??{};return bu`
|
|
4062
|
+
<div id="connector" class="${bf({compact:p})}">
|
|
4063
4063
|
<slot id="icon" name="icon">
|
|
4064
4064
|
<pf-icon ?hidden="${!e}"
|
|
4065
|
-
icon="${
|
|
4066
|
-
set="${
|
|
4065
|
+
icon="${gf(e)}"
|
|
4066
|
+
set="${gf(a)}"></pf-icon>
|
|
4067
4067
|
</slot>
|
|
4068
4068
|
</div>
|
|
4069
|
-
<div id="main" class="${
|
|
4069
|
+
<div id="main" class="${bf({compact:p})}">
|
|
4070
4070
|
<slot id="title"></slot>
|
|
4071
4071
|
<slot id="description" name="description" ?hidden="${!o}">${this.description}</slot>
|
|
4072
4072
|
</div>
|
|
4073
|
-
`}updated(o){o.has("current")&&(i(this,
|
|
4073
|
+
`}updated(o){o.has("current")&&(i(this,Qi).ariaCurrent=String(!!this.current))}};Zi=new WeakMap,Qi=new WeakMap,Io.parentTagName="pf-progress-stepper",Io.styles=[mf],r([ka()],Io.prototype,"description",2),r([ka()],Io.prototype,"icon",2),r([ka({attribute:"icon-set"})],Io.prototype,"iconSet",2),r([ka({reflect:!0})],Io.prototype,"variant",2),r([ka({type:Boolean,reflect:!0})],Io.prototype,"current",2),Io=r([hu("pf-progress-step")],Io);ko();var Ji,on,tn,uf,tt=class extends uu{constructor(){super();n(this,tn);this.vertical=!1;this.center=!1;this.compact=!1;n(this,Ji,m.of(this,{role:"progressbar",ariaValueNow:this.value.toString()}));n(this,on,new MutationObserver(()=>s(this,tn,uf).call(this)));i(this,on).observe(this,{childList:!0})}get value(){let{childTagName:o}=this.constructor,e=this.querySelectorAll?.(o)??[],a=this.querySelector?.(`${o}[current]`);return(Array.from(e).indexOf(a)+1)/e.length*100}render(){return vu`<div role="listbox" style="display:contents;"><slot></slot></div>`}updated(o){o.has("compact")&&this.querySelectorAll?.("pf-progress-step").forEach(e=>e.requestUpdate())}};Ji=new WeakMap,on=new WeakMap,tn=new WeakSet,uf=function(){i(this,Ji).ariaValueNow=this.value.toString()},tt.childTagName="pf-progress-step",tt.styles=[ff],tt.formAssociated=!0,r([ds({type:Boolean,reflect:!0})],tt.prototype,"vertical",2),r([ds({type:Boolean,reflect:!0})],tt.prototype,"center",2),r([ds({type:Boolean,reflect:!0})],tt.prototype,"compact",2),tt=r([_u("pf-progress-stepper")],tt);import{LitElement as Bu,html as en}from"lit";import{classMap as yu}from"lit/directives/class-map.js";import{customElement as ku}from"lit/decorators/custom-element.js";import{property as Ot}from"lit/decorators/property.js";import{ifDefined as wu}from"lit/directives/if-defined.js";import{styleMap as Su}from"lit/directives/style-map.js";import{css as xu}from"lit";var Cu=xu`* {
|
|
4074
4074
|
box-sizing: border-box;
|
|
4075
4075
|
}
|
|
4076
4076
|
|
|
@@ -4280,21 +4280,21 @@ progress[value]::-webkit-progress-value {
|
|
|
4280
4280
|
pf-tooltip {
|
|
4281
4281
|
height: 0.01px;
|
|
4282
4282
|
}
|
|
4283
|
-
`,
|
|
4284
|
-
<div id="container" class="${
|
|
4283
|
+
`,vf=Cu;var Lu=new Map(Object.entries({success:{icon:"circle-check"},danger:{icon:"circle-xmark"},warning:{icon:"triangle-exclamation"}})),rn,wa,fs,Sa,ms,xo=class extends Bu{constructor(){super(...arguments);n(this,wa);n(this,Sa);n(this,rn,this.attachInternals());this.value=0;this.descriptionTruncated=!1;this.max=100;this.min=0}willUpdate(o){(o.has("value")||o.has("min")||o.has("max"))&&(i(this,rn).ariaValueNow=i(this,wa,fs).toString()),i(this,Sa,ms)&&Promise.resolve().then(()=>(ko(),Ic)),this.descriptionTruncated&&Promise.resolve().then(()=>(Sl(),hp))}render(){let{size:o,measureLocation:e,variant:a,description:c,descriptionTruncated:p}=this,f=i(this,Sa,ms),v=c?.length===0,C=i(this,wa,fs),w=`${C}%`;return en`
|
|
4284
|
+
<div id="container" class="${yu({[o??""]:!!o,[e??""]:!!e,[a??""]:!!a,singleLine:v,descriptionTruncated:p})}">
|
|
4285
4285
|
|
|
4286
4286
|
<div id="description" aria-hidden="true">${c??""}</div>
|
|
4287
4287
|
|
|
4288
|
-
${p?
|
|
4288
|
+
${p?en`
|
|
4289
4289
|
<pf-tooltip content="${this.description??""}"
|
|
4290
4290
|
trigger="description"></pf-tooltip>
|
|
4291
4291
|
`:""}
|
|
4292
4292
|
|
|
4293
|
-
${e==="none"?"":
|
|
4293
|
+
${e==="none"?"":en`
|
|
4294
4294
|
<div id="status" aria-hidden="true">
|
|
4295
|
-
${e!=="inside"?"":
|
|
4295
|
+
${e!=="inside"?"":w}
|
|
4296
4296
|
<pf-icon set="fas"
|
|
4297
|
-
icon="${
|
|
4297
|
+
icon="${wu(f)}"
|
|
4298
4298
|
size="md"
|
|
4299
4299
|
?hidden="${!f}"
|
|
4300
4300
|
></pf-icon>
|
|
@@ -4303,18 +4303,18 @@ pf-tooltip {
|
|
|
4303
4303
|
|
|
4304
4304
|
<progress id="progress"
|
|
4305
4305
|
max="100"
|
|
4306
|
-
value="${
|
|
4306
|
+
value="${C}"
|
|
4307
4307
|
aria-valuemin="0"
|
|
4308
|
-
aria-valuenow="${
|
|
4308
|
+
aria-valuenow="${C}"
|
|
4309
4309
|
aria-valuemax="100"
|
|
4310
4310
|
></progress>
|
|
4311
4311
|
|
|
4312
|
-
${e!=="inside"?"":
|
|
4312
|
+
${e!=="inside"?"":en`
|
|
4313
4313
|
<span id="progress-span"
|
|
4314
|
-
style="${
|
|
4315
|
-
data-value="${
|
|
4314
|
+
style="${Su({width:w})}"
|
|
4315
|
+
data-value="${w}"></span>
|
|
4316
4316
|
`}
|
|
4317
|
-
</div>`}};
|
|
4317
|
+
</div>`}};rn=new WeakMap,wa=new WeakSet,fs=function(){let{value:o,min:e,max:a}=this,c=Math.round((o-e)/(a-e)*100);return Number.isNaN(c)||c<0?0:Math.min(c,100)},Sa=new WeakSet,ms=function(){return Lu.get(this.variant??"")?.icon},xo.styles=[vf],r([Ot({reflect:!0,type:Number})],xo.prototype,"value",2),r([Ot()],xo.prototype,"description",2),r([Ot({type:Boolean,reflect:!0,attribute:"description-truncated"})],xo.prototype,"descriptionTruncated",2),r([Ot({type:Number,reflect:!0})],xo.prototype,"max",2),r([Ot({type:Number,reflect:!0})],xo.prototype,"min",2),r([Ot()],xo.prototype,"size",2),r([Ot({attribute:"measure-location"})],xo.prototype,"measureLocation",2),r([Ot()],xo.prototype,"variant",2),xo=r([ku("pf-progress")],xo);wr();import{LitElement as Tu,nothing as Eu,html as wt,isServer as gs}from"lit";import{customElement as Ru}from"lit/decorators/custom-element.js";import{property as ro}from"lit/decorators/property.js";import{query as bs}from"lit/decorators/query.js";import{styleMap as Mu}from"lit/directives/style-map.js";import{classMap as Fu}from"lit/directives/class-map.js";import{ifDefined as xf}from"lit/directives/if-defined.js";Rt();Sr();import{css as zu}from"lit";var Wu=zu`:host {
|
|
4318
4318
|
display: inline;
|
|
4319
4319
|
--_floating-arrow-size: var(--pf-c-popover__arrow--Width, var(--pf-global--arrow--width-lg, 1.5625rem));
|
|
4320
4320
|
--_header-text-color: var(--pf-c-popover__title-text--Color, inherit);
|
|
@@ -4505,21 +4505,21 @@ pf-tooltip {
|
|
|
4505
4505
|
--_header-icon-color: var(--pf-c-popover--m-danger__title-icon--Color, var(--pf-global--danger-color--100, #c9190b));
|
|
4506
4506
|
--_header-text-color: var(--pf-c-popover--m-danger__title-text--Color, var(--pf-global--danger-color--200, #a30000));
|
|
4507
4507
|
}
|
|
4508
|
-
`,
|
|
4509
|
-
<slot id="heading" name="heading" part="heading" ?hidden=${!p}>${
|
|
4510
|
-
`,
|
|
4508
|
+
`,_f=Wu;var hs=class extends To{constructor(){super("hide")}},us=class extends To{constructor(){super("hidden")}},vs=class extends To{constructor(){super("show")}},_s=class extends To{constructor(){super("shown")}},Ge,Co,ne,Ze,an,Cf,La,xs,St,ln,Bf,B=class extends Tu{constructor(){super();n(this,an);n(this,La);n(this,ln);this.position="top";this.noFlip=!1;n(this,Ge,!0);n(this,Co,null);n(this,ne,new Xo(this,{content:()=>this._popover,arrow:()=>this._arrow,invoker:()=>i(this,Co)||this._slottedTrigger}));n(this,Ze,new T(this,null,"icon","heading","body","footer"));n(this,St,o=>{switch(o.key){case"Escape":case"Esc":o.preventDefault(),this.hide();return;case"Enter":(o.target===i(this,Co)||o.target===this._slottedTrigger)&&(o.preventDefault(),this.show());return}});gs||this.addEventListener("keydown",i(this,St))}render(){let{alignment:o,anchor:e,styles:a}=i(this,ne),c=i(this,Ze).hasSlotted("footer")||!!this.footer,p=i(this,Ze).hasSlotted("heading")||!!this.heading,f=i(this,Ze).hasSlotted("icon")||!!this.icon||!!this.alertSeverity,v=wt`<h6>${this.heading??""}</h6>`;switch(this.headingLevel){case 2:v=wt`<h2>${this.heading??""}</h2>`;break;case 3:v=wt`<h3>${this.heading??""}</h3>`;break;case 4:v=wt`<h4>${this.heading??""}</h4>`;break;case 5:v=wt`<h5>${this.heading??""}</h5>`;break}let C=wt`
|
|
4509
|
+
<slot id="heading" name="heading" part="heading" ?hidden=${!p}>${v}</slot>
|
|
4510
|
+
`,w=this.icon??B.alertIcons.get(this.alertSeverity)??"";return wt`
|
|
4511
4511
|
<div id="container"
|
|
4512
|
-
style="${
|
|
4513
|
-
class="${
|
|
4512
|
+
style="${Mu(a)}"
|
|
4513
|
+
class="${Fu({[e]:!!e,[o]:!!o})}">
|
|
4514
4514
|
<slot id="trigger"
|
|
4515
|
-
@slotchange="${s(this,
|
|
4516
|
-
@keydown="${i(this,
|
|
4515
|
+
@slotchange="${s(this,La,xs)}"
|
|
4516
|
+
@keydown="${i(this,St)}"
|
|
4517
4517
|
@click="${this.toggle}"></slot>
|
|
4518
4518
|
<dialog id="popover"
|
|
4519
|
-
?hidden="${i(this,
|
|
4519
|
+
?hidden="${i(this,Ge)}"
|
|
4520
4520
|
aria-labelledby="heading"
|
|
4521
4521
|
aria-describedby="body"
|
|
4522
|
-
aria-label=${
|
|
4522
|
+
aria-label=${xf(this.label)}>
|
|
4523
4523
|
<div id="arrow"></div>
|
|
4524
4524
|
<div id="content" part="content">
|
|
4525
4525
|
<pf-button id="close-button"
|
|
@@ -4527,24 +4527,24 @@ pf-tooltip {
|
|
|
4527
4527
|
plain
|
|
4528
4528
|
label="${this.accessibleCloseLabel??this.closeButtonLabel??"Close popover"}"
|
|
4529
4529
|
@click="${this.hide}"
|
|
4530
|
-
@keydown="${i(this,
|
|
4530
|
+
@keydown="${i(this,St)}"
|
|
4531
4531
|
?hidden="${this.hideClose}">
|
|
4532
4532
|
<svg fill="currentColor" height="1em" width="1em" viewBox="0 0 352 512">
|
|
4533
4533
|
<path d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"/>
|
|
4534
4534
|
</svg>
|
|
4535
4535
|
</pf-button>
|
|
4536
|
-
${p&&f?
|
|
4536
|
+
${p&&f?wt`
|
|
4537
4537
|
<header part="header">
|
|
4538
4538
|
<span part="icon">
|
|
4539
4539
|
<slot name="icon">
|
|
4540
|
-
<pf-icon icon="${
|
|
4541
|
-
set="${
|
|
4540
|
+
<pf-icon icon="${w}"
|
|
4541
|
+
set="${xf(this.iconSet)}"
|
|
4542
4542
|
size="md"></pf-icon>
|
|
4543
4543
|
</slot>
|
|
4544
|
-
</span>${this.alertSeverity?
|
|
4545
|
-
<span class="visually-hidden">${this.alertSeverityText??`${this.alertSeverity} alert:`}</span>`:
|
|
4546
|
-
${
|
|
4547
|
-
</header>`:
|
|
4544
|
+
</span>${this.alertSeverity?wt`
|
|
4545
|
+
<span class="visually-hidden">${this.alertSeverityText??`${this.alertSeverity} alert:`}</span>`:Eu}
|
|
4546
|
+
${C}
|
|
4547
|
+
</header>`:C}
|
|
4548
4548
|
<slot id="body" part="body" name="body">${this.body??""}</slot>
|
|
4549
4549
|
<footer part="footer" ?hidden=${!c}>
|
|
4550
4550
|
<slot name="footer">${this.footer}</slot>
|
|
@@ -4552,7 +4552,7 @@ pf-tooltip {
|
|
|
4552
4552
|
</div>
|
|
4553
4553
|
</dialog>
|
|
4554
4554
|
</div>
|
|
4555
|
-
`}disconnectedCallback(){super.disconnectedCallback(),
|
|
4555
|
+
`}disconnectedCallback(){super.disconnectedCallback(),B.instances.delete(this),i(this,Co)?.removeEventListener("click",this.toggle),i(this,Co)?.removeEventListener("keydown",i(this,St))}willUpdate(o){o.has("trigger")&&s(this,La,xs).call(this)}async toggle(){i(this,ne).open?this.hide():this.show()}async show(){_(this,Ge,!1),this.requestUpdate(),this.dispatchEvent(new vs),await this.updateComplete,await i(this,ne).show({offset:this.distance??25,placement:this.position,flip:!this.noFlip,fallbackPlacements:this.flipBehavior}),this._popover?.show(),this.dispatchEvent(new _s),B.instances.add(this)}async hide(){this.dispatchEvent(new hs),await i(this,ne).hide(),this._popover?.close(),this.dispatchEvent(new us),B.instances.delete(this),_(this,Ge,!0),this.requestUpdate()}};Ge=new WeakMap,Co=new WeakMap,ne=new WeakMap,Ze=new WeakMap,an=new WeakSet,Cf=function(){return gs||!this.trigger?null:this.getRootNode().getElementById(this.trigger)},La=new WeakSet,xs=function(){let o=i(this,Co);_(this,Co,s(this,an,Cf).call(this)),o!==i(this,Co)&&(o?.removeEventListener("click",this.toggle),o?.removeEventListener("keydown",i(this,St)),i(this,Co)?.addEventListener("click",this.toggle),i(this,Co)?.addEventListener("keydown",i(this,St)))},St=new WeakMap,ln=new WeakSet,Bf=function(o){let e=o.composedPath();!e.includes(this)&&!e.includes(i(this,Co))&&this.hide()},B.styles=[_f],B.instances=new Set,B.alertIcons=new Map(Object.entries({default:"bell",info:"circle-info",success:"circle-check",warning:"triangle-exclamation",danger:"circle-exclamation"})),gs||document.addEventListener("click",function(o){var e;for(let a of B.instances)a.noOutsideClick||s(e=a,ln,Bf).call(e,o)}),r([ro({reflect:!0})],B.prototype,"position",2),r([ro({reflect:!0})],B.prototype,"heading",2),r([ro({reflect:!0})],B.prototype,"body",2),r([ro({reflect:!0})],B.prototype,"footer",2),r([ro({reflect:!0})],B.prototype,"icon",2),r([ro({reflect:!0})],B.prototype,"label",2),r([ro({type:Number,reflect:!0})],B.prototype,"distance",2),r([ro({attribute:"flip-behavior",converter:yl})],B.prototype,"flipBehavior",2),r([ro({type:Boolean,reflect:!0,attribute:"no-flip"})],B.prototype,"noFlip",2),r([ro({type:Number,reflect:!0,attribute:"heading-level"})],B.prototype,"headingLevel",2),r([ro({reflect:!0,attribute:"icon-set"})],B.prototype,"iconSet",2),r([ro({type:Boolean,reflect:!0,attribute:"hide-close"})],B.prototype,"hideClose",2),r([ro({reflect:!0,attribute:"alert-severity"})],B.prototype,"alertSeverity",2),r([ro({reflect:!0,attribute:"accessible-close-label"})],B.prototype,"accessibleCloseLabel",2),r([Hp({alias:"accessible-close-label",attribute:"close-label"})],B.prototype,"closeButtonLabel",2),r([ro({reflect:!0,attribute:"alert-severity-text"})],B.prototype,"alertSeverityText",2),r([ro({type:Boolean,reflect:!0,attribute:"no-outside-click"})],B.prototype,"noOutsideClick",2),r([ro({reflect:!0})],B.prototype,"trigger",2),r([bs("#popover")],B.prototype,"_popover",2),r([bs("#trigger")],B.prototype,"_slottedTrigger",2),r([bs("#arrow")],B.prototype,"_arrow",2),r([D],B.prototype,"toggle",1),r([D],B.prototype,"show",1),r([D],B.prototype,"hide",1),B=r([Ru("pf-popover")],B);import{LitElement as Hu,html as $u}from"lit";import{customElement as Au}from"lit/decorators/custom-element.js";import{property as kf}from"lit/decorators/property.js";import{css as Pu}from"lit";var Iu=Pu`:host {
|
|
4556
4556
|
/* NB: upstream sets these on the container, which is why we do not use fallbacks here. */
|
|
4557
4557
|
--pf-c-panel--Width: auto;
|
|
4558
4558
|
--pf-c-panel--MinWidth: auto;
|
|
@@ -4722,7 +4722,7 @@ hr::after {
|
|
|
4722
4722
|
::slotted(:is(p, h1, h2, h3, h4, h5, h6):is(:last-of-type, :first-of-type)) {
|
|
4723
4723
|
margin-block: 0;
|
|
4724
4724
|
}
|
|
4725
|
-
`,
|
|
4725
|
+
`,yf=Iu;var za,ce=class extends Hu{constructor(){super(...arguments);this.scrollable=!1;n(this,za,new T(this,"header",null,"footer"))}render(){let o=i(this,za).hasSlotted("header"),e=i(this,za).hasSlotted("footer");return $u`
|
|
4726
4726
|
<header>
|
|
4727
4727
|
<slot name="header" ?hidden="${!o}"></slot>
|
|
4728
4728
|
</header>
|
|
@@ -4731,7 +4731,7 @@ hr::after {
|
|
|
4731
4731
|
<footer>
|
|
4732
4732
|
<slot name="footer" ?hidden="${!e}"></slot>
|
|
4733
4733
|
</footer>
|
|
4734
|
-
`}};
|
|
4734
|
+
`}};za=new WeakMap,ce.styles=[yf],r([kf({type:Boolean,reflect:!0})],ce.prototype,"scrollable",2),r([kf({reflect:!0})],ce.prototype,"variant",2),ce=r([Au("pf-panel")],ce);Sr();import{LitElement as Sf,html as Uu}from"lit";import{customElement as Nu}from"lit/decorators/custom-element.js";import{property as nn}from"lit/decorators/property.js";import{query as Cs}from"lit/decorators/query.js";import{ifDefined as Lf}from"lit/directives/if-defined.js";import{classMap as ju}from"lit/directives/class-map.js";import{css as Du}from"lit";var Ou=Du`:host {
|
|
4735
4735
|
display: block;
|
|
4736
4736
|
position: relative;
|
|
4737
4737
|
--_spacer-align-top: var(--pf-c-modal-box--m-align-top--spacer,
|
|
@@ -4915,18 +4915,18 @@ footer {
|
|
|
4915
4915
|
align-items: center;
|
|
4916
4916
|
gap: var(--pf-global--spacer--xl, 0.5rem);
|
|
4917
4917
|
}
|
|
4918
|
-
`,
|
|
4918
|
+
`,wf=Ou;var Bs=class extends To{constructor(){super("cancel")}},ys=class extends To{constructor(){super("close")}},ks=class extends To{constructor(o){super("open");this.trigger=o}},Qe,no,se,Wa,pe,Je,or,M=class extends Sf{constructor(){super(...arguments);this.open=!1;this.returnValue="";n(this,Qe,N());n(this,no,null);n(this,se,null);n(this,Wa,[]);n(this,pe,[]);n(this,Je,!1);n(this,or,new T(this,null,"header","description","footer"))}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.onKeydown),this.addEventListener("click",this.onClick)}render(){let o=i(this,se)||i(this,pe).length?i(this,Qe):void 0,e=i(this,no)?i(this,no).innerText:void 0,a=i(this,or).hasSlotted("header"),c=i(this,or).hasSlotted("description"),p=i(this,or).hasSlotted("footer");return Uu`
|
|
4919
4919
|
<section ?hidden=${!this.open}>
|
|
4920
4920
|
<div id="overlay" part="overlay" ?hidden=${!this.open}></div>
|
|
4921
4921
|
<div id="dialog"
|
|
4922
4922
|
part="dialog"
|
|
4923
4923
|
tabindex="0"
|
|
4924
4924
|
role="dialog"
|
|
4925
|
-
aria-labelledby=${
|
|
4926
|
-
aria-label=${
|
|
4925
|
+
aria-labelledby=${Lf(o)}
|
|
4926
|
+
aria-label=${Lf(e)}
|
|
4927
4927
|
?hidden="${!this.open}">
|
|
4928
4928
|
<div id="container">
|
|
4929
|
-
<div id="content" part="content" class=${
|
|
4929
|
+
<div id="content" part="content" class=${ju({hasHeader:a,hasDescription:c,hasFooter:p})}>
|
|
4930
4930
|
<header part="header">
|
|
4931
4931
|
<slot name="header"></slot>
|
|
4932
4932
|
<div part="description" ?hidden=${!c}>
|
|
@@ -4950,7 +4950,7 @@ footer {
|
|
|
4950
4950
|
</div>
|
|
4951
4951
|
</div>
|
|
4952
4952
|
</section>
|
|
4953
|
-
`}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.onKeydown),i(this,
|
|
4953
|
+
`}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.onKeydown),i(this,no)?.removeEventListener("click",this.onTriggerClick)}async _init(){await this.updateComplete,_(this,se,this.querySelector('[slot$="header"]')),_(this,Wa,[...this.querySelectorAll("*:not([slot])")]),_(this,pe,i(this,Wa).filter(o=>o.tagName.slice(0,1)==="H")),i(this,no)&&(i(this,no).addEventListener("click",this.onTriggerClick),this.removeAttribute("hidden")),i(this,se)?i(this,se).id=i(this,Qe):i(this,pe).length>0&&(i(this,pe)[0].id=i(this,Qe))}async openChanged(o,e){o==null||e==null||o==e||(this.open?(document.body.style.overflow="hidden",await this.updateComplete,this.dialog?.focus(),this.dispatchEvent(new ks(i(this,no)))):(document.body.style.overflow="auto",await this.updateComplete,i(this,no)&&i(this,no).focus(),this.dispatchEvent(i(this,Je)?new Bs:new ys)))}triggerChanged(){this.trigger&&(_(this,no,this.getRootNode().getElementById(this.trigger)),i(this,no)?.addEventListener("click",this.onTriggerClick))}onTriggerClick(o){o.preventDefault(),this.showModal()}onClick(o){let{open:e,overlay:a,dialog:c}=this;if(e){let p=o.composedPath(),{closeOnOutsideClick:f}=this.constructor;f&&p.includes(a)&&!p.includes(c)&&(o.preventDefault(),this.cancel())}}onKeydown(o){switch(o.key){case"Tab":o.target===this.closeButton&&(o.preventDefault(),this.dialog?.focus());return;case"Escape":case"Esc":o.preventDefault(),this.cancel();return;case"Enter":o.target===i(this,no)&&(o.preventDefault(),this.showModal());return}}async cancel(){_(this,Je,!0),this.open=!1,await this.updateComplete,_(this,Je,!1)}setTrigger(o){_(this,no,o),i(this,no).addEventListener("click",this.onTriggerClick)}toggle(){this.open=!this.open}show(){this.open=!0}showModal(){this.show()}close(o){typeof o=="string"&&(this.returnValue=o),this.open=!1}};Qe=new WeakMap,no=new WeakMap,se=new WeakMap,Wa=new WeakMap,pe=new WeakMap,Je=new WeakMap,or=new WeakMap,M.shadowRootOptions={...Sf.shadowRootOptions,delegatesFocus:!0},M.styles=[wf],M.closeOnOutsideClick=!1,r([nn({reflect:!0})],M.prototype,"variant",2),r([nn({reflect:!0})],M.prototype,"position",2),r([nn({type:Boolean,reflect:!0})],M.prototype,"open",2),r([nn()],M.prototype,"trigger",2),r([Cs("#overlay")],M.prototype,"overlay",2),r([Cs("#dialog")],M.prototype,"dialog",2),r([Cs("#close-button")],M.prototype,"closeButton",2),r([$p()],M.prototype,"_init",1),r([L("open")],M.prototype,"openChanged",1),r([L("trigger")],M.prototype,"triggerChanged",1),r([D],M.prototype,"onTriggerClick",1),r([D],M.prototype,"onClick",1),r([D],M.prototype,"onKeydown",1),r([D],M.prototype,"toggle",1),r([D],M.prototype,"show",1),r([D],M.prototype,"showModal",1),r([D],M.prototype,"close",1),M=r([Nu("pf-modal")],M);import{LitElement as Wf,html as Yu}from"lit";import{customElement as Xu}from"lit/decorators/custom-element.js";import{property as de}from"lit/decorators/property.js";import{classMap as Ku}from"lit/directives/class-map.js";import{css as qu}from"lit";var Vu=qu`:host {
|
|
4954
4954
|
position: relative;
|
|
4955
4955
|
white-space: nowrap;
|
|
4956
4956
|
border: 0;
|
|
@@ -5148,9 +5148,9 @@ svg {
|
|
|
5148
5148
|
height: 1em;
|
|
5149
5149
|
width: 1em;
|
|
5150
5150
|
}
|
|
5151
|
-
`,
|
|
5151
|
+
`,zf=Vu;var ws=class extends Event{constructor(){super("close",{bubbles:!0,cancelable:!0})}},cn,sn,Tf,Bo=class extends Wf{constructor(){super(...arguments);n(this,sn);this.variant="filled";this.color="grey";this.compact=!1;this.truncated=!1;this.removable=!1;n(this,cn,new T(this,null,"icon"))}render(){let{compact:o,truncated:e}=this,{variant:a,color:c,icon:p}=this,f=!!p||i(this,cn).hasSlotted("icon");return Yu`
|
|
5152
5152
|
<span id="container"
|
|
5153
|
-
class="${
|
|
5153
|
+
class="${Ku({hasIcon:f,compact:o,truncated:e,[a??""]:!!a,[c??""]:!!c})}">
|
|
5154
5154
|
<slot name="icon" part="icon">
|
|
5155
5155
|
<pf-icon ?hidden="${!p}"
|
|
5156
5156
|
size="sm"
|
|
@@ -5159,7 +5159,7 @@ svg {
|
|
|
5159
5159
|
<slot id="text"></slot>
|
|
5160
5160
|
<span part="close-button" ?hidden=${!this.removable}>
|
|
5161
5161
|
<pf-button plain
|
|
5162
|
-
@click="${s(this,
|
|
5162
|
+
@click="${s(this,sn,Tf)}"
|
|
5163
5163
|
label="${this.closeButtonLabel??"remove"}">
|
|
5164
5164
|
<svg viewBox="0 0 352 512">
|
|
5165
5165
|
<path d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"/>
|
|
@@ -5167,7 +5167,7 @@ svg {
|
|
|
5167
5167
|
</pf-button>
|
|
5168
5168
|
</span>
|
|
5169
5169
|
</span>
|
|
5170
|
-
`}};
|
|
5170
|
+
`}};cn=new WeakMap,sn=new WeakSet,Tf=function(){this.removable&&this.dispatchEvent(new ws)&&this.remove()},Bo.styles=[zf],Bo.shadowRootOptions={...Wf.shadowRootOptions,delegatesFocus:!0},r([de()],Bo.prototype,"variant",2),r([de()],Bo.prototype,"color",2),r([de()],Bo.prototype,"icon",2),r([de({type:Boolean})],Bo.prototype,"compact",2),r([de({type:Boolean})],Bo.prototype,"truncated",2),r([de({type:Boolean})],Bo.prototype,"removable",2),r([de({attribute:"close-button-label"})],Bo.prototype,"closeButtonLabel",2),Bo=r([Xu("pf-label")],Bo);import{html as Ws,LitElement as rv}from"lit";import{customElement as av}from"lit/decorators/custom-element.js";import{property as er}from"lit/decorators/property.js";import{__classPrivateFieldGet as u,__classPrivateFieldSet as Q}from"tslib";import{isServer as Mf}from"lit";var I,Lt,Aa,Ia,dn,Nt,Ta,Ha,tr,Ea,Ra,Ma,Fa,Ss,fn,fe,mn,Ut,pn,Pa,Ls,$a,Rf,zs,Ef,Da=class{get root(){return u(this,Ea,"f")}set root(t){Q(this,Ea,t,"f"),u(this,Nt,"f")?.disconnect(),u(this,I,"m",Pa).call(this)}get rootMargin(){return u(this,Ra,"f")}set rootMargin(t){Q(this,Ra,t,"f"),u(this,Nt,"f")?.disconnect(),u(this,I,"m",Pa).call(this)}get threshold(){return u(this,Ma,"f")}set threshold(t){Q(this,Ma,t,"f"),u(this,Nt,"f")?.disconnect(),u(this,I,"m",Pa).call(this)}constructor(t,o){I.add(this),this.host=t,Ia.set(this,void 0),dn.set(this,void 0),Nt.set(this,void 0),Ta.set(this,new Set),Ha.set(this,!1),tr.set(this,!1),Ea.set(this,void 0),Ra.set(this,void 0),Ma.set(this,void 0),Fa.set(this,new Set),Ss.set(this,new Map),fn.set(this,void 0),fe.set(this,void 0),mn.set(this,void 0),pn.set(this,!0),t.addController(this),Q(this,Ia,o.tagNames,"f"),Q(this,Ea,o.root,"f"),Q(this,Ra,o.rootMargin,"f"),Q(this,dn,o.activeAttribute??"active","f"),Q(this,Ma,o.threshold??.85,"f"),Q(this,fn,()=>o.rootNode??t.getRootNode?.()??null,"f"),Q(this,fe,o?.getHash??(e=>e.getAttribute("href")),"f"),Q(this,mn,o?.onIntersection,"f")}hostConnected(){u(Lt,Lt,"f",Aa).add(this),u(this,I,"m",Pa).call(this)}hostDisconnected(){u(Lt,Lt,"f",Aa).delete(this),u(this,Nt,"f")?.disconnect()}async setActive(t){Q(this,Ha,!0,"f"),u(this,I,"m",$a).call(this,t);let o=!1;for(let e of u(this,I,"a",Ut))u(this,I,"m",Ls).call(this,e,!o),e===t&&(o=!0);await u(this,I,"m",zs).call(this),Q(this,Ha,!1,"f")}};Lt=Da,Ia=new WeakMap,dn=new WeakMap,Nt=new WeakMap,Ta=new WeakMap,Ha=new WeakMap,tr=new WeakMap,Ea=new WeakMap,Ra=new WeakMap,Ma=new WeakMap,Fa=new WeakMap,Ss=new WeakMap,fn=new WeakMap,fe=new WeakMap,mn=new WeakMap,pn=new WeakMap,I=new WeakSet,Ut=function(){return Mf?[]:Array.from(this.host.querySelectorAll(u(this,Ia,"f").join(","))).filter(u(this,fe,"f"))},Pa=async function(){let t=u(this,fn,"f").call(this);if(t instanceof Document||t instanceof ShadowRoot){let{rootMargin:o,threshold:e,root:a}=this;Q(this,Nt,new IntersectionObserver(c=>u(this,I,"m",Ef).call(this,c),{root:a,rootMargin:o,threshold:e}),"f");for(let c of u(this,I,"a",Ut)){let p=u(this,fe,"f").call(this,c)?.replace("#","");if(p){let f=document.getElementById(p);f&&(u(this,Nt,"f")?.observe(f),u(this,Ss,"f").set(c,f))}}}},Ls=function(t,o){o?u(this,Ta,"f").add(t):u(this,Ta,"f").delete(t)},$a=function(t){for(let o of u(this,I,"a",Ut))o.toggleAttribute(u(this,dn,"f"),o===t)},Rf=async function(){let t=u(this,I,"a",Ut),{hash:o}=location;o?(await u(this,I,"m",zs).call(this),this.setActive(t.find(e=>u(this,fe,"f").call(this,e)===o)??null)):this.setActive(t.at(0)??null)},zs=async function(){for(Q(this,tr,!1,"f"),setTimeout(()=>Q(this,tr,!1,"f"),3e3);!u(this,tr,"f");)await new Promise(requestAnimationFrame)},Ef=async function(t){if(!u(this,Ha,"f")){for(let{target:a,boundingClientRect:c,intersectionRect:p}of t){let f=`:is(${u(this,Ia,"f").join(",")})[href="#${a.id}"]`,v=this.host.querySelector(f);v&&u(this,I,"m",Ls).call(this,v,c.top<p.top)}let e=[...u(this,Ta,"f")].at(-1);u(this,I,"m",$a).call(this,e??u(this,I,"a",Ut).at(0))}Q(this,tr,!0,"f"),u(this,Fa,"f").clear();for(let o of t)o.isIntersecting&&u(this,Fa,"f").add(o.target);if(u(this,pn,"f")){let o=t?.filter(e=>e.isIntersecting)??[];if(u(this,Fa,"f").size>0){let[{target:e=null}={}]=o,{id:a}=e??{};if(a){let c=u(this,I,"a",Ut).find(p=>u(this,fe,"f").call(this,p)===`#${a}`);c&&u(this,I,"m",$a).call(this,c)}}Q(this,pn,!1,"f")}u(this,mn,"f")?.call(this)};Aa={value:new Set};Mf||(addEventListener("scroll",()=>{Math.round(window.innerHeight+window.scrollY)>=document.body.scrollHeight&&u(Lt,Lt,"f",Aa).forEach(l=>{u(l,I,"m",$a).call(l,u(l,I,"a",Ut).at(-1))})},{passive:!0}),addEventListener("hashchange",()=>{u(Lt,Lt,"f",Aa).forEach(l=>{u(l,I,"m",Rf).call(l)})}));import{html as Qu,LitElement as Pf}from"lit";import{customElement as Ju}from"lit/decorators/custom-element.js";import{property as If}from"lit/decorators/property.js";import{ifDefined as ov}from"lit/directives/if-defined.js";import{css as Gu}from"lit";var Zu=Gu`:host {
|
|
5171
5171
|
display: block;
|
|
5172
5172
|
}
|
|
5173
5173
|
|
|
@@ -5236,14 +5236,14 @@ a:focus {
|
|
|
5236
5236
|
--pf-c-jump-links__link-text--Color: var(--pf-c-jump-links__item--m-current__link-text--Color,
|
|
5237
5237
|
pfvar(--pf-global--Color--100, #151515));
|
|
5238
5238
|
}
|
|
5239
|
-
`,
|
|
5240
|
-
<a href="${
|
|
5241
|
-
@focus="${s(this,
|
|
5242
|
-
@click="${s(this,
|
|
5239
|
+
`,Ff=Zu;var gn,bn,Hf,hn,$f,Ho=class extends Pf{constructor(){super(...arguments);n(this,bn);n(this,hn);this.active=!1;n(this,gn,m.of(this,{role:"listitem"}))}render(){return Qu`
|
|
5240
|
+
<a href="${ov(this.href)}"
|
|
5241
|
+
@focus="${s(this,hn,$f)}"
|
|
5242
|
+
@click="${s(this,bn,Hf)}">
|
|
5243
5243
|
<slot></slot>
|
|
5244
5244
|
</a>
|
|
5245
5245
|
<slot name="subsection"></slot>
|
|
5246
|
-
`}activeChanged(){i(this,
|
|
5246
|
+
`}activeChanged(){i(this,gn).ariaCurrent=this.active?"location":null}};gn=new WeakMap,bn=new WeakSet,Hf=function(){this.dispatchEvent(new Event("select",{bubbles:!0}))},hn=new WeakSet,$f=function(){this.dispatchEvent(new Event("focus",{bubbles:!0}))},Ho.styles=[Ff],Ho.shadowRootOptions={...Pf.shadowRootOptions,delegatesFocus:!0},r([If({type:Boolean,reflect:!0})],Ho.prototype,"active",2),r([If({reflect:!0})],Ho.prototype,"href",2),r([L("active")],Ho.prototype,"activeChanged",1),Ho=r([Ju("pf-jump-links-item")],Ho);ko();import{css as tv}from"lit";var ev=tv`[hidden] {
|
|
5247
5247
|
display: none !important;
|
|
5248
5248
|
}
|
|
5249
5249
|
|
|
@@ -5382,9 +5382,9 @@ summary span {
|
|
|
5382
5382
|
var(--pf-global--Color--100, #151515));
|
|
5383
5383
|
--pf-c-jump-links__toggle-icon--Rotate: 90deg;
|
|
5384
5384
|
}
|
|
5385
|
-
`,
|
|
5386
|
-
<nav id="container">${this.expandable?
|
|
5387
|
-
<details ?open="${this.expanded}" @toggle="${s(this,
|
|
5385
|
+
`,Af=ev;var Oa,Ua,Ts,rr,Na,un,Df,vn,Of,ja,Es,_n,Uf,$o=class extends rv{constructor(){super(...arguments);n(this,Ua);n(this,un);n(this,vn);n(this,ja);n(this,_n);this.expandable=!1;this.expanded=!1;this.vertical=!1;this.centered=!1;this.offset=0;n(this,Oa,this.querySelectorAll?.(":is(pf-jump-links-item, pf-jump-links-list)"));n(this,rr,co.of(this,{getItems:()=>i(this,Ua,Ts)}));n(this,Na,new Da(this,{rootMargin:`${this.offset}px 0px 0px 0px`,tagNames:["pf-jump-links-item"]}))}async getUpdateComplete(){let o=await super.getUpdateComplete(),e=await Promise.all(Array.from(i(this,Oa),a=>a.updateComplete));return o&&e.every(a=>!!a)}connectedCallback(){super.connectedCallback(),this.addEventListener("slotchange",s(this,un,Df)),this.addEventListener("select",s(this,vn,Of))}firstUpdated(){let o=this.querySelector?.("pf-jump-links-item[active]");o&&s(this,ja,Es).call(this,o)}updated(o){o.has("offset")&&(i(this,Na).rootMargin=`${this.offset??0}px 0px 0px 0px`)}render(){return Ws`
|
|
5386
|
+
<nav id="container">${this.expandable?Ws`
|
|
5387
|
+
<details ?open="${this.expanded}" @toggle="${s(this,_n,Uf)}">
|
|
5388
5388
|
<summary>
|
|
5389
5389
|
<pf-icon icon="chevron-right"></pf-icon>
|
|
5390
5390
|
<span id="label">${this.label}</span>
|
|
@@ -5392,13 +5392,13 @@ summary span {
|
|
|
5392
5392
|
<div role="listbox" aria-labelledby="label">
|
|
5393
5393
|
<slot></slot>
|
|
5394
5394
|
</div>
|
|
5395
|
-
</details>`:
|
|
5395
|
+
</details>`:Ws`
|
|
5396
5396
|
<span id="label">${this.label}</span>
|
|
5397
5397
|
<div role="listbox" aria-labelledby="label">
|
|
5398
5398
|
<slot></slot>
|
|
5399
5399
|
</div>`}
|
|
5400
5400
|
</nav>
|
|
5401
|
-
`}};
|
|
5401
|
+
`}};Oa=new WeakMap,Ua=new WeakSet,Ts=function(){return Array.from(i(this,Oa)??[]).flatMap(o=>[...o.shadowRoot?.querySelectorAll?.("a")??[],...o.querySelectorAll?.("a")??[]])},rr=new WeakMap,Na=new WeakMap,un=new WeakSet,Df=function(){i(this,rr).items=i(this,Ua,Ts)},vn=new WeakSet,Of=function(o){o.target instanceof Ho&&s(this,ja,Es).call(this,o.target)},ja=new WeakSet,Es=function(o){let e=o.shadowRoot?.querySelector?.("a")??null;e&&(i(this,rr).atFocusedItemIndex=i(this,rr).items.indexOf(e),i(this,Na).setActive(o))},_n=new WeakSet,Uf=function(o){o.target instanceof HTMLDetailsElement&&(this.expanded=o.target.open),this.dispatchEvent(new Event("toggle"))},$o.styles=[Af],r([er({reflect:!0,type:Boolean})],$o.prototype,"expandable",2),r([er({reflect:!0,type:Boolean})],$o.prototype,"expanded",2),r([er({reflect:!0,type:Boolean})],$o.prototype,"vertical",2),r([er({reflect:!0,type:Boolean})],$o.prototype,"centered",2),r([er({type:Number})],$o.prototype,"offset",2),r([er()],$o.prototype,"label",2),$o=r([av("pf-jump-links")],$o);import{html as nv,LitElement as cv}from"lit";import{customElement as sv}from"lit/decorators/custom-element.js";import{css as lv}from"lit";var iv=lv`:host {
|
|
5402
5402
|
display: block;
|
|
5403
5403
|
}
|
|
5404
5404
|
|
|
@@ -5413,7 +5413,7 @@ summary span {
|
|
|
5413
5413
|
--pf-c-jump-links__link--PaddingLeft: var(--pf-c-jump-links__list__list__link--PaddingLeft,
|
|
5414
5414
|
var(--pf-global--spacer--lg, 1.5rem));
|
|
5415
5415
|
}
|
|
5416
|
-
`,
|
|
5416
|
+
`,Nf=iv;var qa=class extends cv{render(){return nv`<div id="container" role="listbox"><slot></slot></div>`}};qa.styles=[Nf],qa=r([sv("pf-jump-links-list")],qa);ko();import{LitElement as om,html as Wv}from"lit";import{styleMap as Tv}from"lit/directives/style-map.js";import{classMap as Ev}from"lit/directives/class-map.js";import{customElement as Rv}from"lit/decorators/custom-element.js";import{property as tm}from"lit/decorators/property.js";import{queryAssignedElements as em}from"lit/decorators/query-assigned-elements.js";wr();ho();var ar=We(Symbol("pf-dropdown-menu-context"));import{LitElement as qf,html as Rs}from"lit";import{customElement as fv}from"lit/decorators/custom-element.js";import{property as lr}from"lit/decorators/property.js";import{classMap as mv}from"lit/directives/class-map.js";import{query as gv}from"lit/decorators/query.js";import{css as pv}from"lit";var dv=pv`:host {
|
|
5417
5417
|
display: block;
|
|
5418
5418
|
width: 100%;
|
|
5419
5419
|
text-align: left;
|
|
@@ -5557,19 +5557,19 @@ slot:not([name]){
|
|
|
5557
5557
|
slot[name="icon"]::slotted(*) {
|
|
5558
5558
|
margin-inline-end: 0.5em;
|
|
5559
5559
|
}
|
|
5560
|
-
`,
|
|
5561
|
-
<div id="menuitem" role="none" class="${
|
|
5560
|
+
`,jf=dv;var Va=class extends Event{constructor(){super("change",{bubbles:!0,cancelable:!0})}},j=class extends qf{constructor(){super(...arguments);this.active=!1;this.disabled=!1}updated(o){o.has("href")&&this.dispatchEvent(new Va)}render(){let{disabled:o}=this.ctx??{disabled:!1},e=!!this.disabled||!!this.ctx?.disabled;return Rs`
|
|
5561
|
+
<div id="menuitem" role="none" class="${mv({disabled:o})}">${this.href?Rs`
|
|
5562
5562
|
<a id="item" role="menuitem" href="${this.href}" aria-disabled="${e}">
|
|
5563
5563
|
<slot name="icon"></slot>
|
|
5564
5564
|
<slot></slot>
|
|
5565
5565
|
</a>
|
|
5566
|
-
`:
|
|
5566
|
+
`:Rs`
|
|
5567
5567
|
<div id="item" role="menuitem" aria-disabled="${e}">
|
|
5568
5568
|
<slot name="icon"></slot>
|
|
5569
5569
|
<slot></slot>
|
|
5570
5570
|
</div>`}
|
|
5571
5571
|
<slot id="description" name="description">${this.description??""}</slot>
|
|
5572
|
-
</div>`}};j.styles=[
|
|
5572
|
+
</div>`}};j.styles=[jf],j.shadowRootOptions={...qf.shadowRootOptions,delegatesFocus:!0},r([lr({reflect:!0})],j.prototype,"value",2),r([lr({attribute:"href"})],j.prototype,"href",2),r([lr({type:Boolean,reflect:!0})],j.prototype,"active",2),r([lr({type:Boolean,reflect:!0})],j.prototype,"disabled",2),r([lr()],j.prototype,"description",2),r([Mo({context:ar,subscribe:!0}),lr({attribute:!1})],j.prototype,"ctx",2),r([gv("#item")],j.prototype,"menuItem",2),j=r([fv("pf-dropdown-item")],j);import{LitElement as Kf,html as Bv}from"lit";import{customElement as yv}from"lit/decorators/custom-element.js";import{state as kv}from"lit/decorators/state.js";import{LitElement as Yf,html as uv}from"lit";import{customElement as vv}from"lit/decorators/custom-element.js";import{property as _v}from"lit/decorators/property.js";import{css as bv}from"lit";var hv=bv`:host {
|
|
5573
5573
|
display: block;
|
|
5574
5574
|
}
|
|
5575
5575
|
|
|
@@ -5607,10 +5607,10 @@ p {
|
|
|
5607
5607
|
display: block;
|
|
5608
5608
|
pointer-events: none;
|
|
5609
5609
|
}
|
|
5610
|
-
|
|
5610
|
+
`,Vf=hv;var zt=class extends Yf{render(){return uv`
|
|
5611
5611
|
<p ?hidden="${!this.label}" role="presentation">${this.label}</p>
|
|
5612
5612
|
<slot></slot>
|
|
5613
|
-
`}};
|
|
5613
|
+
`}};zt.styles=[Vf],zt.shadowRootOptions={...Yf.shadowRootOptions,delegatesFocus:!0},r([_v({reflect:!0})],zt.prototype,"label",2),zt=r([vv("pf-dropdown-group")],zt);import{css as xv}from"lit";var Cv=xv`:host {
|
|
5614
5614
|
background: var(--pf-c-dropdown__menu--BackgroundColor, #fff);
|
|
5615
5615
|
}
|
|
5616
5616
|
|
|
@@ -5647,11 +5647,11 @@ p {
|
|
|
5647
5647
|
pointer-events: none;
|
|
5648
5648
|
}
|
|
5649
5649
|
|
|
5650
|
-
`,
|
|
5651
|
-
<slot class="${
|
|
5652
|
-
@slotchange="${s(this,
|
|
5653
|
-
@change="${s(this,
|
|
5654
|
-
`}};
|
|
5650
|
+
`,Xf=Cv;import{classMap as wv}from"lit/directives/class-map.js";function Sv(l){return!!l.composedPath().find(o=>o instanceof j)?.disabled}var xn,Ya,Ms,Ao,Cn,Gf,Xa,Fs,Bn,Zf,yn,Qf,Ka,Ps,Ga,Is,Do=class extends Kf{constructor(){super(...arguments);n(this,Ya);n(this,Cn);n(this,Xa);n(this,Bn);n(this,yn);n(this,Ka);n(this,Ga);n(this,xn,m.of(this,{role:"menu"}));n(this,Ao,co.of(this,{getItems:()=>i(this,Ya,Ms)}))}get activeItem(){return i(this,Ao).items.at(i(this,Ao).atFocusedItemIndex)??i(this,Ao).atFocusableItems.at(0)??null}get activeIndex(){return i(this,Ao).atFocusedItemIndex}get items(){return s(this,Ga,Is).call(this,this.shadowRoot?.querySelector("slot"))}connectedCallback(){super.connectedCallback(),this.addEventListener("focusin",s(this,Bn,Zf)),this.addEventListener("click",s(this,yn,Qf))}willUpdate(){i(this,xn).ariaDisabled=String(!!this.ctx?.disabled)}render(){let{disabled:o=!1}=this.ctx??{};return Bv`
|
|
5651
|
+
<slot class="${wv({disabled:o})}"
|
|
5652
|
+
@slotchange="${s(this,Xa,Fs)}"
|
|
5653
|
+
@change="${s(this,Cn,Gf)}"></slot>
|
|
5654
|
+
`}};xn=new WeakMap,Ya=new WeakSet,Ms=function(){return this.items.map(o=>o.menuItem)},Ao=new WeakMap,Cn=new WeakSet,Gf=function(o){o instanceof Va&&s(this,Xa,Fs).call(this)},Xa=new WeakSet,Fs=function(){i(this,Ao).items=i(this,Ya,Ms)},Bn=new WeakSet,Zf=function(o){this.ctx?.disabled?(o.preventDefault(),o.stopPropagation()):o.target instanceof j&&s(this,Ka,Ps).call(this,o.target.menuItem)},yn=new WeakSet,Qf=function(o){this.ctx?.disabled||Sv(o)?(o.preventDefault(),o.stopPropagation()):o.target instanceof j&&s(this,Ka,Ps).call(this,o.target.menuItem)},Ka=new WeakSet,Ps=function(o){let e=i(this,Ao).items.indexOf(o);e!==i(this,Ao).atFocusedItemIndex&&(i(this,Ao).atFocusedItemIndex=e)},Ga=new WeakSet,Is=function(o){return o?.assignedElements().flatMap(e=>e instanceof HTMLSlotElement?s(this,Ga,Is).call(this,e):e instanceof j?[e]:e instanceof zt?Array.from(e.querySelectorAll("pf-dropdown-item")):[])??[]},Do.styles=[Xf],Do.shadowRootOptions={...Kf.shadowRootOptions,delegatesFocus:!0},r([Mo({context:ar,subscribe:!0}),kv()],Do.prototype,"ctx",2),Do=r([yv("pf-dropdown-menu")],Do);import{css as Lv}from"lit";var zv=Lv`:host {
|
|
5655
5655
|
display: inline-block;
|
|
5656
5656
|
position: relative;
|
|
5657
5657
|
--pf-c-dropdown__toggle--PaddingTop: var(--pf-global--spacer--form-element, 0.375rem);
|
|
@@ -5986,12 +5986,12 @@ pf-button#default-toggle,
|
|
|
5986
5986
|
--_button-icon-padding-inline-end: var(-pf-c-dropdown__toggle--PaddingRight,
|
|
5987
5987
|
var(--pf-global--spacer--sm, 0.5rem));
|
|
5988
5988
|
}
|
|
5989
|
-
`,
|
|
5990
|
-
<div class="${
|
|
5991
|
-
style="${
|
|
5992
|
-
@slotchange="${s(this,
|
|
5989
|
+
`,Jf=zv;var Hs=class extends Event{constructor(o,e){super("select",{bubbles:!0,cancelable:!0});this.originalEvent=o;this.value=e}},ir,nr,Za,$s,Qa,As,kn,rm,wn,am,Ja,Ds,Sn,lm,Ln,im,zn,nm,Oo=class extends om{constructor(){super(...arguments);n(this,Za);n(this,Qa);n(this,kn);n(this,wn);n(this,Ja);n(this,Sn);n(this,Ln);n(this,zn);this.disabled=!1;this.expanded=!1;this.ctx={disabled:!1};n(this,ir,new S(this));n(this,nr,new Xo(this,{content:()=>this._menuElements?.at(0)}))}async getUpdateComplete(){return(await Promise.all([super.getUpdateComplete(),this._menuElements?.map(e=>e.updateComplete)])).every(e=>!!e)}willUpdate(o){if(o.has("disabled")){let{disabled:e}=this;this.ctx={disabled:e}}}render(){let{expanded:o}=this,{anchor:e,alignment:a,styles:c={}}=i(this,nr),{disabled:p}=this;return Wv`
|
|
5990
|
+
<div class="${Ev({disabled:p,expanded:o,[e??""]:!!e,[a??""]:!!a})}"
|
|
5991
|
+
style="${Tv(c)}"
|
|
5992
|
+
@slotchange="${s(this,Qa,As)}">
|
|
5993
5993
|
<slot name="toggle"
|
|
5994
|
-
@keydown="${s(this,
|
|
5994
|
+
@keydown="${s(this,Sn,lm)}"
|
|
5995
5995
|
@click="${()=>this.toggle()}">
|
|
5996
5996
|
<pf-button id="default-toggle" variant="control">
|
|
5997
5997
|
Dropdown
|
|
@@ -6000,14 +6000,14 @@ pf-button#default-toggle,
|
|
|
6000
6000
|
</slot>
|
|
6001
6001
|
<slot name="menu"
|
|
6002
6002
|
?hidden="${!this.expanded}"
|
|
6003
|
-
@focusout="${s(this,
|
|
6004
|
-
@keydown="${s(this,
|
|
6005
|
-
@click="${s(this,
|
|
6003
|
+
@focusout="${s(this,Ln,im)}"
|
|
6004
|
+
@keydown="${s(this,zn,nm)}"
|
|
6005
|
+
@click="${s(this,Ja,Ds)}">
|
|
6006
6006
|
<pf-dropdown-menu id="menu" part="menu" ?disabled="${p}">
|
|
6007
6007
|
<slot></slot>
|
|
6008
6008
|
</pf-dropdown-menu>
|
|
6009
6009
|
</slot>
|
|
6010
|
-
</div>`}firstUpdated(){s(this,
|
|
6010
|
+
</div>`}firstUpdated(){s(this,Qa,As).call(this)}updated(o){o.has("expanded")&&s(this,kn,rm).call(this),o.has("disabled")&&s(this,wn,am).call(this)}async show(){this.expanded=!0,await this.updateComplete}async hide(){this.expanded=!1,await this.updateComplete}async toggle(){this.expanded=!this.expanded,await this.updateComplete}};ir=new WeakMap,nr=new WeakMap,Za=new WeakSet,$s=function(){let[o]=this._toggleElements,[e]=this._menuElements;return o?e?[o,e].map(a=>this.shadowRoot?.contains(a)).every((a,c,p)=>a===p[0])?!0:(i(this,ir).warn("toggle and menu must be located in the same root"),!1):(i(this,ir).warn("no menu found"),!1):(i(this,ir).warn("no toggle found"),!1)},Qa=new WeakSet,As=function(){if(s(this,Za,$s).call(this)){let[o]=this._menuElements,[e]=this._toggleElements;o.id||=N("menu"),e.setAttribute("aria-controls",o.id),e.setAttribute("aria-haspopup",o.id),e.setAttribute("aria-expanded",String(this.expanded))}},kn=new WeakSet,rm=async function(){let o=this.expanded?"close":"open",[e]=this._menuElements,[a]=this._toggleElements;a.setAttribute("aria-expanded",`${String(this.expanded)}`),this.dispatchEvent(new Event(o)),this.expanded?(await i(this,nr).show(),e instanceof Do&&e.activeItem?.focus()):await i(this,nr).hide()},wn=new WeakSet,am=function(){if(s(this,Za,$s).call(this)){let[o]=this._toggleElements;o.setAttribute("aria-disabled",String(!!this.disabled))}},Ja=new WeakSet,Ds=function(o){let[e]=this._menuElements;if(e instanceof Do){let a=o.target||e.activeItem;this.dispatchEvent(new Hs(o,`${a?.value}`)),this.hide()}},Sn=new WeakSet,lm=function(o){switch(o.key){case"ArrowDown":this.show()}},Ln=new WeakSet,im=function(o){if(this.expanded){let e=this.getRootNode(),[a]=this._menuElements;(e instanceof ShadowRoot||e instanceof Document&&o.relatedTarget instanceof j&&a instanceof Do&&!a.items.includes(o.relatedTarget))&&this.hide()}},zn=new WeakSet,nm=function(o){switch(o.key){case"Enter":case" ":o.preventDefault(),s(this,Ja,Ds).call(this,o);break;case"Escape":this.hide(),this._toggleElements?.at(0)?.focus()}},Oo.styles=[Jf],Oo.shadowRootOptions={...om.shadowRootOptions,delegatesFocus:!0},r([tm({type:Boolean,reflect:!0})],Oo.prototype,"disabled",2),r([tm({type:Boolean,reflect:!0})],Oo.prototype,"expanded",2),r([em({slot:"toggle",flatten:!0})],Oo.prototype,"_toggleElements",2),r([em({slot:"menu",flatten:!0})],Oo.prototype,"_menuElements",2),r([ft({context:ar})],Oo.prototype,"ctx",2),Oo=r([Rv("pf-dropdown")],Oo);import{LitElement as Pv,html as Iv}from"lit";import{customElement as Hv}from"lit/decorators/custom-element.js";import{property as $v}from"lit/decorators/property.js";import{classMap as Av}from"lit/directives/class-map.js";import{css as Mv}from"lit";var Fv=Mv`:host {
|
|
6011
6011
|
display: block;
|
|
6012
6012
|
background-color: var(--pf-c-code-block--BackgroundColor, #f0f0f0);
|
|
6013
6013
|
font-size: var(--pf-c-code-block__pre--FontSize, 0.875rem);
|
|
@@ -6063,17 +6063,17 @@ button svg {
|
|
|
6063
6063
|
.expanded button svg {
|
|
6064
6064
|
transform: rotate(-90deg);
|
|
6065
6065
|
}
|
|
6066
|
-
`,
|
|
6066
|
+
`,cm=Fv;function Dv(l){let t=l.replace(/^\n/,""),o=t.match(/^\s+/);return o?t.replace(new RegExp(`^${o[0]}`,"gm"),""):l}var ol,Os,Wn,sm,Tn,pm,cr=class extends Pv{constructor(){super(...arguments);n(this,ol);n(this,Wn);n(this,Tn);this.expanded=!1}render(){let{expanded:o}=this;return Iv`
|
|
6067
6067
|
<div id="header">
|
|
6068
6068
|
<div id="actions">
|
|
6069
6069
|
<slot name="actions"></slot>
|
|
6070
6070
|
</div>
|
|
6071
6071
|
</div>
|
|
6072
|
-
<div id="container" class="${
|
|
6073
|
-
<pre><code id="content">${i(this,
|
|
6074
|
-
?hidden="${!o}">${i(this,
|
|
6075
|
-
<button ?hidden="${!i(this,
|
|
6076
|
-
@click=${s(this,
|
|
6072
|
+
<div id="container" class="${Av({expanded:o})}">
|
|
6073
|
+
<pre><code id="content">${i(this,Wn,sm)}</code><code id="code-block-expand"
|
|
6074
|
+
?hidden="${!o}">${i(this,ol,Os)}</code></pre>
|
|
6075
|
+
<button ?hidden="${!i(this,ol,Os)}"
|
|
6076
|
+
@click=${s(this,Tn,pm)}
|
|
6077
6077
|
aria-expanded=${this.expanded}
|
|
6078
6078
|
aria-controls="code-block-expand">
|
|
6079
6079
|
<svg fill="currentColor"
|
|
@@ -6086,7 +6086,7 @@ button svg {
|
|
|
6086
6086
|
${this.expanded?"Show less":"Show more"}
|
|
6087
6087
|
</button>
|
|
6088
6088
|
</div>
|
|
6089
|
-
`}};
|
|
6089
|
+
`}};ol=new WeakSet,Os=function(){return this.querySelector?.("script[data-expand]")?.textContent??""},Wn=new WeakSet,sm=function(){let o=this.querySelector?.("script[type]");return o?.type!=="text/javascript-sample"&&o?.type.match(/(j(ava)?|ecma|live)script/)?"":Dv(o?.textContent??"")},Tn=new WeakSet,pm=function(){this.expanded=!this.expanded},cr.styles=[cm],r([$v({type:Boolean,reflect:!0})],cr.prototype,"expanded",2),cr=r([Hv("pf-code-block")],cr);import{LitElement as mm,html as qv,isServer as Vv}from"lit";import{customElement as Yv}from"lit/decorators/custom-element.js";import{property as mo}from"lit/decorators/property.js";import{classMap as Xv}from"lit/directives/class-map.js";import{ifDefined as Kv}from"lit/directives/if-defined.js";import{css as Ov}from"lit";var Uv=Ov`:host {
|
|
6090
6090
|
--pf-c-clipboard-copy__toggle-icon--Transition: .2s ease-in 0s;
|
|
6091
6091
|
--pf-c-clipboard-copy--m-expanded__toggle-icon--Rotate: 90deg;
|
|
6092
6092
|
--pf-c-clipboard-copy__expandable-content--PaddingTop: var(--pf-global--spacer--md, 1rem);
|
|
@@ -6248,7 +6248,7 @@ textarea {
|
|
|
6248
6248
|
margin-block-end: calc(-1 * var(--pf-c-button--PaddingBottom));
|
|
6249
6249
|
}
|
|
6250
6250
|
|
|
6251
|
-
`,
|
|
6251
|
+
`,dm=Uv;import{css as Nv}from"lit";var jv=Nv`:host {
|
|
6252
6252
|
--pf-c-form-control--Color: var(--pf-global--Color--100, #151515);
|
|
6253
6253
|
--pf-c-form-control--FontSize: var(--pf-global--FontSize--md, 1rem);
|
|
6254
6254
|
--pf-c-form-control--LineHeight: var(--pf-global--LineHeight--md, 1.5);
|
|
@@ -6375,43 +6375,43 @@ textarea {
|
|
|
6375
6375
|
--pf-c-form-control--m-icon-sprite__select--m-warning--BackgroundPosition: calc(100% - var(--pf-global--spacer--md, 1rem) - var(--pf-global--spacer--lg) + 0.0625rem);
|
|
6376
6376
|
--pf-c-form-control--m-icon-sprite__select--invalid--BackgroundPosition: calc(100% - var(--pf-global--spacer--md, 1rem) - var(--pf-global--spacer--lg));
|
|
6377
6377
|
}
|
|
6378
|
-
`,
|
|
6379
|
-
<div id="container" class="${
|
|
6378
|
+
`,fm=jv;ko();Sl();var gm=l=>new Promise(t=>setTimeout(t,l)),Us=class extends Event{constructor(o){super("copy",{bubbles:!0});this.text=o}},sr,En,Rn,bm,tl,Ns,el,js,Mn,hm,q=class extends mm{constructor(){super(...arguments);n(this,Rn);n(this,tl);n(this,el);n(this,Mn);this.clickTip="Successfully copied to clipboard!";this.hoverTip="Copy to clipboard";this.accessibleTextLabel="Copyable input";this.accessibleToggleLabel="Show content";this.entryDelay=300;this.exitDelay=1500;this.block=!1;this.code=!1;this.expanded=!1;this.expandable=!1;this.readonly=!1;this.inline=!1;this.compact=!1;this.value="";n(this,sr,!1);n(this,En,new MutationObserver(()=>s(this,el,js).call(this)))}connectedCallback(){super.connectedCallback(),i(this,En).observe(this,{characterData:!0}),Vv||s(this,el,js).call(this)}render(){let{expanded:o,expandable:e,inline:a,compact:c,code:p,block:f,readonly:v}=this;return qv`
|
|
6379
|
+
<div id="container" class="${Xv({code:p,expanded:o,inline:a,compact:c,block:f})}">
|
|
6380
6380
|
<div id="input-group">
|
|
6381
6381
|
<div id="wrapper">
|
|
6382
6382
|
<pf-button id="expand-button"
|
|
6383
6383
|
variant="control"
|
|
6384
6384
|
label="EXPAND"
|
|
6385
6385
|
?inert="${!e}"
|
|
6386
|
-
@click="${s(this,
|
|
6386
|
+
@click="${s(this,Rn,bm)}">
|
|
6387
6387
|
<pf-icon icon="chevron-right"></pf-icon>
|
|
6388
6388
|
</pf-button>
|
|
6389
6389
|
</div>
|
|
6390
6390
|
<span ?hidden="${!(a||c)}">${this.value}</span>
|
|
6391
6391
|
<input aria-label="${this.accessibleTextLabel}"
|
|
6392
6392
|
?hidden="${a||c}"
|
|
6393
|
-
?disabled="${o||
|
|
6393
|
+
?disabled="${o||v}"
|
|
6394
6394
|
.value="${this.value}"
|
|
6395
|
-
@input="${s(this,
|
|
6395
|
+
@input="${s(this,tl,Ns)}">
|
|
6396
6396
|
<pf-tooltip>
|
|
6397
6397
|
<pf-button id="copy-button"
|
|
6398
6398
|
icon="copy"
|
|
6399
6399
|
?plain="${a||c}"
|
|
6400
|
-
variant="${
|
|
6400
|
+
variant="${Kv(a||c?void 0:"control")}"
|
|
6401
6401
|
label="${this.hoverTip}"
|
|
6402
6402
|
@click="${this.copy}">
|
|
6403
6403
|
</pf-button>
|
|
6404
|
-
<span slot="content">${i(this,
|
|
6404
|
+
<span slot="content">${i(this,sr)?this.clickTip:this.hoverTip}</span>
|
|
6405
6405
|
</pf-tooltip>
|
|
6406
6406
|
<slot name="actions"></slot>
|
|
6407
6407
|
</div>
|
|
6408
6408
|
<textarea .value="${this.value}"
|
|
6409
6409
|
.disabled="${this.readonly}"
|
|
6410
6410
|
?hidden="${!(e&&o)}"
|
|
6411
|
-
@input="${s(this,
|
|
6411
|
+
@input="${s(this,tl,Ns)}">
|
|
6412
6412
|
</textarea>
|
|
6413
6413
|
</div>
|
|
6414
|
-
`}async copy(){await navigator.clipboard.writeText(this.value),this.dispatchEvent(new
|
|
6414
|
+
`}async copy(){await navigator.clipboard.writeText(this.value),this.dispatchEvent(new Us(this.value)),await gm(this.entryDelay),_(this,sr,!0),this.requestUpdate(),await gm(this.exitDelay),_(this,sr,!1),this.requestUpdate()}};sr=new WeakMap,En=new WeakMap,Rn=new WeakSet,bm=function(){this.expanded=!this.expanded},tl=new WeakSet,Ns=function(o){let{value:e}=o.target||HTMLTextAreaElement;this.value=e},el=new WeakSet,js=function(){this.childNodes?.length>0&&(this.value=this.getAttribute("value")??s(this,Mn,hm).call(this,Array.from(this.childNodes,o=>o instanceof Element||o instanceof Text?o.textContent??"":"").join("")))},Mn=new WeakSet,hm=function(o){let e=o.replace(/^\n/,""),a=e.match(/^\s+/);return a?e.replace(new RegExp(`^${a[0]}`,"gm"),""):o},q.styles=[fm,dm],q.shadowRootOptions={...mm.shadowRootOptions,delegatesFocus:!0},r([mo({attribute:"click-tip"})],q.prototype,"clickTip",2),r([mo({attribute:"hover-tip"})],q.prototype,"hoverTip",2),r([mo({attribute:"accessible-text-label"})],q.prototype,"accessibleTextLabel",2),r([mo({attribute:"accessible-toggle-label"})],q.prototype,"accessibleToggleLabel",2),r([mo({type:Number,attribute:"entry-delay"})],q.prototype,"entryDelay",2),r([mo({type:Number,attribute:"exit-delay"})],q.prototype,"exitDelay",2),r([mo({type:Boolean,reflect:!0})],q.prototype,"block",2),r([mo({type:Boolean,reflect:!0})],q.prototype,"code",2),r([mo({type:Boolean,reflect:!0})],q.prototype,"expanded",2),r([mo({type:Boolean,reflect:!0})],q.prototype,"expandable",2),r([mo({type:Boolean,reflect:!0})],q.prototype,"readonly",2),r([mo({type:Boolean,reflect:!0})],q.prototype,"inline",2),r([mo({type:Boolean,reflect:!0})],q.prototype,"compact",2),r([mo()],q.prototype,"value",2),q=r([Yv("pf-clipboard-copy")],q);import{LitElement as vm,html as Qv}from"lit";import{customElement as Jv}from"lit/decorators/custom-element.js";import{property as me}from"lit/decorators/property.js";import{query as _m}from"lit/decorators/query.js";import{queryAssignedNodes as o0}from"lit/decorators/query-assigned-nodes.js";import{classMap as t0}from"lit/directives/class-map.js";import{css as Gv}from"lit";var Zv=Gv`:host {
|
|
6415
6415
|
--pf-c-chip-group__list--MarginBottom: calc(var(--pf-global--spacer--xs, 0.25rem) * -1);
|
|
6416
6416
|
--pf-c-chip-group__list--MarginRight: calc(var(--pf-global--spacer--xs, 0.25rem) * -1);
|
|
6417
6417
|
--pf-c-chip-group--m-category--PaddingTop: var(--pf-global--spacer--xs, 0.25rem);
|
|
@@ -6505,23 +6505,23 @@ svg {
|
|
|
6505
6505
|
inline-size: 1px;
|
|
6506
6506
|
}
|
|
6507
6507
|
|
|
6508
|
-
`,
|
|
6508
|
+
`,um=Zv;var qs=class extends Event{constructor(){super("expand",{bubbles:!0,cancelable:!0})}},Fn=class extends Event{constructor(){super("remove",{bubbles:!0,cancelable:!0})}},e0=/\$\{\s*remaining\s*\}/g,Wt,ge,Uo,Pn,xm,In,Cm,rl,Vs,Hn,Bm,$n,ym,ao=class extends vm{constructor(){super();n(this,Wt);n(this,Pn);n(this,In);n(this,rl);n(this,Hn);n(this,$n);this.accessibleLabel="";this.accessibleCloseLabel="Close";this.collapsedText="${remaining} more";this.expandedText="show less";this.numChips=3;this.open=!1;this.closeable=!1;n(this,Uo,co.of(this,{getItems:()=>[...Array.prototype.slice.call(i(this,Wt,ge),0,this.open?i(this,Wt,ge).length:Math.min(i(this,Wt,ge).length,this.numChips)),this._overflowChip,this._button].filter(o=>!!o)}));this.addEventListener("remove",s(this,Hn,Bm))}get activeChip(){return i(this,Uo).items.at(i(this,Uo).atFocusedItemIndex)?.getRootNode()?.host}set activeChip(o){let e=o.shadowRoot?.querySelector("button");e&&(i(this,Uo).atFocusedItemIndex=i(this,Uo).items.indexOf(e))}get hasCategory(){return(this._categorySlotted||[]).length>0}get remaining(){return i(this,Wt,ge).length-this.numChips}render(){let o=i(this,Wt,ge).length<=0;return Qv`
|
|
6509
6509
|
<div id="outer"
|
|
6510
|
-
class="${
|
|
6510
|
+
class="${t0({"has-category":this.hasCategory,empty:o})}"
|
|
6511
6511
|
role="toolbar">
|
|
6512
6512
|
<slot id="category"
|
|
6513
6513
|
name="category-name"
|
|
6514
|
-
@slotchange="${s(this,
|
|
6514
|
+
@slotchange="${s(this,rl,Vs)}">
|
|
6515
6515
|
<span class="visually-hidden"
|
|
6516
6516
|
?hidden="${!this.accessibleLabel}">${this.accessibleLabel??""}</span>
|
|
6517
6517
|
</slot>
|
|
6518
|
-
<slot id="chips" @slotchange="${s(this,
|
|
6518
|
+
<slot id="chips" @slotchange="${s(this,rl,Vs)}"></slot>
|
|
6519
6519
|
<pf-chip id="overflow"
|
|
6520
6520
|
aria-controls="chips"
|
|
6521
6521
|
overflow-chip
|
|
6522
6522
|
?hidden="${this.remaining<1}"
|
|
6523
|
-
@click="${s(this,
|
|
6524
|
-
>${this.remaining<1?"":this.open?this.expandedText:this.collapsedText.replace(
|
|
6523
|
+
@click="${s(this,In,Cm)}"
|
|
6524
|
+
>${this.remaining<1?"":this.open?this.expandedText:this.collapsedText.replace(e0,this.remaining.toString())}</pf-chip>
|
|
6525
6525
|
<pf-button id="close-button"
|
|
6526
6526
|
plain
|
|
6527
6527
|
icon="times-circle"
|
|
@@ -6529,9 +6529,9 @@ svg {
|
|
|
6529
6529
|
label="${this.accessibleCloseLabel}"
|
|
6530
6530
|
aria-describedby="category"
|
|
6531
6531
|
?hidden="${!this.closeable}"
|
|
6532
|
-
@click="${s(this,
|
|
6532
|
+
@click="${s(this,Pn,xm)}"></pf-button>
|
|
6533
6533
|
</div>
|
|
6534
|
-
`}chipsChanged(){s(this,
|
|
6534
|
+
`}chipsChanged(){s(this,$n,ym).call(this)}focusOnChip(o){i(this,Uo).atFocusedItemIndex=i(this,Uo).items.indexOf(o)}};Wt=new WeakSet,ge=function(){return this.querySelectorAll("pf-chip:not([slot]):not([overflow-chip])")},Uo=new WeakMap,Pn=new WeakSet,xm=function(){this.dispatchEvent(new Fn)},In=new WeakSet,Cm=async function(o){o.stopPropagation(),this.open=!this.open,await this.updateComplete,this.chipsChanged(),this._overflowChip&&this.focusOnChip(this._overflowChip),this.dispatchEvent(new qs)},rl=new WeakSet,Vs=function(){this.requestUpdate()},Hn=new WeakSet,Bm=function(o){if(o instanceof le){let e=i(this,Uo).atFocusedItemIndex;o.chip&&(i(this,Uo).atFocusedItemIndex=e+1)}else o instanceof Fn&&this.remove()},$n=new WeakSet,ym=function(){i(this,Wt,ge).forEach((o,e)=>{o.accessibleCloseLabel=this.accessibleCloseLabel;let a=e>=this.numChips&&!this.open;o.hidden=a})},ao.styles=[ji,um],ao.shadowRootOptions={...vm.shadowRootOptions,delegatesFocus:!0},r([me({attribute:"accessible-label",type:String})],ao.prototype,"accessibleLabel",2),r([me({attribute:"accessible-close-label",type:String})],ao.prototype,"accessibleCloseLabel",2),r([me({attribute:"collapsed-text",type:String})],ao.prototype,"collapsedText",2),r([me({attribute:"expanded-text",type:String})],ao.prototype,"expandedText",2),r([me({attribute:"num-chips",type:Number})],ao.prototype,"numChips",2),r([me({reflect:!0,type:Boolean})],ao.prototype,"open",2),r([me({reflect:!0,type:Boolean})],ao.prototype,"closeable",2),r([_m("#overflow")],ao.prototype,"_overflowChip",2),r([_m("#close-button")],ao.prototype,"_button",2),r([o0({slot:"category-name",flatten:!0})],ao.prototype,"_categorySlotted",2),r([L("accessibleCloseLabel"),L("numChips"),L("closeable"),L("open")],ao.prototype,"chipsChanged",1),ao=r([Jv("pf-chip-group")],ao);import{LitElement as l0,html as i0}from"lit";import{customElement as n0}from"lit/decorators/custom-element.js";import{property as An}from"lit/decorators/property.js";import{classMap as Ys}from"lit/directives/class-map.js";import{css as r0}from"lit";var a0=r0`:host {
|
|
6535
6535
|
--pf-c-card--BackgroundColor: var(--pf-global--BackgroundColor--100, #fff);
|
|
6536
6536
|
--pf-c-card--BoxShadow: var(--pf-global--BoxShadow--sm, 0 0.0625rem 0.125rem 0 rgba(3, 3, 3, 0.12), 0 0 0.125rem 0 rgba(3, 3, 3, 0.06));
|
|
6537
6537
|
--pf-c-card--first-child--PaddingTop: var(--pf-global--spacer--lg, 1.5rem);
|
|
@@ -6733,26 +6733,26 @@ article {
|
|
|
6733
6733
|
--pf-c-card__body--FullHeight--Flex: 1 1 auto;
|
|
6734
6734
|
}
|
|
6735
6735
|
|
|
6736
|
-
`,
|
|
6736
|
+
`,km=a0;var be,Tt=class extends l0{constructor(){super(...arguments);this.rounded=!1;this.fullHeight=!1;this.plain=!1;n(this,be,new T(this,"header","title",null,"footer"))}render(){return i0`
|
|
6737
6737
|
<article>
|
|
6738
6738
|
<header id="header"
|
|
6739
6739
|
part="header"
|
|
6740
|
-
class="${
|
|
6740
|
+
class="${Ys({empty:i(this,be).isEmpty("header")})}">
|
|
6741
6741
|
<slot name="header"></slot>
|
|
6742
|
-
<slot id="title" name="title" ?hidden="${i(this,
|
|
6742
|
+
<slot id="title" name="title" ?hidden="${i(this,be).isEmpty("title")}"></slot>
|
|
6743
6743
|
</header>
|
|
6744
6744
|
<div id="body"
|
|
6745
6745
|
part="body"
|
|
6746
|
-
class="${
|
|
6746
|
+
class="${Ys({empty:i(this,be).isEmpty(null)})}">
|
|
6747
6747
|
<slot></slot>
|
|
6748
6748
|
</div>
|
|
6749
6749
|
<footer id="footer"
|
|
6750
6750
|
part="footer"
|
|
6751
|
-
class="${
|
|
6751
|
+
class="${Ys({empty:i(this,be).isEmpty("footer")})}">
|
|
6752
6752
|
<slot name="footer"></slot>
|
|
6753
6753
|
</footer>
|
|
6754
6754
|
</article>
|
|
6755
|
-
`}};
|
|
6755
|
+
`}};be=new WeakMap,Tt.styles=[km],r([An({reflect:!0})],Tt.prototype,"size",2),r([An({type:Boolean,reflect:!0})],Tt.prototype,"rounded",2),r([An({type:Boolean,reflect:!0,attribute:"full-height"})],Tt.prototype,"fullHeight",2),r([An({type:Boolean,reflect:!0})],Tt.prototype,"plain",2),Tt=r([n0("pf-card")],Tt);import{LitElement as p0,html as Sm}from"lit";import{customElement as d0}from"lit/decorators/custom-element.js";import{property as Xs}from"lit/decorators/property.js";import{classMap as f0}from"lit/directives/class-map.js";import{css as c0}from"lit";var s0=c0`:host {
|
|
6756
6756
|
display: block;
|
|
6757
6757
|
--pf-c-banner--PaddingTop: var(--pf-global--spacer--xs, 0.25rem);
|
|
6758
6758
|
--pf-c-banner--PaddingRight: var(--pf-global--spacer--md, 1rem);
|
|
@@ -6848,15 +6848,15 @@ pf-icon,
|
|
|
6848
6848
|
--pf-c-banner--PaddingLeft: var(--pf-c-banner--md--PaddingLeft, var(--pf-global--spacer--lg, 1.5rem));
|
|
6849
6849
|
}
|
|
6850
6850
|
}
|
|
6851
|
-
`,
|
|
6851
|
+
`,wm=s0;var Dn,jt=class extends p0{constructor(){super(...arguments);this.sticky=!1;n(this,Dn,new T(this,null,"icon"))}willUpdate(o){o.has("icon")&&this.icon&&Promise.resolve().then(()=>(ko(),Ic))}render(){let{variant:o,icon:e}=this,a=!!e||i(this,Dn).hasSlotted("icon");return Sm`
|
|
6852
6852
|
<div id="container" part="container"
|
|
6853
|
-
class=${
|
|
6854
|
-
<slot name="icon" part="icon">${this.icon?
|
|
6853
|
+
class=${f0({hasIcon:a,[o??""]:!!o})}>
|
|
6854
|
+
<slot name="icon" part="icon">${this.icon?Sm`
|
|
6855
6855
|
<pf-icon icon="${this.icon}"></pf-icon>`:""}
|
|
6856
6856
|
</slot>
|
|
6857
6857
|
<slot id="text"></slot>
|
|
6858
6858
|
</div>
|
|
6859
|
-
`}};
|
|
6859
|
+
`}};Dn=new WeakMap,jt.styles=[wm],r([Xs({reflect:!0})],jt.prototype,"variant",2),r([Xs()],jt.prototype,"icon",2),r([Xs({type:Boolean})],jt.prototype,"sticky",2),jt=r([d0("pf-banner")],jt);ls();import{LitElement as b0,html as On}from"lit";import{customElement as h0}from"lit/decorators/custom-element.js";import{queryAssignedElements as u0}from"lit/decorators/query-assigned-elements.js";import{property as pr}from"lit/decorators/property.js";import{styleMap as v0}from"lit/directives/style-map.js";import{css as m0}from"lit";var g0=m0`:host {
|
|
6860
6860
|
display: flex;
|
|
6861
6861
|
|
|
6862
6862
|
--_background-image: var(--pf-c-background-image--BackgroundImage);
|
|
@@ -6922,11 +6922,11 @@ slot[part="content"] {
|
|
|
6922
6922
|
background-image: var(--pf-c-background-image--BackgroundImage--lg, var(--_background-image-lg, var(--_background-image)));
|
|
6923
6923
|
}
|
|
6924
6924
|
}
|
|
6925
|
-
`,
|
|
6926
|
-
<div id="container" part="container" style="${
|
|
6927
|
-
${this.filter?
|
|
6928
|
-
<slot name="filter" @slotchange=${s(this,
|
|
6929
|
-
${i(this,
|
|
6925
|
+
`,Lm=g0;var dr,fr,Un,zm,zo=class extends b0{constructor(){super(...arguments);n(this,Un);this.filter=!1;n(this,dr,void 0);n(this,fr,!1)}render(){let o={"--_background-image":this.src,"--_background-image-2x":this.src2x,"--_background-image-sm":this.srcSm,"--_background-image-sm-2x":this.srcSm2x,"--_background-image-lg":this.srcLg};return Object.entries(o).forEach(([e,a])=>{a?o[e]=`url(${a})`:delete o[e]}),On`
|
|
6926
|
+
<div id="container" part="container" style="${v0(o)}">
|
|
6927
|
+
${this.filter?On`
|
|
6928
|
+
<slot name="filter" @slotchange=${s(this,Un,zm)}>
|
|
6929
|
+
${i(this,dr)&&i(this,fr)?i(this,dr):On`
|
|
6930
6930
|
<svg xmlns="http://www.w3.org/2000/svg" width="0" height="0">
|
|
6931
6931
|
<filter id="image_overlay">
|
|
6932
6932
|
<feColorMatrix type="matrix" values="1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0"></feColorMatrix>
|
|
@@ -6940,9 +6940,9 @@ slot[part="content"] {
|
|
|
6940
6940
|
</svg>
|
|
6941
6941
|
`}
|
|
6942
6942
|
</slot>
|
|
6943
|
-
`:
|
|
6943
|
+
`:On``}
|
|
6944
6944
|
</div>
|
|
6945
|
-
`}};
|
|
6945
|
+
`}};dr=new WeakMap,fr=new WeakMap,Un=new WeakSet,zm=function(){let[o]=this._svg;o?(_(this,dr,o),_(this,fr,!0),this.requestUpdate()):_(this,fr,!1)},zo.styles=[Lm],r([pr({reflect:!0})],zo.prototype,"src",2),r([pr({reflect:!0,attribute:"src-2x"})],zo.prototype,"src2x",2),r([pr({reflect:!0,attribute:"src-sm"})],zo.prototype,"srcSm",2),r([pr({reflect:!0,attribute:"src-sm-2x"})],zo.prototype,"srcSm2x",2),r([pr({reflect:!0,attribute:"src-lg"})],zo.prototype,"srcLg",2),r([pr({type:Boolean,reflect:!0})],zo.prototype,"filter",2),r([u0({slot:"filter",selector:"svg"})],zo.prototype,"_svg",2),zo=r([h0("pf-background-image")],zo);ho();import{LitElement as C0,html as Tm,isServer as Em}from"lit";import{customElement as B0}from"lit/decorators/custom-element.js";import{property as he}from"lit/decorators/property.js";import{ifDefined as Nn}from"lit/directives/if-defined.js";ko();import{css as _0}from"lit";var x0=_0`:host {
|
|
6946
6946
|
display: inline-block;
|
|
6947
6947
|
position: absolute;
|
|
6948
6948
|
right: var(--pf-c-back-to-top--Right, var(--pf-global--spacer--2xl, 3rem));
|
|
@@ -7005,20 +7005,20 @@ span {
|
|
|
7005
7005
|
--pf-c-back-to-top--Bottom: var(--pf-c-back-to-top--md--Bottom, var(--pf-global--spacer--2xl, 3rem));
|
|
7006
7006
|
}
|
|
7007
7007
|
}
|
|
7008
|
-
`,
|
|
7009
|
-
<a href="${this.href}" ?hidden="${!i(this,
|
|
7008
|
+
`,Wm=x0;var al,et,No,ll,mr,jn,Rm,il,Ks,qn,Mm,nl,Gs,cl,Zs,ue,Wo=class extends C0{constructor(){super(...arguments);n(this,jn);n(this,il);n(this,qn);n(this,nl);n(this,cl);this.alwaysVisible=!1;this.scrollDistance=400;n(this,al,!1);n(this,et,!1);n(this,No,void 0);n(this,ll,!1);n(this,mr,new S(this));n(this,ue,()=>{if(this.alwaysVisible){_(this,et,!0),this.requestUpdate();return}let o=i(this,et);if(i(this,No)){let e=i(this,No)instanceof Window?i(this,No).scrollY:i(this,No).scrollTop;_(this,et,e>this.scrollDistance),o!==i(this,et)&&this.requestUpdate()}})}connectedCallback(){super.connectedCallback(),s(this,cl,Zs).call(this)}disconnectedCallback(){super.disconnectedCallback(),s(this,nl,Gs).call(this)}willUpdate(o){o.has("scrollableSelector")&&s(this,cl,Zs).call(this),o.has("alwaysVisible")&&i(this,ue).call(this)}render(){return this.href&&this.href.charAt(0)!=="#"&&(this.href=`#${this.href}`,i(this,mr).warn("missing hash in href fragment link")),this.href?Tm`
|
|
7009
|
+
<a href="${this.href}" ?hidden="${!i(this,et)}" part="trigger" aria-label="${Nn(i(this,il,Ks))}">
|
|
7010
7010
|
<slot name="icon"></slot>
|
|
7011
|
-
<slot @slotchange="${s(this
|
|
7011
|
+
<slot @slotchange="${s(this,qn,Mm)}"></slot>
|
|
7012
7012
|
<pf-icon icon="angle-up" set="fas"></pf-icon>
|
|
7013
7013
|
</a>
|
|
7014
|
-
`:
|
|
7014
|
+
`:Tm`
|
|
7015
7015
|
<pf-button
|
|
7016
|
-
icon="${
|
|
7017
|
-
icon-set="${
|
|
7018
|
-
?hidden="${!i(this,
|
|
7019
|
-
tabindex="${i(this,
|
|
7016
|
+
icon="${Nn(this.icon)}"
|
|
7017
|
+
icon-set="${Nn(this.iconSet)}"
|
|
7018
|
+
?hidden="${!i(this,et)}"
|
|
7019
|
+
tabindex="${i(this,et)?"0":"-1"}"
|
|
7020
7020
|
part="trigger"
|
|
7021
|
-
label="${
|
|
7021
|
+
label="${Nn(i(this,il,Ks))}"
|
|
7022
7022
|
>
|
|
7023
7023
|
<slot name="icon" slot="icon"></slot>
|
|
7024
7024
|
<span>
|
|
@@ -7026,7 +7026,7 @@ span {
|
|
|
7026
7026
|
<pf-icon icon="angle-up" set="fas"></pf-icon>
|
|
7027
7027
|
</span>
|
|
7028
7028
|
</pf-button>
|
|
7029
|
-
`}};
|
|
7029
|
+
`}};al=new WeakMap,et=new WeakMap,No=new WeakMap,ll=new WeakMap,mr=new WeakMap,jn=new WeakSet,Rm=function(){let o=null;return Em?null:(o=this.getRootNode())instanceof Document||o instanceof ShadowRoot?o:document},il=new WeakSet,Ks=function(){if(!i(this,ll))return this.label??"Back to top"},qn=new WeakSet,Mm=function(o){let a=o.currentTarget.assignedNodes();_(this,ll,a.length>0),this.requestUpdate()},nl=new WeakSet,Gs=function(){i(this,No)?.removeEventListener("scroll",i(this,ue))},cl=new WeakSet,Zs=function(){if(s(this,nl,Gs).call(this),this.scrollableSelector?.trim()===""){i(this,mr).error("scrollable-selector attribute cannot be empty");return}if(_(this,al,!!this.scrollableSelector),!Em){if(i(this,al)&&this.scrollableSelector){let o=i(this,jn,Rm)?.querySelector?.(this.scrollableSelector);if(!o){i(this,mr).error(`unable to find element with selector ${this.scrollableSelector}`);return}_(this,No,o)}else _(this,No,window);i(this,No).addEventListener("scroll",i(this,ue),{passive:!0}),i(this,ue).call(this)}},ue=new WeakMap,Wo.styles=[Wm],r([he({reflect:!0})],Wo.prototype,"icon",2),r([he({attribute:"icon-set"})],Wo.prototype,"iconSet",2),r([he({reflect:!0,type:Boolean,attribute:"always-visible"})],Wo.prototype,"alwaysVisible",2),r([he({reflect:!0,attribute:"scrollable-selector"})],Wo.prototype,"scrollableSelector",2),r([he({type:Number,attribute:"scroll-distance"})],Wo.prototype,"scrollDistance",2),r([he()],Wo.prototype,"label",2),r([he({reflect:!0})],Wo.prototype,"href",2),Wo=r([B0("pf-back-to-top")],Wo);import{LitElement as w0,html as Qs}from"lit";import{property as sl}from"lit/decorators/property.js";import{customElement as S0}from"lit/decorators/custom-element.js";import{css as y0}from"lit";var k0=y0`:host {
|
|
7030
7030
|
display: inline-block;
|
|
7031
7031
|
--pf-c-avatar--BorderColor: transparent;
|
|
7032
7032
|
--pf-c-avatar--BorderWidth: 0;
|
|
@@ -7092,25 +7092,25 @@ img {
|
|
|
7092
7092
|
--pf-c-avatar--Width: var(--pf-c-avatar--m-xl--Width);
|
|
7093
7093
|
--pf-c-avatar--Height: var(--pf-c-avatar--m-xl--Height);
|
|
7094
7094
|
}
|
|
7095
|
-
`,
|
|
7095
|
+
`,Fm=k0;var Js=class extends Event{constructor(o){super("load",{bubbles:!0});this.originalEvent=o}},Vn,Pm,rt=class extends w0{constructor(){super(...arguments);n(this,Vn);this.alt="Avatar image";this.size="sm";this.dark=!1}render(){return this.src!=null?Qs`
|
|
7096
7096
|
<img id="img"
|
|
7097
7097
|
alt="${this.alt??""}"
|
|
7098
7098
|
src=${this.src}
|
|
7099
|
-
@load="${s(this,
|
|
7100
|
-
`:this.dark?
|
|
7099
|
+
@load="${s(this,Vn,Pm)}">
|
|
7100
|
+
`:this.dark?Qs`
|
|
7101
7101
|
<svg xmlns="http://www.w3.org/2000/svg"
|
|
7102
7102
|
style="enable-background:new 0 0 36 36"
|
|
7103
7103
|
viewBox="0 0 36 36">
|
|
7104
7104
|
<style>.st1,.st2{fill-rule:evenodd;clip-rule:evenodd;fill:#6a6e73}.st2{fill:#4f5255}</style><path d="M0 0h36v36H0z" style="fill:#212427"/>
|
|
7105
7105
|
<path d="M30.5 36c-.4-3.9-1.3-9-2.9-11-1.1-1.4-2.3-2.2-3.5-2.6s-1.8-.6-6.3-.6-6.1.7-6.1.7c-1.2.4-2.4 1.2-3.4 2.6C6.7 27 5.8 32.2 5.4 36h25.1zM17.7 20.1c-3.5 0-6.4-2.9-6.4-6.4s2.9-6.4 6.4-6.4 6.4 2.9 6.4 6.4-2.8 6.4-6.4 6.4z" class="st1"/><path d="M13.3 36v-6.7c-2 .4-2.9 1.4-3.1 3.5l-.1 3.2h3.2zM22.7 36v-6.7c2 .4 2.9 1.4 3.1 3.5l.1 3.2h-3.2z" class="st2"/>
|
|
7106
7106
|
</svg>
|
|
7107
|
-
`:
|
|
7107
|
+
`:Qs`
|
|
7108
7108
|
<svg xmlns="http://www.w3.org/2000/svg" style="enable-background:new 0 0 36 36" viewBox="0 0 36 36">
|
|
7109
7109
|
<style>.st2{fill:#b8bbbe}</style><path d="M0 0h36v36H0z" style="fill-rule:evenodd;clip-rule:evenodd;fill:#f0f0f0"/>
|
|
7110
7110
|
<path d="M17.7 20.1c-3.5 0-6.4-2.9-6.4-6.4s2.9-6.4 6.4-6.4 6.4 2.9 6.4 6.4-2.8 6.4-6.4 6.4z" style="fill-rule:evenodd;clip-rule:evenodd;fill:#d2d2d2"/><path d="M13.3 36v-6.7c-2 .4-2.9 1.4-3.1 3.5l-.1 3.2h3.2z" class="st2"/>
|
|
7111
7111
|
<path d="m10.1 36 .1-3.2c.2-2.1 1.1-3.1 3.1-3.5V36h9.4v-6.7c2 .4 2.9 1.4 3.1 3.5l.1 3.2h4.7c-.4-3.9-1.3-9-2.9-11-1.1-1.4-2.3-2.2-3.5-2.6s-1.8-.6-6.3-.6-6.1.7-6.1.7c-1.2.4-2.4 1.2-3.4 2.6-1.7 1.9-2.6 7.1-3 10.9h4.7z" style="fill:#d2d2d2"/><path d="m25.9 36-.1-3.2c-.2-2.1-1.1-3.1-3.1-3.5V36h3.2z" class="st2"/>
|
|
7112
7112
|
</svg>
|
|
7113
|
-
`}};
|
|
7113
|
+
`}};Vn=new WeakSet,Pm=function(o){this.dispatchEvent(new Js(o))},rt.styles=[Fm],r([sl()],rt.prototype,"src",2),r([sl({reflect:!0})],rt.prototype,"alt",2),r([sl({reflect:!0})],rt.prototype,"size",2),r([sl({reflect:!0})],rt.prototype,"border",2),r([sl({type:Boolean,reflect:!0})],rt.prototype,"dark",2),rt=r([S0("pf-avatar")],rt);import{LitElement as $0,html as A0}from"lit";import{property as dl}from"lit/decorators/property.js";import{customElement as D0}from"lit/decorators/custom-element.js";Sr();ho();import{LitElement as Hm,html as qt}from"lit";import{customElement as W0}from"lit/decorators/custom-element.js";import{property as gr}from"lit/decorators/property.js";ho();import{css as L0}from"lit";var z0=L0`:host {
|
|
7114
7114
|
--pf-icon--size: var(--pf-c-accordion__toggle--IconSize, 10px);
|
|
7115
7115
|
|
|
7116
7116
|
color: var(--pf-c-accordion__toggle--Color, var(--pf-global--Color--100, #151515));
|
|
@@ -7242,15 +7242,15 @@ span {
|
|
|
7242
7242
|
font-weight: var(--pf-c-accordion__toggle--active-text--FontWeight,
|
|
7243
7243
|
var(--pf-global--FontWeight--semi-bold, 700));
|
|
7244
7244
|
}
|
|
7245
|
-
`,
|
|
7245
|
+
`,Im=z0;ko();var T0=l=>l instanceof HTMLElement&&!!l.tagName.match(/P|^H[1-6]/),pl=class extends Event{constructor(o,e,a){super("change",{bubbles:!0});this.expanded=o;this.toggle=e;this.accordion=a}},at,ve,br,Yn,Xn,$m,Kn,Am,Gn,Dm,po=class extends Hm{constructor(){super(...arguments);n(this,Xn);n(this,Kn);n(this,Gn);this.expanded=!1;n(this,at,void 0);n(this,ve,new S(this));n(this,br,void 0);n(this,Yn,new T(this,"accents",null))}connectedCallback(){super.connectedCallback(),this.id||=N(this.localName),s(this,Xn,$m).call(this)}render(){let o=this.headingText?.trim()??i(this,br)?.textContent?.trim(),e=qt`
|
|
7246
7246
|
<button id="button"
|
|
7247
7247
|
class="toggle"
|
|
7248
|
-
@click="${s(this,
|
|
7248
|
+
@click="${s(this,Gn,Dm)}"
|
|
7249
7249
|
aria-expanded="${String(!!this.expanded)}">
|
|
7250
|
-
<span part="text">${o??
|
|
7250
|
+
<span part="text">${o??qt`
|
|
7251
7251
|
<slot></slot>`}
|
|
7252
7252
|
</span>
|
|
7253
|
-
<span part="accents" ?hidden="${i(this,
|
|
7253
|
+
<span part="accents" ?hidden="${i(this,Yn).isEmpty("accents")}">
|
|
7254
7254
|
<slot name="accents"></slot>
|
|
7255
7255
|
</span>
|
|
7256
7256
|
<pf-icon part="icon"
|
|
@@ -7260,7 +7260,7 @@ span {
|
|
|
7260
7260
|
icon="${this.icon??"angle-right"}"
|
|
7261
7261
|
></pf-icon>
|
|
7262
7262
|
</button>
|
|
7263
|
-
`;switch(this.headingTag){case"h1":return
|
|
7263
|
+
`;switch(this.headingTag){case"h1":return qt`<h1 id="heading">${e}</h1>`;case"h2":return qt`<h2 id="heading">${e}</h2>`;case"h3":return qt`<h3 id="heading">${e}</h3>`;case"h4":return qt`<h4 id="heading">${e}</h4>`;case"h5":return qt`<h5 id="heading">${e}</h5>`;case"h6":return qt`<h6 id="heading">${e}</h6>`;default:return e}}};at=new WeakMap,ve=new WeakMap,br=new WeakMap,Yn=new WeakMap,Xn=new WeakSet,$m=async function(){this.headingText&&(this.headingTag||="h3"),_(this,br,s(this,Kn,Am).call(this)),i(this,br)!==i(this,at)&&_(this,at,void 0);do await this.updateComplete;while(!await this.updateComplete);this.hidden=!1},Kn=new WeakSet,Am=function(){if(!this.firstElementChild&&!this.firstChild)return void i(this,ve).warn("No header content provided");if(this.firstElementChild){let[o,...e]=Array.from(this.children).filter(a=>!a.hasAttribute("slot")&&T0(a));if(o)e.length&&i(this,ve).warn("Heading currently only supports 1 tag; extra tags will be ignored.");else return void i(this,ve).warn("No heading information was provided.");return o}else return i(this,at)||i(this,ve).warn("Header should contain at least 1 heading tag for correct semantics."),_(this,at,document.createElement("h3")),this.firstChild?.nodeType===Node.TEXT_NODE?i(this,at).textContent=this.firstChild.textContent:i(this,at).textContent=this.textContent,i(this,at)},Gn=new WeakSet,Dm=function(){let o=!this.expanded,e=this.closest("pf-accordion");e&&this.dispatchEvent(new pl(o,this,e))},po.styles=[Im],po.shadowRootOptions={...Hm.shadowRootOptions,delegatesFocus:!0},r([gr({reflect:!0})],po.prototype,"bordered",2),r([gr({reflect:!0})],po.prototype,"icon",2),r([gr({reflect:!0,attribute:"icon-set"})],po.prototype,"iconSet",2),r([gr({type:Boolean,reflect:!0})],po.prototype,"expanded",2),r([gr({reflect:!0,attribute:"heading-text"})],po.prototype,"headingText",2),r([gr({reflect:!0,attribute:"heading-tag"})],po.prototype,"headingTag",2),po=r([W0("pf-accordion-header")],po);import{LitElement as M0,html as F0}from"lit";import{customElement as P0}from"lit/decorators/custom-element.js";import{property as Um}from"lit/decorators/property.js";import{css as E0}from"lit";var R0=E0`:host {
|
|
7264
7264
|
display: none;
|
|
7265
7265
|
position: relative;
|
|
7266
7266
|
overflow: hidden;
|
|
@@ -7333,7 +7333,7 @@ span {
|
|
|
7333
7333
|
--pf-c-accordion__panel--content-body--before--BackgroundColor,
|
|
7334
7334
|
var(--pf-global--primary-color--100, #0066cc));
|
|
7335
7335
|
}
|
|
7336
|
-
`,
|
|
7336
|
+
`,Om=R0;var jo=class extends M0{constructor(){super(...arguments);this.expanded=!1}connectedCallback(){super.connectedCallback(),this.id||=N(this.localName),this.setAttribute("role","region")}render(){return F0`
|
|
7337
7337
|
<div tabindex="-1">
|
|
7338
7338
|
<div id="container" class="content" part="container">
|
|
7339
7339
|
<div class="body">
|
|
@@ -7341,7 +7341,7 @@ span {
|
|
|
7341
7341
|
</div>
|
|
7342
7342
|
</div>
|
|
7343
7343
|
</div>
|
|
7344
|
-
`}};
|
|
7344
|
+
`}};jo.styles=[Om],r([Um({type:Boolean,reflect:!0})],jo.prototype,"expanded",2),r([Um({reflect:!0})],jo.prototype,"bordered",2),jo=r([P0("pf-accordion-panel")],jo);import{css as I0}from"lit";var H0=I0`:host {
|
|
7345
7345
|
--pf-c-accordion--BackgroundColor: var(--pf-global--BackgroundColor--100, #fff);
|
|
7346
7346
|
--pf-c-accordion__toggle--PaddingTop: var(--pf-global--spacer--sm, 0.5rem);
|
|
7347
7347
|
--pf-c-accordion__toggle--PaddingRight: var(--pf-global--spacer--md, 1rem);
|
|
@@ -7432,8 +7432,8 @@ span {
|
|
|
7432
7432
|
display: block;
|
|
7433
7433
|
border-bottom: 1px solid var(--accordion__bordered--Color);
|
|
7434
7434
|
}
|
|
7435
|
-
`,
|
|
7435
|
+
`,Nm=H0;var op=class extends Event{constructor(o,e){super("expand",{bubbles:!0,cancelable:!0});this.toggle=o;this.panel=e}},tp=class extends Event{constructor(o,e){super("collapse",{bubbles:!0,cancelable:!0});this.toggle=o;this.panel=e}},fl,ec,rc,hr,_e,ur,Zn,ml,ep,vr,Qn,_r,Jn,xr,oc,gl,rp,bl,ap,hl,lp,ul,ip,Cr,tc,yo=class extends $0{constructor(){super(...arguments);n(this,ur);n(this,ml);n(this,vr);n(this,_r);n(this,xr);n(this,gl);n(this,bl);n(this,hl);n(this,ul);n(this,Cr);this.single=!1;this.bordered=!1;this.large=!1;this.fixed=!1;n(this,fl,new S(this));n(this,ec,!1);n(this,rc,new MutationObserver(()=>s(this,ml,ep).call(this)));n(this,hr,co.of(this,{getItems:()=>this.headers}));n(this,_e,[]);this.expandedSets=new Set}get expandedIndex(){return i(this,_e)}set expandedIndex(o){let e=i(this,_e);_(this,_e,o),i(this,hr).atFocusedItemIndex=o.at(-1)??-1,JSON.stringify(e)!==JSON.stringify(o)&&(this.requestUpdate("expandedIndex",e),this.collapseAll().then(async()=>{for(let a of this.expandedIndex)await this.expand(a)}))}get headers(){return s(this,hl,lp).call(this)}get panels(){return s(this,ul,ip).call(this)}connectedCallback(){super.connectedCallback(),i(this,rc).observe(this,{childList:!0}),s(this,ml,ep).call(this)}render(){return A0`
|
|
7436
7436
|
<slot></slot>
|
|
7437
|
-
`}async firstUpdated(){let o,{headers:e,single:a}=this,c=e.filter(p=>p.hasAttribute("expanded")).pop();c&&(o=e.indexOf(c)),e.forEach((p,f)=>{if(p.expanded&&(!a||f===o)){s(this,
|
|
7437
|
+
`}async firstUpdated(){let o,{headers:e,single:a}=this,c=e.filter(p=>p.hasAttribute("expanded")).pop();c&&(o=e.indexOf(c)),e.forEach((p,f)=>{if(p.expanded&&(!a||f===o)){s(this,_r,Jn).call(this,p,f);let v=s(this,vr,Qn).call(this,p);v&&s(this,xr,oc).call(this,v)}})}async getUpdateComplete(){let o=await super.getUpdateComplete(),e=await Promise.all([...s(this,hl,lp).call(this).map(a=>a.updateComplete),...s(this,ul,ip).call(this).map(a=>a.updateComplete)]);return o&&e.every(Boolean)}largeChanged(){for(let o of[...this.headers,...this.panels])o.toggleAttribute("large",this.large)}updateActiveHeader(){i(this,ur,Zn)&&i(this,ur,Zn)!==this.headers.at(i(this,hr).atFocusedItemIndex)&&(i(this,hr).atFocusedItemIndex=this.headers.indexOf(i(this,ur,Zn)))}onChange(o){if(o instanceof pl&&o.accordion===this){let e=s(this,Cr,tc).call(this,o.target);o.expanded?this.expand(e):this.collapse(e),o.stopPropagation()}}updateAccessibility(){let{headers:o}=this;o.forEach(e=>{let a=s(this,vr,Qn).call(this,e);a&&(e.setAttribute("aria-controls",a.id),a.setAttribute("aria-labelledby",e.id),a.hidden=!a.expanded)})}async expand(o){if(o===-1)return;this.single&&await Promise.all([...this.headers.map((c,p)=>c.expanded&&this.collapse(p))]);let e=this.headers[o];if(!e)return;let a=s(this,vr,Qn).call(this,e);a&&(s(this,_r,Jn).call(this,e,o),s(this,xr,oc).call(this,a),this.dispatchEvent(new op(e,a)),await this.updateComplete)}async collapse(o){let e=this.headers.at(o),a=this.panels.at(o);!e||!a||(s(this,gl,rp).call(this,e),s(this,bl,ap).call(this,a),this.dispatchEvent(new tp(e,a)),await this.updateComplete)}async toggle(o){let{headers:e}=this;e[o].expanded?await this.collapse(o):await this.expand(o)}async expandAll(){this.headers.forEach(o=>s(this,_r,Jn).call(this,o)),this.panels.forEach(o=>s(this,xr,oc).call(this,o)),await this.updateComplete}async collapseAll(){this.headers.forEach(o=>s(this,gl,rp).call(this,o)),this.panels.forEach(o=>s(this,bl,ap).call(this,o)),await this.updateComplete}};fl=new WeakMap,ec=new WeakMap,rc=new WeakMap,hr=new WeakMap,_e=new WeakMap,ur=new WeakSet,Zn=function(){let{headers:o}=this,e=o.findIndex(a=>a.matches(":focus,:focus-within"));return e>-1?o.at(e):void 0},ml=new WeakSet,ep=async function(){i(this,ec)||_(this,ec,!!await this.updateComplete),this.updateAccessibility()},vr=new WeakSet,Qn=function(o){let e=o.nextElementSibling;return e instanceof jo?e:void i(this,fl).error("Sibling element to a header needs to be a panel")},_r=new WeakSet,Jn=function(o,e=s(this,Cr,tc).call(this,o)){this.expandedSets.add(e),_(this,_e,[...this.expandedSets]),o.expanded=!0},xr=new WeakSet,oc=function(o){o.expanded=!0,o.hidden=!1},gl=new WeakSet,rp=async function(o,e=s(this,Cr,tc).call(this,o)){this.expandedSets||await this.updateComplete,this.expandedSets.delete(e),o.expanded=!1,await o.updateComplete},bl=new WeakSet,ap=async function(o){await o.updateComplete,o.expanded&&(o.expanded=!1,o.hidden=!0)},hl=new WeakSet,lp=function(o=this){return Array.from(o.children??[]).filter(e=>e instanceof po)},ul=new WeakSet,ip=function(o=this){return Array.from(o.children??[]).filter(e=>e instanceof jo)},Cr=new WeakSet,tc=function(o){return o instanceof po?this.headers.findIndex(e=>e.id===o.id):o instanceof jo?this.panels.findIndex(e=>e.id===o.id):(i(this,fl).warn("The #getIndex method expects to receive a header or panel element."),-1)},yo.styles=[Nm],r([dl({reflect:!0,type:Boolean})],yo.prototype,"single",2),r([dl({type:Boolean,reflect:!0})],yo.prototype,"bordered",2),r([dl({type:Boolean,reflect:!0})],yo.prototype,"large",2),r([dl({type:Boolean,reflect:!0})],yo.prototype,"fixed",2),r([dl({attribute:"expanded-index",converter:pp})],yo.prototype,"expandedIndex",1),r([L("large")],yo.prototype,"largeChanged",1),r([Rc("focusin")],yo.prototype,"updateActiveHeader",1),r([Rc("change")],yo.prototype,"onChange",1),yo=r([D0("pf-accordion")],yo);export{Va as DropdownItemChange,oi as IconResolveError,ws as LabelCloseEvent,Bs as ModalCancelEvent,ys as ModalCloseEvent,ks as ModalOpenEvent,yo as PfAccordion,tp as PfAccordionCollapseEvent,op as PfAccordionExpandEvent,po as PfAccordionHeader,pl as PfAccordionHeaderChangeEvent,jo as PfAccordionPanel,rt as PfAvatar,Js as PfAvatarLoadEvent,Wo as PfBackToTop,zo as PfBackgroundImage,kt as PfBadge,jt as PfBanner,F as PfButton,na as PfCaption,Tt as PfCard,yt as PfChip,ao as PfChipGroup,qs as PfChipGroupExpandEvent,Fn as PfChipGroupRemoveEvent,le as PfChipRemoveEvent,q as PfClipboardCopy,Us as PfClipboardCopyCopiedEvent,cr as PfCodeBlock,Oo as PfDropdown,zt as PfDropdownGroup,j as PfDropdownItem,Do as PfDropdownMenu,Hs as PfDropdownSelectEvent,W as PfIcon,$o as PfJumpLinks,Ho as PfJumpLinksItem,qa as PfJumpLinksList,Bo as PfLabel,M as PfModal,so as PfOption,ie as PfOptionGroup,ce as PfPanel,B as PfPopover,xo as PfProgress,Io as PfProgressStep,tt as PfProgressStepper,k as PfSelect,ns as PfSelectChangeEvent,te as PfSpinner,Qo as PfSwitch,Fo as PfTab,Ee as PfTabPanel,Zo as PfTable,K as PfTabs,ia as PfTbody,vt as PfTd,io as PfTextArea,R as PfTextInput,wo as PfTh,He as PfThead,Xt as PfTile,fo as PfTimestamp,go as PfTooltip,ut as PfTr,us as PopoverHiddenEvent,hs as PopoverHideEvent,vs as PopoverShowEvent,_s as PopoverShownEvent,$t as RequestExpandEvent,la as RequestSortEvent};
|
|
7438
7438
|
/*! For license information please see pfe.min.js.LEGAL.txt */
|
|
7439
7439
|
//# sourceMappingURL=pfe.min.js.map
|