@progress/kendo-react-dropdowns 9.2.0-develop.3 → 9.2.0-develop.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,91 +8,91 @@
8
8
  "use client";
9
9
  import * as i from "react";
10
10
  import k from "prop-types";
11
- import { validatePackage as Yt, useUnstyled as $t, useId as jt, usePropsContext as Jt, canUseDOM as tt, classNames as C, uDropDownList as P, getTabIndex as Qt, IconWrap as Xt, svgIconPropType as Zt, createPropsContext as Rt, Keys as w, ADAPTIVE_SMALL_BREAKPOINT as nt, uDropDownsActionSheet as J, ADAPTIVE_MEDIUM_BREAKPOINT as rt } from "@progress/kendo-react-common";
11
+ import { validatePackage as Gt, useUnstyled as Yt, useId as $t, usePropsContext as jt, canUseDOM as rt, useAdaptiveModeContext as Jt, classNames as C, uDropDownList as b, getTabIndex as Qt, IconWrap as Xt, svgIconPropType as Zt, createPropsContext as Rt, Keys as w, uDropDownsActionSheet as Q } from "@progress/kendo-react-common";
12
12
  import { FloatingLabel as en } from "@progress/kendo-react-labels";
13
13
  import { caretAltDownIcon as tn, xIcon as nn } from "@progress/kendo-svg-icons";
14
14
  import rn from "../common/ListContainer.mjs";
15
15
  import on from "../common/ListFilter.mjs";
16
16
  import ot from "../common/GroupStickyHeader.mjs";
17
17
  import an from "../common/ListDefaultItem.mjs";
18
- import sn from "../common/List.mjs";
18
+ import ln from "../common/List.mjs";
19
19
  import dt from "../common/DropDownBase.mjs";
20
- import { getFilteredData as M, areSame as N, getItemValue as fe, isPresent as it, itemIndexStartsWith as ln, sameCharsOnly as dn, shuffleData as cn, matchText as at } from "../common/utils.mjs";
20
+ import { getFilteredData as P, areSame as N, getItemValue as ve, isPresent as it, itemIndexStartsWith as sn, sameCharsOnly as dn, shuffleData as cn, matchText as at } from "../common/utils.mjs";
21
21
  import { packageMetadata as un } from "../package-metadata.mjs";
22
- import { Button as st } from "@progress/kendo-react-buttons";
22
+ import { Button as lt } from "@progress/kendo-react-buttons";
23
23
  import { useLocalization as pn } from "@progress/kendo-react-intl";
24
- import { dropDownListArrowBtnAriaLabel as lt, messages as mn } from "../messages/index.mjs";
25
- import { ActionSheet as fn, ActionSheetHeader as gn, ActionSheetContent as vn } from "@progress/kendo-react-layout";
26
- const In = "Please select a value from the list!", Ne = i.forwardRef((E, ct) => {
27
- Yt(un);
28
- const F = $t(), ge = jt(E.id), r = Jt(hn, E), {
29
- delay: ut = A.delay,
30
- tabIndex: pt = A.tabIndex,
31
- ignoreCase: ve = A.ignoreCase,
32
- size: Q = A.size,
33
- rounded: Fe = A.rounded,
34
- fillMode: Ie = A.fillMode,
35
- groupMode: wn = A.groupMode
36
- } = r, he = () => {
37
- if (tt)
38
- return q.current && q.current.ownerDocument || window.document;
24
+ import { dropDownListArrowBtnAriaLabel as st, messages as mn } from "../messages/index.mjs";
25
+ import { ActionSheet as fn, ActionSheetHeader as vn, ActionSheetContent as gn } from "@progress/kendo-react-layout";
26
+ const In = "Please select a value from the list!", Te = i.forwardRef((E, ct) => {
27
+ Gt(un);
28
+ const F = Yt(), ge = $t(E.id), r = jt(hn, E), {
29
+ delay: ut = z.delay,
30
+ tabIndex: pt = z.tabIndex,
31
+ ignoreCase: Ie = z.ignoreCase,
32
+ size: X = z.size,
33
+ rounded: ze = z.rounded,
34
+ fillMode: he = z.fillMode,
35
+ groupMode: yn = z.groupMode
36
+ } = r, ye = () => {
37
+ if (rt)
38
+ return U.current && U.current.ownerDocument || window.document;
39
39
  }, mt = () => {
40
40
  var e, n;
41
41
  (e = t == null ? void 0 : t.current) != null && e.wrapper && ((n = t == null ? void 0 : t.current) == null || n.wrapper.focus({ preventScroll: !0 }));
42
42
  }, L = () => {
43
43
  let e;
44
- return V.current !== void 0 && V.current !== null ? e = V.current : r.value !== void 0 ? e = r.value : m.value !== void 0 && m.value !== null ? e = m.value : r.defaultValue !== void 0 && r.defaultValue !== null && (e = r.defaultValue), !it(e) && r.defaultItem !== void 0 && r.defaultItem !== null && (e = r.defaultItem), e;
44
+ return H.current !== void 0 && H.current !== null ? e = H.current : r.value !== void 0 ? e = r.value : p.value !== void 0 && p.value !== null ? e = p.value : r.defaultValue !== void 0 && r.defaultValue !== null && (e = r.defaultValue), !it(e) && r.defaultItem !== void 0 && r.defaultItem !== null && (e = r.defaultItem), e;
45
45
  }, ft = () => {
46
- const { dataItemKey: e } = r, n = M(E), a = L();
46
+ const { dataItemKey: e } = r, n = P(E), a = L();
47
47
  return n.findIndex((c) => N(c, a, e));
48
- }, we = () => r.required !== void 0 ? r.required : A.required, ye = () => {
48
+ }, we = () => r.required !== void 0 ? r.required : z.required, xe = () => {
49
49
  const e = r.validationMessage !== void 0, n = L(), a = !we() || n !== null && n !== "" && n !== void 0, c = r.valid !== void 0 ? r.valid : a;
50
50
  return {
51
51
  customError: e,
52
52
  valid: c,
53
53
  valueMissing: n === null
54
54
  };
55
- }, gt = () => r.validityStyles !== void 0 ? r.validityStyles : A.validityStyles, ne = (e) => {
56
- oe.current = !0, e.focus(), window.setTimeout(() => oe.current = !1, 30);
57
- }, De = () => {
58
- Z.current && ne(Z.current), r.adaptive && setTimeout(() => {
59
- Z.current && ne(Z.current);
55
+ }, vt = () => r.validityStyles !== void 0 ? r.validityStyles : z.validityStyles, oe = (e) => {
56
+ ae.current = !0, e.focus(), window.setTimeout(() => ae.current = !1, 30);
57
+ }, Se = () => {
58
+ R.current && oe(R.current), r.adaptive && setTimeout(() => {
59
+ R.current && oe(R.current);
60
60
  }, 300);
61
- }, vt = (e) => {
61
+ }, gt = i.useCallback((e) => {
62
62
  for (const n of e)
63
- n.target.clientWidth !== ie.current.windowWidth && Y({ windowWidth: n.target.clientWidth });
64
- }, Ke = () => {
65
- re.current && re.current.setCustomValidity && re.current.setCustomValidity(
66
- ye().valid ? "" : r.validationMessage || In
63
+ Tt(n.target.clientWidth);
64
+ }, []), Oe = () => {
65
+ ie.current && ie.current.setCustomValidity && ie.current.setCustomValidity(
66
+ xe().valid ? "" : r.validationMessage || In
67
67
  );
68
- }, U = (e, n) => {
68
+ }, q = (e, n) => {
69
69
  const a = L();
70
- N(a, e, r.dataItemKey) || (r.value === void 0 && (n.data.value = e), t.current.updateComponentArgs({ value: e }), V.current = e, n.events.push({ type: "onChange" }));
70
+ N(a, e, r.dataItemKey) || (r.value === void 0 && (n.data.value = e), t.current.updateComponentArgs({ value: e }), H.current = e, n.events.push({ type: "onChange" }));
71
71
  }, K = (e) => {
72
72
  var n;
73
- (n = t == null ? void 0 : t.current) == null || n.applyState(e), V.current = void 0;
74
- }, X = (e, n) => {
75
- var l;
76
- const { virtual: a, dataItemKey: c, defaultItem: d } = r, u = M(E), I = a ? a.skip : 0, f = L(), o = e === -1 && d !== void 0 ? d : u[e - I], p = !N(o, f, c);
77
- U(o, n), p && ((l = t == null ? void 0 : t.current) == null || l.triggerPageChangeCornerItems(o, n));
78
- }, z = (e, n, a) => {
79
- var D, g;
80
- const { defaultItem: c, dataItemKey: d, virtual: u = { skip: 0, total: 0, pageSize: 0 } } = r, I = L(), f = M(E), o = (D = t == null ? void 0 : t.current) == null ? void 0 : D.vs, p = f.findIndex((h) => N(h, I, d)), l = (g = t == null ? void 0 : t.current) == null ? void 0 : g.navigation.navigate({
81
- current: u.skip + p,
82
- max: (o != null && o.enabled ? u.total : f.length) - 1,
73
+ (n = t == null ? void 0 : t.current) == null || n.applyState(e), H.current = void 0;
74
+ }, Z = (e, n) => {
75
+ var s;
76
+ const { virtual: a, dataItemKey: c, defaultItem: u } = r, m = P(E), v = a ? a.skip : 0, f = L(), o = e === -1 && u !== void 0 ? u : m[e - v], d = !N(o, f, c);
77
+ q(o, n), d && ((s = t == null ? void 0 : t.current) == null || s.triggerPageChangeCornerItems(o, n));
78
+ }, A = (e, n, a) => {
79
+ var h, I;
80
+ const { defaultItem: c, dataItemKey: u, virtual: m = { skip: 0, total: 0, pageSize: 0 } } = r, v = L(), f = P(E), o = (h = t == null ? void 0 : t.current) == null ? void 0 : h.vs, d = f.findIndex((y) => N(y, v, u)), s = (I = t == null ? void 0 : t.current) == null ? void 0 : I.navigation.navigate({
81
+ current: m.skip + d,
82
+ max: (o != null && o.enabled ? m.total : f.length) - 1,
83
83
  min: c !== void 0 ? -1 : 0,
84
84
  keyCode: n,
85
85
  skipItems: a || void 0
86
86
  });
87
- l !== void 0 && X(l, e), K(e);
87
+ s !== void 0 && Z(s, e), K(e);
88
88
  }, It = (e) => {
89
- q.current = e, t.current.wrapper = e;
89
+ U.current = e, t.current.wrapper = e;
90
90
  }, ht = (e) => /* @__PURE__ */ i.createElement(
91
91
  "select",
92
92
  {
93
93
  name: r.name,
94
94
  ref: (n) => {
95
- re.current = n;
95
+ ie.current = n;
96
96
  },
97
97
  tabIndex: -1,
98
98
  "aria-hidden": !0,
@@ -100,138 +100,138 @@ const In = "Please select a value from the list!", Ne = i.forwardRef((E, ct) =>
100
100
  style: { opacity: 0, width: 1, border: 0, zIndex: -1, position: "absolute", left: "50%" }
101
101
  },
102
102
  /* @__PURE__ */ i.createElement("option", { value: r.valueMap ? r.valueMap.call(void 0, e) : e })
103
- ), Se = () => {
103
+ ), De = () => {
104
104
  const {
105
105
  textField: e,
106
106
  dataItemKey: n,
107
107
  virtual: a = { skip: 0 },
108
- focusedItemIndex: c = ln,
109
- filterable: d,
110
- skipDisabledItems: u = !0
111
- } = r, I = L(), f = M(E), o = r.filter ? r.filter : m.text;
112
- return u && e && !o && !I ? f.findIndex((p) => !p.disabled && p[e]) : it(I) && o === void 0 || d && o === "" ? f.findIndex((p) => N(p, I, n)) : o ? Ee.current ? c(f, o, e) : f.findIndex((p) => N(p, I, n)) : a.skip === 0 ? 0 : -1;
113
- }, Te = (e, n) => n !== void 0 && n !== -1 && e && e.length > 0 && e[n].disabled, xe = () => {
114
- const e = M(E), n = t.current.initState(), a = Se();
115
- Te(e, a) && (U(null, n), K(n));
116
- }, Ce = (e) => {
108
+ focusedItemIndex: c = sn,
109
+ filterable: u,
110
+ skipDisabledItems: m = !0
111
+ } = r, v = L(), f = P(E), o = r.filter ? r.filter : p.text;
112
+ return m && e && !o && !v ? f.findIndex((d) => !d.disabled && d[e]) : it(v) && o === void 0 || u && o === "" ? f.findIndex((d) => N(d, v, n)) : o ? ke.current ? c(f, o, e) : f.findIndex((d) => N(d, v, n)) : a.skip === 0 ? 0 : -1;
113
+ }, Ae = (e, n) => n !== void 0 && n !== -1 && e && e.length > 0 && e[n].disabled, Ce = () => {
114
+ const e = P(E), n = t.current.initState(), a = De();
115
+ Ae(e, a) && (q(null, n), K(n));
116
+ }, Ee = (e) => {
117
117
  if (e.isPropagationStopped())
118
118
  return;
119
119
  const n = t.current.initState();
120
- n.syntheticEvent = e, m.focused || (n.data.focused = !0), xe(), t.current.togglePopup(n), K(n);
121
- }, Ae = (e) => {
122
- var O, pe, W, me, j, Re, et;
120
+ n.syntheticEvent = e, p.focused || (n.data.focused = !0), Ce(), t.current.togglePopup(n), K(n);
121
+ }, He = (e) => {
122
+ var O, me, _, fe, J, tt, nt;
123
123
  e && e.target instanceof Element && e.target.nodeName === "INPUT" && e.stopPropagation && e.stopPropagation();
124
124
  const {
125
125
  filterable: n,
126
126
  disabled: a,
127
127
  defaultItem: c,
128
- leftRightKeysNavigation: d = !0,
129
- virtual: u = { skip: 0, total: 0, pageSize: 0 },
130
- dataItemKey: I,
128
+ leftRightKeysNavigation: u = !0,
129
+ virtual: m = { skip: 0, total: 0, pageSize: 0 },
130
+ dataItemKey: v,
131
131
  groupField: f = "",
132
132
  textField: o,
133
- skipDisabledItems: p = !0
134
- } = r, l = M(E), D = L(), g = l.findIndex((x) => N(x, D, I)), h = r.opened !== void 0 ? r.opened : m.opened, s = e.keyCode, T = s === w.home || s === w.end, b = s === w.up || s === w.down, $ = !h && (e.altKey && s === w.down || s === w.enter || s === w.space), te = h && (e.altKey && s === w.up || s === w.esc), ce = d && (s === w.left || s === w.right), ue = b || ce && !n || T, S = t.current.initState();
133
+ skipDisabledItems: d = !0
134
+ } = r, s = P(E), h = L(), I = s.findIndex((D) => N(D, h, v)), y = r.opened !== void 0 ? r.opened : p.opened, l = e.keyCode, T = l === w.home || l === w.end, M = l === w.up || l === w.down, j = !y && (e.altKey && l === w.down || l === w.enter || l === w.space), re = y && (e.altKey && l === w.up || l === w.esc), ue = u && (l === w.left || l === w.right), pe = M || ue && !n || T, S = t.current.initState();
135
135
  if (S.syntheticEvent = e, !a) {
136
136
  if (T && ((O = t == null ? void 0 : t.current) != null && O.vs.enabled))
137
- s === w.home ? u.skip !== 0 ? ((pe = t == null ? void 0 : t.current) == null || pe.triggerOnPageChange(S, 0, u.pageSize), H.current = !0) : U(l[0], S) : u.skip < u.total - u.pageSize ? ((W = t == null ? void 0 : t.current) == null || W.triggerOnPageChange(
137
+ l === w.home ? m.skip !== 0 ? ((me = t == null ? void 0 : t.current) == null || me.triggerOnPageChange(S, 0, m.pageSize), V.current = !0) : q(s[0], S) : m.skip < m.total - m.pageSize ? ((_ = t == null ? void 0 : t.current) == null || _.triggerOnPageChange(
138
138
  S,
139
- u.total - u.pageSize,
140
- u.pageSize
141
- ), H.current = !0) : U(l[l.length - 1], S);
142
- else if (h && s === w.pageUp)
143
- e.preventDefault(), (me = t == null ? void 0 : t.current) == null || me.scrollPopupByPageSize(-1);
144
- else if (h && s === w.pageDown)
145
- e.preventDefault(), (j = t == null ? void 0 : t.current) == null || j.scrollPopupByPageSize(1);
146
- else if (h && s === w.enter) {
147
- const x = Se();
148
- Te(l, x) ? (U(null, S), K(S)) : X(x, S), (Re = t == null ? void 0 : t.current) == null || Re.togglePopup(S), e.preventDefault();
149
- } else if ($ || te)
150
- te && xe(), (et = t == null ? void 0 : t.current) == null || et.togglePopup(S), e.preventDefault();
151
- else if (ue) {
152
- if (Ee.current = !1, f !== "" && o)
153
- if (!p && h)
154
- z(S, s);
139
+ m.total - m.pageSize,
140
+ m.pageSize
141
+ ), V.current = !0) : q(s[s.length - 1], S);
142
+ else if (y && l === w.pageUp)
143
+ e.preventDefault(), (fe = t == null ? void 0 : t.current) == null || fe.scrollPopupByPageSize(-1);
144
+ else if (y && l === w.pageDown)
145
+ e.preventDefault(), (J = t == null ? void 0 : t.current) == null || J.scrollPopupByPageSize(1);
146
+ else if (y && l === w.enter) {
147
+ const D = De();
148
+ Ae(s, D) ? (q(null, S), K(S)) : Z(D, S), (tt = t == null ? void 0 : t.current) == null || tt.togglePopup(S), e.preventDefault();
149
+ } else if (j || re)
150
+ re && Ce(), (nt = t == null ? void 0 : t.current) == null || nt.togglePopup(S), e.preventDefault();
151
+ else if (pe) {
152
+ if (ke.current = !1, f !== "" && o)
153
+ if (!d && y)
154
+ A(S, l);
155
155
  else {
156
- let x;
157
- if (s === w.down || s === w.right) {
158
- const y = l.slice(g + 1).find((v) => !v.disabled && v[o]);
159
- x = y && l.findIndex((v) => v[o] === y[o]);
160
- } else if (s === w.up || s === w.left) {
161
- let y;
162
- if (g === 0 && c)
163
- x = -1;
164
- else if (g === -1)
165
- y = l, x = l.findIndex((v) => !v.disabled && v[o]);
156
+ let D;
157
+ if (l === w.down || l === w.right) {
158
+ const x = s.slice(I + 1).find((g) => !g.disabled && g[o]);
159
+ D = x && s.findIndex((g) => g[o] === x[o]);
160
+ } else if (l === w.up || l === w.left) {
161
+ let x;
162
+ if (I === 0 && c)
163
+ D = -1;
164
+ else if (I === -1)
165
+ x = s, D = s.findIndex((g) => !g.disabled && g[o]);
166
166
  else {
167
- y = l.slice(0, g);
168
- let v = y.pop();
169
- for (; v && v.disabled; )
170
- v = y.pop();
171
- x = v && l.findIndex((be) => be[o] === v[o]);
167
+ x = s.slice(0, I);
168
+ let g = x.pop();
169
+ for (; g && g.disabled; )
170
+ g = x.pop();
171
+ D = g && s.findIndex((Ke) => Ke[o] === g[o]);
172
172
  }
173
173
  }
174
- if (x !== void 0) {
175
- const y = x - g;
176
- z(S, s, y);
174
+ if (D !== void 0) {
175
+ const x = D - I;
176
+ A(S, l, x);
177
177
  } else
178
- x === void 0 && l.findIndex((y) => y[o] === D[o]) === l.length - 1 && z(S, s);
178
+ D === void 0 && s.findIndex((x) => x[o] === h[o]) === s.length - 1 && A(S, l);
179
179
  }
180
- else if (!p && h || T)
181
- z(S, s);
180
+ else if (!d && y || T)
181
+ A(S, l);
182
182
  else if (o) {
183
- let x;
184
- if (s === w.down || s === w.right) {
185
- const y = l.slice(g + 1).find((v) => !v.disabled && v[o]);
186
- x = y && l.findIndex((v) => v[o] === y[o]);
187
- } else if (s === w.up || s === w.left) {
188
- let y;
189
- if (g === 0 && c)
190
- x = -1;
191
- else if (g === -1)
192
- y = l, x = l.find((v) => !v.disabled && v[o]);
183
+ let D;
184
+ if (l === w.down || l === w.right) {
185
+ const x = s.slice(I + 1).find((g) => !g.disabled && g[o]);
186
+ D = x && s.findIndex((g) => g[o] === x[o]);
187
+ } else if (l === w.up || l === w.left) {
188
+ let x;
189
+ if (I === 0 && c)
190
+ D = -1;
191
+ else if (I === -1)
192
+ x = s, D = s.find((g) => !g.disabled && g[o]);
193
193
  else {
194
- y = l.slice(0, g);
195
- let v = y.pop();
196
- for (; v && v.disabled; )
197
- v = y.pop();
198
- x = v && l.findIndex((be) => be[o] === v[o]);
194
+ x = s.slice(0, I);
195
+ let g = x.pop();
196
+ for (; g && g.disabled; )
197
+ g = x.pop();
198
+ D = g && s.findIndex((Ke) => Ke[o] === g[o]);
199
199
  }
200
200
  }
201
- if (x !== void 0) {
202
- const y = x - g;
203
- z(S, s, y);
201
+ if (D !== void 0) {
202
+ const x = D - I;
203
+ A(S, l, x);
204
204
  } else
205
- x === void 0 && l.findIndex((y) => y[o] === D[o]) === l.length - 1 && z(S, s);
205
+ D === void 0 && s.findIndex((x) => x[o] === h[o]) === s.length - 1 && A(S, l);
206
206
  } else
207
- z(S, s);
207
+ A(S, l);
208
208
  e.preventDefault();
209
209
  }
210
210
  K(S);
211
211
  }
212
- }, wt = (e) => {
212
+ }, yt = (e) => {
213
213
  const n = t.current.initState();
214
- n.syntheticEvent = e.syntheticEvent, r.filter === void 0 && (n.data.text = e.target.value), t.current.filterChanged(e.target.value, n), Ee.current = !0, K(n), Y({ group: void 0, text: String(e.target.value) });
215
- }, Oe = () => {
216
- const e = r.filter !== void 0 ? r.filter : m.text;
214
+ n.syntheticEvent = e.syntheticEvent, r.filter === void 0 && (n.data.text = e.target.value), t.current.filterChanged(e.target.value, n), ke.current = !0, K(n), te({ group: void 0, text: String(e.target.value) });
215
+ }, Ve = () => {
216
+ const e = r.filter !== void 0 ? r.filter : p.text;
217
217
  return r.filterable && /* @__PURE__ */ i.createElement(
218
218
  on,
219
219
  {
220
220
  value: e,
221
- ref: (n) => Z.current = n && n.element,
222
- onChange: wt,
223
- onKeyDown: Ae,
224
- size: Q,
225
- rounded: Fe,
226
- fillMode: Ie,
221
+ ref: (n) => R.current = n && n.element,
222
+ onChange: yt,
223
+ onKeyDown: He,
224
+ size: X,
225
+ rounded: ze,
226
+ fillMode: he,
227
227
  renderListFilterWrapper: !0
228
228
  }
229
229
  );
230
- }, yt = (e) => {
230
+ }, wt = (e) => {
231
231
  var a;
232
232
  const n = t.current.initState();
233
- n.syntheticEvent = e, (a = t == null ? void 0 : t.current) == null || a.togglePopup(n), U(r.defaultItem, n), K(n);
234
- }, ze = () => {
233
+ n.syntheticEvent = e, (a = t == null ? void 0 : t.current) == null || a.togglePopup(n), q(r.defaultItem, n), K(n);
234
+ }, Be = () => {
235
235
  const { textField: e, defaultItem: n, dataItemKey: a } = r, c = L();
236
236
  return n !== void 0 && /* @__PURE__ */ i.createElement(
237
237
  an,
@@ -240,204 +240,205 @@ const In = "Please select a value from the list!", Ne = i.forwardRef((E, ct) =>
240
240
  textField: e,
241
241
  selected: N(c, n, a),
242
242
  key: "defaultitemkey",
243
- onClick: yt
243
+ onClick: wt
244
244
  }
245
245
  );
246
- }, Dt = (e, n) => {
246
+ }, xt = (e, n) => {
247
247
  var a;
248
- (a = t == null ? void 0 : t.current) == null || a.handleItemClick(e, n), V.current = void 0;
248
+ (a = t == null ? void 0 : t.current) == null || a.handleItemClick(e, n), H.current = void 0;
249
249
  }, St = (e) => {
250
250
  const { vs: n, list: a } = t.current;
251
251
  n.scrollHandler(e);
252
252
  const { groupField: c } = r;
253
- let d = M(E);
254
- if (!(!c || !d.length) && c) {
255
- const u = _e.current = _e.current || (n.enabled ? n.itemHeight : a ? a.children[0].offsetHeight : 0), f = e.target.scrollTop - n.skip * u;
256
- d = t.current.getGroupedDataModernMode(d, c);
257
- let o = d[0][c];
258
- for (let p = 1; p < d.length && !(u * p > f); p++)
259
- d[p] && d[p][c] && (o = d[p][c]);
260
- o !== m.group && Y({ group: o });
253
+ let u = P(E);
254
+ if (!(!c || !u.length) && c) {
255
+ const m = Ue.current = Ue.current || (n.enabled ? n.itemHeight : a ? a.children[0].offsetHeight : 0), f = e.target.scrollTop - n.skip * m;
256
+ u = t.current.getGroupedDataModernMode(u, c);
257
+ let o = u[0][c];
258
+ for (let d = 1; d < u.length && !(m * d > f); d++)
259
+ u[d] && u[d][c] && (o = u[d][c]);
260
+ o !== p.group && te({ group: o });
261
261
  }
262
- }, Ve = () => {
263
- var s;
262
+ }, We = () => {
263
+ var l;
264
264
  const {
265
265
  textField: e,
266
266
  dataItemKey: n,
267
267
  virtual: a = { skip: 0, total: void 0 },
268
268
  groupHeaderItemRender: c,
269
- listNoDataRender: d,
270
- itemRender: u
271
- } = r, I = M(E), f = F && F.uDropDownList, o = t.current.vs, p = a.skip, l = r.opened !== void 0 ? r.opened : m.opened, D = t.current.getPopupSettings(), g = `translateY(${o.translate}px)`, h = L();
269
+ listNoDataRender: u,
270
+ itemRender: m
271
+ } = r, v = P(E), f = F && F.uDropDownList, o = t.current.vs, d = a.skip, s = r.opened !== void 0 ? r.opened : p.opened, h = t.current.getPopupSettings(), I = `translateY(${o.translate}px)`, y = L();
272
272
  return /* @__PURE__ */ i.createElement(
273
- sn,
273
+ ln,
274
274
  {
275
- id: ke,
276
- show: l,
277
- data: I.slice(),
278
- focusedIndex: Se(),
279
- value: h,
275
+ id: be,
276
+ show: s,
277
+ data: v.slice(),
278
+ focusedIndex: De(),
279
+ value: y,
280
280
  textField: e,
281
281
  valueField: n,
282
- optionsGuid: qe,
282
+ optionsGuid: $e,
283
283
  groupField: r.groupField,
284
284
  groupMode: "modern",
285
285
  listRef: (T) => o.list = t.current.list = T,
286
- wrapperStyle: { maxHeight: D.height },
287
- wrapperCssClass: C(P.listContent({ c: f })),
288
- listStyle: o.enabled ? { transform: g } : void 0,
286
+ wrapperStyle: { maxHeight: h.height },
287
+ wrapperCssClass: C(b.listContent({ c: f })),
288
+ listStyle: o.enabled ? { transform: I } : void 0,
289
289
  key: "listkey",
290
- skip: p,
291
- onClick: Dt,
292
- itemRender: u,
290
+ skip: d,
291
+ onClick: xt,
292
+ itemRender: m,
293
293
  groupHeaderItemRender: c,
294
- noDataRender: d,
294
+ noDataRender: u,
295
295
  onScroll: St,
296
296
  wrapperRef: o.scrollerRef,
297
- scroller: (s = t == null ? void 0 : t.current) == null ? void 0 : s.renderScrollElement(),
297
+ scroller: (l = t == null ? void 0 : t.current) == null ? void 0 : l.renderScrollElement(),
298
298
  ariaSetSize: a.total
299
299
  }
300
300
  );
301
- }, xt = () => {
302
- var h;
303
- const { windowWidth: e = 0 } = m, { header: n, footer: a, adaptiveTitle: c, groupField: d, groupStickyHeaderItemRender: u, list: I } = r, f = M(E), o = r.opened !== void 0 ? r.opened : m.opened, p = F && F.uDropDownList, l = F && F.uDropDownsActionSheet, D = {
301
+ }, Dt = () => {
302
+ var I;
303
+ const { header: e, footer: n, adaptiveTitle: a, groupField: c, groupStickyHeaderItemRender: u, list: m } = r, v = P(E), f = r.opened !== void 0 ? r.opened : p.opened, o = F && F.uDropDownList, d = F && F.uDropDownsActionSheet, s = {
304
304
  navigatable: !1,
305
305
  navigatableElements: [],
306
- expand: o,
306
+ expand: f,
307
307
  animation: !0,
308
- onClose: (s) => Ce(s),
309
- animationStyles: e <= nt ? { top: 0, width: "100%", height: "100%" } : void 0,
308
+ onClose: (y) => Ee(y),
310
309
  className: C(
311
- J.wrapper({
312
- c: l,
313
- isFullScreen: e <= nt
314
- })
315
- )
310
+ Q.wrapper({
311
+ c: d
312
+ }),
313
+ "k-adaptive-actionsheet"
314
+ ),
315
+ animationStyles: Y && $ && Y <= $.small ? { top: 0, width: "100%", height: "100%" } : void 0,
316
+ position: Y && $ && Y <= $.small ? "fullscreen" : void 0
316
317
  };
317
- let { group: g } = m;
318
- return g === void 0 && d !== void 0 && (g = fe(f[0], d)), /* @__PURE__ */ i.createElement(fn, { ...D }, /* @__PURE__ */ i.createElement(gn, { className: C(J.header({ c: l })) }, /* @__PURE__ */ i.createElement("div", { className: C(J.titleBar({ c: l })) }, /* @__PURE__ */ i.createElement("div", { className: C(J.title({ c: l })) }, /* @__PURE__ */ i.createElement("div", null, c)), /* @__PURE__ */ i.createElement("div", { className: C(J.actions({ c: l })) }, /* @__PURE__ */ i.createElement(
319
- st,
318
+ let { group: h } = p;
319
+ return h === void 0 && c !== void 0 && (h = ve(v[0], c)), /* @__PURE__ */ i.createElement(fn, { ...s }, /* @__PURE__ */ i.createElement(vn, { className: C(Q.header({ c: d })) }, /* @__PURE__ */ i.createElement("div", { className: C(Q.titleBar({ c: d })) }, /* @__PURE__ */ i.createElement("div", { className: C(Q.title({ c: d })) }, /* @__PURE__ */ i.createElement("div", null, a)), /* @__PURE__ */ i.createElement("div", { className: C(Q.actions({ c: d })) }, /* @__PURE__ */ i.createElement(
320
+ lt,
320
321
  {
321
322
  tabIndex: 0,
322
323
  "aria-label": "Cancel",
323
324
  "aria-disabled": "false",
324
325
  type: "button",
325
326
  fillMode: "flat",
326
- onClick: Ce,
327
+ onClick: Ee,
327
328
  icon: "x",
328
329
  svgIcon: nn
329
330
  }
330
- ))), /* @__PURE__ */ i.createElement("div", { className: C(J.titleBarGroup({ c: l })) }, Oe())), /* @__PURE__ */ i.createElement(vn, { overflowHidden: !0 }, n && /* @__PURE__ */ i.createElement("div", { className: C(P.listHeader({ c: p })) }, n), /* @__PURE__ */ i.createElement(
331
+ ))), /* @__PURE__ */ i.createElement("div", { className: C(Q.titleBarGroup({ c: d })) }, Ve())), /* @__PURE__ */ i.createElement(gn, { overflowHidden: !0 }, e && /* @__PURE__ */ i.createElement("div", { className: C(b.listHeader({ c: o })) }, e), /* @__PURE__ */ i.createElement(
331
332
  "div",
332
333
  {
333
334
  className: C(
334
- P.list({
335
- c: p,
336
- size: Q,
337
- virtual: (h = t == null ? void 0 : t.current) == null ? void 0 : h.vs.enabled
335
+ b.list({
336
+ c: o,
337
+ size: X,
338
+ virtual: (I = t == null ? void 0 : t.current) == null ? void 0 : I.vs.enabled
338
339
  })
339
340
  )
340
341
  },
341
- ze(),
342
- !I && g && f.length !== 0 && /* @__PURE__ */ i.createElement(
342
+ Be(),
343
+ !m && h && v.length !== 0 && /* @__PURE__ */ i.createElement(
343
344
  ot,
344
345
  {
345
- group: g,
346
+ group: h,
346
347
  groupMode: "modern",
347
348
  render: u
348
349
  }
349
350
  ),
350
- Ve()
351
- ), a && /* @__PURE__ */ i.createElement("div", { className: C(P.listFooter({ c: p })) }, a)));
351
+ We()
352
+ ), n && /* @__PURE__ */ i.createElement("div", { className: C(b.listFooter({ c: o })) }, n)));
352
353
  }, Ct = () => {
353
- m.focused && window.setTimeout(() => {
354
- m.focused && t.current.wrapper && ne(t.current.wrapper);
354
+ p.focused && window.setTimeout(() => {
355
+ p.focused && t.current.wrapper && oe(t.current.wrapper);
355
356
  });
356
357
  }, Et = (e) => {
357
358
  var n;
358
359
  (n = r.popupSettings) != null && n.onMouseDownOutside && r.popupSettings.onMouseDownOutside.call(void 0, e);
359
360
  }, kt = () => {
360
- const { header: e, footer: n, dir: a, groupField: c, groupStickyHeaderItemRender: d, list: u } = r, I = M(E), f = t.current, o = f.getPopupSettings(), p = r.opened !== void 0 ? r.opened : m.opened, l = o.width !== void 0 ? o.width : f.popupWidth, D = F && F.uDropDownList, g = {
361
+ const { header: e, footer: n, dir: a, groupField: c, groupStickyHeaderItemRender: u, list: m } = r, v = P(E), f = t.current, o = f.getPopupSettings(), d = r.opened !== void 0 ? r.opened : p.opened, s = o.width !== void 0 ? o.width : f.popupWidth, h = F && F.uDropDownList, I = {
361
362
  dir: a !== void 0 ? a : f.dirCalculated,
362
- width: l,
363
+ width: s,
363
364
  popupSettings: {
364
365
  ...o,
365
366
  popupClass: C(
366
367
  o.popupClass,
367
- P.listContainer({
368
- c: D
368
+ b.listContainer({
369
+ c: h
369
370
  })
370
371
  ),
371
- anchor: o.anchor || q.current,
372
- show: p,
373
- onOpen: De,
372
+ anchor: o.anchor || U.current,
373
+ show: d,
374
+ onOpen: Se,
374
375
  onClose: Ct,
375
376
  onMouseDownOutside: Et
376
377
  },
377
- itemsCount: [I.length]
378
+ itemsCount: [v.length]
378
379
  };
379
- let { group: h } = m;
380
- return h === void 0 && c !== void 0 && (h = fe(I[0], c)), /* @__PURE__ */ i.createElement(rn, { ...g }, Oe(), e && /* @__PURE__ */ i.createElement("div", { className: C(P.listHeader({ c: D })) }, e), /* @__PURE__ */ i.createElement(
380
+ let { group: y } = p;
381
+ return y === void 0 && c !== void 0 && (y = ve(v[0], c)), /* @__PURE__ */ i.createElement(rn, { ...I }, Ve(), e && /* @__PURE__ */ i.createElement("div", { className: C(b.listHeader({ c: h })) }, e), /* @__PURE__ */ i.createElement(
381
382
  "div",
382
383
  {
383
384
  className: C(
384
- P.list({
385
- c: D,
386
- size: Q,
385
+ b.list({
386
+ c: h,
387
+ size: X,
387
388
  virtual: t.current.vs.enabled
388
389
  })
389
390
  )
390
391
  },
391
- ze(),
392
- !u && h && I.length !== 0 && /* @__PURE__ */ i.createElement(ot, { group: h, groupMode: "modern", render: d }),
393
- Ve()
394
- ), n && /* @__PURE__ */ i.createElement("div", { className: C(P.listFooter({ c: D })) }, n));
392
+ Be(),
393
+ !m && y && v.length !== 0 && /* @__PURE__ */ i.createElement(ot, { group: y, groupMode: "modern", render: u }),
394
+ We()
395
+ ), n && /* @__PURE__ */ i.createElement("div", { className: C(b.listFooter({ c: h })) }, n));
395
396
  }, Lt = (e) => {
396
- const { dataItemKey: n } = r, a = M(E), c = L();
397
- let d = a.map((b, $) => ({ item: b, itemIndex: $ }));
398
- const u = G.current.word, I = G.current.last, f = dn(u, I);
399
- let o = d.length, p = Math.max(
397
+ const { dataItemKey: n } = r, a = P(E), c = L();
398
+ let u = a.map((M, j) => ({ item: M, itemIndex: j }));
399
+ const m = G.current.word, v = G.current.last, f = dn(m, v);
400
+ let o = u.length, d = Math.max(
400
401
  0,
401
- a.findIndex((b) => N(b, c, n))
402
- ), l;
403
- r.defaultItem && (l = { item: r.defaultItem, itemIndex: -1 }, o += 1, p += 1), p += f ? 1 : 0, d = cn(d, p, l);
404
- let D, g, h, s = 0;
402
+ a.findIndex((M) => N(M, c, n))
403
+ ), s;
404
+ r.defaultItem && (s = { item: r.defaultItem, itemIndex: -1 }, o += 1, d += 1), d += f ? 1 : 0, u = cn(u, d, s);
405
+ let h, I, y, l = 0;
405
406
  const { textField: T } = r;
406
- for (; s < o; s++)
407
- if (D = fe(d[s].item, T), g = f && at(D, I, ve), h = at(D, u, ve), g || h) {
408
- s = d[s].itemIndex;
407
+ for (; l < o; l++)
408
+ if (h = ve(u[l].item, T), I = f && at(h, v, Ie), y = at(h, m, Ie), I || y) {
409
+ l = u[l].itemIndex;
409
410
  break;
410
411
  }
411
- if (s !== o) {
412
- const b = t.current.initState();
413
- b.syntheticEvent = e, X(s, b), K(b), V.current = void 0;
412
+ if (l !== o) {
413
+ const M = t.current.initState();
414
+ M.syntheticEvent = e, Z(l, M), K(M), H.current = void 0;
414
415
  }
416
+ }, bt = (e) => {
417
+ clearTimeout(qe.current), r.filterable || (qe.current = window.setTimeout(() => G.current.word = "", ut), Lt(e));
415
418
  }, Pt = (e) => {
416
- clearTimeout(Be.current), r.filterable || (Be.current = window.setTimeout(() => G.current.word = "", ut), Lt(e));
419
+ ae.current || t.current.handleFocus(e);
417
420
  }, Mt = (e) => {
418
- oe.current || t.current.handleFocus(e);
419
- }, bt = (e) => {
420
- if (oe.current || !m.focused)
421
+ if (ae.current || !p.focused)
421
422
  return;
422
- const n = r.opened !== void 0 ? r.opened : m.opened, { adaptive: a } = r, { windowWidth: c = 0 } = m, d = c <= rt && a, u = t.current.initState();
423
- u.syntheticEvent = e, u.data.focused = !1, u.events.push({ type: "onBlur" }), n && xe(), n && !d && t.current.togglePopup(u), K(u);
423
+ const n = r.opened !== void 0 ? r.opened : p.opened, a = t.current.initState();
424
+ a.syntheticEvent = e, a.data.focused = !1, a.events.push({ type: "onBlur" }), n && Ce(), n && !Fe && t.current.togglePopup(a), K(a);
424
425
  }, Nt = (e) => {
425
426
  if (r.filterable || e.which === 0 || e.keyCode === w.enter)
426
427
  return;
427
428
  let n = String.fromCharCode(e.charCode || e.keyCode);
428
- ve && (n = n.toLowerCase()), n === " " && e.preventDefault(), G.current = {
429
+ Ie && (n = n.toLowerCase()), n === " " && e.preventDefault(), G.current = {
429
430
  word: G.current.word + n,
430
431
  last: G.current.last + n
431
- }, Pt(e);
432
+ }, bt(e);
432
433
  }, Ft = () => {
433
434
  const e = t.current.initState();
434
- e.data.opened = m.opened, t.current.togglePopup(e), K(e);
435
- }, He = i.useRef(null), q = i.useRef(null), re = i.useRef(), Z = i.useRef(null);
435
+ e.data.opened = p.opened, t.current.togglePopup(e), K(e);
436
+ }, _e = i.useRef(null), U = i.useRef(null), ie = i.useRef(), R = i.useRef(null);
436
437
  i.useImperativeHandle(
437
- He,
438
+ _e,
438
439
  () => ({
439
440
  get element() {
440
- return q.current;
441
+ return U.current;
441
442
  },
442
443
  get index() {
443
444
  return ft();
@@ -446,16 +447,16 @@ const In = "Please select a value from the list!", Ne = i.forwardRef((E, ct) =>
446
447
  return r.name;
447
448
  },
448
449
  get validity() {
449
- return ye();
450
+ return xe();
450
451
  },
451
452
  get value() {
452
453
  return L();
453
454
  },
454
455
  get focused() {
455
- return m.focused;
456
+ return p.focused;
456
457
  },
457
458
  get opened() {
458
- return m.opened;
459
+ return p.opened;
459
460
  },
460
461
  focus: mt,
461
462
  props: r,
@@ -463,9 +464,9 @@ const In = "Please select a value from the list!", Ne = i.forwardRef((E, ct) =>
463
464
  })
464
465
  ), i.useImperativeHandle(
465
466
  ct,
466
- () => He.current
467
+ () => _e.current
467
468
  );
468
- const Be = i.useRef(null), G = i.useRef({ word: "", last: "" }), oe = i.useRef(!1), V = i.useRef(null), H = i.useRef(!1), Ee = i.useRef(!1), B = i.useRef({}), ie = i.useRef({}), t = i.useRef(
469
+ const qe = i.useRef(null), G = i.useRef({ word: "", last: "" }), ae = i.useRef(!1), H = i.useRef(null), V = i.useRef(!1), ke = i.useRef(!1), B = i.useRef({}), Le = i.useRef({}), t = i.useRef(
469
470
  new dt({
470
471
  props: E,
471
472
  setState: () => {
@@ -478,140 +479,142 @@ const In = "Please select a value from the list!", Ne = i.forwardRef((E, ct) =>
478
479
  handleItemSelect: () => {
479
480
  }
480
481
  })
481
- ), _e = i.useRef(0), R = i.useRef(null), [m, Kt] = i.useState({}), [, We] = i.useReducer((e) => e, !0), Tt = pn(), Y = (e) => {
482
- Kt({ ...m, ...e });
482
+ ), Ue = i.useRef(0), ee = i.useRef(null), [p, Kt] = i.useState({}), [Y, Tt] = i.useState(), [, Ge] = i.useReducer((e) => e, !0), zt = pn(), te = (e) => {
483
+ Kt({ ...p, ...e });
483
484
  };
484
485
  i.useEffect(() => {
485
486
  t.current.updateComponentArgs({
486
487
  props: E,
487
- setState: Y,
488
- state: m,
489
- forceUpdate: We,
490
- element: q.current,
491
- handleItemSelect: X,
488
+ setState: te,
489
+ state: p,
490
+ forceUpdate: Ge,
491
+ element: U.current,
492
+ handleItemSelect: Z,
492
493
  value: L()
493
494
  });
494
- }, [Y, m, We, X, L]), i.useEffect(() => {
495
- var p, l, D, g, h, s, T, b, $, te, ce, ue, S;
496
- const { dataItemKey: e, virtual: n, groupField: a = "", textField: c } = r, d = M(E), u = B.current.virtual ? B.current.virtual.total : 0, I = r.opened !== void 0 ? r.opened : m.opened, f = B.current.opened !== void 0 ? B.current.opened : ie.current.opened, o = !f && I;
497
- if ((p = t == null ? void 0 : t.current) == null || p.didUpdate(), (l = t == null ? void 0 : t.current) != null && l.getPopupSettings().animate || o && De(), n && n.total !== u)
498
- (D = t == null ? void 0 : t.current) == null || D.vs.calcScrollElementHeight(), (g = t == null ? void 0 : t.current) == null || g.vs.reset();
495
+ }, [te, p, Ge, Z, L]), i.useEffect(() => {
496
+ var d, s, h, I, y, l, T, M, j, re, ue, pe, S;
497
+ const { dataItemKey: e, virtual: n, groupField: a = "", textField: c } = r, u = P(E), m = B.current.virtual ? B.current.virtual.total : 0, v = r.opened !== void 0 ? r.opened : p.opened, f = B.current.opened !== void 0 ? B.current.opened : Le.current.opened, o = !f && v;
498
+ if ((d = t == null ? void 0 : t.current) == null || d.didUpdate(), (s = t == null ? void 0 : t.current) != null && s.getPopupSettings().animate || o && Se(), n && n.total !== m)
499
+ (h = t == null ? void 0 : t.current) == null || h.vs.calcScrollElementHeight(), (I = t == null ? void 0 : t.current) == null || I.vs.reset();
499
500
  else {
500
- const O = L(), pe = B.current.value !== void 0 ? B.current.value : ie.current.value;
501
- let W = d.findIndex((j) => N(j, O, e));
502
- a !== "" && O && c && (W = (s = (h = t == null ? void 0 : t.current) == null ? void 0 : h.getGroupedDataModernMode(d, a)) == null ? void 0 : s.map((j) => j[c]).indexOf(O[c]));
503
- const me = !N(pe, O, e);
504
- o && n ? (T = t == null ? void 0 : t.current) == null || T.scrollToVirtualItem(n, W) : o && !n ? (De(), d && d.length !== 0 && ((b = t == null ? void 0 : t.current) == null || b.resetGroupStickyHeader(d[0][a], {
505
- setState: Y,
506
- group: m.group,
507
- state: m
508
- })), ($ = t == null ? void 0 : t.current) == null || $.scrollToItem(W)) : I && f && O && me && !H.current ? (ce = t == null ? void 0 : t.current) == null || ce.scrollToItem(W, (te = t == null ? void 0 : t.current) == null ? void 0 : te.vs.enabled) : I && f && H.current && (H.current && n && n.skip === 0 ? (ue = t == null ? void 0 : t.current) == null || ue.vs.reset() : H.current && n && n.skip === n.total - n.pageSize && ((S = t == null ? void 0 : t.current) == null || S.vs.scrollToEnd()));
501
+ const O = L(), me = B.current.value !== void 0 ? B.current.value : Le.current.value;
502
+ let _ = u.findIndex((J) => N(J, O, e));
503
+ a !== "" && O && c && (_ = (l = (y = t == null ? void 0 : t.current) == null ? void 0 : y.getGroupedDataModernMode(u, a)) == null ? void 0 : l.map((J) => J[c]).indexOf(O[c]));
504
+ const fe = !N(me, O, e);
505
+ o && n ? (T = t == null ? void 0 : t.current) == null || T.scrollToVirtualItem(n, _) : o && !n ? (Se(), u && u.length !== 0 && ((M = t == null ? void 0 : t.current) == null || M.resetGroupStickyHeader(u[0][a], {
506
+ setState: te,
507
+ group: p.group,
508
+ state: p
509
+ })), (j = t == null ? void 0 : t.current) == null || j.scrollToItem(_)) : v && f && O && fe && !V.current ? (ue = t == null ? void 0 : t.current) == null || ue.scrollToItem(_, (re = t == null ? void 0 : t.current) == null ? void 0 : re.vs.enabled) : v && f && V.current && (V.current && n && n.skip === 0 ? (pe = t == null ? void 0 : t.current) == null || pe.vs.reset() : V.current && n && n.skip === n.total - n.pageSize && ((S = t == null ? void 0 : t.current) == null || S.vs.scrollToEnd()));
509
510
  }
510
- H.current = !1, ie.current = m, B.current = r, Ke();
511
+ V.current = !1, Le.current = p, B.current = r, Oe();
511
512
  }), i.useEffect(() => {
512
513
  var e, n;
513
- return R.current = tt && window.ResizeObserver && new window.ResizeObserver((a) => vt(a)), (e = t == null ? void 0 : t.current) == null || e.didMount(), Ke(), (n = he()) != null && n.body && R.current && R.current.observe(he().body), () => {
514
+ return ee.current = rt && window.ResizeObserver && new window.ResizeObserver(gt.bind(void 0)), (e = t == null ? void 0 : t.current) == null || e.didMount(), Oe(), (n = ye()) != null && n.body && ee.current && ee.current.observe(ye().body), () => {
514
515
  var a;
515
- (a = he()) != null && a.body && R.current && R.current.disconnect();
516
+ (a = ye()) != null && a.body && ee.current && ee.current.disconnect();
516
517
  };
517
518
  }, []);
518
- const Ue = ge + "-accessibility-id", ke = ge + "-listbox-id", qe = ge + "-guid", At = Tt.toLanguageString(
519
- lt,
520
- mn[lt]
519
+ const Ye = ge + "-accessibility-id", be = ge + "-listbox-id", $e = ge + "-guid", Ot = zt.toLanguageString(
520
+ st,
521
+ mn[st]
521
522
  ), {
522
- style: ae,
523
- className: Ot,
524
- label: Le,
525
- dir: zt,
526
- virtual: _,
527
- adaptive: Vt,
528
- dataItemKey: Ht,
523
+ style: le,
524
+ className: At,
525
+ label: Pe,
526
+ dir: Ht,
527
+ virtual: W,
528
+ adaptive: wn,
529
+ dataItemKey: Vt,
529
530
  disabled: se,
530
- loading: Ge,
531
- iconClassName: Ye,
532
- svgIcon: $e,
533
- valueRender: je
534
- } = r, { windowWidth: Bt = 0 } = m, Pe = r.opened !== void 0 ? r.opened : m.opened, le = L(), Me = fe(le, r.textField), Je = !gt() || ye().valid, de = t.current, _t = de.vs, Qe = Bt <= rt && Vt, ee = F && F.uDropDownList;
535
- _t.enabled = _ !== void 0, _ !== void 0 && (de.vs.skip = _.skip, de.vs.total = _.total, de.vs.pageSize = _.pageSize);
536
- const Wt = M(E), { focused: Ut } = m, qt = Wt.findIndex((e) => N(e, le, Ht)), Xe = /* @__PURE__ */ i.createElement("span", { id: Ue, className: C(P.inputInner({ c: ee })) }, Me && /* @__PURE__ */ i.createElement("span", { className: C(P.inputText({ c: ee })) }, Me)), Gt = je !== void 0 ? je.call(void 0, Xe, le) : Xe, Ze = /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement(
531
+ loading: je,
532
+ iconClassName: Je,
533
+ svgIcon: Qe,
534
+ valueRender: Xe
535
+ } = r, Me = r.opened !== void 0 ? r.opened : p.opened, de = L(), Ne = ve(de, r.textField), Ze = !vt() || xe().valid, ce = t.current, Bt = ce.vs, ne = F && F.uDropDownList;
536
+ Bt.enabled = W !== void 0;
537
+ const $ = Jt(), Fe = !!(Y && $ && Y <= $.medium && E.adaptive);
538
+ W !== void 0 && (ce.vs.skip = W.skip, ce.vs.total = W.total, ce.vs.pageSize = W.pageSize);
539
+ const Wt = P(E), { focused: _t } = p, qt = Wt.findIndex((e) => N(e, de, Vt)), Re = /* @__PURE__ */ i.createElement("span", { id: Ye, className: C(b.inputInner({ c: ne })) }, Ne && /* @__PURE__ */ i.createElement("span", { className: C(b.inputText({ c: ne })) }, Ne)), Ut = Xe !== void 0 ? Xe.call(void 0, Re, de) : Re, et = /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement(
537
540
  "span",
538
541
  {
539
542
  ref: It,
540
543
  className: C(
541
- P.wrapper({
542
- c: ee,
543
- size: Q,
544
- rounded: Fe,
545
- fillMode: Ie,
546
- focused: Ut,
544
+ b.wrapper({
545
+ c: ne,
546
+ size: X,
547
+ rounded: ze,
548
+ fillMode: he,
549
+ focused: _t,
547
550
  disabled: se,
548
- invalid: !Je,
549
- loading: Ge,
551
+ invalid: !Ze,
552
+ loading: je,
550
553
  required: we()
551
554
  }),
552
- Ot
555
+ At
553
556
  ),
554
- style: Le ? { ...ae, width: void 0 } : ae,
555
- dir: zt,
556
- onMouseDown: Pe ? (e) => {
557
- e.target.nodeName !== "INPUT" && (ne(t.current.wrapper), e.preventDefault());
557
+ style: Pe ? { ...le, width: void 0 } : le,
558
+ dir: Ht,
559
+ onMouseDown: Me ? (e) => {
560
+ e.target.nodeName !== "INPUT" && (oe(t.current.wrapper), e.preventDefault());
558
561
  } : void 0,
559
- onFocus: Mt,
560
- onBlur: bt,
562
+ onFocus: Pt,
563
+ onBlur: Mt,
561
564
  tabIndex: Qt(pt, se),
562
565
  accessKey: r.accessKey,
563
- onKeyDown: Ae,
566
+ onKeyDown: He,
564
567
  onKeyPress: Nt,
565
- onClick: se ? void 0 : Ce,
568
+ onClick: se ? void 0 : Ee,
566
569
  role: "combobox",
567
570
  "aria-required": we(),
568
571
  "aria-disabled": se || void 0,
569
572
  "aria-haspopup": "listbox",
570
- "aria-expanded": Pe || !1,
571
- "aria-owns": ke,
572
- "aria-activedescendant": Pe ? "option-" + qe + "-" + (qt + (_ ? _.skip : 0)) : void 0,
573
+ "aria-expanded": Me || !1,
574
+ "aria-owns": be,
575
+ "aria-activedescendant": Me ? "option-" + $e + "-" + (qt + (W ? W.skip : 0)) : void 0,
573
576
  "aria-label": r.ariaLabel || r.label,
574
577
  "aria-labelledby": r.ariaLabelledBy,
575
- "aria-describedby": r.ariaDescribedBy || Ue,
576
- "aria-controls": ke,
578
+ "aria-describedby": r.ariaDescribedBy || Ye,
579
+ "aria-controls": be,
577
580
  id: r.id,
578
581
  title: r.title
579
582
  },
580
- Gt,
581
- Ge && /* @__PURE__ */ i.createElement(Xt, { className: C(P.loadingIcon({ c: ee })), name: "loading" }),
583
+ Ut,
584
+ je && /* @__PURE__ */ i.createElement(Xt, { className: C(b.loadingIcon({ c: ne })), name: "loading" }),
582
585
  /* @__PURE__ */ i.createElement(
583
- st,
586
+ lt,
584
587
  {
585
588
  tabIndex: -1,
586
589
  type: "button",
587
- "aria-label": At,
588
- size: Q,
589
- fillMode: Ie,
590
- iconClass: Ye,
591
- className: C(P.inputButton({ c: ee })),
590
+ "aria-label": Ot,
591
+ size: X,
592
+ fillMode: he,
593
+ iconClass: Je,
594
+ className: C(b.inputButton({ c: ne })),
592
595
  rounded: null,
593
596
  themeColor: "base",
594
- icon: Ye ? void 0 : "caret-alt-down",
595
- svgIcon: $e || tn,
596
- onMouseDown: (e) => m.focused && e.preventDefault()
597
+ icon: Je ? void 0 : "caret-alt-down",
598
+ svgIcon: Qe || tn,
599
+ onMouseDown: (e) => p.focused && e.preventDefault()
597
600
  }
598
601
  ),
599
- ht(le),
600
- !Qe && kt()
601
- ), Qe && xt());
602
- return Le ? /* @__PURE__ */ i.createElement(
602
+ ht(de),
603
+ !Fe && kt()
604
+ ), Fe && Dt());
605
+ return Pe ? /* @__PURE__ */ i.createElement(
603
606
  en,
604
607
  {
605
- label: Le,
606
- editorValue: Me,
607
- editorValid: Je,
608
+ label: Pe,
609
+ editorValue: Ne,
610
+ editorValid: Ze,
608
611
  editorDisabled: r.disabled,
609
- style: { width: ae ? ae.width : void 0 },
610
- children: Ze
612
+ style: { width: le ? le.width : void 0 },
613
+ children: et
611
614
  }
612
- ) : Ze;
615
+ ) : et;
613
616
  });
614
- Ne.propTypes = {
617
+ Te.propTypes = {
615
618
  delay: k.number,
616
619
  ignoreCase: k.bool,
617
620
  iconClassName: k.string,
@@ -631,7 +634,7 @@ Ne.propTypes = {
631
634
  list: k.any,
632
635
  skipDisabledItems: k.bool
633
636
  };
634
- const A = {
637
+ const z = {
635
638
  delay: 500,
636
639
  tabIndex: 0,
637
640
  ignoreCase: !0,
@@ -642,11 +645,11 @@ const A = {
642
645
  fillMode: "solid",
643
646
  groupMode: "modern"
644
647
  };
645
- Ne.displayName = "KendoReactDropDownList";
648
+ Te.displayName = "KendoReactDropDownList";
646
649
  const hn = Rt();
647
- Ne.displayName = "KendoReactDropDownList";
650
+ Te.displayName = "KendoReactDropDownList";
648
651
  export {
649
- Ne as DropDownList,
652
+ Te as DropDownList,
650
653
  hn as DropDownListPropsContext,
651
- A as dropDownListDefaultProps
654
+ z as dropDownListDefaultProps
652
655
  };