@vandeurenglenn/lite-elements 0.3.52 → 0.3.53
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 +1 -1
- package/exports/bundle/card.js +1 -1
- package/exports/bundle/code.js +1 -1
- package/exports/bundle/{column-dsIMZ5XT.js → column-C9T77S9n.js} +1 -1
- package/exports/bundle/demo-elements.js +1 -1
- package/exports/bundle/demo-icons.js +1 -1
- package/exports/bundle/demo-shell.js +1 -1
- package/exports/bundle/demo.js +1 -1
- package/exports/bundle/dialog.js +1 -1
- package/exports/bundle/divider.js +1 -1
- package/exports/bundle/drawer-button.js +1 -1
- package/exports/bundle/drawer-item.js +1 -1
- package/exports/bundle/drawer-layout.js +1 -1
- package/exports/bundle/drawer.js +2 -2
- package/exports/bundle/dropdown-menu.js +1 -1
- package/exports/bundle/dropdown.js +1 -1
- package/exports/bundle/elements.js +1 -1
- package/exports/bundle/elevation.js +1 -1
- package/exports/bundle/fab.js +2 -2
- package/exports/bundle/icon-button.js +1 -1
- package/exports/bundle/icon-set.js +1 -1
- package/exports/bundle/icon.js +1 -1
- package/exports/bundle/input.js +2 -2
- package/exports/bundle/list-item.js +1 -1
- package/exports/bundle/menu.js +1 -1
- package/exports/bundle/minute-field.js +1 -1
- package/exports/bundle/notification.js +1 -1
- package/exports/bundle/notifications.js +1 -1
- package/exports/bundle/pages.js +1 -1
- package/exports/bundle/pane.js +1 -1
- package/exports/bundle/{property-C1gA9hig.js → property-ChyTplU0.js} +5 -5
- package/exports/bundle/property-FNGRBR93.js +11 -0
- package/exports/bundle/rail.js +1 -1
- package/exports/bundle/root.js +2 -2
- package/exports/bundle/{row-CW5FbTZ_.js → row-Bc6ZibAv.js} +1 -1
- package/exports/bundle/section.js +1 -1
- package/exports/bundle/section2.js +1 -1
- package/exports/bundle/select-mixin.js +1 -1
- package/exports/bundle/selector-mixin.js +1 -1
- package/exports/bundle/selector.js +1 -1
- package/exports/bundle/summary-mirror.js +1 -1
- package/exports/bundle/summary.js +2 -2
- package/exports/bundle/supporting-pane.js +1 -1
- package/exports/bundle/tab.js +2 -2
- package/exports/bundle/tabs.js +1 -1
- package/exports/bundle/text-field.js +1 -1
- package/exports/bundle/theme.js +1 -1
- package/exports/bundle/time-picker.js +1 -1
- package/exports/bundle/toggle-button.js +1 -1
- package/exports/bundle/toggle.js +1 -1
- package/exports/bundle/top-app-bar.js +1 -1
- package/exports/bundle/typography.js +1 -1
- package/exports/bundle/upload-file.js +1 -1
- package/exports/bundle/upload-image.js +47 -47
- package/package.json +1 -1
- package/exports/bundle/property-DL093_VN.js +0 -11
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/
|
|
6
|
-
const t=globalThis,e=t.trustedTypes,i=e?e.createPolicy("lit-html",{createHTML:t=>t}):void 0,r="$lit$",o=`lit$${Math.random().toFixed(9).slice(2)}$`,h="?"+o,l=`<${h}>`,a=document,c=()=>a.createComment(""),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,d=Array.isArray,p="[ \t\n\f\r]",b=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,_=/>/g,A=RegExp(`>|${p}(?:([^\\s"'>=/]+)(${p}*=${p}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),m=/'/g,g=/"/g,f=/^(?:script|style|textarea|title)$/i,v=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),y=Symbol.for("lit-noChange"),S=Symbol.for("lit-nothing"),x=new WeakMap,T=a.createTreeWalker(a,129);function w(t,e){if(!d(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==i?i.createHTML(e):e}class B{constructor({strings:t,_$litType$:i},a){let u;this.parts=[];let d=0,p=0;const v=t.length-1,y=this.parts,[S,x]=((t,e)=>{const i=t.length-1,h=[];let a,c=2===e?"<svg>":3===e?"<math>":"",u=b;for(let e=0;e<i;e++){const i=t[e];let d,p,v=-1,y=0;for(;y<i.length&&(u.lastIndex=y,p=u.exec(i),null!==p);)y=u.lastIndex,u===b?"!--"===p[1]?u=$:void 0!==p[1]?u=_:void 0!==p[2]?(f.test(p[2])&&(a=RegExp("</"+p[2],"g")),u=A):void 0!==p[3]&&(u=A):u===A?">"===p[0]?(u=a??b,v=-1):void 0===p[1]?v=-2:(v=u.lastIndex-p[2].length,d=p[1],u=void 0===p[3]?A:'"'===p[3]?g:m):u===g||u===m?u=A:u===$||u===_?u=b:(u=A,a=void 0);const S=u===A&&t[e+1].startsWith("/>")?" ":"";c+=u===b?i+l:v>=0?(h.push(d),i.slice(0,v)+r+i.slice(v)+o+S):i+o+(-2===v?e:S)}return[w(t,c+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),h]})(t,i);if(this.el=B.createElement(S,a),T.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(u=T.nextNode())&&y.length<v;){if(1===u.nodeType){if(u.hasAttributes())for(const t of u.getAttributeNames())if(t.endsWith(r)){const e=x[p++],i=u.getAttribute(t).split(o),r=/([.?@])?(.*)/.exec(e);y.push({type:1,index:d,name:r[2],strings:i,ctor:"."===r[1]?Y:"?"===r[1]?Z:"@"===r[1]?q:G}),u.removeAttribute(t)}else t.startsWith(o)&&(y.push({type:6,index:d}),u.removeAttribute(t));if(f.test(u.tagName)){const t=u.textContent.split(o),i=t.length-1;if(i>0){u.textContent=e?e.emptyScript:"";for(let e=0;e<i;e++)u.append(t[e],c()),T.nextNode(),y.push({type:2,index:++d});u.append(t[i],c())}}}else if(8===u.nodeType)if(u.data===h)y.push({type:2,index:d});else{let t=-1;for(;-1!==(t=u.data.indexOf(o,t+1));)y.push({type:7,index:d}),t+=o.length-1}d++}}static createElement(t,e){const i=a.createElement("template");return i.innerHTML=t,i}}function H(t,e,i=t,r){if(e===y)return e;let o=void 0!==r?i.o?.[r]:i.l;const h=u(e)?void 0:e._$litDirective$;return o?.constructor!==h&&(o?._$AO?.(!1),void 0===h?o=void 0:(o=new h(t),o._$AT(t,i,r)),void 0!==r?(i.o??=[])[r]=o:i.l=o),void 0!==o&&(e=H(t,o._$AS(t,e.values),o,r)),e}class F{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??a).importNode(e,!0);T.currentNode=r;let o=T.nextNode(),h=0,l=0,c=i[0];for(;void 0!==c;){if(h===c.index){let e;2===c.type?e=new et(o,o.nextSibling,this,t):1===c.type?e=new c.ctor(o,c.name,c.strings,this,t):6===c.type&&(e=new K(o,this,t)),this._$AV.push(e),c=i[++l]}h!==c?.index&&(o=T.nextNode(),h++)}return T.currentNode=a,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 et{get _$AU(){return this._$AM?._$AU??this.v}constructor(t,e,i,r){this.type=2,this._$AH=S,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this.v=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=H(this,t,e),u(t)?t===S||null==t||""===t?(this._$AH!==S&&this._$AR(),this._$AH=S):t!==this._$AH&&t!==y&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>d(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==S&&u(this._$AH)?this._$AA.nextSibling.data=t:this.T(a.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=B.createElement(w(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new F(r,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=x.get(t.strings);return void 0===e&&x.set(t.strings,e=new B(t)),e}k(t){d(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 et(this.O(c()),this.O(c()),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.v=t,this._$AP?.(t))}}class G{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,r,o){this.type=1,this._$AH=S,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=S}_$AI(t,e=this,i,r){const o=this.strings;let h=!1;if(void 0===o)t=H(this,t,e,0),h=!u(t)||t!==this._$AH&&t!==y,h&&(this._$AH=t);else{const r=t;let l,a;for(t=o[0],l=0;l<o.length-1;l++)a=H(this,r[i+l],e,l),a===y&&(a=this._$AH[l]),h||=!u(a)||a!==this._$AH[l],a===S?t=S:t!==S&&(t+=(a??"")+o[l+1]),this._$AH[l]=a}h&&!r&&this.j(t)}j(t){t===S?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Y extends G{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===S?void 0:t}}class Z extends G{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==S)}}class q extends G{constructor(t,e,i,r,o){super(t,e,i,r,o),this.type=5}_$AI(t,e=this){if((t=H(this,t,e,0)??S)===y)return;const i=this._$AH,r=t===S&&i!==S||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==S&&(i===S||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 K{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){H(this,t)}}const N=t.litHtmlPolyfillSupport;N?.(B,et),(t.litHtmlVersions??=[]).push("3.2.0");const C=(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 et(e.insertBefore(c(),t),t,void 0,i??{})}return o._$AI(t),o
|
|
7
|
-
/**
|
|
8
|
-
* @license
|
|
9
|
-
* Copyright 2019 Google LLC
|
|
10
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/},M=globalThis,R=M.ShadowRoot&&(void 0===M.ShadyCSS||M.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,O=Symbol(),E=new WeakMap;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=E.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&E.set(e,t))}return t}toString(){return this.cssText}}const U=(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 n(i,t,O)},k=(t,e)=>{if(R)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),r=M.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=i.cssText,t.appendChild(e)}},I=R?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new n("string"==typeof t?t:t+"",void 0,O))(e)})(t):t;Symbol.metadata??=Symbol("metadata");class s extends HTMLElement{static get observedAttributes(){return this[Symbol.metadata]?.observedAttributes?.values()??[]}attributeChangedCallback(t,e,i){this[t]===i&&e===i||(this[t]=i,this.attributeChangeTimeout&&clearTimeout(this.attributeChangeTimeout),this.attributeChangeTimeout=setTimeout((()=>{this.requestRender()}),this.renderedOnce?150:0))}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 v`<slot></slot>`}requestRender(){C(this.render(),this.shadowRoot),this.renderedOnce||(this.renderResolve(!0),this.renderedOnce=!0,this.firstRender&&this.firstRender())}}class LittlePubSub{subscribers={};verbose;constructor(t){this.verbose=t}_handleContext(t,e){return void 0===e&&(e=t),e}hasSubscribers(t){return!!this.subscribers[t]}getValue(t){if(this.subscribers[t])return this.subscribers[t].value}subscribe(t,e,i){this.hasSubscribers(t)||(this.subscribers[t]={handlers:[],value:void 0}),i=this._handleContext(e,i);const r=e.bind(i);this.subscribers[t].handlers.push(r),void 0!==this.subscribers[t].value&&r(this.subscribers[t].value,void 0)}unsubscribe(t,e,i){if(!this.hasSubscribers(t))return;i=this._handleContext(e,i);const r=this.subscribers[t].handlers.indexOf(e.bind(i));this.subscribers[t].handlers.splice(r),0===this.subscribers[t].handlers.length&&delete this.subscribers[t]}publish(t,e,i){this.hasSubscribers(t)||(this.subscribers[t]={handlers:[]});const r=this.subscribers[t]?.value;if(this.verbose||i||r!==e){this.subscribers[t].value=e;for(const i of this.subscribers[t].handlers)i(e,r)}}publishVerbose(t,e){this.publish(t,e,!0)}once(t){return new Promise((e=>{const i=r=>{e(r),this.unsubscribe(t,i)};this.subscribe(t,i)}))}}const P=(t,e)=>{let i=t;return e===Boolean?i=Boolean("true"===t):e===Number?i=Number(t):e===Uint8Array?i=new Uint8Array(t.split(",")):e!==Array&&e!==Object&&e!==WeakMap&&e!==Map&&e!==Uint8Array||(i=JSON.parse(t),e===Map&&(i=new Map(t)),e===WeakMap&&(i=new WeakMap(t))),i};globalThis.pubsub=globalThis.pubsub||new LittlePubSub;const W={type:String,reflect:!1,renders:!0,batchDelay:50,temporaryRender:10},L=t=>{t={...W,...t};let e=0;return function(i,{kind:r,name:o,addInitializer:h,access:l,metadata:a}){const{type:c,reflect:u,renders:d,batches:p,batchDelay:b,consumer:$,provider:_,temporaryRender:A}=t,m=t.attribute??u,g=String(o),f=m&&"string"==typeof m?m:g,v=c===Boolean,y=$||"boolean"==typeof t.consumes?f:t.consumes,S=_||"boolean"==typeof t.provides?f:t.provides;if(t.provider&&console.warn(`${g}: 'options.provider' is deprecated, use options.provides instead`),t.consumer&&console.warn(`${g}: 'options.consumer' is deprecated, use options.consumes instead`),h((function(){"accessor"!==r&&console.warn(`${this.localName}: @property(${t}) ${g} ${r} is not supported`),m&&(a||(a={}),a.observedAttributes||(a.observedAttributes=new Map),a.observedAttributes.set(g,f)),y&&globalThis.pubsub.subscribe(y,(async t=>{this[o]=t}))})),"accessor"===r)return{get(){return x.call(this)},set(t){return T.call(this,t)},init(t){return this.hasAttribute(f)&&(t=v?this.hasAttribute(f):P(this.getAttribute(f),c)),void 0===t||y||T.call(this,t),this[o]}};function x(){return m?v?this.hasAttribute(f):P(this.getAttribute(f),c):this[`__lite_${g}`]?this[`__lite_${g}`]:this[`_lite_${g}`]}async function T(t){if(S&&globalThis.pubsub.publish(S,t),this[`_lite_${g}`]!==t){this.willChange&&(this[`__lite_${g}`]=await this.willChange(o,t)),m?v?t||this[`__lite_${g}`]?this.setAttribute(f,""):this.removeAttribute(f):t||this[`__lite_${g}`]?this.setAttribute(f,((t,e)=>{let i=e;if(t===Boolean||t===Number||t===Uint8Array)return e.toString();if(t===Array||t===Object||t===WeakMap||t===Map||t===Uint8Array){let r;t!==Map&&t!==WeakMap||(r=Object(e).entries()),i=JSON.stringify(r)}return i})(c,this[`__lite_${g}`]??t)):this.removeAttribute(f):this[`_lite_${g}`]=t;const i=()=>{e=0,this.requestRender&&d&&this.requestRender(),this.onChange&&this.onChange(o,this[`__lite_${g}`]??t)};p?e===A?i():(this[`_${g}_timeout`]&&clearTimeout(this[`_${g}_timeout`]),this[`_${g}_timeout`]=setTimeout(i,b)):i()}}}};export{S as D,LittlePubSub as L,C as Q,y as R,k as S,I as c,U as i,v as k,L as r,s};
|