@telperion/elements 5.4.0 → 5.4.1
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/.build-manifest.json +1 -1
- package/README.md +1 -0
- package/fesm/elements.mjs +3 -3
- package/fesm/elements.mjs.map +1 -1
- package/iife/elements.js +2 -2
- package/iife/elements.js.map +1 -1
- package/iife/select/index.js +2 -2
- package/iife/select/index.js.map +1 -1
- package/package.json +1 -1
- package/select/index.d.cts +1 -1
- package/select/index.d.ts +1 -1
- package/select/select.element.cjs +3 -3
- package/select/select.element.cjs.map +1 -1
- package/select/select.element.js +3 -3
- package/select/select.element.js.map +1 -1
package/iife/select/index.js
CHANGED
|
@@ -301,7 +301,7 @@ const oe=t=>(e,s)=>{void 0!==s?s.addInitializer(()=>{customElements.define(t,e)}
|
|
|
301
301
|
${t}
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
|
-
`;return document.adoptedStyleSheets=[...document.adoptedStyleSheets,s.styleSheet],e})()}#w;get#_(){return this.shadowRoot?.querySelector("tp-popover")}#E;get value(){return this.#E.get()}set value(t){!function(t=le){new Promise((e,s)=>{setTimeout(()=>{try{const s=t();e(s)}catch(t){s(t)}},0)})}(()=>{const e=t
|
|
304
|
+
`;return document.adoptedStyleSheets=[...document.adoptedStyleSheets,s.styleSheet],e})()}#w;get#_(){return this.shadowRoot?.querySelector("tp-popover")}#E;get value(){return this.#E.get()}set value(t){!function(t=le){new Promise((e,s)=>{setTimeout(()=>{try{const s=t();e(s)}catch(t){s(t)}},0)})}(()=>{const e=t?.split(",").map(t=>t.trim())??[],s=Array.from(this.#w);this.selectedOptions.set(e.map(t=>s.find(e=>e.value===t)).filter(Boolean).map(t=>new WeakRef(t)))})}#A;get placeholder(){return this.#A.get()}set placeholder(t){this.#C(this.#A,"placeholder",t)}#x;#O;#N;constructor(){super(),this.#w=new Set,this.self=this,this.selectedOptions=Tt([]),this.#E=((t,e)=>new j.Computed(t,e))(()=>this.selectedOptions.get().map(t=>t.deref()?.value??"").filter(Boolean).join(",")),this.#A=Tt("Select an option"),this.max=1,this.min=0,this.name=null,this.disabled=!1,this.required=!1,this.open=!1,this.#O="",this.#N=null,this.#x=this.attachInternals()}get internals(){return this.#x}get form(){return this.#x.form}get validity(){return this.#x.validity}get validationMessage(){return this.#x.validationMessage}get willValidate(){return this.#x.willValidate}checkValidity(){return this.#x.checkValidity()}reportValidity(){return this.#x.reportValidity()}createRenderRoot(){const e=super.createRenderRoot();return e.adoptedStyleSheets=[...e.adoptedStyleSheets,xe.styles.styleSheet,t.SelectedContentElement.styles.styleSheet,t.OptionElement.styles.styleSheet],e}connectedCallback(){super.connectedCallback(),this.#O=this.value}disconnectedCallback(){super.disconnectedCallback()}render(){return pt`
|
|
305
305
|
<div pseudo="button" part="button">
|
|
306
306
|
<slot name="button">
|
|
307
307
|
<tp-selected-content part="selected-content"></tp-selected-content>
|
|
@@ -326,5 +326,5 @@ const oe=t=>(e,s)=>{void 0!==s?s.addInitializer(()=>{customElements.define(t,e)}
|
|
|
326
326
|
* Copyright 2017 Google LLC
|
|
327
327
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
328
328
|
*/
|
|
329
|
-
function({context:t}){return(e,s)=>{const o=new WeakMap;if("object"==typeof s)return{get(){return e.get.call(this)},set(t){return o.get(this).setValue(t),e.set.call(this,t)},init(e){return o.set(this,new c(this,{context:t,initialValue:e})),e}};{e.constructor.addInitializer(e=>{o.set(e,new c(e,{context:t}))});const r=Object.getOwnPropertyDescriptor(e,s);let i;if(void 0===r){const t=new WeakMap;i={get(){return t.get(this)},set(e){o.get(this).setValue(e),t.set(this,e)},configurable:!0,enumerable:!0}}else{const t=r.set;i={...r,set(e){o.get(this).setValue(e),t?.call(this,e)}}}return void Object.defineProperty(e,s,i)}}}({context:ae}),s("design:type",t.SelectElement)],t.SelectElement.prototype,"self",void 0),e([ne({type:String,reflect:!0,noAccessor:!0}),s("design:type",
|
|
329
|
+
function({context:t}){return(e,s)=>{const o=new WeakMap;if("object"==typeof s)return{get(){return e.get.call(this)},set(t){return o.get(this).setValue(t),e.set.call(this,t)},init(e){return o.set(this,new c(this,{context:t,initialValue:e})),e}};{e.constructor.addInitializer(e=>{o.set(e,new c(e,{context:t}))});const r=Object.getOwnPropertyDescriptor(e,s);let i;if(void 0===r){const t=new WeakMap;i={get(){return t.get(this)},set(e){o.get(this).setValue(e),t.set(this,e)},configurable:!0,enumerable:!0}}else{const t=r.set;i={...r,set(e){o.get(this).setValue(e),t?.call(this,e)}}}return void Object.defineProperty(e,s,i)}}}({context:ae}),s("design:type",t.SelectElement)],t.SelectElement.prototype,"self",void 0),e([ne({type:String,reflect:!0,noAccessor:!0}),s("design:type",Object),s("design:paramtypes",[Object])],t.SelectElement.prototype,"value",null),e([ne({type:String,reflect:!0,noAccessor:!0}),s("design:type",String),s("design:paramtypes",[String])],t.SelectElement.prototype,"placeholder",null),e([ne({reflect:!0,converter:{fromAttribute:t=>{if(null==t||""===t)return 1;const e=String(t).trim().toLowerCase();if("infinite"===e)return Number.POSITIVE_INFINITY;const s=Number(e);return Number.isFinite(s)&&s>=1?Math.floor(s):1},toAttribute:t=>Number.isFinite(t)?String(t):"infinite"}}),s("design:type",Number)],t.SelectElement.prototype,"max",void 0),e([ne({type:Number,reflect:!0,converter:{fromAttribute:t=>{if(null==t||""===t)return 0;const e=Number(String(t).trim());return Number.isFinite(e)&&e>=0?Math.floor(e):0},toAttribute:t=>String(t)}}),s("design:type",Number)],t.SelectElement.prototype,"min",void 0),e([ne({type:String,reflect:!0}),s("design:type",Object)],t.SelectElement.prototype,"name",void 0),e([ne({type:Boolean,reflect:!0}),s("design:type",Object)],t.SelectElement.prototype,"disabled",void 0),e([ne({type:Boolean,reflect:!0}),s("design:type",Object)],t.SelectElement.prototype,"required",void 0),e([ne({type:Boolean,reflect:!0}),s("design:type",Object)],t.SelectElement.prototype,"open",void 0),t.SelectElement=Oe=e([oe("tp-select"),s("design:paramtypes",[])],t.SelectElement),t.SelectChangeEvent=ye}(this.TelperionElements.Select=this.TelperionElements.Select||{});
|
|
330
330
|
//# sourceMappingURL=index.js.map
|