@progress/kendo-react-common
Version:
React Common package delivers common utilities that can be used with the KendoReact UI components. KendoReact Common Utilities package
69 lines (68 loc) • 2.31 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import { base as e, icon as r, themeColorMap as i, sizeMap as p } from "./json-classes.mjs";
const c = {
wrapper: {
main: `${e.prefix}-${r.prefix}`,
svgPrefix: `${e.prefix}-${r.svg}-${r.prefix}`,
namePrefix: `${e.prefix}-${r.svg}-${r.i}-`,
flipH: `${e.prefix}-${r.flipH}`,
flipV: `${e.prefix}-${r.flipV}`,
themeColor: {
inherit: `${e.prefix}-${r.color}-${i.inherit}`,
primary: `${e.prefix}-${r.color}-${i.primary}`,
secondary: `${e.prefix}-${r.color}-${i.secondary}`,
tertiary: `${e.prefix}-${r.color}-${i.tertiary}`,
info: `${e.prefix}-${r.color}-${i.info}`,
success: `${e.prefix}-${r.color}-${i.success}`,
warning: `${e.prefix}-${r.color}-${i.warning}`,
error: `${e.prefix}-${r.color}-${i.error}`,
dark: `${e.prefix}-${r.color}-${i.dark}`,
light: `${e.prefix}-${r.color}-${i.light}`
},
size: {
default: "",
xsmall: `${e.prefix}-${r.prefix}-${p.xsmall}`,
small: `${e.prefix}-${r.prefix}-${p.small}`,
medium: `${e.prefix}-${r.prefix}-${p.medium}`,
large: `${e.prefix}-${r.prefix}-${p.large}`,
xlarge: `${e.prefix}-${r.prefix}-${p.xlarge}`,
xxlarge: `${e.prefix}-${r.prefix}-${p.xxlarge}`,
xxxlarge: `${e.prefix}-${r.prefix}-${p.xxxlarge}`
}
},
svg: {
main: "",
flipH: "",
flipV: ""
}
}, m = {
wrapper: (o) => {
const { iconNameProp: x, themeColor: l, flipH: a, flipV: f, size: s, c: n = c } = o, $ = n.wrapper || {};
return {
[$.main || ""]: !0,
[$.svgPrefix || ""]: !0,
[`${$.namePrefix || ""}${x}`]: x,
[$.themeColor[l] || ""]: l,
[$.flipH || ""]: a,
[$.flipV || ""]: f,
[$.size[s] || ""]: $.size[s]
};
},
svg: (o) => {
const { flipH: x, flipV: l, c: a = c } = o, f = a.svg;
return {
[f.main || ""]: !0,
[f.flipH || ""]: x,
[f.flipV || ""]: l
};
}
};
export {
m as uSvgIcon
};