@vandeurenglenn/lite-elements 0.3.77 → 0.3.78

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.
@@ -1,4 +1,4 @@
1
- import{_ as t,a as e}from"./tslib.es6-B87RQr7F.js";import{s as o,i as s,x as i}from"./dark-mode-m29sAj4H.js";import{t as m}from"./query-DCTzLeFk.js";import{e as a}from"./custom-element-B_TPyPQO.js";import"./demo-icons.js";import"./section.js";import"./card.js";import"./theme.js";import"./divider.js";import"./button.js";import"./banner.js";import"./selector.js";import"./pages.js";import"./drawer.js";import"./drawer-button.js";import"./drawer-item.js";import"./section2.js";import"./drawer-layout.js";import"./top-app-bar.js";import"./icon.js";import"./typography.js";import"./pane.js";import"./supporting-pane.js";import"./tabs.js";import"./root.js";import"./dialog.js";import"./icon-set.js";import"./list-item.js";import"./menu.js";import"./icon-button.js";import"./dropdown-menu.js";import"./dropdown.js";import"./toggle.js";import"./toggle-button.js";import"./time-picker.js";import"./notification.js";import"./notifications.js";import"./code.js";import"./elevation.js";import"./button.css.js";import"./it-Dft_Rjy-.js";import"./selector-mixin.js";import"./select-mixin.js";import"./scroll-mixin.js";import"./column-CLFZeRaw.js";import"./row-DZm4UH0H.js";import"./tab.js";import"./input.js";import"./property-CMTrOHQk.js";let c=(()=>{let c,u,n,r,l=[a("demo-shell")],p=[],d=o,g=[],b=[],y=[],w=[];return class extends d{static{u=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(d[Symbol.metadata]??null):void 0;n=[m("custom-selector")],r=[m("custom-pages")],t(this,null,n,{kind:"accessor",name:"selector",static:!1,private:!1,access:{has:t=>"selector"in t,get:t=>t.selector,set:(t,e)=>{t.selector=e}},metadata:e},g,b),t(this,null,r,{kind:"accessor",name:"pages",static:!1,private:!1,access:{has:t=>"pages"in t,get:t=>t.pages,set:(t,e)=>{t.pages=e}},metadata:e},y,w),t(null,c={value:u},l,{kind:"class",name:u.name,metadata:e},null,p),u=c.value,e&&Object.defineProperty(u,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#t=e(this,g,void 0);get selector(){return this.#t}set selector(t){this.#t=t}#e=(e(this,b),e(this,y,void 0));get pages(){return this.#e}set pages(t){this.#e=t}connectedCallback(){this.selector.addEventListener("selected",(async({detail:t})=>{document.dispatchEvent(new CustomEvent("custom-scroll",{detail:{scrolling:!1}})),this.pages.select(t),localStorage.setItem("last-selected",t)}));const t=localStorage.getItem("last-selected");t&&(customElements.get("custom-serlector")?this.selector.select(t):(this.selector.select(t),this.pages.select(t)))}static styles=[s`
1
+ import{_ as t,a as e}from"./tslib.es6-B87RQr7F.js";import{s as o,i as s,x as i}from"./dark-mode-m29sAj4H.js";import{t as m}from"./query-DCTzLeFk.js";import{e as a}from"./custom-element-B_TPyPQO.js";import"./demo-icons.js";import"./section.js";import"./card.js";import"./theme.js";import"./divider.js";import"./button.js";import"./banner.js";import"./selector.js";import"./pages.js";import"./drawer.js";import"./drawer-button.js";import"./drawer-item.js";import"./section2.js";import"./drawer-layout.js";import"./top-app-bar.js";import"./icon.js";import"./typography.js";import"./pane.js";import"./supporting-pane.js";import"./tabs.js";import"./root.js";import"./dialog.js";import"./icon-set.js";import"./list-item.js";import"./menu.js";import"./icon-button.js";import"./dropdown-menu.js";import"./dropdown.js";import"./toggle.js";import"./toggle-button.js";import"./time-picker.js";import"./notification.js";import"./notifications.js";import"./code.js";import"./elevation.js";import"./button.css.js";import"./it-Dft_Rjy-.js";import"./selector-mixin.js";import"./select-mixin.js";import"./scroll-mixin.js";import"./column-CLFZeRaw.js";import"./row-DZm4UH0H.js";import"./tab.js";import"./input.js";import"./property-CMTrOHQk.js";let c=(()=>{let c,u,n,r,l=[a("demo-shell")],p=[],d=o,g=[],b=[],y=[],w=[];return class extends d{static{u=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(d[Symbol.metadata]??null):void 0;n=[m("custom-selector")],r=[m("custom-pages")],t(this,null,n,{kind:"accessor",name:"selector",static:!1,private:!1,access:{has:t=>"selector"in t,get:t=>t.selector,set:(t,e)=>{t.selector=e}},metadata:e},g,b),t(this,null,r,{kind:"accessor",name:"pages",static:!1,private:!1,access:{has:t=>"pages"in t,get:t=>t.pages,set:(t,e)=>{t.pages=e}},metadata:e},y,w),t(null,c={value:u},l,{kind:"class",name:u.name,metadata:e},null,p),u=c.value,e&&Object.defineProperty(u,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#t=e(this,g,void 0);get selector(){return this.#t}set selector(t){this.#t=t}#e=(e(this,b),e(this,y,void 0));get pages(){return this.#e}set pages(t){this.#e=t}firstRender(){this.selector.addEventListener("selected",(async({detail:t})=>{document.dispatchEvent(new CustomEvent("custom-scroll",{detail:{scrolling:!1}})),this.pages.select(t),localStorage.setItem("last-selected",t)}));const t=localStorage.getItem("last-selected");t&&(customElements.get("custom-serlector")?this.selector.select(t):(this.selector.select(t),this.pages.select(t)))}static styles=[s`
2
2
  custom-drawer-layout {
3
3
  height: 100%;
4
4
  width: 100%;
@@ -76,7 +76,7 @@ import{_ as t,a as e}from"./tslib.es6-B87RQr7F.js";import{s as o,i as s,x as i}f
76
76
  <flex-row slot="top-app-bar-end">
77
77
  <custom-theme-mode></custom-theme-mode>
78
78
  <custom-button>
79
- <custom-icon slot="icon">more_vert</custom-icon>
79
+ <custom-icon icon="more_vert" slot="icon"></custom-icon>
80
80
  </custom-button>
81
81
  </flex-row>
82
82
 
@@ -332,7 +332,7 @@ import{_ as t,a as e}from"./tslib.es6-B87RQr7F.js";import{s as o,i as s,x as i}f
332
332
 
333
333
  <custom-tabs round>
334
334
  <custom-tab>
335
- <custom-icon>home</custom-icon>
335
+ <custom-icon icon="home"></custom-icon>
336
336
  home
337
337
  </custom-tab>
338
338
  <custom-tab>about</custom-tab>
@@ -341,7 +341,9 @@ import{_ as t,a as e}from"./tslib.es6-B87RQr7F.js";import{s as o,i as s,x as i}f
341
341
 
342
342
  <demo-section route="dialog">
343
343
  <flex-container>
344
- <custom-button class="fullscreen-dialog"><custom-icon slot="icon">menu</custom-icon></custom-button>
344
+ <custom-button class="fullscreen-dialog"
345
+ ><custom-icon slot="icon" icon="menu"></custom-icon
346
+ ></custom-button>
345
347
  <custom-dialog fullscreen>
346
348
  <span slot="title">title</span>
347
349
  <p>
@@ -517,7 +519,7 @@ import{_ as t,a as e}from"./tslib.es6-B87RQr7F.js";import{s as o,i as s,x as i}f
517
519
  </custom-list-item>
518
520
  </demo-section>
519
521
  <demo-section route="toggle">
520
- <custom-toggle togglers='["check_box","check_box_outline_blank", "info"]'></custom-toggle>
522
+ <custom-toggle .togglers=${"['check_box', 'check_box_outline_blank', 'info']"}></custom-toggle>
521
523
 
522
524
  <custom-button label="next"></custom-button>
523
525
 
@@ -1,4 +1,4 @@
1
- import{_ as e,a as t}from"./tslib.es6-B87RQr7F.js";import{s,i as l,x as o}from"./dark-mode-m29sAj4H.js";import{e as c}from"./custom-element-B_TPyPQO.js";import"./dropdown.js";import"./selector.js";import"./selector-mixin.js";import"./select-mixin.js";let r=(()=>{let r,i,a=[c("custom-menu")],n=[],d=s;return class extends d{static{i=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(d[Symbol.metadata]??null):void 0;e(null,r={value:i},a,{kind:"class",name:i.name,metadata:t},null,n),i=r.value,t&&Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}get selector(){return this.shadowRoot.querySelector("custom-selector")}set selected(e){this.selector.selected=e}get selected(){return this.selector.selected}select(e){this.selector.select(e)}#e=({detail:e})=>{this.dispatchEvent(new CustomEvent("selected",{detail:e}))};connectedCallback(){this.selector.addEventListener("selected",this.#e)}disconnectedCallback(){this.selector.removeEventListener("selected",this.#e)}static styles=[l`
1
+ import{_ as e,a as t}from"./tslib.es6-B87RQr7F.js";import{s,i as l,x as o}from"./dark-mode-m29sAj4H.js";import{e as c}from"./custom-element-B_TPyPQO.js";import"./dropdown.js";import"./selector.js";import"./selector-mixin.js";import"./select-mixin.js";let r=(()=>{let r,i,a=[c("custom-menu")],n=[],d=s;return class extends d{static{i=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(d[Symbol.metadata]??null):void 0;e(null,r={value:i},a,{kind:"class",name:i.name,metadata:t},null,n),i=r.value,t&&Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}get selector(){return this.shadowRoot.querySelector("custom-selector")}set selected(e){this.selector.selected=e}get selected(){return this.selector.selected}select(e){this.selector.select(e)}#e=({detail:e})=>{this.dispatchEvent(new CustomEvent("selected",{detail:e}))};firstRender(){this.selector.addEventListener("selected",this.#e)}disconnectedCallback(){this.selector.removeEventListener("selected",this.#e)}static styles=[l`
2
2
  :host {
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- const l=l=>class ScrollMixin extends l{set scrolling(l){l?this.setAttribute("scrolling",""):this.removeAttribute("scrolling")}get scrolling(){return this.hasAttribute("scrolling")}scrollElement=this;#l=()=>{this.isScrolling?clearTimeout(this.isScrolling):document.dispatchEvent(new CustomEvent("custom-scroll",{detail:{scrolling:0!==this.scrollTop}})),this.isScrolling=setTimeout((()=>{this.scrolling=0!==this.scrollTop,document.dispatchEvent(new CustomEvent("custom-scroll",{detail:{scrolling:this.scrolling}})),this.isScrolling=void 0}),this.scrollTimeout)};async connectedCallback(l={scrollElement:void 0}){super.connectedCallback&&super.connectedCallback(),await this.updateComplete,this.scrollElement=this.shadowRoot.querySelector(l.scrollElement)||this,this.scrollTimeout=100,this.scrollElement.addEventListener("scroll",this.#l)}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),this.scrollElement.removeEventListener("scroll",this.#l)}};export{l as ScrollMixin};
1
+ const l=l=>class ScrollMixin extends l{set scrolling(l){l?this.setAttribute("scrolling",""):this.removeAttribute("scrolling")}get scrolling(){return this.hasAttribute("scrolling")}scrollElement;#l=()=>{this.isScrolling?clearTimeout(this.isScrolling):document.dispatchEvent(new CustomEvent("custom-scroll",{detail:{scrolling:0!==this.scrollTop}})),this.isScrolling=setTimeout((()=>{this.scrolling=0!==this.scrollTop,document.dispatchEvent(new CustomEvent("custom-scroll",{detail:{scrolling:this.scrolling}})),this.isScrolling=void 0}),this.scrollTimeout)};firstRender(){super.firstRender?.(),this.scrollElement=this.scrollElement?this.shadowRoot.querySelector(this.scrollElement):this,this.scrollTimeout=100,this.scrollElement.addEventListener("scroll",this.#l)}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),this.scrollElement.removeEventListener("scroll",this.#l)}};export{l as ScrollMixin};
@@ -1,4 +1,4 @@
1
- import{_ as e,a as t}from"./tslib.es6-B87RQr7F.js";import{s as o,i as s,x as a}from"./dark-mode-m29sAj4H.js";import{e as l}from"./custom-element-B_TPyPQO.js";import"./section2.js";import"./code.js";import"./scroll-mixin.js";import"./elevation.js";let c=(()=>{let c,n,r=[l("demo-section")],i=[],m=o;return class extends m{static{n=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(m[Symbol.metadata]??null):void 0;e(null,c={value:n},r,{kind:"class",name:n.name,metadata:t},null,i),n=c.value,t&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}async connectedCallback(){const e=this.shadowRoot.querySelector("slot").assignedElements();for(const o of e){const e=document.createElement("demo-code");e.code=await(t=o.outerHTML,t.replace(/(\ <\/(?=[^<\/]*$))/g,"<")),o.after(e)}var t}static styles=[s`
1
+ import{_ as e,a as t}from"./tslib.es6-B87RQr7F.js";import{s as o,i as s,x as a}from"./dark-mode-m29sAj4H.js";import{e as r}from"./custom-element-B_TPyPQO.js";import"./section2.js";import"./code.js";import"./scroll-mixin.js";import"./elevation.js";let l=(()=>{let l,i,n=[r("demo-section")],c=[],m=o;return class extends m{static{i=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(m[Symbol.metadata]??null):void 0;e(null,l={value:i},n,{kind:"class",name:i.name,metadata:t},null,c),i=l.value,t&&Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}async firstRender(){const e=this.shadowRoot.querySelector("slot").assignedElements();for(const o of e){const e=document.createElement("demo-code");e.code=await(t=o.outerHTML,t.replace(/(\ <\/(?=[^<\/]*$))/g,"<")),o.after(e)}var t}static styles=[s`
2
2
  :host {
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -8,4 +8,4 @@ import{_ as e,a as t}from"./tslib.es6-B87RQr7F.js";import{s as o,i as s,x as a}f
8
8
  <custom-section>
9
9
  <slot></slot>
10
10
  </custom-section>
11
- `}static{t(n,i)}},n})();export{c as DemoSection};
11
+ `}static{t(i,c)}},i})();export{l as DemoSection};
@@ -4,7 +4,7 @@ import './../elements.js';
4
4
  export declare class DemoShell extends LiteElement {
5
5
  accessor selector: any;
6
6
  accessor pages: any;
7
- connectedCallback(): void;
7
+ firstRender(): void;
8
8
  static styles: import("lit").CSSResult[];
9
9
  render(): import("lit-html").TemplateResult<1>;
10
10
  }
@@ -2,7 +2,7 @@ import { LiteElement } from '@vandeurenglenn/lite';
2
2
  import '../section/section.js';
3
3
  import './code.js';
4
4
  export declare class DemoSection extends LiteElement {
5
- connectedCallback(): Promise<void>;
5
+ firstRender(): Promise<void>;
6
6
  static styles: import("lit").CSSResult[];
7
7
  render(): import("lit-html").TemplateResult<1>;
8
8
  }
@@ -81,7 +81,7 @@ let DemoShell = (() => {
81
81
  #pages_accessor_storage = (__runInitializers(this, _selector_extraInitializers), __runInitializers(this, _pages_initializers, void 0));
82
82
  get pages() { return this.#pages_accessor_storage; }
83
83
  set pages(value) { this.#pages_accessor_storage = value; }
84
- connectedCallback() {
84
+ firstRender() {
85
85
  const onSelected = async ({ detail }) => {
86
86
  document.dispatchEvent(new CustomEvent('custom-scroll', { detail: { scrolling: false } }));
87
87
  this.pages.select(detail);
@@ -179,7 +179,7 @@ let DemoShell = (() => {
179
179
  <flex-row slot="top-app-bar-end">
180
180
  <custom-theme-mode></custom-theme-mode>
181
181
  <custom-button>
182
- <custom-icon slot="icon">more_vert</custom-icon>
182
+ <custom-icon icon="more_vert" slot="icon"></custom-icon>
183
183
  </custom-button>
184
184
  </flex-row>
185
185
 
@@ -435,7 +435,7 @@ let DemoShell = (() => {
435
435
 
436
436
  <custom-tabs round>
437
437
  <custom-tab>
438
- <custom-icon>home</custom-icon>
438
+ <custom-icon icon="home"></custom-icon>
439
439
  home
440
440
  </custom-tab>
441
441
  <custom-tab>about</custom-tab>
@@ -444,7 +444,9 @@ let DemoShell = (() => {
444
444
 
445
445
  <demo-section route="dialog">
446
446
  <flex-container>
447
- <custom-button class="fullscreen-dialog"><custom-icon slot="icon">menu</custom-icon></custom-button>
447
+ <custom-button class="fullscreen-dialog"
448
+ ><custom-icon slot="icon" icon="menu"></custom-icon
449
+ ></custom-button>
448
450
  <custom-dialog fullscreen>
449
451
  <span slot="title">title</span>
450
452
  <p>
@@ -620,7 +622,7 @@ let DemoShell = (() => {
620
622
  </custom-list-item>
621
623
  </demo-section>
622
624
  <demo-section route="toggle">
623
- <custom-toggle togglers='["check_box","check_box_outline_blank", "info"]'></custom-toggle>
625
+ <custom-toggle .togglers=${"['check_box', 'check_box_outline_blank', 'info']"}></custom-toggle>
624
626
 
625
627
  <custom-button label="next"></custom-button>
626
628
 
@@ -8,7 +8,7 @@ export declare class CustomMenu extends LiteElement {
8
8
  set selected(value: string | number | HTMLElement | string[] | HTMLElement[]);
9
9
  get selected(): string | number | HTMLElement | string[] | HTMLElement[];
10
10
  select(selected: any): void;
11
- connectedCallback(): void;
11
+ firstRender(): void;
12
12
  disconnectedCallback(): void;
13
13
  static styles: import("lit").CSSResult[];
14
14
  render(): import("lit-html").TemplateResult<1>;
package/exports/menu.js CHANGED
@@ -34,7 +34,7 @@ let CustomMenu = (() => {
34
34
  #onselected = ({ detail }) => {
35
35
  this.dispatchEvent(new CustomEvent('selected', { detail }));
36
36
  };
37
- connectedCallback() {
37
+ firstRender() {
38
38
  this.selector.addEventListener('selected', this.#onselected);
39
39
  }
40
40
  disconnectedCallback() {
@@ -2,11 +2,9 @@ export declare const ScrollMixin: (Base: any) => {
2
2
  new (): {
3
3
  [x: string]: any;
4
4
  scrolling: any;
5
- scrollElement: /*elided*/ any;
5
+ scrollElement: any;
6
6
  "__#2@#onscroll": () => void;
7
- connectedCallback(options?: {
8
- scrollElement: undefined | string;
9
- }): Promise<void>;
7
+ firstRender(): void;
10
8
  disconnectedCallback(): void;
11
9
  };
12
10
  [x: string]: any;
@@ -8,7 +8,7 @@ const ScrollMixin = (Base) => class ScrollMixin extends Base {
8
8
  get scrolling() {
9
9
  return this.hasAttribute('scrolling');
10
10
  }
11
- scrollElement = this;
11
+ scrollElement;
12
12
  #onscroll = () => {
13
13
  if (this.isScrolling)
14
14
  clearTimeout(this.isScrolling);
@@ -20,10 +20,9 @@ const ScrollMixin = (Base) => class ScrollMixin extends Base {
20
20
  this.isScrolling = undefined;
21
21
  }, this.scrollTimeout);
22
22
  };
23
- async connectedCallback(options = { scrollElement: undefined }) {
24
- super.connectedCallback && super.connectedCallback();
25
- await this.updateComplete;
26
- this.scrollElement = this.shadowRoot.querySelector(options.scrollElement) || this;
23
+ firstRender() {
24
+ super.firstRender?.();
25
+ this.scrollElement = this.scrollElement ? this.shadowRoot.querySelector(this.scrollElement) : this;
27
26
  this.scrollTimeout = 100;
28
27
  this.scrollElement.addEventListener('scroll', this.#onscroll);
29
28
  }
@@ -3,11 +3,9 @@ declare const CustomSection_base: {
3
3
  new (): {
4
4
  [x: string]: any;
5
5
  scrolling: any;
6
- scrollElement: /*elided*/ any;
6
+ scrollElement: any;
7
7
  "__#2@#onscroll": () => void;
8
- connectedCallback(options?: {
9
- scrollElement: undefined | string;
10
- }): Promise<void>;
8
+ firstRender(): void;
11
9
  disconnectedCallback(): void;
12
10
  };
13
11
  [x: string]: any;
@@ -20,7 +20,7 @@ let DemoSection = (() => {
20
20
  _classThis = _classDescriptor.value;
21
21
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
22
22
  }
23
- async connectedCallback() {
23
+ async firstRender() {
24
24
  const assignedElements = this.shadowRoot.querySelector('slot').assignedElements();
25
25
  for (const element of assignedElements) {
26
26
  const code = document.createElement('demo-code');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vandeurenglenn/lite-elements",
3
- "version": "0.3.77",
3
+ "version": "0.3.78",
4
4
  "description": "set of lite elements following Material Design 3 spec",
5
5
  "type": "module",
6
6
  "scripts": {