@utrecht/web-component-library-stencil
Version:
Stencil component library bundle for the Municipality of Utrecht based on the NL Design System architecture
42 lines (37 loc) • 1.45 kB
JavaScript
import { p as proxyCustomElement, H, h } from './p-2f0ff193.js';
const numberDataCss = ":host{display:inline;font-variant-numeric:lining-nums tabular-nums}:host([hidden]){display:none !important}";
const UtrechtNumberDataStyle0 = numberDataCss;
const NumberData = /*@__PURE__*/ proxyCustomElement(class NumberData extends H {
constructor() {
super();
this.__registerHost();
this.__attachShadow();
this.value = undefined;
}
render() {
const { value } = this;
return typeof value === 'number' || typeof value === 'string' ? (
// <data value={String(value)}>
h("data", { "data-value": String(value) }, h("slot", null))) : (h("span", null, h("slot", null)));
}
static get style() { return UtrechtNumberDataStyle0; }
}, [1, "utrecht-number-data", {
"value": [8]
}]);
function defineCustomElement$1() {
if (typeof customElements === "undefined") {
return;
}
const components = ["utrecht-number-data"];
components.forEach(tagName => { switch (tagName) {
case "utrecht-number-data":
if (!customElements.get(tagName)) {
customElements.define(tagName, NumberData);
}
break;
} });
}
const UtrechtNumberData = NumberData;
const defineCustomElement = defineCustomElement$1;
export { UtrechtNumberData, defineCustomElement };
//# sourceMappingURL=utrecht-number-data.js.map