You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
942 B
2 lines
942 B
import{dL as y,dM as b}from"./index-f4658ae7.js";function v(e){for(var t=-1,l=e==null?0:e.length,n={};++t<l;){var r=e[t];n[r[0]]=r[1]}return n}const d=Symbol(),c=Symbol();function g(e,t){if(!y(e)||e[c])return e;const{values:l,required:n,default:r,type:o,validator:s}=e,f=l||s?u=>{let i=!1,a=[];if(l&&(a=[...l,r],i||(i=a.includes(u))),s&&(i||(i=s(u))),!i&&a.length>0){const p=[...new Set(a)].map(m=>JSON.stringify(m)).join(", ");b(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${p}], got value ${JSON.stringify(u)}.`)}return i}:void 0;return{type:typeof o=="object"&&Object.getOwnPropertySymbols(o).includes(d)?o[d]:o,required:!!n,default:r,validator:f,[c]:!0}}const w=e=>v(Object.entries(e).map(([t,l])=>[t,g(l,t)])),S=e=>({[d]:e}),j=e=>Object.keys(e),P=e=>e,h=["large","medium","small","mini"];export{g as buildProp,w as buildProps,h as componentSize,S as definePropType,j as keyOf,P as mutable,c as propKey};
|