@progress/kendo-vue-common
Version:
Kendo UI for Vue Common Utilities package
85 lines (84 loc) • 2.17 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2026 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import { base as o, forms as t, orientationMap as x, sizeMap as m } from "./json-classes.mjs";
const n = `${o.prefix}-${t.form}`, g = `${o.prefix}-${t.form}-${t.field}`, a = {
form: {
main: n,
size: {
prefix: `${n}-`,
small: `${n}-${m.small}`,
medium: `${n}-${m.medium}`,
large: `${n}-${m.large}`
},
orientation: {
horizontal: `${n}-${x.horizontal}`,
vertical: `${n}-${x.vertical}`
}
},
formLayout: {
main: `${o.prefix}-${t.form}-layout ${o.prefix}-d-grid`
},
fieldset: {
main: `${o.prefix}-${t.form}-${t.fieldset}`
},
legend: {
main: `${o.prefix}-${t.form}-${t.legend}`
},
field: {
main: g,
isRtl: `${o.prefix}-${o.rtl}`
},
separator: {
main: `${o.prefix}-${t.form}-${t.separator}`
}
}, y = {
form: (r) => {
var l, $, c, d, u, p;
const { size: e, orientation: i, c: f = a } = r, s = f.form;
return {
[s.main]: !0,
[(l = s.size) == null ? void 0 : l[e]]: ($ = s.size) == null ? void 0 : $[e],
[((c = s.size) == null ? void 0 : c.prefix) || ""]: e && !((d = s.size) != null && d[e]),
[(u = s.orientation) == null ? void 0 : u[i]]: (p = s.orientation) == null ? void 0 : p[i]
};
},
formLayout: (r) => {
const { c: e = a } = r;
return {
[e.formLayout.main]: !0
};
},
fieldset: (r) => {
const { c: e = a } = r;
return {
[e.fieldset.main]: !0
};
},
legend: (r) => {
const { c: e = a } = r;
return {
[e.legend.main]: !0
};
},
field: (r) => {
const { isRtl: e, c: i = a } = r, f = i.field;
return {
[f.main]: !0,
[f.isRtl]: e
};
},
separator: (r) => {
const { c: e = a } = r;
return {
[e.separator.main]: !0
};
}
};
export {
y as uForm
};