@fefade/vue
Version:
Reusable Vue UI components powered by the fefade core system.
22 lines (21 loc) • 2.67 kB
JavaScript
var m = Object.defineProperty, g = (e, a) => {
for (var t in a) m(e, t, { get: a[t], enumerable: !0 });
}, i = {};
g(i, { APP_NAME: () => E, APP_NAME_ACRONYM: () => r, CSS_VAR_PREFIX: () => c, ForegroundColor: () => y, MAX_TOASTS: () => O, META_NAME: () => T, THEME_ATTR: () => o, THEME_CONTEXT: () => b, THEME_STORAGE: () => h, TOAST_DEFAULT_DURATION: () => A, alignments: () => v, breakpoints: () => x, horizontalPositions: () => f, positions: () => $, sizes: () => M, statusColors: () => k, statusVariants: () => C, themeColorVar: () => d, themeColors: () => l, themeModeSelectors: () => S, variants: () => _, verticalPositions: () => n });
function u(e) {
return e.replace(/[A-Z]/g, (a) => `-${a.toLowerCase()}`);
}
function p(e) {
return e ? e.charAt(0).toUpperCase() + e.slice(1) : "";
}
var E = "fefade", r = "ff", T = "x-library-name", c = `--${r}`, h = `${r}-theme`, A = 3e3, b = `${r}-theme-ctx`, o = "data-theme", S = { light: `[${o}='light']`, dark: `[${o}='dark']` }, s = { light: { success: "#22c55e", onSuccess: "#124a28", error: "#ef4444", onError: "#511111", warning: "#f97316", onWarning: "#6c2710", info: "#58c5fcff", onInfo: "#003344" }, dark: { success: "#124a28", onSuccess: "#22c55e", error: "#511111", onError: "#ef4444", warning: "#6c2710", onWarning: "#f97316", info: "#003344ff", onInfo: "#a7dffc" } }, l = { light: { primary: "#171717", onPrimary: "#fafafa", secondary: "#f5f5f5", onSecondary: "#171717", muted: "#a3a3a3", bg: "#ffffff", onBg: "#262626", surface: "#f8f8f8", onSurface: "#0a0a0a", border: "#e5e5e5", disabled: "#d4d4d4", onDisabled: "#737373", skeleton: "#e5e5e5", onSkeleton: "#f9f9f9", overlay: "#00000066", shadow: "#0000001A", ...s.light }, dark: { primary: "#e5e5e5", onPrimary: "#171717", secondary: "#262626", onSecondary: "#fafafa", muted: "#a3a3a3", bg: "#0a0a0a", onBg: "#fafafa", surface: "#171717", onSurface: "#fafafa", border: "#ffffff1a", disabled: "#f0f0f033", onDisabled: "#e5e5e566", skeleton: "#525252cc", onSkeleton: "#737373", overlay: "#00000099", shadow: "#00000080", ...s.dark } }, d = Object.fromEntries(Object.keys(l.light).map((e) => [e, `var(${c}-${u(e)})`])), y = (e) => d[`on${p(e)}`], x = { sm: "425px", md: "768px", lg: "1024px", xl: "1440px", "2xl": "2560px" }, _ = ["contained", "outlined", "text"], M = ["xs", "sm", "md", "lg", "xl"], k = ["success", "warning", "error", "info"], C = ["pulse", "ping", "bounce"], n = ["top", "bottom"], f = ["left", "right", "center"], $ = [...n, ...f], v = n.flatMap((e) => f.map((a) => `${e}-${a}`)), O = (e) => e ? 1 : 3;
/**
* @license MIT
* dxdns
* https://github.com/dxdns
*/
const P = Symbol(i.THEME_CONTEXT);
export {
P as T,
i as l
};