@progress/kendo-react-buttons 7.0.0-develop.9 → 7.0.1-develop.1
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 +9 -4
- 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 +343 -327
- package/package.json +4 -3
package/index.mjs
CHANGED
|
@@ -2,21 +2,22 @@
|
|
|
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 M, validatePackage as R, classNames as f, kendoThemeMaps as
|
|
9
|
+
import { svgIconPropType as M, validatePackage as R, classNames as f, kendoThemeMaps as P, IconWrap as A, Keys as r, dispatchEvent as I, getActiveElement as se, useDir as xe, useMouse as $e, getTabIndex as me, toIconName as ve, getter as Me, useZIndexContext as rt, useId as Re, ZIndexContext as ct, withIdHOC as Ae } from "@progress/kendo-react-common";
|
|
9
10
|
import { Popup as De } from "@progress/kendo-react-popup";
|
|
10
|
-
import { caretAltDownIcon as
|
|
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: 1702313756,
|
|
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 {
|
|
@@ -58,12 +59,12 @@ const ee = class extends n.Component {
|
|
|
58
59
|
imageAlt: u,
|
|
59
60
|
className: c,
|
|
60
61
|
onClick: g,
|
|
61
|
-
size:
|
|
62
|
+
size: v = ee.defaultProps.size,
|
|
62
63
|
rounded: h = ee.defaultProps.rounded,
|
|
63
|
-
fillMode:
|
|
64
|
+
fillMode: D = ee.defaultProps.fillMode,
|
|
64
65
|
themeColor: N = ee.defaultProps.themeColor,
|
|
65
|
-
...
|
|
66
|
-
} = this.props, S = a !== void 0 || t !== void 0 || i !== void 0 || l !== void 0,
|
|
66
|
+
...w
|
|
67
|
+
} = this.props, S = a !== void 0 || t !== void 0 || i !== void 0 || l !== void 0, B = e !== void 0, x = ht({
|
|
67
68
|
name: t,
|
|
68
69
|
svgIcon: a,
|
|
69
70
|
iconClass: i,
|
|
@@ -75,16 +76,16 @@ const ee = class extends n.Component {
|
|
|
75
76
|
{
|
|
76
77
|
ref: (E) => this._element = E,
|
|
77
78
|
"aria-pressed": o ? this.state.selected : void 0,
|
|
78
|
-
...
|
|
79
|
+
...w,
|
|
79
80
|
onClick: this.handleClick,
|
|
80
81
|
className: f(
|
|
81
82
|
"k-button",
|
|
82
83
|
{
|
|
83
|
-
[`k-button-${
|
|
84
|
-
[`k-button-${
|
|
85
|
-
[`k-button-${
|
|
86
|
-
[`k-rounded-${
|
|
87
|
-
"k-icon-button": !
|
|
84
|
+
[`k-button-${P.sizeMap[v] || v}`]: v,
|
|
85
|
+
[`k-button-${D}`]: D,
|
|
86
|
+
[`k-button-${D}-${N}`]: !!(D && N),
|
|
87
|
+
[`k-rounded-${P.roundedMap[h] || h}`]: h,
|
|
88
|
+
"k-icon-button": !B && S,
|
|
88
89
|
"k-disabled": this.props.disabled,
|
|
89
90
|
"k-selected": this.state.selected,
|
|
90
91
|
"k-rtl": this.props.dir === "rtl"
|
|
@@ -92,7 +93,7 @@ const ee = class extends n.Component {
|
|
|
92
93
|
this.props.className
|
|
93
94
|
)
|
|
94
95
|
},
|
|
95
|
-
|
|
96
|
+
x,
|
|
96
97
|
e && /* @__PURE__ */ n.createElement("span", { className: "k-button-text" }, e)
|
|
97
98
|
);
|
|
98
99
|
}
|
|
@@ -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,15 +143,15 @@ 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
156
|
super(o), this._element = null, R(O);
|
|
156
157
|
}
|
|
@@ -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,
|
|
@@ -346,7 +347,7 @@ class Le extends n.Component {
|
|
|
346
347
|
}, this.switchFocus = (t) => {
|
|
347
348
|
this.skipFocus = !0, t(), window.setTimeout(() => this.skipFocus = !1, 0);
|
|
348
349
|
}, this.onFocus = (t) => {
|
|
349
|
-
this.skipFocus || (
|
|
350
|
+
this.skipFocus || (I(this.props.onFocus, t, this, void 0), this.setState({ focused: !0 }));
|
|
350
351
|
}, this.setOpen = (t) => {
|
|
351
352
|
this.openedDuringOnChange = t, this.setState({ opened: t });
|
|
352
353
|
}, this.onItemClick = (t, i) => {
|
|
@@ -355,7 +356,7 @@ class Le extends n.Component {
|
|
|
355
356
|
this.skipFocus || (this.setState({
|
|
356
357
|
focused: !1,
|
|
357
358
|
focusedIndex: -1
|
|
358
|
-
}), this.setOpen(!1),
|
|
359
|
+
}), this.setOpen(!1), I(this.props.onBlur, t, this, void 0));
|
|
359
360
|
}, this.onPopupClose = () => {
|
|
360
361
|
this.state.focused && this.switchFocus(() => {
|
|
361
362
|
this.element && (this.element.removeAttribute("tabindex"), this.element.focus({ preventScroll: !0 }));
|
|
@@ -379,9 +380,12 @@ class Le extends n.Component {
|
|
|
379
380
|
}, this.onItemDown = (t) => {
|
|
380
381
|
se(document) === this.list && t.preventDefault();
|
|
381
382
|
}, this.dispatchPopupEvent = (t, i) => {
|
|
382
|
-
|
|
383
|
+
I(i ? this.props.onOpen : this.props.onClose, t, this, void 0), this.openedDuringOnChange = void 0;
|
|
383
384
|
}, R(O);
|
|
384
385
|
}
|
|
386
|
+
get guid() {
|
|
387
|
+
return this.props.id ? this.props.id + "-accessibility-id" : this.props.id;
|
|
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;
|
|
387
391
|
}
|
|
@@ -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,
|
|
@@ -476,7 +480,7 @@ class Le extends n.Component {
|
|
|
476
480
|
return this.mainButton;
|
|
477
481
|
}
|
|
478
482
|
dispatchClickEvent(o, t) {
|
|
479
|
-
this.isItemDisabled(t) || (t === -1 ?
|
|
483
|
+
this.isItemDisabled(t) || (t === -1 ? I(this.props.onButtonClick, o, this, void 0) : I(
|
|
480
484
|
this.props.onItemClick,
|
|
481
485
|
o,
|
|
482
486
|
this,
|
|
@@ -495,8 +499,8 @@ class Le extends n.Component {
|
|
|
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,
|
|
@@ -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.
|
|
605
|
+
}, 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));
|
|
@@ -606,16 +610,20 @@ class He extends n.Component {
|
|
|
606
610
|
}
|
|
607
611
|
const a = { ...this.state };
|
|
608
612
|
if (t.keyCode === r.enter || t.keyCode === r.space) {
|
|
609
|
-
i >= 0 && this.dispatchClickEvent(t, i)
|
|
613
|
+
i >= 0 && this.dispatchClickEvent(t, i);
|
|
610
614
|
const l = !this.opened;
|
|
611
|
-
this.
|
|
615
|
+
this.setState({
|
|
616
|
+
focused: !0,
|
|
617
|
+
focusedIndex: l ? 0 : -1
|
|
618
|
+
}), this.setOpen(l), l && this.dispatchPopupEvent(t, l);
|
|
612
619
|
return;
|
|
613
|
-
}
|
|
620
|
+
}
|
|
621
|
+
if (this.opened && t.keyCode === r.esc) {
|
|
614
622
|
this.setState({ focusedIndex: -1 }), this.setOpen(!1);
|
|
615
623
|
return;
|
|
616
624
|
}
|
|
617
625
|
if (this.opened) {
|
|
618
|
-
const l =
|
|
626
|
+
const l = Le(
|
|
619
627
|
i,
|
|
620
628
|
t.keyCode,
|
|
621
629
|
t.altKey,
|
|
@@ -629,9 +637,11 @@ class He extends n.Component {
|
|
|
629
637
|
}, this.switchFocus = (t) => {
|
|
630
638
|
this.skipFocus = !0, t(), window.setTimeout(() => this.skipFocus = !1, 0);
|
|
631
639
|
}, this.handleFocus = (t) => {
|
|
632
|
-
this.skipFocus || (this.setState({ focused: !0, focusedIndex: this.opened ? 0 : -1 }),
|
|
633
|
-
}, this.
|
|
634
|
-
this.
|
|
640
|
+
this.skipFocus || (this.setState({ focused: !0, focusedIndex: this.opened ? 0 : -1 }), I(this.props.onFocus, t, this, void 0));
|
|
641
|
+
}, this.handleButtonBlur = (t) => {
|
|
642
|
+
this.opened || (this.setState({ focused: !1 }), I(this.props.onBlur, t, this, void 0));
|
|
643
|
+
}, this.handleMenuBlur = (t) => {
|
|
644
|
+
this.skipFocus || (this.setState({ focused: !1, focusedIndex: -1 }), this.setOpen(!1), I(this.props.onBlur, t, this, void 0));
|
|
635
645
|
}, this.setOpen = (t) => {
|
|
636
646
|
this.openedDuringOnChange = t, this.setState({ opened: t });
|
|
637
647
|
}, this.onItemClick = (t, i) => {
|
|
@@ -643,7 +653,7 @@ class He extends n.Component {
|
|
|
643
653
|
const i = se(document);
|
|
644
654
|
this.element && i !== this.element && i !== this.list && this.element.focus();
|
|
645
655
|
}, this.onPopupClose = () => {
|
|
646
|
-
this.
|
|
656
|
+
this.switchFocus(() => {
|
|
647
657
|
this.element && (this.element.removeAttribute("tabindex"), this.element.focus({ preventScroll: !0 }));
|
|
648
658
|
}), this.dispatchPopupEvent({}, !1);
|
|
649
659
|
}, this.listRef = (t) => {
|
|
@@ -659,9 +669,12 @@ class He extends n.Component {
|
|
|
659
669
|
focusedIndex: i ? 0 : -1
|
|
660
670
|
}), this.setOpen(i), i && this.dispatchPopupEvent(t, i);
|
|
661
671
|
}, this.dispatchPopupEvent = (t, i) => {
|
|
662
|
-
|
|
672
|
+
I(i ? this.props.onOpen : this.props.onClose, t, this, void 0), this.openedDuringOnChange = void 0;
|
|
663
673
|
}, R(O);
|
|
664
674
|
}
|
|
675
|
+
get guid() {
|
|
676
|
+
return this.props.id + "-accessibility-id";
|
|
677
|
+
}
|
|
665
678
|
get opened() {
|
|
666
679
|
return this.openedDuringOnChange !== void 0 ? this.openedDuringOnChange : this.props.opened === void 0 ? this.state.opened : this.props.opened;
|
|
667
680
|
}
|
|
@@ -670,55 +683,47 @@ class He extends n.Component {
|
|
|
670
683
|
*/
|
|
671
684
|
render() {
|
|
672
685
|
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 ===
|
|
674
|
-
|
|
686
|
+
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(n.Fragment, null, /* @__PURE__ */ n.createElement(
|
|
687
|
+
ne,
|
|
675
688
|
{
|
|
676
689
|
id: i,
|
|
690
|
+
size: this.props.size,
|
|
677
691
|
style: a,
|
|
692
|
+
rounded: this.props.rounded,
|
|
693
|
+
fillMode: this.props.fillMode,
|
|
694
|
+
themeColor: this.props.themeColor,
|
|
695
|
+
onClick: this.onClickMainButton,
|
|
696
|
+
onMouseDown: this.mouseDown,
|
|
697
|
+
onKeyDown: this.onKeyDown,
|
|
698
|
+
onFocus: this.handleFocus,
|
|
699
|
+
onBlur: this.handleButtonBlur,
|
|
700
|
+
"aria-disabled": u ? "true" : void 0,
|
|
701
|
+
tabIndex: l,
|
|
702
|
+
accessKey: this.props.accessKey,
|
|
703
|
+
icon: this.props.icon,
|
|
704
|
+
svgIcon: this.props.svgIcon,
|
|
705
|
+
iconClass: this.props.iconClass,
|
|
678
706
|
className: f(
|
|
707
|
+
this.props.buttonClass,
|
|
708
|
+
"k-menu-button",
|
|
709
|
+
// Used for a11y testing.
|
|
679
710
|
"k-dropdown-button",
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
}
|
|
683
|
-
this.props.className
|
|
711
|
+
// Used because of the old name of the component. Have the same styles as 'k-menu-button'.
|
|
712
|
+
{ "k-focus": this.state.focused },
|
|
713
|
+
{ "k-disabled": u }
|
|
684
714
|
),
|
|
685
|
-
|
|
686
|
-
onFocus: this.handleFocus,
|
|
687
|
-
onBlur: this.handleBlur,
|
|
715
|
+
imageUrl: this.props.imageUrl,
|
|
688
716
|
dir: t,
|
|
689
|
-
ref: (c) => this.
|
|
717
|
+
ref: (c) => this.mainButton = c && c.element,
|
|
718
|
+
type: "button",
|
|
719
|
+
"aria-haspopup": "menu",
|
|
720
|
+
"aria-expanded": this.opened ? "true" : "false",
|
|
721
|
+
"aria-label": this.props.ariaLabel,
|
|
722
|
+
"aria-controls": this.opened ? this.guid : void 0,
|
|
723
|
+
title: this.props.title
|
|
690
724
|
},
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
{
|
|
694
|
-
size: this.props.size,
|
|
695
|
-
rounded: this.props.rounded,
|
|
696
|
-
fillMode: this.props.fillMode,
|
|
697
|
-
themeColor: this.props.themeColor,
|
|
698
|
-
onClick: this.onClickMainButton,
|
|
699
|
-
onMouseDown: this.mouseDown,
|
|
700
|
-
disabled: u || void 0,
|
|
701
|
-
tabIndex: l,
|
|
702
|
-
accessKey: this.props.accessKey,
|
|
703
|
-
icon: this.props.icon,
|
|
704
|
-
svgIcon: this.props.svgIcon,
|
|
705
|
-
iconClass: this.props.iconClass,
|
|
706
|
-
className: this.props.buttonClass,
|
|
707
|
-
imageUrl: this.props.imageUrl,
|
|
708
|
-
dir: t,
|
|
709
|
-
ref: (c) => this.mainButton = c && c.element,
|
|
710
|
-
type: "button",
|
|
711
|
-
"aria-haspopup": !0,
|
|
712
|
-
"aria-expanded": this.opened || void 0,
|
|
713
|
-
"aria-label": this.props.ariaLabel,
|
|
714
|
-
"aria-controls": this.opened ? this.guid : void 0,
|
|
715
|
-
id: "button-" + this.guid,
|
|
716
|
-
title: this.props.title
|
|
717
|
-
},
|
|
718
|
-
this.props.text
|
|
719
|
-
),
|
|
720
|
-
this.renderPopup(o)
|
|
721
|
-
);
|
|
725
|
+
this.props.text
|
|
726
|
+
), this.renderPopup(o));
|
|
722
727
|
}
|
|
723
728
|
/**
|
|
724
729
|
* @hidden
|
|
@@ -733,7 +738,7 @@ class He extends n.Component {
|
|
|
733
738
|
return this.mainButton;
|
|
734
739
|
}
|
|
735
740
|
dispatchClickEvent(o, t) {
|
|
736
|
-
this.isItemDisabled(t) ||
|
|
741
|
+
this.isItemDisabled(t) || I(
|
|
737
742
|
this.props.onItemClick,
|
|
738
743
|
o,
|
|
739
744
|
this,
|
|
@@ -744,16 +749,16 @@ class He extends n.Component {
|
|
|
744
749
|
);
|
|
745
750
|
}
|
|
746
751
|
renderPopup(o) {
|
|
747
|
-
const { popupSettings: t = {} } = this.props, { focusedIndex:
|
|
752
|
+
const { popupSettings: t = {}, id: i } = this.props, { focusedIndex: a } = this.state;
|
|
748
753
|
return /* @__PURE__ */ n.createElement(
|
|
749
754
|
De,
|
|
750
755
|
{
|
|
751
|
-
anchor: this.
|
|
756
|
+
anchor: this.mainButton,
|
|
752
757
|
show: this.opened,
|
|
753
758
|
animate: t.animate,
|
|
754
759
|
popupClass: f("k-menu-popup", t.popupClass),
|
|
755
|
-
anchorAlign: t.anchorAlign ||
|
|
756
|
-
popupAlign: t.popupAlign ||
|
|
760
|
+
anchorAlign: t.anchorAlign || _e(o),
|
|
761
|
+
popupAlign: t.popupAlign || He(o),
|
|
757
762
|
style: o ? { direction: "rtl" } : void 0,
|
|
758
763
|
onClose: this.onPopupClose
|
|
759
764
|
},
|
|
@@ -762,12 +767,14 @@ class He extends n.Component {
|
|
|
762
767
|
{
|
|
763
768
|
role: "menu",
|
|
764
769
|
id: this.guid,
|
|
765
|
-
"aria-labelledby":
|
|
770
|
+
"aria-labelledby": i,
|
|
766
771
|
tabIndex: -1,
|
|
767
|
-
"aria-activedescendant":
|
|
772
|
+
"aria-activedescendant": a >= 0 ? `${this.guid}-${a}` : void 0,
|
|
768
773
|
ref: this.listRef,
|
|
774
|
+
onKeyDown: this.onKeyDown,
|
|
775
|
+
onBlur: this.handleMenuBlur,
|
|
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,
|
|
@@ -797,10 +804,10 @@ class He extends n.Component {
|
|
|
797
804
|
return this.buttonsData[o] ? this.buttonsData[o].disabled : this.props.disabled;
|
|
798
805
|
}
|
|
799
806
|
isRtl() {
|
|
800
|
-
return this.props.dir !== void 0 ? this.props.dir === "rtl" : !!this.
|
|
807
|
+
return this.props.dir !== void 0 ? this.props.dir === "rtl" : !!this.mainButton && getComputedStyle(this.mainButton).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,
|
|
@@ -824,25 +831,25 @@ 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
|
});
|
|
840
847
|
}, this.onKeyDown = (o) => {
|
|
841
848
|
const t = o.target;
|
|
842
|
-
if (!(o.keyCode === r.left || o.keyCode === r.right) || o.defaultPrevented || this.buttons.findIndex((l) => l === t) === -1)
|
|
849
|
+
if (!(o.keyCode === r.left || o.keyCode === r.right || o.keyCode === r.home || o.keyCode === r.end) || o.defaultPrevented || this.buttons.findIndex((l) => l === t) === -1)
|
|
843
850
|
return;
|
|
844
851
|
const a = this.focusedIndex;
|
|
845
|
-
o.keyCode === r.left ? this.focusButton(a, a - 1) : this.focusButton(a, a + 1);
|
|
852
|
+
o.keyCode === r.left ? this.focusButton(a, a === 0 ? this.buttons.length - 1 : a - 1) : this.focusButton(a, a === this.buttons.length - 1 ? 0 : a + 1), o.keyCode === r.home && this.focusButton(a, 0), o.keyCode === r.end && this.focusButton(a, this.buttons.length - 1);
|
|
846
853
|
}, this.onWindowResize = (o) => {
|
|
847
854
|
const t = this.element;
|
|
848
855
|
if (!t)
|
|
@@ -856,7 +863,7 @@ const Ie = class extends n.Component {
|
|
|
856
863
|
}, R(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) {
|
|
@@ -1067,32 +1074,32 @@ const yt = (e, o) => {
|
|
|
1067
1074
|
}
|
|
1068
1075
|
}, j = n.forwardRef((e, o) => {
|
|
1069
1076
|
R(O);
|
|
1070
|
-
const t = n.useRef(null), i = n.useRef(null), a =
|
|
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(
|
|
1079
1086
|
() => c === e.value,
|
|
1080
1087
|
[e.value, c]
|
|
1081
1088
|
);
|
|
1082
1089
|
n.useEffect(
|
|
1083
1090
|
() => {
|
|
1084
|
-
|
|
1091
|
+
D && i.current && i.current.focus();
|
|
1085
1092
|
},
|
|
1086
|
-
[
|
|
1093
|
+
[D]
|
|
1087
1094
|
);
|
|
1088
1095
|
const N = n.useCallback(
|
|
1089
1096
|
(p) => {
|
|
1090
1097
|
u({ type: pe.toggle, payload: e.value, event: p });
|
|
1091
1098
|
},
|
|
1092
1099
|
[u, e.value]
|
|
1093
|
-
),
|
|
1100
|
+
), w = n.useCallback(
|
|
1094
1101
|
(p) => {
|
|
1095
|
-
e.removable && (
|
|
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,
|
|
@@ -1100,7 +1107,7 @@ const yt = (e, o) => {
|
|
|
1100
1107
|
}
|
|
1101
1108
|
));
|
|
1102
1109
|
},
|
|
1103
|
-
[e.onRemove, e.value, e.removable,
|
|
1110
|
+
[e.onRemove, e.value, e.removable, v, g, u]
|
|
1104
1111
|
), S = n.useCallback(
|
|
1105
1112
|
(p) => {
|
|
1106
1113
|
switch (p.keyCode) {
|
|
@@ -1114,7 +1121,7 @@ const yt = (e, o) => {
|
|
|
1114
1121
|
u({ type: pe.toggle, payload: e.value, event: p });
|
|
1115
1122
|
break;
|
|
1116
1123
|
case r.delete:
|
|
1117
|
-
|
|
1124
|
+
w(p);
|
|
1118
1125
|
break;
|
|
1119
1126
|
}
|
|
1120
1127
|
e.onKeyDown && e.onKeyDown.call(
|
|
@@ -1125,8 +1132,8 @@ const yt = (e, o) => {
|
|
|
1125
1132
|
}
|
|
1126
1133
|
);
|
|
1127
1134
|
},
|
|
1128
|
-
[e.onKeyDown, e.value, g, u,
|
|
1129
|
-
),
|
|
1135
|
+
[e.onKeyDown, e.value, g, u, w]
|
|
1136
|
+
), B = n.useCallback(
|
|
1130
1137
|
(p) => {
|
|
1131
1138
|
g({ payload: e.value, type: te.current, event: p }), e.onFocus && e.onFocus.call(
|
|
1132
1139
|
void 0,
|
|
@@ -1137,7 +1144,7 @@ const yt = (e, o) => {
|
|
|
1137
1144
|
);
|
|
1138
1145
|
},
|
|
1139
1146
|
[e.onFocus, e.value, g]
|
|
1140
|
-
),
|
|
1147
|
+
), x = n.useCallback(
|
|
1141
1148
|
(p) => {
|
|
1142
1149
|
e.onBlur && e.onBlur.call(
|
|
1143
1150
|
void 0,
|
|
@@ -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,16 +1165,16 @@ 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
|
{
|
|
1165
1172
|
"k-rtl": a === "rtl",
|
|
1166
1173
|
"k-disabled": e.disabled,
|
|
1167
1174
|
"k-selected": h,
|
|
1168
|
-
"k-focus":
|
|
1169
|
-
[`k-chip-${
|
|
1170
|
-
[`k-rounded-${
|
|
1175
|
+
"k-focus": D,
|
|
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
|
},
|
|
@@ -1176,15 +1183,16 @@ const yt = (e, o) => {
|
|
|
1176
1183
|
"aria-pressed": e.role ? void 0 : h,
|
|
1177
1184
|
"aria-disabled": e.disabled,
|
|
1178
1185
|
"aria-describedby": e.ariaDescribedBy,
|
|
1179
|
-
|
|
1180
|
-
|
|
1186
|
+
"aria-keyshortcuts": e.removable ? "Enter Delete" : void 0,
|
|
1187
|
+
onFocus: B,
|
|
1188
|
+
onBlur: x,
|
|
1181
1189
|
onKeyDown: S
|
|
1182
1190
|
},
|
|
1183
1191
|
h && (e.selectedIcon || e.selectedSvgIcon) && /* @__PURE__ */ n.createElement(
|
|
1184
1192
|
A,
|
|
1185
1193
|
{
|
|
1186
1194
|
className: "k-chip-icon",
|
|
1187
|
-
name: e.selectedIcon ?
|
|
1195
|
+
name: e.selectedIcon ? ve(e.selectedIcon) : void 0,
|
|
1188
1196
|
icon: e.selectedSvgIcon,
|
|
1189
1197
|
size: "small"
|
|
1190
1198
|
}
|
|
@@ -1193,7 +1201,7 @@ const yt = (e, o) => {
|
|
|
1193
1201
|
A,
|
|
1194
1202
|
{
|
|
1195
1203
|
className: "k-chip-icon",
|
|
1196
|
-
name: e.icon ?
|
|
1204
|
+
name: e.icon ? ve(e.icon) : void 0,
|
|
1197
1205
|
icon: e.svgIcon,
|
|
1198
1206
|
size: "small"
|
|
1199
1207
|
}
|
|
@@ -1220,16 +1228,16 @@ const yt = (e, o) => {
|
|
|
1220
1228
|
},
|
|
1221
1229
|
e.text
|
|
1222
1230
|
)),
|
|
1223
|
-
e.removable && /* @__PURE__ */ n.createElement("span", { className: "k-chip-actions" }, /* @__PURE__ */ n.createElement("span", { className: f("k-chip-action", "k-chip-remove-action"), onClick:
|
|
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(
|
|
1224
1232
|
A,
|
|
1225
1233
|
{
|
|
1226
|
-
name: e.removeIcon ?
|
|
1227
|
-
icon: e.removeSvgIcon ||
|
|
1234
|
+
name: e.removeIcon ? ve(e.removeIcon) : void 0,
|
|
1235
|
+
icon: e.removeSvgIcon || ut,
|
|
1228
1236
|
size: "small"
|
|
1229
1237
|
}
|
|
1230
1238
|
)))
|
|
1231
1239
|
);
|
|
1232
|
-
}),
|
|
1240
|
+
}), Ct = {
|
|
1233
1241
|
id: s.string,
|
|
1234
1242
|
text: s.string,
|
|
1235
1243
|
value: s.any,
|
|
@@ -1251,7 +1259,7 @@ const yt = (e, o) => {
|
|
|
1251
1259
|
fillMode: s.oneOf([null, "outline", "solid"]),
|
|
1252
1260
|
// eslint-disable-next-line max-len
|
|
1253
1261
|
themeColor: s.oneOf([null, "base", "info", "success", "warning", "error"])
|
|
1254
|
-
},
|
|
1262
|
+
}, It = {
|
|
1255
1263
|
disabled: !1,
|
|
1256
1264
|
removable: !1,
|
|
1257
1265
|
removeIcon: "k-i-x-circle",
|
|
@@ -1262,18 +1270,18 @@ const yt = (e, o) => {
|
|
|
1262
1270
|
themeColor: "base"
|
|
1263
1271
|
};
|
|
1264
1272
|
j.displayName = "KendoReactChip";
|
|
1265
|
-
j.propTypes =
|
|
1266
|
-
j.defaultProps =
|
|
1267
|
-
const
|
|
1273
|
+
j.propTypes = Ct;
|
|
1274
|
+
j.defaultProps = It;
|
|
1275
|
+
const xt = (e, o, t) => {
|
|
1268
1276
|
const [i, a] = n.useState(e);
|
|
1269
1277
|
return [i, (u) => {
|
|
1270
|
-
const c =
|
|
1278
|
+
const c = vt(o.state || i, { ...u, ...o });
|
|
1271
1279
|
t && t(c, u.event), a(c);
|
|
1272
1280
|
}];
|
|
1273
|
-
},
|
|
1281
|
+
}, Dt = (e) => {
|
|
1274
1282
|
const [o, t] = n.useState(null);
|
|
1275
1283
|
return [o, (a) => {
|
|
1276
|
-
const l =
|
|
1284
|
+
const l = yt(a.payload, { ...a, ...e });
|
|
1277
1285
|
t(l);
|
|
1278
1286
|
}];
|
|
1279
1287
|
}, wt = (e, o, t) => {
|
|
@@ -1282,26 +1290,26 @@ const It = (e, o, t) => {
|
|
|
1282
1290
|
const c = kt(o.state || i, { ...u, ...o });
|
|
1283
1291
|
t && t(c, u.event), a(c);
|
|
1284
1292
|
}];
|
|
1285
|
-
},
|
|
1293
|
+
}, Se = n.forwardRef((e, o) => {
|
|
1286
1294
|
R(O);
|
|
1287
|
-
const t = n.useRef(null), i = n.useRef(null), a =
|
|
1295
|
+
const t = n.useRef(null), i = n.useRef(null), a = xe(i, e.dir), {
|
|
1288
1296
|
chip: l,
|
|
1289
1297
|
id: u,
|
|
1290
1298
|
style: c,
|
|
1291
1299
|
tabIndex: g,
|
|
1292
|
-
disabled:
|
|
1300
|
+
disabled: v,
|
|
1293
1301
|
size: h,
|
|
1294
|
-
className:
|
|
1302
|
+
className: D,
|
|
1295
1303
|
ariaDescribedBy: N,
|
|
1296
|
-
ariaLabelledBy:
|
|
1304
|
+
ariaLabelledBy: w,
|
|
1297
1305
|
ariaLabel: S,
|
|
1298
|
-
selection:
|
|
1299
|
-
value:
|
|
1306
|
+
selection: B = W.selection,
|
|
1307
|
+
value: x = W.defaultValue,
|
|
1300
1308
|
defaultData: E = W.defaultData,
|
|
1301
1309
|
valueField: p = W.valueField,
|
|
1302
1310
|
textField: T = W.textField,
|
|
1303
1311
|
onChange: K,
|
|
1304
|
-
onDataChange:
|
|
1312
|
+
onDataChange: z
|
|
1305
1313
|
} = e, L = n.useMemo(
|
|
1306
1314
|
() => l || j,
|
|
1307
1315
|
[l, j]
|
|
@@ -1311,30 +1319,30 @@ const It = (e, o, t) => {
|
|
|
1311
1319
|
props: e
|
|
1312
1320
|
})), n.useImperativeHandle(o, () => t.current);
|
|
1313
1321
|
const $ = n.useCallback(
|
|
1314
|
-
(m,
|
|
1322
|
+
(m, y) => {
|
|
1315
1323
|
K && t.current && K.call(void 0, {
|
|
1316
1324
|
value: m,
|
|
1317
1325
|
target: t.current,
|
|
1318
|
-
syntheticEvent:
|
|
1326
|
+
syntheticEvent: y
|
|
1319
1327
|
});
|
|
1320
1328
|
},
|
|
1321
1329
|
[K]
|
|
1322
|
-
), [V, Z] =
|
|
1323
|
-
|
|
1330
|
+
), [V, Z] = xt(
|
|
1331
|
+
x,
|
|
1324
1332
|
{
|
|
1325
|
-
selection:
|
|
1326
|
-
state:
|
|
1333
|
+
selection: B,
|
|
1334
|
+
state: x
|
|
1327
1335
|
},
|
|
1328
1336
|
$
|
|
1329
1337
|
), oe = n.useCallback(
|
|
1330
|
-
(m,
|
|
1331
|
-
|
|
1338
|
+
(m, y) => {
|
|
1339
|
+
z && t.current && z.call(void 0, {
|
|
1332
1340
|
value: m,
|
|
1333
1341
|
target: t.current,
|
|
1334
|
-
syntheticEvent:
|
|
1342
|
+
syntheticEvent: y
|
|
1335
1343
|
});
|
|
1336
1344
|
},
|
|
1337
|
-
[
|
|
1345
|
+
[z]
|
|
1338
1346
|
), [q, ie] = wt(
|
|
1339
1347
|
e.data || E,
|
|
1340
1348
|
{
|
|
@@ -1343,62 +1351,64 @@ const It = (e, o, t) => {
|
|
|
1343
1351
|
},
|
|
1344
1352
|
oe
|
|
1345
1353
|
), G = n.useCallback(
|
|
1346
|
-
(m,
|
|
1354
|
+
(m, y) => (m.push(y[p]), m),
|
|
1347
1355
|
[p]
|
|
1348
1356
|
), _ = n.useMemo(
|
|
1349
1357
|
() => e.data || q,
|
|
1350
1358
|
[e.data, q]
|
|
1351
1359
|
), ae = n.useMemo(
|
|
1352
|
-
() =>
|
|
1353
|
-
[
|
|
1360
|
+
() => x || V,
|
|
1361
|
+
[x, V]
|
|
1354
1362
|
), le = n.useMemo(
|
|
1355
1363
|
() => _.reduce(G, []),
|
|
1356
1364
|
[_, G]
|
|
1357
1365
|
), X = n.useCallback(
|
|
1358
|
-
(m) =>
|
|
1366
|
+
(m) => Me(p)(m),
|
|
1359
1367
|
[p]
|
|
1360
|
-
),
|
|
1361
|
-
(m) =>
|
|
1368
|
+
), k = n.useCallback(
|
|
1369
|
+
(m) => Me(T)(m),
|
|
1362
1370
|
[T]
|
|
1363
|
-
), [
|
|
1364
|
-
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(
|
|
1365
1373
|
"div",
|
|
1366
1374
|
{
|
|
1367
1375
|
ref: i,
|
|
1368
1376
|
...re,
|
|
1369
|
-
role: "listbox",
|
|
1377
|
+
role: v ? void 0 : "listbox",
|
|
1370
1378
|
id: u,
|
|
1371
1379
|
dir: a,
|
|
1372
1380
|
style: c,
|
|
1373
|
-
tabIndex:
|
|
1381
|
+
tabIndex: me(g, v, void 0),
|
|
1374
1382
|
className: f(
|
|
1375
1383
|
"k-chip-list",
|
|
1376
1384
|
{
|
|
1377
1385
|
"k-rtl": a === "rtl",
|
|
1378
|
-
"k-disabled":
|
|
1379
|
-
[`k-chip-list-${
|
|
1386
|
+
"k-disabled": v,
|
|
1387
|
+
[`k-chip-list-${P.sizeMap[h] || h}`]: h
|
|
1380
1388
|
},
|
|
1381
|
-
|
|
1389
|
+
D
|
|
1382
1390
|
),
|
|
1383
1391
|
"aria-label": S,
|
|
1384
|
-
"aria-labelledby":
|
|
1385
|
-
"aria-describedby": N
|
|
1392
|
+
"aria-labelledby": w,
|
|
1393
|
+
"aria-describedby": N,
|
|
1394
|
+
"aria-orientation": "horizontal",
|
|
1395
|
+
"aria-multiselectable": B === "multiple"
|
|
1386
1396
|
},
|
|
1387
|
-
_.map((m,
|
|
1397
|
+
_.map((m, y) => /* @__PURE__ */ n.createElement(
|
|
1388
1398
|
L,
|
|
1389
1399
|
{
|
|
1390
1400
|
role: "option",
|
|
1391
1401
|
dataItem: m,
|
|
1392
1402
|
size: h,
|
|
1393
|
-
key: [X(m),
|
|
1394
|
-
text:
|
|
1403
|
+
key: [X(m), y].join("-"),
|
|
1404
|
+
text: k(m),
|
|
1395
1405
|
value: X(m),
|
|
1396
1406
|
ariaLabel: m.ariaLabel,
|
|
1397
1407
|
svgIcon: m.svgIcon || void 0
|
|
1398
1408
|
}
|
|
1399
1409
|
))
|
|
1400
1410
|
))));
|
|
1401
|
-
}),
|
|
1411
|
+
}), Et = {
|
|
1402
1412
|
id: s.string,
|
|
1403
1413
|
className: s.string,
|
|
1404
1414
|
tabIndex: s.number,
|
|
@@ -1428,10 +1438,10 @@ const It = (e, o, t) => {
|
|
|
1428
1438
|
valueField: "value",
|
|
1429
1439
|
removable: "removable"
|
|
1430
1440
|
};
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
const
|
|
1441
|
+
Se.displayName = "KendoReactChipList";
|
|
1442
|
+
Se.propTypes = Et;
|
|
1443
|
+
Se.defaultProps = W;
|
|
1444
|
+
const Be = n.forwardRef((e, o) => {
|
|
1435
1445
|
const {
|
|
1436
1446
|
className: t,
|
|
1437
1447
|
disabled: i,
|
|
@@ -1440,14 +1450,14 @@ const Se = n.forwardRef((e, o) => {
|
|
|
1440
1450
|
style: u,
|
|
1441
1451
|
id: c,
|
|
1442
1452
|
focused: g,
|
|
1443
|
-
tabIndex:
|
|
1453
|
+
tabIndex: v,
|
|
1444
1454
|
index: h,
|
|
1445
|
-
dataItem:
|
|
1455
|
+
dataItem: D,
|
|
1446
1456
|
item: N,
|
|
1447
|
-
svgIcon:
|
|
1457
|
+
svgIcon: w,
|
|
1448
1458
|
onDown: S,
|
|
1449
|
-
onClick:
|
|
1450
|
-
...
|
|
1459
|
+
onClick: B,
|
|
1460
|
+
...x
|
|
1451
1461
|
} = e, E = n.useRef(null), p = n.useCallback(
|
|
1452
1462
|
() => {
|
|
1453
1463
|
E.current && E.current.focus();
|
|
@@ -1463,10 +1473,10 @@ const Se = n.forwardRef((e, o) => {
|
|
|
1463
1473
|
n.useImperativeHandle(o, T);
|
|
1464
1474
|
const K = n.useCallback(
|
|
1465
1475
|
($) => {
|
|
1466
|
-
|
|
1476
|
+
B && h !== void 0 && !i && B($, h);
|
|
1467
1477
|
},
|
|
1468
|
-
[
|
|
1469
|
-
),
|
|
1478
|
+
[B, h]
|
|
1479
|
+
), z = n.useMemo(
|
|
1470
1480
|
() => f(
|
|
1471
1481
|
"k-fab-item",
|
|
1472
1482
|
{
|
|
@@ -1482,21 +1492,21 @@ const Se = n.forwardRef((e, o) => {
|
|
|
1482
1492
|
{
|
|
1483
1493
|
ref: E,
|
|
1484
1494
|
id: c,
|
|
1485
|
-
className:
|
|
1495
|
+
className: z,
|
|
1486
1496
|
style: u,
|
|
1487
1497
|
role: "menuitem",
|
|
1488
|
-
tabIndex:
|
|
1498
|
+
tabIndex: me(v, i),
|
|
1489
1499
|
"aria-disabled": i,
|
|
1490
1500
|
"aria-label": `${a || ""} floatingactionbutton item`,
|
|
1491
1501
|
onClick: K,
|
|
1492
1502
|
onMouseDown: S,
|
|
1493
1503
|
onPointerDown: S,
|
|
1494
|
-
...
|
|
1504
|
+
...x
|
|
1495
1505
|
},
|
|
1496
|
-
L ? /* @__PURE__ */ n.createElement(L, { itemIndex: h, item:
|
|
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)
|
|
1497
1507
|
);
|
|
1498
1508
|
});
|
|
1499
|
-
|
|
1509
|
+
Be.propTypes = {
|
|
1500
1510
|
className: s.string,
|
|
1501
1511
|
style: s.object,
|
|
1502
1512
|
children: s.any,
|
|
@@ -1509,14 +1519,14 @@ Se.propTypes = {
|
|
|
1509
1519
|
tabIndex: s.number,
|
|
1510
1520
|
customProp: s.any
|
|
1511
1521
|
};
|
|
1512
|
-
|
|
1513
|
-
const
|
|
1522
|
+
Be.displayName = "KendoFloatingActionButtonItem";
|
|
1523
|
+
const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o) => {
|
|
1514
1524
|
const t = { horizontal: o ? "right" : "left", vertical: "bottom" };
|
|
1515
1525
|
return e.horizontal === "end" && (t.horizontal = o ? "left" : "right"), t;
|
|
1516
|
-
},
|
|
1526
|
+
}, St = (e, o) => {
|
|
1517
1527
|
const t = { horizontal: o ? "right" : "left", vertical: "top" };
|
|
1518
1528
|
return e.horizontal === "end" && (t.horizontal = o ? "left" : "right"), t;
|
|
1519
|
-
},
|
|
1529
|
+
}, Bt = (e, o) => {
|
|
1520
1530
|
const t = o === "end" ? "end" : "start";
|
|
1521
1531
|
return {
|
|
1522
1532
|
rtl: { end: "k-text-left", start: "k-text-right" },
|
|
@@ -1525,8 +1535,8 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1525
1535
|
}, Ft = (e, o, t, i) => {
|
|
1526
1536
|
const a = o.horizontal, l = o.vertical;
|
|
1527
1537
|
if (e.current) {
|
|
1528
|
-
const u = t && t.x !== void 0 ? he(t.x) :
|
|
1529
|
-
e.current.style.setProperty(zt(o, i), a === "center" ? c : u), e.current.style.setProperty(Pt(o), l === "middle" ?
|
|
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(zt(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"));
|
|
1530
1540
|
}
|
|
1531
1541
|
}, zt = (e, o) => {
|
|
1532
1542
|
const { horizontal: t } = e;
|
|
@@ -1539,7 +1549,7 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1539
1549
|
top: "top",
|
|
1540
1550
|
middle: "top",
|
|
1541
1551
|
bottom: "bottom"
|
|
1542
|
-
})[e.vertical || "bottom"],
|
|
1552
|
+
})[e.vertical || "bottom"], Mt = 2, Rt = 100, Xe = n.forwardRef((e, o) => {
|
|
1543
1553
|
R(O);
|
|
1544
1554
|
const {
|
|
1545
1555
|
align: t = Y.align,
|
|
@@ -1549,19 +1559,19 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1549
1559
|
icon: u,
|
|
1550
1560
|
svgIcon: c,
|
|
1551
1561
|
iconClass: g,
|
|
1552
|
-
id:
|
|
1562
|
+
id: v,
|
|
1553
1563
|
items: h,
|
|
1554
|
-
item:
|
|
1564
|
+
item: D,
|
|
1555
1565
|
text: N,
|
|
1556
|
-
positionMode:
|
|
1566
|
+
positionMode: w = Y.positionMode,
|
|
1557
1567
|
size: S = Y.size,
|
|
1558
|
-
style:
|
|
1559
|
-
rounded:
|
|
1568
|
+
style: B,
|
|
1569
|
+
rounded: x = Y.rounded,
|
|
1560
1570
|
themeColor: E = Y.themeColor,
|
|
1561
1571
|
overlayStyle: p,
|
|
1562
1572
|
tabIndex: T,
|
|
1563
1573
|
accessKey: K,
|
|
1564
|
-
popupSettings:
|
|
1574
|
+
popupSettings: z = {},
|
|
1565
1575
|
modal: L,
|
|
1566
1576
|
onClick: $,
|
|
1567
1577
|
onItemClick: V,
|
|
@@ -1571,34 +1581,34 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1571
1581
|
onOpen: ie,
|
|
1572
1582
|
onClose: G,
|
|
1573
1583
|
..._
|
|
1574
|
-
} = e, ae =
|
|
1584
|
+
} = e, ae = rt(), le = ae ? ae + Mt : Rt, X = n.useRef(null), k = n.useRef(null), fe = n.useRef(null), be = n.useRef(null), re = n.useCallback(
|
|
1575
1585
|
() => {
|
|
1576
|
-
|
|
1586
|
+
k.current && k.current.focus();
|
|
1577
1587
|
},
|
|
1578
1588
|
[]
|
|
1579
1589
|
), m = n.useCallback(
|
|
1580
1590
|
() => ({
|
|
1581
|
-
element:
|
|
1591
|
+
element: k.current,
|
|
1582
1592
|
focus: re
|
|
1583
1593
|
}),
|
|
1584
1594
|
[re]
|
|
1585
1595
|
);
|
|
1586
1596
|
n.useImperativeHandle(X, m), n.useImperativeHandle(o, () => X.current);
|
|
1587
|
-
const [
|
|
1597
|
+
const [y, F] = n.useState(!1), [ce, H] = n.useState(!1), [J, C] = n.useState(-1), Je = Re() + "-button-id", ge = xe(k, e.dir), Q = ge === "rtl", de = Re() + "-list-id";
|
|
1588
1598
|
n.useEffect(
|
|
1589
1599
|
() => {
|
|
1590
|
-
Ft(
|
|
1600
|
+
Ft(k, t, i, Q);
|
|
1591
1601
|
},
|
|
1592
|
-
[
|
|
1602
|
+
[k, t, i, Q]
|
|
1593
1603
|
), n.useEffect(
|
|
1594
1604
|
() => {
|
|
1595
|
-
ce &&
|
|
1605
|
+
ce && k && k.current && k.current.focus();
|
|
1596
1606
|
},
|
|
1597
|
-
[ce,
|
|
1607
|
+
[ce, k]
|
|
1598
1608
|
);
|
|
1599
1609
|
const U = n.useCallback(
|
|
1600
1610
|
(d, b) => {
|
|
1601
|
-
h &&
|
|
1611
|
+
h && I(
|
|
1602
1612
|
b ? ie : G,
|
|
1603
1613
|
d,
|
|
1604
1614
|
m(),
|
|
@@ -1608,51 +1618,51 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1608
1618
|
[ie, G, h]
|
|
1609
1619
|
), Fe = n.useCallback(
|
|
1610
1620
|
(d) => {
|
|
1611
|
-
!d.target || l || (!h && $ ?
|
|
1621
|
+
!d.target || l || (!h && $ ? I(
|
|
1612
1622
|
$,
|
|
1613
1623
|
d,
|
|
1614
1624
|
m(),
|
|
1615
1625
|
void 0
|
|
1616
|
-
) : (
|
|
1626
|
+
) : (F(!y), H(!0), C(y ? -1 : 0), U(d, !y)));
|
|
1617
1627
|
},
|
|
1618
1628
|
[
|
|
1619
|
-
|
|
1629
|
+
F,
|
|
1620
1630
|
H,
|
|
1621
|
-
|
|
1631
|
+
C,
|
|
1622
1632
|
$,
|
|
1623
1633
|
U,
|
|
1624
|
-
|
|
1634
|
+
y,
|
|
1625
1635
|
h,
|
|
1626
1636
|
l
|
|
1627
1637
|
]
|
|
1628
|
-
),
|
|
1638
|
+
), Qe = n.useCallback(
|
|
1629
1639
|
(d) => {
|
|
1630
|
-
H(!0),
|
|
1640
|
+
H(!0), C(y ? 0 : -1), Z && I(
|
|
1631
1641
|
Z,
|
|
1632
1642
|
d,
|
|
1633
1643
|
m(),
|
|
1634
1644
|
void 0
|
|
1635
1645
|
);
|
|
1636
1646
|
},
|
|
1637
|
-
[Z, H,
|
|
1638
|
-
),
|
|
1647
|
+
[Z, H, C]
|
|
1648
|
+
), Ye = n.useCallback(
|
|
1639
1649
|
(d) => {
|
|
1640
|
-
H(!1),
|
|
1650
|
+
H(!1), F(!1), C(-1), I(
|
|
1641
1651
|
oe,
|
|
1642
1652
|
d,
|
|
1643
1653
|
m(),
|
|
1644
1654
|
void 0
|
|
1645
|
-
),
|
|
1655
|
+
), y && U(d, !1);
|
|
1646
1656
|
},
|
|
1647
|
-
[oe, H,
|
|
1648
|
-
),
|
|
1657
|
+
[oe, H, F, C, U]
|
|
1658
|
+
), et = n.useCallback(
|
|
1649
1659
|
(d) => {
|
|
1650
1660
|
d.preventDefault();
|
|
1651
1661
|
},
|
|
1652
1662
|
[]
|
|
1653
1663
|
), ye = n.useCallback(
|
|
1654
1664
|
(d, b) => {
|
|
1655
|
-
h && (h[b].disabled ||
|
|
1665
|
+
h && (h[b].disabled || I(
|
|
1656
1666
|
V,
|
|
1657
1667
|
d,
|
|
1658
1668
|
m(),
|
|
@@ -1663,55 +1673,55 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1663
1673
|
));
|
|
1664
1674
|
},
|
|
1665
1675
|
[V]
|
|
1666
|
-
),
|
|
1676
|
+
), tt = n.useCallback(
|
|
1667
1677
|
(d, b) => {
|
|
1668
|
-
!d.target || !h || (
|
|
1678
|
+
!d.target || !h || (C(b), F(!1), ye(d, b), U(d, !1));
|
|
1669
1679
|
},
|
|
1670
|
-
[
|
|
1671
|
-
),
|
|
1680
|
+
[C, F, ye, U]
|
|
1681
|
+
), st = n.useCallback(
|
|
1672
1682
|
(d) => {
|
|
1673
|
-
se(document) ===
|
|
1683
|
+
se(document) === k.current && d.preventDefault();
|
|
1674
1684
|
},
|
|
1675
|
-
[
|
|
1676
|
-
),
|
|
1685
|
+
[k]
|
|
1686
|
+
), nt = n.useCallback(
|
|
1677
1687
|
(d) => {
|
|
1678
|
-
const b = J,
|
|
1688
|
+
const b = J, ke = h ? h.length : -1;
|
|
1679
1689
|
if (d.altKey) {
|
|
1680
|
-
!
|
|
1690
|
+
!y && d.keyCode === r.down && (d.preventDefault(), F(!0), C(0)), y && d.keyCode === r.up && (d.preventDefault(), F(!1), C(-1));
|
|
1681
1691
|
return;
|
|
1682
1692
|
}
|
|
1683
1693
|
switch (d.keyCode) {
|
|
1684
1694
|
case r.enter:
|
|
1685
1695
|
case r.space:
|
|
1686
|
-
b >= 0 && ye(d, b), h || Fe(d), d.preventDefault(),
|
|
1696
|
+
b >= 0 && ye(d, b), h || Fe(d), d.preventDefault(), F(!y), C(y ? -1 : 0);
|
|
1687
1697
|
break;
|
|
1688
1698
|
case r.esc:
|
|
1689
|
-
d.preventDefault(),
|
|
1699
|
+
d.preventDefault(), F(!1), C(-1);
|
|
1690
1700
|
break;
|
|
1691
1701
|
case r.home:
|
|
1692
|
-
d.preventDefault(),
|
|
1702
|
+
d.preventDefault(), C(0);
|
|
1693
1703
|
break;
|
|
1694
1704
|
case r.end:
|
|
1695
|
-
d.preventDefault(),
|
|
1705
|
+
d.preventDefault(), C(ke - 1);
|
|
1696
1706
|
break;
|
|
1697
1707
|
case r.down:
|
|
1698
1708
|
case r.right:
|
|
1699
|
-
d.preventDefault(),
|
|
1709
|
+
d.preventDefault(), C(b + 1 >= ke ? 0 : b + 1);
|
|
1700
1710
|
break;
|
|
1701
1711
|
case r.up:
|
|
1702
1712
|
case r.left:
|
|
1703
|
-
d.preventDefault(),
|
|
1713
|
+
d.preventDefault(), C(b - 1 < 0 ? ke - 1 : b - 1);
|
|
1704
1714
|
break;
|
|
1705
1715
|
}
|
|
1706
|
-
|
|
1716
|
+
I(
|
|
1707
1717
|
q,
|
|
1708
1718
|
d,
|
|
1709
1719
|
m(),
|
|
1710
1720
|
void 0
|
|
1711
1721
|
);
|
|
1712
1722
|
},
|
|
1713
|
-
[q, J,
|
|
1714
|
-
),
|
|
1723
|
+
[q, J, C, Q, F]
|
|
1724
|
+
), ot = n.useMemo(
|
|
1715
1725
|
() => f(
|
|
1716
1726
|
"k-fab k-fab-solid",
|
|
1717
1727
|
{
|
|
@@ -1719,18 +1729,18 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1719
1729
|
"k-fab-md": S === "medium",
|
|
1720
1730
|
"k-fab-lg": S === "large",
|
|
1721
1731
|
"k-disabled": l,
|
|
1722
|
-
"k-pos-absolute":
|
|
1723
|
-
"k-pos-fixed":
|
|
1732
|
+
"k-pos-absolute": w === "absolute",
|
|
1733
|
+
"k-pos-fixed": w === "fixed",
|
|
1724
1734
|
"k-focus": ce,
|
|
1725
|
-
[`k-rounded-${
|
|
1735
|
+
[`k-rounded-${P.roundedMap[x] || x}`]: x,
|
|
1726
1736
|
[`k-fab-solid-${E}`]: E
|
|
1727
1737
|
},
|
|
1728
1738
|
`k-${t.vertical}-${t.horizontal}`,
|
|
1729
1739
|
a
|
|
1730
1740
|
),
|
|
1731
|
-
[E, S,
|
|
1732
|
-
),
|
|
1733
|
-
|
|
1741
|
+
[E, S, x, l, w, t, ce, a]
|
|
1742
|
+
), it = h && h.map((d, b) => /* @__PURE__ */ n.createElement(
|
|
1743
|
+
Be,
|
|
1734
1744
|
{
|
|
1735
1745
|
...d,
|
|
1736
1746
|
key: b,
|
|
@@ -1739,44 +1749,44 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1739
1749
|
disabled: l || d.disabled,
|
|
1740
1750
|
focused: J === b,
|
|
1741
1751
|
dataItem: d,
|
|
1742
|
-
item:
|
|
1752
|
+
item: D,
|
|
1743
1753
|
className: f(
|
|
1744
1754
|
d.className,
|
|
1745
|
-
|
|
1755
|
+
Bt(ge || "ltr", t.horizontal)
|
|
1746
1756
|
),
|
|
1747
|
-
onClick:
|
|
1748
|
-
onDown:
|
|
1757
|
+
onClick: tt,
|
|
1758
|
+
onDown: st
|
|
1749
1759
|
}
|
|
1750
|
-
)), ze = !!((u || c) && !N),
|
|
1751
|
-
return /* @__PURE__ */ n.createElement(
|
|
1760
|
+
)), ze = !!((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(
|
|
1752
1762
|
"button",
|
|
1753
1763
|
{
|
|
1754
|
-
ref:
|
|
1755
|
-
id:
|
|
1764
|
+
ref: k,
|
|
1765
|
+
id: v || Je,
|
|
1756
1766
|
role: "button",
|
|
1757
1767
|
type: "button",
|
|
1758
1768
|
"aria-disabled": l,
|
|
1759
|
-
"aria-expanded": h ?
|
|
1769
|
+
"aria-expanded": h ? y : void 0,
|
|
1760
1770
|
"aria-haspopup": !!h,
|
|
1761
1771
|
"aria-label": `${N || ""} floatingactionbutton`,
|
|
1762
1772
|
"aria-owns": h ? de : void 0,
|
|
1763
1773
|
"aria-activedescendant": J >= 0 && h ? `${de}-${J}` : void 0,
|
|
1764
|
-
tabIndex:
|
|
1774
|
+
tabIndex: me(T, l),
|
|
1765
1775
|
accessKey: K,
|
|
1766
|
-
dir:
|
|
1776
|
+
dir: ge,
|
|
1767
1777
|
disabled: l,
|
|
1768
|
-
className:
|
|
1769
|
-
style:
|
|
1778
|
+
className: ot,
|
|
1779
|
+
style: B,
|
|
1770
1780
|
onClick: Fe,
|
|
1771
|
-
onMouseDown:
|
|
1772
|
-
onFocus:
|
|
1773
|
-
onBlur:
|
|
1774
|
-
onKeyDown:
|
|
1781
|
+
onMouseDown: et,
|
|
1782
|
+
onFocus: Qe,
|
|
1783
|
+
onBlur: Ye,
|
|
1784
|
+
onKeyDown: nt,
|
|
1775
1785
|
..._
|
|
1776
1786
|
},
|
|
1777
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,
|
|
1778
1788
|
N && /* @__PURE__ */ n.createElement("span", { className: "k-fab-text" }, N)
|
|
1779
|
-
), L &&
|
|
1789
|
+
), L && y && /* @__PURE__ */ n.createElement(
|
|
1780
1790
|
"div",
|
|
1781
1791
|
{
|
|
1782
1792
|
className: "k-overlay",
|
|
@@ -1788,21 +1798,21 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1788
1798
|
), /* @__PURE__ */ n.createElement(
|
|
1789
1799
|
De,
|
|
1790
1800
|
{
|
|
1791
|
-
ref:
|
|
1792
|
-
anchor:
|
|
1793
|
-
show:
|
|
1794
|
-
animate:
|
|
1795
|
-
popupClass: f("k-popup-transparent k-fab-popup",
|
|
1796
|
-
anchorAlign:
|
|
1797
|
-
popupAlign:
|
|
1801
|
+
ref: be,
|
|
1802
|
+
anchor: k.current,
|
|
1803
|
+
show: y,
|
|
1804
|
+
animate: z.animate,
|
|
1805
|
+
popupClass: f("k-popup-transparent k-fab-popup", z.popupClass),
|
|
1806
|
+
anchorAlign: z.anchorAlign || Nt(t, Q),
|
|
1807
|
+
popupAlign: z.popupAlign || St(t, Q),
|
|
1798
1808
|
style: { boxShadow: "none" }
|
|
1799
1809
|
},
|
|
1800
1810
|
/* @__PURE__ */ n.createElement(
|
|
1801
1811
|
"ul",
|
|
1802
1812
|
{
|
|
1803
|
-
ref:
|
|
1813
|
+
ref: fe,
|
|
1804
1814
|
role: "menu",
|
|
1805
|
-
"aria-labelledby":
|
|
1815
|
+
"aria-labelledby": v,
|
|
1806
1816
|
id: de,
|
|
1807
1817
|
className: f("k-fab-items", {
|
|
1808
1818
|
"k-fab-items-bottom": t.vertical !== "bottom",
|
|
@@ -1813,11 +1823,11 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o)
|
|
|
1813
1823
|
paddingRight: ze ? Pe : void 0
|
|
1814
1824
|
}
|
|
1815
1825
|
},
|
|
1816
|
-
|
|
1826
|
+
it
|
|
1817
1827
|
)
|
|
1818
1828
|
)));
|
|
1819
1829
|
});
|
|
1820
|
-
|
|
1830
|
+
Xe.propTypes = {
|
|
1821
1831
|
className: s.string,
|
|
1822
1832
|
style: s.object,
|
|
1823
1833
|
id: s.string,
|
|
@@ -1863,21 +1873,27 @@ const Y = {
|
|
|
1863
1873
|
themeColor: "primary",
|
|
1864
1874
|
positionMode: "fixed"
|
|
1865
1875
|
};
|
|
1866
|
-
|
|
1876
|
+
Xe.displayName = "KendoFloatingActionButton";
|
|
1877
|
+
const Ot = Ae(Ne);
|
|
1878
|
+
Ot.displayName = "KendoReactDropDownButton";
|
|
1879
|
+
const Kt = Ae(Ee);
|
|
1880
|
+
Kt.displayName = "KendoReactSplitButton";
|
|
1867
1881
|
export {
|
|
1868
1882
|
ne as Button,
|
|
1869
|
-
|
|
1883
|
+
bt as ButtonGroup,
|
|
1870
1884
|
j as Chip,
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1885
|
+
Se as ChipList,
|
|
1886
|
+
Ot as DropDownButton,
|
|
1887
|
+
Ne as DropDownButtonClassComponent,
|
|
1888
|
+
Ue as DropDownButtonItem,
|
|
1889
|
+
Xe as FloatingActionButton,
|
|
1890
|
+
Be 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
|
|
1883
1899
|
};
|