@progress/kendo-react-dropdowns 8.2.1-develop.5 → 8.3.0-develop.10

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.
@@ -72,27 +72,27 @@ const It = "Please select a value from the list!", { sizeMap: Ne, roundedMap: St
72
72
  validityStyles: Be = y.validityStyles,
73
73
  onOpen: ae = Z,
74
74
  onClose: z = Z
75
- } = a, _ = lt(a.tabIndex, E), l = t.useRef(null), C = t.useRef(null), w = t.useRef(null), ie = t.useRef(null), $ = t.useRef(null), k = t.useRef(null), H = t.useRef(!1), G = t.useRef([]), U = t.useRef(null), [N, Ve] = t.useState(), [Ke, he] = t.useState(!1), [d, re] = t.useState(!1), [oe, qe] = t.useState(), [Ae, We] = t.useState([]), [be, ze] = t.useState(""), P = !!(oe && oe <= xt && a.adaptive), s = S !== void 0 ? S : Ke, le = !!(Array.isArray(m) && m.length), se = Tt({ validationMessage: A, valid: Le, required: ve }, le), T = st(C, a.dir), _e = {
75
+ } = a, _ = lt(a.tabIndex, E), l = t.useRef(null), C = t.useRef(null), w = t.useRef(null), ie = t.useRef(null), H = t.useRef(null), k = t.useRef(null), $ = t.useRef(!1), G = t.useRef([]), U = t.useRef(null), [N, Ve] = t.useState(), [Ke, he] = t.useState(!1), [d, re] = t.useState(!1), [oe, qe] = t.useState(), [Ae, We] = t.useState([]), [be, ze] = t.useState(""), P = !!(oe && oe <= xt && a.adaptive), s = S !== void 0 ? S : Ke, le = !!(Array.isArray(m) && m.length), se = Tt({ validationMessage: A, valid: Le, required: ve }, le), T = st(C, a.dir), _e = {
76
76
  width: ht(C, y, R, L),
77
77
  ...T !== void 0 ? { direction: T } : {}
78
- }, $e = t.useCallback(() => C.current && C.current.focus(), []);
78
+ }, He = t.useCallback(() => C.current && C.current.focus(), []);
79
79
  G.current = pe === void 0 ? (m || []).map((e) => ({ text: gt(e, a.textField), data: [e] })) : [...pe], t.useImperativeHandle(
80
80
  l,
81
81
  () => ({
82
82
  props: a,
83
83
  element: C.current,
84
- focus: $e
84
+ focus: He
85
85
  })
86
86
  ), t.useImperativeHandle(M, () => l.current);
87
- const He = t.useCallback(
87
+ const $e = t.useCallback(
88
88
  () => {
89
- $.current && $.current.setCustomValidity && $.current.setCustomValidity(
89
+ H.current && H.current.setCustomValidity && H.current.setCustomValidity(
90
90
  se.valid ? "" : A === void 0 ? It : A
91
91
  );
92
92
  },
93
93
  [A, se]
94
94
  );
95
- t.useEffect(He), t.useEffect(() => {
95
+ t.useEffect($e), t.useEffect(() => {
96
96
  const e = ct && window.ResizeObserver && new window.ResizeObserver(tt.bind(void 0));
97
97
  return document != null && document.body && e && e.observe(document.body), () => {
98
98
  e && e.disconnect();
@@ -154,7 +154,7 @@ const It = "Please select a value from the list!", { sizeMap: Ne, roundedMap: St
154
154
  [s, S, z]
155
155
  ), h = t.useCallback(
156
156
  (e) => {
157
- H.current = !0, e(), window.setTimeout(() => H.current = !1, 0);
157
+ $.current = !0, e(), window.setTimeout(() => $.current = !1, 0);
158
158
  },
159
159
  []
160
160
  ), u = t.useCallback(
@@ -175,7 +175,7 @@ const It = "Please select a value from the list!", { sizeMap: Ne, roundedMap: St
175
175
  [d, u]
176
176
  ), je = t.useCallback(
177
177
  (e) => {
178
- if (!d && !H.current && (re(!0), a.onFocus && l.current)) {
178
+ if (!d && !$.current && (re(!0), a.onFocus && l.current)) {
179
179
  const i = {
180
180
  syntheticEvent: e,
181
181
  nativeEvent: e.nativeEvent,
@@ -187,7 +187,7 @@ const It = "Please select a value from the list!", { sizeMap: Ne, roundedMap: St
187
187
  [d, a.onFocus]
188
188
  ), Je = t.useCallback(
189
189
  (e) => {
190
- if (d && !H.current && l.current) {
190
+ if (d && !$.current && l.current) {
191
191
  re(!1);
192
192
  const i = {
193
193
  syntheticEvent: e,
@@ -357,7 +357,7 @@ const It = "Please select a value from the list!", { sizeMap: Ne, roundedMap: St
357
357
  onApply: (r) => g(r)
358
358
  }
359
359
  };
360
- return /* @__PURE__ */ t.createElement(kt, { ...i }, /* @__PURE__ */ t.createElement(Ft, { className: "!k-overflow-hidden" }, /* @__PURE__ */ t.createElement("div", { className: "k-list-container" }, /* @__PURE__ */ t.createElement("div", { className: "k-list k-list-lg" }, q.length > 0 ? /* @__PURE__ */ t.createElement(
360
+ return /* @__PURE__ */ t.createElement(kt, { ...i }, /* @__PURE__ */ t.createElement(Ft, { overflowHidden: !0 }, /* @__PURE__ */ t.createElement("div", { className: "k-list-container" }, /* @__PURE__ */ t.createElement("div", { className: "k-list k-list-lg" }, q.length > 0 ? /* @__PURE__ */ t.createElement(
361
361
  we,
362
362
  {
363
363
  ref: k,
@@ -445,7 +445,7 @@ const It = "Please select a value from the list!", { sizeMap: Ne, roundedMap: St
445
445
  "select",
446
446
  {
447
447
  name: Oe,
448
- ref: $,
448
+ ref: H,
449
449
  tabIndex: -1,
450
450
  "aria-hidden": !0,
451
451
  title: B,
@@ -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 i=require("react"),a=require("@progress/kendo-react-intl"),o=require("../messages/index.js"),u=require("@progress/kendo-react-common"),l=require("@progress/kendo-svg-icons");function p(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const c=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,c.get?c:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const r=p(i);class s extends r.Component{constructor(){super(...arguments),this.onMouseDown=e=>e.preventDefault()}render(){const e=a.provideLocalizationService(this).toLanguageString(o.clear,o.messages[o.clear]);return r.createElement("span",{className:"k-clear-value",role:"button",onClick:this.props.onClick,onMouseDown:this.onMouseDown,tabIndex:-1,title:e,key:"clearbutton"},r.createElement(u.IconWrap,{name:"x",icon:l.xIcon}))}}a.registerForLocalization(s);module.exports=s;
8
+ "use client";"use strict";const i=require("react"),d=require("@progress/kendo-react-intl"),s=require("../messages/index.js"),c=require("@progress/kendo-react-common"),m=require("@progress/kendo-svg-icons");function p(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const a=p(i),f=e=>{const n=d.useLocalization(),t=c.useUnstyled(),o=t&&t.uDropDownsBase,r=n.toLanguageString(s.clear,s.messages[s.clear]),l=u=>u.preventDefault();return a.createElement("span",{className:c.classNames(c.uDropDownsBase.clearButton({c:o})),role:"button",onClick:e.onClick,onMouseDown:l,tabIndex:-1,title:r,key:"clearbutton"},a.createElement(c.IconWrap,{name:"x",icon:m.xIcon}))};module.exports=f;
@@ -7,32 +7,26 @@
7
7
  */
8
8
  "use client";
9
9
  import * as o from "react";
10
- import { provideLocalizationService as r, registerForLocalization as n } from "@progress/kendo-react-intl";
11
- import { clear as t, messages as a } from "../messages/index.mjs";
12
- import { IconWrap as s } from "@progress/kendo-react-common";
13
- import { xIcon as i } from "@progress/kendo-svg-icons";
14
- class c extends o.Component {
15
- constructor() {
16
- super(...arguments), this.onMouseDown = (e) => e.preventDefault();
17
- }
18
- render() {
19
- const e = r(this).toLanguageString(t, a[t]);
20
- return /* @__PURE__ */ o.createElement(
21
- "span",
22
- {
23
- className: "k-clear-value",
24
- role: "button",
25
- onClick: this.props.onClick,
26
- onMouseDown: this.onMouseDown,
27
- tabIndex: -1,
28
- title: e,
29
- key: "clearbutton"
30
- },
31
- /* @__PURE__ */ o.createElement(s, { name: "x", icon: i })
32
- );
33
- }
34
- }
35
- n(c);
10
+ import { useLocalization as m } from "@progress/kendo-react-intl";
11
+ import { clear as t, messages as i } from "../messages/index.mjs";
12
+ import { useUnstyled as u, classNames as p, uDropDownsBase as f, IconWrap as d } from "@progress/kendo-react-common";
13
+ import { xIcon as D } from "@progress/kendo-svg-icons";
14
+ const b = (n) => {
15
+ const s = m(), e = u(), a = e && e.uDropDownsBase, r = s.toLanguageString(t, i[t]), c = (l) => l.preventDefault();
16
+ return /* @__PURE__ */ o.createElement(
17
+ "span",
18
+ {
19
+ className: p(f.clearButton({ c: a })),
20
+ role: "button",
21
+ onClick: n.onClick,
22
+ onMouseDown: c,
23
+ tabIndex: -1,
24
+ title: r,
25
+ key: "clearbutton"
26
+ },
27
+ /* @__PURE__ */ o.createElement(d, { name: "x", icon: D })
28
+ );
29
+ };
36
30
  export {
37
- c as default
31
+ b as default
38
32
  };
@@ -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 o=require("react");function a(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const c=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,c.get?c:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const s=a(o);class i extends s.Component{render(){const{group:t,groupMode:r,render:c}=this.props,n=s.createElement("div",{className:"k-list-group-sticky-header"},r==="classic"?t:s.createElement("div",{className:"k-list-header-text"},t));return c!==void 0?c.call(void 0,n,this.props):n}}module.exports=i;
8
+ "use client";"use strict";const c=require("@progress/kendo-react-common"),u=require("react");function i(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const l=i(u),d=e=>{const{group:t,groupMode:s,render:r}=e,n=c.useUnstyled(),o=n&&n.uDropDownsBase,a=l.createElement("div",{className:c.classNames(c.uDropDownsBase.groupStickyHeader({c:o}))},s==="classic"?t:l.createElement("div",{className:c.classNames(c.uDropDownsBase.listHeaderText({c:o}))},t));return r!==void 0?r.call(void 0,a,e):a};module.exports=d;
@@ -6,17 +6,16 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as e from "react";
10
- class c extends e.Component {
11
- render() {
12
- const {
13
- group: r,
14
- groupMode: a,
15
- render: t
16
- } = this.props, s = /* @__PURE__ */ e.createElement("div", { className: "k-list-group-sticky-header" }, a === "classic" ? r : /* @__PURE__ */ e.createElement("div", { className: "k-list-header-text" }, r));
17
- return t !== void 0 ? t.call(void 0, s, this.props) : s;
18
- }
19
- }
9
+ import { useUnstyled as i, classNames as c, uDropDownsBase as d } from "@progress/kendo-react-common";
10
+ import * as l from "react";
11
+ const m = (e) => {
12
+ const {
13
+ group: s,
14
+ groupMode: n,
15
+ render: t
16
+ } = e, r = i(), a = r && r.uDropDownsBase, o = /* @__PURE__ */ l.createElement("div", { className: c(d.groupStickyHeader({ c: a })) }, n === "classic" ? s : /* @__PURE__ */ l.createElement("div", { className: c(d.listHeaderText({ c: a })) }, s));
17
+ return t !== void 0 ? t.call(void 0, o, e) : o;
18
+ };
20
19
  export {
21
- c as default
20
+ m as default
22
21
  };
package/common/List.js CHANGED
@@ -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 x=require("react"),M=require("./ListItem.js"),O=require("./ListGroupItem.js"),f=require("./utils.js"),D=require("@progress/kendo-react-intl"),k=require("../messages/index.js");function j(s){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const e in s)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(s,e);Object.defineProperty(r,e,t.get?t:{enumerable:!0,get:()=>s[e]})}}return r.default=s,Object.freeze(r)}const o=j(x);class N extends o.Component{renderItems(){const{textField:r,valueField:e,groupField:t,groupMode:n,isMultiColumn:v,optionsGuid:c,skip:d=0,virtual:u,focusedIndex:p,hasDuplicates:S,highlightSelected:m=!0,value:g,data:E,itemRender:w,groupHeaderItemRender:q}=this.props,R=Array.isArray(g);let C=0;return E.map((a,i)=>{const I=d+i,y=d+i+C,z=S?g?p===i:!1:a.disabled?!1:m&&(!R&&f.areSame(a,g,e)||R&&g.findIndex(L=>f.areSame(L,a,e))!==-1);let l,h,b;return i>0&&t!==void 0&&(h=f.getItemValue(a,t),b=f.getItemValue(E[i-1],t),h&&b&&h!==b&&(l=h)),l!==void 0&&n==="modern"&&(C+=1),[l!==void 0&&n==="modern"&&o.createElement(O,{id:`option-${c}-${y}`,virtual:u,key:I+"-group-item",group:l,isMultiColumn:v,render:q}),o.createElement(M,{id:`option-${c}-${l!==void 0&&n==="modern"?y+1:y}`,virtual:u,dataItem:a,groupMode:n,selected:z,focused:p===i,index:I,key:I,onClick:this.props.onClick,textField:r,group:l,render:w,disabled:a.disabled})]})}renderNoValueElement(r){const e=this.props.noDataRender,t=o.createElement("div",{className:"k-nodata"},o.createElement("div",null,r.toLanguageString(k.nodata,k.messages[k.nodata])));return e?e.call(void 0,t):t}render(){const r=D.provideLocalizationService(this),{id:e,show:t,wrapperCssClass:n,wrapperStyle:v,listStyle:c,listRef:d,wrapperRef:u,listClassName:p="k-list-ul",ariaSetSize:S}=this.props,m=this.renderItems();return m.length?o.createElement("div",{className:n,style:v,ref:u,onMouseDown:this.props.onMouseDown,onBlur:this.props.onBlur,onScroll:this.props.onScroll,unselectable:"on"},o.createElement("ul",{id:e,role:"listbox","aria-hidden":t?void 0:!0,"aria-setsize":S,className:p,ref:d,style:c},m),this.props.scroller&&o.createElement("div",{className:"k-height-container"},this.props.scroller)):this.renderNoValueElement(r)}}D.registerForLocalization(N);module.exports=N;
8
+ "use client";"use strict";const T=require("react"),U=require("./ListItem.js"),J=require("./ListGroupItem.js"),f=require("./utils.js"),K=require("@progress/kendo-react-intl"),I=require("../messages/index.js"),n=require("@progress/kendo-react-common");function Q(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(c,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return c.default=e,Object.freeze(c)}const r=Q(T),W=e=>{const c=K.useLocalization(),t=n.useUnstyled(),s=t&&t.uDropDownsBase,{id:k,show:q,wrapperCssClass:B,wrapperStyle:L,listStyle:z,listRef:M,wrapperRef:O,listClassName:$,ariaSetSize:j}=e,S=(()=>{const{textField:u,valueField:i,groupField:v,groupMode:d,isMultiColumn:A,optionsGuid:b,skip:w=0,virtual:C,focusedIndex:N,hasDuplicates:F,highlightSelected:V=!0,value:m,data:R,itemRender:_,groupHeaderItemRender:G}=e,h=Array.isArray(m);let E=0;return R.map((a,o)=>{const D=w+o,p=w+o+E,P=F?m?N===o:!1:a.disabled?!1:V&&(!h&&f.areSame(a,m,i)||h&&m.findIndex(H=>f.areSame(H,a,i))!==-1);let l,g,y;return o>0&&v!==void 0&&(g=f.getItemValue(a,v),y=f.getItemValue(R[o-1],v),g&&y&&g!==y&&(l=g)),l!==void 0&&d==="modern"&&(E+=1),[l!==void 0&&d==="modern"&&r.createElement(J,{id:`option-${b}-${p}`,virtual:C,key:D+"-group-item",group:l,isMultiColumn:A,render:G}),r.createElement(U,{id:`option-${b}-${l!==void 0&&d==="modern"?p+1:p}`,virtual:C,dataItem:a,groupMode:d,selected:P,focused:N===o,index:D,key:D,onClick:e.onClick,textField:u,group:l,render:_,disabled:a.disabled})]})})(),x=()=>{const u=e.noDataRender,i=r.createElement("div",{className:n.classNames(n.uDropDownsBase.noData({c:s}))},r.createElement("div",null,c.toLanguageString(I.nodata,I.messages[I.nodata])));return u?u.call(void 0,i):i};return S.length?r.createElement("div",{className:B,style:L,ref:O,onMouseDown:e.onMouseDown,onBlur:e.onBlur,onScroll:e.onScroll,unselectable:"on"},r.createElement("ul",{id:k,role:"listbox","aria-hidden":q?void 0:!0,"aria-setsize":j,className:$||n.classNames(n.uDropDownsBase.ul({c:s})),ref:M,style:z},S),e.scroller&&r.createElement("div",{className:n.classNames(n.uDropDownsBase.heightContainer({c:s}))},e.scroller)):x()},X=W;module.exports=X;
package/common/List.mjs CHANGED
@@ -7,112 +7,108 @@
7
7
  */
8
8
  "use client";
9
9
  import * as t from "react";
10
- import z from "./ListItem.mjs";
11
- import x from "./ListGroupItem.mjs";
12
- import { areSame as C, getItemValue as N } from "./utils.mjs";
13
- import { provideLocalizationService as F, registerForLocalization as M } from "@progress/kendo-react-intl";
14
- import { nodata as R, messages as $ } from "../messages/index.mjs";
15
- class A extends t.Component {
16
- renderItems() {
10
+ import Q from "./ListItem.mjs";
11
+ import T from "./ListGroupItem.mjs";
12
+ import { areSame as R, getItemValue as L } from "./utils.mjs";
13
+ import { useLocalization as W } from "@progress/kendo-react-intl";
14
+ import { nodata as b, messages as X } from "../messages/index.mjs";
15
+ import { useUnstyled as Y, classNames as g, uDropDownsBase as p } from "@progress/kendo-react-common";
16
+ const Z = (e) => {
17
+ const k = W(), y = Y(), c = y && y.uDropDownsBase, {
18
+ id: B,
19
+ show: $,
20
+ wrapperCssClass: z,
21
+ wrapperStyle: M,
22
+ listStyle: x,
23
+ listRef: A,
24
+ wrapperRef: F,
25
+ listClassName: G,
26
+ ariaSetSize: V
27
+ } = e, D = (() => {
17
28
  const {
18
- textField: l,
19
- valueField: r,
20
- groupField: e,
21
- groupMode: o,
22
- isMultiColumn: f,
23
- optionsGuid: n,
24
- skip: d = 0,
25
- virtual: p,
26
- focusedIndex: c,
27
- hasDuplicates: v,
28
- highlightSelected: m = !0,
29
- value: u,
29
+ textField: n,
30
+ valueField: s,
31
+ groupField: u,
32
+ groupMode: l,
33
+ isMultiColumn: U,
34
+ optionsGuid: I,
35
+ skip: S = 0,
36
+ virtual: h,
37
+ focusedIndex: C,
38
+ hasDuplicates: j,
39
+ highlightSelected: q = !0,
40
+ value: i,
30
41
  data: E,
31
- itemRender: w,
32
- groupHeaderItemRender: D
33
- } = this.props, y = Array.isArray(u);
34
- let k = 0;
35
- return E.map((s, i) => {
36
- const g = d + i, I = d + i + k, L = v ? u ? c === i : !1 : s.disabled ? !1 : m && (!y && C(s, u, r) || y && u.findIndex((b) => C(b, s, r)) !== -1);
37
- let a, h, S;
38
- return i > 0 && e !== void 0 && (h = N(s, e), S = N(E[i - 1], e), h && S && h !== S && (a = h)), a !== void 0 && o === "modern" && (k += 1), [
39
- a !== void 0 && o === "modern" && /* @__PURE__ */ t.createElement(
40
- x,
42
+ itemRender: J,
43
+ groupHeaderItemRender: K
44
+ } = e, w = Array.isArray(i);
45
+ let N = 0;
46
+ return E.map((o, r) => {
47
+ const m = S + r, f = S + r + N, O = j ? i ? C === r : !1 : o.disabled ? !1 : q && (!w && R(o, i, s) || w && i.findIndex((P) => R(P, o, s)) !== -1);
48
+ let a, d, v;
49
+ return r > 0 && u !== void 0 && (d = L(o, u), v = L(E[r - 1], u), d && v && d !== v && (a = d)), a !== void 0 && l === "modern" && (N += 1), [
50
+ a !== void 0 && l === "modern" && /* @__PURE__ */ t.createElement(
51
+ T,
41
52
  {
42
- id: `option-${n}-${I}`,
43
- virtual: p,
44
- key: g + "-group-item",
53
+ id: `option-${I}-${f}`,
54
+ virtual: h,
55
+ key: m + "-group-item",
45
56
  group: a,
46
- isMultiColumn: f,
47
- render: D
57
+ isMultiColumn: U,
58
+ render: K
48
59
  }
49
60
  ),
50
61
  /* @__PURE__ */ t.createElement(
51
- z,
62
+ Q,
52
63
  {
53
- id: `option-${n}-${a !== void 0 && o === "modern" ? I + 1 : I}`,
54
- virtual: p,
55
- dataItem: s,
56
- groupMode: o,
57
- selected: L,
58
- focused: c === i,
59
- index: g,
60
- key: g,
61
- onClick: this.props.onClick,
62
- textField: l,
64
+ id: `option-${I}-${a !== void 0 && l === "modern" ? f + 1 : f}`,
65
+ virtual: h,
66
+ dataItem: o,
67
+ groupMode: l,
68
+ selected: O,
69
+ focused: C === r,
70
+ index: m,
71
+ key: m,
72
+ onClick: e.onClick,
73
+ textField: n,
63
74
  group: a,
64
- render: w,
65
- disabled: s.disabled
75
+ render: J,
76
+ disabled: o.disabled
66
77
  }
67
78
  )
68
79
  ];
69
80
  });
70
- }
71
- renderNoValueElement(l) {
72
- const r = this.props.noDataRender, e = /* @__PURE__ */ t.createElement("div", { className: "k-nodata" }, /* @__PURE__ */ t.createElement("div", null, l.toLanguageString(R, $[R])));
73
- return r ? r.call(void 0, e) : e;
74
- }
75
- render() {
76
- const l = F(this), {
77
- id: r,
78
- show: e,
79
- wrapperCssClass: o,
80
- wrapperStyle: f,
81
- listStyle: n,
82
- listRef: d,
83
- wrapperRef: p,
84
- listClassName: c = "k-list-ul",
85
- ariaSetSize: v
86
- } = this.props, m = this.renderItems();
87
- return m.length ? /* @__PURE__ */ t.createElement(
88
- "div",
81
+ })(), H = () => {
82
+ const n = e.noDataRender, s = /* @__PURE__ */ t.createElement("div", { className: g(p.noData({ c })) }, /* @__PURE__ */ t.createElement("div", null, k.toLanguageString(b, X[b])));
83
+ return n ? n.call(void 0, s) : s;
84
+ };
85
+ return D.length ? /* @__PURE__ */ t.createElement(
86
+ "div",
87
+ {
88
+ className: z,
89
+ style: M,
90
+ ref: F,
91
+ onMouseDown: e.onMouseDown,
92
+ onBlur: e.onBlur,
93
+ onScroll: e.onScroll,
94
+ unselectable: "on"
95
+ },
96
+ /* @__PURE__ */ t.createElement(
97
+ "ul",
89
98
  {
90
- className: o,
91
- style: f,
92
- ref: p,
93
- onMouseDown: this.props.onMouseDown,
94
- onBlur: this.props.onBlur,
95
- onScroll: this.props.onScroll,
96
- unselectable: "on"
99
+ id: B,
100
+ role: "listbox",
101
+ "aria-hidden": $ ? void 0 : !0,
102
+ "aria-setsize": V,
103
+ className: G || g(p.ul({ c })),
104
+ ref: A,
105
+ style: x
97
106
  },
98
- /* @__PURE__ */ t.createElement(
99
- "ul",
100
- {
101
- id: r,
102
- role: "listbox",
103
- "aria-hidden": e ? void 0 : !0,
104
- "aria-setsize": v,
105
- className: c,
106
- ref: d,
107
- style: n
108
- },
109
- m
110
- ),
111
- this.props.scroller && /* @__PURE__ */ t.createElement("div", { className: "k-height-container" }, this.props.scroller)
112
- ) : this.renderNoValueElement(l);
113
- }
114
- }
115
- M(A);
107
+ D
108
+ ),
109
+ e.scroller && /* @__PURE__ */ t.createElement("div", { className: g(p.heightContainer({ c })) }, e.scroller)
110
+ ) : H();
111
+ }, ne = Z;
116
112
  export {
117
- A as default
113
+ ne as default
118
114
  };
@@ -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 s=require("react"),u=require("@progress/kendo-react-popup");function a(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const c=a(s);class p extends c.Component{render(){const{children:n,width:t,dir:r,itemsCount:o,popupSettings:i}=this.props;return c.createElement(u.Popup,{style:{width:t,direction:r},contentKey:o&&o.join(),...i},n)}}module.exports=p;
8
+ "use client";"use strict";const i=require("react"),s=require("@progress/kendo-react-popup");function u(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const a=u(i),p=e=>{const{children:n,width:t,dir:o,itemsCount:r,popupSettings:c}=e;return a.createElement(s.Popup,{style:{width:t,direction:o},contentKey:r&&r.join(),...c},n)},l=p;module.exports=l;
@@ -6,28 +6,26 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as e from "react";
10
- import { Popup as s } from "@progress/kendo-react-popup";
11
- class a extends e.Component {
12
- render() {
13
- const {
14
- children: n,
15
- width: o,
16
- dir: r,
17
- itemsCount: t,
18
- popupSettings: i
19
- } = this.props;
20
- return /* @__PURE__ */ e.createElement(
21
- s,
22
- {
23
- style: { width: o, direction: r },
24
- contentKey: t && t.join(),
25
- ...i
26
- },
27
- n
28
- );
29
- }
30
- }
9
+ import * as s from "react";
10
+ import { Popup as c } from "@progress/kendo-react-popup";
11
+ const p = (e) => {
12
+ const {
13
+ children: n,
14
+ width: o,
15
+ dir: i,
16
+ itemsCount: t,
17
+ popupSettings: r
18
+ } = e;
19
+ return /* @__PURE__ */ s.createElement(
20
+ c,
21
+ {
22
+ style: { width: o, direction: i },
23
+ contentKey: t && t.join(),
24
+ ...r
25
+ },
26
+ n
27
+ );
28
+ }, m = p;
31
29
  export {
32
- a as default
30
+ m as default
33
31
  };
@@ -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 r=require("react"),c=require("@progress/kendo-react-common"),l=require("./utils.js");function a(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const o=a(r),i=e=>e.preventDefault();class u extends o.Component{render(){const{selected:n,defaultItem:t,textField:s}=this.props;return o.createElement("div",{onClick:this.props.onClick,onMouseDown:i,style:{position:"unset"},className:c.classNames("k-list-optionlabel",{"k-selected":n})},l.getItemValue(t,s)||"")}}module.exports=u;
8
+ "use client";"use strict";const a=require("react"),o=require("@progress/kendo-react-common"),r=require("./utils.js");function u(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const i=u(a),d=e=>e.preventDefault(),f=e=>{const{selected:n,defaultItem:t,textField:s}=e,c=o.useUnstyled(),l=c&&c.uDropDownsBase;return i.createElement("div",{onClick:e.onClick,onMouseDown:d,style:{position:"unset"},className:o.classNames(o.uDropDownsBase.optionlabel({c:l,selected:n}))},r.getItemValue(t,s)||"")};module.exports=f;
@@ -6,31 +6,26 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as t from "react";
10
- import { classNames as n } from "@progress/kendo-react-common";
11
- import { getItemValue as a } from "./utils.mjs";
12
- const r = (e) => e.preventDefault();
13
- class p extends t.Component {
14
- render() {
15
- const {
16
- selected: s,
17
- defaultItem: o,
18
- textField: l
19
- } = this.props;
20
- return /* @__PURE__ */ t.createElement(
21
- "div",
22
- {
23
- onClick: this.props.onClick,
24
- onMouseDown: r,
25
- style: { position: "unset" },
26
- className: n("k-list-optionlabel", {
27
- "k-selected": s
28
- })
29
- },
30
- a(o, l) || ""
31
- );
32
- }
33
- }
9
+ import * as a from "react";
10
+ import { useUnstyled as c, classNames as u, uDropDownsBase as r } from "@progress/kendo-react-common";
11
+ import { getItemValue as i } from "./utils.mjs";
12
+ const m = (e) => e.preventDefault(), p = (e) => {
13
+ const {
14
+ selected: s,
15
+ defaultItem: o,
16
+ textField: l
17
+ } = e, t = c(), n = t && t.uDropDownsBase;
18
+ return /* @__PURE__ */ a.createElement(
19
+ "div",
20
+ {
21
+ onClick: e.onClick,
22
+ onMouseDown: m,
23
+ style: { position: "unset" },
24
+ className: u(r.optionlabel({ c: n, selected: s }))
25
+ },
26
+ i(o, l) || ""
27
+ );
28
+ };
34
29
  export {
35
30
  p as default
36
31
  };
@@ -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 m=require("react"),n=require("prop-types"),l=require("@progress/kendo-react-inputs"),p=require("@progress/kendo-svg-icons"),b=require("@progress/kendo-react-common");function g(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const t=g(m),c=t.forwardRef((e,o)=>{const r=t.useRef(null),{renderListFilterWrapper:a=!1,renderPrefixSeparator:s=!1,...u}=e;t.useImperativeHandle(o,()=>r.current);const d=()=>t.createElement(t.Fragment,null,t.createElement(l.InputPrefix,null,t.createElement(b.IconWrap,{name:"search",icon:p.searchIcon,className:"k-input-icon"})),s&&t.createElement(l.InputSeparator,null)),i=t.createElement(l.TextBox,{...u,ref:r,className:"k-searchbox",value:e.value||"",onChange:e.onChange,onKeyDown:e.onKeyDown,tabIndex:e.tabIndex,onClick:f=>f.stopPropagation(),size:e.size,fillMode:e.fillMode,rounded:e.rounded,prefix:d});return a?t.createElement("div",{className:"k-list-filter"}," ",i," "):i});c.propTypes={value:n.oneOfType([n.string,n.number,n.array]),tabIndex:n.number,onChange:n.func,onKeyDown:n.func,size:n.oneOf([null,"small","medium","large"]),rounded:n.oneOf([null,"small","medium","large","full"]),fillMode:n.oneOf([null,"solid","flat","outline"]),renderListFilterWrapper:n.bool,renderPrefixSeparator:n.bool};c.displayName="KendoReactListFilter";const x=c;module.exports=x;
8
+ "use client";"use strict";const g=require("react"),n=require("prop-types"),c=require("@progress/kendo-react-inputs"),x=require("@progress/kendo-svg-icons"),r=require("@progress/kendo-react-common");function y(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(o,a,l.get?l:{enumerable:!0,get:()=>e[a]})}}return o.default=e,Object.freeze(o)}const t=y(g),u=t.forwardRef((e,o)=>{const a=t.useRef(null),{renderListFilterWrapper:l=!1,renderPrefixSeparator:f=!1,...m}=e,i=r.useUnstyled(),s=i&&i.uDropDownsBase;t.useImperativeHandle(o,()=>a.current);const p=()=>t.createElement(t.Fragment,null,t.createElement(c.InputPrefix,null,t.createElement(r.IconWrap,{name:"search",icon:x.searchIcon,className:r.classNames(r.uDropDownsBase.inputIcon({c:s}))})),f&&t.createElement(c.InputSeparator,null)),d=t.createElement(c.TextBox,{...m,ref:a,className:r.classNames(r.uDropDownsBase.searchbox({c:s})),value:e.value||"",onChange:e.onChange,onKeyDown:e.onKeyDown,tabIndex:e.tabIndex,onClick:b=>b.stopPropagation(),size:e.size,fillMode:e.fillMode,rounded:e.rounded,prefix:p});return l?t.createElement("div",{className:r.classNames(r.uDropDownsBase.listFilter({c:s}))}," ",d," "):d});u.propTypes={value:n.oneOfType([n.string,n.number,n.array]),tabIndex:n.number,onChange:n.func,onKeyDown:n.func,size:n.oneOf([null,"small","medium","large"]),rounded:n.oneOf([null,"small","medium","large","full"]),fillMode:n.oneOf([null,"solid","flat","outline"]),renderListFilterWrapper:n.bool,renderPrefixSeparator:n.bool};u.displayName="KendoReactListFilter";const D=u;module.exports=D;
@@ -8,35 +8,35 @@
8
8
  "use client";
9
9
  import * as n from "react";
10
10
  import e from "prop-types";
11
- import { TextBox as f, InputPrefix as d, InputSeparator as p } from "@progress/kendo-react-inputs";
12
- import { searchIcon as x } from "@progress/kendo-svg-icons";
13
- import { IconWrap as b } from "@progress/kendo-react-common";
14
- const t = n.forwardRef((r, o) => {
15
- const l = n.useRef(null), { renderListFilterWrapper: i = !1, renderPrefixSeparator: s = !1, ...m } = r;
11
+ import { TextBox as y, InputPrefix as b, InputSeparator as I } from "@progress/kendo-react-inputs";
12
+ import { searchIcon as g } from "@progress/kendo-svg-icons";
13
+ import { useUnstyled as h, classNames as l, uDropDownsBase as a, IconWrap as D } from "@progress/kendo-react-common";
14
+ const o = n.forwardRef((r, u) => {
15
+ const s = n.useRef(null), { renderListFilterWrapper: m = !1, renderPrefixSeparator: d = !1, ...f } = r, i = h(), t = i && i.uDropDownsBase;
16
16
  n.useImperativeHandle(
17
- o,
18
- () => l.current
17
+ u,
18
+ () => s.current
19
19
  );
20
- const u = () => /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(d, null, /* @__PURE__ */ n.createElement(b, { name: "search", icon: x, className: "k-input-icon" })), s && /* @__PURE__ */ n.createElement(p, null)), a = /* @__PURE__ */ n.createElement(
21
- f,
20
+ const p = () => /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(b, null, /* @__PURE__ */ n.createElement(D, { name: "search", icon: g, className: l(a.inputIcon({ c: t })) })), d && /* @__PURE__ */ n.createElement(I, null)), c = /* @__PURE__ */ n.createElement(
21
+ y,
22
22
  {
23
- ...m,
24
- ref: l,
25
- className: "k-searchbox",
23
+ ...f,
24
+ ref: s,
25
+ className: l(a.searchbox({ c: t })),
26
26
  value: r.value || "",
27
27
  onChange: r.onChange,
28
28
  onKeyDown: r.onKeyDown,
29
29
  tabIndex: r.tabIndex,
30
- onClick: (c) => c.stopPropagation(),
30
+ onClick: (x) => x.stopPropagation(),
31
31
  size: r.size,
32
32
  fillMode: r.fillMode,
33
33
  rounded: r.rounded,
34
- prefix: u
34
+ prefix: p
35
35
  }
36
36
  );
37
- return i ? /* @__PURE__ */ n.createElement("div", { className: "k-list-filter" }, " ", a, " ") : a;
37
+ return m ? /* @__PURE__ */ n.createElement("div", { className: l(a.listFilter({ c: t })) }, " ", c, " ") : c;
38
38
  });
39
- t.propTypes = {
39
+ o.propTypes = {
40
40
  value: e.oneOfType([e.string, e.number, e.array]),
41
41
  tabIndex: e.number,
42
42
  onChange: e.func,
@@ -47,8 +47,8 @@ t.propTypes = {
47
47
  renderListFilterWrapper: e.bool,
48
48
  renderPrefixSeparator: e.bool
49
49
  };
50
- t.displayName = "KendoReactListFilter";
51
- const E = t;
50
+ o.displayName = "KendoReactListFilter";
51
+ const C = o;
52
52
  export {
53
- E as default
53
+ C as default
54
54
  };