@progress/kendo-react-buttons 7.0.0-develop.1 → 7.0.0-develop.11
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/Chip/ChipList.d.ts +4 -0
- package/dist/cdn/js/kendo-react-buttons.js +1 -1
- package/index.js +1 -1
- package/index.mjs +430 -421
- package/package.json +5 -4
package/index.mjs
CHANGED
|
@@ -3,27 +3,27 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as n from "react";
|
|
6
|
-
import
|
|
6
|
+
import xe from "react";
|
|
7
7
|
import * as s from "prop-types";
|
|
8
|
-
import { svgIconPropType as
|
|
9
|
-
import { Popup as
|
|
10
|
-
import { caretAltDownIcon as
|
|
11
|
-
const
|
|
8
|
+
import { svgIconPropType as M, validatePackage as R, classNames as f, kendoThemeMaps as B, IconWrap as A, Keys as r, guid as me, dispatchEvent as x, getActiveElement as se, useDir as De, useMouse as Oe, getTabIndex as fe, toIconName as Ce, getter as Be, useZIndexContext as lt, ZIndexContext as rt } from "@progress/kendo-react-common";
|
|
9
|
+
import { Popup as we } from "@progress/kendo-react-popup";
|
|
10
|
+
import { caretAltDownIcon as ct, xCircleIcon as dt } from "@progress/kendo-svg-icons";
|
|
11
|
+
const O = {
|
|
12
12
|
name: "@progress/kendo-react-buttons",
|
|
13
13
|
productName: "KendoReact",
|
|
14
14
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
15
|
-
publishDate:
|
|
15
|
+
publishDate: 1701695716,
|
|
16
16
|
version: "",
|
|
17
17
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
18
18
|
};
|
|
19
|
-
function
|
|
20
|
-
return e ? /* @__PURE__ */ n.createElement("img", { role: "presentation", className: "k-button-icon", alt: a, src: e }) : o || i ? /* @__PURE__ */ n.createElement(
|
|
19
|
+
function ut({ imageUrl: e, name: o, iconClass: t, svgIcon: i, imageAlt: a }) {
|
|
20
|
+
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
21
|
}
|
|
22
22
|
const ee = class extends n.Component {
|
|
23
23
|
constructor(e) {
|
|
24
24
|
super(e), this._element = null, this.handleClick = (o) => {
|
|
25
25
|
this.toggleIfApplicable(), this.props.onClick && this.props.onClick.call(void 0, o);
|
|
26
|
-
},
|
|
26
|
+
}, R(O), this.state = { selected: this.props.togglable === !0 && this.props.selected === !0 };
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* Gets the DOM element of the Button component.
|
|
@@ -55,36 +55,36 @@ const ee = class extends n.Component {
|
|
|
55
55
|
iconClass: i,
|
|
56
56
|
svgIcon: a,
|
|
57
57
|
imageUrl: l,
|
|
58
|
-
imageAlt:
|
|
58
|
+
imageAlt: u,
|
|
59
59
|
className: c,
|
|
60
|
-
onClick:
|
|
61
|
-
size:
|
|
62
|
-
rounded:
|
|
63
|
-
fillMode:
|
|
60
|
+
onClick: g,
|
|
61
|
+
size: v = ee.defaultProps.size,
|
|
62
|
+
rounded: h = ee.defaultProps.rounded,
|
|
63
|
+
fillMode: D = ee.defaultProps.fillMode,
|
|
64
64
|
themeColor: N = ee.defaultProps.themeColor,
|
|
65
|
-
...
|
|
66
|
-
} = this.props, S = a !== void 0 || t !== void 0 || i !== void 0 || l !== void 0,
|
|
65
|
+
...w
|
|
66
|
+
} = this.props, S = a !== void 0 || t !== void 0 || i !== void 0 || l !== void 0, F = e !== void 0, I = ut({
|
|
67
67
|
name: t,
|
|
68
68
|
svgIcon: a,
|
|
69
69
|
iconClass: i,
|
|
70
70
|
imageUrl: l,
|
|
71
|
-
imageAlt:
|
|
71
|
+
imageAlt: u
|
|
72
72
|
});
|
|
73
73
|
return /* @__PURE__ */ n.createElement(
|
|
74
74
|
"button",
|
|
75
75
|
{
|
|
76
|
-
ref: (
|
|
76
|
+
ref: (E) => this._element = E,
|
|
77
77
|
"aria-pressed": o ? this.state.selected : void 0,
|
|
78
|
-
...
|
|
78
|
+
...w,
|
|
79
79
|
onClick: this.handleClick,
|
|
80
80
|
className: f(
|
|
81
81
|
"k-button",
|
|
82
82
|
{
|
|
83
|
-
[`k-button-${
|
|
84
|
-
[`k-button-${
|
|
85
|
-
[`k-button-${
|
|
86
|
-
[`k-rounded-${
|
|
87
|
-
"k-icon-button": !
|
|
83
|
+
[`k-button-${B.sizeMap[v] || v}`]: v,
|
|
84
|
+
[`k-button-${D}`]: D,
|
|
85
|
+
[`k-button-${D}-${N}`]: !!(D && N),
|
|
86
|
+
[`k-rounded-${B.roundedMap[h] || h}`]: h,
|
|
87
|
+
"k-icon-button": !F && S,
|
|
88
88
|
"k-disabled": this.props.disabled,
|
|
89
89
|
"k-selected": this.state.selected,
|
|
90
90
|
"k-rtl": this.props.dir === "rtl"
|
|
@@ -92,7 +92,7 @@ const ee = class extends n.Component {
|
|
|
92
92
|
this.props.className
|
|
93
93
|
)
|
|
94
94
|
},
|
|
95
|
-
|
|
95
|
+
I,
|
|
96
96
|
e && /* @__PURE__ */ n.createElement("span", { className: "k-button-text" }, e)
|
|
97
97
|
);
|
|
98
98
|
}
|
|
@@ -109,7 +109,7 @@ ne.propTypes = {
|
|
|
109
109
|
selected: s.bool,
|
|
110
110
|
togglable: s.bool,
|
|
111
111
|
icon: s.string,
|
|
112
|
-
svgIcon:
|
|
112
|
+
svgIcon: M,
|
|
113
113
|
iconClass: s.string,
|
|
114
114
|
imageUrl: s.string,
|
|
115
115
|
imageAlt: s.string,
|
|
@@ -126,7 +126,7 @@ ne.defaultProps = {
|
|
|
126
126
|
fillMode: "solid",
|
|
127
127
|
themeColor: "base"
|
|
128
128
|
};
|
|
129
|
-
const
|
|
129
|
+
const ht = {
|
|
130
130
|
button: "k-button",
|
|
131
131
|
flat: "k-flat",
|
|
132
132
|
outline: "k-outline",
|
|
@@ -142,17 +142,17 @@ const pt = {
|
|
|
142
142
|
"button-group-stretched": "k-button-group-stretched",
|
|
143
143
|
ltr: "k-ltr",
|
|
144
144
|
rtl: "k-rtl"
|
|
145
|
-
}, Me = ":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)",
|
|
145
|
+
}, Me = ":not(.k-dropdownlist button):not(.k-colorpicker button):not(.k-split-button .k-split-button-arrow)", pt = [
|
|
146
146
|
"button" + Me,
|
|
147
147
|
".k-button-group > button" + Me,
|
|
148
148
|
".k-colorpicker",
|
|
149
149
|
".k-dropdownlist"
|
|
150
|
-
],
|
|
151
|
-
styles:
|
|
152
|
-
}, ue =
|
|
153
|
-
class
|
|
150
|
+
], mt = {
|
|
151
|
+
styles: ht
|
|
152
|
+
}, ue = mt.styles;
|
|
153
|
+
class ft extends n.Component {
|
|
154
154
|
constructor(o) {
|
|
155
|
-
super(o), this._element = null,
|
|
155
|
+
super(o), this._element = null, R(O);
|
|
156
156
|
}
|
|
157
157
|
/**
|
|
158
158
|
* @hidden
|
|
@@ -193,23 +193,23 @@ class bt extends n.Component {
|
|
|
193
193
|
const l = f(o.props.className, {
|
|
194
194
|
[ue["group-start"]]: a ? i : t === 0,
|
|
195
195
|
[ue["group-end"]]: a ? t === 0 : i
|
|
196
|
-
}),
|
|
196
|
+
}), u = { ...this.props.width ? { width: this.props.width } : {}, ...o.props.style || {} }, c = this.props.disabled || o.props.disabled, g = {
|
|
197
197
|
...o.props,
|
|
198
198
|
...l ? { className: l } : {},
|
|
199
|
-
...Object.keys(
|
|
199
|
+
...Object.keys(u).length ? { style: u } : {},
|
|
200
200
|
...c !== void 0 ? { disabled: c } : {}
|
|
201
201
|
};
|
|
202
|
-
return n.Children.count(o.props.children) > 0 ? n.cloneElement(o,
|
|
202
|
+
return n.Children.count(o.props.children) > 0 ? n.cloneElement(o, g, o.props.children) : n.cloneElement(o, g);
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
|
|
205
|
+
ft.propTypes = {
|
|
206
206
|
children: s.oneOfType([s.arrayOf(s.element), s.element]),
|
|
207
207
|
className: s.string,
|
|
208
208
|
disabled: s.bool,
|
|
209
209
|
width: s.string,
|
|
210
210
|
dir: s.string
|
|
211
211
|
};
|
|
212
|
-
const
|
|
212
|
+
const Ee = (e) => {
|
|
213
213
|
const o = n.useCallback(
|
|
214
214
|
(l) => {
|
|
215
215
|
e.onClick(l, e.index);
|
|
@@ -244,7 +244,7 @@ const Ne = (e) => {
|
|
|
244
244
|
),
|
|
245
245
|
key: "icon"
|
|
246
246
|
},
|
|
247
|
-
t ? /* @__PURE__ */ n.createElement(t, { item: e.dataItem, itemIndex: e.index }) : /* @__PURE__ */ n.createElement(n.Fragment, null, (e.dataItem.icon || e.dataItem.iconClass) && /* @__PURE__ */ n.createElement(
|
|
247
|
+
t ? /* @__PURE__ */ n.createElement(t, { item: e.dataItem, itemIndex: e.index }) : /* @__PURE__ */ n.createElement(n.Fragment, null, (e.dataItem.icon || e.dataItem.iconClass) && /* @__PURE__ */ n.createElement(A, { className: e.dataItem.iconClass, name: e.dataItem.icon, icon: e.dataItem.svgIcon }), e.dataItem.imageUrl && /* @__PURE__ */ n.createElement(
|
|
248
248
|
"img",
|
|
249
249
|
{
|
|
250
250
|
role: "presentation",
|
|
@@ -258,7 +258,7 @@ const Ne = (e) => {
|
|
|
258
258
|
return e.item !== void 0 && /* to be removed in 5.0.0 */
|
|
259
259
|
e.render !== void 0 ? e.render.call(void 0, a, e) : a;
|
|
260
260
|
};
|
|
261
|
-
|
|
261
|
+
Ee.displayName = "KendoReactButtonItem";
|
|
262
262
|
class Ke extends n.Component {
|
|
263
263
|
/**
|
|
264
264
|
* @hidden
|
|
@@ -275,7 +275,7 @@ Ke.propTypes = {
|
|
|
275
275
|
disabled: s.bool,
|
|
276
276
|
render: s.any
|
|
277
277
|
};
|
|
278
|
-
const
|
|
278
|
+
const $e = (e, o, t, i) => {
|
|
279
279
|
if (t)
|
|
280
280
|
return e;
|
|
281
281
|
const a = Math.min(i - 1, Math.max(0, e));
|
|
@@ -298,7 +298,7 @@ const Ae = (e, o, t, i) => {
|
|
|
298
298
|
return e;
|
|
299
299
|
}
|
|
300
300
|
};
|
|
301
|
-
function
|
|
301
|
+
function Ae(e) {
|
|
302
302
|
let o = { horizontal: "left", vertical: "bottom" };
|
|
303
303
|
return e && (o.horizontal = "right"), o;
|
|
304
304
|
}
|
|
@@ -306,7 +306,7 @@ function Te(e) {
|
|
|
306
306
|
let o = { horizontal: "left", vertical: "top" };
|
|
307
307
|
return e && (o.horizontal = "right"), o;
|
|
308
308
|
}
|
|
309
|
-
class
|
|
309
|
+
class Le extends n.Component {
|
|
310
310
|
constructor(o) {
|
|
311
311
|
super(o), this.state = {
|
|
312
312
|
focused: !1,
|
|
@@ -332,15 +332,15 @@ class _e extends n.Component {
|
|
|
332
332
|
return;
|
|
333
333
|
}
|
|
334
334
|
if (this.opened) {
|
|
335
|
-
const l =
|
|
335
|
+
const l = $e(
|
|
336
336
|
i,
|
|
337
337
|
t.keyCode,
|
|
338
338
|
t.altKey,
|
|
339
339
|
this.buttonsData.length
|
|
340
340
|
);
|
|
341
341
|
l !== i && (a = a || {}, a.focusedIndex = l);
|
|
342
|
-
const
|
|
343
|
-
!t.altKey && (
|
|
342
|
+
const u = t.keyCode === r.up || t.keyCode === r.down || t.keyCode === r.left || t.keyCode === r.right;
|
|
343
|
+
!t.altKey && (u || t.keyCode === r.home || t.keyCode === r.end) && t.preventDefault();
|
|
344
344
|
}
|
|
345
345
|
a && this.setState(a);
|
|
346
346
|
}, this.switchFocus = (t) => {
|
|
@@ -380,7 +380,7 @@ class _e extends n.Component {
|
|
|
380
380
|
se(document) === this.list && t.preventDefault();
|
|
381
381
|
}, this.dispatchPopupEvent = (t, i) => {
|
|
382
382
|
x(i ? this.props.onOpen : this.props.onClose, t, this, void 0), this.openedDuringOnChange = void 0;
|
|
383
|
-
},
|
|
383
|
+
}, R(O);
|
|
384
384
|
}
|
|
385
385
|
get opened() {
|
|
386
386
|
return this.openedDuringOnChange !== void 0 ? this.openedDuringOnChange : this.props.opened === void 0 ? this.state.opened : this.props.opened;
|
|
@@ -390,7 +390,7 @@ class _e extends n.Component {
|
|
|
390
390
|
*/
|
|
391
391
|
render() {
|
|
392
392
|
this.buttonsData = this.props.items || n.Children.toArray(this.props.children).filter((c) => c && c.type === Ke).map((c) => c.props);
|
|
393
|
-
const o = this.isRtl(), t = o ? "rtl" : void 0, { id: i, style: a, tabIndex: l, disabled:
|
|
393
|
+
const o = this.isRtl(), t = o ? "rtl" : void 0, { id: i, style: a, tabIndex: l, disabled: u } = this.props;
|
|
394
394
|
return /* @__PURE__ */ n.createElement(
|
|
395
395
|
"div",
|
|
396
396
|
{
|
|
@@ -402,7 +402,7 @@ class _e extends n.Component {
|
|
|
402
402
|
{
|
|
403
403
|
"k-focus": this.state.focused
|
|
404
404
|
},
|
|
405
|
-
`k-rounded-${
|
|
405
|
+
`k-rounded-${B.roundedMap[this.props.rounded || "medium"]}`,
|
|
406
406
|
this.props.className
|
|
407
407
|
),
|
|
408
408
|
onKeyDown: this.onKeyDown,
|
|
@@ -421,7 +421,7 @@ class _e extends n.Component {
|
|
|
421
421
|
fillMode: this.props.fillMode,
|
|
422
422
|
themeColor: this.props.themeColor,
|
|
423
423
|
onClick: (c) => this.onItemClick(c, -1),
|
|
424
|
-
disabled:
|
|
424
|
+
disabled: u || void 0,
|
|
425
425
|
tabIndex: l,
|
|
426
426
|
accessKey: this.props.accessKey,
|
|
427
427
|
className: this.props.buttonClass,
|
|
@@ -430,7 +430,7 @@ class _e extends n.Component {
|
|
|
430
430
|
iconClass: this.props.iconClass,
|
|
431
431
|
imageUrl: this.props.imageUrl,
|
|
432
432
|
dir: t,
|
|
433
|
-
"aria-disabled":
|
|
433
|
+
"aria-disabled": u,
|
|
434
434
|
"aria-haspopup": !0,
|
|
435
435
|
"aria-expanded": this.opened || void 0,
|
|
436
436
|
"aria-label": this.props.ariaLabel,
|
|
@@ -449,9 +449,9 @@ class _e extends n.Component {
|
|
|
449
449
|
fillMode: this.props.fillMode,
|
|
450
450
|
themeColor: this.props.themeColor,
|
|
451
451
|
icon: "caret-alt-down",
|
|
452
|
-
svgIcon:
|
|
452
|
+
svgIcon: ct,
|
|
453
453
|
className: "k-split-button-arrow",
|
|
454
|
-
disabled:
|
|
454
|
+
disabled: u || void 0,
|
|
455
455
|
tabIndex: -1,
|
|
456
456
|
onClick: this.onSplitPartClick,
|
|
457
457
|
onMouseDown: this.onDownSplitPart,
|
|
@@ -489,13 +489,13 @@ class _e extends n.Component {
|
|
|
489
489
|
renderPopup(o) {
|
|
490
490
|
const { popupSettings: t = {} } = this.props, { focusedIndex: i } = this.state;
|
|
491
491
|
return /* @__PURE__ */ n.createElement(
|
|
492
|
-
|
|
492
|
+
we,
|
|
493
493
|
{
|
|
494
494
|
anchor: this.wrapper,
|
|
495
495
|
show: this.opened,
|
|
496
496
|
animate: t.animate,
|
|
497
497
|
popupClass: f("k-menu-popup", t.popupClass),
|
|
498
|
-
anchorAlign: t.anchorAlign ||
|
|
498
|
+
anchorAlign: t.anchorAlign || Ae(o),
|
|
499
499
|
popupAlign: t.popupAlign || Te(o),
|
|
500
500
|
style: o ? { direction: "rtl" } : void 0,
|
|
501
501
|
onClose: this.onPopupClose
|
|
@@ -510,7 +510,7 @@ class _e extends n.Component {
|
|
|
510
510
|
ref: this.listRef,
|
|
511
511
|
"aria-activedescendant": i >= 0 ? `${this.guid}-${i}` : void 0,
|
|
512
512
|
className: f("k-group k-menu-group k-reset", {
|
|
513
|
-
[`k-menu-group-${
|
|
513
|
+
[`k-menu-group-${B.sizeMap[this.props.size] || this.props.size}`]: this.props.size
|
|
514
514
|
})
|
|
515
515
|
},
|
|
516
516
|
this.renderChildItems()
|
|
@@ -520,7 +520,7 @@ class _e extends n.Component {
|
|
|
520
520
|
renderChildItems() {
|
|
521
521
|
const { item: o, itemRender: t, textField: i } = this.props;
|
|
522
522
|
return this.buttonsData.length > 0 ? this.buttonsData.map((a, l) => /* @__PURE__ */ n.createElement(
|
|
523
|
-
|
|
523
|
+
Ee,
|
|
524
524
|
{
|
|
525
525
|
className: "k-menu-item",
|
|
526
526
|
dataItem: a,
|
|
@@ -543,7 +543,7 @@ class _e extends n.Component {
|
|
|
543
543
|
return this.props.dir !== void 0 ? this.props.dir === "rtl" : !!this.wrapper && getComputedStyle(this.wrapper).direction === "rtl";
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
|
-
|
|
546
|
+
Le.propTypes = {
|
|
547
547
|
accessKey: s.string,
|
|
548
548
|
ariaLabel: s.string,
|
|
549
549
|
title: s.string,
|
|
@@ -559,7 +559,7 @@ _e.propTypes = {
|
|
|
559
559
|
tabIndex: s.number,
|
|
560
560
|
disabled: s.bool,
|
|
561
561
|
icon: s.string,
|
|
562
|
-
svgIcon:
|
|
562
|
+
svgIcon: M,
|
|
563
563
|
iconClass: s.string,
|
|
564
564
|
imageUrl: s.string,
|
|
565
565
|
popupSettings: s.object,
|
|
@@ -569,13 +569,13 @@ _e.propTypes = {
|
|
|
569
569
|
buttonClass: s.string,
|
|
570
570
|
dir: s.string
|
|
571
571
|
};
|
|
572
|
-
|
|
572
|
+
Le.defaultProps = {
|
|
573
573
|
size: "medium",
|
|
574
574
|
rounded: "medium",
|
|
575
575
|
fillMode: "solid",
|
|
576
576
|
themeColor: "base"
|
|
577
577
|
};
|
|
578
|
-
class
|
|
578
|
+
class _e extends n.Component {
|
|
579
579
|
/**
|
|
580
580
|
* @hidden
|
|
581
581
|
*/
|
|
@@ -583,7 +583,7 @@ class Le extends n.Component {
|
|
|
583
583
|
return null;
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
|
|
586
|
+
_e.propTypes = {
|
|
587
587
|
text: s.string,
|
|
588
588
|
icon: s.string,
|
|
589
589
|
iconClass: s.string,
|
|
@@ -615,15 +615,15 @@ class He extends n.Component {
|
|
|
615
615
|
return;
|
|
616
616
|
}
|
|
617
617
|
if (this.opened) {
|
|
618
|
-
const l =
|
|
618
|
+
const l = $e(
|
|
619
619
|
i,
|
|
620
620
|
t.keyCode,
|
|
621
621
|
t.altKey,
|
|
622
622
|
this.buttonsData.length
|
|
623
623
|
);
|
|
624
624
|
a.focusedIndex = l;
|
|
625
|
-
const
|
|
626
|
-
!t.altKey && (
|
|
625
|
+
const u = t.keyCode === r.up || t.keyCode === r.down || t.keyCode === r.left || t.keyCode === r.right;
|
|
626
|
+
!t.altKey && (u || t.keyCode === r.home || t.keyCode === r.end) && t.preventDefault();
|
|
627
627
|
}
|
|
628
628
|
this.setState(a);
|
|
629
629
|
}, this.switchFocus = (t) => {
|
|
@@ -660,7 +660,7 @@ class He extends n.Component {
|
|
|
660
660
|
}), this.setOpen(i), i && this.dispatchPopupEvent(t, i);
|
|
661
661
|
}, this.dispatchPopupEvent = (t, i) => {
|
|
662
662
|
x(i ? this.props.onOpen : this.props.onClose, t, this, void 0), this.openedDuringOnChange = void 0;
|
|
663
|
-
},
|
|
663
|
+
}, R(O);
|
|
664
664
|
}
|
|
665
665
|
get opened() {
|
|
666
666
|
return this.openedDuringOnChange !== void 0 ? this.openedDuringOnChange : this.props.opened === void 0 ? this.state.opened : this.props.opened;
|
|
@@ -669,8 +669,8 @@ class He extends n.Component {
|
|
|
669
669
|
* @hidden
|
|
670
670
|
*/
|
|
671
671
|
render() {
|
|
672
|
-
const o = this.isRtl(), t = o ? "rtl" : void 0, { id: i, style: a, tabIndex: l, disabled:
|
|
673
|
-
return this.buttonsData = this.props.items || n.Children.toArray(this.props.children).filter((c) => c && c.type ===
|
|
672
|
+
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 === _e).map((c) => c.props), /* @__PURE__ */ n.createElement(
|
|
674
674
|
"div",
|
|
675
675
|
{
|
|
676
676
|
id: i,
|
|
@@ -697,7 +697,7 @@ class He extends n.Component {
|
|
|
697
697
|
themeColor: this.props.themeColor,
|
|
698
698
|
onClick: this.onClickMainButton,
|
|
699
699
|
onMouseDown: this.mouseDown,
|
|
700
|
-
disabled:
|
|
700
|
+
disabled: u || void 0,
|
|
701
701
|
tabIndex: l,
|
|
702
702
|
accessKey: this.props.accessKey,
|
|
703
703
|
icon: this.props.icon,
|
|
@@ -746,13 +746,13 @@ class He extends n.Component {
|
|
|
746
746
|
renderPopup(o) {
|
|
747
747
|
const { popupSettings: t = {} } = this.props, { focusedIndex: i } = this.state;
|
|
748
748
|
return /* @__PURE__ */ n.createElement(
|
|
749
|
-
|
|
749
|
+
we,
|
|
750
750
|
{
|
|
751
751
|
anchor: this.wrapper,
|
|
752
752
|
show: this.opened,
|
|
753
753
|
animate: t.animate,
|
|
754
754
|
popupClass: f("k-menu-popup", t.popupClass),
|
|
755
|
-
anchorAlign: t.anchorAlign ||
|
|
755
|
+
anchorAlign: t.anchorAlign || Ae(o),
|
|
756
756
|
popupAlign: t.popupAlign || Te(o),
|
|
757
757
|
style: o ? { direction: "rtl" } : void 0,
|
|
758
758
|
onClose: this.onPopupClose
|
|
@@ -767,7 +767,7 @@ class He extends n.Component {
|
|
|
767
767
|
"aria-activedescendant": i >= 0 ? `${this.guid}-${i}` : void 0,
|
|
768
768
|
ref: this.listRef,
|
|
769
769
|
className: f("k-group k-menu-group k-reset", {
|
|
770
|
-
[`k-menu-group-${
|
|
770
|
+
[`k-menu-group-${B.sizeMap[this.props.size] || this.props.size}`]: this.props.size
|
|
771
771
|
})
|
|
772
772
|
},
|
|
773
773
|
this.renderChildItems()
|
|
@@ -777,7 +777,7 @@ class He extends n.Component {
|
|
|
777
777
|
renderChildItems() {
|
|
778
778
|
const { item: o, itemRender: t, textField: i } = this.props;
|
|
779
779
|
return this.buttonsData.length > 0 ? this.buttonsData.map((a, l) => /* @__PURE__ */ n.createElement(
|
|
780
|
-
|
|
780
|
+
Ee,
|
|
781
781
|
{
|
|
782
782
|
className: "k-menu-item",
|
|
783
783
|
dataItem: a,
|
|
@@ -814,7 +814,7 @@ He.propTypes = {
|
|
|
814
814
|
tabIndex: s.number,
|
|
815
815
|
disabled: s.bool,
|
|
816
816
|
icon: s.string,
|
|
817
|
-
svgIcon:
|
|
817
|
+
svgIcon: M,
|
|
818
818
|
iconClass: s.string,
|
|
819
819
|
imageUrl: s.string,
|
|
820
820
|
popupSettings: s.object,
|
|
@@ -830,10 +830,10 @@ He.defaultProps = {
|
|
|
830
830
|
fillMode: "solid",
|
|
831
831
|
themeColor: "base"
|
|
832
832
|
};
|
|
833
|
-
const
|
|
833
|
+
const Ie = class extends n.Component {
|
|
834
834
|
constructor(e) {
|
|
835
835
|
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 =
|
|
836
|
+
const { tabIndex: t = Ie.defaultProps.tabIndex } = this.props;
|
|
837
837
|
this.buttons.forEach((i, a) => {
|
|
838
838
|
i.tabIndex = a === o ? t : -1;
|
|
839
839
|
});
|
|
@@ -853,10 +853,10 @@ const xe = class extends n.Component {
|
|
|
853
853
|
const l = { offsetWidth: this.offsetWidth, offsetHeight: this.offsetHeight };
|
|
854
854
|
this.props.onResize && this.props.onResize.call(void 0, { target: this, ...l, nativeEvent: o });
|
|
855
855
|
}
|
|
856
|
-
},
|
|
856
|
+
}, R(O);
|
|
857
857
|
}
|
|
858
858
|
get selectors() {
|
|
859
|
-
return this.props.buttons ||
|
|
859
|
+
return this.props.buttons || pt;
|
|
860
860
|
}
|
|
861
861
|
get focusedIndex() {
|
|
862
862
|
const e = this.element && this.element.querySelector(this.focusedSelector);
|
|
@@ -901,7 +901,7 @@ const xe = class extends n.Component {
|
|
|
901
901
|
className: f(
|
|
902
902
|
"k-toolbar",
|
|
903
903
|
{
|
|
904
|
-
[`k-toolbar-${
|
|
904
|
+
[`k-toolbar-${B.sizeMap[this.props.size] || this.props.size}`]: this.props.size
|
|
905
905
|
},
|
|
906
906
|
this.props.className
|
|
907
907
|
),
|
|
@@ -915,7 +915,7 @@ const xe = class extends n.Component {
|
|
|
915
915
|
);
|
|
916
916
|
}
|
|
917
917
|
focusButton(e, o) {
|
|
918
|
-
const { tabIndex: t =
|
|
918
|
+
const { tabIndex: t = Ie.defaultProps.tabIndex } = this.props, i = this.buttons[o];
|
|
919
919
|
if (i) {
|
|
920
920
|
i.tabIndex = t, i.focus();
|
|
921
921
|
const a = this.buttons[e];
|
|
@@ -923,7 +923,7 @@ const xe = class extends n.Component {
|
|
|
923
923
|
}
|
|
924
924
|
}
|
|
925
925
|
};
|
|
926
|
-
let Ue =
|
|
926
|
+
let Ue = Ie;
|
|
927
927
|
Ue.propTypes = {
|
|
928
928
|
tabIndex: s.number,
|
|
929
929
|
dir: s.string,
|
|
@@ -939,7 +939,7 @@ Ue.defaultProps = {
|
|
|
939
939
|
tabIndex: 0,
|
|
940
940
|
size: "medium"
|
|
941
941
|
};
|
|
942
|
-
class
|
|
942
|
+
class bt extends n.PureComponent {
|
|
943
943
|
constructor() {
|
|
944
944
|
super(...arguments), this._element = null;
|
|
945
945
|
}
|
|
@@ -965,10 +965,10 @@ class gt extends n.PureComponent {
|
|
|
965
965
|
);
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
|
-
|
|
968
|
+
bt.propTypes = {
|
|
969
969
|
className: s.string
|
|
970
970
|
};
|
|
971
|
-
class
|
|
971
|
+
class At extends n.PureComponent {
|
|
972
972
|
/**
|
|
973
973
|
* @hidden
|
|
974
974
|
*/
|
|
@@ -998,12 +998,12 @@ We.displayName = "KendoReactToolbarSpacer";
|
|
|
998
998
|
We.propTypes = {
|
|
999
999
|
className: s.string
|
|
1000
1000
|
};
|
|
1001
|
-
const je =
|
|
1002
|
-
}]), Ve =
|
|
1003
|
-
}]), Ze =
|
|
1001
|
+
const je = xe.createContext([null, (e) => {
|
|
1002
|
+
}]), Ve = xe.createContext([null, (e) => {
|
|
1003
|
+
}]), Ze = xe.createContext([null, (e) => {
|
|
1004
1004
|
}]);
|
|
1005
1005
|
var te = /* @__PURE__ */ ((e) => (e.next = "next", e.prev = "prev", e.current = "current", e.reset = "reset", e))(te || {});
|
|
1006
|
-
const
|
|
1006
|
+
const gt = (e, o) => {
|
|
1007
1007
|
const t = o.items.findIndex((i) => i === e);
|
|
1008
1008
|
switch (o.type) {
|
|
1009
1009
|
case "next":
|
|
@@ -1019,7 +1019,7 @@ const kt = (e, o) => {
|
|
|
1019
1019
|
}
|
|
1020
1020
|
};
|
|
1021
1021
|
var qe = /* @__PURE__ */ ((e) => (e.remove = "remove", e.add = "add", e.reorder = "reorder", e))(qe || {});
|
|
1022
|
-
const
|
|
1022
|
+
const kt = (e, o) => {
|
|
1023
1023
|
switch (o.type) {
|
|
1024
1024
|
case "add":
|
|
1025
1025
|
break;
|
|
@@ -1032,7 +1032,7 @@ const yt = (e, o) => {
|
|
|
1032
1032
|
}
|
|
1033
1033
|
};
|
|
1034
1034
|
var pe = /* @__PURE__ */ ((e) => (e.toggle = "toggle", e.remove = "remove", e))(pe || {});
|
|
1035
|
-
const
|
|
1035
|
+
const yt = (e, o) => {
|
|
1036
1036
|
switch (o.selection) {
|
|
1037
1037
|
case "single":
|
|
1038
1038
|
switch (o.type) {
|
|
@@ -1065,34 +1065,34 @@ const vt = (e, o) => {
|
|
|
1065
1065
|
default:
|
|
1066
1066
|
return e;
|
|
1067
1067
|
}
|
|
1068
|
-
},
|
|
1069
|
-
|
|
1068
|
+
}, j = n.forwardRef((e, o) => {
|
|
1069
|
+
R(O);
|
|
1070
1070
|
const t = n.useRef(null), i = n.useRef(null), a = De(i, e.dir);
|
|
1071
1071
|
n.useImperativeHandle(t, () => ({
|
|
1072
1072
|
element: i.current,
|
|
1073
1073
|
props: e
|
|
1074
1074
|
})), n.useImperativeHandle(o, () => t.current);
|
|
1075
|
-
const [l,
|
|
1075
|
+
const [l, u] = n.useContext(je), [c, g] = n.useContext(Ve), [, v] = n.useContext(Ze), h = n.useMemo(
|
|
1076
1076
|
() => e.selected || (Array.isArray(l) ? l.some((p) => p === e.value) : l === e.value),
|
|
1077
1077
|
[e.selected, e.value, l]
|
|
1078
|
-
),
|
|
1078
|
+
), D = n.useMemo(
|
|
1079
1079
|
() => c === e.value,
|
|
1080
1080
|
[e.value, c]
|
|
1081
1081
|
);
|
|
1082
1082
|
n.useEffect(
|
|
1083
1083
|
() => {
|
|
1084
|
-
|
|
1084
|
+
D && i.current && i.current.focus();
|
|
1085
1085
|
},
|
|
1086
|
-
[
|
|
1086
|
+
[D]
|
|
1087
1087
|
);
|
|
1088
1088
|
const N = n.useCallback(
|
|
1089
1089
|
(p) => {
|
|
1090
|
-
|
|
1090
|
+
u({ type: pe.toggle, payload: e.value, event: p });
|
|
1091
1091
|
},
|
|
1092
|
-
[
|
|
1093
|
-
),
|
|
1092
|
+
[u, e.value]
|
|
1093
|
+
), w = n.useCallback(
|
|
1094
1094
|
(p) => {
|
|
1095
|
-
e.removable && (
|
|
1095
|
+
e.removable && (v({ type: qe.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
1096
|
void 0,
|
|
1097
1097
|
{
|
|
1098
1098
|
target: t.current,
|
|
@@ -1100,21 +1100,21 @@ const vt = (e, o) => {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
));
|
|
1102
1102
|
},
|
|
1103
|
-
[e.onRemove, e.value, e.removable,
|
|
1103
|
+
[e.onRemove, e.value, e.removable, v, g, u]
|
|
1104
1104
|
), S = n.useCallback(
|
|
1105
1105
|
(p) => {
|
|
1106
1106
|
switch (p.keyCode) {
|
|
1107
1107
|
case r.left:
|
|
1108
|
-
|
|
1108
|
+
g({ type: te.prev, payload: e.value, event: p });
|
|
1109
1109
|
break;
|
|
1110
1110
|
case r.right:
|
|
1111
|
-
|
|
1111
|
+
g({ type: te.next, payload: e.value, event: p });
|
|
1112
1112
|
break;
|
|
1113
1113
|
case r.enter:
|
|
1114
|
-
|
|
1114
|
+
u({ type: pe.toggle, payload: e.value, event: p });
|
|
1115
1115
|
break;
|
|
1116
1116
|
case r.delete:
|
|
1117
|
-
|
|
1117
|
+
w(p);
|
|
1118
1118
|
break;
|
|
1119
1119
|
}
|
|
1120
1120
|
e.onKeyDown && e.onKeyDown.call(
|
|
@@ -1125,10 +1125,10 @@ const vt = (e, o) => {
|
|
|
1125
1125
|
}
|
|
1126
1126
|
);
|
|
1127
1127
|
},
|
|
1128
|
-
[e.onKeyDown, e.value,
|
|
1129
|
-
),
|
|
1128
|
+
[e.onKeyDown, e.value, g, u, w]
|
|
1129
|
+
), F = n.useCallback(
|
|
1130
1130
|
(p) => {
|
|
1131
|
-
|
|
1131
|
+
g({ payload: e.value, type: te.current, event: p }), e.onFocus && e.onFocus.call(
|
|
1132
1132
|
void 0,
|
|
1133
1133
|
{
|
|
1134
1134
|
target: t.current,
|
|
@@ -1136,8 +1136,8 @@ const vt = (e, o) => {
|
|
|
1136
1136
|
}
|
|
1137
1137
|
);
|
|
1138
1138
|
},
|
|
1139
|
-
[e.onFocus, e.value,
|
|
1140
|
-
),
|
|
1139
|
+
[e.onFocus, e.value, g]
|
|
1140
|
+
), I = n.useCallback(
|
|
1141
1141
|
(p) => {
|
|
1142
1142
|
e.onBlur && e.onBlur.call(
|
|
1143
1143
|
void 0,
|
|
@@ -1148,12 +1148,12 @@ const vt = (e, o) => {
|
|
|
1148
1148
|
);
|
|
1149
1149
|
},
|
|
1150
1150
|
[e.onBlur]
|
|
1151
|
-
),
|
|
1151
|
+
), E = Oe(e, t, { onClick: N });
|
|
1152
1152
|
return /* @__PURE__ */ n.createElement(
|
|
1153
1153
|
"div",
|
|
1154
1154
|
{
|
|
1155
|
-
...
|
|
1156
|
-
role: e.role,
|
|
1155
|
+
...E,
|
|
1156
|
+
role: e.role || "button",
|
|
1157
1157
|
id: e.value,
|
|
1158
1158
|
style: e.style,
|
|
1159
1159
|
ref: i,
|
|
@@ -1164,36 +1164,37 @@ const vt = (e, o) => {
|
|
|
1164
1164
|
{
|
|
1165
1165
|
"k-rtl": a === "rtl",
|
|
1166
1166
|
"k-disabled": e.disabled,
|
|
1167
|
-
"k-selected":
|
|
1168
|
-
"k-focus":
|
|
1169
|
-
[`k-chip-${
|
|
1170
|
-
[`k-rounded-${
|
|
1167
|
+
"k-selected": h,
|
|
1168
|
+
"k-focus": D,
|
|
1169
|
+
[`k-chip-${B.sizeMap[e.size] || e.size}`]: e.size,
|
|
1170
|
+
[`k-rounded-${B.roundedMap[e.rounded] || e.rounded}`]: e.rounded,
|
|
1171
1171
|
[`k-chip-${e.fillMode}`]: e.fillMode,
|
|
1172
1172
|
[`k-chip-${e.fillMode}-${e.themeColor}`]: !!(e.fillMode && e.themeColor)
|
|
1173
1173
|
},
|
|
1174
1174
|
e.className
|
|
1175
1175
|
),
|
|
1176
|
-
"aria-
|
|
1176
|
+
"aria-pressed": e.role ? void 0 : h,
|
|
1177
1177
|
"aria-disabled": e.disabled,
|
|
1178
1178
|
"aria-describedby": e.ariaDescribedBy,
|
|
1179
|
-
|
|
1180
|
-
|
|
1179
|
+
"aria-keyshortcuts": e.removable ? "Enter Delete" : void 0,
|
|
1180
|
+
onFocus: F,
|
|
1181
|
+
onBlur: I,
|
|
1181
1182
|
onKeyDown: S
|
|
1182
1183
|
},
|
|
1183
|
-
|
|
1184
|
-
|
|
1184
|
+
h && (e.selectedIcon || e.selectedSvgIcon) && /* @__PURE__ */ n.createElement(
|
|
1185
|
+
A,
|
|
1185
1186
|
{
|
|
1186
1187
|
className: "k-chip-icon",
|
|
1187
|
-
name: e.selectedIcon ?
|
|
1188
|
+
name: e.selectedIcon ? Ce(e.selectedIcon) : void 0,
|
|
1188
1189
|
icon: e.selectedSvgIcon,
|
|
1189
1190
|
size: "small"
|
|
1190
1191
|
}
|
|
1191
1192
|
),
|
|
1192
1193
|
(e.icon || e.svgIcon) && /* @__PURE__ */ n.createElement(
|
|
1193
|
-
|
|
1194
|
+
A,
|
|
1194
1195
|
{
|
|
1195
1196
|
className: "k-chip-icon",
|
|
1196
|
-
name: e.icon ?
|
|
1197
|
+
name: e.icon ? Ce(e.icon) : void 0,
|
|
1197
1198
|
icon: e.svgIcon,
|
|
1198
1199
|
size: "small"
|
|
1199
1200
|
}
|
|
@@ -1220,28 +1221,28 @@ const vt = (e, o) => {
|
|
|
1220
1221
|
},
|
|
1221
1222
|
e.text
|
|
1222
1223
|
)),
|
|
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:
|
|
1224
|
-
|
|
1224
|
+
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
|
+
A,
|
|
1225
1226
|
{
|
|
1226
|
-
name: e.removeIcon ?
|
|
1227
|
-
icon: e.removeSvgIcon ||
|
|
1227
|
+
name: e.removeIcon ? Ce(e.removeIcon) : void 0,
|
|
1228
|
+
icon: e.removeSvgIcon || dt,
|
|
1228
1229
|
size: "small"
|
|
1229
1230
|
}
|
|
1230
1231
|
)))
|
|
1231
1232
|
);
|
|
1232
|
-
}),
|
|
1233
|
+
}), vt = {
|
|
1233
1234
|
id: s.string,
|
|
1234
1235
|
text: s.string,
|
|
1235
1236
|
value: s.any,
|
|
1236
1237
|
dir: s.oneOf(["ltr", "rtl"]),
|
|
1237
1238
|
removable: s.bool,
|
|
1238
1239
|
removeIcon: s.string,
|
|
1239
|
-
removeIconSvg:
|
|
1240
|
+
removeIconSvg: M,
|
|
1240
1241
|
disabled: s.bool,
|
|
1241
1242
|
icon: s.string,
|
|
1242
|
-
svgIcon:
|
|
1243
|
+
svgIcon: M,
|
|
1243
1244
|
selectedIcon: s.string,
|
|
1244
|
-
selectedIconSvg:
|
|
1245
|
+
selectedIconSvg: M,
|
|
1245
1246
|
onRemove: s.func,
|
|
1246
1247
|
dataItem: s.any,
|
|
1247
1248
|
selected: s.bool,
|
|
@@ -1251,7 +1252,7 @@ const vt = (e, o) => {
|
|
|
1251
1252
|
fillMode: s.oneOf([null, "outline", "solid"]),
|
|
1252
1253
|
// eslint-disable-next-line max-len
|
|
1253
1254
|
themeColor: s.oneOf([null, "base", "info", "success", "warning", "error"])
|
|
1254
|
-
},
|
|
1255
|
+
}, Ct = {
|
|
1255
1256
|
disabled: !1,
|
|
1256
1257
|
removable: !1,
|
|
1257
1258
|
removeIcon: "k-i-x-circle",
|
|
@@ -1261,142 +1262,146 @@ const vt = (e, o) => {
|
|
|
1261
1262
|
fillMode: "solid",
|
|
1262
1263
|
themeColor: "base"
|
|
1263
1264
|
};
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
const
|
|
1265
|
+
j.displayName = "KendoReactChip";
|
|
1266
|
+
j.propTypes = vt;
|
|
1267
|
+
j.defaultProps = Ct;
|
|
1268
|
+
const It = (e, o, t) => {
|
|
1268
1269
|
const [i, a] = n.useState(e);
|
|
1269
|
-
return [i, (
|
|
1270
|
-
const c =
|
|
1271
|
-
t && t(c,
|
|
1270
|
+
return [i, (u) => {
|
|
1271
|
+
const c = yt(o.state || i, { ...u, ...o });
|
|
1272
|
+
t && t(c, u.event), a(c);
|
|
1272
1273
|
}];
|
|
1273
|
-
},
|
|
1274
|
+
}, xt = (e) => {
|
|
1274
1275
|
const [o, t] = n.useState(null);
|
|
1275
1276
|
return [o, (a) => {
|
|
1276
|
-
const l =
|
|
1277
|
+
const l = gt(a.payload, { ...a, ...e });
|
|
1277
1278
|
t(l);
|
|
1278
1279
|
}];
|
|
1279
1280
|
}, Dt = (e, o, t) => {
|
|
1280
1281
|
const [i, a] = n.useState(e);
|
|
1281
|
-
return [i, (
|
|
1282
|
-
const c =
|
|
1283
|
-
t && t(c,
|
|
1282
|
+
return [i, (u) => {
|
|
1283
|
+
const c = kt(o.state || i, { ...u, ...o });
|
|
1284
|
+
t && t(c, u.event), a(c);
|
|
1284
1285
|
}];
|
|
1285
|
-
},
|
|
1286
|
-
|
|
1286
|
+
}, Ne = n.forwardRef((e, o) => {
|
|
1287
|
+
R(O);
|
|
1287
1288
|
const t = n.useRef(null), i = n.useRef(null), a = De(i, e.dir), {
|
|
1288
1289
|
chip: l,
|
|
1289
|
-
id:
|
|
1290
|
+
id: u,
|
|
1290
1291
|
style: c,
|
|
1291
|
-
tabIndex:
|
|
1292
|
-
disabled:
|
|
1293
|
-
size:
|
|
1294
|
-
className:
|
|
1292
|
+
tabIndex: g,
|
|
1293
|
+
disabled: v,
|
|
1294
|
+
size: h,
|
|
1295
|
+
className: D,
|
|
1295
1296
|
ariaDescribedBy: N,
|
|
1296
|
-
ariaLabelledBy:
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1297
|
+
ariaLabelledBy: w,
|
|
1298
|
+
ariaLabel: S,
|
|
1299
|
+
selection: F = W.selection,
|
|
1300
|
+
value: I = W.defaultValue,
|
|
1301
|
+
defaultData: E = W.defaultData,
|
|
1302
|
+
valueField: p = W.valueField,
|
|
1303
|
+
textField: T = W.textField,
|
|
1304
|
+
onChange: K,
|
|
1305
|
+
onDataChange: P
|
|
1306
|
+
} = e, L = n.useMemo(
|
|
1307
|
+
() => l || j,
|
|
1308
|
+
[l, j]
|
|
1307
1309
|
);
|
|
1308
1310
|
n.useImperativeHandle(t, () => ({
|
|
1309
1311
|
element: i.current,
|
|
1310
1312
|
props: e
|
|
1311
1313
|
})), n.useImperativeHandle(o, () => t.current);
|
|
1312
|
-
const
|
|
1313
|
-
(
|
|
1314
|
-
|
|
1315
|
-
value:
|
|
1314
|
+
const $ = n.useCallback(
|
|
1315
|
+
(m, k) => {
|
|
1316
|
+
K && t.current && K.call(void 0, {
|
|
1317
|
+
value: m,
|
|
1316
1318
|
target: t.current,
|
|
1317
|
-
syntheticEvent:
|
|
1319
|
+
syntheticEvent: k
|
|
1318
1320
|
});
|
|
1319
1321
|
},
|
|
1320
|
-
[
|
|
1321
|
-
), [
|
|
1322
|
-
|
|
1322
|
+
[K]
|
|
1323
|
+
), [V, Z] = It(
|
|
1324
|
+
I,
|
|
1323
1325
|
{
|
|
1324
|
-
selection:
|
|
1325
|
-
state:
|
|
1326
|
+
selection: F,
|
|
1327
|
+
state: I
|
|
1326
1328
|
},
|
|
1327
|
-
|
|
1328
|
-
),
|
|
1329
|
-
(
|
|
1330
|
-
|
|
1331
|
-
value:
|
|
1329
|
+
$
|
|
1330
|
+
), oe = n.useCallback(
|
|
1331
|
+
(m, k) => {
|
|
1332
|
+
P && t.current && P.call(void 0, {
|
|
1333
|
+
value: m,
|
|
1332
1334
|
target: t.current,
|
|
1333
|
-
syntheticEvent:
|
|
1335
|
+
syntheticEvent: k
|
|
1334
1336
|
});
|
|
1335
1337
|
},
|
|
1336
|
-
[
|
|
1338
|
+
[P]
|
|
1337
1339
|
), [q, ie] = Dt(
|
|
1338
|
-
e.data ||
|
|
1340
|
+
e.data || E,
|
|
1339
1341
|
{
|
|
1340
1342
|
state: e.data,
|
|
1341
|
-
valueField:
|
|
1343
|
+
valueField: p
|
|
1342
1344
|
},
|
|
1343
|
-
|
|
1345
|
+
oe
|
|
1344
1346
|
), G = n.useCallback(
|
|
1345
|
-
(
|
|
1346
|
-
[
|
|
1347
|
+
(m, k) => (m.push(k[p]), m),
|
|
1348
|
+
[p]
|
|
1347
1349
|
), _ = n.useMemo(
|
|
1348
1350
|
() => e.data || q,
|
|
1349
1351
|
[e.data, q]
|
|
1350
|
-
), be = n.useMemo(
|
|
1351
|
-
() => E || R,
|
|
1352
|
-
[E, R]
|
|
1353
1352
|
), ae = n.useMemo(
|
|
1353
|
+
() => I || V,
|
|
1354
|
+
[I, V]
|
|
1355
|
+
), le = n.useMemo(
|
|
1354
1356
|
() => _.reduce(G, []),
|
|
1355
1357
|
[_, G]
|
|
1356
1358
|
), X = n.useCallback(
|
|
1357
|
-
(
|
|
1358
|
-
[k]
|
|
1359
|
-
), le = n.useCallback(
|
|
1360
|
-
(g) => Be(p)(g),
|
|
1359
|
+
(m) => Be(p)(m),
|
|
1361
1360
|
[p]
|
|
1362
|
-
),
|
|
1363
|
-
|
|
1361
|
+
), y = n.useCallback(
|
|
1362
|
+
(m) => Be(T)(m),
|
|
1363
|
+
[T]
|
|
1364
|
+
), [be, ge] = xt({ items: le }), re = Oe(e, t);
|
|
1365
|
+
return /* @__PURE__ */ n.createElement(je.Provider, { value: [ae, Z] }, /* @__PURE__ */ n.createElement(Ve.Provider, { value: [be, ge] }, /* @__PURE__ */ n.createElement(Ze.Provider, { value: [_, ie] }, /* @__PURE__ */ n.createElement(
|
|
1364
1366
|
"div",
|
|
1365
1367
|
{
|
|
1366
1368
|
ref: i,
|
|
1367
|
-
...
|
|
1368
|
-
role: "listbox",
|
|
1369
|
-
id:
|
|
1369
|
+
...re,
|
|
1370
|
+
role: v ? void 0 : "listbox",
|
|
1371
|
+
id: u,
|
|
1370
1372
|
dir: a,
|
|
1371
1373
|
style: c,
|
|
1372
|
-
tabIndex: fe(
|
|
1374
|
+
tabIndex: fe(g, v, void 0),
|
|
1373
1375
|
className: f(
|
|
1374
1376
|
"k-chip-list",
|
|
1375
1377
|
{
|
|
1376
1378
|
"k-rtl": a === "rtl",
|
|
1377
|
-
"k-disabled":
|
|
1378
|
-
[`k-chip-list-${
|
|
1379
|
+
"k-disabled": v,
|
|
1380
|
+
[`k-chip-list-${B.sizeMap[h] || h}`]: h
|
|
1379
1381
|
},
|
|
1380
|
-
|
|
1382
|
+
D
|
|
1381
1383
|
),
|
|
1382
|
-
"aria-
|
|
1383
|
-
"aria-
|
|
1384
|
+
"aria-label": S,
|
|
1385
|
+
"aria-labelledby": w,
|
|
1386
|
+
"aria-describedby": N,
|
|
1387
|
+
"aria-orientation": "horizontal",
|
|
1388
|
+
"aria-multiselectable": F === "multiple"
|
|
1384
1389
|
},
|
|
1385
|
-
_.map((
|
|
1386
|
-
|
|
1390
|
+
_.map((m, k) => /* @__PURE__ */ n.createElement(
|
|
1391
|
+
L,
|
|
1387
1392
|
{
|
|
1388
1393
|
role: "option",
|
|
1389
|
-
dataItem:
|
|
1390
|
-
size:
|
|
1391
|
-
key: [X(
|
|
1392
|
-
text:
|
|
1393
|
-
value: X(
|
|
1394
|
-
ariaLabel:
|
|
1395
|
-
svgIcon:
|
|
1394
|
+
dataItem: m,
|
|
1395
|
+
size: h,
|
|
1396
|
+
key: [X(m), k].join("-"),
|
|
1397
|
+
text: y(m),
|
|
1398
|
+
value: X(m),
|
|
1399
|
+
ariaLabel: m.ariaLabel,
|
|
1400
|
+
svgIcon: m.svgIcon || void 0
|
|
1396
1401
|
}
|
|
1397
1402
|
))
|
|
1398
1403
|
))));
|
|
1399
|
-
}),
|
|
1404
|
+
}), wt = {
|
|
1400
1405
|
id: s.string,
|
|
1401
1406
|
className: s.string,
|
|
1402
1407
|
tabIndex: s.number,
|
|
@@ -1414,8 +1419,8 @@ const xt = (e, o, t) => {
|
|
|
1414
1419
|
ariaLabelledBy: s.string,
|
|
1415
1420
|
ariaDescribedBy: s.string,
|
|
1416
1421
|
size: s.oneOf([null, "small", "medium", "large"])
|
|
1417
|
-
},
|
|
1418
|
-
chip:
|
|
1422
|
+
}, W = {
|
|
1423
|
+
chip: j,
|
|
1419
1424
|
size: "medium",
|
|
1420
1425
|
disabled: !1,
|
|
1421
1426
|
defaultValue: null,
|
|
@@ -1426,75 +1431,75 @@ const xt = (e, o, t) => {
|
|
|
1426
1431
|
valueField: "value",
|
|
1427
1432
|
removable: "removable"
|
|
1428
1433
|
};
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
const
|
|
1434
|
+
Ne.displayName = "KendoReactChipList";
|
|
1435
|
+
Ne.propTypes = wt;
|
|
1436
|
+
Ne.defaultProps = W;
|
|
1437
|
+
const Se = n.forwardRef((e, o) => {
|
|
1433
1438
|
const {
|
|
1434
1439
|
className: t,
|
|
1435
1440
|
disabled: i,
|
|
1436
1441
|
text: a,
|
|
1437
1442
|
icon: l,
|
|
1438
|
-
style:
|
|
1443
|
+
style: u,
|
|
1439
1444
|
id: c,
|
|
1440
|
-
focused:
|
|
1441
|
-
tabIndex:
|
|
1442
|
-
index:
|
|
1443
|
-
dataItem:
|
|
1445
|
+
focused: g,
|
|
1446
|
+
tabIndex: v,
|
|
1447
|
+
index: h,
|
|
1448
|
+
dataItem: D,
|
|
1444
1449
|
item: N,
|
|
1445
|
-
svgIcon:
|
|
1450
|
+
svgIcon: w,
|
|
1446
1451
|
onDown: S,
|
|
1447
|
-
onClick:
|
|
1448
|
-
...
|
|
1449
|
-
} = e,
|
|
1452
|
+
onClick: F,
|
|
1453
|
+
...I
|
|
1454
|
+
} = e, E = n.useRef(null), p = n.useCallback(
|
|
1450
1455
|
() => {
|
|
1451
|
-
|
|
1456
|
+
E.current && E.current.focus();
|
|
1452
1457
|
},
|
|
1453
1458
|
[]
|
|
1454
|
-
),
|
|
1459
|
+
), T = n.useCallback(
|
|
1455
1460
|
() => ({
|
|
1456
|
-
element:
|
|
1461
|
+
element: E.current,
|
|
1457
1462
|
focus: p
|
|
1458
1463
|
}),
|
|
1459
1464
|
[p]
|
|
1460
1465
|
);
|
|
1461
|
-
n.useImperativeHandle(o,
|
|
1462
|
-
const
|
|
1463
|
-
(
|
|
1464
|
-
|
|
1466
|
+
n.useImperativeHandle(o, T);
|
|
1467
|
+
const K = n.useCallback(
|
|
1468
|
+
($) => {
|
|
1469
|
+
F && h !== void 0 && !i && F($, h);
|
|
1465
1470
|
},
|
|
1466
|
-
[
|
|
1467
|
-
),
|
|
1471
|
+
[F, h]
|
|
1472
|
+
), P = n.useMemo(
|
|
1468
1473
|
() => f(
|
|
1469
1474
|
"k-fab-item",
|
|
1470
1475
|
{
|
|
1471
|
-
"k-focus":
|
|
1476
|
+
"k-focus": g,
|
|
1472
1477
|
"k-disabled": i
|
|
1473
1478
|
},
|
|
1474
1479
|
t
|
|
1475
1480
|
),
|
|
1476
|
-
[t, i,
|
|
1477
|
-
),
|
|
1481
|
+
[t, i, g]
|
|
1482
|
+
), L = N;
|
|
1478
1483
|
return /* @__PURE__ */ n.createElement(
|
|
1479
1484
|
"li",
|
|
1480
1485
|
{
|
|
1481
|
-
ref:
|
|
1486
|
+
ref: E,
|
|
1482
1487
|
id: c,
|
|
1483
|
-
className:
|
|
1484
|
-
style:
|
|
1488
|
+
className: P,
|
|
1489
|
+
style: u,
|
|
1485
1490
|
role: "menuitem",
|
|
1486
|
-
tabIndex: fe(
|
|
1491
|
+
tabIndex: fe(v, i),
|
|
1487
1492
|
"aria-disabled": i,
|
|
1488
1493
|
"aria-label": `${a || ""} floatingactionbutton item`,
|
|
1489
|
-
onClick:
|
|
1494
|
+
onClick: K,
|
|
1490
1495
|
onMouseDown: S,
|
|
1491
1496
|
onPointerDown: S,
|
|
1492
|
-
...
|
|
1497
|
+
...I
|
|
1493
1498
|
},
|
|
1494
|
-
|
|
1499
|
+
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)
|
|
1495
1500
|
);
|
|
1496
1501
|
});
|
|
1497
|
-
|
|
1502
|
+
Se.propTypes = {
|
|
1498
1503
|
className: s.string,
|
|
1499
1504
|
style: s.object,
|
|
1500
1505
|
children: s.any,
|
|
@@ -1502,210 +1507,214 @@ Fe.propTypes = {
|
|
|
1502
1507
|
focused: s.bool,
|
|
1503
1508
|
index: s.number,
|
|
1504
1509
|
icon: s.string,
|
|
1505
|
-
svgIcon:
|
|
1510
|
+
svgIcon: M,
|
|
1506
1511
|
text: s.string,
|
|
1507
1512
|
tabIndex: s.number,
|
|
1508
1513
|
customProp: s.any
|
|
1509
1514
|
};
|
|
1510
|
-
|
|
1511
|
-
const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e,
|
|
1515
|
+
Se.displayName = "KendoFloatingActionButtonItem";
|
|
1516
|
+
const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Et = (e, o) => {
|
|
1512
1517
|
const t = { horizontal: o ? "right" : "left", vertical: "bottom" };
|
|
1513
1518
|
return e.horizontal === "end" && (t.horizontal = o ? "left" : "right"), t;
|
|
1514
|
-
},
|
|
1519
|
+
}, Nt = (e, o) => {
|
|
1515
1520
|
const t = { horizontal: o ? "right" : "left", vertical: "top" };
|
|
1516
1521
|
return e.horizontal === "end" && (t.horizontal = o ? "left" : "right"), t;
|
|
1517
|
-
},
|
|
1522
|
+
}, St = (e, o) => {
|
|
1518
1523
|
const t = o === "end" ? "end" : "start";
|
|
1519
1524
|
return {
|
|
1520
1525
|
rtl: { end: "k-text-left", start: "k-text-right" },
|
|
1521
1526
|
ltr: { start: "k-text-left", end: "k-text-right" }
|
|
1522
1527
|
}[e][t];
|
|
1523
|
-
},
|
|
1528
|
+
}, Ft = (e, o, t, i) => {
|
|
1524
1529
|
const a = o.horizontal, l = o.vertical;
|
|
1525
1530
|
if (e.current) {
|
|
1526
|
-
const
|
|
1527
|
-
e.current.style.setProperty(
|
|
1531
|
+
const u = t && t.x !== void 0 ? he(t.x) : Re, c = t && t.x !== void 0 ? `calc(50% + ${he(t.x)})` : "50%", g = t && t.y !== void 0 ? he(t.y) : Re, v = t && t.y !== void 0 ? `calc(50% + ${he(t.y)})` : "50%";
|
|
1532
|
+
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"));
|
|
1528
1533
|
}
|
|
1529
|
-
},
|
|
1534
|
+
}, zt = (e, o) => {
|
|
1530
1535
|
const { horizontal: t } = e;
|
|
1531
1536
|
return {
|
|
1532
1537
|
end: o ? "left" : "right",
|
|
1533
1538
|
center: "left",
|
|
1534
1539
|
start: o ? "right" : "left"
|
|
1535
1540
|
}[t || "end"];
|
|
1536
|
-
},
|
|
1541
|
+
}, Pt = (e) => ({
|
|
1537
1542
|
top: "top",
|
|
1538
1543
|
middle: "top",
|
|
1539
1544
|
bottom: "bottom"
|
|
1540
|
-
})[e.vertical || "bottom"],
|
|
1541
|
-
|
|
1545
|
+
})[e.vertical || "bottom"], Bt = 2, Mt = 100, Ge = n.forwardRef((e, o) => {
|
|
1546
|
+
R(O);
|
|
1542
1547
|
const {
|
|
1543
1548
|
align: t = Y.align,
|
|
1544
1549
|
alignOffset: i,
|
|
1545
1550
|
className: a,
|
|
1546
1551
|
disabled: l,
|
|
1547
|
-
icon:
|
|
1552
|
+
icon: u,
|
|
1548
1553
|
svgIcon: c,
|
|
1549
|
-
iconClass:
|
|
1550
|
-
id:
|
|
1551
|
-
items:
|
|
1552
|
-
item:
|
|
1554
|
+
iconClass: g,
|
|
1555
|
+
id: v,
|
|
1556
|
+
items: h,
|
|
1557
|
+
item: D,
|
|
1553
1558
|
text: N,
|
|
1554
|
-
positionMode:
|
|
1559
|
+
positionMode: w = Y.positionMode,
|
|
1555
1560
|
size: S = Y.size,
|
|
1556
|
-
style:
|
|
1557
|
-
rounded:
|
|
1558
|
-
themeColor:
|
|
1561
|
+
style: F,
|
|
1562
|
+
rounded: I = Y.rounded,
|
|
1563
|
+
themeColor: E = Y.themeColor,
|
|
1559
1564
|
overlayStyle: p,
|
|
1560
|
-
tabIndex:
|
|
1561
|
-
accessKey:
|
|
1562
|
-
popupSettings:
|
|
1563
|
-
modal:
|
|
1564
|
-
onClick:
|
|
1565
|
-
onItemClick:
|
|
1565
|
+
tabIndex: T,
|
|
1566
|
+
accessKey: K,
|
|
1567
|
+
popupSettings: P = {},
|
|
1568
|
+
modal: L,
|
|
1569
|
+
onClick: $,
|
|
1570
|
+
onItemClick: V,
|
|
1566
1571
|
onFocus: Z,
|
|
1567
|
-
onBlur:
|
|
1568
|
-
onKeyDown:
|
|
1569
|
-
onOpen:
|
|
1570
|
-
onClose:
|
|
1571
|
-
...
|
|
1572
|
-
} = e, ae =
|
|
1572
|
+
onBlur: oe,
|
|
1573
|
+
onKeyDown: q,
|
|
1574
|
+
onOpen: ie,
|
|
1575
|
+
onClose: G,
|
|
1576
|
+
..._
|
|
1577
|
+
} = e, ae = lt(), le = ae ? ae + Bt : Mt, X = n.useRef(null), y = n.useRef(null), be = n.useRef(null), ge = n.useRef(null), re = n.useCallback(
|
|
1573
1578
|
() => {
|
|
1574
1579
|
y.current && y.current.focus();
|
|
1575
1580
|
},
|
|
1576
1581
|
[]
|
|
1577
|
-
),
|
|
1582
|
+
), m = n.useCallback(
|
|
1578
1583
|
() => ({
|
|
1579
1584
|
element: y.current,
|
|
1580
|
-
focus:
|
|
1585
|
+
focus: re
|
|
1581
1586
|
}),
|
|
1582
|
-
[
|
|
1587
|
+
[re]
|
|
1583
1588
|
);
|
|
1584
|
-
n.useImperativeHandle(
|
|
1585
|
-
const [
|
|
1589
|
+
n.useImperativeHandle(X, m), n.useImperativeHandle(o, () => X.current);
|
|
1590
|
+
const [k, z] = n.useState(!1), [ce, H] = n.useState(!1), [J, C] = n.useState(-1), Xe = n.useMemo(() => me(), []), ke = De(y, e.dir), Q = ke === "rtl", de = n.useMemo(() => me(), []);
|
|
1586
1591
|
n.useEffect(
|
|
1587
1592
|
() => {
|
|
1588
|
-
|
|
1593
|
+
Ft(y, t, i, Q);
|
|
1589
1594
|
},
|
|
1590
1595
|
[y, t, i, Q]
|
|
1591
1596
|
), n.useEffect(
|
|
1592
1597
|
() => {
|
|
1593
|
-
|
|
1598
|
+
ce && y && y.current && y.current.focus();
|
|
1594
1599
|
},
|
|
1595
|
-
[
|
|
1600
|
+
[ce, y]
|
|
1596
1601
|
);
|
|
1597
|
-
const
|
|
1598
|
-
(
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1602
|
+
const U = n.useCallback(
|
|
1603
|
+
(d, b) => {
|
|
1604
|
+
h && x(
|
|
1605
|
+
b ? ie : G,
|
|
1606
|
+
d,
|
|
1607
|
+
m(),
|
|
1603
1608
|
void 0
|
|
1604
1609
|
);
|
|
1605
1610
|
},
|
|
1606
|
-
[
|
|
1607
|
-
),
|
|
1608
|
-
(
|
|
1609
|
-
!
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1611
|
+
[ie, G, h]
|
|
1612
|
+
), Fe = n.useCallback(
|
|
1613
|
+
(d) => {
|
|
1614
|
+
!d.target || l || (!h && $ ? x(
|
|
1615
|
+
$,
|
|
1616
|
+
d,
|
|
1617
|
+
m(),
|
|
1613
1618
|
void 0
|
|
1614
|
-
) : (
|
|
1619
|
+
) : (z(!k), H(!0), C(k ? -1 : 0), U(d, !k)));
|
|
1615
1620
|
},
|
|
1616
1621
|
[
|
|
1617
|
-
B,
|
|
1618
|
-
U,
|
|
1619
|
-
v,
|
|
1620
|
-
R,
|
|
1621
|
-
W,
|
|
1622
1622
|
z,
|
|
1623
|
-
|
|
1623
|
+
H,
|
|
1624
|
+
C,
|
|
1625
|
+
$,
|
|
1626
|
+
U,
|
|
1627
|
+
k,
|
|
1628
|
+
h,
|
|
1624
1629
|
l
|
|
1625
1630
|
]
|
|
1626
|
-
),
|
|
1627
|
-
(
|
|
1628
|
-
|
|
1631
|
+
), Je = n.useCallback(
|
|
1632
|
+
(d) => {
|
|
1633
|
+
H(!0), C(k ? 0 : -1), Z && x(
|
|
1629
1634
|
Z,
|
|
1630
|
-
|
|
1631
|
-
|
|
1635
|
+
d,
|
|
1636
|
+
m(),
|
|
1632
1637
|
void 0
|
|
1633
1638
|
);
|
|
1634
1639
|
},
|
|
1635
|
-
[Z,
|
|
1636
|
-
),
|
|
1637
|
-
(
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1640
|
+
[Z, H, C]
|
|
1641
|
+
), Qe = n.useCallback(
|
|
1642
|
+
(d) => {
|
|
1643
|
+
H(!1), z(!1), C(-1), x(
|
|
1644
|
+
oe,
|
|
1645
|
+
d,
|
|
1646
|
+
m(),
|
|
1642
1647
|
void 0
|
|
1643
|
-
),
|
|
1648
|
+
), k && U(d, !1);
|
|
1644
1649
|
},
|
|
1645
|
-
[
|
|
1646
|
-
),
|
|
1647
|
-
(
|
|
1648
|
-
|
|
1650
|
+
[oe, H, z, C, U]
|
|
1651
|
+
), Ye = n.useCallback(
|
|
1652
|
+
(d) => {
|
|
1653
|
+
d.preventDefault();
|
|
1649
1654
|
},
|
|
1650
1655
|
[]
|
|
1651
|
-
),
|
|
1652
|
-
(
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1656
|
+
), ye = n.useCallback(
|
|
1657
|
+
(d, b) => {
|
|
1658
|
+
h && (h[b].disabled || x(
|
|
1659
|
+
V,
|
|
1660
|
+
d,
|
|
1661
|
+
m(),
|
|
1657
1662
|
{
|
|
1658
|
-
itemProps:
|
|
1659
|
-
itemIndex:
|
|
1663
|
+
itemProps: h[b],
|
|
1664
|
+
itemIndex: b
|
|
1660
1665
|
}
|
|
1661
1666
|
));
|
|
1662
1667
|
},
|
|
1663
|
-
[
|
|
1664
|
-
),
|
|
1665
|
-
(
|
|
1666
|
-
!
|
|
1668
|
+
[V]
|
|
1669
|
+
), et = n.useCallback(
|
|
1670
|
+
(d, b) => {
|
|
1671
|
+
!d.target || !h || (C(b), z(!1), ye(d, b), U(d, !1));
|
|
1667
1672
|
},
|
|
1668
|
-
[
|
|
1669
|
-
),
|
|
1670
|
-
(
|
|
1671
|
-
se(document) === y.current &&
|
|
1673
|
+
[C, z, ye, U]
|
|
1674
|
+
), tt = n.useCallback(
|
|
1675
|
+
(d) => {
|
|
1676
|
+
se(document) === y.current && d.preventDefault();
|
|
1672
1677
|
},
|
|
1673
1678
|
[y]
|
|
1674
|
-
),
|
|
1675
|
-
(
|
|
1676
|
-
const
|
|
1677
|
-
|
|
1679
|
+
), st = n.useCallback(
|
|
1680
|
+
(d) => {
|
|
1681
|
+
const b = J, ve = h ? h.length : -1;
|
|
1682
|
+
if (d.altKey) {
|
|
1683
|
+
!k && d.keyCode === r.down && (d.preventDefault(), z(!0), C(0)), k && d.keyCode === r.up && (d.preventDefault(), z(!1), C(-1));
|
|
1684
|
+
return;
|
|
1685
|
+
}
|
|
1686
|
+
switch (d.keyCode) {
|
|
1678
1687
|
case r.enter:
|
|
1679
1688
|
case r.space:
|
|
1680
|
-
|
|
1689
|
+
b >= 0 && ye(d, b), h || Fe(d), d.preventDefault(), z(!k), C(k ? -1 : 0);
|
|
1681
1690
|
break;
|
|
1682
1691
|
case r.esc:
|
|
1683
|
-
|
|
1692
|
+
d.preventDefault(), z(!1), C(-1);
|
|
1684
1693
|
break;
|
|
1685
1694
|
case r.home:
|
|
1686
|
-
|
|
1695
|
+
d.preventDefault(), C(0);
|
|
1687
1696
|
break;
|
|
1688
1697
|
case r.end:
|
|
1689
|
-
|
|
1698
|
+
d.preventDefault(), C(ve - 1);
|
|
1690
1699
|
break;
|
|
1691
1700
|
case r.down:
|
|
1692
1701
|
case r.right:
|
|
1693
|
-
|
|
1702
|
+
d.preventDefault(), C(b + 1 >= ve ? 0 : b + 1);
|
|
1694
1703
|
break;
|
|
1695
1704
|
case r.up:
|
|
1696
1705
|
case r.left:
|
|
1697
|
-
|
|
1706
|
+
d.preventDefault(), C(b - 1 < 0 ? ve - 1 : b - 1);
|
|
1698
1707
|
break;
|
|
1699
1708
|
}
|
|
1700
1709
|
x(
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1710
|
+
q,
|
|
1711
|
+
d,
|
|
1712
|
+
m(),
|
|
1704
1713
|
void 0
|
|
1705
1714
|
);
|
|
1706
1715
|
},
|
|
1707
|
-
[
|
|
1708
|
-
),
|
|
1716
|
+
[q, J, C, Q, z]
|
|
1717
|
+
), nt = n.useMemo(
|
|
1709
1718
|
() => f(
|
|
1710
1719
|
"k-fab k-fab-solid",
|
|
1711
1720
|
{
|
|
@@ -1713,91 +1722,91 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o)
|
|
|
1713
1722
|
"k-fab-md": S === "medium",
|
|
1714
1723
|
"k-fab-lg": S === "large",
|
|
1715
1724
|
"k-disabled": l,
|
|
1716
|
-
"k-pos-absolute":
|
|
1717
|
-
"k-pos-fixed":
|
|
1718
|
-
"k-focus":
|
|
1719
|
-
[`k-rounded-${
|
|
1720
|
-
[`k-fab-solid-${
|
|
1725
|
+
"k-pos-absolute": w === "absolute",
|
|
1726
|
+
"k-pos-fixed": w === "fixed",
|
|
1727
|
+
"k-focus": ce,
|
|
1728
|
+
[`k-rounded-${B.roundedMap[I] || I}`]: I,
|
|
1729
|
+
[`k-fab-solid-${E}`]: E
|
|
1721
1730
|
},
|
|
1722
1731
|
`k-${t.vertical}-${t.horizontal}`,
|
|
1723
1732
|
a
|
|
1724
1733
|
),
|
|
1725
|
-
[
|
|
1726
|
-
),
|
|
1727
|
-
|
|
1734
|
+
[E, S, I, l, w, t, ce, a]
|
|
1735
|
+
), ot = h && h.map((d, b) => /* @__PURE__ */ n.createElement(
|
|
1736
|
+
Se,
|
|
1728
1737
|
{
|
|
1729
|
-
...
|
|
1730
|
-
key:
|
|
1731
|
-
index:
|
|
1732
|
-
id: `${
|
|
1733
|
-
disabled: l ||
|
|
1734
|
-
focused: J ===
|
|
1735
|
-
dataItem:
|
|
1736
|
-
item:
|
|
1738
|
+
...d,
|
|
1739
|
+
key: b,
|
|
1740
|
+
index: b,
|
|
1741
|
+
id: `${de}-${b}`,
|
|
1742
|
+
disabled: l || d.disabled,
|
|
1743
|
+
focused: J === b,
|
|
1744
|
+
dataItem: d,
|
|
1745
|
+
item: D,
|
|
1737
1746
|
className: f(
|
|
1738
|
-
|
|
1739
|
-
|
|
1747
|
+
d.className,
|
|
1748
|
+
St(ke || "ltr", t.horizontal)
|
|
1740
1749
|
),
|
|
1741
|
-
onClick:
|
|
1742
|
-
onDown:
|
|
1750
|
+
onClick: et,
|
|
1751
|
+
onDown: tt
|
|
1743
1752
|
}
|
|
1744
|
-
)), ze = !!((
|
|
1745
|
-
return /* @__PURE__ */ n.createElement(
|
|
1753
|
+
)), ze = !!((u || c) && !N), it = y.current ? y.current.offsetWidth : 0, at = 32, Pe = it / 2 - at / 2;
|
|
1754
|
+
return /* @__PURE__ */ n.createElement(rt.Provider, { value: le }, /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(
|
|
1746
1755
|
"button",
|
|
1747
1756
|
{
|
|
1748
1757
|
ref: y,
|
|
1749
|
-
id:
|
|
1750
|
-
role:
|
|
1758
|
+
id: v || Xe,
|
|
1759
|
+
role: "button",
|
|
1751
1760
|
type: "button",
|
|
1752
1761
|
"aria-disabled": l,
|
|
1753
|
-
"aria-expanded":
|
|
1754
|
-
"aria-haspopup": !!
|
|
1762
|
+
"aria-expanded": h ? k : void 0,
|
|
1763
|
+
"aria-haspopup": !!h,
|
|
1755
1764
|
"aria-label": `${N || ""} floatingactionbutton`,
|
|
1756
|
-
"aria-owns":
|
|
1757
|
-
"aria-activedescendant": J >= 0 &&
|
|
1758
|
-
tabIndex: fe(
|
|
1759
|
-
accessKey:
|
|
1760
|
-
dir:
|
|
1765
|
+
"aria-owns": h ? de : void 0,
|
|
1766
|
+
"aria-activedescendant": J >= 0 && h ? `${de}-${J}` : void 0,
|
|
1767
|
+
tabIndex: fe(T, l),
|
|
1768
|
+
accessKey: K,
|
|
1769
|
+
dir: ke,
|
|
1761
1770
|
disabled: l,
|
|
1762
|
-
className:
|
|
1763
|
-
style:
|
|
1764
|
-
onClick:
|
|
1765
|
-
onMouseDown:
|
|
1766
|
-
onFocus:
|
|
1767
|
-
onBlur:
|
|
1768
|
-
onKeyDown:
|
|
1769
|
-
...
|
|
1771
|
+
className: nt,
|
|
1772
|
+
style: F,
|
|
1773
|
+
onClick: Fe,
|
|
1774
|
+
onMouseDown: Ye,
|
|
1775
|
+
onFocus: Je,
|
|
1776
|
+
onBlur: Qe,
|
|
1777
|
+
onKeyDown: st,
|
|
1778
|
+
..._
|
|
1770
1779
|
},
|
|
1771
|
-
|
|
1780
|
+
u || c ? /* @__PURE__ */ n.createElement(A, { className: "k-fab-icon", name: u, icon: c }) : g ? /* @__PURE__ */ n.createElement("span", { role: "presentation", className: g }) : null,
|
|
1772
1781
|
N && /* @__PURE__ */ n.createElement("span", { className: "k-fab-text" }, N)
|
|
1773
|
-
),
|
|
1782
|
+
), L && k && /* @__PURE__ */ n.createElement(
|
|
1774
1783
|
"div",
|
|
1775
1784
|
{
|
|
1776
1785
|
className: "k-overlay",
|
|
1777
1786
|
style: {
|
|
1778
|
-
zIndex:
|
|
1787
|
+
zIndex: le,
|
|
1779
1788
|
...p
|
|
1780
1789
|
}
|
|
1781
1790
|
}
|
|
1782
1791
|
), /* @__PURE__ */ n.createElement(
|
|
1783
|
-
|
|
1792
|
+
we,
|
|
1784
1793
|
{
|
|
1785
|
-
ref:
|
|
1794
|
+
ref: ge,
|
|
1786
1795
|
anchor: y.current,
|
|
1787
|
-
show:
|
|
1788
|
-
animate:
|
|
1789
|
-
popupClass: f("k-popup-transparent k-fab-popup",
|
|
1790
|
-
anchorAlign:
|
|
1791
|
-
popupAlign:
|
|
1796
|
+
show: k,
|
|
1797
|
+
animate: P.animate,
|
|
1798
|
+
popupClass: f("k-popup-transparent k-fab-popup", P.popupClass),
|
|
1799
|
+
anchorAlign: P.anchorAlign || Et(t, Q),
|
|
1800
|
+
popupAlign: P.popupAlign || Nt(t, Q),
|
|
1792
1801
|
style: { boxShadow: "none" }
|
|
1793
1802
|
},
|
|
1794
1803
|
/* @__PURE__ */ n.createElement(
|
|
1795
1804
|
"ul",
|
|
1796
1805
|
{
|
|
1797
|
-
ref:
|
|
1806
|
+
ref: be,
|
|
1798
1807
|
role: "menu",
|
|
1799
|
-
"aria-labelledby":
|
|
1800
|
-
id:
|
|
1808
|
+
"aria-labelledby": v,
|
|
1809
|
+
id: de,
|
|
1801
1810
|
className: f("k-fab-items", {
|
|
1802
1811
|
"k-fab-items-bottom": t.vertical !== "bottom",
|
|
1803
1812
|
"k-fab-items-top": t.vertical === "bottom"
|
|
@@ -1807,7 +1816,7 @@ const Re = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, o)
|
|
|
1807
1816
|
paddingRight: ze ? Pe : void 0
|
|
1808
1817
|
}
|
|
1809
1818
|
},
|
|
1810
|
-
|
|
1819
|
+
ot
|
|
1811
1820
|
)
|
|
1812
1821
|
)));
|
|
1813
1822
|
});
|
|
@@ -1820,7 +1829,7 @@ Ge.propTypes = {
|
|
|
1820
1829
|
accessKey: s.string,
|
|
1821
1830
|
disabled: s.bool,
|
|
1822
1831
|
icon: s.string,
|
|
1823
|
-
svgIcon:
|
|
1832
|
+
svgIcon: M,
|
|
1824
1833
|
iconClass: s.string,
|
|
1825
1834
|
text: s.string,
|
|
1826
1835
|
alignOffset: s.shape({
|
|
@@ -1860,18 +1869,18 @@ const Y = {
|
|
|
1860
1869
|
Ge.displayName = "KendoFloatingActionButton";
|
|
1861
1870
|
export {
|
|
1862
1871
|
ne as Button,
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1872
|
+
ft as ButtonGroup,
|
|
1873
|
+
j as Chip,
|
|
1874
|
+
Ne as ChipList,
|
|
1866
1875
|
He as DropDownButton,
|
|
1867
|
-
|
|
1876
|
+
_e as DropDownButtonItem,
|
|
1868
1877
|
Ge as FloatingActionButton,
|
|
1869
|
-
|
|
1870
|
-
|
|
1878
|
+
Se as FloatingActionButtonItem,
|
|
1879
|
+
Le as SplitButton,
|
|
1871
1880
|
Ke as SplitButtonItem,
|
|
1872
1881
|
Ue as Toolbar,
|
|
1873
|
-
|
|
1874
|
-
|
|
1882
|
+
bt as ToolbarItem,
|
|
1883
|
+
At as ToolbarSeparator,
|
|
1875
1884
|
We as ToolbarSpacer,
|
|
1876
|
-
|
|
1885
|
+
pt as toolbarButtons
|
|
1877
1886
|
};
|