@sandlada/mdc
Version:
@sandlada/mdc is an open source component library that follows the Material Design 3 design specifications.
7 lines • 1.03 kB
JavaScript
import{defaultConverter as e,notEqual as t}from"../reactive-element.js";
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const n={attribute:!0,type:String,converter:e,reflect:!1,hasChanged:t},r=(e=n,t,r)=>{let{kind:i,metadata:a}=r,o=globalThis.litPropertyMetadata.get(a);if(o===void 0&&globalThis.litPropertyMetadata.set(a,o=new Map),i===`setter`&&((e=Object.create(e)).wrapped=!0),o.set(r.name,e),i===`accessor`){let{name:n}=r;return{set(r){let i=t.get.call(this);t.set.call(this,r),this.requestUpdate(n,i,e)},init(t){return t!==void 0&&this.C(n,void 0,e,t),t}}}if(i===`setter`){let{name:n}=r;return function(r){let i=this[n];t.call(this,r),this.requestUpdate(n,i,e)}}throw Error(`Unsupported decorator location: `+i)};function i(e){return(t,n)=>typeof n==`object`?r(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}export{i as property,r as standardProperty};
//# sourceMappingURL=property.js.map