@vandeurenglenn/lite-elements 0.3.37 → 0.3.38

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 e,a as t,e as r}from"./custom-element-BOdKJYdz.js";import{a,x as s,s as o}from"./property-D-Y1CFIF.js";import"./drawer.js";import"./drawer-button.js";import"./drawer-item.js";import"./top-app-bar.js";import"./column-CNOGwAhj.js";import"./elevation.js";import"./button.js";import"./pane.js";import"./icon-button.js";import"./icon.js";import"./it-Dft_Rjy-.js";import"./row-BHK6Zell.js";let i=(()=>{let i,n,d,c,l,p,m,h,w,u=[r("custom-drawer-layout")],g=[],b=o,y=[],_=[],T=[],k=[],f=[],v=[],O=[],j=[],D=[],x=[],I=[],B=[],C=[],$=[];return class extends b{static{n=this}static{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(b[Symbol.metadata]??null):void 0;d=[a({type:Boolean,reflect:!0,attribute:"drawer-open"})],c=[a({type:Boolean,reflect:!0,attribute:"keep-closed"})],l=[a({type:Boolean,reflect:!0})],p=[a({type:String})],m=[a({type:String})],h=[a({type:String})],w=[a()],e(this,null,d,{kind:"accessor",name:"drawerOpen",static:!1,private:!1,access:{has:e=>"drawerOpen"in e,get:e=>e.drawerOpen,set:(e,t)=>{e.drawerOpen=t}},metadata:r},y,_),e(this,null,c,{kind:"accessor",name:"keepClosed",static:!1,private:!1,access:{has:e=>"keepClosed"in e,get:e=>e.keepClosed,set:(e,t)=>{e.keepClosed=t}},metadata:r},T,k),e(this,null,l,{kind:"accessor",name:"narrow",static:!1,private:!1,access:{has:e=>"narrow"in e,get:e=>e.narrow,set:(e,t)=>{e.narrow=t}},metadata:r},f,v),e(this,null,p,{kind:"accessor",name:"drawerType",static:!1,private:!1,access:{has:e=>"drawerType"in e,get:e=>e.drawerType,set:(e,t)=>{e.drawerType=t}},metadata:r},O,j),e(this,null,m,{kind:"accessor",name:"appBarType",static:!1,private:!1,access:{has:e=>"appBarType"in e,get:e=>e.appBarType,set:(e,t)=>{e.appBarType=t}},metadata:r},D,x),e(this,null,h,{kind:"accessor",name:"mainDrawerId",static:!1,private:!1,access:{has:e=>"mainDrawerId"in e,get:e=>e.mainDrawerId,set:(e,t)=>{e.mainDrawerId=t}},metadata:r},I,B),e(this,null,w,{kind:"accessor",name:"mobileTrigger",static:!1,private:!1,access:{has:e=>"mobileTrigger"in e,get:e=>e.mobileTrigger,set:(e,t)=>{e.mobileTrigger=t}},metadata:r},C,$),e(null,i={value:n},u,{kind:"class",name:n.name,metadata:r},null,g),n=i.value,r&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),t(n,g)}#e=t(this,y,!1);get drawerOpen(){return this.#e}set drawerOpen(e){this.#e=e}#t=(t(this,_),t(this,T,!1));get keepClosed(){return this.#t}set keepClosed(e){this.#t=e}#r=(t(this,k),t(this,f,!1));get narrow(){return this.#r}set narrow(e){this.#r=e}#a=(t(this,v),t(this,O,"modal"));get drawerType(){return this.#a}set drawerType(e){this.#a=e}#s=(t(this,j),t(this,D,"center-aligned"));get appBarType(){return this.#s}set appBarType(e){this.#s=e}#o=(t(this,x),t(this,I,crypto.randomUUID()));get mainDrawerId(){return this.#o}set mainDrawerId(e){this.#o=e}#i=(t(this,B),t(this,C,"(max-width: 860px)"));get mobileTrigger(){return this.#i}set mobileTrigger(e){this.#i=e}onChange(e,t){if("mobileTrigger"===e){const e=matchMedia(t);this._onnarrow({detail:e.matches})}}connectedCallback(){document.addEventListener("custom-pane-close",(({detail:e})=>{this.mainDrawerId===e&&(this.drawerOpen=!1)})),document.addEventListener("custom-pane-open",(({detail:e})=>{this.mainDrawerId!==e||this.keepClosed||(this.drawerOpen=!0)})),document.addEventListener("custom-theme-narrow",this._onnarrow.bind(this))}_onnarrow({detail:e}){if(this.narrow=e,this.keepClosed)return this.drawerOpen=!1;this.drawerOpen=!e}_click=(t(this,$),()=>{this.narrow&&(this.drawerOpen=!this.drawerOpen)});render(){return s`<style>
1
+ import{_ as e,a as t,e as r}from"./custom-element-BOdKJYdz.js";import{a,x as s,s as o}from"./property-D-Y1CFIF.js";import"./drawer.js";import"./drawer-button.js";import"./drawer-item.js";import"./top-app-bar.js";import"./column-CNOGwAhj.js";import"./elevation.js";import"./button.js";import"./pane.js";import"./icon-button.js";import"./icon.js";import"./it-Dft_Rjy-.js";import"./row-BHK6Zell.js";let i=(()=>{let i,n,d,c,l,p,m,h,w,g=[r("custom-drawer-layout")],u=[],b=o,y=[],_=[],T=[],k=[],f=[],v=[],O=[],j=[],D=[],x=[],I=[],B=[],C=[],$=[];return class extends b{static{n=this}static{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(b[Symbol.metadata]??null):void 0;d=[a({type:Boolean,reflect:!0,attribute:"drawer-open"})],c=[a({type:Boolean,reflect:!0,attribute:"keep-closed"})],l=[a({type:Boolean,reflect:!0})],p=[a({type:String})],m=[a({type:String})],h=[a({type:String})],w=[a({attribute:"mobile-trigger"})],e(this,null,d,{kind:"accessor",name:"drawerOpen",static:!1,private:!1,access:{has:e=>"drawerOpen"in e,get:e=>e.drawerOpen,set:(e,t)=>{e.drawerOpen=t}},metadata:r},y,_),e(this,null,c,{kind:"accessor",name:"keepClosed",static:!1,private:!1,access:{has:e=>"keepClosed"in e,get:e=>e.keepClosed,set:(e,t)=>{e.keepClosed=t}},metadata:r},T,k),e(this,null,l,{kind:"accessor",name:"narrow",static:!1,private:!1,access:{has:e=>"narrow"in e,get:e=>e.narrow,set:(e,t)=>{e.narrow=t}},metadata:r},f,v),e(this,null,p,{kind:"accessor",name:"drawerType",static:!1,private:!1,access:{has:e=>"drawerType"in e,get:e=>e.drawerType,set:(e,t)=>{e.drawerType=t}},metadata:r},O,j),e(this,null,m,{kind:"accessor",name:"appBarType",static:!1,private:!1,access:{has:e=>"appBarType"in e,get:e=>e.appBarType,set:(e,t)=>{e.appBarType=t}},metadata:r},D,x),e(this,null,h,{kind:"accessor",name:"mainDrawerId",static:!1,private:!1,access:{has:e=>"mainDrawerId"in e,get:e=>e.mainDrawerId,set:(e,t)=>{e.mainDrawerId=t}},metadata:r},I,B),e(this,null,w,{kind:"accessor",name:"mobileTrigger",static:!1,private:!1,access:{has:e=>"mobileTrigger"in e,get:e=>e.mobileTrigger,set:(e,t)=>{e.mobileTrigger=t}},metadata:r},C,$),e(null,i={value:n},g,{kind:"class",name:n.name,metadata:r},null,u),n=i.value,r&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),t(n,u)}#e=t(this,y,!1);get drawerOpen(){return this.#e}set drawerOpen(e){this.#e=e}#t=(t(this,_),t(this,T,!1));get keepClosed(){return this.#t}set keepClosed(e){this.#t=e}#r=(t(this,k),t(this,f,!1));get narrow(){return this.#r}set narrow(e){this.#r=e}#a=(t(this,v),t(this,O,"modal"));get drawerType(){return this.#a}set drawerType(e){this.#a=e}#s=(t(this,j),t(this,D,"center-aligned"));get appBarType(){return this.#s}set appBarType(e){this.#s=e}#o=(t(this,x),t(this,I,crypto.randomUUID()));get mainDrawerId(){return this.#o}set mainDrawerId(e){this.#o=e}#i=(t(this,B),t(this,C,"(max-width: 860px)"));get mobileTrigger(){return this.#i}set mobileTrigger(e){this.#i=e}onChange(e,t){if("mobileTrigger"===e){const e=matchMedia(t);this._onnarrow({detail:e.matches})}}connectedCallback(){document.addEventListener("custom-pane-close",(({detail:e})=>{this.mainDrawerId===e&&(this.drawerOpen=!1)})),document.addEventListener("custom-pane-open",(({detail:e})=>{this.mainDrawerId!==e||this.keepClosed||(this.drawerOpen=!0)})),document.addEventListener("custom-theme-narrow",this._onnarrow.bind(this))}_onnarrow({detail:e}){if(this.narrow=e,this.keepClosed)return this.drawerOpen=!1;this.drawerOpen=!e}_click=(t(this,$),()=>{this.narrow&&(this.drawerOpen=!this.drawerOpen)});render(){return s`<style>
2
2
  :host {
3
3
  --custom-drawer-width: 320px;
4
4
  display: flex;
@@ -52,7 +52,7 @@ let CustomDrawerLayout = (() => {
52
52
  _drawerType_decorators = [property({ type: String })];
53
53
  _appBarType_decorators = [property({ type: String })];
54
54
  _mainDrawerId_decorators = [property({ type: String })];
55
- _mobileTrigger_decorators = [property()];
55
+ _mobileTrigger_decorators = [property({ attribute: 'mobile-trigger' })];
56
56
  __esDecorate(this, null, _drawerOpen_decorators, { kind: "accessor", name: "drawerOpen", static: false, private: false, access: { has: obj => "drawerOpen" in obj, get: obj => obj.drawerOpen, set: (obj, value) => { obj.drawerOpen = value; } }, metadata: _metadata }, _drawerOpen_initializers, _drawerOpen_extraInitializers);
57
57
  __esDecorate(this, null, _keepClosed_decorators, { kind: "accessor", name: "keepClosed", static: false, private: false, access: { has: obj => "keepClosed" in obj, get: obj => obj.keepClosed, set: (obj, value) => { obj.keepClosed = value; } }, metadata: _metadata }, _keepClosed_initializers, _keepClosed_extraInitializers);
58
58
  __esDecorate(this, null, _narrow_decorators, { kind: "accessor", name: "narrow", static: false, private: false, access: { has: obj => "narrow" in obj, get: obj => obj.narrow, set: (obj, value) => { obj.narrow = value; } }, metadata: _metadata }, _narrow_initializers, _narrow_extraInitializers);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vandeurenglenn/lite-elements",
3
- "version": "0.3.37",
3
+ "version": "0.3.38",
4
4
  "description": "set of lite elements following Material Design 3 spec",
5
5
  "type": "module",
6
6
  "scripts": {