@progress/kendo-react-dropdowns 9.1.1-develop.4 → 9.2.0-develop.2

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,7 +8,7 @@
8
8
  "use client";
9
9
  import * as f from "react";
10
10
  import m from "prop-types";
11
- import { Keys as u, classNames as y, IconWrap as R, validatePackage as X, canUseDOM as L, createPropsContext as Z, withIdHOC as tt, withPropsContext as et, kendoThemeMaps as st } from "@progress/kendo-react-common";
11
+ import { Keys as u, classNames as b, IconWrap as R, validatePackage as X, canUseDOM as L, createPropsContext as Z, withIdHOC as tt, withPropsContext as et, kendoThemeMaps as st } from "@progress/kendo-react-common";
12
12
  import { plusIcon as it } from "@progress/kendo-svg-icons";
13
13
  import { FloatingLabel as ot } from "@progress/kendo-react-labels";
14
14
  import at from "../common/ListContainer.mjs";
@@ -25,10 +25,10 @@ import { AdaptiveMode as ft } from "../common/AdaptiveMode.mjs";
25
25
  import { ActionSheetContent as gt } from "@progress/kendo-react-layout";
26
26
  import { MOBILE_MEDIUM_DEVISE as mt } from "../common/constants.mjs";
27
27
  import { provideLocalizationService as vt } from "@progress/kendo-react-intl";
28
- import { adaptiveModeFooterCancel as z, messages as V, adaptiveModeFooterApply as H } from "../messages/index.mjs";
28
+ import { adaptiveModeFooterCancel as z, messages as V, adaptiveModeFooterApply as A } from "../messages/index.mjs";
29
29
  import It from "../common/ListFilter.mjs";
30
- import A from "../common/withCustomComponent.mjs";
31
- const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $ = (T) => T.preventDefault(), q = (T) => T === 2, b = class b extends f.Component {
30
+ import H from "../common/withCustomComponent.mjs";
31
+ const { sizeMap: D, roundedMap: bt } = st, yt = "Please enter a valid value!", $ = (T) => T.preventDefault(), q = (T) => T === 2, y = class y extends f.Component {
32
32
  constructor(n) {
33
33
  super(n), this.state = {
34
34
  activedescendant: k.PopupList,
@@ -46,8 +46,8 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
46
46
  const s = this.value;
47
47
  w(s, e, this.props.dataItemKey), this.triggerOnChange(s, o), this.applyState(o);
48
48
  }, this.itemFocus = (e, t) => {
49
- const { allowCustom: o, virtual: s } = this.props, a = I(this.props), p = s ? s.skip : 0, c = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedIndex: r } = this.getFocusedState(), i = o && c, d = a[e - p];
50
- d && r !== e ? this.state.focusedIndex !== e && (t.data.focusedIndex = e, t.data.activedescendant = k.PopupList) : i && e === -1 && this.state.focusedIndex !== void 0 && (t.data.focusedIndex = void 0), this.base.triggerPageChangeCornerItems(d, t);
49
+ const { allowCustom: o, virtual: s } = this.props, a = I(this.props), p = s ? s.skip : 0, c = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedIndex: r } = this.getFocusedState(), i = o && c, l = a[e - p];
50
+ l && r !== e ? this.state.focusedIndex !== e && (t.data.focusedIndex = e, t.data.activedescendant = k.PopupList) : i && e === -1 && this.state.focusedIndex !== void 0 && (t.data.focusedIndex = void 0), this.base.triggerPageChangeCornerItems(l, t);
51
51
  }, this.componentRef = (e) => {
52
52
  this._element = e, this.base.wrapper = e;
53
53
  }, this.searchbarRef = (e) => {
@@ -62,11 +62,11 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
62
62
  const o = this.props.filter !== void 0 ? this.props.filter : this.state.text;
63
63
  M(o) && o !== "" && this.base.filterChanged("", t), this.state.text && (t.data.text = ""), this._lastSelectedOrDeslectedItemIndex = null, this.applyState(t);
64
64
  }, this.onInputKeyDown = (e) => {
65
- const { textField: t, groupField: o } = this.props, s = I(this.props), a = e.keyCode, p = this.props.filter !== void 0 ? this.props.filter : this.state.text, c = this.props.opened !== void 0 ? this.props.opened : this.state.opened, { focusedItem: r, focusedIndex: i } = this.getFocusedState(), d = this.base.initState();
66
- if (d.syntheticEvent = e, !p && this.value.length > 0 && (a === u.left || a === u.right || a === u.home || a === u.end || a === u.delete || a === u.backspace) && !e.shiftKey)
67
- return this.onTagsNavigate(e, d);
65
+ const { textField: t, groupField: o } = this.props, s = I(this.props), a = e.keyCode, p = this.props.filter !== void 0 ? this.props.filter : this.state.text, c = this.props.opened !== void 0 ? this.props.opened : this.state.opened, { focusedItem: r, focusedIndex: i } = this.getFocusedState(), l = this.base.initState();
66
+ if (l.syntheticEvent = e, !p && this.value.length > 0 && (a === u.left || a === u.right || a === u.home || a === u.end || a === u.delete || a === u.backspace) && !e.shiftKey)
67
+ return this.onTagsNavigate(e, l);
68
68
  const g = () => {
69
- e.preventDefault(), this.base.togglePopup(d), this.applyState(d);
69
+ e.preventDefault(), this.base.togglePopup(l), this.applyState(l);
70
70
  };
71
71
  if (this.opened)
72
72
  if (a === u.pageUp)
@@ -75,77 +75,77 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
75
75
  e.preventDefault(), this.base.scrollPopupByPageSize(1);
76
76
  else if ((e.ctrlKey || e.metaKey) && e.code === "KeyA") {
77
77
  const h = (this.state.value && this.state.value.length) === s.length ? [] : s;
78
- this.updateStateOnKeyboardNavigation(h, d);
78
+ this.updateStateOnKeyboardNavigation(h, l);
79
79
  } else if ((e.ctrlKey || e.metaKey) && e.shiftKey && e.keyCode === u.end) {
80
- const l = s.slice(this.getFocusedState().focusedIndex);
81
- this.itemFocus(s.length - 1, d), this.updateStateOnKeyboardNavigation(l, d);
80
+ const d = s.slice(this.getFocusedState().focusedIndex);
81
+ this.itemFocus(s.length - 1, l), this.updateStateOnKeyboardNavigation(d, l);
82
82
  } else if ((e.ctrlKey || e.metaKey) && e.shiftKey && e.keyCode === u.home) {
83
- const l = s.slice(0, this.getFocusedState().focusedIndex + 1);
84
- this.itemFocus(0, d), this.updateStateOnKeyboardNavigation(l, d);
83
+ const d = s.slice(0, this.getFocusedState().focusedIndex + 1);
84
+ this.itemFocus(0, l), this.updateStateOnKeyboardNavigation(d, l);
85
85
  } else if (e.shiftKey && e.keyCode === u.up) {
86
- let l;
86
+ let d;
87
87
  const h = this.getLastSelectedOrDeselectedIndex(1, i);
88
- h === null ? l = i !== 0 ? s.slice(i - 1, i) : [s[i]] : h === i ? l = [s[h - 1]] : i >= 0 && (l = h > i ? s.slice(i - 1, h) : s.slice(h - 1, i)), l && l.length > 0 && (i >= 1 && this.itemFocus(i - 1, d), this.updateStateOnKeyboardNavigation(l, d));
88
+ h === null ? d = i !== 0 ? s.slice(i - 1, i) : [s[i]] : h === i ? d = [s[h - 1]] : i >= 0 && (d = h > i ? s.slice(i - 1, h) : s.slice(h - 1, i)), d && d.length > 0 && (i >= 1 && this.itemFocus(i - 1, l), this.updateStateOnKeyboardNavigation(d, l));
89
89
  } else if (e.shiftKey && e.keyCode === u.down) {
90
- let l;
90
+ let d;
91
91
  const h = this.getLastSelectedOrDeselectedIndex(0, i);
92
- h === null ? l = i !== s.length - 1 ? s.slice(i, i + 1) : [s[i]] : h === i ? l = s.slice(i, i + 2) : i >= 0 && (l = h > i ? s.slice(i + 1, h + 1) : s.slice(h, i + 2)), l && l.length >= 1 && (this.itemFocus(i + 1, d), this.updateStateOnKeyboardNavigation(l, d));
92
+ h === null ? d = i !== s.length - 1 ? s.slice(i, i + 1) : [s[i]] : h === i ? d = s.slice(i, i + 2) : i >= 0 && (d = h > i ? s.slice(i + 1, h + 1) : s.slice(h, i + 2)), d && d.length >= 1 && (this.itemFocus(i + 1, l), this.updateStateOnKeyboardNavigation(d, l));
93
93
  } else if (e.altKey && a === u.up)
94
94
  g();
95
95
  else if (a === u.up || a === u.down) {
96
96
  if (o !== "" && t)
97
97
  if (!this.props.skipDisabledItems && c)
98
- this.onNavigate(d, a);
98
+ this.onNavigate(l, a);
99
99
  else {
100
- let l = 0;
100
+ let d = 0;
101
101
  if (a === u.down || a === u.right) {
102
102
  const h = s.slice(i + 1).find((v) => !v.disabled && v[t]);
103
- l = h && s.findIndex((v) => v[t] === h[t]);
103
+ d = h && s.findIndex((v) => v[t] === h[t]);
104
104
  } else if (a === u.up || a === u.left) {
105
105
  let h;
106
106
  if (i === -1)
107
- h = s, l = s.findIndex((v) => !v.disabled && v[t]);
107
+ h = s, d = s.findIndex((v) => !v.disabled && v[t]);
108
108
  else {
109
109
  h = s.slice(0, i);
110
110
  let v = h.pop();
111
111
  for (; v && v.disabled; )
112
112
  v = h.pop();
113
- l = v && s.findIndex((S) => S[t] === v[t]);
113
+ d = v && s.findIndex((x) => x[t] === v[t]);
114
114
  }
115
115
  }
116
- if (l) {
117
- const h = l - i;
118
- this.onNavigate(d, a, h);
116
+ if (d) {
117
+ const h = d - i;
118
+ this.onNavigate(l, a, h);
119
119
  } else
120
- l !== void 0 && this.onNavigate(d, a);
120
+ d !== void 0 && this.onNavigate(l, a);
121
121
  }
122
122
  else if (!this.props.skipDisabledItems && c)
123
- this.onNavigate(d, a);
123
+ this.onNavigate(l, a);
124
124
  else {
125
- let l = null;
125
+ let d = null;
126
126
  if (a === u.down || a === u.right)
127
- l = s.slice(i + 1).find((h) => !h.disabled);
127
+ d = s.slice(i + 1).find((h) => !h.disabled);
128
128
  else if (a === u.up || a === u.left) {
129
129
  const h = s.slice(0, i);
130
- for (l = h.pop(); l && l.disabled; )
131
- l = h.pop();
130
+ for (d = h.pop(); d && d.disabled; )
131
+ d = h.pop();
132
132
  }
133
- if (l) {
134
- const h = l.id - i - 1;
135
- this.onNavigate(d, a, h);
133
+ if (d) {
134
+ const h = d.id - i - 1;
135
+ this.onNavigate(l, a, h);
136
136
  } else
137
- this.onNavigate(d, a);
137
+ this.onNavigate(l, a);
138
138
  }
139
- this.applyState(d), e.preventDefault();
139
+ this.applyState(l), e.preventDefault();
140
140
  } else
141
141
  a === u.enter ? (e.preventDefault(), this.props.allowCustom && p && r === null ? this.customItemSelect(e) : r && r.disabled ? g() : this.selectFocusedItem(e)) : a === u.esc && g();
142
142
  else
143
143
  e.altKey && a === u.down ? g() : a === u.esc && this.clearButtonClick(e);
144
144
  }, this.listContainerContent = () => {
145
- const { header: e, footer: t, allowCustom: o, size: s, groupStickyHeaderItemRender: a, groupField: p, list: c } = this.props, r = I(this.props), i = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedType: d } = this.getFocusedState(), g = o && i && /* @__PURE__ */ f.createElement(
145
+ const { header: e, footer: t, allowCustom: o, size: s, groupStickyHeaderItemRender: a, groupField: p, list: c } = this.props, r = I(this.props), i = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedType: l } = this.getFocusedState(), g = o && i && /* @__PURE__ */ f.createElement(
146
146
  "div",
147
147
  {
148
- className: y("k-list", {
148
+ className: b("k-list", {
149
149
  [`k-list-${D[s] || s}`]: s
150
150
  }),
151
151
  key: "customitem",
@@ -155,23 +155,23 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
155
155
  /* @__PURE__ */ f.createElement(
156
156
  "div",
157
157
  {
158
- className: y("k-list-item k-custom-item", { "k-focus": q(d) }),
158
+ className: b("k-list-item k-custom-item", { "k-focus": q(l) }),
159
159
  style: { fontStyle: "italic" }
160
160
  },
161
161
  i,
162
162
  /* @__PURE__ */ f.createElement(R, { name: "plus", icon: it, style: { position: "absolute", right: "0.5em" } })
163
163
  )
164
164
  );
165
- let { group: l } = this.state;
166
- return l === void 0 && p !== void 0 && (l = O(r[0], p)), /* @__PURE__ */ f.createElement(f.Fragment, null, e && /* @__PURE__ */ f.createElement("div", { className: "k-list-header" }, e), g, /* @__PURE__ */ f.createElement(
165
+ let { group: d } = this.state;
166
+ return d === void 0 && p !== void 0 && (d = O(r[0], p)), /* @__PURE__ */ f.createElement(f.Fragment, null, e && /* @__PURE__ */ f.createElement("div", { className: "k-list-header" }, e), g, /* @__PURE__ */ f.createElement(
167
167
  "div",
168
168
  {
169
- className: y("k-list", {
169
+ className: b("k-list", {
170
170
  [`k-list-${this.mobileMode ? "lg" : D[s] || s}`]: s,
171
171
  "k-virtual-list": this.base.vs.enabled
172
172
  })
173
173
  },
174
- !c && l && r.length !== 0 && /* @__PURE__ */ f.createElement(lt, { group: l, groupMode: "modern", render: a }),
174
+ !c && d && r.length !== 0 && /* @__PURE__ */ f.createElement(lt, { group: d, groupMode: "modern", render: a }),
175
175
  this.renderList()
176
176
  ), t && /* @__PURE__ */ f.createElement("div", { className: "k-list-footer" }, t));
177
177
  }, this.renderListContainer = () => {
@@ -180,7 +180,7 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
180
180
  width: a,
181
181
  popupSettings: {
182
182
  ...s,
183
- popupClass: y(s.popupClass, "k-list-container", "k-multiselect-popup"),
183
+ popupClass: b(s.popupClass, "k-list-container", "k-multiselect-popup"),
184
184
  anchor: s.anchor || this.element,
185
185
  show: this.opened,
186
186
  onOpen: this.onPopupOpened,
@@ -216,8 +216,8 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
216
216
  ),
217
217
  onCancel: this.onCancel,
218
218
  applyText: this.localization.toLanguageString(
219
- H,
220
- V[H]
219
+ A,
220
+ V[A]
221
221
  ),
222
222
  onApply: this.closePopup
223
223
  }
@@ -241,7 +241,7 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
241
241
  groupHeaderItemRender: s,
242
242
  dataItemKey: a,
243
243
  virtual: p = { skip: 0, total: void 0 }
244
- } = this.props, c = I(this.props), r = this.base.vs, { focusedIndex: i } = this.getFocusedState(), d = this.base.getPopupSettings(), g = `translateY(${r.translate}px)`;
244
+ } = this.props, c = I(this.props), r = this.base.vs, { focusedIndex: i } = this.getFocusedState(), l = this.base.getPopupSettings(), g = `translateY(${r.translate}px)`;
245
245
  return /* @__PURE__ */ f.createElement(
246
246
  nt,
247
247
  {
@@ -255,10 +255,10 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
255
255
  optionsGuid: this.base.guid,
256
256
  groupField: this.props.groupField,
257
257
  groupMode: "modern",
258
- listRef: (l) => {
259
- r.list = this.base.list = l;
258
+ listRef: (d) => {
259
+ r.list = this.base.list = d;
260
260
  },
261
- wrapperStyle: this.mobileMode ? {} : { maxHeight: d.height },
261
+ wrapperStyle: this.mobileMode ? {} : { maxHeight: l.height },
262
262
  wrapperCssClass: "k-list-content",
263
263
  listStyle: r.enabled ? { transform: g } : void 0,
264
264
  key: "listKey",
@@ -284,8 +284,8 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
284
284
  const p = this.itemHeight = this.itemHeight || (t.enabled ? t.itemHeight : o ? o.children[0].offsetHeight : 0), r = e.target.scrollTop - t.skip * p;
285
285
  a = this.base.getGroupedDataModernMode(a, s);
286
286
  let i = a[0][s];
287
- for (let d = 1; d < a.length && !(p * d > r); d++)
288
- a[d] && a[d][s] && (i = a[d][s]);
287
+ for (let l = 1; l < a.length && !(p * l > r); l++)
288
+ a[l] && a[l][s] && (i = a[l][s]);
289
289
  i !== this.state.group && this.setState({
290
290
  group: i
291
291
  });
@@ -323,7 +323,7 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
323
323
  }, 0);
324
324
  }, this.setValidity = () => {
325
325
  this._input && this._input.setCustomValidity && this._input.setCustomValidity(
326
- this.validity.valid ? "" : this.props.validationMessage || bt
326
+ this.validity.valid ? "" : this.props.validationMessage || yt
327
327
  );
328
328
  }, X(ct);
329
329
  }
@@ -381,20 +381,20 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
381
381
  }
382
382
  /** @hidden */
383
383
  get required() {
384
- return this.props.required !== void 0 ? this.props.required : b.defaultProps.required;
384
+ return this.props.required !== void 0 ? this.props.required : y.defaultProps.required;
385
385
  }
386
386
  get validityStyles() {
387
- return this.props.validityStyles !== void 0 ? this.props.validityStyles : b.defaultProps.validityStyles;
387
+ return this.props.validityStyles !== void 0 ? this.props.validityStyles : y.defaultProps.validityStyles;
388
388
  }
389
389
  /** @hidden */
390
390
  componentDidUpdate(n, e) {
391
391
  var g;
392
- const { virtual: t, groupField: o = "" } = this.props, s = I(this.props), a = t ? t.skip : 0, p = n.virtual ? n.virtual.total : 0, c = n.opened !== void 0 ? n.opened : e.opened, r = !c && this.opened, i = c && !this.opened, d = this.base.getPopupSettings();
393
- if (this.base.didUpdate(), !d.animate && i && this.onPopupClosed(), t && t.total !== p)
392
+ const { virtual: t, groupField: o = "" } = this.props, s = I(this.props), a = t ? t.skip : 0, p = n.virtual ? n.virtual.total : 0, c = n.opened !== void 0 ? n.opened : e.opened, r = !c && this.opened, i = c && !this.opened, l = this.base.getPopupSettings();
393
+ if (this.base.didUpdate(), !l.animate && i && this.onPopupClosed(), t && t.total !== p)
394
394
  this.base.vs.calcScrollElementHeight(), this.base.vs.reset();
395
395
  else {
396
- let { focusedItem: l, focusedIndex: h } = this.getFocusedState();
397
- o !== "" && (h = (g = this.base.getGroupedDataModernMode(s, o)) == null ? void 0 : g.indexOf(l)), r && t ? this.base.scrollToVirtualItem(t, h - a) : r && !t ? (s && s.length !== 0 && this.base.resetGroupStickyHeader(s[0][o], this), this.base.scrollToItem(h)) : this.opened && c && l && this.scrollToFocused && this.base.scrollToItem(h - a);
396
+ let { focusedItem: d, focusedIndex: h } = this.getFocusedState();
397
+ o !== "" && (h = (g = this.base.getGroupedDataModernMode(s, o)) == null ? void 0 : g.indexOf(d)), r && t ? this.base.scrollToVirtualItem(t, h - a) : r && !t ? (s && s.length !== 0 && this.base.resetGroupStickyHeader(s[0][o], this), this.base.scrollToItem(h)) : this.opened && c && d && this.scrollToFocused && this.base.scrollToItem(h - a);
398
398
  }
399
399
  this.scrollToFocused = !1, this.setValidity();
400
400
  }
@@ -410,18 +410,18 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
410
410
  }
411
411
  /** @hidden */
412
412
  onNavigate(n, e, t) {
413
- const { allowCustom: o } = this.props, s = I(this.props), a = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedType: p, focusedIndex: c } = this.getFocusedState(), r = o && a, i = q(p), d = this.base, g = d.vs;
413
+ const { allowCustom: o } = this.props, s = I(this.props), a = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedType: p, focusedIndex: c } = this.getFocusedState(), r = o && a, i = q(p), l = this.base, g = l.vs;
414
414
  if (this.opened && e === u.up && i)
415
415
  this.state.focusedIndex !== void 0 && (n.data.focusedIndex = void 0);
416
416
  else {
417
- const l = d.navigation.navigate({
417
+ const d = l.navigation.navigate({
418
418
  keyCode: e,
419
419
  current: c,
420
420
  max: (g.enabled ? g.total : s.length) - 1,
421
421
  min: r ? -1 : 0,
422
422
  skipItems: t || void 0
423
423
  });
424
- l !== void 0 && (this.itemFocus(l, n), this.scrollToFocused = !0);
424
+ d !== void 0 && (this.itemFocus(d, n), this.scrollToFocused = !0);
425
425
  }
426
426
  this.applyState(n);
427
427
  }
@@ -438,21 +438,21 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
438
438
  virtual: c,
439
439
  size: r,
440
440
  rounded: i,
441
- fillMode: d,
441
+ fillMode: l,
442
442
  loading: g,
443
- filter: l
444
- } = this.props, { text: h, focused: v, focusedTag: S, currentValue: W } = this.state, C = this.base.vs, _ = this.props.id || this._inputId;
443
+ filter: d
444
+ } = this.props, { text: h, focused: v, focusedTag: x, currentValue: W } = this.state, C = this.base.vs, _ = this.props.id || this._inputId;
445
445
  C.enabled = c !== void 0, c !== void 0 && (C.skip = c.skip, C.total = c.total, C.pageSize = c.pageSize);
446
- const x = this.mobileMode && this.opened ? W : this.tagsToRender;
446
+ const S = this.mobileMode && this.opened ? W : this.tagsToRender;
447
447
  this.setItems(this.tagsToRender, this._tags);
448
- const K = !this.validityStyles || this.validity.valid, G = !!(l !== void 0 ? l : h) || x && x.length > 0, [U, Y] = A(this.props.prefix || f.Fragment), [j, J] = A(this.props.suffix || f.Fragment), N = /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(
448
+ const K = !this.validityStyles || this.validity.valid, G = !!(d !== void 0 ? d : h) || S && S.length > 0, [U, j] = H(this.props.prefix || f.Fragment), [Y, J] = H(this.props.suffix || f.Fragment), N = /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(
449
449
  "div",
450
450
  {
451
451
  ref: this.componentRef,
452
- className: y("k-multiselect k-input", e, {
452
+ className: b("k-multiselect k-input", e, {
453
453
  [`k-input-${D[r] || r}`]: r,
454
- [`k-rounded-${yt[i] || i}`]: i,
455
- [`k-input-${d}`]: d,
454
+ [`k-rounded-${bt[i] || i}`]: i,
455
+ [`k-input-${l}`]: l,
456
456
  "k-focus": v && !s,
457
457
  "k-invalid": !K,
458
458
  "k-disabled": s,
@@ -466,28 +466,28 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
466
466
  onClick: this.handleWrapperClick,
467
467
  onMouseDown: ht
468
468
  },
469
- this.props.prefix && /* @__PURE__ */ f.createElement(U, { ...Y }),
470
- /* @__PURE__ */ f.createElement("div", { className: y("k-input-values") }, /* @__PURE__ */ f.createElement(
469
+ this.props.prefix && /* @__PURE__ */ f.createElement(U, { ...j }),
470
+ /* @__PURE__ */ f.createElement("div", { className: b("k-input-values") }, /* @__PURE__ */ f.createElement(
471
471
  "div",
472
472
  {
473
- className: y("k-chip-list", { [`k-chip-list-${D[r] || r}`]: r }),
473
+ className: b("k-chip-list", { [`k-chip-list-${D[r] || r}`]: r }),
474
474
  role: "listbox",
475
475
  id: "tagslist-" + this.base.guid
476
476
  },
477
- x && x.length > 0 && /* @__PURE__ */ f.createElement(
477
+ S && S.length > 0 && /* @__PURE__ */ f.createElement(
478
478
  dt,
479
479
  {
480
480
  tagRender: this.props.tagRender,
481
481
  onTagDelete: this.onTagDelete,
482
- data: x,
482
+ data: S,
483
483
  guid: this.base.guid,
484
- focused: S ? x.find((Q) => B(Q, S, p)) : void 0,
484
+ focused: x ? S.find((Q) => B(Q, x, p)) : void 0,
485
485
  size: r
486
486
  }
487
487
  )
488
488
  ), this.renderSearchBar(_)),
489
489
  g && /* @__PURE__ */ f.createElement(R, { className: "k-input-loading-icon", name: "loading" }),
490
- this.props.suffix && /* @__PURE__ */ f.createElement(j, { ...J }),
490
+ this.props.suffix && /* @__PURE__ */ f.createElement(Y, { ...J }),
491
491
  G && /* @__PURE__ */ f.createElement(ut, { onClick: this.clearButtonClick }),
492
492
  !this.mobileMode && this.renderListContainer()
493
493
  ), this.mobileMode && this.renderAdaptiveListContainer());
@@ -505,7 +505,7 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
505
505
  ) : N;
506
506
  }
507
507
  renderSearchBar(n) {
508
- const { activedescendant: e, focusedTag: t, currentValue: o } = this.state, { disabled: s, placeholder: a, ariaDescribedBy: p, ariaLabelledBy: c, ariaLabel: r } = this.props, i = !this.mobileMode && (this.props.filter !== void 0 ? this.props.filter : this.state.text) || "", { focusedIndex: d } = this.getFocusedState(), g = this.value.length === 0 && !i ? a : void 0, l = o && o.length > 0 ? void 0 : a, h = e === k.TagsList && t !== void 0 ? `tag-${this.base.guid}-${t.text.replace(/\s+/g, "-")}` : `option-${this.base.guid}-${d}`, v = {
508
+ const { activedescendant: e, focusedTag: t, currentValue: o } = this.state, { disabled: s, placeholder: a, ariaDescribedBy: p, ariaLabelledBy: c, ariaLabel: r, inputAttributes: i } = this.props, l = !this.mobileMode && (this.props.filter !== void 0 ? this.props.filter : this.state.text) || "", { focusedIndex: g } = this.getFocusedState(), d = this.value.length === 0 && !l ? a : void 0, h = o && o.length > 0 ? void 0 : a, v = e === k.TagsList && t !== void 0 ? `tag-${this.base.guid}-${t.text.replace(/\s+/g, "-")}` : `option-${this.base.guid}-${g}`, x = {
509
509
  accessKey: this.props.accessKey,
510
510
  tabIndex: this.props.tabIndex
511
511
  };
@@ -513,9 +513,9 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
513
513
  rt,
514
514
  {
515
515
  id: n,
516
- size: Math.max((g || "").length, i.length, 1),
517
- placeholder: this.mobileMode && this.opened ? l : g,
518
- value: i,
516
+ size: Math.max((d || "").length, l.length, 1),
517
+ placeholder: this.mobileMode && this.opened ? h : d,
518
+ value: l,
519
519
  onChange: this.onChangeHandler,
520
520
  onKeyDown: this.onInputKeyDown,
521
521
  ref: this.searchbarRef,
@@ -523,12 +523,13 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
523
523
  expanded: this.opened,
524
524
  owns: this.base.listBoxId,
525
525
  role: "combobox",
526
- activedescendant: h,
526
+ activedescendant: v,
527
527
  ariaDescribedBy: `tagslist-${this.base.guid}${p ? " " + p : ""}`,
528
528
  ariaLabelledBy: c,
529
529
  ariaRequired: this.required,
530
530
  ariaLabel: r,
531
- ...v
531
+ inputAttributes: i,
532
+ ...x
532
533
  }
533
534
  );
534
535
  }
@@ -554,8 +555,8 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
554
555
  if (r)
555
556
  w(i, s[p].data, a), this.triggerOnChange(i, e);
556
557
  else if (!r && s.length) {
557
- const d = s.pop();
558
- w(i, d.data, a), this.triggerOnChange(i, e);
558
+ const l = s.pop();
559
+ w(i, l.data, a), this.triggerOnChange(i, e);
559
560
  }
560
561
  }
561
562
  c !== o && (e.data.focusedTag = c, e.data.activedescendant = k.TagsList), this.applyState(e);
@@ -579,7 +580,7 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
579
580
  focusedItemIndex: p = pt,
580
581
  skipDisabledItems: c
581
582
  } = this.props, r = I(this.props), i = s && s.skip || 0;
582
- let d;
583
+ let l;
583
584
  if (n !== void 0)
584
585
  return {
585
586
  focusedIndex: n,
@@ -596,25 +597,25 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
596
597
  /* CustomItem */
597
598
  };
598
599
  if (e)
599
- return d = p(r, e, a), {
600
- focusedItem: r[d],
601
- focusedIndex: d + i,
600
+ return l = p(r, e, a), {
601
+ focusedItem: r[l],
602
+ focusedIndex: l + i,
602
603
  focusedType: 1
603
604
  /* ListItem */
604
605
  };
605
606
  if (g.length) {
606
- const l = g[g.length - 1];
607
- return d = r.findIndex((h) => E(h, l, o)), r[d] !== void 0 ? {
608
- focusedIndex: d + i,
609
- focusedItem: r[d],
607
+ const d = g[g.length - 1];
608
+ return l = r.findIndex((h) => E(h, d, o)), r[l] !== void 0 ? {
609
+ focusedIndex: l + i,
610
+ focusedItem: r[l],
610
611
  focusedType: 1
611
612
  /* ListItem */
612
613
  } : { focusedType: 0, focusedIndex: -1 };
613
614
  } else if (c && a && !e && i === 0) {
614
- const l = r.findIndex((h) => !h.disabled && h[a]);
615
+ const d = r.findIndex((h) => !h.disabled && h[a]);
615
616
  return {
616
- focusedIndex: l,
617
- focusedItem: r[l - i],
617
+ focusedIndex: d,
618
+ focusedItem: r[d - i],
618
619
  focusedType: 1
619
620
  /* ListItem */
620
621
  };
@@ -655,7 +656,7 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
655
656
  return this._lastSelectedOrDeslectedItemIndex === null && (this._lastSelectedOrDeslectedItemIndex = e), this._lastSelectedOrDeslectedItemIndex !== null ? this._lastSelectedOrDeslectedItemIndex + n : null;
656
657
  }
657
658
  };
658
- b.displayName = "MultiSelect", b.propTypes = {
659
+ y.displayName = "MultiSelect", y.propTypes = {
659
660
  ...F.propTypes,
660
661
  autoClose: m.bool,
661
662
  value: m.arrayOf(m.any),
@@ -677,8 +678,9 @@ b.displayName = "MultiSelect", b.propTypes = {
677
678
  adaptive: m.bool,
678
679
  adaptiveTitle: m.string,
679
680
  onCancel: m.func,
680
- skipDisabledItems: m.bool
681
- }, b.defaultProps = {
681
+ skipDisabledItems: m.bool,
682
+ inputAttributes: m.object
683
+ }, y.defaultProps = {
682
684
  ...F.defaultProps,
683
685
  autoClose: !0,
684
686
  required: !1,
@@ -690,7 +692,7 @@ b.displayName = "MultiSelect", b.propTypes = {
690
692
  prefix: void 0,
691
693
  suffix: void 0
692
694
  };
693
- let P = b;
695
+ let P = y;
694
696
  const xt = Z(), St = tt(
695
697
  et(
696
698
  xt,
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";const d=require("@progress/kendo-react-common"),b=require("react");function g(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>r[e]})}}return t.default=r,Object.freeze(t)}const u=g(b);class m extends u.Component{constructor(){super(...arguments),this._input=null}get input(){return this._input}componentDidUpdate(t){const e=t.value,s=t.suggestedText,{value:n,suggestedText:o,focused:c}=this.props,a=this.input,i=e!==n||o!==s,l=i&&e.startsWith(n)&&!(s&&o&&s.endsWith(o)),p=d.getActiveElement(document);c&&a&&p!==a&&a.focus(),o&&i&&!l&&a&&a.setSelectionRange(n.length-o.length,n.length)}render(){const{expanded:t=!1,disabled:e,role:s="listbox",render:n,tabIndex:o,accessKey:c,unstyled:a}=this.props,i=a&&a.uDropDownsBase,l={tabIndex:o,accessKey:c},p=u.createElement("input",{autoComplete:"off",id:this.props.id,type:"text",key:"searchbar",size:this.props.size,placeholder:this.props.placeholder,className:d.classNames(d.uDropDownsBase.inputInner({c:i})),role:s,name:this.props.name,value:this.props.value,onChange:this.props.onChange,ref:h=>this._input=h,onKeyDown:this.props.onKeyDown,onFocus:this.props.onFocus,onBlur:this.props.onBlur,onClick:this.props.onClick,"aria-disabled":e||void 0,disabled:e||void 0,readOnly:this.props.readOnly||void 0,title:this.props.title,"aria-haspopup":"listbox","aria-expanded":t,"aria-owns":this.props.owns,"aria-activedescendant":t?this.props.activedescendant:void 0,"aria-describedby":this.props.ariaDescribedBy,"aria-labelledby":this.props.ariaLabelledBy,"aria-label":this.props.ariaLabel,"aria-required":this.props.ariaRequired,"aria-controls":this.props.ariaControls,...l});return n?n.call(void 0,p):p}}module.exports=m;
8
+ "use client";"use strict";const d=require("@progress/kendo-react-common"),g=require("react");function m(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const e in o)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>o[e]})}}return t.default=o,Object.freeze(t)}const h=m(g);class f extends h.Component{constructor(){super(...arguments),this._input=null}get input(){return this._input}componentDidUpdate(t){const e=t.value,s=t.suggestedText,{value:n,suggestedText:r,focused:p}=this.props,a=this.input,i=e!==n||r!==s,c=i&&e.startsWith(n)&&!(s&&r&&s.endsWith(r)),l=d.getActiveElement(document);p&&a&&l!==a&&a.focus(),r&&i&&!c&&a&&a.setSelectionRange(n.length-r.length,n.length)}render(){const{expanded:t=!1,disabled:e,role:s="listbox",render:n,tabIndex:r,accessKey:p,unstyled:a,inputAttributes:i}=this.props,c=a&&a.uDropDownsBase,l={tabIndex:r,accessKey:p},u=h.createElement("input",{autoComplete:"off",id:this.props.id,type:"text",key:"searchbar",size:this.props.size,placeholder:this.props.placeholder,className:d.classNames(d.uDropDownsBase.inputInner({c})),role:s,name:this.props.name,value:this.props.value,onChange:this.props.onChange,ref:b=>this._input=b,onKeyDown:this.props.onKeyDown,onFocus:this.props.onFocus,onBlur:this.props.onBlur,onClick:this.props.onClick,"aria-disabled":e||void 0,disabled:e||void 0,readOnly:this.props.readOnly||void 0,title:this.props.title,"aria-haspopup":"listbox","aria-expanded":t,"aria-owns":this.props.owns,"aria-activedescendant":t?this.props.activedescendant:void 0,"aria-describedby":this.props.ariaDescribedBy,"aria-labelledby":this.props.ariaLabelledBy,"aria-label":this.props.ariaLabel,"aria-required":this.props.ariaRequired,"aria-controls":this.props.ariaControls,...Object.assign({},l,i)});return n?n.call(void 0,u):u}}module.exports=f;
@@ -6,9 +6,9 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import { getActiveElement as h, classNames as u, uDropDownsBase as g } from "@progress/kendo-react-common";
10
- import * as d from "react";
11
- class v extends d.Component {
9
+ import { getActiveElement as h, classNames as b, uDropDownsBase as g } from "@progress/kendo-react-common";
10
+ import * as c from "react";
11
+ class y extends c.Component {
12
12
  constructor() {
13
13
  super(...arguments), this._input = null;
14
14
  }
@@ -19,14 +19,23 @@ class v extends d.Component {
19
19
  return this._input;
20
20
  }
21
21
  componentDidUpdate(a) {
22
- const i = a.value, o = a.suggestedText, { value: s, suggestedText: t, focused: p } = this.props, e = this.input, r = i !== s || t !== o, l = r && i.startsWith(s) && !(o && t && o.endsWith(t)), n = h(document);
23
- p && e && n !== e && e.focus(), t && r && !l && e && e.setSelectionRange(s.length - t.length, s.length);
22
+ const i = a.value, o = a.suggestedText, { value: s, suggestedText: t, focused: n } = this.props, e = this.input, r = i !== s || t !== o, p = r && i.startsWith(s) && !(o && t && o.endsWith(t)), l = h(document);
23
+ n && e && l !== e && e.focus(), t && r && !p && e && e.setSelectionRange(s.length - t.length, s.length);
24
24
  }
25
25
  render() {
26
- const { expanded: a = !1, disabled: i, role: o = "listbox", render: s, tabIndex: t, accessKey: p, unstyled: e } = this.props, r = e && e.uDropDownsBase, l = {
26
+ const {
27
+ expanded: a = !1,
28
+ disabled: i,
29
+ role: o = "listbox",
30
+ render: s,
27
31
  tabIndex: t,
28
- accessKey: p
29
- }, n = /* @__PURE__ */ d.createElement(
32
+ accessKey: n,
33
+ unstyled: e,
34
+ inputAttributes: r
35
+ } = this.props, p = e && e.uDropDownsBase, l = {
36
+ tabIndex: t,
37
+ accessKey: n
38
+ }, d = /* @__PURE__ */ c.createElement(
30
39
  "input",
31
40
  {
32
41
  autoComplete: "off",
@@ -35,12 +44,12 @@ class v extends d.Component {
35
44
  key: "searchbar",
36
45
  size: this.props.size,
37
46
  placeholder: this.props.placeholder,
38
- className: u(g.inputInner({ c: r })),
47
+ className: b(g.inputInner({ c: p })),
39
48
  role: o,
40
49
  name: this.props.name,
41
50
  value: this.props.value,
42
51
  onChange: this.props.onChange,
43
- ref: (c) => this._input = c,
52
+ ref: (u) => this._input = u,
44
53
  onKeyDown: this.props.onKeyDown,
45
54
  onFocus: this.props.onFocus,
46
55
  onBlur: this.props.onBlur,
@@ -58,12 +67,12 @@ class v extends d.Component {
58
67
  "aria-label": this.props.ariaLabel,
59
68
  "aria-required": this.props.ariaRequired,
60
69
  "aria-controls": this.props.ariaControls,
61
- ...l
70
+ ...Object.assign({}, l, r)
62
71
  }
63
72
  );
64
- return s ? s.call(void 0, n) : n;
73
+ return s ? s.call(void 0, d) : d;
65
74
  }
66
75
  }
67
76
  export {
68
- v as default
77
+ y as default
69
78
  };