@progress/kendo-react-buttons 7.0.0-develop.11 → 7.0.0-develop.13
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.
- package/ListButton/DropDownButton.d.ts +6 -1
- package/ListButton/SplitButton.d.ts +6 -1
- package/dist/cdn/js/kendo-react-buttons.js +1 -1
- package/index.d.ts +8 -4
- package/index.js +1 -1
- package/index.mjs +238 -225
- package/package.json +3 -3
package/index.mjs
CHANGED
|
@@ -2,28 +2,29 @@
|
|
|
2
2
|
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use client";
|
|
5
6
|
import * as n from "react";
|
|
6
|
-
import
|
|
7
|
+
import Ie from "react";
|
|
7
8
|
import * as s from "prop-types";
|
|
8
|
-
import { svgIconPropType as
|
|
9
|
-
import { Popup as
|
|
10
|
-
import { caretAltDownIcon as
|
|
9
|
+
import { svgIconPropType as R, validatePackage as M, classNames as f, kendoThemeMaps as P, IconWrap as A, Keys as r, dispatchEvent as x, getActiveElement as se, useDir as xe, useMouse as $e, getTabIndex as me, toIconName as ve, getter as Re, useZIndexContext as rt, useId as Me, ZIndexContext as ct, withIdHOC as Ae } from "@progress/kendo-react-common";
|
|
10
|
+
import { Popup as De } from "@progress/kendo-react-popup";
|
|
11
|
+
import { caretAltDownIcon as dt, xCircleIcon as ut } from "@progress/kendo-svg-icons";
|
|
11
12
|
const O = {
|
|
12
13
|
name: "@progress/kendo-react-buttons",
|
|
13
14
|
productName: "KendoReact",
|
|
14
15
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
15
|
-
publishDate:
|
|
16
|
+
publishDate: 1702024467,
|
|
16
17
|
version: "",
|
|
17
18
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
18
19
|
};
|
|
19
|
-
function
|
|
20
|
+
function ht({ imageUrl: e, name: o, iconClass: t, svgIcon: i, imageAlt: a }) {
|
|
20
21
|
return e ? /* @__PURE__ */ n.createElement("img", { role: "presentation", className: "k-button-icon", alt: a, src: e }) : o || i ? /* @__PURE__ */ n.createElement(A, { className: "k-button-icon", name: o, icon: i }) : t ? /* @__PURE__ */ n.createElement("span", { role: "presentation", className: f("k-button-icon", t) }) : null;
|
|
21
22
|
}
|
|
22
23
|
const ee = class extends n.Component {
|
|
23
24
|
constructor(e) {
|
|
24
25
|
super(e), this._element = null, this.handleClick = (o) => {
|
|
25
26
|
this.toggleIfApplicable(), this.props.onClick && this.props.onClick.call(void 0, o);
|
|
26
|
-
},
|
|
27
|
+
}, M(O), this.state = { selected: this.props.togglable === !0 && this.props.selected === !0 };
|
|
27
28
|
}
|
|
28
29
|
/**
|
|
29
30
|
* Gets the DOM element of the Button component.
|
|
@@ -63,7 +64,7 @@ const ee = class extends n.Component {
|
|
|
63
64
|
fillMode: D = ee.defaultProps.fillMode,
|
|
64
65
|
themeColor: N = ee.defaultProps.themeColor,
|
|
65
66
|
...w
|
|
66
|
-
} = this.props, S = a !== void 0 || t !== void 0 || i !== void 0 || l !== void 0, F = e !== void 0, I =
|
|
67
|
+
} = this.props, S = a !== void 0 || t !== void 0 || i !== void 0 || l !== void 0, F = e !== void 0, I = ht({
|
|
67
68
|
name: t,
|
|
68
69
|
svgIcon: a,
|
|
69
70
|
iconClass: i,
|
|
@@ -80,10 +81,10 @@ const ee = class extends n.Component {
|
|
|
80
81
|
className: f(
|
|
81
82
|
"k-button",
|
|
82
83
|
{
|
|
83
|
-
[`k-button-${
|
|
84
|
+
[`k-button-${P.sizeMap[v] || v}`]: v,
|
|
84
85
|
[`k-button-${D}`]: D,
|
|
85
86
|
[`k-button-${D}-${N}`]: !!(D && N),
|
|
86
|
-
[`k-rounded-${
|
|
87
|
+
[`k-rounded-${P.roundedMap[h] || h}`]: h,
|
|
87
88
|
"k-icon-button": !F && S,
|
|
88
89
|
"k-disabled": this.props.disabled,
|
|
89
90
|
"k-selected": this.state.selected,
|
|
@@ -109,7 +110,7 @@ ne.propTypes = {
|
|
|
109
110
|
selected: s.bool,
|
|
110
111
|
togglable: s.bool,
|
|
111
112
|
icon: s.string,
|
|
112
|
-
svgIcon:
|
|
113
|
+
svgIcon: R,
|
|
113
114
|
iconClass: s.string,
|
|
114
115
|
imageUrl: s.string,
|
|
115
116
|
imageAlt: s.string,
|
|
@@ -126,7 +127,7 @@ ne.defaultProps = {
|
|
|
126
127
|
fillMode: "solid",
|
|
127
128
|
themeColor: "base"
|
|
128
129
|
};
|
|
129
|
-
const
|
|
130
|
+
const pt = {
|
|
130
131
|
button: "k-button",
|
|
131
132
|
flat: "k-flat",
|
|
132
133
|
outline: "k-outline",
|
|
@@ -142,17 +143,17 @@ const ht = {
|
|
|
142
143
|
"button-group-stretched": "k-button-group-stretched",
|
|
143
144
|
ltr: "k-ltr",
|
|
144
145
|
rtl: "k-rtl"
|
|
145
|
-
},
|
|
146
|
-
"button" +
|
|
147
|
-
".k-button-group > button" +
|
|
146
|
+
}, Oe = ":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)", mt = [
|
|
147
|
+
"button" + Oe,
|
|
148
|
+
".k-button-group > button" + Oe,
|
|
148
149
|
".k-colorpicker",
|
|
149
150
|
".k-dropdownlist"
|
|
150
|
-
],
|
|
151
|
-
styles:
|
|
152
|
-
}, ue =
|
|
153
|
-
class
|
|
151
|
+
], ft = {
|
|
152
|
+
styles: pt
|
|
153
|
+
}, ue = ft.styles;
|
|
154
|
+
class bt extends n.Component {
|
|
154
155
|
constructor(o) {
|
|
155
|
-
super(o), this._element = null,
|
|
156
|
+
super(o), this._element = null, M(O);
|
|
156
157
|
}
|
|
157
158
|
/**
|
|
158
159
|
* @hidden
|
|
@@ -202,14 +203,14 @@ class ft extends n.Component {
|
|
|
202
203
|
return n.Children.count(o.props.children) > 0 ? n.cloneElement(o, g, o.props.children) : n.cloneElement(o, g);
|
|
203
204
|
}
|
|
204
205
|
}
|
|
205
|
-
|
|
206
|
+
bt.propTypes = {
|
|
206
207
|
children: s.oneOfType([s.arrayOf(s.element), s.element]),
|
|
207
208
|
className: s.string,
|
|
208
209
|
disabled: s.bool,
|
|
209
210
|
width: s.string,
|
|
210
211
|
dir: s.string
|
|
211
212
|
};
|
|
212
|
-
const
|
|
213
|
+
const we = (e) => {
|
|
213
214
|
const o = n.useCallback(
|
|
214
215
|
(l) => {
|
|
215
216
|
e.onClick(l, e.index);
|
|
@@ -258,8 +259,8 @@ const Ee = (e) => {
|
|
|
258
259
|
return e.item !== void 0 && /* to be removed in 5.0.0 */
|
|
259
260
|
e.render !== void 0 ? e.render.call(void 0, a, e) : a;
|
|
260
261
|
};
|
|
261
|
-
|
|
262
|
-
class
|
|
262
|
+
we.displayName = "KendoReactButtonItem";
|
|
263
|
+
class Te extends n.Component {
|
|
263
264
|
/**
|
|
264
265
|
* @hidden
|
|
265
266
|
*/
|
|
@@ -267,7 +268,7 @@ class Ke extends n.Component {
|
|
|
267
268
|
return null;
|
|
268
269
|
}
|
|
269
270
|
}
|
|
270
|
-
|
|
271
|
+
Te.propTypes = {
|
|
271
272
|
text: s.string,
|
|
272
273
|
icon: s.string,
|
|
273
274
|
iconClass: s.string,
|
|
@@ -275,7 +276,7 @@ Ke.propTypes = {
|
|
|
275
276
|
disabled: s.bool,
|
|
276
277
|
render: s.any
|
|
277
278
|
};
|
|
278
|
-
const
|
|
279
|
+
const Le = (e, o, t, i) => {
|
|
279
280
|
if (t)
|
|
280
281
|
return e;
|
|
281
282
|
const a = Math.min(i - 1, Math.max(0, e));
|
|
@@ -298,21 +299,21 @@ const $e = (e, o, t, i) => {
|
|
|
298
299
|
return e;
|
|
299
300
|
}
|
|
300
301
|
};
|
|
301
|
-
function
|
|
302
|
+
function _e(e) {
|
|
302
303
|
let o = { horizontal: "left", vertical: "bottom" };
|
|
303
304
|
return e && (o.horizontal = "right"), o;
|
|
304
305
|
}
|
|
305
|
-
function
|
|
306
|
+
function He(e) {
|
|
306
307
|
let o = { horizontal: "left", vertical: "top" };
|
|
307
308
|
return e && (o.horizontal = "right"), o;
|
|
308
309
|
}
|
|
309
|
-
class
|
|
310
|
+
let Ee = class extends n.Component {
|
|
310
311
|
constructor(o) {
|
|
311
312
|
super(o), this.state = {
|
|
312
313
|
focused: !1,
|
|
313
314
|
focusedIndex: -1,
|
|
314
315
|
opened: !1
|
|
315
|
-
}, this.wrapper = null, this.mainButton = null, this.list = null, this.
|
|
316
|
+
}, this.wrapper = null, this.mainButton = null, this.list = null, this.skipFocus = !1, this.buttonsData = [], this.onKeyDown = (t) => {
|
|
316
317
|
const { focusedIndex: i } = this.state;
|
|
317
318
|
if (t.altKey) {
|
|
318
319
|
!this.opened && t.keyCode === r.down ? (this.dispatchPopupEvent(t, !0), this.setState({ focusedIndex: 0 }), this.setOpen(!0)) : this.opened && t.keyCode === r.up && (this.setState({ focusedIndex: -1 }), this.setOpen(!1));
|
|
@@ -332,7 +333,7 @@ class Le extends n.Component {
|
|
|
332
333
|
return;
|
|
333
334
|
}
|
|
334
335
|
if (this.opened) {
|
|
335
|
-
const l =
|
|
336
|
+
const l = Le(
|
|
336
337
|
i,
|
|
337
338
|
t.keyCode,
|
|
338
339
|
t.altKey,
|
|
@@ -380,7 +381,10 @@ class Le extends n.Component {
|
|
|
380
381
|
se(document) === this.list && t.preventDefault();
|
|
381
382
|
}, this.dispatchPopupEvent = (t, i) => {
|
|
382
383
|
x(i ? this.props.onOpen : this.props.onClose, t, this, void 0), this.openedDuringOnChange = void 0;
|
|
383
|
-
},
|
|
384
|
+
}, M(O);
|
|
385
|
+
}
|
|
386
|
+
get guid() {
|
|
387
|
+
return this.props.id ? this.props.id + "-accessibility-id" : this.props.id;
|
|
384
388
|
}
|
|
385
389
|
get opened() {
|
|
386
390
|
return this.openedDuringOnChange !== void 0 ? this.openedDuringOnChange : this.props.opened === void 0 ? this.state.opened : this.props.opened;
|
|
@@ -389,7 +393,7 @@ class Le extends n.Component {
|
|
|
389
393
|
* @hidden
|
|
390
394
|
*/
|
|
391
395
|
render() {
|
|
392
|
-
this.buttonsData = this.props.items || n.Children.toArray(this.props.children).filter((c) => c && c.type ===
|
|
396
|
+
this.buttonsData = this.props.items || n.Children.toArray(this.props.children).filter((c) => c && c.type === Te).map((c) => c.props);
|
|
393
397
|
const o = this.isRtl(), t = o ? "rtl" : void 0, { id: i, style: a, tabIndex: l, disabled: u } = this.props;
|
|
394
398
|
return /* @__PURE__ */ n.createElement(
|
|
395
399
|
"div",
|
|
@@ -402,7 +406,7 @@ class Le extends n.Component {
|
|
|
402
406
|
{
|
|
403
407
|
"k-focus": this.state.focused
|
|
404
408
|
},
|
|
405
|
-
`k-rounded-${
|
|
409
|
+
`k-rounded-${P.roundedMap[this.props.rounded || "medium"]}`,
|
|
406
410
|
this.props.className
|
|
407
411
|
),
|
|
408
412
|
onKeyDown: this.onKeyDown,
|
|
@@ -449,7 +453,7 @@ class Le extends n.Component {
|
|
|
449
453
|
fillMode: this.props.fillMode,
|
|
450
454
|
themeColor: this.props.themeColor,
|
|
451
455
|
icon: "caret-alt-down",
|
|
452
|
-
svgIcon:
|
|
456
|
+
svgIcon: dt,
|
|
453
457
|
className: "k-split-button-arrow",
|
|
454
458
|
disabled: u || void 0,
|
|
455
459
|
tabIndex: -1,
|
|
@@ -489,14 +493,14 @@ class Le extends n.Component {
|
|
|
489
493
|
renderPopup(o) {
|
|
490
494
|
const { popupSettings: t = {} } = this.props, { focusedIndex: i } = this.state;
|
|
491
495
|
return /* @__PURE__ */ n.createElement(
|
|
492
|
-
|
|
496
|
+
De,
|
|
493
497
|
{
|
|
494
498
|
anchor: this.wrapper,
|
|
495
499
|
show: this.opened,
|
|
496
500
|
animate: t.animate,
|
|
497
501
|
popupClass: f("k-menu-popup", t.popupClass),
|
|
498
|
-
anchorAlign: t.anchorAlign ||
|
|
499
|
-
popupAlign: t.popupAlign ||
|
|
502
|
+
anchorAlign: t.anchorAlign || _e(o),
|
|
503
|
+
popupAlign: t.popupAlign || He(o),
|
|
500
504
|
style: o ? { direction: "rtl" } : void 0,
|
|
501
505
|
onClose: this.onPopupClose
|
|
502
506
|
},
|
|
@@ -510,7 +514,7 @@ class Le extends n.Component {
|
|
|
510
514
|
ref: this.listRef,
|
|
511
515
|
"aria-activedescendant": i >= 0 ? `${this.guid}-${i}` : void 0,
|
|
512
516
|
className: f("k-group k-menu-group k-reset", {
|
|
513
|
-
[`k-menu-group-${
|
|
517
|
+
[`k-menu-group-${P.sizeMap[this.props.size] || this.props.size}`]: this.props.size
|
|
514
518
|
})
|
|
515
519
|
},
|
|
516
520
|
this.renderChildItems()
|
|
@@ -520,7 +524,7 @@ class Le extends n.Component {
|
|
|
520
524
|
renderChildItems() {
|
|
521
525
|
const { item: o, itemRender: t, textField: i } = this.props;
|
|
522
526
|
return this.buttonsData.length > 0 ? this.buttonsData.map((a, l) => /* @__PURE__ */ n.createElement(
|
|
523
|
-
|
|
527
|
+
we,
|
|
524
528
|
{
|
|
525
529
|
className: "k-menu-item",
|
|
526
530
|
dataItem: a,
|
|
@@ -542,8 +546,8 @@ class Le extends n.Component {
|
|
|
542
546
|
isRtl() {
|
|
543
547
|
return this.props.dir !== void 0 ? this.props.dir === "rtl" : !!this.wrapper && getComputedStyle(this.wrapper).direction === "rtl";
|
|
544
548
|
}
|
|
545
|
-
}
|
|
546
|
-
|
|
549
|
+
};
|
|
550
|
+
Ee.propTypes = {
|
|
547
551
|
accessKey: s.string,
|
|
548
552
|
ariaLabel: s.string,
|
|
549
553
|
title: s.string,
|
|
@@ -559,7 +563,7 @@ Le.propTypes = {
|
|
|
559
563
|
tabIndex: s.number,
|
|
560
564
|
disabled: s.bool,
|
|
561
565
|
icon: s.string,
|
|
562
|
-
svgIcon:
|
|
566
|
+
svgIcon: R,
|
|
563
567
|
iconClass: s.string,
|
|
564
568
|
imageUrl: s.string,
|
|
565
569
|
popupSettings: s.object,
|
|
@@ -569,13 +573,13 @@ Le.propTypes = {
|
|
|
569
573
|
buttonClass: s.string,
|
|
570
574
|
dir: s.string
|
|
571
575
|
};
|
|
572
|
-
|
|
576
|
+
Ee.defaultProps = {
|
|
573
577
|
size: "medium",
|
|
574
578
|
rounded: "medium",
|
|
575
579
|
fillMode: "solid",
|
|
576
580
|
themeColor: "base"
|
|
577
581
|
};
|
|
578
|
-
class
|
|
582
|
+
class Ue extends n.Component {
|
|
579
583
|
/**
|
|
580
584
|
* @hidden
|
|
581
585
|
*/
|
|
@@ -583,7 +587,7 @@ class _e extends n.Component {
|
|
|
583
587
|
return null;
|
|
584
588
|
}
|
|
585
589
|
}
|
|
586
|
-
|
|
590
|
+
Ue.propTypes = {
|
|
587
591
|
text: s.string,
|
|
588
592
|
icon: s.string,
|
|
589
593
|
iconClass: s.string,
|
|
@@ -592,13 +596,13 @@ _e.propTypes = {
|
|
|
592
596
|
disabled: s.bool,
|
|
593
597
|
render: s.any
|
|
594
598
|
};
|
|
595
|
-
class
|
|
599
|
+
let Ne = class extends n.Component {
|
|
596
600
|
constructor(o) {
|
|
597
601
|
super(o), this.state = {
|
|
598
602
|
opened: !1,
|
|
599
603
|
focused: !1,
|
|
600
604
|
focusedIndex: -1
|
|
601
|
-
}, this.wrapper = null, this.mainButton = null, this.list = null, this.skipFocus = !1, this.
|
|
605
|
+
}, this.wrapper = null, this.mainButton = null, this.list = null, this.skipFocus = !1, this.buttonsData = [], this.onKeyDown = (t) => {
|
|
602
606
|
const { focusedIndex: i } = this.state;
|
|
603
607
|
if (t.altKey) {
|
|
604
608
|
!this.opened && t.keyCode === r.down ? (this.setOpen(!0), this.dispatchPopupEvent(t, !0), this.setState({ focusedIndex: 0 })) : this.opened && t.keyCode === r.up && (this.setState({ focusedIndex: -1 }), this.setOpen(!1));
|
|
@@ -615,7 +619,7 @@ class He extends n.Component {
|
|
|
615
619
|
return;
|
|
616
620
|
}
|
|
617
621
|
if (this.opened) {
|
|
618
|
-
const l =
|
|
622
|
+
const l = Le(
|
|
619
623
|
i,
|
|
620
624
|
t.keyCode,
|
|
621
625
|
t.altKey,
|
|
@@ -660,7 +664,10 @@ class He extends n.Component {
|
|
|
660
664
|
}), this.setOpen(i), i && this.dispatchPopupEvent(t, i);
|
|
661
665
|
}, this.dispatchPopupEvent = (t, i) => {
|
|
662
666
|
x(i ? this.props.onOpen : this.props.onClose, t, this, void 0), this.openedDuringOnChange = void 0;
|
|
663
|
-
},
|
|
667
|
+
}, M(O);
|
|
668
|
+
}
|
|
669
|
+
get guid() {
|
|
670
|
+
return this.props.id + "-accessibility-id";
|
|
664
671
|
}
|
|
665
672
|
get opened() {
|
|
666
673
|
return this.openedDuringOnChange !== void 0 ? this.openedDuringOnChange : this.props.opened === void 0 ? this.state.opened : this.props.opened;
|
|
@@ -670,7 +677,7 @@ class He extends n.Component {
|
|
|
670
677
|
*/
|
|
671
678
|
render() {
|
|
672
679
|
const o = this.isRtl(), t = o ? "rtl" : void 0, { id: i, style: a, tabIndex: l, disabled: u } = this.props;
|
|
673
|
-
return this.buttonsData = this.props.items || n.Children.toArray(this.props.children).filter((c) => c && c.type ===
|
|
680
|
+
return this.buttonsData = this.props.items || n.Children.toArray(this.props.children).filter((c) => c && c.type === Ue).map((c) => c.props), /* @__PURE__ */ n.createElement(
|
|
674
681
|
"div",
|
|
675
682
|
{
|
|
676
683
|
id: i,
|
|
@@ -746,14 +753,14 @@ class He extends n.Component {
|
|
|
746
753
|
renderPopup(o) {
|
|
747
754
|
const { popupSettings: t = {} } = this.props, { focusedIndex: i } = this.state;
|
|
748
755
|
return /* @__PURE__ */ n.createElement(
|
|
749
|
-
|
|
756
|
+
De,
|
|
750
757
|
{
|
|
751
758
|
anchor: this.wrapper,
|
|
752
759
|
show: this.opened,
|
|
753
760
|
animate: t.animate,
|
|
754
761
|
popupClass: f("k-menu-popup", t.popupClass),
|
|
755
|
-
anchorAlign: t.anchorAlign ||
|
|
756
|
-
popupAlign: t.popupAlign ||
|
|
762
|
+
anchorAlign: t.anchorAlign || _e(o),
|
|
763
|
+
popupAlign: t.popupAlign || He(o),
|
|
757
764
|
style: o ? { direction: "rtl" } : void 0,
|
|
758
765
|
onClose: this.onPopupClose
|
|
759
766
|
},
|
|
@@ -767,7 +774,7 @@ class He extends n.Component {
|
|
|
767
774
|
"aria-activedescendant": i >= 0 ? `${this.guid}-${i}` : void 0,
|
|
768
775
|
ref: this.listRef,
|
|
769
776
|
className: f("k-group k-menu-group k-reset", {
|
|
770
|
-
[`k-menu-group-${
|
|
777
|
+
[`k-menu-group-${P.sizeMap[this.props.size] || this.props.size}`]: this.props.size
|
|
771
778
|
})
|
|
772
779
|
},
|
|
773
780
|
this.renderChildItems()
|
|
@@ -777,7 +784,7 @@ class He extends n.Component {
|
|
|
777
784
|
renderChildItems() {
|
|
778
785
|
const { item: o, itemRender: t, textField: i } = this.props;
|
|
779
786
|
return this.buttonsData.length > 0 ? this.buttonsData.map((a, l) => /* @__PURE__ */ n.createElement(
|
|
780
|
-
|
|
787
|
+
we,
|
|
781
788
|
{
|
|
782
789
|
className: "k-menu-item",
|
|
783
790
|
dataItem: a,
|
|
@@ -799,8 +806,8 @@ class He extends n.Component {
|
|
|
799
806
|
isRtl() {
|
|
800
807
|
return this.props.dir !== void 0 ? this.props.dir === "rtl" : !!this.wrapper && getComputedStyle(this.wrapper).direction === "rtl";
|
|
801
808
|
}
|
|
802
|
-
}
|
|
803
|
-
|
|
809
|
+
};
|
|
810
|
+
Ne.propTypes = {
|
|
804
811
|
accessKey: s.string,
|
|
805
812
|
ariaLabel: s.string,
|
|
806
813
|
title: s.string,
|
|
@@ -814,7 +821,7 @@ He.propTypes = {
|
|
|
814
821
|
tabIndex: s.number,
|
|
815
822
|
disabled: s.bool,
|
|
816
823
|
icon: s.string,
|
|
817
|
-
svgIcon:
|
|
824
|
+
svgIcon: R,
|
|
818
825
|
iconClass: s.string,
|
|
819
826
|
imageUrl: s.string,
|
|
820
827
|
popupSettings: s.object,
|
|
@@ -824,16 +831,16 @@ He.propTypes = {
|
|
|
824
831
|
buttonClass: s.string,
|
|
825
832
|
dir: s.string
|
|
826
833
|
};
|
|
827
|
-
|
|
834
|
+
Ne.defaultProps = {
|
|
828
835
|
size: "medium",
|
|
829
836
|
rounded: "medium",
|
|
830
837
|
fillMode: "solid",
|
|
831
838
|
themeColor: "base"
|
|
832
839
|
};
|
|
833
|
-
const
|
|
840
|
+
const Ce = class extends n.Component {
|
|
834
841
|
constructor(e) {
|
|
835
842
|
super(e), this._element = null, this.offsetHeight = 0, this.offsetWidth = 0, this.buttons = [], this.focusedSelector = this.selectors.map((o) => o + ":focus").join(","), this.setTabIndex = (o) => {
|
|
836
|
-
const { tabIndex: t =
|
|
843
|
+
const { tabIndex: t = Ce.defaultProps.tabIndex } = this.props;
|
|
837
844
|
this.buttons.forEach((i, a) => {
|
|
838
845
|
i.tabIndex = a === o ? t : -1;
|
|
839
846
|
});
|
|
@@ -853,10 +860,10 @@ const Ie = class extends n.Component {
|
|
|
853
860
|
const l = { offsetWidth: this.offsetWidth, offsetHeight: this.offsetHeight };
|
|
854
861
|
this.props.onResize && this.props.onResize.call(void 0, { target: this, ...l, nativeEvent: o });
|
|
855
862
|
}
|
|
856
|
-
},
|
|
863
|
+
}, M(O);
|
|
857
864
|
}
|
|
858
865
|
get selectors() {
|
|
859
|
-
return this.props.buttons ||
|
|
866
|
+
return this.props.buttons || mt;
|
|
860
867
|
}
|
|
861
868
|
get focusedIndex() {
|
|
862
869
|
const e = this.element && this.element.querySelector(this.focusedSelector);
|
|
@@ -901,7 +908,7 @@ const Ie = class extends n.Component {
|
|
|
901
908
|
className: f(
|
|
902
909
|
"k-toolbar",
|
|
903
910
|
{
|
|
904
|
-
[`k-toolbar-${
|
|
911
|
+
[`k-toolbar-${P.sizeMap[this.props.size] || this.props.size}`]: this.props.size
|
|
905
912
|
},
|
|
906
913
|
this.props.className
|
|
907
914
|
),
|
|
@@ -915,7 +922,7 @@ const Ie = class extends n.Component {
|
|
|
915
922
|
);
|
|
916
923
|
}
|
|
917
924
|
focusButton(e, o) {
|
|
918
|
-
const { tabIndex: t =
|
|
925
|
+
const { tabIndex: t = Ce.defaultProps.tabIndex } = this.props, i = this.buttons[o];
|
|
919
926
|
if (i) {
|
|
920
927
|
i.tabIndex = t, i.focus();
|
|
921
928
|
const a = this.buttons[e];
|
|
@@ -923,8 +930,8 @@ const Ie = class extends n.Component {
|
|
|
923
930
|
}
|
|
924
931
|
}
|
|
925
932
|
};
|
|
926
|
-
let
|
|
927
|
-
|
|
933
|
+
let We = Ce;
|
|
934
|
+
We.propTypes = {
|
|
928
935
|
tabIndex: s.number,
|
|
929
936
|
dir: s.string,
|
|
930
937
|
keyboardNavigation: s.bool,
|
|
@@ -935,11 +942,11 @@ Ue.propTypes = {
|
|
|
935
942
|
buttons: s.arrayOf(s.string),
|
|
936
943
|
size: s.oneOf([null, "small", "medium", "large"])
|
|
937
944
|
};
|
|
938
|
-
|
|
945
|
+
We.defaultProps = {
|
|
939
946
|
tabIndex: 0,
|
|
940
947
|
size: "medium"
|
|
941
948
|
};
|
|
942
|
-
class
|
|
949
|
+
class gt extends n.PureComponent {
|
|
943
950
|
constructor() {
|
|
944
951
|
super(...arguments), this._element = null;
|
|
945
952
|
}
|
|
@@ -965,10 +972,10 @@ class bt extends n.PureComponent {
|
|
|
965
972
|
);
|
|
966
973
|
}
|
|
967
974
|
}
|
|
968
|
-
|
|
975
|
+
gt.propTypes = {
|
|
969
976
|
className: s.string
|
|
970
977
|
};
|
|
971
|
-
class
|
|
978
|
+
class Ut extends n.PureComponent {
|
|
972
979
|
/**
|
|
973
980
|
* @hidden
|
|
974
981
|
*/
|
|
@@ -976,7 +983,7 @@ class At extends n.PureComponent {
|
|
|
976
983
|
return /* @__PURE__ */ n.createElement("div", { className: f("k-separator", this.props.className) });
|
|
977
984
|
}
|
|
978
985
|
}
|
|
979
|
-
const
|
|
986
|
+
const je = n.forwardRef((e, o) => {
|
|
980
987
|
const t = n.useRef(null), i = n.useRef(null);
|
|
981
988
|
n.useImperativeHandle(i, () => ({ element: t.current })), n.useImperativeHandle(o, () => ({ element: t.current }));
|
|
982
989
|
const a = n.useMemo(
|
|
@@ -994,16 +1001,16 @@ const We = n.forwardRef((e, o) => {
|
|
|
994
1001
|
}
|
|
995
1002
|
);
|
|
996
1003
|
});
|
|
997
|
-
|
|
998
|
-
|
|
1004
|
+
je.displayName = "KendoReactToolbarSpacer";
|
|
1005
|
+
je.propTypes = {
|
|
999
1006
|
className: s.string
|
|
1000
1007
|
};
|
|
1001
|
-
const
|
|
1002
|
-
}]),
|
|
1003
|
-
}]),
|
|
1008
|
+
const Ve = Ie.createContext([null, (e) => {
|
|
1009
|
+
}]), Ze = Ie.createContext([null, (e) => {
|
|
1010
|
+
}]), qe = Ie.createContext([null, (e) => {
|
|
1004
1011
|
}]);
|
|
1005
1012
|
var te = /* @__PURE__ */ ((e) => (e.next = "next", e.prev = "prev", e.current = "current", e.reset = "reset", e))(te || {});
|
|
1006
|
-
const
|
|
1013
|
+
const yt = (e, o) => {
|
|
1007
1014
|
const t = o.items.findIndex((i) => i === e);
|
|
1008
1015
|
switch (o.type) {
|
|
1009
1016
|
case "next":
|
|
@@ -1018,7 +1025,7 @@ const gt = (e, o) => {
|
|
|
1018
1025
|
return e;
|
|
1019
1026
|
}
|
|
1020
1027
|
};
|
|
1021
|
-
var
|
|
1028
|
+
var Ge = /* @__PURE__ */ ((e) => (e.remove = "remove", e.add = "add", e.reorder = "reorder", e))(Ge || {});
|
|
1022
1029
|
const kt = (e, o) => {
|
|
1023
1030
|
switch (o.type) {
|
|
1024
1031
|
case "add":
|
|
@@ -1032,7 +1039,7 @@ const kt = (e, o) => {
|
|
|
1032
1039
|
}
|
|
1033
1040
|
};
|
|
1034
1041
|
var pe = /* @__PURE__ */ ((e) => (e.toggle = "toggle", e.remove = "remove", e))(pe || {});
|
|
1035
|
-
const
|
|
1042
|
+
const vt = (e, o) => {
|
|
1036
1043
|
switch (o.selection) {
|
|
1037
1044
|
case "single":
|
|
1038
1045
|
switch (o.type) {
|
|
@@ -1066,13 +1073,13 @@ const yt = (e, o) => {
|
|
|
1066
1073
|
return e;
|
|
1067
1074
|
}
|
|
1068
1075
|
}, j = n.forwardRef((e, o) => {
|
|
1069
|
-
|
|
1070
|
-
const t = n.useRef(null), i = n.useRef(null), a =
|
|
1076
|
+
M(O);
|
|
1077
|
+
const t = n.useRef(null), i = n.useRef(null), a = xe(i, e.dir);
|
|
1071
1078
|
n.useImperativeHandle(t, () => ({
|
|
1072
1079
|
element: i.current,
|
|
1073
1080
|
props: e
|
|
1074
1081
|
})), n.useImperativeHandle(o, () => t.current);
|
|
1075
|
-
const [l, u] = n.useContext(
|
|
1082
|
+
const [l, u] = n.useContext(Ve), [c, g] = n.useContext(Ze), [, v] = n.useContext(qe), h = n.useMemo(
|
|
1076
1083
|
() => e.selected || (Array.isArray(l) ? l.some((p) => p === e.value) : l === e.value),
|
|
1077
1084
|
[e.selected, e.value, l]
|
|
1078
1085
|
), D = n.useMemo(
|
|
@@ -1092,7 +1099,7 @@ const yt = (e, o) => {
|
|
|
1092
1099
|
[u, e.value]
|
|
1093
1100
|
), w = n.useCallback(
|
|
1094
1101
|
(p) => {
|
|
1095
|
-
e.removable && (v({ type:
|
|
1102
|
+
e.removable && (v({ type: Ge.remove, payload: e.value, event: p }), g({ type: te.reset, payload: e.value, event: p }), u({ type: pe.remove, payload: e.value, event: p }), e.onRemove && e.onRemove.call(
|
|
1096
1103
|
void 0,
|
|
1097
1104
|
{
|
|
1098
1105
|
target: t.current,
|
|
@@ -1148,7 +1155,7 @@ const yt = (e, o) => {
|
|
|
1148
1155
|
);
|
|
1149
1156
|
},
|
|
1150
1157
|
[e.onBlur]
|
|
1151
|
-
), E =
|
|
1158
|
+
), E = $e(e, t, { onClick: N });
|
|
1152
1159
|
return /* @__PURE__ */ n.createElement(
|
|
1153
1160
|
"div",
|
|
1154
1161
|
{
|
|
@@ -1158,7 +1165,7 @@ const yt = (e, o) => {
|
|
|
1158
1165
|
style: e.style,
|
|
1159
1166
|
ref: i,
|
|
1160
1167
|
dir: a,
|
|
1161
|
-
tabIndex:
|
|
1168
|
+
tabIndex: me(e.tabIndex, e.disabled, void 0),
|
|
1162
1169
|
className: f(
|
|
1163
1170
|
"k-chip",
|
|
1164
1171
|
{
|
|
@@ -1166,8 +1173,8 @@ const yt = (e, o) => {
|
|
|
1166
1173
|
"k-disabled": e.disabled,
|
|
1167
1174
|
"k-selected": h,
|
|
1168
1175
|
"k-focus": D,
|
|
1169
|
-
[`k-chip-${
|
|
1170
|
-
[`k-rounded-${
|
|
1176
|
+
[`k-chip-${P.sizeMap[e.size] || e.size}`]: e.size,
|
|
1177
|
+
[`k-rounded-${P.roundedMap[e.rounded] || e.rounded}`]: e.rounded,
|
|
1171
1178
|
[`k-chip-${e.fillMode}`]: e.fillMode,
|
|
1172
1179
|
[`k-chip-${e.fillMode}-${e.themeColor}`]: !!(e.fillMode && e.themeColor)
|
|
1173
1180
|
},
|
|
@@ -1185,7 +1192,7 @@ const yt = (e, o) => {
|
|
|
1185
1192
|
A,
|
|
1186
1193
|
{
|
|
1187
1194
|
className: "k-chip-icon",
|
|
1188
|
-
name: e.selectedIcon ?
|
|
1195
|
+
name: e.selectedIcon ? ve(e.selectedIcon) : void 0,
|
|
1189
1196
|
icon: e.selectedSvgIcon,
|
|
1190
1197
|
size: "small"
|
|
1191
1198
|
}
|
|
@@ -1194,7 +1201,7 @@ const yt = (e, o) => {
|
|
|
1194
1201
|
A,
|
|
1195
1202
|
{
|
|
1196
1203
|
className: "k-chip-icon",
|
|
1197
|
-
name: e.icon ?
|
|
1204
|
+
name: e.icon ? ve(e.icon) : void 0,
|
|
1198
1205
|
icon: e.svgIcon,
|
|
1199
1206
|
size: "small"
|
|
1200
1207
|
}
|
|
@@ -1224,25 +1231,25 @@ const yt = (e, o) => {
|
|
|
1224
1231
|
e.removable && /* @__PURE__ */ n.createElement("span", { className: "k-chip-actions" }, /* @__PURE__ */ n.createElement("span", { className: f("k-chip-action", "k-chip-remove-action"), onClick: w }, /* @__PURE__ */ n.createElement(
|
|
1225
1232
|
A,
|
|
1226
1233
|
{
|
|
1227
|
-
name: e.removeIcon ?
|
|
1228
|
-
icon: e.removeSvgIcon ||
|
|
1234
|
+
name: e.removeIcon ? ve(e.removeIcon) : void 0,
|
|
1235
|
+
icon: e.removeSvgIcon || ut,
|
|
1229
1236
|
size: "small"
|
|
1230
1237
|
}
|
|
1231
1238
|
)))
|
|
1232
1239
|
);
|
|
1233
|
-
}),
|
|
1240
|
+
}), Ct = {
|
|
1234
1241
|
id: s.string,
|
|
1235
1242
|
text: s.string,
|
|
1236
1243
|
value: s.any,
|
|
1237
1244
|
dir: s.oneOf(["ltr", "rtl"]),
|
|
1238
1245
|
removable: s.bool,
|
|
1239
1246
|
removeIcon: s.string,
|
|
1240
|
-
removeIconSvg:
|
|
1247
|
+
removeIconSvg: R,
|
|
1241
1248
|
disabled: s.bool,
|
|
1242
1249
|
icon: s.string,
|
|
1243
|
-
svgIcon:
|
|
1250
|
+
svgIcon: R,
|
|
1244
1251
|
selectedIcon: s.string,
|
|
1245
|
-
selectedIconSvg:
|
|
1252
|
+
selectedIconSvg: R,
|
|
1246
1253
|
onRemove: s.func,
|
|
1247
1254
|
dataItem: s.any,
|
|
1248
1255
|
selected: s.bool,
|
|
@@ -1252,7 +1259,7 @@ const yt = (e, o) => {
|
|
|
1252
1259
|
fillMode: s.oneOf([null, "outline", "solid"]),
|
|
1253
1260
|
// eslint-disable-next-line max-len
|
|
1254
1261
|
themeColor: s.oneOf([null, "base", "info", "success", "warning", "error"])
|
|
1255
|
-
},
|
|
1262
|
+
}, It = {
|
|
1256
1263
|
disabled: !1,
|
|
1257
1264
|
removable: !1,
|
|
1258
1265
|
removeIcon: "k-i-x-circle",
|
|
@@ -1263,29 +1270,29 @@ const yt = (e, o) => {
|
|
|
1263
1270
|
themeColor: "base"
|
|
1264
1271
|
};
|
|
1265
1272
|
j.displayName = "KendoReactChip";
|
|
1266
|
-
j.propTypes =
|
|
1267
|
-
j.defaultProps =
|
|
1268
|
-
const
|
|
1273
|
+
j.propTypes = Ct;
|
|
1274
|
+
j.defaultProps = It;
|
|
1275
|
+
const xt = (e, o, t) => {
|
|
1269
1276
|
const [i, a] = n.useState(e);
|
|
1270
1277
|
return [i, (u) => {
|
|
1271
|
-
const c =
|
|
1278
|
+
const c = vt(o.state || i, { ...u, ...o });
|
|
1272
1279
|
t && t(c, u.event), a(c);
|
|
1273
1280
|
}];
|
|
1274
|
-
},
|
|
1281
|
+
}, Dt = (e) => {
|
|
1275
1282
|
const [o, t] = n.useState(null);
|
|
1276
1283
|
return [o, (a) => {
|
|
1277
|
-
const l =
|
|
1284
|
+
const l = yt(a.payload, { ...a, ...e });
|
|
1278
1285
|
t(l);
|
|
1279
1286
|
}];
|
|
1280
|
-
},
|
|
1287
|
+
}, wt = (e, o, t) => {
|
|
1281
1288
|
const [i, a] = n.useState(e);
|
|
1282
1289
|
return [i, (u) => {
|
|
1283
1290
|
const c = kt(o.state || i, { ...u, ...o });
|
|
1284
1291
|
t && t(c, u.event), a(c);
|
|
1285
1292
|
}];
|
|
1286
|
-
},
|
|
1287
|
-
|
|
1288
|
-
const t = n.useRef(null), i = n.useRef(null), a =
|
|
1293
|
+
}, Se = n.forwardRef((e, o) => {
|
|
1294
|
+
M(O);
|
|
1295
|
+
const t = n.useRef(null), i = n.useRef(null), a = xe(i, e.dir), {
|
|
1289
1296
|
chip: l,
|
|
1290
1297
|
id: u,
|
|
1291
1298
|
style: c,
|
|
@@ -1302,7 +1309,7 @@ const It = (e, o, t) => {
|
|
|
1302
1309
|
valueField: p = W.valueField,
|
|
1303
1310
|
textField: T = W.textField,
|
|
1304
1311
|
onChange: K,
|
|
1305
|
-
onDataChange:
|
|
1312
|
+
onDataChange: B
|
|
1306
1313
|
} = e, L = n.useMemo(
|
|
1307
1314
|
() => l || j,
|
|
1308
1315
|
[l, j]
|
|
@@ -1312,15 +1319,15 @@ const It = (e, o, t) => {
|
|
|
1312
1319
|
props: e
|
|
1313
1320
|
})), n.useImperativeHandle(o, () => t.current);
|
|
1314
1321
|
const $ = n.useCallback(
|
|
1315
|
-
(m,
|
|
1322
|
+
(m, y) => {
|
|
1316
1323
|
K && t.current && K.call(void 0, {
|
|
1317
1324
|
value: m,
|
|
1318
1325
|
target: t.current,
|
|
1319
|
-
syntheticEvent:
|
|
1326
|
+
syntheticEvent: y
|
|
1320
1327
|
});
|
|
1321
1328
|
},
|
|
1322
1329
|
[K]
|
|
1323
|
-
), [V, Z] =
|
|
1330
|
+
), [V, Z] = xt(
|
|
1324
1331
|
I,
|
|
1325
1332
|
{
|
|
1326
1333
|
selection: F,
|
|
@@ -1328,15 +1335,15 @@ const It = (e, o, t) => {
|
|
|
1328
1335
|
},
|
|
1329
1336
|
$
|
|
1330
1337
|
), oe = n.useCallback(
|
|
1331
|
-
(m,
|
|
1332
|
-
|
|
1338
|
+
(m, y) => {
|
|
1339
|
+
B && t.current && B.call(void 0, {
|
|
1333
1340
|
value: m,
|
|
1334
1341
|
target: t.current,
|
|
1335
|
-
syntheticEvent:
|
|
1342
|
+
syntheticEvent: y
|
|
1336
1343
|
});
|
|
1337
1344
|
},
|
|
1338
|
-
[
|
|
1339
|
-
), [q, ie] =
|
|
1345
|
+
[B]
|
|
1346
|
+
), [q, ie] = wt(
|
|
1340
1347
|
e.data || E,
|
|
1341
1348
|
{
|
|
1342
1349
|
state: e.data,
|
|
@@ -1344,7 +1351,7 @@ const It = (e, o, t) => {
|
|
|
1344
1351
|
},
|
|
1345
1352
|
oe
|
|
1346
1353
|
), G = n.useCallback(
|
|
1347
|
-
(m,
|
|
1354
|
+
(m, y) => (m.push(y[p]), m),
|
|
1348
1355
|
[p]
|
|
1349
1356
|
), _ = n.useMemo(
|
|
1350
1357
|
() => e.data || q,
|
|
@@ -1356,13 +1363,13 @@ const It = (e, o, t) => {
|
|
|
1356
1363
|
() => _.reduce(G, []),
|
|
1357
1364
|
[_, G]
|
|
1358
1365
|
), X = n.useCallback(
|
|
1359
|
-
(m) =>
|
|
1366
|
+
(m) => Re(p)(m),
|
|
1360
1367
|
[p]
|
|
1361
|
-
),
|
|
1362
|
-
(m) =>
|
|
1368
|
+
), k = n.useCallback(
|
|
1369
|
+
(m) => Re(T)(m),
|
|
1363
1370
|
[T]
|
|
1364
|
-
), [
|
|
1365
|
-
return /* @__PURE__ */ n.createElement(
|
|
1371
|
+
), [fe, be] = Dt({ items: le }), re = $e(e, t);
|
|
1372
|
+
return /* @__PURE__ */ n.createElement(Ve.Provider, { value: [ae, Z] }, /* @__PURE__ */ n.createElement(Ze.Provider, { value: [fe, be] }, /* @__PURE__ */ n.createElement(qe.Provider, { value: [_, ie] }, /* @__PURE__ */ n.createElement(
|
|
1366
1373
|
"div",
|
|
1367
1374
|
{
|
|
1368
1375
|
ref: i,
|
|
@@ -1371,13 +1378,13 @@ const It = (e, o, t) => {
|
|
|
1371
1378
|
id: u,
|
|
1372
1379
|
dir: a,
|
|
1373
1380
|
style: c,
|
|
1374
|
-
tabIndex:
|
|
1381
|
+
tabIndex: me(g, v, void 0),
|
|
1375
1382
|
className: f(
|
|
1376
1383
|
"k-chip-list",
|
|
1377
1384
|
{
|
|
1378
1385
|
"k-rtl": a === "rtl",
|
|
1379
1386
|
"k-disabled": v,
|
|
1380
|
-
[`k-chip-list-${
|
|
1387
|
+
[`k-chip-list-${P.sizeMap[h] || h}`]: h
|
|
1381
1388
|
},
|
|
1382
1389
|
D
|
|
1383
1390
|
),
|
|
@@ -1387,21 +1394,21 @@ const It = (e, o, t) => {
|
|
|
1387
1394
|
"aria-orientation": "horizontal",
|
|
1388
1395
|
"aria-multiselectable": F === "multiple"
|
|
1389
1396
|
},
|
|
1390
|
-
_.map((m,
|
|
1397
|
+
_.map((m, y) => /* @__PURE__ */ n.createElement(
|
|
1391
1398
|
L,
|
|
1392
1399
|
{
|
|
1393
1400
|
role: "option",
|
|
1394
1401
|
dataItem: m,
|
|
1395
1402
|
size: h,
|
|
1396
|
-
key: [X(m),
|
|
1397
|
-
text:
|
|
1403
|
+
key: [X(m), y].join("-"),
|
|
1404
|
+
text: k(m),
|
|
1398
1405
|
value: X(m),
|
|
1399
1406
|
ariaLabel: m.ariaLabel,
|
|
1400
1407
|
svgIcon: m.svgIcon || void 0
|
|
1401
1408
|
}
|
|
1402
1409
|
))
|
|
1403
1410
|
))));
|
|
1404
|
-
}),
|
|
1411
|
+
}), Et = {
|
|
1405
1412
|
id: s.string,
|
|
1406
1413
|
className: s.string,
|
|
1407
1414
|
tabIndex: s.number,
|
|
@@ -1431,10 +1438,10 @@ const It = (e, o, t) => {
|
|
|
1431
1438
|
valueField: "value",
|
|
1432
1439
|
removable: "removable"
|
|
1433
1440
|
};
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
const
|
|
1441
|
+
Se.displayName = "KendoReactChipList";
|
|
1442
|
+
Se.propTypes = Et;
|
|
1443
|
+
Se.defaultProps = W;
|
|
1444
|
+
const Fe = n.forwardRef((e, o) => {
|
|
1438
1445
|
const {
|
|
1439
1446
|
className: t,
|
|
1440
1447
|
disabled: i,
|
|
@@ -1469,7 +1476,7 @@ const Se = n.forwardRef((e, o) => {
|
|
|
1469
1476
|
F && h !== void 0 && !i && F($, h);
|
|
1470
1477
|
},
|
|
1471
1478
|
[F, h]
|
|
1472
|
-
),
|
|
1479
|
+
), B = n.useMemo(
|
|
1473
1480
|
() => f(
|
|
1474
1481
|
"k-fab-item",
|
|
1475
1482
|
{
|
|
@@ -1485,10 +1492,10 @@ const Se = n.forwardRef((e, o) => {
|
|
|
1485
1492
|
{
|
|
1486
1493
|
ref: E,
|
|
1487
1494
|
id: c,
|
|
1488
|
-
className:
|
|
1495
|
+
className: B,
|
|
1489
1496
|
style: u,
|
|
1490
1497
|
role: "menuitem",
|
|
1491
|
-
tabIndex:
|
|
1498
|
+
tabIndex: me(v, i),
|
|
1492
1499
|
"aria-disabled": i,
|
|
1493
1500
|
"aria-label": `${a || ""} floatingactionbutton item`,
|
|
1494
1501
|
onClick: K,
|
|
@@ -1499,7 +1506,7 @@ const Se = n.forwardRef((e, o) => {
|
|
|
1499
1506
|
L ? /* @__PURE__ */ n.createElement(L, { itemIndex: h, item: D }) : /* @__PURE__ */ n.createElement(n.Fragment, null, a && /* @__PURE__ */ n.createElement("span", { className: "k-fab-item-text" }, a), l || w ? /* @__PURE__ */ n.createElement(A, { className: "k-fab-item-icon", name: l, icon: w }) : null)
|
|
1500
1507
|
);
|
|
1501
1508
|
});
|
|
1502
|
-
|
|
1509
|
+
Fe.propTypes = {
|
|
1503
1510
|
className: s.string,
|
|
1504
1511
|
style: s.object,
|
|
1505
1512
|
children: s.any,
|
|
@@ -1507,31 +1514,31 @@ Se.propTypes = {
|
|
|
1507
1514
|
focused: s.bool,
|
|
1508
1515
|
index: s.number,
|
|
1509
1516
|
icon: s.string,
|
|
1510
|
-
svgIcon:
|
|
1517
|
+
svgIcon: R,
|
|
1511
1518
|
text: s.string,
|
|
1512
1519
|
tabIndex: s.number,
|
|
1513
1520
|
customProp: s.any
|
|
1514
1521
|
};
|
|
1515
|
-
|
|
1516
|
-
const
|
|
1522
|
+
Fe.displayName = "KendoFloatingActionButtonItem";
|
|
1523
|
+
const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o) => {
|
|
1517
1524
|
const t = { horizontal: o ? "right" : "left", vertical: "bottom" };
|
|
1518
1525
|
return e.horizontal === "end" && (t.horizontal = o ? "left" : "right"), t;
|
|
1519
|
-
},
|
|
1526
|
+
}, St = (e, o) => {
|
|
1520
1527
|
const t = { horizontal: o ? "right" : "left", vertical: "top" };
|
|
1521
1528
|
return e.horizontal === "end" && (t.horizontal = o ? "left" : "right"), t;
|
|
1522
|
-
},
|
|
1529
|
+
}, Ft = (e, o) => {
|
|
1523
1530
|
const t = o === "end" ? "end" : "start";
|
|
1524
1531
|
return {
|
|
1525
1532
|
rtl: { end: "k-text-left", start: "k-text-right" },
|
|
1526
1533
|
ltr: { start: "k-text-left", end: "k-text-right" }
|
|
1527
1534
|
}[e][t];
|
|
1528
|
-
},
|
|
1535
|
+
}, zt = (e, o, t, i) => {
|
|
1529
1536
|
const a = o.horizontal, l = o.vertical;
|
|
1530
1537
|
if (e.current) {
|
|
1531
|
-
const u = t && t.x !== void 0 ? he(t.x) :
|
|
1532
|
-
e.current.style.setProperty(
|
|
1538
|
+
const u = t && t.x !== void 0 ? he(t.x) : Ke, c = t && t.x !== void 0 ? `calc(50% + ${he(t.x)})` : "50%", g = t && t.y !== void 0 ? he(t.y) : Ke, v = t && t.y !== void 0 ? `calc(50% + ${he(t.y)})` : "50%";
|
|
1539
|
+
e.current.style.setProperty(Bt(o, i), a === "center" ? c : u), e.current.style.setProperty(Pt(o), l === "middle" ? v : g), i && ((l === "top" || l === "bottom") && a === "start" && e.current.style.setProperty("left", "unset"), l === "middle" && a === "end" && e.current.style.setProperty("right", "unset"), l === "middle" && a === "start" && e.current.style.setProperty("left", "unset"));
|
|
1533
1540
|
}
|
|
1534
|
-
},
|
|
1541
|
+
}, Bt = (e, o) => {
|
|
1535
1542
|
const { horizontal: t } = e;
|
|
1536
1543
|
return {
|
|
1537
1544
|
end: o ? "left" : "right",
|
|
@@ -1542,8 +1549,8 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1542
1549
|
top: "top",
|
|
1543
1550
|
middle: "top",
|
|
1544
1551
|
bottom: "bottom"
|
|
1545
|
-
})[e.vertical || "bottom"],
|
|
1546
|
-
|
|
1552
|
+
})[e.vertical || "bottom"], Rt = 2, Mt = 100, Xe = n.forwardRef((e, o) => {
|
|
1553
|
+
M(O);
|
|
1547
1554
|
const {
|
|
1548
1555
|
align: t = Y.align,
|
|
1549
1556
|
alignOffset: i,
|
|
@@ -1564,7 +1571,7 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1564
1571
|
overlayStyle: p,
|
|
1565
1572
|
tabIndex: T,
|
|
1566
1573
|
accessKey: K,
|
|
1567
|
-
popupSettings:
|
|
1574
|
+
popupSettings: B = {},
|
|
1568
1575
|
modal: L,
|
|
1569
1576
|
onClick: $,
|
|
1570
1577
|
onItemClick: V,
|
|
@@ -1574,30 +1581,30 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1574
1581
|
onOpen: ie,
|
|
1575
1582
|
onClose: G,
|
|
1576
1583
|
..._
|
|
1577
|
-
} = e, ae =
|
|
1584
|
+
} = e, ae = rt(), le = ae ? ae + Rt : Mt, X = n.useRef(null), k = n.useRef(null), fe = n.useRef(null), be = n.useRef(null), re = n.useCallback(
|
|
1578
1585
|
() => {
|
|
1579
|
-
|
|
1586
|
+
k.current && k.current.focus();
|
|
1580
1587
|
},
|
|
1581
1588
|
[]
|
|
1582
1589
|
), m = n.useCallback(
|
|
1583
1590
|
() => ({
|
|
1584
|
-
element:
|
|
1591
|
+
element: k.current,
|
|
1585
1592
|
focus: re
|
|
1586
1593
|
}),
|
|
1587
1594
|
[re]
|
|
1588
1595
|
);
|
|
1589
1596
|
n.useImperativeHandle(X, m), n.useImperativeHandle(o, () => X.current);
|
|
1590
|
-
const [
|
|
1597
|
+
const [y, z] = n.useState(!1), [ce, H] = n.useState(!1), [J, C] = n.useState(-1), Je = Me() + "-button-id", ge = xe(k, e.dir), Q = ge === "rtl", de = Me() + "-list-id";
|
|
1591
1598
|
n.useEffect(
|
|
1592
1599
|
() => {
|
|
1593
|
-
|
|
1600
|
+
zt(k, t, i, Q);
|
|
1594
1601
|
},
|
|
1595
|
-
[
|
|
1602
|
+
[k, t, i, Q]
|
|
1596
1603
|
), n.useEffect(
|
|
1597
1604
|
() => {
|
|
1598
|
-
ce &&
|
|
1605
|
+
ce && k && k.current && k.current.focus();
|
|
1599
1606
|
},
|
|
1600
|
-
[ce,
|
|
1607
|
+
[ce, k]
|
|
1601
1608
|
);
|
|
1602
1609
|
const U = n.useCallback(
|
|
1603
1610
|
(d, b) => {
|
|
@@ -1609,14 +1616,14 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1609
1616
|
);
|
|
1610
1617
|
},
|
|
1611
1618
|
[ie, G, h]
|
|
1612
|
-
),
|
|
1619
|
+
), ze = n.useCallback(
|
|
1613
1620
|
(d) => {
|
|
1614
1621
|
!d.target || l || (!h && $ ? x(
|
|
1615
1622
|
$,
|
|
1616
1623
|
d,
|
|
1617
1624
|
m(),
|
|
1618
1625
|
void 0
|
|
1619
|
-
) : (z(!
|
|
1626
|
+
) : (z(!y), H(!0), C(y ? -1 : 0), U(d, !y)));
|
|
1620
1627
|
},
|
|
1621
1628
|
[
|
|
1622
1629
|
z,
|
|
@@ -1624,13 +1631,13 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1624
1631
|
C,
|
|
1625
1632
|
$,
|
|
1626
1633
|
U,
|
|
1627
|
-
|
|
1634
|
+
y,
|
|
1628
1635
|
h,
|
|
1629
1636
|
l
|
|
1630
1637
|
]
|
|
1631
|
-
),
|
|
1638
|
+
), Qe = n.useCallback(
|
|
1632
1639
|
(d) => {
|
|
1633
|
-
H(!0), C(
|
|
1640
|
+
H(!0), C(y ? 0 : -1), Z && x(
|
|
1634
1641
|
Z,
|
|
1635
1642
|
d,
|
|
1636
1643
|
m(),
|
|
@@ -1638,17 +1645,17 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1638
1645
|
);
|
|
1639
1646
|
},
|
|
1640
1647
|
[Z, H, C]
|
|
1641
|
-
),
|
|
1648
|
+
), Ye = n.useCallback(
|
|
1642
1649
|
(d) => {
|
|
1643
1650
|
H(!1), z(!1), C(-1), x(
|
|
1644
1651
|
oe,
|
|
1645
1652
|
d,
|
|
1646
1653
|
m(),
|
|
1647
1654
|
void 0
|
|
1648
|
-
),
|
|
1655
|
+
), y && U(d, !1);
|
|
1649
1656
|
},
|
|
1650
1657
|
[oe, H, z, C, U]
|
|
1651
|
-
),
|
|
1658
|
+
), et = n.useCallback(
|
|
1652
1659
|
(d) => {
|
|
1653
1660
|
d.preventDefault();
|
|
1654
1661
|
},
|
|
@@ -1666,27 +1673,27 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1666
1673
|
));
|
|
1667
1674
|
},
|
|
1668
1675
|
[V]
|
|
1669
|
-
),
|
|
1676
|
+
), tt = n.useCallback(
|
|
1670
1677
|
(d, b) => {
|
|
1671
1678
|
!d.target || !h || (C(b), z(!1), ye(d, b), U(d, !1));
|
|
1672
1679
|
},
|
|
1673
1680
|
[C, z, ye, U]
|
|
1674
|
-
),
|
|
1681
|
+
), st = n.useCallback(
|
|
1675
1682
|
(d) => {
|
|
1676
|
-
se(document) ===
|
|
1683
|
+
se(document) === k.current && d.preventDefault();
|
|
1677
1684
|
},
|
|
1678
|
-
[
|
|
1679
|
-
),
|
|
1685
|
+
[k]
|
|
1686
|
+
), nt = n.useCallback(
|
|
1680
1687
|
(d) => {
|
|
1681
|
-
const b = J,
|
|
1688
|
+
const b = J, ke = h ? h.length : -1;
|
|
1682
1689
|
if (d.altKey) {
|
|
1683
|
-
!
|
|
1690
|
+
!y && d.keyCode === r.down && (d.preventDefault(), z(!0), C(0)), y && d.keyCode === r.up && (d.preventDefault(), z(!1), C(-1));
|
|
1684
1691
|
return;
|
|
1685
1692
|
}
|
|
1686
1693
|
switch (d.keyCode) {
|
|
1687
1694
|
case r.enter:
|
|
1688
1695
|
case r.space:
|
|
1689
|
-
b >= 0 && ye(d, b), h ||
|
|
1696
|
+
b >= 0 && ye(d, b), h || ze(d), d.preventDefault(), z(!y), C(y ? -1 : 0);
|
|
1690
1697
|
break;
|
|
1691
1698
|
case r.esc:
|
|
1692
1699
|
d.preventDefault(), z(!1), C(-1);
|
|
@@ -1695,15 +1702,15 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1695
1702
|
d.preventDefault(), C(0);
|
|
1696
1703
|
break;
|
|
1697
1704
|
case r.end:
|
|
1698
|
-
d.preventDefault(), C(
|
|
1705
|
+
d.preventDefault(), C(ke - 1);
|
|
1699
1706
|
break;
|
|
1700
1707
|
case r.down:
|
|
1701
1708
|
case r.right:
|
|
1702
|
-
d.preventDefault(), C(b + 1 >=
|
|
1709
|
+
d.preventDefault(), C(b + 1 >= ke ? 0 : b + 1);
|
|
1703
1710
|
break;
|
|
1704
1711
|
case r.up:
|
|
1705
1712
|
case r.left:
|
|
1706
|
-
d.preventDefault(), C(b - 1 < 0 ?
|
|
1713
|
+
d.preventDefault(), C(b - 1 < 0 ? ke - 1 : b - 1);
|
|
1707
1714
|
break;
|
|
1708
1715
|
}
|
|
1709
1716
|
x(
|
|
@@ -1714,7 +1721,7 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1714
1721
|
);
|
|
1715
1722
|
},
|
|
1716
1723
|
[q, J, C, Q, z]
|
|
1717
|
-
),
|
|
1724
|
+
), ot = n.useMemo(
|
|
1718
1725
|
() => f(
|
|
1719
1726
|
"k-fab k-fab-solid",
|
|
1720
1727
|
{
|
|
@@ -1725,15 +1732,15 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1725
1732
|
"k-pos-absolute": w === "absolute",
|
|
1726
1733
|
"k-pos-fixed": w === "fixed",
|
|
1727
1734
|
"k-focus": ce,
|
|
1728
|
-
[`k-rounded-${
|
|
1735
|
+
[`k-rounded-${P.roundedMap[I] || I}`]: I,
|
|
1729
1736
|
[`k-fab-solid-${E}`]: E
|
|
1730
1737
|
},
|
|
1731
1738
|
`k-${t.vertical}-${t.horizontal}`,
|
|
1732
1739
|
a
|
|
1733
1740
|
),
|
|
1734
1741
|
[E, S, I, l, w, t, ce, a]
|
|
1735
|
-
),
|
|
1736
|
-
|
|
1742
|
+
), it = h && h.map((d, b) => /* @__PURE__ */ n.createElement(
|
|
1743
|
+
Fe,
|
|
1737
1744
|
{
|
|
1738
1745
|
...d,
|
|
1739
1746
|
key: b,
|
|
@@ -1745,41 +1752,41 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1745
1752
|
item: D,
|
|
1746
1753
|
className: f(
|
|
1747
1754
|
d.className,
|
|
1748
|
-
|
|
1755
|
+
Ft(ge || "ltr", t.horizontal)
|
|
1749
1756
|
),
|
|
1750
|
-
onClick:
|
|
1751
|
-
onDown:
|
|
1757
|
+
onClick: tt,
|
|
1758
|
+
onDown: st
|
|
1752
1759
|
}
|
|
1753
|
-
)),
|
|
1754
|
-
return /* @__PURE__ */ n.createElement(
|
|
1760
|
+
)), Be = !!((u || c) && !N), at = k.current ? k.current.offsetWidth : 0, lt = 32, Pe = at / 2 - lt / 2;
|
|
1761
|
+
return /* @__PURE__ */ n.createElement(ct.Provider, { value: le }, /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(
|
|
1755
1762
|
"button",
|
|
1756
1763
|
{
|
|
1757
|
-
ref:
|
|
1758
|
-
id: v ||
|
|
1764
|
+
ref: k,
|
|
1765
|
+
id: v || Je,
|
|
1759
1766
|
role: "button",
|
|
1760
1767
|
type: "button",
|
|
1761
1768
|
"aria-disabled": l,
|
|
1762
|
-
"aria-expanded": h ?
|
|
1769
|
+
"aria-expanded": h ? y : void 0,
|
|
1763
1770
|
"aria-haspopup": !!h,
|
|
1764
1771
|
"aria-label": `${N || ""} floatingactionbutton`,
|
|
1765
1772
|
"aria-owns": h ? de : void 0,
|
|
1766
1773
|
"aria-activedescendant": J >= 0 && h ? `${de}-${J}` : void 0,
|
|
1767
|
-
tabIndex:
|
|
1774
|
+
tabIndex: me(T, l),
|
|
1768
1775
|
accessKey: K,
|
|
1769
|
-
dir:
|
|
1776
|
+
dir: ge,
|
|
1770
1777
|
disabled: l,
|
|
1771
|
-
className:
|
|
1778
|
+
className: ot,
|
|
1772
1779
|
style: F,
|
|
1773
|
-
onClick:
|
|
1774
|
-
onMouseDown:
|
|
1775
|
-
onFocus:
|
|
1776
|
-
onBlur:
|
|
1777
|
-
onKeyDown:
|
|
1780
|
+
onClick: ze,
|
|
1781
|
+
onMouseDown: et,
|
|
1782
|
+
onFocus: Qe,
|
|
1783
|
+
onBlur: Ye,
|
|
1784
|
+
onKeyDown: nt,
|
|
1778
1785
|
..._
|
|
1779
1786
|
},
|
|
1780
1787
|
u || c ? /* @__PURE__ */ n.createElement(A, { className: "k-fab-icon", name: u, icon: c }) : g ? /* @__PURE__ */ n.createElement("span", { role: "presentation", className: g }) : null,
|
|
1781
1788
|
N && /* @__PURE__ */ n.createElement("span", { className: "k-fab-text" }, N)
|
|
1782
|
-
), L &&
|
|
1789
|
+
), L && y && /* @__PURE__ */ n.createElement(
|
|
1783
1790
|
"div",
|
|
1784
1791
|
{
|
|
1785
1792
|
className: "k-overlay",
|
|
@@ -1789,21 +1796,21 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1789
1796
|
}
|
|
1790
1797
|
}
|
|
1791
1798
|
), /* @__PURE__ */ n.createElement(
|
|
1792
|
-
|
|
1799
|
+
De,
|
|
1793
1800
|
{
|
|
1794
|
-
ref:
|
|
1795
|
-
anchor:
|
|
1796
|
-
show:
|
|
1797
|
-
animate:
|
|
1798
|
-
popupClass: f("k-popup-transparent k-fab-popup",
|
|
1799
|
-
anchorAlign:
|
|
1800
|
-
popupAlign:
|
|
1801
|
+
ref: be,
|
|
1802
|
+
anchor: k.current,
|
|
1803
|
+
show: y,
|
|
1804
|
+
animate: B.animate,
|
|
1805
|
+
popupClass: f("k-popup-transparent k-fab-popup", B.popupClass),
|
|
1806
|
+
anchorAlign: B.anchorAlign || Nt(t, Q),
|
|
1807
|
+
popupAlign: B.popupAlign || St(t, Q),
|
|
1801
1808
|
style: { boxShadow: "none" }
|
|
1802
1809
|
},
|
|
1803
1810
|
/* @__PURE__ */ n.createElement(
|
|
1804
1811
|
"ul",
|
|
1805
1812
|
{
|
|
1806
|
-
ref:
|
|
1813
|
+
ref: fe,
|
|
1807
1814
|
role: "menu",
|
|
1808
1815
|
"aria-labelledby": v,
|
|
1809
1816
|
id: de,
|
|
@@ -1812,15 +1819,15 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1812
1819
|
"k-fab-items-top": t.vertical === "bottom"
|
|
1813
1820
|
}),
|
|
1814
1821
|
style: {
|
|
1815
|
-
paddingLeft:
|
|
1816
|
-
paddingRight:
|
|
1822
|
+
paddingLeft: Be ? Pe : void 0,
|
|
1823
|
+
paddingRight: Be ? Pe : void 0
|
|
1817
1824
|
}
|
|
1818
1825
|
},
|
|
1819
|
-
|
|
1826
|
+
it
|
|
1820
1827
|
)
|
|
1821
1828
|
)));
|
|
1822
1829
|
});
|
|
1823
|
-
|
|
1830
|
+
Xe.propTypes = {
|
|
1824
1831
|
className: s.string,
|
|
1825
1832
|
style: s.object,
|
|
1826
1833
|
id: s.string,
|
|
@@ -1829,7 +1836,7 @@ Ge.propTypes = {
|
|
|
1829
1836
|
accessKey: s.string,
|
|
1830
1837
|
disabled: s.bool,
|
|
1831
1838
|
icon: s.string,
|
|
1832
|
-
svgIcon:
|
|
1839
|
+
svgIcon: R,
|
|
1833
1840
|
iconClass: s.string,
|
|
1834
1841
|
text: s.string,
|
|
1835
1842
|
alignOffset: s.shape({
|
|
@@ -1866,21 +1873,27 @@ const Y = {
|
|
|
1866
1873
|
themeColor: "primary",
|
|
1867
1874
|
positionMode: "fixed"
|
|
1868
1875
|
};
|
|
1869
|
-
|
|
1876
|
+
Xe.displayName = "KendoFloatingActionButton";
|
|
1877
|
+
const Ot = Ae(Ne);
|
|
1878
|
+
Ot.displayName = "KendoReactDropDownButton";
|
|
1879
|
+
const Kt = Ae(Ee);
|
|
1880
|
+
Kt.displayName = "KendoReactSplitButton";
|
|
1870
1881
|
export {
|
|
1871
1882
|
ne as Button,
|
|
1872
|
-
|
|
1883
|
+
bt as ButtonGroup,
|
|
1873
1884
|
j as Chip,
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1885
|
+
Se as ChipList,
|
|
1886
|
+
Ot as DropDownButton,
|
|
1887
|
+
Ne as DropDownButtonClassComponent,
|
|
1888
|
+
Ue as DropDownButtonItem,
|
|
1889
|
+
Xe as FloatingActionButton,
|
|
1890
|
+
Fe as FloatingActionButtonItem,
|
|
1891
|
+
Kt as SplitButton,
|
|
1892
|
+
Ee as SplitButtonClassComponent,
|
|
1893
|
+
Te as SplitButtonItem,
|
|
1894
|
+
We as Toolbar,
|
|
1895
|
+
gt as ToolbarItem,
|
|
1896
|
+
Ut as ToolbarSeparator,
|
|
1897
|
+
je as ToolbarSpacer,
|
|
1898
|
+
mt as toolbarButtons
|
|
1886
1899
|
};
|