UNPKG

@progress/kendo-vue-common

Version:

Kendo UI for Vue Common Utilities package

351 lines (350 loc) 11.5 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { getClassByName as s } from "./common.mjs"; import { base as e, containers as i, elements as o, sizeMap as m, components as b, inputPrefix as p, states as u, icon as G, roundedMap as M, fillModeMap as z, comboBoxPrefix as A, pickerPrefix as g, inputs as q, dropDownListPrefix as N, cssUtils as F, dimensions as U } from "./json-classes.mjs"; const d = { clearButton: `${e.prefix}-${e.clear}-${e.value}`, groupStickyHeader: `${e.prefix}-${i.list}-${i.group}-${u.sticky}-${o.header}`, listHeaderText: `${e.prefix}-${i.list}-${o.header}-${o.text}`, ul: `${e.prefix}-${i.list}-${o.ul}`, li: { main: `${e.prefix}-${i.list}-${i.item}`, selected: `${e.prefix}-${u.selected}`, focused: `${e.prefix}-${u.focus}`, first: `${e.prefix}-${u.first}`, disabled: `${e.prefix}-${u.disabled}` }, groupLi: { list: `${e.prefix}-${i.list}-${i.group}-${i.item}`, table: `${e.prefix}-${o.table}-${i.group}-${i.row}` }, itemText: `${e.prefix}-${i.list}-${i.item}-${o.text}`, groupItemText: { list: `${e.prefix}-${i.list}-${i.item}-${o.text}`, table: `${e.prefix}-${o.table}-${o.th}` }, itemGroupLabel: `${e.prefix}-${i.list}-${i.item}-${i.group}-${o.label}`, noData: `${e.prefix}-${e.nodata}`, heightContainer: `${e.prefix}-${U.height}-${i.container}`, optionLabel: { main: `${e.prefix}-${i.list}-${i.optionLabel}`, selected: `${e.prefix}-${u.selected}` }, inputInner: `${p}-${q.inner}`, inputIcon: `${e.prefix}-${q.input}-${G.prefix}`, searchbox: `${e.prefix}-${b.searchbox}`, listFilter: `${e.prefix}-${i.list}-${e.filter}` }, J = { clearButton: s(d, "clearButton"), groupStickyHeader: s(d, "groupStickyHeader"), listHeaderText: s(d, "listHeaderText"), ul: s(d, "ul"), li: (n) => { const { c: $ = d, selected: t, focused: l, first: c, disabled: f } = n, x = $.li; return { [x.main]: !0, [x.selected]: t, [x.focused]: l, [x.first]: c, [x.disabled]: f }; }, groupLi: (n) => { const { c: $ = d, isMultiColumn: t } = n, l = $.groupLi; return { [l.table]: t, [l.list]: !t }; }, itemText: s(d, "itemText"), groupItemText: (n) => { const { c: $ = d, isMultiColumn: t } = n, l = $.groupItemText; return { [l.table]: t, [l.list]: !t }; }, itemGroupLabel: s(d, "itemGroupLabel"), noData: s(d, "noData"), heightContainer: s(d, "heightContainer"), optionLabel: (n) => { const { c: $ = d, selected: t } = n, l = $.optionLabel; return { [l.main]: !0, [l.selected]: t }; }, inputInner: s(d, "inputInner"), inputIcon: s(d, "inputIcon"), searchbox: s(d, "searchbox"), listFilter: s(d, "listFilter") }, I = { wrapper: { main: `${e.prefix}-${u.adaptive}-${b.actionsheet}`, fullscreen: `${e.prefix}-${b.actionsheet}-${u.fullscreen}`, bottom: `${e.prefix}-${b.actionsheet}-${u.bottom}` }, header: `${e.prefix}-${o.text}-${F.center}`, titleBar: { main: `${e.prefix}-${b.actionsheet}-${i.titlebar}-${i.group}`, position: `${e.prefix}-${F.hbox}` }, title: `${e.prefix}-${b.actionsheet}-${o.title}`, subtitle: { main: `${e.prefix}-${b.actionsheet}-${o.subtitle}`, textCenter: `${e.prefix}-${o.text}-${F.center}` }, actions: `${e.prefix}-${b.actionsheet}-${i.actions}`, titleBarGroup: { main: `${e.prefix}-${b.actionsheet}-${i.titlebar}-${i.group}`, filter: `${e.prefix}-${b.actionsheet}-${e.filter}` } }, K = { wrapper: (n) => { const { c: $ = I, isFullScreen: t } = n, l = $.wrapper; return { [l.main]: !0, [l.fullscreen]: t, [l.bottom]: !t }; }, header: s(I, "header"), titleBar: (n) => { const { c: $ = I } = n, t = $.titleBar; return { [t.main]: !0, [t.position]: !0 }; }, title: s(I, "title"), subtitle: (n) => { const { c: $ = I } = n, t = $.subtitle; return { [t.main]: !0, [t.textCenter]: !0 }; }, actions: s(I, "actions"), titleBarGroup: (n) => { const { c: $ = I } = n, t = $.titleBarGroup; return { [t.main]: !0, [t.filter]: !0 }; } }, h = { wrapper: { main: N, picker: g, size: { small: `${g}-${m.small}`, medium: `${g}-${m.medium}`, large: `${g}-${m.large}` }, fillMode: { solid: `${g}-${z.solid}`, outline: `${g}-${z.outline}`, flat: `${g}-${z.flat}`, link: `${g}-${z.link}`, clear: `${g}-${z.clear}` }, rounded: { small: `${e.prefix}-${e.rounded}-${M.small}`, medium: `${e.prefix}-${e.rounded}-${M.medium}`, large: `${e.prefix}-${e.rounded}-${M.large}` }, disabled: `${e.prefix}-${u.disabled}`, focused: `${e.prefix}-${u.focus}`, invalid: `${e.prefix}-${u.invalid}`, loading: `${e.prefix}-${u.loading}`, required: `${e.prefix}-${u.required}` }, loadingIcon: `${p}-${u.loading}-${G.prefix}`, inputButton: `${p}-${o.button}`, listContainer: { main: `${e.prefix}-${i.list}-${i.container}`, popup: `${e.prefix}-${b.dropdownlist}-${i.popup}` }, inputInner: `${p}-${q.inner}`, inputText: `${p}-${e.value}-${o.text}`, listHeader: `${e.prefix}-${i.list}-${o.header}`, list: { main: `${e.prefix}-${i.list}`, size: { small: `${e.prefix}-${i.list}-${m.small}`, medium: `${e.prefix}-${i.list}-${m.medium}`, large: `${e.prefix}-${i.list}-${m.large}` }, virtual: `${e.prefix}-${e.virtual}-${i.list}` }, listContent: `${e.prefix}-${i.list}-${i.content}`, listFooter: `${e.prefix}-${i.list}-${o.footer}` }, O = { wrapper: (n) => { var v, D, T, H, S, k, y, P; const { c: $ = h, size: t, rounded: l, fillMode: c, focused: f, disabled: x, invalid: B, loading: L, required: r } = n, a = $.wrapper; return { [a.main]: !0, [a.picker]: !0, [(v = a.size) == null ? void 0 : v[t]]: (D = a.size) == null ? void 0 : D[t], [`${g}-${t}`]: t && !((T = a.size) != null && T[t]), [(H = a.fillMode) == null ? void 0 : H[c]]: (S = a.fillMode) == null ? void 0 : S[c], [(k = a.rounded) == null ? void 0 : k[l]]: (y = a.rounded) == null ? void 0 : y[l], [`${e.prefix}-${e.rounded}-${l}`]: l && !((P = a.rounded) != null && P[l]), [a.focused]: f, [a.disabled]: x, [a.loading]: L, [a.invalid]: B, [a.required]: r }; }, loadingIcon: s(h, "loadingIcon"), inputButton: s(h, "inputButton"), listContainer: (n) => { const { c: $ = h, popup: t } = n, l = $.listContainer; return { [l.main]: !0, [l.popup]: t }; }, inputInner: s(h, "inputInner"), inputText: s(h, "inputText"), listHeader: s(h, "listHeader"), list: (n) => { var f, x, B; const { c: $ = h, size: t, virtual: l } = n, c = $.list; return { [c.main]: !0, [(f = c.size) == null ? void 0 : f[t]]: (x = c.size) == null ? void 0 : x[t], [`${e.prefix}-${i.list}-${t}`]: t && !((B = c.size) != null && B[t]), [c.virtual]: l }; }, listContent: s(h, "listContent"), listFooter: s(h, "listFooter") }, C = { wrapper: { main: A, input: p, size: { small: `${p}-${m.small}`, medium: `${p}-${m.medium}`, large: `${p}-${m.large}` }, fillMode: { solid: `${p}-${z.solid}`, outline: `${p}-${z.outline}`, flat: `${p}-${z.flat}`, link: `${p}-${z.link}`, clear: `${p}-${z.clear}` }, rounded: { small: `${e.prefix}-${e.rounded}-${M.small}`, medium: `${e.prefix}-${e.rounded}-${M.medium}`, large: `${e.prefix}-${e.rounded}-${M.large}` }, disabled: `${e.prefix}-${u.disabled}`, invalid: `${e.prefix}-${u.invalid}`, loading: `${e.prefix}-${u.loading}`, required: `${e.prefix}-${u.required}` }, loadingIcon: `${p}-${u.loading}-${G.prefix}`, inputButton: `${p}-${o.button}`, listContainer: { main: `${e.prefix}-${i.list}-${i.container}`, popup: `${e.prefix}-${b.combobox}-${i.popup}` }, listHeader: `${e.prefix}-${o.table}-${o.header}`, list: { list: `${e.prefix}-${i.list}`, table: `${e.prefix}-${e.data}-${o.table}`, size: { prefix: `${e.prefix}-${i.list}-`, small: `${e.prefix}-${i.list}-${m.small}`, medium: `${e.prefix}-${i.list}-${m.medium}`, large: `${e.prefix}-${i.list}-${m.large}` }, tableSize: { prefix: `${e.prefix}-${o.table}-`, small: `${e.prefix}-${o.table}-${m.small}`, medium: `${e.prefix}-${o.table}-${m.medium}`, large: `${e.prefix}-${o.table}-${m.large}` }, virtual: `${e.prefix}-${e.virtual}-${i.list}` }, listContent: { main: `${e.prefix}-${i.list}-${i.content}`, scroller: `${e.prefix}-${i.list}-${e.scroller}` }, listFooter: `${e.prefix}-${i.list}-${o.footer}` }, Q = { wrapper: (n) => { var a, v; const { c: $ = C, size: t, rounded: l, fillMode: c, disabled: f, invalid: x, loading: B, required: L } = n, r = $.wrapper; return { [r == null ? void 0 : r.main]: !0, [r == null ? void 0 : r.input]: !0, [r == null ? void 0 : r.size[t]]: r == null ? void 0 : r.size[t], [`${g}-${t}`]: t && !(r != null && r.size[t]), [r == null ? void 0 : r.fillMode[c]]: r == null ? void 0 : r.fillMode[c], [r == null ? void 0 : r.rounded[l]]: r == null ? void 0 : r.rounded[l], [`${(a = e) == null ? void 0 : a.prefix}-${(v = e) == null ? void 0 : v.rounded}-${l}`]: l && !(r != null && r.rounded[l]), [r == null ? void 0 : r.disabled]: f, [r == null ? void 0 : r.loading]: B, [r == null ? void 0 : r.invalid]: x, [r == null ? void 0 : r.required]: L }; }, loadingIcon: s(C, "loadingIcon"), inputButton: s(C, "inputButton"), listContainer: (n) => { const { c: $ = C, popup: t } = n, l = $.listContainer; return { [l == null ? void 0 : l.main]: !0, [l == null ? void 0 : l.popup]: t }; }, listHeader: s(C, "listHeader"), list: (n) => { var x, B, L, r, a, v, D, T, H, S, k; const { c: $ = C, size: t, tableSize: l, virtual: c, list: f } = n; return { [(x = $.list) == null ? void 0 : x.list]: !f, [(B = $.list) == null ? void 0 : B.table]: f, [(L = $.list) == null ? void 0 : L.size[t]]: !f && ((r = $.list) == null ? void 0 : r.size[t]), [`${(a = $.list) == null ? void 0 : a.size.prefix}${t}`]: !f && t && !((v = $.list) != null && v.size[t]), [(D = $.list) == null ? void 0 : D.tableSize[l]]: f && ((T = $.list) == null ? void 0 : T.tableSize[l]), [`${(H = $.list) == null ? void 0 : H.tableSize.prefix}${l}`]: f && l && !((S = $.list) != null && S.tableSize[l]), [(k = $.list) == null ? void 0 : k.virtual]: c }; }, listContent: (n) => { const { c: $ = C, virtual: t } = n, l = $.listContent; return { [l == null ? void 0 : l.main]: !0, [l == null ? void 0 : l.scroller]: !t }; }, listFooter: s(C, "listFooter") }; export { Q as uComboBox, O as uDropDownList, K as uDropDownsActionSheet, J as uDropDownsBase };