UNPKG

@public-ui/components

Version:

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

163 lines (147 loc) 4.81 kB
/*! * KoliBri - The accessible HTML-Standard */ 'use strict'; var common = require('./common-DPb6NWR4.js'); var easyBem; var hasRequiredEasyBem; function requireEasyBem () { if (hasRequiredEasyBem) return easyBem; hasRequiredEasyBem = 1; /** * BEM class name factory. * * @typedef {Function} Bem * @param {String|Object} [elementOrMods] Element name or hash object with mods * @param {Object} [mods] Hash object with mods * @returns {String} */ /** * Returns BEM class name factory. * * @param {String} componentName Block name * @returns {Bem} */ easyBem = function bem(componentName) { return function (elementOrMods, mods) { if (!elementOrMods) { return componentName; } var element; if (typeof elementOrMods === 'string') { element = elementOrMods; } else { mods = elementOrMods; } var base = componentName; if (element) { base += '__' + element; } return base + ( mods ? Object.keys(mods).reduce(function (result, name) { var value = mods[name]; if (value) { result += ' ' + ( typeof value === 'boolean' ? (base + '--' + name) : (base + '--' + name + '_' + value) ); } return result; }, '') : '' ); }; }; return easyBem; } var easyBemExports = requireEasyBem(); var a = /*@__PURE__*/common.getDefaultExportFromCjs(easyBemExports); function c(){const e=new Map,n=(t,o,r)=>{try{return e.get(t)(o,r)}catch{return e.set(t,a(t)).get(t)(o,r)}};return n.forBlock=t=>{const o=(r,s)=>n(t,r,s);return o.forElement=r=>s=>n(t,r,s),o},n} const bem = c(); const BEM = { 'kol-alert': { elements: { closer: { modifiers: null }, heading: { modifiers: new Set(['h0', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6']) }, icon: { modifiers: null }, content: { modifiers: null }, container: { modifiers: null }, }, modifiers: new Set(['hasCloser', 'type-default', 'type-error', 'type-info', 'type-success', 'type-warning', 'variant-card', 'variant-msg']), }, 'kol-avatar': { elements: { image: { modifiers: null }, initials: { modifiers: null }, }, modifiers: null, }, 'kol-icon': { elements: { icon: { modifiers: null }, }, modifiers: null, }, 'kol-meter': { elements: { bar: { modifiers: null }, 'bar-background': { modifiers: null }, 'bar-border': { modifiers: null }, 'bar-fill': { modifiers: new Set(['critical', 'optimum', 'suboptimal']) }, 'bar-label': { modifiers: null }, 'bar-state': { modifiers: new Set(['critical', 'optimum', 'suboptimal']) }, 'bar-track': { modifiers: null }, unit: { modifiers: null }, value: { modifiers: null }, 'value-unit': { modifiers: null }, }, modifiers: new Set(['vertical']), }, 'kol-quote': { elements: { blockquote: { modifiers: null }, cite: { modifiers: null }, figcaption: { modifiers: null }, quote: { modifiers: null }, }, modifiers: new Set(['block', 'inline']), }, 'kol-skeleton': { elements: { actions: { modifiers: null }, container: { modifiers: null }, counter: { modifiers: null }, name: { modifiers: null }, }, modifiers: new Set(['has-name', 'is-hidden']), }, 'kol-click-button': { elements: { label: { modifiers: null }, }, modifiers: null, }, 'kol-span': { elements: { container: { modifiers: null }, icon: { modifiers: new Set(['bottom', 'left', 'right', 'top']) }, label: { modifiers: null }, slot: { modifiers: null }, }, modifiers: new Set(['has-badge', 'hide-label']), }, 'kol-spin': { elements: { loader: { modifiers: null }, spinner: { modifiers: new Set(['cycle', 'dot', 'none']) }, 'spinner-element': { modifiers: new Set(['1', '2', '3', 'neutral']) }, }, modifiers: null, }, }; exports.BEM = BEM; exports.bem = bem; //# sourceMappingURL=bem-registry-DevvgGUu.js.map //# sourceMappingURL=bem-registry-DevvgGUu.js.map