Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@patternfly/pfe-accordion

Package Overview
Dependencies
Maintainers
15
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@patternfly/pfe-accordion - npm Package Compare versions

Comparing version 2.0.0-next.10 to 2.0.0-next.11

1

BaseAccordionHeader.d.ts

@@ -5,3 +5,2 @@ import type { TemplateResult } from 'lit';

import { ComposedEvent } from '@patternfly/pfe-core';
import '@patternfly/pfe-icon';
export declare class AccordionHeaderChangeEvent extends ComposedEvent {

@@ -8,0 +7,0 @@ expanded: boolean;

2

BaseAccordionHeader.js

@@ -1,2 +0,2 @@

var N=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var h=(e,i,t,n)=>{for(var o=n>1?void 0:n?H(i,t):i,f=e.length-1,u;f>=0;f--)(u=e[f])&&(o=(n?u(i,t,o):u(o))||o);return n&&o&&N(i,t,o),o};var x=(e,i,t)=>{if(!i.has(e))throw TypeError("Cannot "+t)};var s=(e,i,t)=>(x(e,i,"read from private field"),t?t.call(e):i.get(e)),l=(e,i,t)=>{if(i.has(e))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(e):i.set(e,t)},b=(e,i,t,n)=>(x(e,i,"write to private field"),n?n.call(e,t):i.set(e,t),t);var p=(e,i,t)=>(x(e,i,"access private method"),t);import{LitElement as y,html as $}from"lit";import{property as w}from"lit/decorators.js";import{unsafeStatic as k,html as O}from"lit/static-html.js";import{BaseAccordion as P}from"./BaseAccordion.js";import{ComposedEvent as S}from"@patternfly/pfe-core";import{getRandomId as j}from"@patternfly/pfe-core/functions/random.js";import{Logger as z}from"@patternfly/pfe-core/controllers/logger.js";import{css as M}from"lit";var R=M`#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}`,T=R;import"@patternfly/pfe-icon";var D=e=>e instanceof HTMLElement&&!!e.tagName.match(/P|^H[1-6]/),C=class extends S{constructor(t,n,o){super("change");this.expanded=t;this.toggle=n;this.accordion=o}},r,d,g,v,c,E,m,L,a=class extends y{constructor(){super(...arguments);l(this,g);l(this,c);l(this,m);this.expanded=!1;this.headingText="";this.headingTag="h3";l(this,r,void 0);l(this,d,new z(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("click",p(this,m,L)),this.hidden=!0,this.id||(this.id=j(this.localName)),p(this,g,v).call(this)}render(){let t=k(this.headingTag),n=String(!!this.expanded);return O`
var N=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var h=(e,i,t,n)=>{for(var o=n>1?void 0:n?H(i,t):i,f=e.length-1,u;f>=0;f--)(u=e[f])&&(o=(n?u(i,t,o):u(o))||o);return n&&o&&N(i,t,o),o};var x=(e,i,t)=>{if(!i.has(e))throw TypeError("Cannot "+t)};var s=(e,i,t)=>(x(e,i,"read from private field"),t?t.call(e):i.get(e)),l=(e,i,t)=>{if(i.has(e))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(e):i.set(e,t)},b=(e,i,t,n)=>(x(e,i,"write to private field"),n?n.call(e,t):i.set(e,t),t);var p=(e,i,t)=>(x(e,i,"access private method"),t);import{LitElement as y,html as $}from"lit";import{property as w}from"lit/decorators.js";import{unsafeStatic as k,html as O}from"lit/static-html.js";import{BaseAccordion as P}from"./BaseAccordion.js";import{ComposedEvent as S}from"@patternfly/pfe-core";import{getRandomId as j}from"@patternfly/pfe-core/functions/random.js";import{Logger as z}from"@patternfly/pfe-core/controllers/logger.js";import{css as M}from"lit";var R=M`#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}`,T=R;var D=e=>e instanceof HTMLElement&&!!e.tagName.match(/P|^H[1-6]/),C=class extends S{constructor(t,n,o){super("change");this.expanded=t;this.toggle=n;this.accordion=o}},r,d,g,v,c,E,m,L,a=class extends y{constructor(){super(...arguments);l(this,g);l(this,c);l(this,m);this.expanded=!1;this.headingText="";this.headingTag="h3";l(this,r,void 0);l(this,d,new z(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("click",p(this,m,L)),this.hidden=!0,this.id||(this.id=j(this.localName)),p(this,g,v).call(this)}render(){let t=k(this.headingTag),n=String(!!this.expanded);return O`
<${t} id="heading">

@@ -3,0 +3,0 @@ <button id="button"

@@ -149,3 +149,3 @@ {

"static": true,
"default": "2.0.0-next.10",
"default": "2.0.0-next.11",
"readonly": true

@@ -339,3 +339,3 @@ },

"static": true,
"default": "2.0.0-next.10",
"default": "2.0.0-next.11",
"readonly": true

@@ -418,3 +418,3 @@ },

"static": true,
"default": "2.0.0-next.10",
"default": "2.0.0-next.11",
"readonly": true

@@ -421,0 +421,0 @@ },

{
"name": "@patternfly/pfe-accordion",
"version": "2.0.0-next.10",
"version": "2.0.0-next.11",
"license": "MIT",

@@ -77,3 +77,3 @@ "description": "Accordion for PatternFly Elements",

"dependencies": {
"@patternfly/pfe-core": "^2.0.0-next.11",
"@patternfly/pfe-core": "^2.0.0-next.13",
"@patternfly/pfe-icon": "^2.0.0-next.5",

@@ -80,0 +80,0 @@ "lit": "2.3.0"

var f=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var l=(e,r,c,d)=>{for(var o=d>1?void 0:d?g(r,c):r,n=e.length-1,p;n>=0;n--)(p=e[n])&&(o=(d?p(r,c,o):p(o))||o);return d&&o&&f(r,c,o),o};import{customElement as s,property as b}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.10",a.styles=[...i.styles,t],l([b({reflect:!0})],a.prototype,"bordered",2),a=l([s("pfe-accordion-panel")],a);export{a as PfeAccordionPanel};
var(--pf-global--primary-color--100, #0066cc))}`,t=m;var a=class extends i{};a.version="2.0.0-next.11",a.styles=[...i.styles,t],l([b({reflect:!0})],a.prototype,"bordered",2),a=l([s("pfe-accordion-panel")],a);export{a as PfeAccordionPanel};
//# sourceMappingURL=pfe-accordion-panel.js.map

@@ -1,2 +0,2 @@

var R=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var i=(r,t,e,o)=>{for(var s=o>1?void 0:o?E(t,e):t,d=r.length-1,p;d>=0;d--)(p=r[d])&&(s=(o?p(t,e,s):p(s))||s);return o&&s&&R(t,e,s),s};var v=(r,t,e)=>{if(!t.has(r))throw TypeError("Cannot "+e)};var m=(r,t,e)=>(v(r,t,"read from private field"),e?e.call(r):t.get(r)),l=(r,t,e)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,e)},w=(r,t,e,o)=>(v(r,t,"write to private field"),o?o.call(r,e):t.set(r,e),e);var n=(r,t,e)=>(v(r,t,"access private method"),e);import{Logger as _}from"@patternfly/pfe-core/controllers/logger.js";import{observed as H}from"@patternfly/pfe-core/decorators.js";import{property as f}from"lit/decorators.js";import{customElement as F}from"lit/decorators.js";import{BaseAccordion as L}from"./BaseAccordion.js";import"./BaseAccordionHeader.js";import"./pfe-accordion-header.js";import"./pfe-accordion-panel.js";import{css as S}from"lit";var U=S`: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)}`,C=U;var c,u,g,y,k,x,B,h,b,a=class extends L{constructor(){super(...arguments);l(this,y);l(this,x);l(this,h);this.single=!1;this.bordered=!1;this.large=!1;this.history=!1;this.fixed=!1;l(this,c,!0);l(this,u,new _(this));l(this,g,new MutationObserver(()=>n(this,h,b).call(this)))}static initRouter(){window.addEventListener("popstate",()=>a.instances.forEach(e=>{var o;return n(o=e,h,b).call(o)}))}connectedCallback(){super.connectedCallback(),a.instances.add(this),this.addEventListener("change",n(this,x,B)),m(this,g).observe(this,{childList:!0}),n(this,h,b).call(this)}disconnectedCallback(){super.disconnectedCallback(),a.instances.delete(this)}async expand(e,o){if(e===-1)return;let s=this.headers;this.single&&await Promise.all([...s.map((d,p)=>d.expanded&&this.collapse(p))]),super.expand(e,o)}};c=new WeakMap,u=new WeakMap,g=new WeakMap,y=new WeakSet,k=function(){let e=new URLSearchParams(window.location.search);if(e.has(this.id)){let s=(e.get(this.id)??"").split("-");return s.length<0?[]:s.map(d=>parseInt(d.trim(),10)-1)}},x=new WeakSet,B=function(){if(!this.history||!m(this,c))return;if(!this.id){m(this,u).error("The history feature cannot update the URL without an ID added to the accordion tag.");return}let e=new URL(window.location.href);this.expandedSets.size>0?e.searchParams.set(this.id,Array.from(this.expandedSets).sort((o,s)=>o-s).join("-")):e.searchParams.delete(this.id),history.replaceState({},"",e.toString())},h=new WeakSet,b=function(){let e=n(this,y,k).call(this)??[];w(this,c,!1),e.forEach(o=>this.expand(o)),w(this,c,!0)},a.version="2.0.0-next.10",a.styles=[...L.styles,C],a.instances=new Set,i([f({reflect:!0,type:Boolean})],a.prototype,"single",2),i([f({type:Boolean,reflect:!0})],a.prototype,"bordered",2),i([H(function(){[...this.headers,...this.panels].forEach(t=>t.toggleAttribute("large",this.large))}),f({type:Boolean,reflect:!0})],a.prototype,"large",2),i([f({type:Boolean})],a.prototype,"history",2),i([f({type:Boolean,reflect:!0})],a.prototype,"fixed",2),a=i([F("pfe-accordion")],a);a.initRouter();export{a as PfeAccordion};
var R=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var i=(r,t,e,o)=>{for(var s=o>1?void 0:o?E(t,e):t,d=r.length-1,p;d>=0;d--)(p=r[d])&&(s=(o?p(t,e,s):p(s))||s);return o&&s&&R(t,e,s),s};var v=(r,t,e)=>{if(!t.has(r))throw TypeError("Cannot "+e)};var m=(r,t,e)=>(v(r,t,"read from private field"),e?e.call(r):t.get(r)),l=(r,t,e)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,e)},w=(r,t,e,o)=>(v(r,t,"write to private field"),o?o.call(r,e):t.set(r,e),e);var n=(r,t,e)=>(v(r,t,"access private method"),e);import{Logger as _}from"@patternfly/pfe-core/controllers/logger.js";import{observed as H}from"@patternfly/pfe-core/decorators.js";import{property as f}from"lit/decorators.js";import{customElement as F}from"lit/decorators.js";import{BaseAccordion as L}from"./BaseAccordion.js";import"./BaseAccordionHeader.js";import"./pfe-accordion-header.js";import"./pfe-accordion-panel.js";import{css as S}from"lit";var U=S`: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)}`,C=U;var c,u,g,y,k,x,B,h,b,a=class extends L{constructor(){super(...arguments);l(this,y);l(this,x);l(this,h);this.single=!1;this.bordered=!1;this.large=!1;this.history=!1;this.fixed=!1;l(this,c,!0);l(this,u,new _(this));l(this,g,new MutationObserver(()=>n(this,h,b).call(this)))}static initRouter(){window.addEventListener("popstate",()=>a.instances.forEach(e=>{var o;return n(o=e,h,b).call(o)}))}connectedCallback(){super.connectedCallback(),a.instances.add(this),this.addEventListener("change",n(this,x,B)),m(this,g).observe(this,{childList:!0}),n(this,h,b).call(this)}disconnectedCallback(){super.disconnectedCallback(),a.instances.delete(this)}async expand(e,o){if(e===-1)return;let s=this.headers;this.single&&await Promise.all([...s.map((d,p)=>d.expanded&&this.collapse(p))]),super.expand(e,o)}};c=new WeakMap,u=new WeakMap,g=new WeakMap,y=new WeakSet,k=function(){let e=new URLSearchParams(window.location.search);if(e.has(this.id)){let s=(e.get(this.id)??"").split("-");return s.length<0?[]:s.map(d=>parseInt(d.trim(),10)-1)}},x=new WeakSet,B=function(){if(!this.history||!m(this,c))return;if(!this.id){m(this,u).error("The history feature cannot update the URL without an ID added to the accordion tag.");return}let e=new URL(window.location.href);this.expandedSets.size>0?e.searchParams.set(this.id,Array.from(this.expandedSets).sort((o,s)=>o-s).join("-")):e.searchParams.delete(this.id),history.replaceState({},"",e.toString())},h=new WeakSet,b=function(){let e=n(this,y,k).call(this)??[];w(this,c,!1),e.forEach(o=>this.expand(o)),w(this,c,!0)},a.version="2.0.0-next.11",a.styles=[...L.styles,C],a.instances=new Set,i([f({reflect:!0,type:Boolean})],a.prototype,"single",2),i([f({type:Boolean,reflect:!0})],a.prototype,"bordered",2),i([H(function(){[...this.headers,...this.panels].forEach(t=>t.toggleAttribute("large",this.large))}),f({type:Boolean,reflect:!0})],a.prototype,"large",2),i([f({type:Boolean})],a.prototype,"history",2),i([f({type:Boolean,reflect:!0})],a.prototype,"fixed",2),a=i([F("pfe-accordion")],a);a.initRouter();export{a 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc