@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.
@@ -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 l=require("react");function a(e){const i=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(i,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return i.default=e,Object.freeze(i)}const s=a(l);class c extends s.Component{render(){const{group:i,virtual:t,render:r,isMultiColumn:o=!1}=this.props,n=s.createElement("li",{id:this.props.id,role:"group",className:o?"k-table-group-row":"k-list-group-item",style:o?{boxSizing:"inherit"}:{position:t?"relative":"unset"}},s.createElement("span",{className:r?void 0:o?"k-table-th":"k-list-item-text"},i));return r!==void 0?r.call(void 0,n,this.props):n}}module.exports=c;
8
+ "use client";"use strict";const o=require("@progress/kendo-react-common"),d=require("react");function m(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 l=m(d),p=e=>{const{group:n,virtual:t,render:s,isMultiColumn:r=!1,id:u}=e,a=o.useUnstyled(),c=a&&a.uDropDownsBase,i=l.createElement("li",{id:u,role:"group",className:o.classNames(o.uDropDownsBase.groupLi({c,isMultiColumn:r})),style:r?{boxSizing:"inherit"}:{position:t?"relative":"unset"}},l.createElement("span",{className:s?void 0:o.classNames(o.uDropDownsBase.groupItemText({c,isMultiColumn:r}))},n));return s!==void 0?s.call(void 0,i,e):i};module.exports=p;
@@ -6,27 +6,27 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as i from "react";
10
- class a extends i.Component {
11
- render() {
12
- const {
13
- group: s,
14
- virtual: o,
15
- render: e,
16
- isMultiColumn: t = !1
17
- } = this.props, r = /* @__PURE__ */ i.createElement(
18
- "li",
19
- {
20
- id: this.props.id,
21
- role: "group",
22
- className: t ? "k-table-group-row" : "k-list-group-item",
23
- style: t ? { boxSizing: "inherit" } : { position: o ? "relative" : "unset" }
24
- },
25
- /* @__PURE__ */ i.createElement("span", { className: e ? void 0 : t ? "k-table-th" : "k-list-item-text" }, s)
26
- );
27
- return e !== void 0 ? e.call(void 0, r, this.props) : r;
28
- }
29
- }
9
+ import { useUnstyled as d, classNames as i, uDropDownsBase as l } from "@progress/kendo-react-common";
10
+ import * as n from "react";
11
+ const g = (t) => {
12
+ const {
13
+ group: u,
14
+ virtual: c,
15
+ render: e,
16
+ isMultiColumn: s = !1,
17
+ id: m
18
+ } = t, o = d(), r = o && o.uDropDownsBase, a = /* @__PURE__ */ n.createElement(
19
+ "li",
20
+ {
21
+ id: m,
22
+ role: "group",
23
+ className: i(l.groupLi({ c: r, isMultiColumn: s })),
24
+ style: s ? { boxSizing: "inherit" } : { position: c ? "relative" : "unset" }
25
+ },
26
+ /* @__PURE__ */ n.createElement("span", { className: e ? void 0 : i(l.groupItemText({ c: r, isMultiColumn: s })) }, u)
27
+ );
28
+ return e !== void 0 ? e.call(void 0, a, t) : a;
29
+ };
30
30
  export {
31
- a as default
31
+ g as default
32
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 d=require("react"),u=require("@progress/kendo-react-common"),p=require("./utils.js");function m(s){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>s[t]})}}return e.default=s,Object.freeze(e)}const r=m(d);class k extends r.Component{constructor(){super(...arguments),this.handleClick=e=>this.props.onClick(this.props.index,e)}render(){const{selected:e,group:t,dataItem:i,virtual:c,groupMode:o,disabled:l,render:n}=this.props,a=r.createElement("li",{id:this.props.id,role:"option","aria-selected":e,"aria-disabled":l?!0:void 0,className:u.classNames("k-list-item",{"k-selected":e,"k-focus":this.props.focused,"k-first":!!t&&o==="classic","k-disabled":l}),onClick:this.handleClick,style:{position:c?"relative":"unset"}},r.createElement("span",{className:"k-list-item-text"},p.getItemValue(i,this.props.textField).toString()),t!==void 0&&o==="classic"?r.createElement("div",{className:"k-list-item-group-label"},t):null);return n!==void 0?n.call(void 0,a,this.props):a}}module.exports=k;
8
+ "use client";"use strict";const p=require("react"),s=require("@progress/kendo-react-common"),v=require("./utils.js");function N(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const o=N(p),y=e=>{const{selected:a,group:t,dataItem:n,virtual:m,groupMode:l,disabled:i,id:f,focused:D,render:r}=e,u=s.useUnstyled(),c=u&&u.uDropDownsBase,b=g=>e.onClick(e.index,g),d=o.createElement("li",{id:f,role:"option","aria-selected":a,"aria-disabled":i?!0:void 0,className:s.classNames(s.uDropDownsBase.li({c,selected:a,focused:D,first:!!t&&l==="classic",disabled:i})),onClick:b,style:{position:m?"relative":"unset"}},o.createElement("span",{className:s.classNames(s.uDropDownsBase.itemText({c}))},v.getItemValue(n,e.textField).toString()),t!==void 0&&l==="classic"?o.createElement("div",{className:s.classNames(s.uDropDownsBase.itemGroupLabel({c}))},t):null);return r!==void 0?r.call(void 0,d,e):d},B=y;module.exports=B;
@@ -6,44 +6,42 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as t from "react";
10
- import { classNames as d } from "@progress/kendo-react-common";
11
- import { getItemValue as n } from "./utils.mjs";
12
- class h extends t.Component {
13
- constructor() {
14
- super(...arguments), this.handleClick = (e) => this.props.onClick(this.props.index, e);
15
- }
16
- render() {
17
- const {
18
- selected: e,
19
- group: s,
20
- dataItem: a,
21
- virtual: c,
22
- groupMode: i,
23
- disabled: l,
24
- render: r
25
- } = this.props, o = /* @__PURE__ */ t.createElement(
26
- "li",
27
- {
28
- id: this.props.id,
29
- role: "option",
30
- "aria-selected": e,
31
- "aria-disabled": l ? !0 : void 0,
32
- className: d("k-list-item", {
33
- "k-selected": e,
34
- "k-focus": this.props.focused,
35
- "k-first": !!s && i === "classic",
36
- "k-disabled": l
37
- }),
38
- onClick: this.handleClick,
39
- style: { position: c ? "relative" : "unset" }
40
- },
41
- /* @__PURE__ */ t.createElement("span", { className: "k-list-item-text" }, n(a, this.props.textField).toString()),
42
- s !== void 0 && i === "classic" ? /* @__PURE__ */ t.createElement("div", { className: "k-list-item-group-label" }, s) : null
43
- );
44
- return r !== void 0 ? r.call(void 0, o, this.props) : o;
45
- }
46
- }
9
+ import * as a from "react";
10
+ import { useUnstyled as B, classNames as l, uDropDownsBase as i } from "@progress/kendo-react-common";
11
+ import { getItemValue as C } from "./utils.mjs";
12
+ const D = (e) => {
13
+ const {
14
+ selected: o,
15
+ group: t,
16
+ dataItem: u,
17
+ virtual: v,
18
+ groupMode: c,
19
+ disabled: n,
20
+ id: f,
21
+ focused: g,
22
+ render: r
23
+ } = e, d = B(), s = d && d.uDropDownsBase, p = (x) => e.onClick(e.index, x), m = /* @__PURE__ */ a.createElement(
24
+ "li",
25
+ {
26
+ id: f,
27
+ role: "option",
28
+ "aria-selected": o,
29
+ "aria-disabled": n ? !0 : void 0,
30
+ className: l(i.li({
31
+ c: s,
32
+ selected: o,
33
+ focused: g,
34
+ first: !!t && c === "classic",
35
+ disabled: n
36
+ })),
37
+ onClick: p,
38
+ style: { position: v ? "relative" : "unset" }
39
+ },
40
+ /* @__PURE__ */ a.createElement("span", { className: l(i.itemText({ c: s })) }, C(u, e.textField).toString()),
41
+ t !== void 0 && c === "classic" ? /* @__PURE__ */ a.createElement("div", { className: l(i.itemGroupLabel({ c: s })) }, t) : null
42
+ );
43
+ return r !== void 0 ? r.call(void 0, m, e) : m;
44
+ }, b = D;
47
45
  export {
48
- h as default
46
+ b as default
49
47
  };
@@ -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 u=require("@progress/kendo-react-common"),h=require("react");function b(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>a[e]})}}return t.default=a,Object.freeze(t)}const c=b(h);class g extends c.Component{constructor(){super(...arguments),this._input=null}get input(){return this._input}componentDidUpdate(t){const e=t.value,s=t.suggestedText,{value:n,suggestedText:i,focused:o}=this.props,r=this.input,p=e!==n||i!==s,l=p&&e.startsWith(n)&&!(s&&i&&s.endsWith(i)),d=u.getActiveElement(document);o&&r&&d!==r&&r.focus(),i&&p&&!l&&r&&r.setSelectionRange(n.length-i.length,n.length)}render(){const{expanded:t=!1,disabled:e,role:s="listbox",render:n}=this.props,i=c.createElement("input",{autoComplete:"off",id:this.props.id,type:"text",key:"searchbar",size:this.props.size,placeholder:this.props.placeholder,className:"k-input-inner",tabIndex:this.props.tabIndex,accessKey:this.props.accessKey,role:s,name:this.props.name,value:this.props.value,onChange:this.props.onChange,ref:o=>this._input=o,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});return n?n.call(void 0,i):i}}module.exports=g;
8
+ "use client";"use strict";const u=require("@progress/kendo-react-common"),h=require("react");function b(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>n[e]})}}return t.default=n,Object.freeze(t)}const l=b(h);class g extends l.Component{constructor(){super(...arguments),this._input=null}get input(){return this._input}componentDidUpdate(t){const e=t.value,s=t.suggestedText,{value:r,suggestedText:a,focused:p}=this.props,i=this.input,o=e!==r||a!==s,c=o&&e.startsWith(r)&&!(s&&a&&s.endsWith(a)),d=u.getActiveElement(document);p&&i&&d!==i&&i.focus(),a&&o&&!c&&i&&i.setSelectionRange(r.length-a.length,r.length)}render(){const{expanded:t=!1,disabled:e,role:s="listbox",render:r,tabIndex:a,accessKey:p}=this.props,i={tabIndex:a,accessKey:p},o=l.createElement("input",{autoComplete:"off",id:this.props.id,type:"text",key:"searchbar",size:this.props.size,placeholder:this.props.placeholder,className:"k-input-inner",role:s,name:this.props.name,value:this.props.value,onChange:this.props.onChange,ref:c=>this._input=c,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,...i});return r?r.call(void 0,o):o}}module.exports=g;
@@ -7,8 +7,8 @@
7
7
  */
8
8
  "use client";
9
9
  import { getActiveElement as c } from "@progress/kendo-react-common";
10
- import * as p from "react";
11
- class b extends p.Component {
10
+ import * as l from "react";
11
+ class g extends l.Component {
12
12
  constructor() {
13
13
  super(...arguments), this._input = null;
14
14
  }
@@ -18,12 +18,15 @@ class b extends p.Component {
18
18
  get input() {
19
19
  return this._input;
20
20
  }
21
- componentDidUpdate(t) {
22
- const i = t.value, a = t.suggestedText, { value: s, suggestedText: e, focused: r } = this.props, o = this.input, n = i !== s || e !== a, l = n && i.startsWith(s) && !(a && e && a.endsWith(e)), d = c(document);
23
- r && o && d !== o && o.focus(), e && n && !l && o && o.setSelectionRange(s.length - e.length, s.length);
21
+ componentDidUpdate(i) {
22
+ const a = i.value, r = i.suggestedText, { value: e, suggestedText: t, focused: n } = this.props, s = this.input, o = a !== e || t !== r, p = o && a.startsWith(e) && !(r && t && r.endsWith(t)), d = c(document);
23
+ n && s && d !== s && s.focus(), t && o && !p && s && s.setSelectionRange(e.length - t.length, e.length);
24
24
  }
25
25
  render() {
26
- const { expanded: t = !1, disabled: i, role: a = "listbox", render: s } = this.props, e = /* @__PURE__ */ p.createElement(
26
+ const { expanded: i = !1, disabled: a, role: r = "listbox", render: e, tabIndex: t, accessKey: n } = this.props, s = {
27
+ tabIndex: t,
28
+ accessKey: n
29
+ }, o = /* @__PURE__ */ l.createElement(
27
30
  "input",
28
31
  {
29
32
  autoComplete: "off",
@@ -33,34 +36,34 @@ class b extends p.Component {
33
36
  size: this.props.size,
34
37
  placeholder: this.props.placeholder,
35
38
  className: "k-input-inner",
36
- tabIndex: this.props.tabIndex,
37
- accessKey: this.props.accessKey,
38
- role: a,
39
+ role: r,
39
40
  name: this.props.name,
40
41
  value: this.props.value,
41
42
  onChange: this.props.onChange,
42
- ref: (r) => this._input = r,
43
+ ref: (p) => this._input = p,
43
44
  onKeyDown: this.props.onKeyDown,
44
45
  onFocus: this.props.onFocus,
45
46
  onBlur: this.props.onBlur,
46
47
  onClick: this.props.onClick,
47
- "aria-disabled": i || void 0,
48
- disabled: i || void 0,
48
+ "aria-disabled": a || void 0,
49
+ disabled: a || void 0,
49
50
  readOnly: this.props.readOnly || void 0,
50
51
  title: this.props.title,
51
52
  "aria-haspopup": "listbox",
52
- "aria-expanded": t,
53
+ "aria-expanded": i,
53
54
  "aria-owns": this.props.owns,
54
- "aria-activedescendant": t ? this.props.activedescendant : void 0,
55
+ "aria-activedescendant": i ? this.props.activedescendant : void 0,
55
56
  "aria-describedby": this.props.ariaDescribedBy,
56
57
  "aria-labelledby": this.props.ariaLabelledBy,
57
58
  "aria-label": this.props.ariaLabel,
58
- "aria-required": this.props.ariaRequired
59
+ "aria-required": this.props.ariaRequired,
60
+ "aria-controls": this.props.ariaControls,
61
+ ...s
59
62
  }
60
63
  );
61
- return s ? s.call(void 0, e) : e;
64
+ return e ? e.call(void 0, o) : o;
62
65
  }
63
66
  }
64
67
  export {
65
- b as default
68
+ g as default
66
69
  };