@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
5 lines • 1.09 kB
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
import{b as t,k as o,x as e}from"./common-Cx_AGO_M.js";const n=/[a-zA-Z0-9äöüÄÖÜß]/g;const a=/^\d+$/;function s(t){var o;return typeof t==="string"?((o=t.match(n))===null||o===void 0?void 0:o.length)||0:0}function r(t,o=1){return s(t)>=o}function i(t){return a.test(t)}function l(t){var n;return Object.assign(Object.assign({},t),{hooks:{afterPatch:(n,a,s,l)=>{var c,f;if(typeof((c=t.hooks)===null||c===void 0?void 0:c.afterPatch)==="function"){(f=t.hooks)===null||f===void 0?void 0:f.afterPatch(n,a,s,l)}if(typeof n==="string"&&r(n,3)===false&&i(n)===false){o(`The heading or label ("${n}") is inaccessible. A label should consist of at least three readable characters.`)}if(typeof n==="string"&&n.length>80){e(`A heading or label should not be longer than 80 characters.`)}},beforePatch:(n=t.hooks)===null||n===void 0?void 0:n.beforePatch}})}const c=new Set(["string"]);const f=(o,e,n={})=>{t(o,"_label",(t=>typeof t==="string"),c,e,l(n))};const u=f;export{u as a,i as c,r as h,f as v};
//# sourceMappingURL=label-Fyi30H9j.js.map