@vandeurenglenn/lite-elements 0.3.24 → 0.3.26
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/exports/bundle/banner.js +2 -2
- package/exports/bundle/button.js +2 -2
- package/exports/bundle/card.js +2 -2
- package/exports/bundle/code.js +3 -3
- package/exports/bundle/column-D2XB0lDz.js +1 -0
- package/exports/bundle/custom-element-DIOmDbQp.js +1 -0
- package/exports/bundle/demo-elements.js +1 -1
- package/exports/bundle/demo-icons.js +3 -3
- package/exports/bundle/demo-shell.js +3 -3
- package/exports/bundle/demo.js +2 -2
- package/exports/bundle/dialog.js +6 -6
- package/exports/bundle/divider.js +2 -2
- package/exports/bundle/drawer-button.js +2 -2
- package/exports/bundle/drawer-item.js +3 -3
- package/exports/bundle/drawer-layout.js +2 -2
- package/exports/bundle/drawer.js +1 -1
- package/exports/bundle/dropdown-menu.js +2 -2
- package/exports/bundle/dropdown.js +2 -2
- package/exports/bundle/elements.js +1 -1
- package/exports/bundle/elevation.js +2 -2
- package/exports/bundle/icon-button.js +3 -3
- package/exports/bundle/icon-set.js +1 -1
- package/exports/bundle/icon.js +2 -2
- package/exports/bundle/input.js +2 -2
- package/exports/bundle/list-item.js +2 -2
- package/exports/bundle/menu.js +2 -2
- package/exports/bundle/minute-field.js +2 -2
- package/exports/bundle/notification.js +76 -0
- package/exports/bundle/notifications.js +66 -0
- package/exports/bundle/pane.js +1 -1
- package/exports/bundle/rail.js +1 -1
- package/exports/bundle/root.js +1 -1
- package/exports/bundle/row-DNgwBcX5.js +33 -0
- package/exports/bundle/section.js +3 -3
- package/exports/bundle/section2.js +2 -2
- package/exports/bundle/selector.js +2 -2
- package/exports/bundle/summary-mirror.js +2 -2
- package/exports/bundle/summary.js +3 -3
- package/exports/bundle/supporting-pane.js +1 -1
- package/exports/bundle/tab.js +2 -2
- package/exports/bundle/tabs.js +2 -2
- package/exports/bundle/text-field.js +2 -2
- package/exports/bundle/theme.js +1 -1
- package/exports/bundle/time-picker.js +2 -2
- package/exports/bundle/toggle-button.js +1 -1
- package/exports/bundle/toggle.js +2 -2
- package/exports/bundle/top-app-bar.js +82 -1
- package/exports/bundle/{custom-element-BMhVvZjf.js → tslib.es6-B0cSixZg.js} +1 -1
- package/exports/bundle/typography.js +2 -2
- package/exports/bundle/upload-file.js +2 -2
- package/exports/bundle/upload.js +1 -1
- package/exports/demo-shell.js +6 -0
- package/exports/elements.d.ts +5 -1
- package/exports/elements.js +6 -0
- package/exports/notification/notification.d.ts +13 -0
- package/exports/notification/notifications.d.ts +17 -0
- package/exports/notification.js +100 -0
- package/exports/notifications.js +146 -0
- package/package.json +17 -33
- package/exports/bundle/top-app-bar-DZJ8jFM2.js +0 -114
- package/exports/button/button.d.ts +0 -13
- package/exports/elevation/elevation.d.ts +0 -11
- package/exports/icon/icon.d.ts +0 -12
- package/exports/pane/pane.d.ts +0 -14
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import{_ as t,a as e}from"./tslib.es6-B0cSixZg.js";import"@vandeurenglenn/lite-elements/icon.js";import"./column-D2XB0lDz.js";import"./row-DNgwBcX5.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2019 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
*/const i=globalThis,r=i.ShadowRoot&&(void 0===i.ShadyCSS||i.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),a=new WeakMap;let h=class n{constructor(t,e,i){if(this._$cssResult$=!0,i!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(r&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=a.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&a.set(e,t))}return t}toString(){return this.cssText}};const c=r?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new h("string"==typeof t?t:t+"",void 0,o))(e)})(t):t
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2017 Google LLC
|
|
10
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
+
*/,{is:l,defineProperty:d,getOwnPropertyDescriptor:p,getOwnPropertyNames:u,getOwnPropertySymbols:_,getPrototypeOf:$}=Object,f=globalThis,m=f.trustedTypes,g=m?m.emptyScript:"",y=f.reactiveElementPolyfillSupport,A=(t,e)=>t,v={toAttribute(t,e){switch(e){case Boolean:t=t?g:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},E=(t,e)=>!l(t,e),w={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:E};Symbol.metadata??=Symbol("metadata"),f.litPropertyMetadata??=new WeakMap;let P=class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=w){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,e);void 0!==r&&d(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){const{get:r,set:o}=p(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return r?.call(this)},set(e){const a=r?.call(this);o.call(this,e),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??w}static _$Ei(){if(this.hasOwnProperty(A("elementProperties")))return;const t=$(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(A("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(A("properties"))){const t=this.properties,e=[...u(t),..._(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(c(t))}else void 0!==t&&e.push(c(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(r)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const r of e){const e=document.createElement("style"),o=i.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=r.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(void 0!==r&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:v).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,r=i._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=i.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:v;this._$Em=r,this[r]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??E)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}};P.elementStyles=[],P.shadowRootOptions={mode:"open"},P[A("elementProperties")]=new Map,P[A("finalized")]=new Map,y?.({ReactiveElement:P}),(f.reactiveElementVersions??=[]).push("2.0.4");
|
|
12
|
+
/**
|
|
13
|
+
* @license
|
|
14
|
+
* Copyright 2017 Google LLC
|
|
15
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
+
*/
|
|
17
|
+
const U=globalThis,C=U.trustedTypes,x=C?C.createPolicy("lit-html",{createHTML:t=>t}):void 0,O="$lit$",T=`lit$${(Math.random()+"").slice(9)}$`,N="?"+T,z=`<${N}>`,j=document,D=()=>j.createComment(""),B=t=>null===t||"object"!=typeof t&&"function"!=typeof t,W=Array.isArray,q="[ \t\n\f\r]",J=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,K=/-->/g,Z=/>/g,F=RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),G=/'/g,Q=/"/g,X=/^(?:script|style|textarea|title)$/i,Y=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),tt=Symbol.for("lit-noChange"),et=Symbol.for("lit-nothing"),st=new WeakMap,it=j.createTreeWalker(j,129);function rt(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==x?x.createHTML(e):e}const ot=(t,e)=>{const i=t.length-1,r=[];let o,a=2===e?"<svg>":"",h=J;for(let e=0;e<i;e++){const i=t[e];let c,l,d=-1,p=0;for(;p<i.length&&(h.lastIndex=p,l=h.exec(i),null!==l);)p=h.lastIndex,h===J?"!--"===l[1]?h=K:void 0!==l[1]?h=Z:void 0!==l[2]?(X.test(l[2])&&(o=RegExp("</"+l[2],"g")),h=F):void 0!==l[3]&&(h=F):h===F?">"===l[0]?(h=o??J,d=-1):void 0===l[1]?d=-2:(d=h.lastIndex-l[2].length,c=l[1],h=void 0===l[3]?F:'"'===l[3]?Q:G):h===Q||h===G?h=F:h===K||h===Z?h=J:(h=F,o=void 0);const u=h===F&&t[e+1].startsWith("/>")?" ":"";a+=h===J?i+z:d>=0?(r.push(c),i.slice(0,d)+O+i.slice(d)+T+u):i+T+(-2===d?e:u)}return[rt(t,a+(t[i]||"<?>")+(2===e?"</svg>":"")),r]};class V{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let o=0,a=0;const h=t.length-1,c=this.parts,[l,d]=ot(t,e);if(this.el=V.createElement(l,i),it.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=it.nextNode())&&c.length<h;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(O)){const e=d[a++],i=r.getAttribute(t).split(T),h=/([.?@])?(.*)/.exec(e);c.push({type:1,index:o,name:h[2],strings:i,ctor:"."===h[1]?k:"?"===h[1]?H:"@"===h[1]?I:R}),r.removeAttribute(t)}else t.startsWith(T)&&(c.push({type:6,index:o}),r.removeAttribute(t));if(X.test(r.tagName)){const t=r.textContent.split(T),e=t.length-1;if(e>0){r.textContent=C?C.emptyScript:"";for(let i=0;i<e;i++)r.append(t[i],D()),it.nextNode(),c.push({type:2,index:++o});r.append(t[e],D())}}}else if(8===r.nodeType)if(r.data===N)c.push({type:2,index:o});else{let t=-1;for(;-1!==(t=r.data.indexOf(T,t+1));)c.push({type:7,index:o}),t+=T.length-1}o++}}static createElement(t,e){const i=j.createElement("template");return i.innerHTML=t,i}}function nt(t,e,i=t,r){if(e===tt)return e;let o=void 0!==r?i._$Co?.[r]:i._$Cl;const a=B(e)?void 0:e._$litDirective$;return o?.constructor!==a&&(o?._$AO?.(!1),void 0===a?o=void 0:(o=new a(t),o._$AT(t,i,r)),void 0!==r?(i._$Co??=[])[r]=o:i._$Cl=o),void 0!==o&&(e=nt(t,o._$AS(t,e.values),o,r)),e}let at=class S{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,r=(t?.creationScope??j).importNode(e,!0);it.currentNode=r;let o=it.nextNode(),a=0,h=0,c=i[0];for(;void 0!==c;){if(a===c.index){let e;2===c.type?e=new M(o,o.nextSibling,this,t):1===c.type?e=new c.ctor(o,c.name,c.strings,this,t):6===c.type&&(e=new L(o,this,t)),this._$AV.push(e),c=i[++h]}a!==c?.index&&(o=it.nextNode(),a++)}return it.currentNode=j,r}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}};class M{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,r){this.type=2,this._$AH=et,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=nt(this,t,e),B(t)?t===et||null==t||""===t?(this._$AH!==et&&this._$AR(),this._$AH=et):t!==this._$AH&&t!==tt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>W(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==et&&B(this._$AH)?this._$AA.nextSibling.data=t:this.T(j.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=V.createElement(rt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new at(r,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=st.get(t.strings);return void 0===e&&st.set(t.strings,e=new V(t)),e}k(t){W(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const o of t)r===e.length?e.push(i=new M(this.S(D()),this.S(D()),this,this.options)):i=e[r],i._$AI(o),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class R{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,r,o){this.type=1,this._$AH=et,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=et}_$AI(t,e=this,i,r){const o=this.strings;let a=!1;if(void 0===o)t=nt(this,t,e,0),a=!B(t)||t!==this._$AH&&t!==tt,a&&(this._$AH=t);else{const r=t;let h,c;for(t=o[0],h=0;h<o.length-1;h++)c=nt(this,r[i+h],e,h),c===tt&&(c=this._$AH[h]),a||=!B(c)||c!==this._$AH[h],c===et?t=et:t!==et&&(t+=(c??"")+o[h+1]),this._$AH[h]=c}a&&!r&&this.j(t)}j(t){t===et?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class k extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===et?void 0:t}}class H extends R{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==et)}}class I extends R{constructor(t,e,i,r,o){super(t,e,i,r,o),this.type=5}_$AI(t,e=this){if((t=nt(this,t,e,0)??et)===tt)return;const i=this._$AH,r=t===et&&i!==et||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==et&&(i===et||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class L{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){nt(this,t)}}const ht=U.litHtmlPolyfillSupport;ht?.(V,M),(U.litHtmlVersions??=[]).push("3.1.2");const ct=globalThis,lt=ct.ShadowRoot&&(void 0===ct.ShadyCSS||ct.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,dt=Symbol(),pt=new WeakMap;
|
|
18
|
+
/**
|
|
19
|
+
* @license
|
|
20
|
+
* Copyright 2019 Google LLC
|
|
21
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
+
*/let ut=class n{constructor(t,e,i){if(this._$cssResult$=!0,i!==dt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(lt&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=pt.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&pt.set(e,t))}return t}toString(){return this.cssText}};const _t=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[r+1]),t[0]);return new ut(i,t,dt)},$t=lt?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new ut("string"==typeof t?t:t+"",void 0,dt))(e)})(t):t
|
|
23
|
+
/**
|
|
24
|
+
* @license
|
|
25
|
+
* Copyright 2017 Google LLC
|
|
26
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
+
*/,{is:ft,defineProperty:mt,getOwnPropertyDescriptor:gt,getOwnPropertyNames:yt,getOwnPropertySymbols:At,getPrototypeOf:vt}=Object,Et=globalThis,St=Et.trustedTypes,bt=St?St.emptyScript:"",wt=Et.reactiveElementPolyfillSupport,Pt=(t,e)=>t,Ut={toAttribute(t,e){switch(e){case Boolean:t=t?bt:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},Ct=(t,e)=>!ft(t,e),xt={attribute:!0,type:String,converter:Ut,reflect:!1,hasChanged:Ct};Symbol.metadata??=Symbol("metadata"),Et.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=xt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,e);void 0!==r&&mt(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){const{get:r,set:o}=gt(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return r?.call(this)},set(e){const a=r?.call(this);o.call(this,e),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??xt}static _$Ei(){if(this.hasOwnProperty(Pt("elementProperties")))return;const t=vt(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Pt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Pt("properties"))){const t=this.properties,e=[...yt(t),...At(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift($t(t))}else void 0!==t&&e.push($t(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(lt)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),r=ct.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(void 0!==r&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:Ut).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,r=i._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=i.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:Ut;this._$Em=r,this[r]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??Ct)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[Pt("elementProperties")]=new Map,b[Pt("finalized")]=new Map,wt?.({ReactiveElement:b}),(Et.reactiveElementVersions??=[]).push("2.0.4");
|
|
28
|
+
/**
|
|
29
|
+
* @license
|
|
30
|
+
* Copyright 2017 Google LLC
|
|
31
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
|
+
*/
|
|
33
|
+
class s extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const r=i?.renderBefore??e;let o=r._$litPart$;if(void 0===o){const t=i?.renderBefore??null;r._$litPart$=o=new M(e.insertBefore(D(),t),t,void 0,i??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return tt}}s._$litElement$=!0,s.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:s});const Ot=globalThis.litElementPolyfillSupport;Ot?.({LitElement:s}),(globalThis.litElementVersions??=[]).push("4.0.4");
|
|
34
|
+
/**
|
|
35
|
+
* @license
|
|
36
|
+
* Copyright 2017 Google LLC
|
|
37
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
|
+
*/
|
|
39
|
+
const Rt=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)}
|
|
40
|
+
/**
|
|
41
|
+
* @license
|
|
42
|
+
* Copyright 2017 Google LLC
|
|
43
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
44
|
+
*/,Mt={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:E},Tt=(t=Mt,e,i)=>{const{kind:r,metadata:o}=i;let a=globalThis.litPropertyMetadata.get(o);if(void 0===a&&globalThis.litPropertyMetadata.set(o,a=new Map),a.set(i.name,t),"accessor"===r){const{name:r}=i;return{set(i){const o=e.get.call(this);e.set.call(this,i),this.requestUpdate(r,o,t)},init(e){return void 0!==e&&this.P(r,void 0,t),e}}}if("setter"===r){const{name:r}=i;return function(i){const o=this[r];e.call(this,i),this.requestUpdate(r,o,t)}}throw Error("Unsupported decorator location: "+r)};function kt(t){return(e,i)=>"object"==typeof i?Tt(t,e,i):((t,e,i)=>{const r=e.hasOwnProperty(i);return e.constructor.createProperty(i,r?{...t,wrapped:!0}:t),r?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}let Ht=(()=>{let i,r,o,a,h,c,l=[Rt("custom-notification")],d=[],p=s,u=[],_=[],$=[],f=[],m=[],g=[],y=[],A=[];return class extends p{static{r=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(p[Symbol.metadata]??null):void 0;o=[kt()],a=[kt()],h=[kt()],c=[kt()],t(this,null,o,{kind:"accessor",name:"title",static:!1,private:!1,access:{has:t=>"title"in t,get:t=>t.title,set:(t,e)=>{t.title=e}},metadata:e},u,_),t(this,null,a,{kind:"accessor",name:"message",static:!1,private:!1,access:{has:t=>"message"in t,get:t=>t.message,set:(t,e)=>{t.message=e}},metadata:e},$,f),t(this,null,h,{kind:"accessor",name:"image",static:!1,private:!1,access:{has:t=>"image"in t,get:t=>t.image,set:(t,e)=>{t.image=e}},metadata:e},m,g),t(this,null,c,{kind:"accessor",name:"type",static:!1,private:!1,access:{has:t=>"type"in t,get:t=>t.type,set:(t,e)=>{t.type=e}},metadata:e},y,A),t(null,i={value:r},l,{kind:"class",name:r.name,metadata:e},null,d),r=i.value,e&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#t=e(this,u,void 0);get title(){return this.#t}set title(t){this.#t=t}#e=(e(this,_),e(this,$,void 0));get message(){return this.#e}set message(t){this.#e=t}#s=(e(this,f),e(this,m,void 0));get image(){return this.#s}set image(t){this.#s=t}#i=(e(this,g),e(this,y,void 0));get type(){return this.#i}set type(t){this.#i=t}#r=(e(this,A),()=>{this.parentElement.removeChild(this)});static styles=_t`
|
|
45
|
+
:host {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: flex-start;
|
|
48
|
+
font-size: 13px;
|
|
49
|
+
border: 1px solid;
|
|
50
|
+
border-radius: 12px;
|
|
51
|
+
padding: 6px 12px;
|
|
52
|
+
box-sizing: border-box;
|
|
53
|
+
margin-bottom: 12px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
flex-row {
|
|
57
|
+
height: 24px;
|
|
58
|
+
box-sizing: border-box;
|
|
59
|
+
align-items: center;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
strong {
|
|
63
|
+
font-size: 14px;
|
|
64
|
+
}
|
|
65
|
+
`;render(){return Y`
|
|
66
|
+
${this.image?Y`<img src=${this.image} />`:""}
|
|
67
|
+
<flex-column>
|
|
68
|
+
<flex-row>
|
|
69
|
+
<strong>${this.title}</strong>
|
|
70
|
+
<flex-it></flex-it>
|
|
71
|
+
<custom-icon icon="close" @click=${this.#r}></custom-icon>
|
|
72
|
+
</flex-row>
|
|
73
|
+
|
|
74
|
+
<p>${this.message}</p>
|
|
75
|
+
</flex-column>
|
|
76
|
+
`}static{e(r,d)}},r})();export{Ht as CustomNotification};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import{_ as t,a as e}from"./tslib.es6-B0cSixZg.js";import{t as o,j as i,v as s,D as n}from"./property-Do5-bKhz.js";import{e as l}from"./custom-element-DIOmDbQp.js";import"./notification.js";import"@vandeurenglenn/lite-elements/icon.js";import"@vandeurenglenn/lite-elements/pane.js";import"./row-DNgwBcX5.js";import"./column-D2XB0lDz.js";let a=(()=>{let a,r,c,p=[l("custom-notifications")],m=[],u=n,h=[],d=[];return class extends u{static{r=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(u[Symbol.metadata]??null):void 0;c=[o({type:Boolean,reflect:!0})],t(this,null,c,{kind:"accessor",name:"open",static:!1,private:!1,access:{has:t=>"open"in t,get:t=>t.open,set:(t,e)=>{t.open=e}},metadata:e},h,d),t(null,a={value:r},p,{kind:"class",name:r.name,metadata:e},null,m),r=a.value,e&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#t=e(this,h,void 0);get open(){return this.#t}set open(t){this.#t=t}get _list(){return this.shadowRoot.querySelector(".list")}createNotification({title:t,message:e,image:o},i=3e3){const s=document.createElement("custom-notification");s.title=t,s.message=e,s.image=o,i&&setTimeout((()=>{this.removeChild(s);const i=document.createElement("custom-notification");i.image=o,i.title=t,i.message=e,this._list.appendChild(i)}),i),this.appendChild(s)}_onclick(){const t=Array.from(this._list.querySelectorAll("custom-notification"));for(const e of t)this._list.removeChild(e);this.open=!1}static styles=[i`
|
|
2
|
+
:host {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
pointer-events: auto;
|
|
6
|
+
z-index: 10001;
|
|
7
|
+
position: absolute;
|
|
8
|
+
right: 0;
|
|
9
|
+
top: 0;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
width: 100%;
|
|
12
|
+
max-width: 320px;
|
|
13
|
+
height: auto;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
color: #eee;
|
|
16
|
+
pointer-events: none;
|
|
17
|
+
height: 100%;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:host([open]) {
|
|
21
|
+
background: rgb(51, 55, 80);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.recents {
|
|
25
|
+
display: block;
|
|
26
|
+
position: relative;
|
|
27
|
+
top: 12px;
|
|
28
|
+
right: 12px;
|
|
29
|
+
width: 100%;
|
|
30
|
+
pointer-events: none;
|
|
31
|
+
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
padding: 12px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.list {
|
|
37
|
+
padding: 24px;
|
|
38
|
+
height: 100%;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
custom-icon {
|
|
42
|
+
pointer-events: auto;
|
|
43
|
+
}
|
|
44
|
+
`];render(){return s`
|
|
45
|
+
<flex-row style="margin-top: 12px;margin-right: 12px;">
|
|
46
|
+
<flex-it></flex-it>
|
|
47
|
+
<custom-icon
|
|
48
|
+
icon="notifications"
|
|
49
|
+
@click=${()=>{0!==this._list.childElementCount&&(this.open=!this.open)}}
|
|
50
|
+
></custom-icon>
|
|
51
|
+
</flex-row>
|
|
52
|
+
|
|
53
|
+
<span class="recents">
|
|
54
|
+
<slot></slot>
|
|
55
|
+
</span>
|
|
56
|
+
|
|
57
|
+
<custom-pane ?open=${this.open} right top>
|
|
58
|
+
<span slot="header"></span>
|
|
59
|
+
<flex-column class="list" slot="content"> </flex-column>
|
|
60
|
+
|
|
61
|
+
<flex-row slot="footer" width="100%">
|
|
62
|
+
<flex-it></flex-it>
|
|
63
|
+
<custom-icon style="margin-right: 24px;" icon="clear-all" @click="${this._onclick}"></custom-icon>
|
|
64
|
+
</flex-row>
|
|
65
|
+
</custom-pane>
|
|
66
|
+
`}constructor(){super(...arguments),e(this,d)}static{e(r,m)}},r})();export{a as CustomNotifications};
|
package/exports/bundle/pane.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,a as t
|
|
1
|
+
import{_ as e,a as t}from"./tslib.es6-B0cSixZg.js";import{t as s,v as o,D as a}from"./property-Do5-bKhz.js";import{e as i}from"./custom-element-DIOmDbQp.js";import"./elevation.js";import"./button.js";import"./icon.js";import"./index-B3uz3f8C.js";let r=(()=>{let r,n,c,l,m,h,d,p,g=[i("custom-pane")],u=[],f=a,y=[],_=[],v=[],b=[],x=[],w=[],j=[],k=[],z=[],S=[],B=[],P=[];return class extends f{static{n=this}static{const o="function"==typeof Symbol&&Symbol.metadata?Object.create(f[Symbol.metadata]??null):void 0;c=[s({type:Boolean,reflect:!0})],l=[s({type:Boolean,reflect:!0})],m=[s({type:String,reflect:!0})],h=[s({type:Boolean,reflect:!0})],d=[s({type:Boolean,reflect:!0})],p=[s({type:String})],e(this,null,c,{kind:"accessor",name:"open",static:!1,private:!1,access:{has:e=>"open"in e,get:e=>e.open,set:(e,t)=>{e.open=t}},metadata:o},y,_),e(this,null,l,{kind:"accessor",name:"mobile",static:!1,private:!1,access:{has:e=>"mobile"in e,get:e=>e.mobile,set:(e,t)=>{e.mobile=t}},metadata:o},v,b),e(this,null,m,{kind:"accessor",name:"type",static:!1,private:!1,access:{has:e=>"type"in e,get:e=>e.type,set:(e,t)=>{e.type=t}},metadata:o},x,w),e(this,null,h,{kind:"accessor",name:"left",static:!1,private:!1,access:{has:e=>"left"in e,get:e=>e.left,set:(e,t)=>{e.left=t}},metadata:o},j,k),e(this,null,d,{kind:"accessor",name:"right",static:!1,private:!1,access:{has:e=>"right"in e,get:e=>e.right,set:(e,t)=>{e.right=t}},metadata:o},z,S),e(this,null,p,{kind:"accessor",name:"id",static:!1,private:!1,access:{has:e=>"id"in e,get:e=>e.id,set:(e,t)=>{e.id=t}},metadata:o},B,P),e(null,r={value:n},g,{kind:"class",name:n.name,metadata:o},null,u),n=r.value,o&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:o}),t(n,u)}#e=t(this,y,!1);get open(){return this.#e}set open(e){this.#e=e}#t=(t(this,_),t(this,v,!1));get mobile(){return this.#t}set mobile(e){this.#t=e}#s=(t(this,b),t(this,x,void 0));get type(){return this.#s}set type(e){this.#s=e}#o=(t(this,w),t(this,j,!0));get left(){return this.#o}set left(e){this.#o=e}#a=(t(this,k),t(this,z,!1));get right(){return this.#a}set right(e){this.#a=e}#i=(t(this,S),t(this,B,void 0));get id(){return this.#i}set id(e){this.#i=e}closePane(e){e.stopPropagation(),this.open=!1,document.dispatchEvent(new CustomEvent("custom-pane-close",{detail:this.id||""+(this.left?"left":"right")}))}render(){return o`<style>
|
|
2
2
|
:host {
|
|
3
3
|
--custom-pane-width: 100%;
|
|
4
4
|
display: flex;
|
package/exports/bundle/rail.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as t,a as e
|
|
1
|
+
import{_ as t,a as e}from"./tslib.es6-B0cSixZg.js";import{t as s,v as o,D as a}from"./property-Do5-bKhz.js";import{e as i}from"./custom-element-DIOmDbQp.js";import"./pane.js";import"./elevation.js";import"./button.js";import"./icon.js";import"./index-B3uz3f8C.js";let l=(()=>{let l,r,n,c,m,p,h=[i("custom-rail")],d=[],y=a,g=[],u=[],b=[],f=[],_=[],v=[],x=[],j=[];return class extends y{static{r=this}static{const o="function"==typeof Symbol&&Symbol.metadata?Object.create(y[Symbol.metadata]??null):void 0;n=[s({type:Boolean,reflect:!0})],c=[s({type:Boolean,reflect:!0})],m=[s({type:String,reflect:!0})],p=[s({type:Boolean})],t(this,null,n,{kind:"accessor",name:"open",static:!1,private:!1,access:{has:t=>"open"in t,get:t=>t.open,set:(t,e)=>{t.open=e}},metadata:o},g,u),t(this,null,c,{kind:"accessor",name:"mobile",static:!1,private:!1,access:{has:t=>"mobile"in t,get:t=>t.mobile,set:(t,e)=>{t.mobile=e}},metadata:o},b,f),t(this,null,m,{kind:"accessor",name:"type",static:!1,private:!1,access:{has:t=>"type"in t,get:t=>t.type,set:(t,e)=>{t.type=e}},metadata:o},_,v),t(this,null,p,{kind:"accessor",name:"right",static:!1,private:!1,access:{has:t=>"right"in t,get:t=>t.right,set:(t,e)=>{t.right=e}},metadata:o},x,j),t(null,l={value:r},h,{kind:"class",name:r.name,metadata:o},null,d),r=l.value,o&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:o}),e(r,d)}#t=e(this,g,!1);get open(){return this.#t}set open(t){this.#t=t}#e=(e(this,u),e(this,b,!1));get mobile(){return this.#e}set mobile(t){this.#e=t}#s=(e(this,f),e(this,_,void 0));get type(){return this.#s}set type(t){this.#s=t}#o=(e(this,v),e(this,x,!1));get right(){return this.#o}set right(t){this.#o=t}render(){return o`<style>
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
}
|
package/exports/bundle/root.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as t,a as e
|
|
1
|
+
import{_ as t,a as e}from"./tslib.es6-B0cSixZg.js";import{j as a,v as s,D as o}from"./property-Do5-bKhz.js";import{e as l}from"./custom-element-DIOmDbQp.js";import"./theme.js";let m=(()=>{let m,r,n=[l("custom-root")],c=[],i=o;return class extends i{static{r=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(i[Symbol.metadata]??null):void 0;t(null,m={value:r},n,{kind:"class",name:r.name,metadata:e},null,c),r=m.value,e&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static styles=[a`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
const t=globalThis,e=t.trustedTypes,s=e?e.createPolicy("lit-html",{createHTML:t=>t}):void 0,i="$lit$",r=`lit$${(Math.random()+"").slice(9)}$`,n="?"+r,a=`<${n}>`,o=document,h=()=>o.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,l=Array.isArray,d="[ \t\n\f\r]",u=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,p=/-->/g,g=/>/g,_=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),b=/'/g,m=/"/g,$=/^(?:script|style|textarea|title)$/i,A=(t,...e)=>({_$litType$:1,strings:t,values:e}),f=Symbol.for("lit-noChange"),y=Symbol.for("lit-nothing"),v=new WeakMap,x=o.createTreeWalker(o,129);function S(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s?s.createHTML(e):e}const T=(t,e)=>{const s=t.length-1,n=[];let o,h=2===e?"<svg>":"",c=u;for(let e=0;e<s;e++){const s=t[e];let l,d,A=-1,f=0;for(;f<s.length&&(c.lastIndex=f,d=c.exec(s),null!==d);)f=c.lastIndex,c===u?"!--"===d[1]?c=p:void 0!==d[1]?c=g:void 0!==d[2]?($.test(d[2])&&(o=RegExp("</"+d[2],"g")),c=_):void 0!==d[3]&&(c=_):c===_?">"===d[0]?(c=o??u,A=-1):void 0===d[1]?A=-2:(A=c.lastIndex-d[2].length,l=d[1],c=void 0===d[3]?_:'"'===d[3]?m:b):c===m||c===b?c=_:c===p||c===g?c=u:(c=_,o=void 0);const y=c===_&&t[e+1].startsWith("/>")?" ":"";h+=c===u?s+a:A>=0?(n.push(l),s.slice(0,A)+i+s.slice(A)+r+y):s+r+(-2===A?e:y)}return[S(t,h+(t[s]||"<?>")+(2===e?"</svg>":"")),n]};class N{constructor({strings:t,_$litType$:s},a){let o;this.parts=[];let c=0,l=0;const d=t.length-1,u=this.parts,[p,g]=T(t,s);if(this.el=N.createElement(p,a),x.currentNode=this.el.content,2===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=x.nextNode())&&u.length<d;){if(1===o.nodeType){if(o.hasAttributes())for(const t of o.getAttributeNames())if(t.endsWith(i)){const e=g[l++],s=o.getAttribute(t).split(r),i=/([.?@])?(.*)/.exec(e);u.push({type:1,index:c,name:i[2],strings:s,ctor:"."===i[1]?M:"?"===i[1]?E:"@"===i[1]?I:R}),o.removeAttribute(t)}else t.startsWith(r)&&(u.push({type:6,index:c}),o.removeAttribute(t));if($.test(o.tagName)){const t=o.textContent.split(r),s=t.length-1;if(s>0){o.textContent=e?e.emptyScript:"";for(let e=0;e<s;e++)o.append(t[e],h()),x.nextNode(),u.push({type:2,index:++c});o.append(t[s],h())}}}else if(8===o.nodeType)if(o.data===n)u.push({type:2,index:c});else{let t=-1;for(;-1!==(t=o.data.indexOf(r,t+1));)u.push({type:7,index:c}),t+=r.length-1}c++}}static createElement(t,e){const s=o.createElement("template");return s.innerHTML=t,s}}function H(t,e,s=t,i){if(e===f)return e;let r=void 0!==i?s._$Co?.[i]:s._$Cl;const n=c(e)?void 0:e._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),void 0===n?r=void 0:(r=new n(t),r._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=r:s._$Cl=r),void 0!==r&&(e=H(t,r._$AS(t,e.values),r,i)),e}class C{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??o).importNode(e,!0);x.currentNode=i;let r=x.nextNode(),n=0,a=0,h=s[0];for(;void 0!==h;){if(n===h.index){let e;2===h.type?e=new w(r,r.nextSibling,this,t):1===h.type?e=new h.ctor(r,h.name,h.strings,this,t):6===h.type&&(e=new U(r,this,t)),this._$AV.push(e),h=s[++a]}n!==h?.index&&(r=x.nextNode(),n++)}return x.currentNode=o,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class w{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=y,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=H(this,t,e),c(t)?t===y||null==t||""===t?(this._$AH!==y&&this._$AR(),this._$AH=y):t!==this._$AH&&t!==f&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>l(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==y&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(o.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(S(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new C(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=v.get(t.strings);return void 0===e&&v.set(t.strings,e=new N(t)),e}k(t){l(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const r of t)i===e.length?e.push(s=new w(this.S(h()),this.S(h()),this,this.options)):s=e[i],s._$AI(r),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class R{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,r){this.type=1,this._$AH=y,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=y}_$AI(t,e=this,s,i){const r=this.strings;let n=!1;if(void 0===r)t=H(this,t,e,0),n=!c(t)||t!==this._$AH&&t!==f,n&&(this._$AH=t);else{const i=t;let a,o;for(t=r[0],a=0;a<r.length-1;a++)o=H(this,i[s+a],e,a),o===f&&(o=this._$AH[a]),n||=!c(o)||o!==this._$AH[a],o===y?t=y:t!==y&&(t+=(o??"")+r[a+1]),this._$AH[a]=o}n&&!i&&this.j(t)}j(t){t===y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class M extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===y?void 0:t}}class E extends R{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==y)}}class I extends R{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){if((t=H(this,t,e,0)??y)===f)return;const s=this._$AH,i=t===y&&s!==y||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==y&&(s===y||i);i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class U{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){H(this,t)}}const W=t.litHtmlPolyfillSupport;W?.(N,w),(t.litHtmlVersions??=[]).push("3.1.2");const j=globalThis;j.ShadowRoot&&(void 0===j.ShadyCSS||j.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&CSSStyleSheet.prototype,Symbol.metadata??=Symbol("metadata");class D extends HTMLElement{static get observedAttributes(){return this[Symbol.metadata]?.observedAttributes?.values()??[]}attributeChangedCallback(t,e,s){this[t]=s}constructor(){super(),this.renderedOnce=!1,this.rendered=new Promise((t=>{this.renderResolve=t})),this.attachShadow({mode:"open"});const t=customElements.get(this.localName);this.shadowRoot.adoptedStyleSheets=t.styles?t.styles.map((t=>t.styleSheet??t)):[],this.requestRender()}render(){return A`<slot></slot>`}requestRender(){((t,e,s)=>{const i=e;let r=i._$litPart$;if(void 0===r){const t=null;i._$litPart$=r=new w(e.insertBefore(h(),t),t,void 0,{})}r._$AI(t)})(this.render(),this.shadowRoot),this.renderedOnce||(this.renderResolve(!0),this.renderedOnce=!0,this.firstRender&&this.firstRender())}}globalThis.pubsub=globalThis.pubsub||new class{subscribers={};verbose;constructor(t){this.verbose=t}_handleContext(t,e){return void 0===e&&(e=t),e}hasSubscribers(t){return!!this.subscribers[t]}subscribe(t,e,s){this.hasSubscribers(t)||(this.subscribers[t]={handlers:[],value:void 0}),s=this._handleContext(e,s),this.subscribers[t].handlers.push(e.bind(s))}unsubscribe(t,e,s){if(!this.hasSubscribers(t))return;s=this._handleContext(e,s);const i=this.subscribers[t].handlers.indexOf(e.bind(s));this.subscribers[t].handlers.splice(i),0===this.subscribers[t].handlers.length&&delete this.subscribers[t]}publish(t,e,s){this.hasSubscribers(t)||(this.subscribers[t]={handlers:[]});const i=this.subscribers[t]?.value;if(this.verbose||s||i!==e){this.subscribers[t].value=e;for(const s of this.subscribers[t].handlers)s(e,i)}}publishVerbose(t,e){this.publish(t,e,!0)}once(t){return new Promise((e=>{const s=i=>{e(i),this.unsubscribe(t,s)};this.subscribe(t,s)}))}};const k={type:String,reflect:!1,renders:!0,batchDelay:50,temporaryRender:10},O=(t,e)=>{let s=t;return e===Boolean?s=Boolean("true"===t):e===Number?s=Number(t):e===Uint8Array?s=new Uint8Array(t.split(",")):e!==Array&&e!==Object&&e!==WeakMap&&e!==Map&&e!==Uint8Array||(s=JSON.parse(t),e===Map&&(s=new Map(t)),e===WeakMap&&(s=new WeakMap(t))),s},z=t=>{t={...k,...t};let e=0;return function(s,{kind:i,name:r,addInitializer:n,access:a,metadata:o}){const{type:h,reflect:c,attribute:l,renders:d,batches:u,batchDelay:p,consumer:g,provider:_,temporaryRender:b}=t,m=String(r),$=l&&"string"==typeof l?l:m,A=h===Boolean,f=g||"boolean"==typeof t.consumes?$:t.consumes,y=_||"boolean"==typeof t.provides?$:t.provides;if(t.provider&&console.warn(`${m}: 'options.provider' is deprecated, use options.provides instead`),t.consumer&&console.warn(`${m}: 'options.consumer' is deprecated, used options.consumes instead`),n((async function(){"accessor"!==i&&console.warn(`${this.localName}: @property(${t}) ${m} ${i} is not supported`),(l||c)&&(o||(o={}),o.observedAttributes||(o.observedAttributes=new Map),o.observedAttributes.set(m,$)),f&&globalThis.pubsub.subscribe(f,(async t=>{this[r]=t}))})),"accessor"===i)return{get(){return v.call(this)},set(t){return x.call(this,t)},init(t){return this.hasAttribute($)&&(t=A?this.hasAttribute($):O(this.getAttribute($),h)),void 0!==t&&x.call(this,t),f&&globalThis.pubsub.subscribers?.[f]?.value&&x.call(this,globalThis.pubsub.subscribers[f].value),this[r]}};function v(){const t=c||l?A?this.hasAttribute($):O(this.getAttribute($),h):this[`__${m}`]?this[`__${m}`]:this[`_${m}`];return f&&!this[`__${m}`]&&globalThis.pubsub.subscribers?.[f]?.value?(t!==globalThis.pubsub.subscribers[f].value&&x.call(this,globalThis.pubsub.subscribers[f].value),globalThis.pubsub.subscribers[f].value):t}async function x(t){if(y&&globalThis.pubsub.publish(y,t),this[`_${m}`]!==t){this.willChange&&(this[`__${m}`]=await this.willChange(r,t)),c||l?A?t||this[`__${m}`]?this.setAttribute($,""):this.removeAttribute($):t||this[`__${m}`]?this.setAttribute($,((t,e)=>{let s=e;if(t===Boolean||t===Number||t===Uint8Array)return e.toString();if(t===Array||t===Object||t===WeakMap||t===Map||t===Uint8Array){let i;t!==Map&&t!==WeakMap||(i=Object(e).entries()),s=JSON.stringify(i)}return s})(h,this[`__${m}`]??t)):this.removeAttribute($):this[`_${m}`]=t;const s=()=>{e=0,this.requestRender&&d&&this.requestRender(),this.onChange&&this.onChange(r,this[`__${m}`]??t)};u?(e===b&&s(),this[`_${m}_timeout`]&&clearTimeout(this[`_${m}_timeout`]),this[`_${m}_timeout`]=setTimeout(s,p)):s()}}}};var B=function(t,e,s,i,r,n){function a(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var o,h=i.kind,c="getter"===h?"get":"setter"===h?"set":"value",l=!e&&t?i.static?t:t.prototype:null,d=e||(l?Object.getOwnPropertyDescriptor(l,i.name):{}),u=!1,p=s.length-1;p>=0;p--){var g={};for(var _ in i)g[_]="access"===_?{}:i[_];for(var _ in i.access)g.access[_]=i.access[_];g.addInitializer=function(t){if(u)throw new TypeError("Cannot add initializers after decoration has completed");n.push(a(t||null))};var b=(0,s[p])("accessor"===h?{get:d.get,set:d.set}:d[c],g);if("accessor"===h){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw new TypeError("Object expected");(o=a(b.get))&&(d.get=o),(o=a(b.set))&&(d.set=o),(o=a(b.init))&&r.unshift(o)}else(o=a(b))&&("field"===h?r.unshift(o):d[c]=o)}l&&Object.defineProperty(l,i.name,d),u=!0},P=function(t,e,s){for(var i=arguments.length>2,r=0;r<e.length;r++)s=i?e[r].call(t,s):e[r].call(t);return i?s:void 0};let L=(()=>{let t,e,s,i,r,n,a,o,h,c,l=D,d=[],u=[],p=[],g=[],_=[],b=[],m=[],$=[],f=[],y=[],v=[];return class FlexDisplay extends l{static{const A="function"==typeof Symbol&&Symbol.metadata?Object.create(l[Symbol.metadata]??null):void 0;t=[z({type:String})],e=[z({type:String})],s=[z({type:String})],i=[z({type:String})],r=[z({type:String,reflect:!0})],n=[z({type:Boolean,reflect:!0})],a=[z({type:Boolean,reflect:!0,attribute:"center-center"})],o=[z({type:String})],h=[z({type:String})],c=[z({type:String})],B(this,null,t,{kind:"accessor",name:"padding",static:!1,private:!1,access:{has:t=>"padding"in t,get:t=>t.padding,set:(t,e)=>{t.padding=e}},metadata:A},u,d),B(this,null,e,{kind:"accessor",name:"minWidth",static:!1,private:!1,access:{has:t=>"minWidth"in t,get:t=>t.minWidth,set:(t,e)=>{t.minWidth=e}},metadata:A},p,d),B(this,null,s,{kind:"accessor",name:"maxWidth",static:!1,private:!1,access:{has:t=>"maxWidth"in t,get:t=>t.maxWidth,set:(t,e)=>{t.maxWidth=e}},metadata:A},g,d),B(this,null,i,{kind:"accessor",name:"width",static:!1,private:!1,access:{has:t=>"width"in t,get:t=>t.width,set:(t,e)=>{t.width=e}},metadata:A},_,d),B(this,null,r,{kind:"accessor",name:"direction",static:!1,private:!1,access:{has:t=>"direction"in t,get:t=>t.direction,set:(t,e)=>{t.direction=e}},metadata:A},b,d),B(this,null,n,{kind:"accessor",name:"center",static:!1,private:!1,access:{has:t=>"center"in t,get:t=>t.center,set:(t,e)=>{t.center=e}},metadata:A},m,d),B(this,null,a,{kind:"accessor",name:"centerCenter",static:!1,private:!1,access:{has:t=>"centerCenter"in t,get:t=>t.centerCenter,set:(t,e)=>{t.centerCenter=e}},metadata:A},$,d),B(this,null,o,{kind:"accessor",name:"justifyContent",static:!1,private:!1,access:{has:t=>"justifyContent"in t,get:t=>t.justifyContent,set:(t,e)=>{t.justifyContent=e}},metadata:A},f,d),B(this,null,h,{kind:"accessor",name:"alignItems",static:!1,private:!1,access:{has:t=>"alignItems"in t,get:t=>t.alignItems,set:(t,e)=>{t.alignItems=e}},metadata:A},y,d),B(this,null,c,{kind:"accessor",name:"boxSizing",static:!1,private:!1,access:{has:t=>"boxSizing"in t,get:t=>t.boxSizing,set:(t,e)=>{t.boxSizing=e}},metadata:A},v,d),A&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:A})}#t=(P(this,d),P(this,u,"0"));get padding(){return this.#t}set padding(t){this.#t=t}#e=P(this,p,"auto");get minWidth(){return this.#e}set minWidth(t){this.#e=t}#s=P(this,g,"auto");get maxWidth(){return this.#s}set maxWidth(t){this.#s=t}#i=P(this,_,"100%");get width(){return this.#i}set width(t){this.#i=t}#r=P(this,b,"row");get direction(){return this.#r}set direction(t){this.#r=t}#n=P(this,m,void 0);get center(){return this.#n}set center(t){this.#n=t}#a=P(this,$,void 0);get centerCenter(){return this.#a}set centerCenter(t){this.#a=t}#o=P(this,f,"flex-start");get justifyContent(){return this.#o}set justifyContent(t){this.#o=t}#h=P(this,y,"flex-start");get alignItems(){return this.#h}set alignItems(t){this.#h=t}#c=P(this,v,"border-box");get boxSizing(){return this.#c}set boxSizing(t){this.#c=t}render(){return A`
|
|
7
|
+
<style>
|
|
8
|
+
:host {
|
|
9
|
+
display: flex;
|
|
10
|
+
box-sizing: var(--flex-display-box-sizing, ${this.boxSizing});
|
|
11
|
+
max-width: var(--flex-display-max-width, ${this.maxWidth});
|
|
12
|
+
min-width: var(--flex-display-min-width, ${this.minWidth});
|
|
13
|
+
width: var(--flex-display-width, ${this.width});
|
|
14
|
+
flex-direction: var(--flex-display-direction, ${this.direction});
|
|
15
|
+
justify-content: var(
|
|
16
|
+
--flex-display-justify-content,
|
|
17
|
+
${this.justifyContent}
|
|
18
|
+
);
|
|
19
|
+
align-items: var(--flex-display-align-items, ${this.alignItems});
|
|
20
|
+
padding: var(--flex-display-padding, ${this.padding});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:host([center]) {
|
|
24
|
+
align-items: center;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host([center-center]) {
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
}
|
|
31
|
+
</style>
|
|
32
|
+
<slot></slot>
|
|
33
|
+
`}}})();customElements.define("flex-row",class FlexRow extends L{constructor(){super(),this.direction="row",this.width="auto"}});export{L as F};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{_ as e,a as t
|
|
1
|
+
import{_ as e,a as t}from"./tslib.es6-B0cSixZg.js";import{j as o,v as s,D as a}from"./property-Do5-bKhz.js";import{e as l}from"./custom-element-DIOmDbQp.js";import"./section2.js";import"./code.js";import"./scroll-mixin.js";import"./elevation.js";let r=(()=>{let r,c,n=[l("demo-section")],i=[],m=a;return class extends m{static{c=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(m[Symbol.metadata]??null):void 0;e(null,r={value:c},n,{kind:"class",name:c.name,metadata:t},null,i),c=r.value,t&&Object.defineProperty(c,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=[o`
|
|
2
2
|
:host {
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
box-sizing: border-box;
|
|
6
6
|
}
|
|
7
|
-
`];render(){return
|
|
7
|
+
`];render(){return s`
|
|
8
8
|
<custom-section>
|
|
9
9
|
<slot></slot>
|
|
10
10
|
</custom-section>
|
|
11
|
-
`}static{t(
|
|
11
|
+
`}static{t(c,i)}},c})();export{r as DemoSection};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,a as t
|
|
1
|
+
import{_ as e,a as t}from"./tslib.es6-B0cSixZg.js";import{j as a,v as o,D as l}from"./property-Do5-bKhz.js";import{e as n}from"./custom-element-DIOmDbQp.js";import{ScrollMixin as s}from"./scroll-mixin.js";import"./elevation.js";let r=(()=>{let r,i,m=[n("custom-section")],c=[],u=s(l);return class extends u{static{i=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(u[Symbol.metadata]??null):void 0;e(null,r={value:i},m,{kind:"class",name:i.name,metadata:t},null,c),i=r.value,t&&Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static styles=[a`
|
|
2
2
|
:host {
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: center;
|
|
@@ -16,7 +16,7 @@ import{_ as e,a as t,e as a}from"./custom-element-BMhVvZjf.js";import{j as o,v a
|
|
|
16
16
|
.content {
|
|
17
17
|
max-width: 720px;
|
|
18
18
|
}
|
|
19
|
-
`];render(){return
|
|
19
|
+
`];render(){return o`
|
|
20
20
|
<flex-column class="container">
|
|
21
21
|
<flex-column class="content">
|
|
22
22
|
<slot></slot>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,a as t
|
|
1
|
+
import{_ as e,a as t}from"./tslib.es6-B0cSixZg.js";import{j as a,v as o}from"./property-Do5-bKhz.js";import{e as l}from"./custom-element-DIOmDbQp.js";import{SelectorBase as s}from"./selector-mixin.js";import"./select-mixin.js";let r=(()=>{let r,n,c=[l("custom-selector")],i=[],m=s;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,r={value:n},c,{kind:"class",name:n.name,metadata:t},null,i),n=r.value,t&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static styles=[a`
|
|
2
2
|
:host {
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -28,4 +28,4 @@ import{_ as e,a as t,e as a}from"./custom-element-BMhVvZjf.js";import{j as o,v a
|
|
|
28
28
|
background: var(--md-sys-color-secondary-container-hover);
|
|
29
29
|
color: var(--md-sys-color-on-secondary-container);
|
|
30
30
|
}
|
|
31
|
-
`];render(){return
|
|
31
|
+
`];render(){return o`<slot></slot>`}static{t(n,i)}},n})();export{r as CustomSelector};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as t,a as e
|
|
1
|
+
import{_ as t,a as e}from"./tslib.es6-B0cSixZg.js";import{v as s,D as i}from"./property-Do5-bKhz.js";import{e as l}from"./custom-element-DIOmDbQp.js";let a=(()=>{let a,o,r=[l("custom-summary-mirror")],m=[],h=i;return class extends h{static{o=this}static{const s="function"==typeof Symbol&&Symbol.metadata?Object.create(h[Symbol.metadata]??null):void 0;t(null,a={value:o},r,{kind:"class",name:o.name,metadata:s},null,m),o=a.value,s&&Object.defineProperty(o,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:s}),e(o,m)}connectedCallback(){const t=window.matchMedia("(min-width: 1200px)");this._matches(t),this._matches=this._matches.bind(this),t.onchange=this._matches}_matches({matches:t}){const e=this.querySelector('[slot="left"]'),s=this.querySelector('[slot="right"]');t?s.hasAttribute("switched")&&(e.removeAttribute("switched"),e.setAttribute("slot","right"),s.setAttribute("slot","left")):(e.setAttribute("switched",""),e.setAttribute("slot","right"),s.setAttribute("slot","left"))}get template(){return s`
|
|
2
2
|
<style>
|
|
3
3
|
:host {
|
|
4
4
|
display: flex;
|
|
@@ -17,4 +17,4 @@ import{_ as t,a as e,e as s}from"./custom-element-BMhVvZjf.js";import{v as i,D a
|
|
|
17
17
|
</style>
|
|
18
18
|
<slot name="left"></slot>
|
|
19
19
|
<slot name="right"></slot>
|
|
20
|
-
`}},o})();export{
|
|
20
|
+
`}},o})();export{a as CustomSummaryMirror};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as t,a as e
|
|
1
|
+
import{_ as t,a as e}from"./tslib.es6-B0cSixZg.js";import{j as a,v as l,D as o}from"./property-Do5-bKhz.js";import{e as s}from"./custom-element-DIOmDbQp.js";let i=(()=>{let i,m,n=[s("custom-summary")],r=[],d=o;return class extends d{static{m=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(d[Symbol.metadata]??null):void 0;t(null,i={value:m},n,{kind:"class",name:m.name,metadata:e},null,r),m=i.value,e&&Object.defineProperty(m,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static styles=[a`
|
|
2
2
|
:host {
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -19,7 +19,7 @@ import{_ as t,a as e,e as a}from"./custom-element-BMhVvZjf.js";import{j as l,v a
|
|
|
19
19
|
padding-bottom: 0;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
`];render(){return
|
|
22
|
+
`];render(){return l`
|
|
23
23
|
<slot name="left"></slot>
|
|
24
24
|
<slot name="right"></slot>
|
|
25
|
-
`}static{e(m,r)}},m})();export{
|
|
25
|
+
`}static{e(m,r)}},m})();export{i as CustomSummary};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as t,a as e
|
|
1
|
+
import{_ as t,a as e}from"./tslib.es6-B0cSixZg.js";import{t as s,v as a,D as o}from"./property-Do5-bKhz.js";import{t as i}from"./query-D-PG8Oyh.js";import{e as r}from"./custom-element-DIOmDbQp.js";import"./pane.js";import"./elevation.js";import"./button.js";import"./icon.js";import"./index-B3uz3f8C.js";let n=(()=>{let n,c,p,l,d,u,h,m=[r("custom-supporting-pane")],g=[],v=o,_=[],f=[],y=[],b=[],j=[],x=[],w=[],k=[],S=[],C=[];return class extends v{static{c=this}static{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(v[Symbol.metadata]??null):void 0;p=[s({type:Boolean,reflect:!0})],l=[s({type:String,reflect:!0})],d=[s({type:Boolean,reflect:!0})],u=[s({type:String})],h=[i(".support")],t(this,null,p,{kind:"accessor",name:"open",static:!1,private:!1,access:{has:t=>"open"in t,get:t=>t.open,set:(t,e)=>{t.open=e}},metadata:a},_,f),t(this,null,l,{kind:"accessor",name:"variant",static:!1,private:!1,access:{has:t=>"variant"in t,get:t=>t.variant,set:(t,e)=>{t.variant=e}},metadata:a},y,b),t(this,null,d,{kind:"accessor",name:"left",static:!1,private:!1,access:{has:t=>"left"in t,get:t=>t.left,set:(t,e)=>{t.left=e}},metadata:a},j,x),t(this,null,u,{kind:"accessor",name:"id",static:!1,private:!1,access:{has:t=>"id"in t,get:t=>t.id,set:(t,e)=>{t.id=e}},metadata:a},w,k),t(this,null,h,{kind:"accessor",name:"supporting",static:!1,private:!1,access:{has:t=>"supporting"in t,get:t=>t.supporting,set:(t,e)=>{t.supporting=e}},metadata:a},S,C),t(null,n={value:c},m,{kind:"class",name:c.name,metadata:a},null,g),c=n.value,a&&Object.defineProperty(c,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),e(c,g)}#t=e(this,_,!1);get open(){return this.#t}set open(t){this.#t=t}#e=(e(this,f),e(this,y,"expanded"));get variant(){return this.#e}set variant(t){this.#e=t}#s=(e(this,b),e(this,j,!1));get left(){return this.#s}set left(t){this.#s=t}#a=(e(this,x),e(this,w,void 0));get id(){return this.#a}set id(t){this.#a=t}#o=(e(this,k),e(this,S,void 0));get supporting(){return this.#o}set supporting(t){this.#o=t}onPaneClose({detail:t}){this.id===t&&(this.open=!1)}connectedCallback(){document.addEventListener("custom-pane-close",this.onPaneClose.bind(this)),document.addEventListener("custom-pane-open",(({detail:t})=>{this.id===t&&(this.open=!0)}))}render(){return a`<style>
|
|
2
2
|
:host {
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
package/exports/bundle/tab.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as t,a as e
|
|
1
|
+
import{_ as t,a as e}from"./tslib.es6-B0cSixZg.js";import{v as a,D as o}from"./property-Do5-bKhz.js";import{e as n}from"./custom-element-DIOmDbQp.js";let r=(()=>{let r,s,l=[n("custom-tab")],i=[],m=o;return class extends m{static{s=this}static{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(m[Symbol.metadata]??null):void 0;t(null,r={value:s},l,{kind:"class",name:s.name,metadata:a},null,i),s=r.value,a&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),e(s,i)}render(){return a`
|
|
2
2
|
<style>
|
|
3
3
|
:host {
|
|
4
4
|
display: flex;
|
|
@@ -19,4 +19,4 @@ import{_ as t,a as e,e as a}from"./custom-element-BMhVvZjf.js";import{v as o,D a
|
|
|
19
19
|
}
|
|
20
20
|
</style>
|
|
21
21
|
<slot></slot>
|
|
22
|
-
`}},
|
|
22
|
+
`}},s})();export{r as CustomTab};
|
package/exports/bundle/tabs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as r,a as o
|
|
1
|
+
import{_ as r,a as o}from"./tslib.es6-B0cSixZg.js";import{v as t}from"./property-Do5-bKhz.js";import{e}from"./custom-element-DIOmDbQp.js";import{SelectorBase as s}from"./selector-mixin.js";import"./tab.js";import"./select-mixin.js";let a=(()=>{let a,l,c=[e("custom-tabs")],d=[],m=s;return class extends m{static{l=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(m[Symbol.metadata]??null):void 0;r(null,a={value:l},c,{kind:"class",name:l.name,metadata:t},null,d),l=a.value,t&&Object.defineProperty(l,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t}),o(l,d)}render(){return t`
|
|
2
2
|
<style>
|
|
3
3
|
:host {
|
|
4
4
|
--custom-tabs-background: var(---md-sys-color-surface);
|
|
@@ -48,4 +48,4 @@ import{_ as r,a as o,e as t}from"./custom-element-BMhVvZjf.js";import{v as e}fro
|
|
|
48
48
|
}
|
|
49
49
|
</style>
|
|
50
50
|
<slot></slot>
|
|
51
|
-
`}},l})();export{
|
|
51
|
+
`}},l})();export{a as CustomTabs};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as
|
|
1
|
+
import{_ as t,a}from"./tslib.es6-B0cSixZg.js";import{t as e,j as n,v as s,D as i}from"./property-Do5-bKhz.js";import{t as o}from"./query-D-PG8Oyh.js";import{e as l}from"./custom-element-DIOmDbQp.js";let c=(()=>{let c,r,g,h,d,I,m=[l("text-field")],S=[],_=i,u=[],p=[],b=[],v=[],L=[],y=[],f=[],T=[];return class extends _{static{r=this}static{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(_[Symbol.metadata]??null):void 0;g=[o('slot[name="leading-icon"]')],h=[o('slot[name="trailing-icon"]')],d=[e({type:Boolean,reflect:!0,attribute:"has-leading-icon"})],I=[e({type:Boolean,reflect:!0,attribute:"has-trailing-icon"})],t(this,null,g,{kind:"accessor",name:"leadingIconSlot",static:!1,private:!1,access:{has:t=>"leadingIconSlot"in t,get:t=>t.leadingIconSlot,set:(t,a)=>{t.leadingIconSlot=a}},metadata:a},u,p),t(this,null,h,{kind:"accessor",name:"trailingIconSlot",static:!1,private:!1,access:{has:t=>"trailingIconSlot"in t,get:t=>t.trailingIconSlot,set:(t,a)=>{t.trailingIconSlot=a}},metadata:a},b,v),t(this,null,d,{kind:"accessor",name:"hasLeadingIcon",static:!1,private:!1,access:{has:t=>"hasLeadingIcon"in t,get:t=>t.hasLeadingIcon,set:(t,a)=>{t.hasLeadingIcon=a}},metadata:a},L,y),t(this,null,I,{kind:"accessor",name:"hasTrailingIcon",static:!1,private:!1,access:{has:t=>"hasTrailingIcon"in t,get:t=>t.hasTrailingIcon,set:(t,a)=>{t.hasTrailingIcon=a}},metadata:a},f,T),t(null,c={value:r},m,{kind:"class",name:r.name,metadata:a},null,S),r=c.value,a&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a})}#t=a(this,u,void 0);get leadingIconSlot(){return this.#t}set leadingIconSlot(t){this.#t=t}#a=(a(this,p),a(this,b,void 0));get trailingIconSlot(){return this.#a}set trailingIconSlot(t){this.#a=t}#e=(a(this,v),a(this,L,void 0));get hasLeadingIcon(){return this.#e}set hasLeadingIcon(t){this.#e=t}#n=(a(this,y),a(this,f,void 0));get hasTrailingIcon(){return this.#n}set hasTrailingIcon(t){this.#n=t}#s=(a(this,T),()=>{this.leadingIconSlot.assignedElements.length>0?this.hasLeadingIcon=!0:this.hasLeadingIcon=!1});#i=()=>{this.trailingIconSlot.assignedElements.length>0?this.hasTrailingIcon=!0:this.hasTrailingIcon=!1};connectedCallback(){this.leadingIconSlot.addEventListener("slotchange",this.#s),this.trailingIconSlot.addEventListener("slotchange",this.#i)}static styles=[n`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
}
|
|
@@ -7,4 +7,4 @@ import{_ as a,a as t,e as n}from"./custom-element-BMhVvZjf.js";import{t as e,j a
|
|
|
7
7
|
|
|
8
8
|
:host([has-leading-icon]) {
|
|
9
9
|
}
|
|
10
|
-
`];render(){return
|
|
10
|
+
`];render(){return s` <slot name="leading-icon"></slot> `}static{a(r,S)}},r})();export{c as TextField};
|
package/exports/bundle/theme.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,a as e
|
|
1
|
+
import{_ as t,a as e}from"./tslib.es6-B0cSixZg.js";import{t as a,D as s}from"./property-Do5-bKhz.js";import{e as o}from"./custom-element-DIOmDbQp.js";let r=(()=>{let r,n,i,l,c,d,m=[o("custom-theme")],g=[],h=s,u=[],y=[],b=[],p=[],w=[],f=[],_=[],S=[];return class extends h{static{n=this}static{const s="function"==typeof Symbol&&Symbol.metadata?Object.create(h[Symbol.metadata]??null):void 0;i=[a({type:Boolean,attribute:"load-font"})],l=[a({type:Boolean,attribute:"load-symbols"})],c=[a({type:String,attribute:"mobile-trigger"})],d=[a({type:Boolean})],t(this,null,i,{kind:"accessor",name:"loadFont",static:!1,private:!1,access:{has:t=>"loadFont"in t,get:t=>t.loadFont,set:(t,e)=>{t.loadFont=e}},metadata:s},u,y),t(this,null,l,{kind:"accessor",name:"loadSymbols",static:!1,private:!1,access:{has:t=>"loadSymbols"in t,get:t=>t.loadSymbols,set:(t,e)=>{t.loadSymbols=e}},metadata:s},b,p),t(this,null,c,{kind:"accessor",name:"narrowTrigger",static:!1,private:!1,access:{has:t=>"narrowTrigger"in t,get:t=>t.narrowTrigger,set:(t,e)=>{t.narrowTrigger=e}},metadata:s},w,f),t(this,null,d,{kind:"accessor",name:"narrow",static:!1,private:!1,access:{has:t=>"narrow"in t,get:t=>t.narrow,set:(t,e)=>{t.narrow=e}},metadata:s},_,S),t(null,r={value:n},m,{kind:"class",name:n.name,metadata:s},null,g),n=r.value,s&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:s}),e(n,g)}#t=e(this,u,!0);get loadFont(){return this.#t}set loadFont(t){this.#t=t}#e=(e(this,y),e(this,b,!0));get loadSymbols(){return this.#e}set loadSymbols(t){this.#e=t}#a=(e(this,p),e(this,w,"(max-width: 860px)"));get narrowTrigger(){return this.#a}set narrowTrigger(t){this.#a=t}#s=(e(this,f),e(this,_,void 0));get narrow(){return this.#s}set narrow(t){this.#s=t}#o(t,e,a){let s=document.createElement("link");if(s.rel=e,s.href=t,a)for(const t of a)s.setAttribute(t,"");document.head.appendChild(s)}#r(){let t="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0&display=swap";return globalThis.symbols&&(t+=`&text=${globalThis.symbols}`),t}connectedCallback(){const t=matchMedia("(max-width: 860px)");t.onchange=this.#n,this.#n({matches:t.matches}),this.load("./themes/default/theme.css");const e=document.createElement("style");e.innerHTML="\n html, body {\n inset: 0;\n position: absolute;\n margin: 0;\n background: var(--md-sys-color-background);\n color: var(--md-sys-color-on-background);\n overflow: hidden;\n }",document.head.appendChild(e),(this.loadFont||this.loadSymbols)&&this.#o("https://fonts.googleapis.com","preconnect"),this.#o("https://fonts.gstatic.com","preconnect",["crossorigin"]),this.loadFont&&this.#o("https://fonts.googleapis.com/css2?family=Roboto&display=swap","stylesheet"),this.loadSymbols&&this.#o(this.#r(),"stylesheet")}#n=(e(this,S),({matches:t})=>{this.narrow=t,document.dispatchEvent(new CustomEvent("custom-theme-narrow",{detail:this.narrow}))});set language(t){this.setAttribute("language",t)}get language(){return this.getAttribute("language")||"css"}async load(t){if("js"===this.language){const e=await import(t);for(const[t,a]of Object.entries(e)){const e=`--${t.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}`;document.body.style.setProperty(e,a)}}else if("css"===this.language){const e=document.createElement("link");e.rel="stylesheet",e.href=t,document.head.appendChild(e)}}},n})();export{r as CustomTheme};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{_ as t,a as e
|
|
1
|
+
import{_ as t,a as e}from"./tslib.es6-B0cSixZg.js";import{j as a,v as s,D as i}from"./property-Do5-bKhz.js";import{e as l}from"./custom-element-DIOmDbQp.js";import"./input.js";let c=(()=>{let c,n,m=[l("custom-time-picker")],p=[],o=i;return class extends o{static{n=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(o[Symbol.metadata]??null):void 0;t(null,c={value:n},m,{kind:"class",name:n.name,metadata:e},null,p),n=c.value,e&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static styles=[a`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
}
|
|
5
|
-
`];render(){return
|
|
5
|
+
`];render(){return s`
|
|
6
6
|
<time-picker-input></time-picker-input>
|
|
7
7
|
<div class="am-pm">
|
|
8
8
|
<span class="flex"></span>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as t,a as e
|
|
1
|
+
import{_ as t,a as e}from"./tslib.es6-B0cSixZg.js";import{t as s,v as a,D as o}from"./property-Do5-bKhz.js";import{e as c}from"./custom-element-DIOmDbQp.js";import"./button.js";import"./toggle.js";import"./elevation.js";let i=(()=>{let i,r,l,g,n=[c("custom-toggle-button")],m=[],u=o,v=[],h=[],d=[],_=[];return class extends u{static{r=this}static{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(u[Symbol.metadata]??null):void 0;l=[s({type:Number})],g=[s({type:Array})],t(this,null,l,{kind:"accessor",name:"active",static:!1,private:!1,access:{has:t=>"active"in t,get:t=>t.active,set:(t,e)=>{t.active=e}},metadata:a},v,h),t(this,null,g,{kind:"accessor",name:"togglers",static:!1,private:!1,access:{has:t=>"togglers"in t,get:t=>t.togglers,set:(t,e)=>{t.togglers=e}},metadata:a},d,_),t(null,i={value:r},n,{kind:"class",name:r.name,metadata:a},null,m),r=i.value,a&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),e(r,m)}#t=e(this,v,0);get active(){return this.#t}set active(t){this.#t=t}#e=(e(this,h),e(this,d,void 0));get togglers(){return this.#e}set togglers(t){this.#e=t}get _toggle(){return this.shadowRoot.querySelector("custom-toggle")}_click=(e(this,_),()=>{this._toggle.next()});connectedCallback(){this.addEventListener("click",this._click)}disconnectedCallback(){this.removeEventListener("click",this._click)}_onactive=t=>{this.dispatchEvent(new CustomEvent("active",{detail:t.detail}))};render(){return a` <custom-button>
|
|
2
2
|
<custom-toggle slot="icon" .active=${this.active} @active=${this._onactive} .togglers=${this.togglers}>
|
|
3
3
|
</custom-toggle>
|
|
4
4
|
</custom-button>`}},r})();export{i as CustomToggleButton};
|
package/exports/bundle/toggle.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{_ as t,a as e
|
|
1
|
+
import{_ as t,a as e}from"./tslib.es6-B0cSixZg.js";import{t as s,j as a,v as i,D as c}from"./property-Do5-bKhz.js";import{e as o}from"./custom-element-DIOmDbQp.js";let r=(()=>{let r,n,g,l,h,v=[o("custom-toggle")],m=[],u=c,d=[],_=[],p=[],y=[],b=[],f=[];return class extends u{static{n=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(u[Symbol.metadata]??null):void 0;g=[s({type:Number})],l=[s({type:Array})],h=[s()],t(this,null,g,{kind:"accessor",name:"active",static:!1,private:!1,access:{has:t=>"active"in t,get:t=>t.active,set:(t,e)=>{t.active=e}},metadata:e},d,_),t(this,null,l,{kind:"accessor",name:"togglers",static:!1,private:!1,access:{has:t=>"togglers"in t,get:t=>t.togglers,set:(t,e)=>{t.togglers=e}},metadata:e},p,y),t(this,null,h,{kind:"accessor",name:"icon",static:!1,private:!1,access:{has:t=>"icon"in t,get:t=>t.icon,set:(t,e)=>{t.icon=e}},metadata:e},b,f),t(null,r={value:n},v,{kind:"class",name:n.name,metadata:e},null,m),n=r.value,e&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#t=e(this,d,0);get active(){return this.#t}set active(t){this.#t=t}#e=(e(this,_),e(this,p,void 0));get togglers(){return this.#e}set togglers(t){this.#e=t}#s=(e(this,y),e(this,b,void 0));get icon(){return this.#s}set icon(t){this.#s=t}restartOnEnd=(e(this,f),!0);onChange(t,e){"active"===t&&this.dispatchEvent(new CustomEvent("active",{detail:this.active})),("active"===t&&this.togglers||"togglers"===t&&void 0!==this.active)&&(this.icon=this.togglers[this.active])}async next(){this.active<this.togglers.length-1?this.active+=1:this.restartOnEnd&&(this.active=0)}previous(){0!==this.active&&(this.active-=1)}static styles=[a`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
}
|
|
5
|
-
`];render(){return
|
|
5
|
+
`];render(){return i`<custom-icon .icon=${this.icon}></custom-icon>`}static{e(n,m)}},n})();export{r as CustomToggle};
|