UNPKG

@public-ui/components

Version:

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

24 lines (19 loc) 871 B
/*! * KoliBri - The accessible HTML-Standard */ import { c as createPropDefinition, b as normalizeNumber, n as normalizeString, d as createDependentPropDefinition } from './normalizers.js'; const maxProp = createPropDefinition('max', 100, normalizeNumber, (v) => v > 0); const unitProp = createPropDefinition('unit', '%', normalizeString, (v) => v.length > 0); const clampedNumberValueProp = createDependentPropDefinition('value', 0, (value, deps) => { const normalized = normalizeNumber(value); if (normalized < deps.min) { return deps.min; } else if (normalized > deps.max) { return deps.max; } return normalized; }, (v) => v !== undefined && v !== null); export { clampedNumberValueProp as c, maxProp as m, unitProp as u }; //# sourceMappingURL=value-number-clamped.js.map //# sourceMappingURL=value-number-clamped.js.map