@patternfly/pfe-accordion
Advanced tools
Comparing version 2.0.0-next.6 to 2.0.0-next.7
@@ -1,2 +0,2 @@ | ||
var J=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var h=(n,s,e,t)=>{for(var r=t>1?void 0:t?Q(s,e):s,o=n.length-1,i;o>=0;o--)(i=n[o])&&(r=(t?i(s,e,r):i(r))||r);return t&&r&&J(s,e,r),r};var U=(n,s,e)=>{if(!s.has(n))throw TypeError("Cannot "+e)};var p=(n,s,e)=>(U(n,s,"read from private field"),e?e.call(n):s.get(n)),d=(n,s,e)=>{if(s.has(n))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(n):s.set(n,e)},z=(n,s,e,t)=>(U(n,s,"write to private field"),t?t.call(n,e):s.set(n,e),e);var a=(n,s,e)=>(U(n,s,"access private method"),e);import{LitElement as Y,html as V}from"lit";import{property as v,state as ee}from"lit/decorators.js";import{bound as E,colorContextConsumer as te,colorContextProvider as re,deprecation as ae,initializer as se,observed as N}from"@patternfly/pfe-core/decorators.js";import{NumberListConverter as ne,ComposedEvent as $}from"@patternfly/pfe-core";import"@patternfly/pfe-core/functions/deprecatedCustomEvent.js";import{Logger as ie}from"@patternfly/pfe-core/controllers/logger.js";import{css as W}from"lit";var X=W`:host{color:var(--pf-global--Color--100,#151515);background-color:var(--pf-global--BackgroundColor--100,#fff)}`,M=X;import{BaseAccordionHeader as oe}from"./BaseAccordionHeader.js";import{BaseAccordionPanel as le}from"./BaseAccordionPanel.js";var de=/^[0-9.]+(?<unit>[a-zA-Z]+)/g,T=class extends ${constructor(e,t){super("expand");this.toggle=e;this.panel=t}},D=class extends ${constructor(e,t){super("collapse");this.toggle=e;this.panel=t}},y,m,L,w,_,F,I,O,c,u,g,b,S,j,R,G,k,K,B,Z,H,C,f=class extends Y{constructor(){super(...arguments);d(this,_);d(this,I);d(this,c);d(this,g);d(this,S);d(this,R);d(this,k);d(this,B);d(this,H);this.on="light";this.history=!1;this.expandedIndex=[];this._updateHistory=!0;d(this,y,new Set);this.initialized=!1;d(this,m,new ie(this));d(this,L,getComputedStyle(this));d(this,w,a(this,_,F).call(this))}static isHeader(e){return e instanceof oe}static isPanel(e){return e instanceof le}connectedCallback(){super.connectedCallback(),this.addEventListener("change",this._changeHandler),this.addEventListener("keydown",a(this,I,O))}render(){return V`<slot></slot>`}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("popstate",this._updateStateFromURL)}isAccordionPanel(e){return e instanceof Element}_panelForHeader(e){let t=e.nextElementSibling;if(!!t){if(!this.isAccordionPanel(t)){p(this,m).error("Sibling element to a header needs to be a panel");return}return t}}async _init(){this.initialized||(await this.updateComplete,this.initialized=!0),this.updateAccessibility(),this._updateStateFromURL()}_changeHandler(e){if(this.classList.contains("animating"))return;let t=a(this,H,C).call(this,e.target);e.expanded?this.expand(t,e.accordion):this.collapse(t),this._updateURLHistory()}_expandHeader(e,t){t===void 0&&(t=a(this,H,C).call(this,e)),p(this,y).add(t),e.expanded=!0}async _expandPanel(e){if(!e){p(this,m).error("Trying to expand a panel that doesn't exist.");return}if(e.expanded)return;e.expanded=!0,e.hidden=!1,await e.updateComplete;let t=e.getBoundingClientRect();this._animate(e,0,t.height)}_collapseHeader(e){let t=a(this,H,C).call(this,e);p(this,y).delete(t),e.expanded=!1}async _collapsePanel(e){if(!e){p(this,m).error("Trying to collapse a panel that doesn't exist");return}if(await e.updateComplete,!e.expanded)return;let t=e.getBoundingClientRect();e.expanded=!1,e.hidden=!0,this._animate(e,t.height,0)}async _animate(e,t,r){if(e){let o=e.previousElementSibling,i=a(this,_,F).call(this);i&&z(this,w,i);let P=p(this,w)??0;o?.classList.add("animating"),e.classList.add("animating");let A=e.animate({height:[`${t}px`,`${r}px`]},{duration:P});A.play(),await A.finished,o?.classList.remove("animating"),e.classList.remove("animating"),e.style.removeProperty("height"),e.hidden=!e.expanded}}async _expandedIndexChanged(e,t){await this.updateComplete,!(e===t||!Array.isArray(t))&&[...t].reverse().forEach(r=>this.expand(r-1))}_getIndexesFromURL(){let e=new URLSearchParams(window.location.search);if(e.has(this.id)){let r=(e.get(this.id)??"").split("-");return r.length<0?[]:r.map(o=>parseInt(o.trim(),10)-1)}}_updateURLHistory(){if(!this.history||!this._updateHistory)return;if(!this.id){p(this,m).error("The history feature cannot update the URL without an ID added to the accordion tag.");return}let e=Array.from(p(this,y),r=>r+1).sort((r,o)=>r-o).join("-"),t=new URL(window.location.href);p(this,y).size>0?t.searchParams.set(this.id,e):t.searchParams.delete(this.id),history.replaceState({},"",t.toString())}_updateStateFromURL(){let e=this._getIndexesFromURL()??[];this._updateHistory=!1,e.forEach(t=>this.expand(t)),this._updateHistory=!0}updateAccessibility(){a(this,c,u).call(this).forEach(t=>{let r=this._panelForHeader(t);r&&(t.setAttribute("aria-controls",r.id),r.setAttribute("aria-labelledby",t.id),r.hidden=!r.expanded)})}toggle(e){a(this,c,u).call(this)[e].expanded?this.collapse(e):this.expand(e)}expand(e,t){if(e==null||(e=parseInt(`${e}`,10),e===-1))return;let r=a(this,c,u).call(this,t),o=a(this,g,b).call(this,t);if(this.single==="true"&&this._updateHistory){let A=r.filter(x=>x.expanded),q=o.filter(x=>x.expanded);A.forEach(x=>this._collapseHeader(x)),q.forEach(x=>this._collapsePanel(x))}let i=r[e];if(!i)return;let P=this._panelForHeader(i);!i||!P||(this._expandHeader(i,e),this._expandPanel(P),i.focus(),this.dispatchEvent(new T(i,P)))}expandAll(){let e=a(this,c,u).call(this),t=a(this,g,b).call(this);e.forEach(r=>this._expandHeader(r)),t.forEach(r=>this._expandPanel(r))}collapse(e){let t=a(this,c,u).call(this),r=a(this,g,b).call(this),o=t[e],i=r[e];!o||!i||(this._collapseHeader(o),this._collapsePanel(i),this.dispatchEvent(new D(o,i)))}async collapseAll(){let e=a(this,c,u).call(this),t=a(this,g,b).call(this);await e.forEach(r=>this._collapseHeader(r)),await t.forEach(r=>this._collapsePanel(r))}},l=f;y=new WeakMap,m=new WeakMap,L=new WeakMap,w=new WeakMap,_=new WeakSet,F=function(){if("computedStyleMap"in this)return this.computedStyleMap().get("transition-duration")?.to("ms").value;{let{transitionDuration:e}=p(this,L),t=de.exec(e)?.groups;if(!t)return 0;let r=parseFloat(e);return t.unit==="s"?r*1e3:r}},I=new WeakSet,O=async function(e){let t=e.target;if(!f.isHeader(t))return;let r;switch(e.key){case"ArrowDown":e.preventDefault(),r=a(this,R,G).call(this);break;case"ArrowUp":e.preventDefault(),r=a(this,S,j).call(this);break;case"Home":e.preventDefault(),r=a(this,k,K).call(this);break;case"End":e.preventDefault(),r=a(this,B,Z).call(this);break;default:return}r?.focus?.()},c=new WeakSet,u=function(e){return e!==void 0?Array.from(e.children).filter(f.isHeader):Array.from(this.children).filter(f.isHeader)},g=new WeakSet,b=function(e){return e!==void 0?Array.from(e.children).filter(f.isPanel):Array.from(this.children).filter(f.isPanel)},S=new WeakSet,j=function(){let e=a(this,c,u).call(this),t=e.findIndex(r=>r.matches(":focus,:focus-within"))-1;return e[(t+e.length)%e.length]},R=new WeakSet,G=function(){let e=a(this,c,u).call(this),t=e.findIndex(r=>r.matches(":focus,:focus-within"))+1;return e[t%e.length]},k=new WeakSet,K=function(){return a(this,c,u).call(this)[0]},B=new WeakSet,Z=function(){let e=a(this,c,u).call(this);return e[e.length-1]},H=new WeakSet,C=function(e){return f.isHeader(e)?a(this,c,u).call(this).findIndex(r=>r.id===e.id):f.isPanel(e)?a(this,g,b).call(this).findIndex(r=>r.id===e.id):(p(this,m).warn("The _getIndex method expects to receive a header or panel element."),-1)},l.styles=[M],h([re(),v({reflect:!0,attribute:"color-palette"})],l.prototype,"colorPalette",2),h([ae({alias:"colorPalette",attribute:"color"})],l.prototype,"color",2),h([te(),v({reflect:!0})],l.prototype,"on",2),h([v({reflect:!0})],l.prototype,"single",2),h([N,v({type:Boolean})],l.prototype,"history",2),h([N,v({attribute:"expanded-index",converter:ne})],l.prototype,"expandedIndex",2),h([ee()],l.prototype,"_updateHistory",2),h([se()],l.prototype,"_init",1),h([E],l.prototype,"_changeHandler",1),h([E],l.prototype,"_getIndexesFromURL",1),h([E],l.prototype,"_updateURLHistory",1),h([E],l.prototype,"_updateStateFromURL",1);export{D as AccordionCollapseEvent,T as AccordionExpandEvent,l as BaseAccordion}; | ||
var J=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var h=(n,s,e,t)=>{for(var r=t>1?void 0:t?Q(s,e):s,o=n.length-1,i;o>=0;o--)(i=n[o])&&(r=(t?i(s,e,r):i(r))||r);return t&&r&&J(s,e,r),r};var B=(n,s,e)=>{if(!s.has(n))throw TypeError("Cannot "+e)};var p=(n,s,e)=>(B(n,s,"read from private field"),e?e.call(n):s.get(n)),l=(n,s,e)=>{if(s.has(n))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(n):s.set(n,e)},z=(n,s,e,t)=>(B(n,s,"write to private field"),t?t.call(n,e):s.set(n,e),e);var a=(n,s,e)=>(B(n,s,"access private method"),e);import{LitElement as Y,html as V}from"lit";import{property as w,state as ee}from"lit/decorators.js";import{bound as E,colorContextConsumer as te,colorContextProvider as re,deprecation as ae,initializer as se,observed as N}from"@patternfly/pfe-core/decorators.js";import{NumberListConverter as ne,ComposedEvent as $}from"@patternfly/pfe-core";import{Logger as ie}from"@patternfly/pfe-core/controllers/logger.js";import{css as W}from"lit";var X=W``,M=X;import{BaseAccordionHeader as oe}from"./BaseAccordionHeader.js";import{BaseAccordionPanel as de}from"./BaseAccordionPanel.js";var le=/^[0-9.]+(?<unit>[a-zA-Z]+)/g,T=class extends ${constructor(e,t){super("expand");this.toggle=e;this.panel=t}},D=class extends ${constructor(e,t){super("collapse");this.toggle=e;this.panel=t}},y,m,L,_,v,F,I,O,c,u,g,b,S,j,R,G,U,K,k,Z,H,C,f=class extends Y{constructor(){super(...arguments);l(this,v);l(this,I);l(this,c);l(this,g);l(this,S);l(this,R);l(this,U);l(this,k);l(this,H);this.on="light";this.history=!1;this.expandedIndex=[];this._updateHistory=!0;l(this,y,new Set);this.initialized=!1;l(this,m,new ie(this));l(this,L,getComputedStyle(this));l(this,_,a(this,v,F).call(this))}static isHeader(e){return e instanceof oe}static isPanel(e){return e instanceof de}connectedCallback(){super.connectedCallback(),this.addEventListener("change",this._changeHandler),this.addEventListener("keydown",a(this,I,O))}render(){return V`<slot></slot>`}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("popstate",this._updateStateFromURL)}isAccordionPanel(e){return e instanceof Element}_panelForHeader(e){let t=e.nextElementSibling;if(!!t){if(!this.isAccordionPanel(t)){p(this,m).error("Sibling element to a header needs to be a panel");return}return t}}async _init(){this.initialized||(await this.updateComplete,this.initialized=!0),this.updateAccessibility(),this._updateStateFromURL()}_changeHandler(e){if(this.classList.contains("animating"))return;let t=a(this,H,C).call(this,e.target);e.expanded?this.expand(t,e.accordion):this.collapse(t),this._updateURLHistory()}_expandHeader(e,t){t===void 0&&(t=a(this,H,C).call(this,e)),p(this,y).add(t),e.expanded=!0}async _expandPanel(e){if(!e){p(this,m).error("Trying to expand a panel that doesn't exist.");return}if(e.expanded)return;e.expanded=!0,e.hidden=!1,await e.updateComplete;let t=e.getBoundingClientRect();this._animate(e,0,t.height)}_collapseHeader(e){let t=a(this,H,C).call(this,e);p(this,y).delete(t),e.expanded=!1}async _collapsePanel(e){if(!e){p(this,m).error("Trying to collapse a panel that doesn't exist");return}if(await e.updateComplete,!e.expanded)return;let t=e.getBoundingClientRect();e.expanded=!1,e.hidden=!0,this._animate(e,t.height,0)}async _animate(e,t,r){if(e){let o=e.previousElementSibling,i=a(this,v,F).call(this);i&&z(this,_,i);let P=p(this,_)??0;o?.classList.add("animating"),e.classList.add("animating");let A=e.animate({height:[`${t}px`,`${r}px`]},{duration:P});A.play(),await A.finished,o?.classList.remove("animating"),e.classList.remove("animating"),e.style.removeProperty("height"),e.hidden=!e.expanded}}async _expandedIndexChanged(e,t){await this.updateComplete,!(e===t||!Array.isArray(t))&&[...t].reverse().forEach(r=>this.expand(r-1))}_getIndexesFromURL(){let e=new URLSearchParams(window.location.search);if(e.has(this.id)){let r=(e.get(this.id)??"").split("-");return r.length<0?[]:r.map(o=>parseInt(o.trim(),10)-1)}}_updateURLHistory(){if(!this.history||!this._updateHistory)return;if(!this.id){p(this,m).error("The history feature cannot update the URL without an ID added to the accordion tag.");return}let e=Array.from(p(this,y),r=>r+1).sort((r,o)=>r-o).join("-"),t=new URL(window.location.href);p(this,y).size>0?t.searchParams.set(this.id,e):t.searchParams.delete(this.id),history.replaceState({},"",t.toString())}_updateStateFromURL(){let e=this._getIndexesFromURL()??[];this._updateHistory=!1,e.forEach(t=>this.expand(t)),this._updateHistory=!0}updateAccessibility(){a(this,c,u).call(this).forEach(t=>{let r=this._panelForHeader(t);r&&(t.setAttribute("aria-controls",r.id),r.setAttribute("aria-labelledby",t.id),r.hidden=!r.expanded)})}toggle(e){a(this,c,u).call(this)[e].expanded?this.collapse(e):this.expand(e)}expand(e,t){if(e==null||(e=parseInt(`${e}`,10),e===-1))return;let r=a(this,c,u).call(this,t),o=a(this,g,b).call(this,t);if(this.single==="true"&&this._updateHistory){let A=r.filter(x=>x.expanded),q=o.filter(x=>x.expanded);A.forEach(x=>this._collapseHeader(x)),q.forEach(x=>this._collapsePanel(x))}let i=r[e];if(!i)return;let P=this._panelForHeader(i);!i||!P||(this._expandHeader(i,e),this._expandPanel(P),i.focus(),this.dispatchEvent(new T(i,P)))}expandAll(){let e=a(this,c,u).call(this),t=a(this,g,b).call(this);e.forEach(r=>this._expandHeader(r)),t.forEach(r=>this._expandPanel(r))}collapse(e){let t=a(this,c,u).call(this),r=a(this,g,b).call(this),o=t[e],i=r[e];!o||!i||(this._collapseHeader(o),this._collapsePanel(i),this.dispatchEvent(new D(o,i)))}async collapseAll(){let e=a(this,c,u).call(this),t=a(this,g,b).call(this);await e.forEach(r=>this._collapseHeader(r)),await t.forEach(r=>this._collapsePanel(r))}},d=f;y=new WeakMap,m=new WeakMap,L=new WeakMap,_=new WeakMap,v=new WeakSet,F=function(){if("computedStyleMap"in this)return this.computedStyleMap().get("transition-duration")?.to("ms").value;{let{transitionDuration:e}=p(this,L),t=le.exec(e)?.groups;if(!t)return 0;let r=parseFloat(e);return t.unit==="s"?r*1e3:r}},I=new WeakSet,O=async function(e){let t=e.target;if(!f.isHeader(t))return;let r;switch(e.key){case"ArrowDown":e.preventDefault(),r=a(this,R,G).call(this);break;case"ArrowUp":e.preventDefault(),r=a(this,S,j).call(this);break;case"Home":e.preventDefault(),r=a(this,U,K).call(this);break;case"End":e.preventDefault(),r=a(this,k,Z).call(this);break;default:return}r?.focus?.()},c=new WeakSet,u=function(e){return e!==void 0?Array.from(e.children).filter(f.isHeader):Array.from(this.children).filter(f.isHeader)},g=new WeakSet,b=function(e){return e!==void 0?Array.from(e.children).filter(f.isPanel):Array.from(this.children).filter(f.isPanel)},S=new WeakSet,j=function(){let e=a(this,c,u).call(this),t=e.findIndex(r=>r.matches(":focus,:focus-within"))-1;return e[(t+e.length)%e.length]},R=new WeakSet,G=function(){let e=a(this,c,u).call(this),t=e.findIndex(r=>r.matches(":focus,:focus-within"))+1;return e[t%e.length]},U=new WeakSet,K=function(){return a(this,c,u).call(this)[0]},k=new WeakSet,Z=function(){let e=a(this,c,u).call(this);return e[e.length-1]},H=new WeakSet,C=function(e){return f.isHeader(e)?a(this,c,u).call(this).findIndex(r=>r.id===e.id):f.isPanel(e)?a(this,g,b).call(this).findIndex(r=>r.id===e.id):(p(this,m).warn("The _getIndex method expects to receive a header or panel element."),-1)},d.styles=[M],h([re(),w({reflect:!0,attribute:"color-palette"})],d.prototype,"colorPalette",2),h([ae({alias:"colorPalette",attribute:"color"})],d.prototype,"color",2),h([te(),w({reflect:!0})],d.prototype,"on",2),h([w({reflect:!0})],d.prototype,"single",2),h([N,w({type:Boolean})],d.prototype,"history",2),h([N,w({attribute:"expanded-index",converter:ne})],d.prototype,"expandedIndex",2),h([ee()],d.prototype,"_updateHistory",2),h([se()],d.prototype,"_init",1),h([E],d.prototype,"_changeHandler",1),h([E],d.prototype,"_getIndexesFromURL",1),h([E],d.prototype,"_updateURLHistory",1),h([E],d.prototype,"_updateStateFromURL",1);export{D as AccordionCollapseEvent,T as AccordionExpandEvent,d as BaseAccordion}; | ||
//# sourceMappingURL=BaseAccordion.js.map |
@@ -23,3 +23,4 @@ import { LitElement } from 'lit'; | ||
bordered?: 'true' | 'false'; | ||
icon?: string | undefined; | ||
icon?: string; | ||
iconSet?: string; | ||
expanded: boolean; | ||
@@ -26,0 +27,0 @@ headingText: string; |
@@ -1,5 +0,5 @@ | ||
var m=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var o=(n,l,t,r)=>{for(var a=r>1?void 0:r?u(l,t):l,g=n.length-1,c;g>=0;g--)(c=n[g])&&(a=(r?c(l,t,a):c(a))||a);return r&&a&&m(l,t,a),a};import{LitElement as f,html as s}from"lit";import{property as i,query as b}from"lit/decorators.js";import{unsafeStatic as x,html as C}from"lit/static-html.js";import{ifDefined as w}from"lit/directives/if-defined.js";import{ComposedEvent as y}from"@patternfly/pfe-core";import{bound as h,observed as T,initializer as k,colorContextConsumer as E}from"@patternfly/pfe-core/decorators.js";import{getRandomId as F}from"@patternfly/pfe-core/functions/random.js";import{SlotController as L}from"@patternfly/pfe-core/controllers/slot-controller.js";import{Logger as S}from"@patternfly/pfe-core/controllers/logger.js";import{css as v}from"lit";var _=v`:host{--pfe-icon--size:var(--pf-c-accordion__toggle--IconSize, 10px);color:var(--pf-c-accordion__toggle--Color,var(--pf-global--Color--100,#151515));background-color:var(--pf-global--BackgroundColor--100,#fff)}#heading{font-size:100%;padding:0;margin:0;font-weight:var(--pf-c-accordion__toggle--FontWeight,var(--pf-global--FontWeight--normal,400))}a,button{cursor:pointer}.toggle,.toggle:after,.toggle:before{padding:0;margin:0;background-color:var(--pf-c-accordion__toggle--BackgroundColor,transparent)}.icon{transition:var(--pf-c-accordion__toggle-icon--Transition, .2s ease-in 0s)}.toggle{position:relative;display:flex;align-items:center;justify-content:space-between;width:100%;border:0;padding:var(--pf-c-accordion__toggle--PaddingTop,var(--pf-global--spacer--sm,.5rem)) var(--pf-c-accordion__toggle--PaddingRight,var(--pf-global--spacer--md,1rem)) var(--pf-c-accordion__toggle--PaddingBottom,var(--pf-global--spacer--sm,.5rem)) var(--pf-c-accordion__toggle--PaddingLeft,var(--pf-global--spacer--md,1rem));font-family:var(--pf-c-accordion__toggle--FontFamily, var(--pf-global--FontFamily--redhat-updated--heading--sans-serif, "RedHatTextUpdated", helvetica, arial, sans-serif));font-size:var(--pf-c-accordion__toggle--FontSize, var(--pf-global--FontSize--lg, 1rem));font-weight:var(--pf-c-accordion__toggle--FontWeight,var(--pf-global--FontWeight--normal,400));color:var(--pf-c-accordion__toggle--Color,var(--pf-global--Color--100,#151515))}.toggle[aria-expanded=true]{--pf-c-accordion__toggle--after--BackgroundColor:var(--pf-c-accordion__toggle--expanded--before--BackgroundColor, var(--pf-global--primary-color--100, #0066cc))}.toggle:after{content:"";position:absolute;bottom:0;left:0;top:var(--pf-c-accordion__toggle--before--Top,0);width:var(--pf-c-accordion__toggle--before--Width,var(--pf-global--BorderWidth--lg,3px));background-color:var(--pf-c-accordion__toggle--after--BackgroundColor,transparent)}span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--pf-c-accordion__toggle-text--MaxWidth,calc(100% - var(--pf-global--spacer--lg,1.5rem)))}.toggle[aria-expanded=true] .icon{rotate:var(--pf-c-accordion__toggle--expanded-icon--Rotate,90deg)}.toggle:active,.toggle:focus,.toggle:hover{background-color:var(--pf-c-accordion__toggle--active--BackgroundColor,var(--pf-global--BackgroundColor--200,#f0f0f0))}.toggle:active span,.toggle:focus span,.toggle:hover span{color:var(--pf-c-accordion__toggle--active-text--Color,var(--pf-global--link--Color,#06c))}.toggle:active span,.toggle:focus span{font-weight:var(--pf-c-accordion__toggle--active-text--FontWeight,var(--pf-global--FontWeight--semi-bold,700))}`,p=_;import"@patternfly/pfe-icon";var H=n=>n instanceof HTMLElement&&!!n.tagName.match(/P|^H[1-6]/),d=class extends y{constructor(t,r,a){super("change");this.expanded=t;this.toggle=r;this.accordion=a}},e=class extends f{constructor(){super();this.icon="web-icon-caret-thin-right";this.expanded=!1;this.headingText="";this.headingTag="h3";this.slots=new L(this,"accents",null);this.logger=new S(this);this.addEventListener("click",this._clickHandler)}get ariaExpandedState(){return String(!!this.expanded)}connectedCallback(){super.connectedCallback(),this.hidden=!0,this.id||(this.id=F("pfe-accordion"))}async _init(){let t=await this._getHeaderElement();t!==this._generatedHtag&&(this._generatedHtag=void 0),this.headingTag=t?.tagName.toLowerCase()??"h3",this.headingText=t?.textContent?.trim()??"",this.hidden=!1}render(){let t=x(this.headingTag);return C` | ||
<${t} id="heading">${s`<button id="button" aria-expanded="${this.ariaExpandedState}" class="toggle"><span part="text">${this.headingText||s`<slot></slot>`} </span>${this.slots.hasSlotted("accents")?s`<span part="accents"><slot name="accents"></slot></span>`:""}<pfe-icon icon="${w(this.icon)}" on-fail="collapse" part="icon" class="icon" size="1x"></pfe-icon></button>`} | ||
</${t}> | ||
`}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._clickHandler)}async _getHeaderElement(){if(await this.updateComplete,!this.firstElementChild&&!this.firstChild)return void this.logger.warn("No header content provided");if(this.firstElementChild){let[t,...r]=this.slots.getSlotted().filter(H);if(t)r.length&&this.logger.warn("Heading currently only supports 1 tag; extra tags will be ignored.");else return void this.logger.warn("No heading information was provided.");return t}else return this._generatedHtag||this.logger.warn("Header should contain at least 1 heading tag for correct semantics."),this._generatedHtag=document.createElement("h3"),this.firstChild?.nodeType===Node.TEXT_NODE?this._generatedHtag.textContent=this.firstChild.textContent:this._generatedHtag.textContent=this.textContent,this._generatedHtag}_clickHandler(t){let r=!this.expanded,a=t.composedPath().find(g=>g.tagName==="PFE-ACCORDION");this.dispatchEvent(new d(r,this,a))}_expandedChanged(){this.button?.setAttribute("aria-expanded",this.ariaExpandedState)}};e.version="{{version}}",e.styles=[p],e.shadowRootOptions={...f.shadowRootOptions,delegatesFocus:!0},o([i({attribute:"aria-controls",reflect:!0})],e.prototype,"ariaControls",2),o([i({reflect:!0})],e.prototype,"bordered",2),o([i({reflect:!0})],e.prototype,"icon",2),o([T,i({type:Boolean,reflect:!0})],e.prototype,"expanded",2),o([i({reflect:!0,attribute:"heading-text"})],e.prototype,"headingText",2),o([i({reflect:!0,attribute:"heading-tag"})],e.prototype,"headingTag",2),o([E(),i({reflect:!0})],e.prototype,"on",2),o([b(".toggle")],e.prototype,"button",2),o([k()],e.prototype,"_init",1),o([h],e.prototype,"_getHeaderElement",1),o([h],e.prototype,"_clickHandler",1);export{d as AccordionHeaderChangeEvent,e as BaseAccordionHeader}; | ||
var f=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var i=(o,s,e,r)=>{for(var n=r>1?void 0:r?u(s,e):s,l=o.length-1,d;l>=0;l--)(d=o[l])&&(n=(r?d(s,e,n):d(n))||n);return r&&n&&f(s,e,n),n};import{LitElement as c,html as g}from"lit";import{property as a,query as C}from"lit/decorators.js";import{unsafeStatic as v,html as y}from"lit/static-html.js";import"lit/directives/if-defined.js";import{ComposedEvent as w}from"@patternfly/pfe-core";import{bound as m,observed as E,initializer as T,colorContextConsumer as _}from"@patternfly/pfe-core/decorators.js";import{getRandomId as L}from"@patternfly/pfe-core/functions/random.js";import{SlotController as S}from"@patternfly/pfe-core/controllers/slot-controller.js";import{Logger as k}from"@patternfly/pfe-core/controllers/logger.js";import{css as x}from"lit";var b=x`#heading{font-size:100%;padding:0;margin:0}a,button{cursor:pointer}.toggle,.toggle:after,.toggle:before{padding:0;margin:0}.toggle{position:relative;display:flex;align-items:center;justify-content:space-between;width:100%;border:0}.toggle:after{content:"";position:absolute;bottom:0;left:0}span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}`,p=b;import"@patternfly/pfe-icon";var N=o=>o instanceof HTMLElement&&!!o.tagName.match(/P|^H[1-6]/),h=class extends w{constructor(e,r,n){super("change");this.expanded=e;this.toggle=r;this.accordion=n}},t=class extends c{constructor(){super();this.expanded=!1;this.headingText="";this.headingTag="h3";this.slots=new S(this,"accents",null);this.logger=new k(this);this.addEventListener("click",this._clickHandler)}get ariaExpandedState(){return String(!!this.expanded)}connectedCallback(){super.connectedCallback(),this.hidden=!0,this.id||(this.id=L("pfe-accordion"))}async _init(){let e=await this._getHeaderElement();e!==this._generatedHtag&&(this._generatedHtag=void 0),this.headingTag=e?.tagName.toLowerCase()??"h3",this.headingText=e?.textContent?.trim()??"",this.hidden=!1}render(){let e=v(this.headingTag);return y` | ||
<${e} id="heading">${g`<button id="button" aria-expanded="${this.ariaExpandedState}" class="toggle"><span part="text">${this.headingText||g`<slot></slot>`} </span>${this.slots.hasSlotted("accents")?g`<span part="accents"><slot name="accents"></slot></span>`:""}<pfe-icon icon="${this.icon??"angle-right"}" part="icon" set="${this.iconSet??"fas"}" class="icon" size="1x"></pfe-icon></button>`} | ||
</${e}> | ||
`}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this._clickHandler)}async _getHeaderElement(){if(await this.updateComplete,!this.firstElementChild&&!this.firstChild)return void this.logger.warn("No header content provided");if(this.firstElementChild){let[e,...r]=this.slots.getSlotted().filter(N);if(e)r.length&&this.logger.warn("Heading currently only supports 1 tag; extra tags will be ignored.");else return void this.logger.warn("No heading information was provided.");return e}else return this._generatedHtag||this.logger.warn("Header should contain at least 1 heading tag for correct semantics."),this._generatedHtag=document.createElement("h3"),this.firstChild?.nodeType===Node.TEXT_NODE?this._generatedHtag.textContent=this.firstChild.textContent:this._generatedHtag.textContent=this.textContent,this._generatedHtag}_clickHandler(e){let r=!this.expanded,n=e.composedPath().find(l=>l.tagName==="PFE-ACCORDION");this.dispatchEvent(new h(r,this,n))}_expandedChanged(){this.button?.setAttribute("aria-expanded",this.ariaExpandedState)}};t.version="{{version}}",t.styles=[p],t.shadowRootOptions={...c.shadowRootOptions,delegatesFocus:!0},i([a({attribute:"aria-controls",reflect:!0})],t.prototype,"ariaControls",2),i([a({reflect:!0})],t.prototype,"bordered",2),i([a({reflect:!0})],t.prototype,"icon",2),i([a({reflect:!0,attribute:"icon-set"})],t.prototype,"iconSet",2),i([E,a({type:Boolean,reflect:!0})],t.prototype,"expanded",2),i([a({reflect:!0,attribute:"heading-text"})],t.prototype,"headingText",2),i([a({reflect:!0,attribute:"heading-tag"})],t.prototype,"headingTag",2),i([_(),a({reflect:!0})],t.prototype,"on",2),i([C(".toggle")],t.prototype,"button",2),i([T()],t.prototype,"_init",1),i([m],t.prototype,"_getHeaderElement",1),i([m],t.prototype,"_clickHandler",1);export{h as AccordionHeaderChangeEvent,t as BaseAccordionHeader}; | ||
//# sourceMappingURL=BaseAccordionHeader.js.map |
@@ -1,2 +0,2 @@ | ||
var f=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var a=(n,e,d,t)=>{for(var o=t>1?void 0:t?s(e,d):e,i=n.length-1,p;i>=0;i--)(p=n[i])&&(o=(t?p(e,d,o):p(o))||o);return t&&o&&f(e,d,o),o};import{LitElement as g,html as v}from"lit";import{property as l}from"lit/decorators.js";import{colorContextConsumer as y}from"@patternfly/pfe-core/decorators.js";import{getRandomId as h}from"@patternfly/pfe-core/functions/random.js";import{css as b}from"lit";var m=b`:host{display:none;overflow:hidden;will-change:height;color:var(--pf-global--Color--100,#151515);background-color:var(--pf-c-accordion--BackgroundColor,var(--pf-global--BackgroundColor--light-100,#fff))}:host([expanded]){display:block;position:relative}:host(.animating){display:block;transition:height .3s ease-in-out}.content{color:var(--pf-c-accordion__panel--Color,var(--pf-global--Color--dark-200,#6a6e73));font-size:var(--pf-c-accordion__panel--FontSize, var(--pf-global--FontSize--sm, .875rem))}:host([fixed]){max-height:var(--pf-c-accordion__panel--m-fixed--MaxHeight,9.375rem);overflow-y:auto}.content[expanded],:host([expanded]) .content{--pf-c-accordion__panel-body--before--BackgroundColor:var(--pf-c-accordion__panel--content-body--before--BackgroundColor, var(--pf-global--primary-color--100, #0066cc))}.body{position:relative;padding:var(--pf-c-accordion__panel-body--PaddingTop,var(--pf-global--spacer--sm,.5rem)) var(--pf-c-accordion__panel-body--PaddingRight,var(--pf-global--spacer--md,1rem)) var(--pf-c-accordion__panel-body--PaddingBottom,var(--pf-global--spacer--sm,.5rem)) var(--pf-c-accordion__panel-body--PaddingLeft,var(--pf-global--spacer--md,1rem))}.body:after{content:"";position:absolute;top:0;bottom:0;left:0;width:var(--pf-c-accordion__panel-body--before--Width,var(--pf-global--BorderWidth--lg,3px));background-color:var(--pf-c-accordion__panel-body--before--BackgroundColor,transparent)}`,c=m;var r=class extends g{constructor(){super(...arguments);this.expanded=!1}connectedCallback(){super.connectedCallback(),this.id||(this.id=h("panel")),this.setAttribute("role","region")}render(){return v`<div tabindex="-1"><div id="container" class="content" part="container"><div class="body"><slot></slot></div></div></div>`}};r.styles=[c],a([l({reflect:!0})],r.prototype,"bordered",2),a([l({type:Boolean,reflect:!0})],r.prototype,"expanded",2),a([l({attribute:"aria-labelledby",reflect:!0})],r.prototype,"ariaLabelledby",2),a([y(),l({reflect:!0})],r.prototype,"on",2);export{r as BaseAccordionPanel}; | ||
var m=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var r=(s,o,a,i)=>{for(var t=i>1?void 0:i?f(o,a):o,n=s.length-1,d;n>=0;n--)(d=s[n])&&(t=(i?d(o,a,t):d(t))||t);return i&&t&&m(o,a,t),t};import{LitElement as h,html as u}from"lit";import{property as l}from"lit/decorators.js";import{colorContextConsumer as c}from"@patternfly/pfe-core/decorators.js";import{getRandomId as v}from"@patternfly/pfe-core/functions/random.js";import{css as b}from"lit";var y=b`:host{display:none;overflow:hidden;will-change:height}:host([expanded]){display:block;position:relative}:host(.animating){display:block;transition:height .3s ease-in-out}:host([fixed]){overflow-y:auto}.body{position:relative}.body:after{content:"";position:absolute;top:0;bottom:0;left:0}`,p=y;var e=class extends h{constructor(){super(...arguments);this.expanded=!1}connectedCallback(){super.connectedCallback(),this.id||(this.id=v("panel")),this.setAttribute("role","region")}render(){return u`<div tabindex="-1"><div id="container" class="content" part="container"><div class="body"><slot></slot></div></div></div>`}};e.styles=[p],r([l({reflect:!0})],e.prototype,"bordered",2),r([l({type:Boolean,reflect:!0})],e.prototype,"expanded",2),r([l({attribute:"aria-labelledby",reflect:!0})],e.prototype,"ariaLabelledby",2),r([c(),l({reflect:!0})],e.prototype,"on",2);export{e as BaseAccordionPanel}; | ||
//# sourceMappingURL=BaseAccordionPanel.js.map |
@@ -149,3 +149,3 @@ { | ||
"static": true, | ||
"default": "2.0.0-next.6", | ||
"default": "2.0.0-next.7", | ||
"readonly": true | ||
@@ -279,3 +279,3 @@ } | ||
"static": true, | ||
"default": "2.0.0-next.6", | ||
"default": "2.0.0-next.7", | ||
"readonly": true | ||
@@ -340,3 +340,3 @@ } | ||
"static": true, | ||
"default": "2.0.0-next.6", | ||
"default": "2.0.0-next.7", | ||
"readonly": true | ||
@@ -343,0 +343,0 @@ }, |
{ | ||
"name": "@patternfly/pfe-accordion", | ||
"version": "2.0.0-next.6", | ||
"version": "2.0.0-next.7", | ||
"license": "MIT", | ||
@@ -15,2 +15,5 @@ "description": "Accordion for PatternFly Elements", | ||
"./pfe-accordion-panel.js": "./pfe-accordion-panel.js", | ||
"./BaseAccordion.js": "./BaseAccordion.js", | ||
"./BaseAccordionHeader.js": "./BaseAccordionHeader.js", | ||
"./BaseAccordionPanel.js": "./BaseAccordionPanel.js", | ||
"./*": "./*.js" | ||
@@ -75,7 +78,7 @@ }, | ||
"dependencies": { | ||
"@patternfly/pfe-collapse": "^2.0.0-next.3", | ||
"@patternfly/pfe-core": "^2.0.0-next.8", | ||
"@patternfly/pfe-icon": "^2.0.0-next.4", | ||
"@patternfly/pfe-collapse": "^2.0.0-next.4", | ||
"@patternfly/pfe-core": "^2.0.0-next.10", | ||
"@patternfly/pfe-icon": "^2.0.0-next.5", | ||
"lit": "2.3.0" | ||
} | ||
} |
@@ -1,2 +0,16 @@ | ||
var d=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var p=(l,e,r,t)=>{for(var o=t>1?void 0:t?f(e,r):e,c=l.length-1,g;c>=0;c--)(g=l[c])&&(o=(t?g(e,r,o):g(o))||o);return t&&o&&d(e,r,o),o};import{customElement as m}from"lit/decorators.js";import"@patternfly/pfe-icon";import{BaseAccordionHeader as n}from"./BaseAccordionHeader.js";import{css as s}from"lit";var _=s`:host([large]){--pf-c-accordion__toggle--PaddingTop:var(--pf-global--spacer--md, 1rem);--pf-c-accordion__toggle--PaddingRight:var(--pf-global--spacer--md, 1rem);--pf-c-accordion__toggle--PaddingBottom:var(--pf-global--spacer--md, 1rem);--pf-c-accordion__toggle--PaddingLeft:var(--pf-global--spacer--lg, 1.5rem);--pf-c-accordion__toggle--FontFamily:var(--pf-global--FontFamily--redhat-updated--heading--sans-serif, "RedHatDisplayUpdated", "Overpass", overpass, helvetica, arial, sans-serif);--pf-c-accordion__toggle--FontSize:var(--pf-global--FontSize--xl, 1.25rem);--pf-c-accordion__toggle--hover-text--Color:var(--pf-global--Color--100, #151515);--pf-c-accordion__toggle--active-text--Color:var(--pf-global--Color--100, #151515);--pf-c-accordion__toggle--active-text--FontWeight:var(--pf-global--FontWeight--normal, 400);--pf-c-accordion__toggle--focus-text--Color:var(--pf-global--Color--100, #151515);--pf-c-accordion__toggle--focus-text--FontWeight:var(--pf-global--FontWeight--normal, 400);--pf-c-accordion__toggle--expanded-text--Color:var(--pf-global--Color--100, #151515);--pf-c-accordion__toggle--expanded-text--FontWeight:var(--pf-global--FontWeight--normal, 400);--pfe-icon--size:var(--pf-c-accordion__toggle--IconSize, 12px)}`,i=_;var a=class extends n{};a.version="2.0.0-next.6",a.styles=[...n.styles,i],a=p([m("pfe-accordion-header")],a);export{a as PfeAccordionHeader}; | ||
var d=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var n=(t,r,g,e)=>{for(var o=e>1?void 0:e?f(r,g):r,l=t.length-1,c;l>=0;l--)(c=t[l])&&(o=(e?c(r,g,o):c(o))||o);return e&&o&&d(r,g,o),o};import{customElement as v}from"lit/decorators.js";import"@patternfly/pfe-icon";import{BaseAccordionHeader as p}from"./BaseAccordionHeader.js";import{css as _}from"lit";var s=_`:host{--pfe-icon--size:var(--pf-c-accordion__toggle--IconSize, 10px);color:var(--pf-c-accordion__toggle--Color,var(--pf-global--Color--100,#151515));background-color:var(--pf-global--BackgroundColor--100,#fff)}:host([large]){--pf-c-accordion__toggle--PaddingTop:var(--pf-global--spacer--md, 1rem);--pf-c-accordion__toggle--PaddingRight:var(--pf-global--spacer--md, 1rem);--pf-c-accordion__toggle--PaddingBottom:var(--pf-global--spacer--md, 1rem);--pf-c-accordion__toggle--PaddingLeft:var(--pf-global--spacer--lg, 1.5rem);--pf-c-accordion__toggle--FontFamily:var( | ||
--pf-global--FontFamily--redhat-updated--heading--sans-serif, | ||
"RedHatDisplayUpdated", | ||
"Overpass", | ||
overpass, | ||
helvetica, | ||
arial, | ||
sans-serif | ||
);--pf-c-accordion__toggle--FontSize:var(--pf-global--FontSize--xl, 1.25rem);--pf-c-accordion__toggle--hover-text--Color:var(--pf-global--Color--100, #151515);--pf-c-accordion__toggle--active-text--Color:var(--pf-global--Color--100, #151515);--pf-c-accordion__toggle--active-text--FontWeight:var(--pf-global--FontWeight--normal, 400);--pf-c-accordion__toggle--focus-text--Color:var(--pf-global--Color--100, #151515);--pf-c-accordion__toggle--focus-text--FontWeight:var(--pf-global--FontWeight--normal, 400);--pf-c-accordion__toggle--expanded-text--Color:var(--pf-global--Color--100, #151515);--pf-c-accordion__toggle--expanded-text--FontWeight:var(--pf-global--FontWeight--normal, 400);--pfe-icon--size:var(--pf-c-accordion__toggle--IconSize, 12px)}#heading{font-weight:var(--pf-c-accordion__toggle--FontWeight,var(--pf-global--FontWeight--normal,400))}.toggle,.toggle:after,.toggle:before{background-color:var(--pf-c-accordion__toggle--BackgroundColor,transparent)}.icon{transition:var(--pf-c-accordion__toggle-icon--Transition, .2s ease-in 0s)}.toggle{padding:var(--pf-c-accordion__toggle--PaddingTop,var(--pf-global--spacer--md,.5rem)) var(--pf-c-accordion__toggle--PaddingRight,var(--pf-global--spacer--md,1rem)) var(--pf-c-accordion__toggle--PaddingBottom,var(--pf-global--spacer--sm,.5rem)) var(--pf-c-accordion__toggle--PaddingLeft,var(--pf-global--spacer--md,1rem));font-family:var(--pf-c-accordion__toggle--FontFamily, var(--pf-global--FontFamily--redhat-updated--heading--sans-serif, "RedHatTextUpdated", helvetica, arial, sans-serif));font-size:var(--pf-c-accordion__toggle--FontSize, var(--pf-global--FontSize--lg, 1rem));font-weight:var(--pf-c-accordion__toggle--FontWeight,var(--pf-global--FontWeight--normal,400));color:var(--pf-c-accordion__toggle--Color,var(--pf-global--Color--100,#151515))}.toggle[aria-expanded=true]{--pf-c-accordion__toggle--after--BackgroundColor:var( | ||
--pf-c-accordion__toggle--expanded--before--BackgroundColor, | ||
var( | ||
--pf-global--primary-color--100, | ||
#0066cc | ||
) | ||
)}.toggle:after{top:var(--pf-c-accordion__toggle--before--Top,-1px);width:var(--pf-c-accordion__toggle--before--Width,var(--pf-global--BorderWidth--lg,3px));background-color:var(--pf-c-accordion__toggle--after--BackgroundColor,transparent)}span{max-width:var(--pf-c-accordion__toggle-text--MaxWidth,calc(100% - var(--pf-global--spacer--lg,1.5rem)))}.toggle[aria-expanded=true] .icon{rotate:var(--pf-c-accordion__toggle--expanded-icon--Rotate,90deg)}.toggle:active,.toggle:focus,.toggle:hover{background-color:var(--pf-c-accordion__toggle--active--BackgroundColor,var(--pf-global--BackgroundColor--200,#f0f0f0))}.toggle:active span,.toggle:focus span,.toggle:hover span{color:var(--pf-c-accordion__toggle--active-text--Color,var(--pf-global--link--Color,#06c))}.toggle:active span,.toggle:focus span{font-weight:var(--pf-c-accordion__toggle--active-text--FontWeight,var(--pf-global--FontWeight--semi-bold,700))}`,i=s;var a=class extends p{};a.version="2.0.0-next.7",a.styles=[...p.styles,i],a=n([v("pfe-accordion-header")],a);export{a as PfeAccordionHeader}; | ||
//# sourceMappingURL=pfe-accordion-header.js.map |
@@ -1,2 +0,26 @@ | ||
var s=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var r=(e,a,c,n)=>{for(var o=n>1?void 0:n?m(a,c):a,t=e.length-1,p;t>=0;t--)(p=e[t])&&(o=(n?p(a,c,o):p(o))||o);return n&&o&&s(a,c,o),o};import{customElement as g}from"lit/decorators.js";import{BaseAccordionPanel as l}from"./BaseAccordionPanel.js";import{css as _}from"lit";var y=_`:host([large]){--pf-c-accordion__panel-body--PaddingTop:var(--pf-c-accordion--m-display-lg__expanded-content-body--PaddingTop, 0);--pf-c-accordion__panel-body--PaddingRight:var(--pf-c-accordion--m-display-lg__expanded-content-body--PaddingRight, 1rem);--pf-c-accordion__panel-body--PaddingBottom:var(--pf-c-accordion--m-display-lg__expanded-content-body--PaddingBottom, 1.5rem);--pf-c-accordion__panel-body--PaddingLeft:var(--pf-c-accordion--m-display-lg__expanded-content-body--PaddingLeft, 1.5rem);--pf-c-accordion__panel--FontSize:var(--pf-c-accordion--m-display-lg__expanded-content--FontSize, 1rem);--pf-c-accordion__panel--Color:var(--pf-c-accordion--m-display-lg__expanded-content--Color, #151515)}:host([large]) .body:last-child{--pf-c-accordion__panel-body--PaddingBottom:var(--pf-c-accordion--m-display-lg__expanded-content-body--last-child--PaddingBottom, 1.5rem)}`,i=y;var d=class extends l{};d.version="2.0.0-next.6",d.styles=[...l.styles,i],d=r([g("pfe-accordion-panel")],d);export{d as PfeAccordionPanel}; | ||
var f=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var l=(c,d,n,r)=>{for(var o=r>1?void 0:r?g(d,n):d,e=c.length-1,p;e>=0;e--)(p=c[e])&&(o=(r?p(d,n,o):p(o))||o);return r&&o&&f(d,n,o),o};import{customElement as s}from"lit/decorators.js";import{BaseAccordionPanel as i}from"./BaseAccordionPanel.js";import{css as _}from"lit";var m=_`:host{color:var(--pf-global--Color--100,#151515);background-color:var(--pf-c-accordion--BackgroundColor,var(--pf-global--BackgroundColor--light-100,#fff))}.body{padding:var(--pf-c-accordion__panel-body--PaddingTop,var(--pf-global--spacer--sm,.5rem)) var(--pf-c-accordion__panel-body--PaddingRight,var(--pf-global--spacer--md,1rem)) var(--pf-c-accordion__panel-body--PaddingBottom,var(--pf-global--spacer--sm,.5rem)) var(--pf-c-accordion__panel-body--PaddingLeft,var(--pf-global--spacer--md,1rem))}.body:after{width:var(--pf-c-accordion__panel-body--before--Width,var(--pf-global--BorderWidth--lg,3px));background-color:var(--pf-c-accordion__panel-body--before--BackgroundColor,transparent)}:host([large]){--pf-c-accordion__panel-body--PaddingTop:var( | ||
--pf-c-accordion--m-display-lg__expanded-content-body--PaddingTop, | ||
0 | ||
);--pf-c-accordion__panel-body--PaddingRight:var( | ||
--pf-c-accordion--m-display-lg__expanded-content-body--PaddingRight, | ||
1rem | ||
);--pf-c-accordion__panel-body--PaddingBottom:var( | ||
--pf-c-accordion--m-display-lg__expanded-content-body--PaddingBottom, | ||
1.5rem | ||
);--pf-c-accordion__panel-body--PaddingLeft:var( | ||
--pf-c-accordion--m-display-lg__expanded-content-body--PaddingLeft, | ||
1.5rem | ||
);--pf-c-accordion__panel--FontSize:var( | ||
--pf-c-accordion--m-display-lg__expanded-content--FontSize, | ||
1rem | ||
);--pf-c-accordion__panel--Color:var( | ||
--pf-c-accordion--m-display-lg__expanded-content--Color, | ||
#151515 | ||
)}:host([large]) .body:last-child{--pf-c-accordion__panel-body--PaddingBottom:var( | ||
--pf-c-accordion--m-display-lg__expanded-content-body--last-child--PaddingBottom, | ||
1.5rem | ||
)}.content{color:var(--pf-c-accordion__panel--Color,var(--pf-global--Color--dark-200,#6a6e73));font-size:var(--pf-c-accordion__panel--FontSize, var(--pf-global--FontSize--sm, .875rem))}:host([fixed]){max-height:var(--pf-c-accordion__panel--m-fixed--MaxHeight,9.375rem)}.content[expanded],:host([expanded]) .content{--pf-c-accordion__panel-body--before--BackgroundColor:var( | ||
--pf-c-accordion__panel--content-body--before--BackgroundColor, | ||
var(--pf-global--primary-color--100, #0066cc) | ||
)}`,t=m;var a=class extends i{};a.version="2.0.0-next.7",a.styles=[...i.styles,t],a=l([s("pfe-accordion-panel")],a);export{a as PfeAccordionPanel}; | ||
//# sourceMappingURL=pfe-accordion-panel.js.map |
@@ -1,2 +0,2 @@ | ||
var b=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var d=(a,r,l,t)=>{for(var o=t>1?void 0:t?h(r,l):r,s=a.length-1,c;s>=0;s--)(c=a[s])&&(o=(t?c(r,l,o):c(o))||o);return t&&o&&b(r,l,o),o};import{cascades as n}from"@patternfly/pfe-core/decorators/cascades.js";import{property as i}from"lit/decorators.js";import{customElement as y}from"lit/decorators.js";import{BaseAccordion as f}from"./BaseAccordion.js";import"./pfe-accordion-header.js";import"./pfe-accordion-panel.js";import{css as m}from"lit";var x=m`:host{--accordion__bordered--Color:var(--rh-color-black-300, #d2d2d2)}:host([bordered]) ::slotted(pfe-accordion-header:first-child),:host([large]) ::slotted(pfe-accordion-header:first-child){display:block;border-top:1px solid var(--accordion__bordered--Color);border-bottom:1px solid var(--accordion__bordered--Color)}:host([bordered]) ::slotted(pfe-accordion-header:not(:first-child)),:host([large]) ::slotted(pfe-accordion-header:not(:first-child)){display:block;border-bottom:1px solid var(--accordion__bordered--Color)}:host([bordered]) ::slotted(pfe-accordion-header:is([expanded])),:host([large]) ::slotted(pfe-accordion-header:is([expanded])){display:block;border-bottom:0}:host([bordered]) ::slotted(pfe-accordion-panel:is([expanded])),:host([large]) ::slotted(pfe-accordion-panel:is([expanded])){display:block;border-bottom:1px solid var(--accordion__bordered--Color)}`,p=x;var e=class extends f{constructor(){super(...arguments);this.fixed=!1}};e.version="2.0.0-next.6",e.styles=[...f.styles,p],d([n("pfe-accordion-header","pfe-accordion-panel"),i({reflect:!0})],e.prototype,"bordered",2),d([n("pfe-accordion-header","pfe-accordion-panel"),i({reflect:!0})],e.prototype,"large",2),d([i({type:Boolean,reflect:!0})],e.prototype,"fixed",2),e=d([y("pfe-accordion")],e);export{e as PfeAccordion}; | ||
var b=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var d=(a,r,l,t)=>{for(var e=t>1?void 0:t?h(r,l):r,s=a.length-1,c;s>=0;s--)(c=a[s])&&(e=(t?c(r,l,e):c(e))||e);return t&&e&&b(r,l,e),e};import{cascades as n}from"@patternfly/pfe-core/decorators/cascades.js";import{property as p}from"lit/decorators.js";import{customElement as y}from"lit/decorators.js";import{BaseAccordion as f}from"./BaseAccordion.js";import"./pfe-accordion-header.js";import"./pfe-accordion-panel.js";import{css as m}from"lit";var x=m`:host{--accordion__bordered--Color:var(--rh-color-black-300, #d2d2d2);color:var(--pf-global--Color--100,#151515);background-color:var(--pf-global--BackgroundColor--100,#fff)}:host([bordered]) ::slotted(pfe-accordion-header:first-child),:host([large]) ::slotted(pfe-accordion-header:first-child){display:block;border-top:1px solid var(--accordion__bordered--Color);border-bottom:1px solid var(--accordion__bordered--Color)}:host([bordered]) ::slotted(pfe-accordion-header:not(:first-child)),:host([large]) ::slotted(pfe-accordion-header:not(:first-child)){display:block;border-bottom:1px solid var(--accordion__bordered--Color)}:host([bordered]) ::slotted(pfe-accordion-header:is([expanded])),:host([large]) ::slotted(pfe-accordion-header:is([expanded])){display:block;border-bottom:0}:host([bordered]) ::slotted(pfe-accordion-panel:is([expanded])),:host([large]) ::slotted(pfe-accordion-panel:is([expanded])){display:block;border-bottom:1px solid var(--accordion__bordered--Color)}`,i=x;var o=class extends f{constructor(){super(...arguments);this.fixed=!1}};o.version="2.0.0-next.7",o.styles=[...f.styles,i],d([n("pfe-accordion-header","pfe-accordion-panel"),p({reflect:!0})],o.prototype,"bordered",2),d([n("pfe-accordion-header","pfe-accordion-panel"),p({reflect:!0})],o.prototype,"large",2),d([p({type:Boolean,reflect:!0})],o.prototype,"fixed",2),o=d([y("pfe-accordion")],o);export{o as PfeAccordion}; | ||
//# sourceMappingURL=pfe-accordion.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
93926
938
0