UNPKG

vexip-ui

Version:

A Vue 3 UI library, Highly customizability, full TypeScript, performance pretty good

39 lines (38 loc) 1.28 kB
import { computed as h, unref as r } from "vue"; import { configNamespace as v, configProps as u, configLocale as g, configIcons as m, configHoverDelay as z, configZIndex as a } from "@vexip-ui/config"; import { configIcons as k, configLocale as q, configZIndex as A } from "@vexip-ui/config"; import { toCapitalCase as D, isEmpty as t } from "@vexip-ui/utils"; function w(i = [], n) { return function(o, f = {}) { const { prefix: c = "", namespace: x = "", props: y = {}, locale: d = n, zIndex: l, icons: I = {}, hoverDelay: C = 100 } = f, P = h(() => ({ ...n, ...r(d) })); v(x, o), u(y, o), g(P, o), m(I, o), z(C, o), typeof r(l) == "number" && a(l, o); const b = D(c || ""); i.forEach((e) => { typeof e == "function" || typeof e.install == "function" ? o.use(e) : o.component(`${b}${e.name}`, e); }); }; } function E(i, n) { !t(i) && u(i, n); } function H(i = {}, n) { const { props: s = {}, locale: o = {}, zIndex: f, icons: c = {} } = i; E(s, n), !t(o) && g(o, n), !t(c) && m(c, n), typeof r(f) == "number" && a(f, n); } export { w as buildInstall, k as configIcons, q as configLocale, E as configProps, A as configZIndex, H as provideConfig }; //# sourceMappingURL=create.mjs.map