@utrecht/web-component-library-stencil
Version:
Stencil component library bundle for the Municipality of Utrecht based on the NL Design System architecture
44 lines (39 loc) • 2.6 kB
JavaScript
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
import { c as clsx } from './clsx.js';
const buttonGroupCss = ".utrecht-button-group{align-items:baseline;background-color:var(--utrecht-button-group-background-color);break-inside:avoid;display:flex;flex-wrap:wrap;gap:var(--utrecht-button-group-inline-gap, 1em);margin-block-end:calc(var(--utrecht-space-around, 0) * var(--utrecht-button-group-margin-block-end, 0));margin-block-start:calc(var(--utrecht-space-around, 0) * var(--utrecht-button-group-margin-block-start, 0));min-block-size:var(--utrecht-button-block-size);padding-block-end:var(--utrecht-button-group-padding-block-end);padding-block-start:var(--utrecht-button-group-padding-block-start)}.utrecht-button-group--distanced{--utrecht-space-around:1}.utrecht-button-group__link-button--row,.utrecht-button-group--row .utrecht-link-button,.utrecht-button-group:not(.utrecht-button-group--column) .utrecht-link-button{--utrecht-button-padding-inline-end:0;--utrecht-button-padding-inline-start:0}.utrecht-button-group--column{flex-direction:column;gap:var(--utrecht-button-group-block-gap, 1em)}:host{display:block}:host([hidden]){display:none !important}";
const UtrechtButtonGroupStyle0 = buttonGroupCss;
const ButtonGroup = /*@__PURE__*/ proxyCustomElement(class ButtonGroup extends HTMLElement {
constructor() {
super();
this.__registerHost();
this.__attachShadow();
this.direction = undefined;
}
render() {
const { direction } = this;
return (h("div", { key: 'fc776927bb834f6cac1e5c743d2360f1a08513ff', class: clsx('utrecht-button-group', {
'utrecht-button-group--column': direction === 'column',
'utrecht-button-group--row': direction === 'row',
}) }, h("slot", { key: 'e8b0574988548ec62b311f961f318613a541133c' })));
}
static get style() { return UtrechtButtonGroupStyle0; }
}, [1, "utrecht-button-group", {
"direction": [1]
}]);
function defineCustomElement$1() {
if (typeof customElements === "undefined") {
return;
}
const components = ["utrecht-button-group"];
components.forEach(tagName => { switch (tagName) {
case "utrecht-button-group":
if (!customElements.get(tagName)) {
customElements.define(tagName, ButtonGroup);
}
break;
} });
}
const UtrechtButtonGroup = ButtonGroup;
const defineCustomElement = defineCustomElement$1;
export { UtrechtButtonGroup, defineCustomElement };
//# sourceMappingURL=utrecht-button-group.js.map