@limetech/lime-elements 39.0.2 → 39.0.4

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.
@@ -4,4 +4,4 @@ import{g as e}from"./p-BFTU3MAI.js";function t(e,t){return function(e){try{let t
4
4
  * @version v0.2.1
5
5
  * @link http://github.com/noeldelgado/parse-css-color/
6
6
  * @license MIT
7
- */const Kp=["background-color","color","font-style","font-weight","text-decoration-color","text-decoration-line","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-decoration","width","height","min-width","min-height"];function Xp(e){var t;e.tagName&&(null===(t=e.properties)||void 0===t?void 0:t.style)&&(e.properties.style=function(e){try{const t=function(e){const t=Object.assign({},e);return delete t.background,"background"in e&&null!==(e=>{if("string"!=typeof e)return null;const t=xp.exec(e);if(t)return function(e){const[t,n,i,r]=Sp(e,{format:"array"});return Wp([null,t,n,i,r])}(t[0]);const n=Op.exec(e)||Lp.exec(e);if(n)return function([,e,t,n,i=1]){let r=e;return r=r.endsWith("turn")?360*parseFloat(r)/1:r.endsWith("rad")?Math.round(180*parseFloat(r)/Math.PI):parseFloat(r),{type:"hsl",values:[r,Vp(t),Vp(n)],alpha:Yp(null===i?1:i)}}(n);const i=Bp.exec(e)||Hp.exec(e)||Pp.exec(e)||Up.exec(e);if(i)return Wp(i);if(zp.exec(e))return Wp([null,0,0,0,0]);const r=wp[e.toLowerCase()];return r?Wp([null,r[0],r[1],r[2],1]):null})(e.background)&&(t["background-color"]=e.background),t}(vp(e));return Object.entries(t).filter((([e])=>Kp.includes(e))).map((([e,t])=>`${e}: ${t}`)).join("; ")}catch(t){return console.error("Failed to parse style value",e,t),""}}(e.properties.style))}const Qp=/\u00A0/g,$p=["200B","200C","200D","FEFF"],Zp=new Set(["audio","canvas","embed","iframe","img","input","object","svg","video"]),Jp=new Set(["br"]),em=(e,t)=>{if(e&&"object"==typeof e){if("element"===e.type&&"p"===e.tagName&&t&&tm(e)&&Array.isArray(t.children)){const n=t.children.indexOf(e);if(-1!==n)return void t.children.splice(n,1)}if(Array.isArray(e.children)&&0!==e.children.length)for(let t=e.children.length-1;t>=0;t--)em(e.children[t],e)}},tm=e=>!Array.isArray(e.children)||0===e.children.length||e.children.every((e=>nm(e))),nm=e=>{if(!e)return!0;if("text"===e.type)return im("string"==typeof e.value?e.value:"");if("comment"===e.type)return!0;if("element"===e.type){const t=e,n=t.tagName;return"string"!=typeof n||!Zp.has(n)&&(!!Jp.has(n)||!Array.isArray(t.children)||0===t.children.length||t.children.every((e=>nm(e))))}return!0},im=e=>{if(!e)return!0;const t=(e=>{let t=e;for(const e of $p){const n=String.fromCodePoint(Number.parseInt(e,16));t=t.split(n).join("")}return t})(e.replaceAll(Qp," "));return""===t.trim()};async function rm(e,n){var i;(null==n?void 0:n.forceHardLineBreaks)&&(e=e.replaceAll(/(?<!\\)([\n\r])/g," $1"));return(await j().use(Ht).use(Lr).use(Sn,{allowDangerousHtml:!0}).use(up).use((()=>e=>(mn(e,"element",(e=>{var n,i;if("a"===e.tagName){const r=null===(n=e.properties)||void 0===n?void 0:n.href,s=null===(i=e.properties)||void 0===i?void 0:i.title;if(!r)return;const a=t(r,s);e.properties.target=a.target,e.properties.rel=a.rel,e.properties.referrerpolicy=a.referrerpolicy}})),e))).use(xl,Object.assign({},am(null!==(i=null==n?void 0:n.whitelist)&&void 0!==i?i:[]))).use((()=>e=>{mn(e,"element",Xp)})).use(((e=!1)=>()=>e?e=>(em(e,null),e):e=>e)(null==n?void 0:n.removeEmptyParagraphs)).use(function(e=!1){return()=>e?e=>(mn(e,"element",(e=>{"img"===e.tagName&&(e.properties=e.properties||{},e.properties.loading="lazy",e.properties.src&&(e.properties["data-src"]=e.properties.src,e.properties.src=void 0))})),e):e=>e}(null==n?void 0:n.lazyLoadImages)).use(zc).process(e)).toString()}async function sm(e,t){return(await j().use(fl).use(xl,Object.assign({},am(null!=t?t:[]))).use((()=>e=>{mn(e,"element",Xp)})).use(zc).process(e)).toString()}function am(e){var t,n,i;const r=[...null!==(t=bl.attributes["*"])&&void 0!==t?t:[]].filter((e=>"height"!==e));r.push("style");const s=Object.assign(Object.assign({},bl),{tagNames:[...bl.tagNames||[],...e.map((e=>e.tagName))],attributes:Object.assign(Object.assign({},bl.attributes),{p:[...null!==(n=bl.attributes.p)&&void 0!==n?n:[],["className","MsoNormal"]],a:[...null!==(i=bl.attributes.a)&&void 0!==i?i:[],"referrerpolicy"],"*":r})});for(const t of e)s.attributes[t.tagName]=t.attributes;return s}export{g as d,t as g,rm as m,sm as s}
7
+ */const Kp=["background-color","color","font-style","font-weight","text-decoration-color","text-decoration-line","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-decoration","width","height","min-width","min-height"];function Xp(e){var t;e.tagName&&(null===(t=e.properties)||void 0===t?void 0:t.style)&&(e.properties.style=function(e){try{const t=function(e){const t=Object.assign({},e);return delete t.background,"background"in e&&null!==(e=>{if("string"!=typeof e)return null;const t=xp.exec(e);if(t)return function(e){const[t,n,i,r]=Sp(e,{format:"array"});return Wp([null,t,n,i,r])}(t[0]);const n=Op.exec(e)||Lp.exec(e);if(n)return function([,e,t,n,i=1]){let r=e;return r=r.endsWith("turn")?360*parseFloat(r)/1:r.endsWith("rad")?Math.round(180*parseFloat(r)/Math.PI):parseFloat(r),{type:"hsl",values:[r,Vp(t),Vp(n)],alpha:Yp(null===i?1:i)}}(n);const i=Bp.exec(e)||Hp.exec(e)||Pp.exec(e)||Up.exec(e);if(i)return Wp(i);if(zp.exec(e))return Wp([null,0,0,0,0]);const r=wp[e.toLowerCase()];return r?Wp([null,r[0],r[1],r[2],1]):null})(e.background)&&(t["background-color"]=e.background),t}(vp(e));return Object.entries(t).filter((([e])=>Kp.includes(e))).map((([e,t])=>`${e}: ${t}`)).join("; ")}catch(t){return console.error("Failed to parse style value",e,t),""}}(e.properties.style))}const Qp=/\u00A0/g,$p=["200B","200C","200D","FEFF"],Zp=new Set(["audio","canvas","embed","iframe","img","input","object","svg","video"]),Jp=new Set(["br"]),em=(e,t)=>{if(e&&"object"==typeof e){if("element"===e.type&&"p"===e.tagName&&t&&tm(e)&&Array.isArray(t.children)){const n=t.children.indexOf(e);if(-1!==n)return void t.children.splice(n,1)}if(Array.isArray(e.children)&&0!==e.children.length)for(let t=e.children.length-1;t>=0;t--)em(e.children[t],e)}},tm=e=>!Array.isArray(e.children)||0===e.children.length||e.children.every((e=>nm(e))),nm=e=>{if(!e)return!0;if("text"===e.type)return im("string"==typeof e.value?e.value:"");if("comment"===e.type)return!0;if("element"===e.type){const t=e,n=t.tagName;return"string"!=typeof n||!Zp.has(n)&&(!!Jp.has(n)||!Array.isArray(t.children)||0===t.children.length||t.children.every((e=>nm(e))))}return!0},im=e=>{if(!e)return!0;const t=(e=>{let t=e;for(const e of $p){const n=String.fromCodePoint(Number.parseInt(e,16));t=t.split(n).join("")}return t})(e.replaceAll(Qp," "));return""===t.trim()};async function rm(e,n){var i;(null==n?void 0:n.forceHardLineBreaks)&&(e=e.replaceAll(/(?<!\\)([\n\r])/g," $1"));return(await j().use(Ht).use(Lr).use(Sn,{allowDangerousHtml:!0}).use(up).use((()=>e=>(mn(e,"element",(e=>{var n,i;if("a"===e.tagName){const r=null===(n=e.properties)||void 0===n?void 0:n.href,s=null===(i=e.properties)||void 0===i?void 0:i.title;if(!r)return;const a=t(r,s);e.properties.target=a.target,e.properties.rel=a.rel,e.properties.referrerpolicy=a.referrerpolicy}})),e))).use(xl,Object.assign({},am(null!==(i=null==n?void 0:n.whitelist)&&void 0!==i?i:[]))).use((()=>e=>{mn(e,"element",Xp)})).use(((e=!1)=>()=>e?e=>(em(e,null),e):e=>e)(null==n?void 0:n.removeEmptyParagraphs)).use(function(e=!1){return()=>e?e=>(mn(e,"element",(e=>{"img"===e.tagName&&(e.properties=e.properties||{},e.properties.loading="lazy",e.properties.src&&(e.properties["data-src"]=e.properties.src,e.properties.src=void 0))})),e):e=>e}(null==n?void 0:n.lazyLoadImages)).use(zc).process(e)).toString()}async function sm(e,t){return(await j().use(fl).use(xl,Object.assign({},am(null!=t?t:[]))).use((()=>e=>{mn(e,"element",Xp)})).use(zc).process(e)).toString()}function am(e){var t,n,i,r;const s=[...null!==(t=bl.attributes["*"])&&void 0!==t?t:[]].filter((e=>"height"!==e));s.push("style");const a=Object.assign(Object.assign({},bl),{strip:[...null!==(n=bl.strip)&&void 0!==n?n:[],"style"],tagNames:[...bl.tagNames||[],...e.map((e=>e.tagName))],attributes:Object.assign(Object.assign({},bl.attributes),{p:[...null!==(i=bl.attributes.p)&&void 0!==i?i:[],["className","MsoNormal"]],a:[...null!==(r=bl.attributes.a)&&void 0!==r?r:[],"referrerpolicy"],"*":s})});for(const t of e)a.attributes[t.tagName]=t.attributes;return a}export{g as d,t as g,rm as m,sm as s}
@@ -1 +1 @@
1
- import{r as e,c as o,h as t,a as i}from"./p-xvTBZcD2.js";import{d as s}from"./p-z_E3sq3p.js";import{m as n,r}from"./p-BgTwPGeH.js";import{c as a}from"./p-JbKhhoXs.js";import{a as l,b as c,g as d}from"./p-COzG_Mhw.js";import{t as p}from"./p-6rJPElLH.js";const h=class{constructor(i){e(this,i),this.open=o(this,"open"),this.close=o(this,"close"),this.action=o(this,"action"),this.isOpen=!1,this.invalid=!1,this.language="en",this.bodyId=a(),this.headingId=a(),this.onClick=()=>{this.handleInteraction()},this.handleInteraction=()=>{this.isOpen=!this.isOpen,this.isOpen?(this.open.emit(),setTimeout(s,100)):this.close.emit()},this.renderExpandCollapseSign=()=>t("div",{class:"expand-icon",role:"presentation","aria-hidden":"true"},t("div",{class:"line"}),t("div",{class:"line"}),t("div",{class:"line"}),t("div",{class:"line"})),this.renderIcon=()=>{if(!this.icon)return;const e=d(this.icon),o=l(this.icon),i=c(this.icon);return t("limel-icon",{name:e,"aria-label":i,"aria-hidden":i?null:"true",style:{color:`${o}`}})},this.renderHeading=()=>{if(this.header)return t("h2",{class:"title mdc-typography mdc-typography--headline2",id:this.headingId},this.header)},this.renderActions=()=>{if(this.actions)return t("div",{class:"actions"},this.actions.map(this.renderActionButton))},this.renderActionButton=e=>t("limel-icon-button",{icon:e.icon,label:e.label,disabled:e.disabled,onClick:this.handleActionClick(e)}),this.handleActionClick=e=>o=>{o.stopPropagation(),this.action.emit(e)},this.getCollapsibleSectionAriaLabel=()=>p.get(this.isOpen?"collapsible-section.close":"collapsible-section.open",this.language,{header:this.header?`"${this.header}"`:" "})}componentDidRender(){const e=this.host.shadowRoot.querySelector(".open-close-toggle");n(e)}disconnectedCallback(){const e=this.host.shadowRoot.querySelector(".open-close-toggle");r(e)}render(){return t("section",{key:"8105890d7039702755935af1290f3ac170a6f724",class:this.isOpen?"open":"","aria-invalid":this.invalid,"aria-labelledby":this.header?this.headingId:null},t("header",{key:"31e93e837d63d2a5954ec4c2780c2159467e0e8e"},t("button",{key:"126c518c39c010b3745f26c8542e4a7e667687a2",class:"open-close-toggle",onClick:this.onClick,"aria-controls":this.bodyId,"aria-expanded":this.isOpen?"true":"false","aria-label":this.getCollapsibleSectionAriaLabel(),type:"button"}),this.renderExpandCollapseSign(),this.renderIcon(),this.renderHeading(),t("div",{key:"db0c2822ebcacee830c60a035386973a3680469b",class:"divider-line",role:"presentation"}),this.renderHeaderSlot(),this.renderActions()),t("div",{key:"5a4456a8c5a783fad2389c8d013a6eccf70990f1",class:"body","aria-hidden":String(!this.isOpen),id:this.bodyId,role:"region"},t("slot",{key:"4db8829dfc0ba669b555c18130541e54ec84f4b0"})))}renderHeaderSlot(){return t("slot",{name:"header"})}get host(){return i(this)}};h.style='@charset "UTF-8";.expand-icon{position:relative;display:flex;align-items:center;justify-content:center;height:1.875rem;margin:0 0 0 0.5rem;width:0.75rem;flex-shrink:0}.line{position:absolute;inset:auto;margin:auto;width:100%;border-radius:1rem;height:0.125rem}.line:first-of-type,.line:last-of-type{transition:opacity 0.2s ease 0.1s, transform 0.4s ease 0.3s;opacity:0;background-color:var(--header-stroke-color, rgb(var(--contrast-900)))}.line:nth-of-type(2){transform:translate3d(0, 0.25rem, 0) rotate(90deg)}.line:nth-of-type(3){transform:translate3d(0, -0.25rem, 0) rotate(-90deg)}.line:nth-of-type(2),.line:nth-of-type(3){transition:opacity 0.2s ease, transform 0.18s ease}.line:nth-of-type(2):before,.line:nth-of-type(2):after,.line:nth-of-type(3):before,.line:nth-of-type(3):after{content:"";position:absolute;inset:0;margin:auto;width:50%;height:100%;border-radius:inherit;background-color:var(--header-stroke-color, rgb(var(--contrast-900)))}.line:nth-of-type(2):before,.line:nth-of-type(3):before{transform:translate3d(0, -0.1rem, 0) rotate(45deg)}.line:nth-of-type(2):after,.line:nth-of-type(3):after{transform:translate3d(0, 0.1rem, 0) rotate(-45deg)}.open-close-toggle:hover+.expand-icon .line:first-of-type,.open-close-toggle:hover+.expand-icon .line:last-of-type,.open-close-toggle:focus-visible+.expand-icon .line:first-of-type,.open-close-toggle:focus-visible+.expand-icon .line:last-of-type{transition:opacity 0.8s ease 0.4s, transform 0.4s ease 0.3s;opacity:1}.open-close-toggle:hover+.expand-icon .line:first-of-type,.open-close-toggle:focus-visible+.expand-icon .line:first-of-type{transform:rotate3d(0, 0, 1, 0deg)}.open-close-toggle:hover+.expand-icon .line:last-of-type,.open-close-toggle:focus-visible+.expand-icon .line:last-of-type{transform:rotate3d(0, 0, 1, 0deg)}.open-close-toggle:hover+.expand-icon .line:nth-of-type(2),.open-close-toggle:hover+.expand-icon .line:nth-of-type(3),.open-close-toggle:focus-visible+.expand-icon .line:nth-of-type(2),.open-close-toggle:focus-visible+.expand-icon .line:nth-of-type(3){transition:opacity 0.5s ease 0.4s, transform 0.7s cubic-bezier(0.85, 0.11, 0.14, 1.35) 0.2s}.open-close-toggle:hover+.expand-icon .line:nth-of-type(2),.open-close-toggle:focus-visible+.expand-icon .line:nth-of-type(2){transform:translate3d(0, 0.5rem, 0) rotate(90deg);opacity:0.4}.open-close-toggle:hover+.expand-icon .line:nth-of-type(3),.open-close-toggle:focus-visible+.expand-icon .line:nth-of-type(3){transform:translate3d(0, -0.5rem, 0) rotate(-90deg);opacity:0.4}section.open .line:first-of-type,section.open .line:last-of-type{transition:opacity 0.2s ease 0.1s, transform 0.4s ease 0.3s;opacity:1}section.open .line:first-of-type{transform:rotate3d(0, 0, 1, 0deg)}section.open .line:last-of-type{transform:rotate3d(0, 0, 1, 0deg)}section.open .line:nth-of-type(2),section.open .line:nth-of-type(3){transition:opacity 1s ease, transform 0.4s ease}section.open .line:nth-of-type(2){transform:translate3d(0, 1rem, 0) rotate(90deg);opacity:0}section.open .line:nth-of-type(3){transform:translate3d(0, -1rem, 0) rotate(-90deg);opacity:0}section.open .open-close-toggle:hover+.expand-icon .line:first-of-type,section.open .open-close-toggle:hover+.expand-icon .line:last-of-type,section.open .open-close-toggle:focus-visible+.expand-icon .line:first-of-type,section.open .open-close-toggle:focus-visible+.expand-icon .line:last-of-type{transition:opacity 0.2s ease 0.4s, transform 0.4s cubic-bezier(0.85, 0.11, 0.14, 1.35) 0.2s}section.open .open-close-toggle:hover+.expand-icon .line:first-of-type,section.open .open-close-toggle:focus-visible+.expand-icon .line:first-of-type{transform:rotate3d(0, 0, 1, 45deg)}section.open .open-close-toggle:hover+.expand-icon .line:last-of-type,section.open .open-close-toggle:focus-visible+.expand-icon .line:last-of-type{transform:rotate3d(0, 0, 1, -45deg)}section.open .open-close-toggle:hover+.expand-icon .line:nth-of-type(2),section.open .open-close-toggle:focus-visible+.expand-icon .line:nth-of-type(2){transform:translate3d(0, 1rem, 0) rotate(90deg);opacity:0}section.open .open-close-toggle:hover+.expand-icon .line:nth-of-type(3),section.open .open-close-toggle:focus-visible+.expand-icon .line:nth-of-type(3){transform:translate3d(0, -1rem, 0) rotate(-90deg);opacity:0}:host(limel-collapsible-section){--border-radius-of-header:0.75rem;display:block}:host([hidden]){display:none}.open-close-toggle{all:unset;position:absolute;inset:0;width:100%}.open-close-toggle:focus{outline:none}.open-close-toggle:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.open-close-toggle{transition:background-color 0.4s ease, border-radius 0.1s ease;cursor:pointer;z-index:-1;background-color:var(--closed-header-background-color, rgb(var(--contrast-200)));border-radius:var(--border-radius-of-header)}.open-close-toggle:hover,.open-close-toggle:focus-visible{background-color:var(--open-header-background-color, rgb(var(--contrast-300)))}section.open .open-close-toggle{background-color:var(--open-header-background-color, rgb(var(--contrast-100)));border-radius:var(--border-radius-of-header) var(--border-radius-of-header) var(--limel-cs-open-header-bottom-border-radius, 0) var(--limel-cs-open-header-bottom-border-radius, 0)}section.open .open-close-toggle:hover,section.open .open-close-toggle:focus-visible{background-color:var(--open-header-background-color, rgb(var(--contrast-300)))}.title,.divider-line,.expand-icon{pointer-events:none}section{transition:box-shadow 0.4s ease;border-radius:var(--border-radius-of-header)}section[aria-invalid]:not([aria-invalid=false]){--header-stroke-color:rgb(var(--color-red-default)) !important}section[aria-invalid]:not([aria-invalid=false]):not(.open){box-shadow:0 0 0 1px rgb(var(--color-red-default))}header{isolation:isolate;position:relative;align-items:center;display:flex;justify-content:space-between;gap:0.5rem;padding-left:0.5rem;height:2.5rem}limel-icon{width:1.5rem}.title{font-size:1rem;font-weight:300;color:var(--limel-theme-on-surface-color);justify-self:flex-start;user-select:none;height:auto;max-height:3rem;line-height:1.2rem;display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2}.divider-line{transition:opacity 0.3s ease 0.3s;flex-grow:1;height:0.125rem;border-radius:1rem;background-color:var(--header-stroke-color, rgb(var(--contrast-900)));opacity:0;margin-right:0.5rem}section.open .divider-line{opacity:0.16}.actions{justify-self:flex-end;flex-shrink:0}::slotted([slot=header]){margin-right:0.5rem}.body{background-color:var(--body-background-color, var(--contrast-100));padding-left:var(--body-padding, 1.25rem);padding-right:var(--body-padding, 1.25rem);border-radius:0 0 var(--border-radius-of-header) var(--border-radius-of-header)}.body{transition:grid-template-rows var(--limel-cs-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89);display:grid;grid-template-rows:var(--limel-cs-grid-template-rows)}.body slot{transition:opacity var(--limel-cs-opacity-transition-speed) ease var(--limel-cs-opacity-transition-delay);display:block;overflow:hidden}:host(limel-collapsible-section:not([is-open])){--limel-cs-opacity-transition-speed:0.1s;--limel-cs-opacity-transition-delay:0s;--limel-cs-grid-template-rows-transition-speed:0.3s;--limel-cs-grid-template-rows:0fr}:host(limel-collapsible-section:not([is-open])) slot{opacity:0}:host(limel-collapsible-section[is-open]){--limel-cs-opacity-transition-speed:0.4s;--limel-cs-opacity-transition-delay:0.3s;--limel-cs-grid-template-rows-transition-speed:0.46s;--limel-cs-grid-template-rows:1fr}:host(limel-collapsible-section[is-open]) slot{opacity:1}header:hover+.body,header:has(.open-close-toggle:hover)+.body,header:has(.open-close-toggle:focus-visible)+.body{will-change:grid-template-rows}header:hover+.body slot,header:has(.open-close-toggle:hover)+.body slot,header:has(.open-close-toggle:focus-visible)+.body slot{will-change:opacity}';export{h as limel_collapsible_section}
1
+ import{r as e,c as o,h as t,a as i}from"./p-xvTBZcD2.js";import{d as s}from"./p-z_E3sq3p.js";import{m as n,r}from"./p-BgTwPGeH.js";import{c as a}from"./p-JbKhhoXs.js";import{a as l,b as c,g as d}from"./p-COzG_Mhw.js";import{t as p}from"./p-6rJPElLH.js";const h=class{constructor(i){e(this,i),this.open=o(this,"open"),this.close=o(this,"close"),this.action=o(this,"action"),this.isOpen=!1,this.invalid=!1,this.language="en",this.bodyId=a(),this.headingId=a(),this.onClick=()=>{this.handleInteraction()},this.handleInteraction=()=>{this.isOpen=!this.isOpen,this.isOpen?(this.open.emit(),setTimeout(s,100)):this.close.emit()},this.renderExpandCollapseSign=()=>t("div",{class:"expand-icon",role:"presentation","aria-hidden":"true"},t("div",{class:"line"}),t("div",{class:"line"}),t("div",{class:"line"}),t("div",{class:"line"})),this.renderIcon=()=>{if(!this.icon)return;const e=d(this.icon),o=l(this.icon),i=c(this.icon);return t("limel-icon",{name:e,"aria-label":i,"aria-hidden":i?null:"true",style:{color:`${o}`}})},this.renderHeading=()=>{if(this.header)return t("h2",{class:"title mdc-typography mdc-typography--headline2",id:this.headingId},this.header)},this.renderActions=()=>{if(this.actions)return t("div",{class:"actions"},this.actions.map(this.renderActionButton))},this.renderActionButton=e=>t("limel-icon-button",{icon:e.icon,label:e.label,disabled:e.disabled,onClick:this.handleActionClick(e)}),this.handleActionClick=e=>o=>{o.stopPropagation(),this.action.emit(e)},this.getCollapsibleSectionAriaLabel=()=>p.get(this.isOpen?"collapsible-section.close":"collapsible-section.open",this.language,{header:this.header?`"${this.header}"`:" "})}componentDidRender(){const e=this.host.shadowRoot.querySelector(".open-close-toggle");n(e)}disconnectedCallback(){const e=this.host.shadowRoot.querySelector(".open-close-toggle");r(e)}render(){return t("section",{key:"8105890d7039702755935af1290f3ac170a6f724",class:this.isOpen?"open":"","aria-invalid":this.invalid,"aria-labelledby":this.header?this.headingId:null},t("header",{key:"31e93e837d63d2a5954ec4c2780c2159467e0e8e"},t("button",{key:"126c518c39c010b3745f26c8542e4a7e667687a2",class:"open-close-toggle",onClick:this.onClick,"aria-controls":this.bodyId,"aria-expanded":this.isOpen?"true":"false","aria-label":this.getCollapsibleSectionAriaLabel(),type:"button"}),this.renderExpandCollapseSign(),this.renderIcon(),this.renderHeading(),t("div",{key:"db0c2822ebcacee830c60a035386973a3680469b",class:"divider-line",role:"presentation"}),this.renderHeaderSlot(),this.renderActions()),t("div",{key:"5a4456a8c5a783fad2389c8d013a6eccf70990f1",class:"body","aria-hidden":String(!this.isOpen),id:this.bodyId,role:"region"},t("slot",{key:"4db8829dfc0ba669b555c18130541e54ec84f4b0"})))}renderHeaderSlot(){return t("slot",{name:"header"})}get host(){return i(this)}};h.style='@charset "UTF-8";.expand-icon{position:relative;display:flex;align-items:center;justify-content:center;height:1.875rem;margin:0 0 0 0.5rem;width:0.75rem;flex-shrink:0}.line{position:absolute;inset:auto;margin:auto;width:100%;border-radius:1rem;height:0.125rem}.line:first-of-type,.line:last-of-type{transition:opacity 0.2s ease 0.1s, transform 0.4s ease 0.3s;opacity:0;background-color:var(--header-stroke-color, rgb(var(--contrast-900)))}.line:nth-of-type(2){transform:translate3d(0, 0.25rem, 0) rotate(90deg)}.line:nth-of-type(3){transform:translate3d(0, -0.25rem, 0) rotate(-90deg)}.line:nth-of-type(2),.line:nth-of-type(3){transition:opacity 0.2s ease, transform 0.18s ease}.line:nth-of-type(2):before,.line:nth-of-type(2):after,.line:nth-of-type(3):before,.line:nth-of-type(3):after{content:"";position:absolute;inset:0;margin:auto;width:50%;height:100%;border-radius:inherit;background-color:var(--header-stroke-color, rgb(var(--contrast-900)))}.line:nth-of-type(2):before,.line:nth-of-type(3):before{transform:translate3d(0, -0.1rem, 0) rotate(45deg)}.line:nth-of-type(2):after,.line:nth-of-type(3):after{transform:translate3d(0, 0.1rem, 0) rotate(-45deg)}.open-close-toggle:hover+.expand-icon .line:first-of-type,.open-close-toggle:hover+.expand-icon .line:last-of-type,.open-close-toggle:focus-visible+.expand-icon .line:first-of-type,.open-close-toggle:focus-visible+.expand-icon .line:last-of-type{transition:opacity 0.8s ease 0.4s, transform 0.4s ease 0.3s;opacity:1}.open-close-toggle:hover+.expand-icon .line:first-of-type,.open-close-toggle:focus-visible+.expand-icon .line:first-of-type{transform:rotate3d(0, 0, 1, 0deg)}.open-close-toggle:hover+.expand-icon .line:last-of-type,.open-close-toggle:focus-visible+.expand-icon .line:last-of-type{transform:rotate3d(0, 0, 1, 0deg)}.open-close-toggle:hover+.expand-icon .line:nth-of-type(2),.open-close-toggle:hover+.expand-icon .line:nth-of-type(3),.open-close-toggle:focus-visible+.expand-icon .line:nth-of-type(2),.open-close-toggle:focus-visible+.expand-icon .line:nth-of-type(3){transition:opacity 0.5s ease 0.4s, transform 0.7s cubic-bezier(0.85, 0.11, 0.14, 1.35) 0.2s}.open-close-toggle:hover+.expand-icon .line:nth-of-type(2),.open-close-toggle:focus-visible+.expand-icon .line:nth-of-type(2){transform:translate3d(0, 0.5rem, 0) rotate(90deg);opacity:0.4}.open-close-toggle:hover+.expand-icon .line:nth-of-type(3),.open-close-toggle:focus-visible+.expand-icon .line:nth-of-type(3){transform:translate3d(0, -0.5rem, 0) rotate(-90deg);opacity:0.4}section.open .line:first-of-type,section.open .line:last-of-type{transition:opacity 0.2s ease 0.1s, transform 0.4s ease 0.3s;opacity:1}section.open .line:first-of-type{transform:rotate3d(0, 0, 1, 0deg)}section.open .line:last-of-type{transform:rotate3d(0, 0, 1, 0deg)}section.open .line:nth-of-type(2),section.open .line:nth-of-type(3){transition:opacity 1s ease, transform 0.4s ease}section.open .line:nth-of-type(2){transform:translate3d(0, 1rem, 0) rotate(90deg);opacity:0}section.open .line:nth-of-type(3){transform:translate3d(0, -1rem, 0) rotate(-90deg);opacity:0}section.open .open-close-toggle:hover+.expand-icon .line:first-of-type,section.open .open-close-toggle:hover+.expand-icon .line:last-of-type,section.open .open-close-toggle:focus-visible+.expand-icon .line:first-of-type,section.open .open-close-toggle:focus-visible+.expand-icon .line:last-of-type{transition:opacity 0.2s ease 0.4s, transform 0.4s cubic-bezier(0.85, 0.11, 0.14, 1.35) 0.2s}section.open .open-close-toggle:hover+.expand-icon .line:first-of-type,section.open .open-close-toggle:focus-visible+.expand-icon .line:first-of-type{transform:rotate3d(0, 0, 1, 45deg)}section.open .open-close-toggle:hover+.expand-icon .line:last-of-type,section.open .open-close-toggle:focus-visible+.expand-icon .line:last-of-type{transform:rotate3d(0, 0, 1, -45deg)}section.open .open-close-toggle:hover+.expand-icon .line:nth-of-type(2),section.open .open-close-toggle:focus-visible+.expand-icon .line:nth-of-type(2){transform:translate3d(0, 1rem, 0) rotate(90deg);opacity:0}section.open .open-close-toggle:hover+.expand-icon .line:nth-of-type(3),section.open .open-close-toggle:focus-visible+.expand-icon .line:nth-of-type(3){transform:translate3d(0, -1rem, 0) rotate(-90deg);opacity:0}:host(limel-collapsible-section){--border-radius-of-header:0.75rem;display:block}:host([hidden]){display:none}.open-close-toggle{all:unset;position:absolute;inset:0;width:100%}.open-close-toggle:focus{outline:none}.open-close-toggle:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.open-close-toggle{transition:background-color 0.4s ease, border-radius 0.1s ease;cursor:pointer;z-index:-1;background-color:var(--closed-header-background-color, rgb(var(--contrast-200)));border-radius:var(--border-radius-of-header)}.open-close-toggle:hover,.open-close-toggle:focus-visible{background-color:var(--open-header-background-color, rgb(var(--contrast-300)))}section.open .open-close-toggle{background-color:var(--open-header-background-color, rgb(var(--contrast-100)));border-radius:var(--border-radius-of-header) var(--border-radius-of-header) var(--limel-cs-open-header-bottom-border-radius, 0) var(--limel-cs-open-header-bottom-border-radius, 0)}section.open .open-close-toggle:hover,section.open .open-close-toggle:focus-visible{background-color:var(--open-header-background-color, rgb(var(--contrast-300)))}.title,.divider-line,.expand-icon{pointer-events:none}section{transition:box-shadow 0.4s ease;border-radius:var(--border-radius-of-header)}section[aria-invalid]:not([aria-invalid=false]){--header-stroke-color:rgb(var(--color-red-default)) !important}section[aria-invalid]:not([aria-invalid=false]):not(.open){box-shadow:0 0 0 1px rgb(var(--color-red-default))}header{isolation:isolate;position:relative;align-items:center;display:flex;justify-content:space-between;gap:0.5rem;padding-left:0.5rem;height:2.5rem}limel-icon{width:1.5rem;flex-shrink:0}.title{font-size:1rem;font-weight:300;color:var(--limel-theme-on-surface-color);justify-self:flex-start;user-select:none;height:auto;max-height:3rem;line-height:1.2rem;display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2}.divider-line{transition:opacity 0.3s ease 0.3s;flex-grow:1;height:0.125rem;border-radius:1rem;background-color:var(--header-stroke-color, rgb(var(--contrast-900)));opacity:0;margin-right:0.5rem}section.open .divider-line{opacity:0.16}.actions{justify-self:flex-end;flex-shrink:0}::slotted([slot=header]){margin-right:0.5rem}.body{background-color:var(--body-background-color, var(--contrast-100));padding-left:var(--body-padding, 1.25rem);padding-right:var(--body-padding, 1.25rem);border-radius:0 0 var(--border-radius-of-header) var(--border-radius-of-header)}.body{transition:grid-template-rows var(--limel-cs-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89);display:grid;grid-template-rows:var(--limel-cs-grid-template-rows)}.body slot{transition:opacity var(--limel-cs-opacity-transition-speed) ease var(--limel-cs-opacity-transition-delay);display:block;overflow:hidden}:host(limel-collapsible-section:not([is-open])){--limel-cs-opacity-transition-speed:0.1s;--limel-cs-opacity-transition-delay:0s;--limel-cs-grid-template-rows-transition-speed:0.3s;--limel-cs-grid-template-rows:0fr}:host(limel-collapsible-section:not([is-open])) slot{opacity:0}:host(limel-collapsible-section[is-open]){--limel-cs-opacity-transition-speed:0.4s;--limel-cs-opacity-transition-delay:0.3s;--limel-cs-grid-template-rows-transition-speed:0.46s;--limel-cs-grid-template-rows:1fr}:host(limel-collapsible-section[is-open]) slot{opacity:1}header:hover+.body,header:has(.open-close-toggle:hover)+.body,header:has(.open-close-toggle:focus-visible)+.body{will-change:grid-template-rows}header:hover+.body slot,header:has(.open-close-toggle:hover)+.body slot,header:has(.open-close-toggle:focus-visible)+.body slot{will-change:opacity}';export{h as limel_collapsible_section}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-elements",
3
- "version": "39.0.2",
3
+ "version": "39.0.4",
4
4
  "description": "Lime Elements",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",