@progress/kendo-react-dropdowns 10.2.0-develop.10 → 10.2.0-develop.12

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