@limetech/lime-elements 38.14.0 → 38.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-collapsible-section.cjs.entry.js +22 -2
- package/dist/cjs/limel-collapsible-section.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/collapsible-section/collapsible-section.css +7 -3
- package/dist/collection/components/collapsible-section/collapsible-section.js +44 -1
- package/dist/collection/components/collapsible-section/collapsible-section.js.map +1 -1
- package/dist/esm/{file-metadata-01403ecd.js → file-metadata-77f9e2dd.js} +2 -2
- package/dist/esm/{file-metadata-01403ecd.js.map → file-metadata-77f9e2dd.js.map} +1 -1
- package/dist/esm/{files-2be62a61.js → files-2b46aa20.js} +2 -2
- package/dist/esm/{files-2be62a61.js.map → files-2b46aa20.js.map} +1 -1
- package/dist/esm/{get-icon-props-5a77e17e.js → get-icon-props-37514418.js} +2 -2
- package/dist/esm/{get-icon-props-5a77e17e.js.map → get-icon-props-37514418.js.map} +1 -1
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-action-bar-item_2.entry.js +1 -1
- package/dist/esm/limel-breadcrumbs_8.entry.js +1 -1
- package/dist/esm/limel-button.entry.js +1 -1
- package/dist/esm/limel-card.entry.js +1 -1
- package/dist/esm/limel-chip_2.entry.js +1 -1
- package/dist/esm/limel-collapsible-section.entry.js +22 -2
- package/dist/esm/limel-collapsible-section.entry.js.map +1 -1
- package/dist/esm/limel-dynamic-label_2.entry.js +1 -1
- package/dist/esm/limel-file-dropzone_2.entry.js +3 -3
- package/dist/esm/limel-file.entry.js +2 -2
- package/dist/esm/limel-header.entry.js +1 -1
- package/dist/esm/limel-picker.entry.js +1 -1
- package/dist/esm/limel-progress-flow-item.entry.js +1 -1
- package/dist/esm/limel-progress-flow.entry.js +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js +3 -3
- package/dist/esm/limel-select.entry.js +1 -1
- package/dist/esm/limel-tab-bar.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js.map +1 -1
- package/dist/lime-elements/{p-a2731c68.entry.js → p-0a7de7f9.entry.js} +2 -2
- package/dist/lime-elements/{p-bf6cf88a.entry.js → p-0aff1e5d.entry.js} +2 -2
- package/dist/lime-elements/{p-96ab9195.entry.js → p-19d0a98b.entry.js} +2 -2
- package/dist/lime-elements/{p-58acbdcc.entry.js → p-1e4ca584.entry.js} +2 -2
- package/dist/lime-elements/{p-d814fd97.entry.js → p-21086cea.entry.js} +2 -2
- package/dist/lime-elements/p-31fdfe08.js +2 -0
- package/dist/lime-elements/{p-a809b9a8.entry.js → p-3edf0f2c.entry.js} +2 -2
- package/dist/lime-elements/{p-3fda674f.entry.js → p-5ded9529.entry.js} +2 -2
- package/dist/lime-elements/{p-70926edd.entry.js → p-5e712561.entry.js} +2 -2
- package/dist/lime-elements/{p-dcacda04.entry.js → p-78d5ba18.entry.js} +2 -2
- package/dist/lime-elements/{p-6d55f15c.entry.js → p-8e135e1a.entry.js} +2 -2
- package/dist/lime-elements/{p-05ab1a40.js → p-97ded6f5.js} +2 -2
- package/dist/lime-elements/{p-d532cab0.entry.js → p-a626506d.entry.js} +2 -2
- package/dist/lime-elements/{p-d16aef41.entry.js → p-ab6ba00d.entry.js} +2 -2
- package/dist/lime-elements/p-af8a22e4.entry.js +2 -0
- package/dist/lime-elements/p-af8a22e4.entry.js.map +1 -0
- package/dist/lime-elements/{p-bd547592.js → p-d251f404.js} +2 -2
- package/dist/lime-elements/{p-fe5fd06b.entry.js → p-d47eeb6f.entry.js} +2 -2
- package/dist/lime-elements/{p-818f71b8.entry.js → p-ee24ef88.entry.js} +2 -2
- package/dist/lime-elements/p-fc8a9efb.entry.js +2 -0
- package/dist/lime-elements/{p-acec0f52.entry.js.map → p-fc8a9efb.entry.js.map} +1 -1
- package/dist/types/components/collapsible-section/collapsible-section.d.ts +9 -0
- package/dist/types/components.d.ts +12 -0
- package/package.json +1 -1
- package/dist/lime-elements/p-690a1a02.entry.js +0 -2
- package/dist/lime-elements/p-690a1a02.entry.js.map +0 -1
- package/dist/lime-elements/p-acec0f52.entry.js +0 -2
- package/dist/lime-elements/p-dc3d2ee1.js +0 -2
- /package/dist/lime-elements/{p-a2731c68.entry.js.map → p-0a7de7f9.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-bf6cf88a.entry.js.map → p-0aff1e5d.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-96ab9195.entry.js.map → p-19d0a98b.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-58acbdcc.entry.js.map → p-1e4ca584.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-d814fd97.entry.js.map → p-21086cea.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-dc3d2ee1.js.map → p-31fdfe08.js.map} +0 -0
- /package/dist/lime-elements/{p-a809b9a8.entry.js.map → p-3edf0f2c.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-3fda674f.entry.js.map → p-5ded9529.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-70926edd.entry.js.map → p-5e712561.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-dcacda04.entry.js.map → p-78d5ba18.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-6d55f15c.entry.js.map → p-8e135e1a.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-05ab1a40.js.map → p-97ded6f5.js.map} +0 -0
- /package/dist/lime-elements/{p-d532cab0.entry.js.map → p-a626506d.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-d16aef41.entry.js.map → p-ab6ba00d.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-bd547592.js.map → p-d251f404.js.map} +0 -0
- /package/dist/lime-elements/{p-fe5fd06b.entry.js.map → p-d47eeb6f.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-818f71b8.entry.js.map → p-ee24ef88.entry.js.map} +0 -0
|
@@ -904,6 +904,7 @@ export namespace Components {
|
|
|
904
904
|
* @exampleComponent limel-example-collapsible-section-external-control
|
|
905
905
|
* @exampleComponent limel-example-collapsible-section-with-slider
|
|
906
906
|
* @exampleComponent limel-example-collapsible-section-invalid
|
|
907
|
+
* @exampleComponent limel-example-collapsible-section-icon
|
|
907
908
|
* @exampleComponent limel-example-collapsible-section-css-props
|
|
908
909
|
*/
|
|
909
910
|
interface LimelCollapsibleSection {
|
|
@@ -915,6 +916,10 @@ export namespace Components {
|
|
|
915
916
|
* Text to display in the header of the section
|
|
916
917
|
*/
|
|
917
918
|
"header": string;
|
|
919
|
+
/**
|
|
920
|
+
* Icon to display in the header of the section
|
|
921
|
+
*/
|
|
922
|
+
"icon"?: string | Icon;
|
|
918
923
|
/**
|
|
919
924
|
* `true` if the section is invalid, `false` if valid. This can be used to indicate that the content inside the section is invalid.
|
|
920
925
|
*/
|
|
@@ -3611,6 +3616,7 @@ declare global {
|
|
|
3611
3616
|
* @exampleComponent limel-example-collapsible-section-external-control
|
|
3612
3617
|
* @exampleComponent limel-example-collapsible-section-with-slider
|
|
3613
3618
|
* @exampleComponent limel-example-collapsible-section-invalid
|
|
3619
|
+
* @exampleComponent limel-example-collapsible-section-icon
|
|
3614
3620
|
* @exampleComponent limel-example-collapsible-section-css-props
|
|
3615
3621
|
*/
|
|
3616
3622
|
interface HTMLLimelCollapsibleSectionElement extends Components.LimelCollapsibleSection, HTMLStencilElement {
|
|
@@ -5599,6 +5605,7 @@ declare namespace LocalJSX {
|
|
|
5599
5605
|
* @exampleComponent limel-example-collapsible-section-external-control
|
|
5600
5606
|
* @exampleComponent limel-example-collapsible-section-with-slider
|
|
5601
5607
|
* @exampleComponent limel-example-collapsible-section-invalid
|
|
5608
|
+
* @exampleComponent limel-example-collapsible-section-icon
|
|
5602
5609
|
* @exampleComponent limel-example-collapsible-section-css-props
|
|
5603
5610
|
*/
|
|
5604
5611
|
interface LimelCollapsibleSection {
|
|
@@ -5610,6 +5617,10 @@ declare namespace LocalJSX {
|
|
|
5610
5617
|
* Text to display in the header of the section
|
|
5611
5618
|
*/
|
|
5612
5619
|
"header"?: string;
|
|
5620
|
+
/**
|
|
5621
|
+
* Icon to display in the header of the section
|
|
5622
|
+
*/
|
|
5623
|
+
"icon"?: string | Icon;
|
|
5613
5624
|
/**
|
|
5614
5625
|
* `true` if the section is invalid, `false` if valid. This can be used to indicate that the content inside the section is invalid.
|
|
5615
5626
|
*/
|
|
@@ -8403,6 +8414,7 @@ declare module "@stencil/core" {
|
|
|
8403
8414
|
* @exampleComponent limel-example-collapsible-section-external-control
|
|
8404
8415
|
* @exampleComponent limel-example-collapsible-section-with-slider
|
|
8405
8416
|
* @exampleComponent limel-example-collapsible-section-invalid
|
|
8417
|
+
* @exampleComponent limel-example-collapsible-section-icon
|
|
8406
8418
|
* @exampleComponent limel-example-collapsible-section-css-props
|
|
8407
8419
|
*/
|
|
8408
8420
|
"limel-collapsible-section": LocalJSX.LimelCollapsibleSection & JSXBase.HTMLAttributes<HTMLLimelCollapsibleSectionElement>;
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,c as o,h as r,g as t}from"./p-288f0842.js";import{d as n}from"./p-c70b1ea3.js";import{m as i,r as a}from"./p-f221011c.js";import{c as s}from"./p-96460db3.js";const l='@charset "UTF-8";:host{--mdc-theme-primary:var(\n --lime-primary-color,\n rgb(var(--color-teal-default))\n );--mdc-theme-secondary:var(\n --lime-secondary-color,\n rgb(var(--contrast-1100))\n );--mdc-theme-on-primary:var(\n --lime-on-primary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-secondary:var(\n --lime-on-secondary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-text-disabled-on-background:var(\n --lime-text-disabled-on-background-color,\n rgba(var(--contrast-1700), 0.38)\n );--mdc-theme-text-primary-on-background:var(\n --lime-text-primary-on-background-color,\n rgba(var(--contrast-1700), 0.87)\n );--mdc-theme-text-secondary-on-background:var(\n --lime-text-secondary-on-background-color,\n rgba(var(--contrast-1700), 0.54)\n );--mdc-theme-error:var(\n --lime-error-background-color,\n rgb(var(--color-red-dark))\n );--lime-error-text-color:rgb(var(--color-red-darker));--mdc-theme-surface:var(\n --lime-surface-background-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-surface:var(\n --lime-on-surface-color,\n rgb(var(--contrast-1500))\n )}: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%;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:focus{outline:none}.open-close-toggle:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.open-close-toggle:hover{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) 0 0}section.open .open-close-toggle:hover{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;padding-left:0.5rem;height:2.5rem}.title{font-size:1rem;font-weight:300;color:var(--mdc-theme-on-surface);justify-self:flex-start;user-select:none;padding-right:0.5rem;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)));margin-right:0.5rem;opacity:0}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{--limel-cs-opacity-transition-speed:0.1s;--limel-cs-opacity-transition-delay:0s;--limel-cs-grid-template-rows-transition-speed:0.3s;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:0fr}.body slot{transition:opacity var(--limel-cs-opacity-transition-speed) ease var(--limel-cs-opacity-transition-delay);display:block;overflow:hidden;opacity:0}section.open .body{--limel-cs-opacity-transition-speed:0.4s;--limel-cs-opacity-transition-delay:0.3s;--limel-cs-grid-template-rows-transition-speed:0.46s;grid-template-rows:1fr}section.open .body slot{opacity:1}header:hover+.body{will-change:grid-template-rows}header:hover+.body slot{will-change:opacity}.expand-icon{position:relative;height:1.875rem;margin:0 1rem 0 0.5rem;width:0.75rem;flex-shrink:0}.line{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;width:100%;border-radius:1rem;height:0.125rem;background-color:var(--header-stroke-color, rgb(var(--contrast-900)))}.line:first-of-type,.line:last-of-type{transition:opacity 0.2s ease 0.1s, transform 0.4s ease 0.3s}.line:first-of-type{transform:rotate3d(0, 0, 1, 90deg)}.line:last-of-type{transform:rotate3d(0, 0, 1, -90deg)}.line:nth-of-type(2),.line:nth-of-type(3){transition:opacity 0.2s ease, transform 0.18s ease}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}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);opacity:0}section.open .line:nth-of-type(3){transform:translate3d(0, 1rem, 0);opacity:0}.open-close-toggle:hover+.expand-icon .line:first-of-type{transform:rotate3d(0, 0, 1, 0deg)}.open-close-toggle:hover+.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){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){transform:translate3d(0, -0.5rem, 0);opacity:0.4}.open-close-toggle:hover+.expand-icon .line:nth-of-type(3){transform:translate3d(0, 0.5rem, 0);opacity:0.4}section.open .open-close-toggle:hover+.expand-icon .line:first-of-type,section.open .open-close-toggle:hover+.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{transform:rotate3d(0, 0, 1, 45deg)}section.open .open-close-toggle:hover+.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){transform:translate3d(0, -1rem, 0);opacity:0}section.open .open-close-toggle:hover+.expand-icon .line:nth-of-type(3){transform:translate3d(0, 1rem, 0);opacity:0}';const c=class{constructor(t){e(this,t);this.open=o(this,"open",7);this.close=o(this,"close",7);this.action=o(this,"action",7);this.bodyId=s();this.onClick=()=>{this.handleInteraction()};this.handleInteraction=()=>{this.isOpen=!this.isOpen;if(this.isOpen){this.open.emit();const e=100;setTimeout(n,e)}else{this.close.emit()}};this.renderActions=()=>{if(!this.actions){return}return r("div",{class:"actions"},this.actions.map(this.renderActionButton))};this.renderActionButton=e=>r("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.isOpen=false;this.header=undefined;this.invalid=false;this.actions=undefined}componentDidRender(){const e=this.host.shadowRoot.querySelector(".open-close-toggle");i(e)}disconnectedCallback(){const e=this.host.shadowRoot.querySelector(".open-close-toggle");a(e)}render(){return r("section",{class:`${this.isOpen?"open":""}`,"aria-invalid":this.invalid},r("header",null,r("button",{class:"open-close-toggle",onClick:this.onClick,"aria-controls":this.bodyId}),r("div",{class:"expand-icon"},r("div",{class:"line"}),r("div",{class:"line"}),r("div",{class:"line"}),r("div",{class:"line"})),r("h2",{class:"title mdc-typography mdc-typography--headline2"},this.header),r("div",{class:"divider-line"}),this.renderHeaderSlot(),this.renderActions()),r("div",{class:"body","aria-hidden":String(!this.isOpen),id:this.bodyId},r("slot",null)))}renderHeaderSlot(){return r("slot",{name:"header"})}get host(){return t(this)}};c.style=l;export{c as limel_collapsible_section};
|
|
2
|
-
//# sourceMappingURL=p-690a1a02.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["collapsibleSectionCss","CollapsibleSection","this","bodyId","createRandomString","onClick","handleInteraction","isOpen","open","emit","waitForUiToRender","setTimeout","dispatchResizeEvent","close","renderActions","actions","h","class","map","renderActionButton","action","icon","label","disabled","handleActionClick","event","stopPropagation","componentDidRender","button","host","shadowRoot","querySelector","makeEnterClickable","disconnectedCallback","removeEnterClickable","render","invalid","header","renderHeaderSlot","String","id","name"],"sources":["./src/components/collapsible-section/collapsible-section.scss?tag=limel-collapsible-section&encapsulation=shadow","./src/components/collapsible-section/collapsible-section.tsx"],"sourcesContent":["@use '../../style/internal/lime-theme';\n@use '../../style/mixins';\n@use '../../style/internal/shared_input-select-picker';\n\n/**\n * @prop --closed-header-background-color: background color for header when closed\n * @prop --open-header-background-color: background color for header when open\n * @prop --header-stroke-color: color of the animated icons that visualize collapsed or normal states of the headers, as well as the divider line on headers\n * @prop --body-background-color: background color for body\n * @prop --body-padding: space around content of the body\n */\n\n:host(limel-collapsible-section) {\n --border-radius-of-header: 0.75rem;\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.open-close-toggle {\n all: unset;\n position: absolute;\n inset: 0;\n width: 100%; // for Firefox\n @include mixins.visualize-keyboard-focus;\n transition:\n background-color 0.4s ease,\n border-radius 0.1s ease;\n cursor: pointer;\n z-index: -1;\n\n background-color: var(\n --closed-header-background-color,\n rgb(var(--contrast-200))\n );\n border-radius: var(--border-radius-of-header);\n\n &:hover {\n background-color: var(\n --open-header-background-color,\n rgb(var(--contrast-300))\n );\n }\n\n section.open & {\n background-color: var(\n --open-header-background-color,\n rgb(var(--contrast-100))\n );\n border-radius: var(--border-radius-of-header)\n var(--border-radius-of-header) 0 0;\n &:hover {\n background-color: var(\n --open-header-background-color,\n rgb(var(--contrast-300))\n );\n }\n }\n}\n\n.title,\n.divider-line,\n.expand-icon {\n pointer-events: none;\n}\n\nsection {\n transition: box-shadow 0.4s ease;\n border-radius: var(--border-radius-of-header);\n\n &[aria-invalid]:not([aria-invalid='false']) {\n --header-stroke-color: rgb(var(--color-red-default)) !important;\n\n &:not(.open) {\n box-shadow: 0 0 0 1px rgb(var(--color-red-default));\n }\n }\n}\n\nheader {\n isolation: isolate;\n position: relative;\n\n align-items: center;\n display: flex;\n justify-content: space-between;\n\n padding-left: 0.5rem;\n height: shared_input-select-picker.$height-of-mdc-text-field;\n}\n\n.title {\n font-size: 1rem;\n font-weight: 300;\n color: var(--mdc-theme-on-surface);\n\n justify-self: flex-start;\n\n user-select: none; // mostly to improve experience on Android, where tapping on sections selects the text too\n\n padding-right: 0.5rem;\n\n // Below tries to render text in two lines,\n // and then truncate if there is no more space\n height: auto;\n max-height: 3rem;\n line-height: 1.2rem;\n @include mixins.truncate-text-on-line(2);\n}\n\n.divider-line {\n transition: opacity 0.3s ease 0.3s;\n flex-grow: 1;\n height: 0.125rem;\n border-radius: 1rem;\n background-color: var(--header-stroke-color, rgb(var(--contrast-900)));\n margin-right: 0.5rem;\n\n opacity: 0;\n\n section.open & {\n opacity: 0.16;\n }\n}\n\n.actions {\n justify-self: flex-end;\n flex-shrink: 0;\n}\n\n::slotted([slot='header']) {\n margin-right: 0.5rem;\n}\n\n.body {\n background-color: var(--body-background-color, var(--contrast-100));\n padding-left: var(--body-padding, 1.25rem);\n padding-right: var(--body-padding, 1.25rem);\n border-radius: 0 0 var(--border-radius-of-header)\n var(--border-radius-of-header);\n}\n\n// This animates height of the body,\n// from `0` to `auto`\n.body {\n // All below vars are for internal use only!\n --limel-cs-opacity-transition-speed: 0.1s;\n --limel-cs-opacity-transition-delay: 0s;\n --limel-cs-grid-template-rows-transition-speed: 0.3s;\n transition: grid-template-rows\n var(--limel-cs-grid-template-rows-transition-speed)\n cubic-bezier(1, 0.09, 0, 0.89);\n display: grid;\n grid-template-rows: 0fr;\n\n slot {\n transition: opacity var(--limel-cs-opacity-transition-speed) ease\n var(--limel-cs-opacity-transition-delay);\n display: block;\n overflow: hidden;\n opacity: 0;\n }\n}\n\nsection.open {\n .body {\n --limel-cs-opacity-transition-speed: 0.4s;\n --limel-cs-opacity-transition-delay: 0.3s;\n --limel-cs-grid-template-rows-transition-speed: 0.46s;\n grid-template-rows: 1fr;\n\n slot {\n opacity: 1;\n }\n }\n}\n\nheader:hover {\n + .body {\n will-change: grid-template-rows;\n\n slot {\n will-change: opacity;\n }\n }\n}\n\n// End: animating height\n\n@import './partial-styles/expand-icon.scss';\n","import {\n Component,\n Event,\n Element,\n EventEmitter,\n h,\n Prop,\n} from '@stencil/core';\nimport { dispatchResizeEvent } from '../../util/dispatch-resize-event';\nimport { Action } from './action';\nimport {\n makeEnterClickable,\n removeEnterClickable,\n} from '../../util/make-enter-clickable';\nimport { createRandomString } from '../../util/random-string';\n\n/**\n * A collapsible section can be used to group related content together\n * and hide the group when not needed.\n * Using this component can help to:\n * - Save vertical space by hiding non-essential content\n * - Improve content organization and scannability of the user interface\n * - Reduce cognitive load by displaying only a set of relevant information at a time\n * - Or disclose complex information, progressively to the user\n *\n * @slot - Content to put inside the collapsible section\n * @slot header - Optional slot for custom header content\n *\n * @exampleComponent limel-example-collapsible-section-basic\n * @exampleComponent limel-example-collapsible-section-actions\n * @exampleComponent limel-example-collapsible-section-with-custom-header-component\n * @exampleComponent limel-example-collapsible-section-external-control\n * @exampleComponent limel-example-collapsible-section-with-slider\n * @exampleComponent limel-example-collapsible-section-invalid\n * @exampleComponent limel-example-collapsible-section-css-props\n */\n@Component({\n tag: 'limel-collapsible-section',\n shadow: true,\n styleUrl: 'collapsible-section.scss',\n})\nexport class CollapsibleSection {\n /**\n * `true` if the section is expanded, `false` if collapsed.\n */\n @Prop({ mutable: true, reflect: true })\n public isOpen: boolean = false;\n\n /**\n * Text to display in the header of the section\n */\n @Prop({ reflect: true })\n public header: string;\n\n /**\n * `true` if the section is invalid, `false` if valid.\n * This can be used to indicate that the content inside the section is invalid.\n */\n @Prop({ reflect: true })\n public invalid = false;\n\n /**\n * Actions to place to the far right inside the header\n */\n @Prop()\n public actions: Action[];\n\n /**\n * Emitted when the section is expanded\n */\n @Event()\n private open: EventEmitter<void>;\n\n /**\n * Emitted when the section is collapsed\n */\n @Event()\n private close: EventEmitter<void>;\n\n /**\n * Emitted when an action is clicked inside the header\n */\n @Event()\n private action: EventEmitter<Action>;\n\n @Element()\n private host: HTMLElement;\n\n private bodyId = createRandomString();\n\n public componentDidRender() {\n const button = this.host.shadowRoot.querySelector(\n '.open-close-toggle',\n ) as HTMLElement;\n\n makeEnterClickable(button);\n }\n\n public disconnectedCallback() {\n const button = this.host.shadowRoot.querySelector(\n '.open-close-toggle',\n ) as HTMLElement;\n\n removeEnterClickable(button);\n }\n\n public render() {\n return (\n <section\n class={`${this.isOpen ? 'open' : ''}`}\n aria-invalid={this.invalid}\n >\n <header>\n <button\n class=\"open-close-toggle\"\n onClick={this.onClick}\n aria-controls={this.bodyId}\n />\n <div class=\"expand-icon\">\n <div class=\"line\" />\n <div class=\"line\" />\n <div class=\"line\" />\n <div class=\"line\" />\n </div>\n <h2 class=\"title mdc-typography mdc-typography--headline2\">\n {this.header}\n </h2>\n <div class=\"divider-line\" />\n {this.renderHeaderSlot()}\n {this.renderActions()}\n </header>\n <div\n class=\"body\"\n aria-hidden={String(!this.isOpen)}\n id={this.bodyId}\n >\n <slot />\n </div>\n </section>\n );\n }\n\n private onClick = () => {\n this.handleInteraction();\n };\n\n private handleInteraction = () => {\n this.isOpen = !this.isOpen;\n\n if (this.isOpen) {\n this.open.emit();\n const waitForUiToRender = 100;\n setTimeout(dispatchResizeEvent, waitForUiToRender);\n } else {\n this.close.emit();\n }\n };\n\n private renderActions = () => {\n if (!this.actions) {\n return;\n }\n\n return (\n <div class=\"actions\">\n {this.actions.map(this.renderActionButton)}\n </div>\n );\n };\n\n private renderHeaderSlot() {\n return <slot name=\"header\" />;\n }\n\n private renderActionButton = (action: Action) => {\n return (\n <limel-icon-button\n icon={action.icon}\n label={action.label}\n disabled={action.disabled}\n onClick={this.handleActionClick(action)}\n />\n );\n };\n\n private handleActionClick = (action: Action) => (event: MouseEvent) => {\n event.stopPropagation();\n this.action.emit(action);\n };\n}\n"],"mappings":"4KAAA,MAAMA,EAAwB,k9M,MCyCjBC,EAAkB,M,gHA+CnBC,KAAAC,OAASC,IAsDTF,KAAAG,QAAU,KACdH,KAAKI,mBAAmB,EAGpBJ,KAAAI,kBAAoB,KACxBJ,KAAKK,QAAUL,KAAKK,OAEpB,GAAIL,KAAKK,OAAQ,CACbL,KAAKM,KAAKC,OACV,MAAMC,EAAoB,IAC1BC,WAAWC,EAAqBF,E,KAC7B,CACHR,KAAKW,MAAMJ,M,GAIXP,KAAAY,cAAgB,KACpB,IAAKZ,KAAKa,QAAS,CACf,M,CAGJ,OACIC,EAAA,OAAKC,MAAM,WACNf,KAAKa,QAAQG,IAAIhB,KAAKiB,oBACrB,EAQNjB,KAAAiB,mBAAsBC,GAEtBJ,EAAA,qBACIK,KAAMD,EAAOC,KACbC,MAAOF,EAAOE,MACdC,SAAUH,EAAOG,SACjBlB,QAASH,KAAKsB,kBAAkBJ,KAKpClB,KAAAsB,kBAAqBJ,GAAoBK,IAC7CA,EAAMC,kBACNxB,KAAKkB,OAAOX,KAAKW,EAAO,E,YA7IH,M,mCAaR,M,uBA+BVO,qBACH,MAAMC,EAAS1B,KAAK2B,KAAKC,WAAWC,cAChC,sBAGJC,EAAmBJ,E,CAGhBK,uBACH,MAAML,EAAS1B,KAAK2B,KAAKC,WAAWC,cAChC,sBAGJG,EAAqBN,E,CAGlBO,SACH,OACInB,EAAA,WACIC,MAAO,GAAGf,KAAKK,OAAS,OAAS,KAAI,eACvBL,KAAKkC,SAEnBpB,EAAA,cACIA,EAAA,UACIC,MAAM,oBACNZ,QAASH,KAAKG,QAAO,gBACNH,KAAKC,SAExBa,EAAA,OAAKC,MAAM,eACPD,EAAA,OAAKC,MAAM,SACXD,EAAA,OAAKC,MAAM,SACXD,EAAA,OAAKC,MAAM,SACXD,EAAA,OAAKC,MAAM,UAEfD,EAAA,MAAIC,MAAM,kDACLf,KAAKmC,QAEVrB,EAAA,OAAKC,MAAM,iBACVf,KAAKoC,mBACLpC,KAAKY,iBAEVE,EAAA,OACIC,MAAM,OAAM,cACCsB,QAAQrC,KAAKK,QAC1BiC,GAAItC,KAAKC,QAETa,EAAA,c,CAkCRsB,mBACJ,OAAOtB,EAAA,QAAMyB,KAAK,U"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as i,c as t,h as e}from"./p-288f0842.js";import{t as s}from"./p-bcaea01a.js";import{g as r,a,b as n,c as h}from"./p-05ab1a40.js";import"./p-bd547592.js";const l='@charset "UTF-8";:host(limel-file){position:relative}.drag-and-drop-tip{pointer-events:none;position:absolute;box-sizing:border-box;margin:0.25rem;inset:0;display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;border-radius:0.25rem;border:1px dashed rgb(var(--contrast-700));padding:0 0.5rem}.drag-and-drop-tip .invisible-label-mock{flex-shrink:0;opacity:0;padding-right:1rem;padding-left:1.5rem}.drag-and-drop-tip .tip{font-size:smaller;color:var(--mdc-theme-text-secondary-on-background);height:auto;max-height:3rem;line-height:1;display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2}';const o={id:null,text:null,removable:true};const d=class{constructor(e){i(this,e);this.change=t(this,"change",7);this.interact=t(this,"interact",7);this.dropZoneTip=()=>this.getTranslation("drag-and-drop-tips");this.handleNewFiles=i=>{this.preventAndStop(i);this.change.emit(i.detail[0])};this.handleChipSetChange=i=>{i.stopPropagation();const t=!i.detail.length?i.detail[0]:null;if(!t){this.change.emit(t)}};this.handleChipInteract=i=>{this.preventAndStop(i);this.interact.emit(i.detail.id)};this.value=undefined;this.label=undefined;this.required=false;this.disabled=false;this.readonly=false;this.invalid=false;this.accept="*";this.language="en"}render(){return[e("limel-file-dropzone",{disabled:this.disabled||this.readonly||!!this.value,accept:this.accept,onFilesSelected:this.handleNewFiles},this.renderChipset()),this.renderDragAndDropTip()]}renderDragAndDropTip(){if(this.value||this.disabled||this.readonly){return}return e("div",{class:"drag-and-drop-tip"},e("span",{class:"invisible-label-mock",role:"presentation"},this.label),e("span",{class:"tip"},this.dropZoneTip()))}getChipArray(){if(!this.value){return[]}return[Object.assign(Object.assign({},o),{text:this.value.filename,id:this.value.id,icon:{name:r(this.value),title:a(this.value),color:n(this.value),backgroundColor:h(this.value)},href:this.value.href})]}renderChipset(){const i=e("limel-chip-set",{disabled:this.disabled,readonly:this.readonly,invalid:this.invalid,label:this.label,leadingIcon:"upload_to_cloud",language:this.language,onChange:this.handleChipSetChange,onInteract:this.handleChipInteract,required:this.required,type:"input",value:this.getChipArray()});if(this.value){return i}return e("limel-file-input",{accept:this.accept,disabled:this.disabled||this.readonly},i)}preventAndStop(i){i.stopPropagation();i.preventDefault()}getTranslation(i){return s.get(`file.${i}`,this.language)}};d.style=l;export{d as limel_file};
|
|
2
|
-
//# sourceMappingURL=p-acec0f52.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{g as n,a as t,b as r,c as e}from"./p-05ab1a40.js";function o(o){const i={id:crypto.randomUUID(),filename:o.name,contentType:o.type,size:o.size,fileContent:o};i.icon={name:n(i),title:t(i),color:r(i),backgroundColor:e(i)};return i}function i(n,t){if(t===undefined||t==="*"){return true}const r=t.split(",").map((n=>n.trim()));return r.some((t=>{if(t===n.contentType){return true}if(t.endsWith("/*")){const r=t.split("/")[0];return n.contentType.startsWith(`${r}/`)}if(t.startsWith(".")){const r=t.split(".")[1];return n.contentType.endsWith(`/${r}`)}}))}export{o as c,i};
|
|
2
|
-
//# sourceMappingURL=p-dc3d2ee1.js.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|