UNPKG

@public-ui/components

Version:

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

37 lines (32 loc) 1.27 kB
/*! * KoliBri - The accessible HTML-Standard */ import { c as createPropDefinition, n as normalizeString } from './normalizers-m3s9sgmq.js'; function throwNoStateAccess() { throw new Error('This controller does not use component state.'); } class BaseWebComponent { constructor() { 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-y0Z1TRdz.js.map //# sourceMappingURL=variant-quote-y0Z1TRdz.js.map