@vandeurenglenn/lite-elements 0.3.56 → 0.3.58
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 +1 -1
- package/exports/bundle/button.js +61 -10
- package/exports/bundle/card.js +1 -1
- package/exports/bundle/code.js +1 -1
- package/exports/bundle/{column-C9T77S9n.js → column-CP9TdwUA.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 +1 -1
- 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 +1 -1
- package/exports/bundle/icon-button.js +47 -7
- package/exports/bundle/icon-set.js +1 -1
- package/exports/bundle/icon.js +1 -1
- package/exports/bundle/input.js +1 -1
- 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/prompt.js +1 -1
- package/exports/bundle/{property-FNGRBR93.js → property-COFqvTC-.js} +2 -2
- package/exports/bundle/{property-ChyTplU0.js → property-DA1lO0Et.js} +1 -1
- package/exports/bundle/rail.js +1 -1
- package/exports/bundle/root.js +1 -1
- package/exports/bundle/row-Dkvp0Fm3.js +28 -0
- 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 +1 -1
- package/exports/bundle/supporting-pane.js +1 -1
- package/exports/bundle/tab.js +1 -1
- 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 +1 -1
- package/exports/button.js +58 -7
- package/exports/icon-button.js +44 -4
- package/exports/theme/theme.d.ts +1 -1
- package/exports/theme.js +1 -2
- package/package.json +2 -1
- package/exports/bundle/row-Bc6ZibAv.js +0 -28
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import{x as t,B as e,L as i}from"./property-FNGRBR93.js";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 t`<slot></slot>`}requestRender(){e(this.render(),this.shadowRoot),this.renderedOnce||(this.renderResolve(!0),this.renderedOnce=!0,this.firstRender&&this.firstRender())}}const r=(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 i;const a={type:String,reflect:!1,renders:!0,batchDelay:50,temporaryRender:10},n=t=>{t={...a,...t};let e=0;return function(i,{kind:a,name:n,addInitializer:o,access:c,metadata:h}){const{type:d,reflect:l,renders:u,batches:g,batchDelay:m,consumer:p,provider:_,temporaryRender:b}=t,y=t.attribute??l,f=String(n),v=y&&"string"==typeof y?y:f,x=d===Boolean,w=p||"boolean"==typeof t.consumes?v:t.consumes,S=_||"boolean"==typeof t.provides?v:t.provides;if(t.provider&&console.warn(`${f}: 'options.provider' is deprecated, use options.provides instead`),t.consumer&&console.warn(`${f}: 'options.consumer' is deprecated, use options.consumes instead`),o((function(){"accessor"!==a&&console.warn(`${this.localName}: @property(${t}) ${f} ${a} is not supported`),y&&(h||(h={}),h.observedAttributes||(h.observedAttributes=new Map),h.observedAttributes.set(f,v)),w&&globalThis.pubsub.subscribe(w,(async t=>{this[n]=t}))})),"accessor"===a)return{get(){return C.call(this)},set(t){return $.call(this,t)},init(t){return this.hasAttribute(v)&&(t=x?this.hasAttribute(v):r(this.getAttribute(v),d)),void 0===t||w||$.call(this,t),this[n]}};function C(){return y?x?this.hasAttribute(v):r(this.getAttribute(v),d):this[`__lite_${f}`]?this[`__lite_${f}`]:this[`_lite_${f}`]}async function $(t){if(S&&globalThis.pubsub.publish(S,t),this[`_lite_${f}`]!==t){this.willChange&&(this[`__lite_${f}`]=await this.willChange(n,t)),y?x?t||this[`__lite_${f}`]?this.setAttribute(v,""):this.removeAttribute(v):t||this[`__lite_${f}`]?this.setAttribute(v,((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})(d,this[`__lite_${f}`]??t)):this.removeAttribute(v):this[`_lite_${f}`]=t;const i=()=>{e=0,this.requestRender&&u&&this.requestRender(),this.onChange&&this.onChange(n,this[`__lite_${f}`]??t)};g?e===b?i():(this[`_${f}_timeout`]&&clearTimeout(this[`_${f}_timeout`]),this[`_${f}_timeout`]=setTimeout(i,m)):i()}}}};var o=function(t,e,i,r,a,n){function o(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var c,h=r.kind,d="getter"===h?"get":"setter"===h?"set":"value",l=!e&&t?r.static?t:t.prototype:null,u=e||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),g=!1,m=i.length-1;m>=0;m--){var p={};for(var _ in r)p[_]="access"===_?{}:r[_];for(var _ in r.access)p.access[_]=r.access[_];p.addInitializer=function(t){if(g)throw new TypeError("Cannot add initializers after decoration has completed");n.push(o(t||null))};var b=(0,i[m])("accessor"===h?{get:u.get,set:u.set}:u[d],p);if("accessor"===h){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw new TypeError("Object expected");(c=o(b.get))&&(u.get=c),(c=o(b.set))&&(u.set=c),(c=o(b.init))&&a.unshift(c)}else(c=o(b))&&("field"===h?a.unshift(c):u[d]=c)}l&&Object.defineProperty(l,r.name,u),g=!0},c=function(t,e,i){for(var r=arguments.length>2,a=0;a<e.length;a++)i=r?e[a].call(t,i):e[a].call(t);return r?i:void 0};let h=(()=>{let e,i,r,a,h,d,l,u,g,m,p=s,_=[],b=[],y=[],f=[],v=[],x=[],w=[],S=[],C=[],$=[],W=[],j=[],A=[],k=[],z=[],O=[],T=[],R=[],I=[],M=[];return class FlexDisplay extends p{static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(p[Symbol.metadata]??null):void 0;e=[n({type:String})],i=[n({type:String})],r=[n({type:String})],a=[n({type:String})],h=[n({type:String,reflect:!0})],d=[n({type:Boolean,reflect:!0})],l=[n({type:Boolean,reflect:!0,attribute:"center-center"})],u=[n({type:String})],g=[n({type:String})],m=[n({type:String})],o(this,null,e,{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:t},_,b),o(this,null,i,{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:t},y,f),o(this,null,r,{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:t},v,x),o(this,null,a,{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:t},w,S),o(this,null,h,{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:t},C,$),o(this,null,d,{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:t},W,j),o(this,null,l,{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:t},A,k),o(this,null,u,{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:t},z,O),o(this,null,g,{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:t},T,R),o(this,null,m,{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:t},I,M),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}#t=c(this,_,"0");get padding(){return this.#t}set padding(t){this.#t=t}#e=(c(this,b),c(this,y,"auto"));get minWidth(){return this.#e}set minWidth(t){this.#e=t}#s=(c(this,f),c(this,v,"auto"));get maxWidth(){return this.#s}set maxWidth(t){this.#s=t}#i=(c(this,x),c(this,w,"100%"));get width(){return this.#i}set width(t){this.#i=t}#r=(c(this,S),c(this,C,"row"));get direction(){return this.#r}set direction(t){this.#r=t}#a=(c(this,$),c(this,W,void 0));get center(){return this.#a}set center(t){this.#a=t}#n=(c(this,j),c(this,A,void 0));get centerCenter(){return this.#n}set centerCenter(t){this.#n=t}#o=(c(this,k),c(this,z,"flex-start"));get justifyContent(){return this.#o}set justifyContent(t){this.#o=t}#c=(c(this,O),c(this,T,"flex-start"));get alignItems(){return this.#c}set alignItems(t){this.#c=t}#h=(c(this,R),c(this,I,"border-box"));get boxSizing(){return this.#h}set boxSizing(t){this.#h=t}render(){return t`
|
|
2
|
-
<style>
|
|
3
|
-
:host {
|
|
4
|
-
display: flex;
|
|
5
|
-
box-sizing: var(--flex-display-box-sizing, ${this.boxSizing});
|
|
6
|
-
max-width: var(--flex-display-max-width, ${this.maxWidth});
|
|
7
|
-
min-width: var(--flex-display-min-width, ${this.minWidth});
|
|
8
|
-
width: var(--flex-display-width, ${this.width});
|
|
9
|
-
flex-direction: var(--flex-display-direction, ${this.direction});
|
|
10
|
-
justify-content: var(
|
|
11
|
-
--flex-display-justify-content,
|
|
12
|
-
${this.justifyContent}
|
|
13
|
-
);
|
|
14
|
-
align-items: var(--flex-display-align-items, ${this.alignItems});
|
|
15
|
-
padding: var(--flex-display-padding, ${this.padding});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
:host([center]) {
|
|
19
|
-
align-items: center;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
:host([center-center]) {
|
|
23
|
-
align-items: center;
|
|
24
|
-
justify-content: center;
|
|
25
|
-
}
|
|
26
|
-
</style>
|
|
27
|
-
<slot></slot>
|
|
28
|
-
`}constructor(){super(...arguments),c(this,M)}}})();customElements.define("flex-row",class FlexRow extends h{constructor(){super(),this.direction="row",this.width="auto"}});export{h as F};
|