UNPKG

@public-ui/components

Version:

Contains all web components that belong to KoliBri - The accessible HTML-Standard.

39 lines (34 loc) 1.35 kB
/*! * KoliBri - The accessible HTML-Standard */ import { HTMLElement } from '@stencil/core/internal/client'; import { c as createPropDefinition, n as normalizeString } from './normalizers.js'; function throwNoStateAccess() { throw new Error('This controller does not use component state.'); } const BaseWebComponent = class extends HTMLElement { constructor() { super(false); this.stateAccess = { setState: (key, value) => { this[key] = value; }, getState: (key) => { return this[key]; }, }; } }; BaseWebComponent.stateLess = Object.freeze({ setState: throwNoStateAccess, getState: throwNoStateAccess, }); const LOADING_OPTIONS = ['eager', 'lazy']; const LOADING_SET = new Set(LOADING_OPTIONS); const loadingProp = createPropDefinition('loading', 'lazy', (value) => normalizeString(value), (v) => LOADING_SET.has(v)); const QUOTE_VARIANT_OPTIONS = ['block', 'inline']; const QUOTE_VARIANT_SET = new Set(QUOTE_VARIANT_OPTIONS); const variantQuoteProp = createPropDefinition('variant', 'inline', (value) => normalizeString(value), (v) => QUOTE_VARIANT_SET.has(v)); export { BaseWebComponent as B, loadingProp as l, variantQuoteProp as v }; //# sourceMappingURL=variant-quote.js.map //# sourceMappingURL=variant-quote.js.map