UNPKG

@progress/kendo-react-common

Version:

React Common package delivers common utilities that can be used with the KendoReact UI components. KendoReact Common Utilities package

49 lines (48 loc) 1.34 kB
/** * @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 s, forms as l, sizeMap as a, orientationMap as f } from "./json-classes.mjs"; const r = `${s.prefix}-${l.form}`, c = `${s.prefix}-${l.form}-${l.field}`, $ = { form: { main: r, size: { prefix: `${r}-`, small: `${r}-${a.small}`, medium: `${r}-${a.medium}`, large: `${r}-${a.large}` }, orientation: { horizontal: `${r}-${f.horizontal}`, vertical: `${r}-${f.vertical}` } }, field: { main: c, isRtl: `${s.prefix}-${s.rtl}` } }, z = { form: (n) => { var m; const { size: e, orientation: o, c: t = $ } = n, i = t.form; return { [i.main]: !0, [i.size[e]]: i.size[e], [((m = i.size) == null ? void 0 : m.prefix) || ""]: e && !i.size[e], [i.orientation[o]]: i.orientation[o] }; }, field: (n) => { const { isRtl: e, c: o = $ } = n, t = o.field; return { [t.main]: !0, [t.isRtl]: e }; } }; export { z as uForm };