@progress/kendo-react-buttons 7.1.1-develop.5 → 7.1.1-develop.6
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/models/PopupSettings.d.ts +5 -1
- package/dist/cdn/js/kendo-react-buttons.js +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.mjs +200 -192
- package/package.json +3 -3
package/index.mjs
CHANGED
|
@@ -6,21 +6,21 @@
|
|
|
6
6
|
import * as o from "react";
|
|
7
7
|
import Ie from "react";
|
|
8
8
|
import s from "prop-types";
|
|
9
|
-
import { svgIconPropType as M, validatePackage as R, classNames as f, kendoThemeMaps as P, IconWrap as $, Keys as r, dispatchEvent as I, getActiveElement as
|
|
9
|
+
import { svgIconPropType as M, validatePackage as R, classNames as f, kendoThemeMaps as P, IconWrap as $, Keys as r, dispatchEvent as I, getActiveElement as T, useDir as xe, useMouse as Ae, getTabIndex as me, toIconName as Ce, getter as Me, useZIndexContext as rt, useId as Re, ZIndexContext as ct, withIdHOC as $e } from "@progress/kendo-react-common";
|
|
10
10
|
import { Popup as De } from "@progress/kendo-react-popup";
|
|
11
11
|
import { caretAltDownIcon as dt, xCircleIcon as ut } from "@progress/kendo-svg-icons";
|
|
12
12
|
const O = {
|
|
13
13
|
name: "@progress/kendo-react-buttons",
|
|
14
14
|
productName: "KendoReact",
|
|
15
15
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
16
|
-
publishDate:
|
|
16
|
+
publishDate: 1707462440,
|
|
17
17
|
version: "",
|
|
18
18
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
19
19
|
};
|
|
20
20
|
function ht({ imageUrl: e, name: n, iconClass: t, svgIcon: i, imageAlt: a }) {
|
|
21
21
|
return e ? /* @__PURE__ */ o.createElement("img", { role: "presentation", className: "k-button-icon", alt: a, src: e }) : n || i ? /* @__PURE__ */ o.createElement($, { className: "k-button-icon", name: n, icon: i }) : t ? /* @__PURE__ */ o.createElement("span", { role: "presentation", className: f("k-button-icon", t) }) : null;
|
|
22
22
|
}
|
|
23
|
-
const
|
|
23
|
+
const te = class extends o.Component {
|
|
24
24
|
constructor(e) {
|
|
25
25
|
super(e), this._element = null, this.handleClick = (n) => {
|
|
26
26
|
this.toggleIfApplicable(), this.props.onClick && this.props.onClick.call(void 0, n);
|
|
@@ -59,12 +59,12 @@ const ee = class extends o.Component {
|
|
|
59
59
|
imageAlt: u,
|
|
60
60
|
className: c,
|
|
61
61
|
onClick: g,
|
|
62
|
-
size:
|
|
63
|
-
rounded: h =
|
|
64
|
-
fillMode: D =
|
|
65
|
-
themeColor:
|
|
62
|
+
size: C = te.defaultProps.size,
|
|
63
|
+
rounded: h = te.defaultProps.rounded,
|
|
64
|
+
fillMode: D = te.defaultProps.fillMode,
|
|
65
|
+
themeColor: S = te.defaultProps.themeColor,
|
|
66
66
|
...w
|
|
67
|
-
} = this.props,
|
|
67
|
+
} = this.props, N = a !== void 0 || t !== void 0 || i !== void 0 || l !== void 0, B = e !== void 0, x = ht({
|
|
68
68
|
name: t,
|
|
69
69
|
svgIcon: a,
|
|
70
70
|
iconClass: i,
|
|
@@ -81,11 +81,11 @@ const ee = class extends o.Component {
|
|
|
81
81
|
className: f(
|
|
82
82
|
"k-button",
|
|
83
83
|
{
|
|
84
|
-
[`k-button-${P.sizeMap[
|
|
84
|
+
[`k-button-${P.sizeMap[C] || C}`]: C,
|
|
85
85
|
[`k-button-${D}`]: D,
|
|
86
|
-
[`k-button-${D}-${
|
|
86
|
+
[`k-button-${D}-${S}`]: !!(D && S),
|
|
87
87
|
[`k-rounded-${P.roundedMap[h] || h}`]: h,
|
|
88
|
-
"k-icon-button": !B &&
|
|
88
|
+
"k-icon-button": !B && N,
|
|
89
89
|
"k-disabled": this.props.disabled,
|
|
90
90
|
"k-selected": this.state.selected,
|
|
91
91
|
"k-rtl": this.props.dir === "rtl"
|
|
@@ -104,7 +104,7 @@ const ee = class extends o.Component {
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
|
-
let ne =
|
|
107
|
+
let ne = te;
|
|
108
108
|
ne.propTypes = {
|
|
109
109
|
children: s.node,
|
|
110
110
|
selected: s.bool,
|
|
@@ -316,7 +316,7 @@ let Ee = class extends o.Component {
|
|
|
316
316
|
}, this.wrapper = null, this.mainButton = null, this.list = null, this.skipFocus = !1, this.buttonsData = [], this.onKeyDown = (t) => {
|
|
317
317
|
const { focusedIndex: i } = this.state;
|
|
318
318
|
if (t.altKey) {
|
|
319
|
-
!this.opened && t.keyCode === r.down ? (
|
|
319
|
+
!this.opened && t.keyCode === r.down ? (t.preventDefault(), this.setState({ focusedIndex: 0 }), this.setOpen(!0, t)) : this.opened && t.keyCode === r.up && (t.preventDefault(), this.setState({ focusedIndex: -1 }), this.setOpen(!1, t));
|
|
320
320
|
return;
|
|
321
321
|
}
|
|
322
322
|
let a;
|
|
@@ -326,10 +326,10 @@ let Ee = class extends o.Component {
|
|
|
326
326
|
focusedIndex: this.opened ? -1 : 0
|
|
327
327
|
};
|
|
328
328
|
const l = !this.opened;
|
|
329
|
-
this.setOpen(l
|
|
329
|
+
this.setOpen(l, t);
|
|
330
330
|
}
|
|
331
331
|
} else if (this.opened && t.keyCode === r.esc) {
|
|
332
|
-
this.setState({ focusedIndex: -1 }), this.setOpen(!1);
|
|
332
|
+
this.setState({ focusedIndex: -1 }), this.setOpen(!1, t);
|
|
333
333
|
return;
|
|
334
334
|
}
|
|
335
335
|
if (this.opened) {
|
|
@@ -348,19 +348,23 @@ let Ee = class extends o.Component {
|
|
|
348
348
|
this.skipFocus = !0, t(), window.setTimeout(() => this.skipFocus = !1, 0);
|
|
349
349
|
}, this.onFocus = (t) => {
|
|
350
350
|
this.skipFocus || (I(this.props.onFocus, t, this, void 0), this.setState({ focused: !0 }));
|
|
351
|
-
}, this.setOpen = (t) => {
|
|
352
|
-
this.openedDuringOnChange = t, this.setState({ opened: t });
|
|
351
|
+
}, this.setOpen = (t, i) => {
|
|
352
|
+
this.state.opened !== t && (this.openedDuringOnChange = t, this.setState({ opened: t }), i ? this.dispatchPopupEvent(i, t) : this.openedDuringOnChange = void 0);
|
|
353
353
|
}, this.onItemClick = (t, i) => {
|
|
354
|
-
this.opened &&
|
|
354
|
+
this.opened && this.setState({ focusedIndex: 0 }), this.dispatchClickEvent(t, i), this.setOpen(!1, t);
|
|
355
355
|
}, this.onBlur = (t) => {
|
|
356
356
|
this.skipFocus || (this.setState({
|
|
357
357
|
focused: !1,
|
|
358
358
|
focusedIndex: -1
|
|
359
|
-
}),
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
359
|
+
}), I(this.props.onBlur, t, this, void 0), setTimeout(() => {
|
|
360
|
+
this.setOpen(!1, t);
|
|
361
|
+
}, 0));
|
|
362
|
+
}, this.onPopupClose = (t) => {
|
|
363
|
+
var a;
|
|
364
|
+
const i = T(document);
|
|
365
|
+
this.element && this.element.removeAttribute("tabindex"), (i === this.list || (a = this.list) != null && a.contains(i)) && this.switchFocus(() => {
|
|
366
|
+
this.element && this.element.focus({ preventScroll: !0 });
|
|
367
|
+
}), this.props.popupSettings && this.props.popupSettings.onClose && this.props.popupSettings.onClose.call(void 0, t);
|
|
364
368
|
}, this.listRef = (t) => {
|
|
365
369
|
this.list = t, t && this.state.focused && this.switchFocus(() => {
|
|
366
370
|
t.focus({ preventScroll: !0 }), this.element && (this.element.tabIndex = -1);
|
|
@@ -368,17 +372,17 @@ let Ee = class extends o.Component {
|
|
|
368
372
|
}, this.onSplitPartClick = (t) => {
|
|
369
373
|
if (this.buttonsData.length) {
|
|
370
374
|
const i = !this.opened;
|
|
371
|
-
|
|
375
|
+
this.setState({
|
|
372
376
|
focusedIndex: i ? 0 : -1,
|
|
373
377
|
focused: !0
|
|
374
|
-
}), this.setOpen(i);
|
|
378
|
+
}), this.setOpen(i, t);
|
|
375
379
|
}
|
|
376
380
|
}, this.onDownSplitPart = (t) => {
|
|
377
381
|
t.preventDefault();
|
|
378
|
-
const i =
|
|
382
|
+
const i = T(document);
|
|
379
383
|
this.element && i !== this.element && i !== this.list && this.element.focus();
|
|
380
384
|
}, this.onItemDown = (t) => {
|
|
381
|
-
|
|
385
|
+
T(document) === this.list && t.preventDefault();
|
|
382
386
|
}, this.dispatchPopupEvent = (t, i) => {
|
|
383
387
|
I(i ? this.props.onOpen : this.props.onClose, t, this, void 0), this.openedDuringOnChange = void 0;
|
|
384
388
|
}, R(O);
|
|
@@ -596,7 +600,7 @@ Ue.propTypes = {
|
|
|
596
600
|
disabled: s.bool,
|
|
597
601
|
render: s.any
|
|
598
602
|
};
|
|
599
|
-
let
|
|
603
|
+
let Se = class extends o.Component {
|
|
600
604
|
constructor(n) {
|
|
601
605
|
super(n), this.state = {
|
|
602
606
|
opened: !1,
|
|
@@ -605,21 +609,21 @@ let Ne = class extends o.Component {
|
|
|
605
609
|
}, this.mainButton = null, this.list = null, this.skipFocus = !1, this.buttonsData = [], this.onKeyDown = (t) => {
|
|
606
610
|
const { focusedIndex: i } = this.state;
|
|
607
611
|
if (t.altKey) {
|
|
608
|
-
!this.opened && t.keyCode === r.down ? (
|
|
612
|
+
!this.opened && t.keyCode === r.down ? (t.preventDefault(), this.setOpen(!0, t), this.setState({ focusedIndex: 0 })) : this.opened && t.keyCode === r.up && (t.preventDefault(), this.setState({ focusedIndex: -1 }), this.setOpen(!1, t));
|
|
609
613
|
return;
|
|
610
614
|
}
|
|
611
615
|
const a = { ...this.state };
|
|
612
616
|
if (t.keyCode === r.enter || t.keyCode === r.space) {
|
|
613
|
-
i >= 0 && this.dispatchClickEvent(t, i);
|
|
617
|
+
t.preventDefault(), i >= 0 && this.dispatchClickEvent(t, i);
|
|
614
618
|
const l = !this.opened;
|
|
615
619
|
this.setState({
|
|
616
620
|
focused: !0,
|
|
617
621
|
focusedIndex: l ? 0 : -1
|
|
618
|
-
}), this.setOpen(l
|
|
622
|
+
}), this.setOpen(l, t);
|
|
619
623
|
return;
|
|
620
624
|
}
|
|
621
625
|
if (this.opened && t.keyCode === r.esc) {
|
|
622
|
-
this.setState({ focusedIndex: -1 }), this.setOpen(!1);
|
|
626
|
+
this.setState({ focusedIndex: -1 }), this.setOpen(!1, t);
|
|
623
627
|
return;
|
|
624
628
|
}
|
|
625
629
|
if (this.opened) {
|
|
@@ -641,21 +645,25 @@ let Ne = class extends o.Component {
|
|
|
641
645
|
}, this.handleButtonBlur = (t) => {
|
|
642
646
|
this.opened || (this.setState({ focused: !1 }), I(this.props.onBlur, t, this, void 0));
|
|
643
647
|
}, this.handleMenuBlur = (t) => {
|
|
644
|
-
this.skipFocus || (this.setState({ focused: !1, focusedIndex: -1 }),
|
|
645
|
-
|
|
646
|
-
|
|
648
|
+
this.skipFocus || (this.setState({ focused: !1, focusedIndex: -1 }), I(this.props.onBlur, t, this, void 0), setTimeout(() => {
|
|
649
|
+
this.setOpen(!1, t);
|
|
650
|
+
}, 0));
|
|
651
|
+
}, this.setOpen = (t, i) => {
|
|
652
|
+
this.state.opened !== t && (this.openedDuringOnChange = t, this.setState({ opened: t }), i ? this.dispatchPopupEvent(i, t) : this.openedDuringOnChange = void 0);
|
|
647
653
|
}, this.onItemClick = (t, i) => {
|
|
648
|
-
this.setState({ focusedIndex: -1 }), this.
|
|
654
|
+
this.setState({ focusedIndex: -1 }), this.dispatchClickEvent(t, i), this.setOpen(!1, t);
|
|
649
655
|
}, this.onItemDown = (t) => {
|
|
650
|
-
|
|
656
|
+
T(document) === this.list && t.preventDefault();
|
|
651
657
|
}, this.mouseDown = (t) => {
|
|
652
658
|
t.preventDefault();
|
|
653
|
-
const i =
|
|
659
|
+
const i = T(document);
|
|
654
660
|
this.element && i !== this.element && i !== this.list && this.element.focus();
|
|
655
|
-
}, this.onPopupClose = () => {
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
661
|
+
}, this.onPopupClose = (t) => {
|
|
662
|
+
var a;
|
|
663
|
+
const i = T(document);
|
|
664
|
+
this.element && this.element.removeAttribute("tabindex"), (i === this.list || (a = this.list) != null && a.contains(i)) && this.switchFocus(() => {
|
|
665
|
+
this.element && this.element.focus({ preventScroll: !0 });
|
|
666
|
+
}), this.props.popupSettings && this.props.popupSettings.onClose && this.props.popupSettings.onClose.call(void 0, t);
|
|
659
667
|
}, this.listRef = (t) => {
|
|
660
668
|
this.list = t, t && this.state.focused && this.switchFocus(() => {
|
|
661
669
|
t.focus({ preventScroll: !0 }), this.element && (this.element.tabIndex = -1);
|
|
@@ -667,7 +675,7 @@ let Ne = class extends o.Component {
|
|
|
667
675
|
this.setState({
|
|
668
676
|
focused: !0,
|
|
669
677
|
focusedIndex: i ? 0 : -1
|
|
670
|
-
}), this.setOpen(i
|
|
678
|
+
}), this.setOpen(i, t);
|
|
671
679
|
}, this.dispatchPopupEvent = (t, i) => {
|
|
672
680
|
I(i ? this.props.onOpen : this.props.onClose, t, this, void 0), this.openedDuringOnChange = void 0;
|
|
673
681
|
}, R(O);
|
|
@@ -808,7 +816,7 @@ let Ne = class extends o.Component {
|
|
|
808
816
|
return this.props.dir !== void 0 ? this.props.dir === "rtl" : !!this.mainButton && getComputedStyle(this.mainButton).direction === "rtl";
|
|
809
817
|
}
|
|
810
818
|
};
|
|
811
|
-
|
|
819
|
+
Se.propTypes = {
|
|
812
820
|
accessKey: s.string,
|
|
813
821
|
ariaLabel: s.string,
|
|
814
822
|
title: s.string,
|
|
@@ -832,16 +840,16 @@ Ne.propTypes = {
|
|
|
832
840
|
buttonClass: s.string,
|
|
833
841
|
dir: s.string
|
|
834
842
|
};
|
|
835
|
-
|
|
843
|
+
Se.defaultProps = {
|
|
836
844
|
size: "medium",
|
|
837
845
|
rounded: "medium",
|
|
838
846
|
fillMode: "solid",
|
|
839
847
|
themeColor: "base"
|
|
840
848
|
};
|
|
841
|
-
const
|
|
849
|
+
const ve = class extends o.Component {
|
|
842
850
|
constructor(e) {
|
|
843
851
|
super(e), this._element = null, this.offsetHeight = 0, this.offsetWidth = 0, this.buttons = [], this.focusedSelector = this.selectors.map((n) => n + ":focus").join(","), this.setTabIndex = (n) => {
|
|
844
|
-
const { tabIndex: t =
|
|
852
|
+
const { tabIndex: t = ve.defaultProps.tabIndex } = this.props;
|
|
845
853
|
this.buttons.forEach((i, a) => {
|
|
846
854
|
i.tabIndex = a === n ? t : -1;
|
|
847
855
|
});
|
|
@@ -923,7 +931,7 @@ const Ce = class extends o.Component {
|
|
|
923
931
|
);
|
|
924
932
|
}
|
|
925
933
|
focusButton(e, n) {
|
|
926
|
-
const { tabIndex: t =
|
|
934
|
+
const { tabIndex: t = ve.defaultProps.tabIndex } = this.props, i = this.buttons[n];
|
|
927
935
|
if (i) {
|
|
928
936
|
i.tabIndex = t, i.focus();
|
|
929
937
|
const a = this.buttons[e];
|
|
@@ -931,7 +939,7 @@ const Ce = class extends o.Component {
|
|
|
931
939
|
}
|
|
932
940
|
}
|
|
933
941
|
};
|
|
934
|
-
let We =
|
|
942
|
+
let We = ve;
|
|
935
943
|
We.propTypes = {
|
|
936
944
|
tabIndex: s.number,
|
|
937
945
|
dir: s.string,
|
|
@@ -1010,7 +1018,7 @@ const Ze = Ie.createContext([null, (e) => {
|
|
|
1010
1018
|
}]), qe = Ie.createContext([null, (e) => {
|
|
1011
1019
|
}]), Ge = Ie.createContext([null, (e) => {
|
|
1012
1020
|
}]);
|
|
1013
|
-
var
|
|
1021
|
+
var se = /* @__PURE__ */ ((e) => (e.next = "next", e.prev = "prev", e.current = "current", e.reset = "reset", e))(se || {});
|
|
1014
1022
|
const yt = (e, n) => {
|
|
1015
1023
|
const t = n.items.findIndex((i) => i === e);
|
|
1016
1024
|
switch (n.type) {
|
|
@@ -1040,7 +1048,7 @@ const kt = (e, n) => {
|
|
|
1040
1048
|
}
|
|
1041
1049
|
};
|
|
1042
1050
|
var pe = /* @__PURE__ */ ((e) => (e.toggle = "toggle", e.remove = "remove", e))(pe || {});
|
|
1043
|
-
const
|
|
1051
|
+
const Ct = (e, n) => {
|
|
1044
1052
|
switch (n.selection) {
|
|
1045
1053
|
case "single":
|
|
1046
1054
|
switch (n.type) {
|
|
@@ -1073,14 +1081,14 @@ const vt = (e, n) => {
|
|
|
1073
1081
|
default:
|
|
1074
1082
|
return e;
|
|
1075
1083
|
}
|
|
1076
|
-
},
|
|
1084
|
+
}, Z = o.forwardRef((e, n) => {
|
|
1077
1085
|
R(O);
|
|
1078
1086
|
const t = o.useRef(null), i = o.useRef(null), a = xe(i, e.dir);
|
|
1079
1087
|
o.useImperativeHandle(t, () => ({
|
|
1080
1088
|
element: i.current,
|
|
1081
1089
|
props: e
|
|
1082
1090
|
})), o.useImperativeHandle(n, () => t.current);
|
|
1083
|
-
const [l, u] = o.useContext(Ze), [c, g] = o.useContext(qe), [,
|
|
1091
|
+
const [l, u] = o.useContext(Ze), [c, g] = o.useContext(qe), [, C] = o.useContext(Ge), h = o.useMemo(
|
|
1084
1092
|
() => e.selected || (Array.isArray(l) ? l.some((p) => p === e.value) : l === e.value),
|
|
1085
1093
|
[e.selected, e.value, l]
|
|
1086
1094
|
), D = o.useMemo(
|
|
@@ -1093,14 +1101,14 @@ const vt = (e, n) => {
|
|
|
1093
1101
|
},
|
|
1094
1102
|
[D]
|
|
1095
1103
|
);
|
|
1096
|
-
const
|
|
1104
|
+
const S = o.useCallback(
|
|
1097
1105
|
(p) => {
|
|
1098
1106
|
u({ type: pe.toggle, payload: e.value, event: p });
|
|
1099
1107
|
},
|
|
1100
1108
|
[u, e.value]
|
|
1101
1109
|
), w = o.useCallback(
|
|
1102
1110
|
(p) => {
|
|
1103
|
-
e.removable && (
|
|
1111
|
+
e.removable && (C({ type: Xe.remove, payload: e.value, event: p }), g({ type: se.reset, payload: e.value, event: p }), u({ type: pe.remove, payload: e.value, event: p }), e.onRemove && e.onRemove.call(
|
|
1104
1112
|
void 0,
|
|
1105
1113
|
{
|
|
1106
1114
|
target: t.current,
|
|
@@ -1108,15 +1116,15 @@ const vt = (e, n) => {
|
|
|
1108
1116
|
}
|
|
1109
1117
|
));
|
|
1110
1118
|
},
|
|
1111
|
-
[e.onRemove, e.value, e.removable,
|
|
1112
|
-
),
|
|
1119
|
+
[e.onRemove, e.value, e.removable, C, g, u]
|
|
1120
|
+
), N = o.useCallback(
|
|
1113
1121
|
(p) => {
|
|
1114
1122
|
switch (p.keyCode) {
|
|
1115
1123
|
case r.left:
|
|
1116
|
-
g({ type:
|
|
1124
|
+
g({ type: se.prev, payload: e.value, event: p });
|
|
1117
1125
|
break;
|
|
1118
1126
|
case r.right:
|
|
1119
|
-
g({ type:
|
|
1127
|
+
g({ type: se.next, payload: e.value, event: p });
|
|
1120
1128
|
break;
|
|
1121
1129
|
case r.enter:
|
|
1122
1130
|
u({ type: pe.toggle, payload: e.value, event: p });
|
|
@@ -1136,7 +1144,7 @@ const vt = (e, n) => {
|
|
|
1136
1144
|
[e.onKeyDown, e.value, g, u, w]
|
|
1137
1145
|
), B = o.useCallback(
|
|
1138
1146
|
(p) => {
|
|
1139
|
-
g({ payload: e.value, type:
|
|
1147
|
+
g({ payload: e.value, type: se.current, event: p }), e.onFocus && e.onFocus.call(
|
|
1140
1148
|
void 0,
|
|
1141
1149
|
{
|
|
1142
1150
|
target: t.current,
|
|
@@ -1156,7 +1164,7 @@ const vt = (e, n) => {
|
|
|
1156
1164
|
);
|
|
1157
1165
|
},
|
|
1158
1166
|
[e.onBlur]
|
|
1159
|
-
), E = Ae(e, t, { onClick:
|
|
1167
|
+
), E = Ae(e, t, { onClick: S });
|
|
1160
1168
|
return /* @__PURE__ */ o.createElement(
|
|
1161
1169
|
"div",
|
|
1162
1170
|
{
|
|
@@ -1187,13 +1195,13 @@ const vt = (e, n) => {
|
|
|
1187
1195
|
"aria-keyshortcuts": e.removable ? "Enter Delete" : void 0,
|
|
1188
1196
|
onFocus: B,
|
|
1189
1197
|
onBlur: x,
|
|
1190
|
-
onKeyDown:
|
|
1198
|
+
onKeyDown: N
|
|
1191
1199
|
},
|
|
1192
1200
|
h && (e.selectedIcon || e.selectedSvgIcon) && /* @__PURE__ */ o.createElement(
|
|
1193
1201
|
$,
|
|
1194
1202
|
{
|
|
1195
1203
|
className: "k-chip-icon",
|
|
1196
|
-
name: e.selectedIcon ?
|
|
1204
|
+
name: e.selectedIcon ? Ce(e.selectedIcon) : void 0,
|
|
1197
1205
|
icon: e.selectedSvgIcon,
|
|
1198
1206
|
size: "small"
|
|
1199
1207
|
}
|
|
@@ -1202,7 +1210,7 @@ const vt = (e, n) => {
|
|
|
1202
1210
|
$,
|
|
1203
1211
|
{
|
|
1204
1212
|
className: "k-chip-icon",
|
|
1205
|
-
name: e.icon ?
|
|
1213
|
+
name: e.icon ? Ce(e.icon) : void 0,
|
|
1206
1214
|
icon: e.svgIcon,
|
|
1207
1215
|
size: "small"
|
|
1208
1216
|
}
|
|
@@ -1232,13 +1240,13 @@ const vt = (e, n) => {
|
|
|
1232
1240
|
e.removable && /* @__PURE__ */ o.createElement("span", { className: "k-chip-actions" }, /* @__PURE__ */ o.createElement("span", { className: f("k-chip-action", "k-chip-remove-action"), onClick: w }, /* @__PURE__ */ o.createElement(
|
|
1233
1241
|
$,
|
|
1234
1242
|
{
|
|
1235
|
-
name: e.removeIcon ?
|
|
1243
|
+
name: e.removeIcon ? Ce(e.removeIcon) : void 0,
|
|
1236
1244
|
icon: e.removeSvgIcon || ut,
|
|
1237
1245
|
size: "small"
|
|
1238
1246
|
}
|
|
1239
1247
|
)))
|
|
1240
1248
|
);
|
|
1241
|
-
}),
|
|
1249
|
+
}), vt = {
|
|
1242
1250
|
id: s.string,
|
|
1243
1251
|
text: s.string,
|
|
1244
1252
|
value: s.any,
|
|
@@ -1270,14 +1278,14 @@ const vt = (e, n) => {
|
|
|
1270
1278
|
fillMode: "solid",
|
|
1271
1279
|
themeColor: "base"
|
|
1272
1280
|
};
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1281
|
+
Z.displayName = "KendoReactChip";
|
|
1282
|
+
Z.propTypes = vt;
|
|
1283
|
+
Z.defaultProps = It;
|
|
1276
1284
|
const xt = (e, n, t) => {
|
|
1277
1285
|
n.selection === "multiple" ? Array.isArray(e) || (e = e ? [e] : null) : n.selection === "single" && Array.isArray(e) && (e = e ? e.join("") : null);
|
|
1278
1286
|
const [i, a] = o.useState(e);
|
|
1279
1287
|
return [i, (u) => {
|
|
1280
|
-
const c =
|
|
1288
|
+
const c = Ct(n.state || i, { ...u, ...n });
|
|
1281
1289
|
t && t(c, u.event), n.selection !== "none" && a(c);
|
|
1282
1290
|
}];
|
|
1283
1291
|
}, Dt = (e) => {
|
|
@@ -1292,29 +1300,29 @@ const xt = (e, n, t) => {
|
|
|
1292
1300
|
const c = kt(n.state || i, { ...u, ...n });
|
|
1293
1301
|
t && t(c, u.event), a(c);
|
|
1294
1302
|
}];
|
|
1295
|
-
},
|
|
1303
|
+
}, Ne = o.forwardRef((e, n) => {
|
|
1296
1304
|
R(O);
|
|
1297
1305
|
const t = o.useRef(null), i = o.useRef(null), a = xe(i, e.dir), {
|
|
1298
1306
|
chip: l,
|
|
1299
1307
|
id: u,
|
|
1300
1308
|
style: c,
|
|
1301
1309
|
tabIndex: g,
|
|
1302
|
-
disabled:
|
|
1310
|
+
disabled: C,
|
|
1303
1311
|
size: h,
|
|
1304
1312
|
className: D,
|
|
1305
|
-
ariaDescribedBy:
|
|
1313
|
+
ariaDescribedBy: S,
|
|
1306
1314
|
ariaLabelledBy: w,
|
|
1307
|
-
ariaLabel:
|
|
1308
|
-
selection: B =
|
|
1309
|
-
value: x =
|
|
1310
|
-
defaultData: E =
|
|
1311
|
-
valueField: p =
|
|
1312
|
-
textField:
|
|
1315
|
+
ariaLabel: N,
|
|
1316
|
+
selection: B = j.selection,
|
|
1317
|
+
value: x = j.defaultValue,
|
|
1318
|
+
defaultData: E = j.defaultData,
|
|
1319
|
+
valueField: p = j.valueField,
|
|
1320
|
+
textField: L = j.textField,
|
|
1313
1321
|
onChange: K,
|
|
1314
1322
|
onDataChange: z
|
|
1315
|
-
} = e,
|
|
1316
|
-
() => l ||
|
|
1317
|
-
[l,
|
|
1323
|
+
} = e, _ = o.useMemo(
|
|
1324
|
+
() => l || Z,
|
|
1325
|
+
[l, Z]
|
|
1318
1326
|
);
|
|
1319
1327
|
o.useImperativeHandle(t, () => ({
|
|
1320
1328
|
element: i.current,
|
|
@@ -1329,7 +1337,7 @@ const xt = (e, n, t) => {
|
|
|
1329
1337
|
});
|
|
1330
1338
|
},
|
|
1331
1339
|
[K]
|
|
1332
|
-
), [
|
|
1340
|
+
), [q, G] = xt(
|
|
1333
1341
|
x || e.defaultValue,
|
|
1334
1342
|
{
|
|
1335
1343
|
selection: B,
|
|
@@ -1345,66 +1353,66 @@ const xt = (e, n, t) => {
|
|
|
1345
1353
|
});
|
|
1346
1354
|
},
|
|
1347
1355
|
[z]
|
|
1348
|
-
), [
|
|
1356
|
+
), [X, ie] = wt(
|
|
1349
1357
|
e.data || E,
|
|
1350
1358
|
{
|
|
1351
1359
|
state: e.data,
|
|
1352
1360
|
valueField: p
|
|
1353
1361
|
},
|
|
1354
1362
|
oe
|
|
1355
|
-
),
|
|
1363
|
+
), V = o.useCallback(
|
|
1356
1364
|
(m, y) => (m.push(y[p]), m),
|
|
1357
1365
|
[p]
|
|
1358
|
-
),
|
|
1359
|
-
() => e.data ||
|
|
1360
|
-
[e.data,
|
|
1366
|
+
), H = o.useMemo(
|
|
1367
|
+
() => e.data || X,
|
|
1368
|
+
[e.data, X]
|
|
1361
1369
|
), ae = o.useMemo(
|
|
1362
|
-
() => x ||
|
|
1363
|
-
[x,
|
|
1370
|
+
() => x || q,
|
|
1371
|
+
[x, q]
|
|
1364
1372
|
), le = o.useMemo(
|
|
1365
|
-
() =>
|
|
1366
|
-
[
|
|
1367
|
-
),
|
|
1373
|
+
() => H.reduce(V, []),
|
|
1374
|
+
[H, V]
|
|
1375
|
+
), J = o.useCallback(
|
|
1368
1376
|
(m) => Me(p)(m),
|
|
1369
1377
|
[p]
|
|
1370
1378
|
), k = o.useCallback(
|
|
1371
|
-
(m) => Me(
|
|
1372
|
-
[
|
|
1379
|
+
(m) => Me(L)(m),
|
|
1380
|
+
[L]
|
|
1373
1381
|
), [fe, be] = Dt({ items: le }), re = Ae(e, t);
|
|
1374
|
-
return /* @__PURE__ */ o.createElement(Ze.Provider, { value: [ae,
|
|
1382
|
+
return /* @__PURE__ */ o.createElement(Ze.Provider, { value: [ae, G] }, /* @__PURE__ */ o.createElement(qe.Provider, { value: [fe, be] }, /* @__PURE__ */ o.createElement(Ge.Provider, { value: [H, ie] }, /* @__PURE__ */ o.createElement(
|
|
1375
1383
|
"div",
|
|
1376
1384
|
{
|
|
1377
1385
|
ref: i,
|
|
1378
1386
|
...re,
|
|
1379
|
-
role:
|
|
1387
|
+
role: C ? void 0 : "listbox",
|
|
1380
1388
|
id: u,
|
|
1381
1389
|
dir: a,
|
|
1382
1390
|
style: c,
|
|
1383
|
-
tabIndex: me(g,
|
|
1391
|
+
tabIndex: me(g, C, void 0),
|
|
1384
1392
|
className: f(
|
|
1385
1393
|
"k-chip-list",
|
|
1386
1394
|
{
|
|
1387
1395
|
"k-rtl": a === "rtl",
|
|
1388
|
-
"k-disabled":
|
|
1396
|
+
"k-disabled": C,
|
|
1389
1397
|
[`k-chip-list-${P.sizeMap[h] || h}`]: h
|
|
1390
1398
|
},
|
|
1391
1399
|
D
|
|
1392
1400
|
),
|
|
1393
|
-
"aria-label":
|
|
1401
|
+
"aria-label": N,
|
|
1394
1402
|
"aria-labelledby": w,
|
|
1395
|
-
"aria-describedby":
|
|
1403
|
+
"aria-describedby": S,
|
|
1396
1404
|
"aria-orientation": "horizontal",
|
|
1397
1405
|
"aria-multiselectable": B === "multiple"
|
|
1398
1406
|
},
|
|
1399
|
-
|
|
1400
|
-
|
|
1407
|
+
H.map((m, y) => /* @__PURE__ */ o.createElement(
|
|
1408
|
+
_,
|
|
1401
1409
|
{
|
|
1402
1410
|
role: "option",
|
|
1403
1411
|
dataItem: m,
|
|
1404
1412
|
size: h,
|
|
1405
|
-
key: [
|
|
1413
|
+
key: [J(m), y].join("-"),
|
|
1406
1414
|
text: k(m),
|
|
1407
|
-
value:
|
|
1415
|
+
value: J(m),
|
|
1408
1416
|
ariaLabel: m.ariaLabel,
|
|
1409
1417
|
svgIcon: m.svgIcon || void 0
|
|
1410
1418
|
}
|
|
@@ -1428,8 +1436,8 @@ const xt = (e, n, t) => {
|
|
|
1428
1436
|
ariaLabelledBy: s.string,
|
|
1429
1437
|
ariaDescribedBy: s.string,
|
|
1430
1438
|
size: s.oneOf([null, "small", "medium", "large"])
|
|
1431
|
-
},
|
|
1432
|
-
chip:
|
|
1439
|
+
}, j = {
|
|
1440
|
+
chip: Z,
|
|
1433
1441
|
size: "medium",
|
|
1434
1442
|
disabled: !1,
|
|
1435
1443
|
defaultValue: null,
|
|
@@ -1440,9 +1448,9 @@ const xt = (e, n, t) => {
|
|
|
1440
1448
|
valueField: "value",
|
|
1441
1449
|
removable: "removable"
|
|
1442
1450
|
};
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1451
|
+
Ne.displayName = "KendoReactChipList";
|
|
1452
|
+
Ne.propTypes = Et;
|
|
1453
|
+
Ne.defaultProps = j;
|
|
1446
1454
|
const Be = o.forwardRef((e, n) => {
|
|
1447
1455
|
const {
|
|
1448
1456
|
className: t,
|
|
@@ -1452,12 +1460,12 @@ const Be = o.forwardRef((e, n) => {
|
|
|
1452
1460
|
style: u,
|
|
1453
1461
|
id: c,
|
|
1454
1462
|
focused: g,
|
|
1455
|
-
tabIndex:
|
|
1463
|
+
tabIndex: C,
|
|
1456
1464
|
index: h,
|
|
1457
1465
|
dataItem: D,
|
|
1458
|
-
item:
|
|
1466
|
+
item: S,
|
|
1459
1467
|
svgIcon: w,
|
|
1460
|
-
onDown:
|
|
1468
|
+
onDown: N,
|
|
1461
1469
|
onClick: B,
|
|
1462
1470
|
...x
|
|
1463
1471
|
} = e, E = o.useRef(null), p = o.useCallback(
|
|
@@ -1465,14 +1473,14 @@ const Be = o.forwardRef((e, n) => {
|
|
|
1465
1473
|
E.current && E.current.focus();
|
|
1466
1474
|
},
|
|
1467
1475
|
[]
|
|
1468
|
-
),
|
|
1476
|
+
), L = o.useCallback(
|
|
1469
1477
|
() => ({
|
|
1470
1478
|
element: E.current,
|
|
1471
1479
|
focus: p
|
|
1472
1480
|
}),
|
|
1473
1481
|
[p]
|
|
1474
1482
|
);
|
|
1475
|
-
o.useImperativeHandle(n,
|
|
1483
|
+
o.useImperativeHandle(n, L);
|
|
1476
1484
|
const K = o.useCallback(
|
|
1477
1485
|
(A) => {
|
|
1478
1486
|
B && h !== void 0 && !i && B(A, h);
|
|
@@ -1488,7 +1496,7 @@ const Be = o.forwardRef((e, n) => {
|
|
|
1488
1496
|
t
|
|
1489
1497
|
),
|
|
1490
1498
|
[t, i, g]
|
|
1491
|
-
),
|
|
1499
|
+
), _ = S;
|
|
1492
1500
|
return /* @__PURE__ */ o.createElement(
|
|
1493
1501
|
"li",
|
|
1494
1502
|
{
|
|
@@ -1497,15 +1505,15 @@ const Be = o.forwardRef((e, n) => {
|
|
|
1497
1505
|
className: z,
|
|
1498
1506
|
style: u,
|
|
1499
1507
|
role: "menuitem",
|
|
1500
|
-
tabIndex: me(
|
|
1508
|
+
tabIndex: me(C, i),
|
|
1501
1509
|
"aria-disabled": i,
|
|
1502
1510
|
"aria-label": `${a || ""} floatingactionbutton item`,
|
|
1503
1511
|
onClick: K,
|
|
1504
|
-
onMouseDown:
|
|
1505
|
-
onPointerDown:
|
|
1512
|
+
onMouseDown: N,
|
|
1513
|
+
onPointerDown: N,
|
|
1506
1514
|
...x
|
|
1507
1515
|
},
|
|
1508
|
-
|
|
1516
|
+
_ ? /* @__PURE__ */ o.createElement(_, { itemIndex: h, item: D }) : /* @__PURE__ */ o.createElement(o.Fragment, null, a && /* @__PURE__ */ o.createElement("span", { className: "k-fab-item-text" }, a), l || w ? /* @__PURE__ */ o.createElement($, { className: "k-fab-item-icon", name: l, icon: w }) : null)
|
|
1509
1517
|
);
|
|
1510
1518
|
});
|
|
1511
1519
|
Be.propTypes = {
|
|
@@ -1522,10 +1530,10 @@ Be.propTypes = {
|
|
|
1522
1530
|
customProp: s.any
|
|
1523
1531
|
};
|
|
1524
1532
|
Be.displayName = "KendoFloatingActionButtonItem";
|
|
1525
|
-
const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e,
|
|
1533
|
+
const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, St = (e, n) => {
|
|
1526
1534
|
const t = { horizontal: n ? "right" : "left", vertical: "bottom" };
|
|
1527
1535
|
return e.horizontal === "end" && (t.horizontal = n ? "left" : "right"), t;
|
|
1528
|
-
},
|
|
1536
|
+
}, Nt = (e, n) => {
|
|
1529
1537
|
const t = { horizontal: n ? "right" : "left", vertical: "top" };
|
|
1530
1538
|
return e.horizontal === "end" && (t.horizontal = n ? "left" : "right"), t;
|
|
1531
1539
|
}, Bt = (e, n) => {
|
|
@@ -1537,8 +1545,8 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, n)
|
|
|
1537
1545
|
}, Ft = (e, n, t, i) => {
|
|
1538
1546
|
const a = n.horizontal, l = n.vertical;
|
|
1539
1547
|
if (e.current) {
|
|
1540
|
-
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,
|
|
1541
|
-
e.current.style.setProperty(zt(n, i), a === "center" ? c : u), e.current.style.setProperty(Pt(n), l === "middle" ?
|
|
1548
|
+
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, C = t && t.y !== void 0 ? `calc(50% + ${he(t.y)})` : "50%";
|
|
1549
|
+
e.current.style.setProperty(zt(n, i), a === "center" ? c : u), e.current.style.setProperty(Pt(n), l === "middle" ? C : 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"));
|
|
1542
1550
|
}
|
|
1543
1551
|
}, zt = (e, n) => {
|
|
1544
1552
|
const { horizontal: t } = e;
|
|
@@ -1554,36 +1562,36 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, n)
|
|
|
1554
1562
|
})[e.vertical || "bottom"], Mt = 2, Rt = 100, Ve = o.forwardRef((e, n) => {
|
|
1555
1563
|
R(O);
|
|
1556
1564
|
const {
|
|
1557
|
-
align: t =
|
|
1565
|
+
align: t = ee.align,
|
|
1558
1566
|
alignOffset: i,
|
|
1559
1567
|
className: a,
|
|
1560
1568
|
disabled: l,
|
|
1561
1569
|
icon: u,
|
|
1562
1570
|
svgIcon: c,
|
|
1563
1571
|
iconClass: g,
|
|
1564
|
-
id:
|
|
1572
|
+
id: C,
|
|
1565
1573
|
items: h,
|
|
1566
1574
|
item: D,
|
|
1567
|
-
text:
|
|
1568
|
-
positionMode: w =
|
|
1569
|
-
size:
|
|
1575
|
+
text: S,
|
|
1576
|
+
positionMode: w = ee.positionMode,
|
|
1577
|
+
size: N = ee.size,
|
|
1570
1578
|
style: B,
|
|
1571
|
-
rounded: x =
|
|
1572
|
-
themeColor: E =
|
|
1579
|
+
rounded: x = ee.rounded,
|
|
1580
|
+
themeColor: E = ee.themeColor,
|
|
1573
1581
|
overlayStyle: p,
|
|
1574
|
-
tabIndex:
|
|
1582
|
+
tabIndex: L,
|
|
1575
1583
|
accessKey: K,
|
|
1576
1584
|
popupSettings: z = {},
|
|
1577
|
-
modal:
|
|
1585
|
+
modal: _,
|
|
1578
1586
|
onClick: A,
|
|
1579
|
-
onItemClick:
|
|
1580
|
-
onFocus:
|
|
1587
|
+
onItemClick: q,
|
|
1588
|
+
onFocus: G,
|
|
1581
1589
|
onBlur: oe,
|
|
1582
|
-
onKeyDown:
|
|
1590
|
+
onKeyDown: X,
|
|
1583
1591
|
onOpen: ie,
|
|
1584
|
-
onClose:
|
|
1585
|
-
...
|
|
1586
|
-
} = e, ae = rt(), le = ae ? ae + Mt : Rt,
|
|
1592
|
+
onClose: V,
|
|
1593
|
+
...H
|
|
1594
|
+
} = e, ae = rt(), le = ae ? ae + Mt : Rt, J = o.useRef(null), k = o.useRef(null), fe = o.useRef(null), be = o.useRef(null), re = o.useCallback(
|
|
1587
1595
|
() => {
|
|
1588
1596
|
k.current && k.current.focus();
|
|
1589
1597
|
},
|
|
@@ -1595,29 +1603,29 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, n)
|
|
|
1595
1603
|
}),
|
|
1596
1604
|
[re]
|
|
1597
1605
|
);
|
|
1598
|
-
o.useImperativeHandle(
|
|
1599
|
-
const [y, F] = o.useState(!1), [ce,
|
|
1606
|
+
o.useImperativeHandle(J, m), o.useImperativeHandle(n, () => J.current);
|
|
1607
|
+
const [y, F] = o.useState(!1), [ce, U] = o.useState(!1), [Q, v] = o.useState(-1), Je = Re() + "-button-id", ge = xe(k, e.dir), Y = ge === "rtl", de = Re() + "-list-id";
|
|
1600
1608
|
o.useEffect(
|
|
1601
1609
|
() => {
|
|
1602
|
-
Ft(k, t, i,
|
|
1610
|
+
Ft(k, t, i, Y);
|
|
1603
1611
|
},
|
|
1604
|
-
[k, t, i,
|
|
1612
|
+
[k, t, i, Y]
|
|
1605
1613
|
), o.useEffect(
|
|
1606
1614
|
() => {
|
|
1607
1615
|
ce && k && k.current && k.current.focus();
|
|
1608
1616
|
},
|
|
1609
1617
|
[ce, k]
|
|
1610
1618
|
);
|
|
1611
|
-
const
|
|
1619
|
+
const W = o.useCallback(
|
|
1612
1620
|
(d, b) => {
|
|
1613
1621
|
h && I(
|
|
1614
|
-
b ? ie :
|
|
1622
|
+
b ? ie : V,
|
|
1615
1623
|
d,
|
|
1616
1624
|
m(),
|
|
1617
1625
|
void 0
|
|
1618
1626
|
);
|
|
1619
1627
|
},
|
|
1620
|
-
[ie,
|
|
1628
|
+
[ie, V, h]
|
|
1621
1629
|
), Fe = o.useCallback(
|
|
1622
1630
|
(d) => {
|
|
1623
1631
|
!d.target || l || (!h && A ? I(
|
|
@@ -1625,38 +1633,38 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, n)
|
|
|
1625
1633
|
d,
|
|
1626
1634
|
m(),
|
|
1627
1635
|
void 0
|
|
1628
|
-
) : (F(!y),
|
|
1636
|
+
) : (F(!y), U(!0), v(y ? -1 : 0), W(d, !y)));
|
|
1629
1637
|
},
|
|
1630
1638
|
[
|
|
1631
1639
|
F,
|
|
1632
|
-
H,
|
|
1633
|
-
C,
|
|
1634
|
-
A,
|
|
1635
1640
|
U,
|
|
1641
|
+
v,
|
|
1642
|
+
A,
|
|
1643
|
+
W,
|
|
1636
1644
|
y,
|
|
1637
1645
|
h,
|
|
1638
1646
|
l
|
|
1639
1647
|
]
|
|
1640
1648
|
), Qe = o.useCallback(
|
|
1641
1649
|
(d) => {
|
|
1642
|
-
|
|
1643
|
-
|
|
1650
|
+
U(!0), v(y ? 0 : -1), G && I(
|
|
1651
|
+
G,
|
|
1644
1652
|
d,
|
|
1645
1653
|
m(),
|
|
1646
1654
|
void 0
|
|
1647
1655
|
);
|
|
1648
1656
|
},
|
|
1649
|
-
[
|
|
1657
|
+
[G, U, v]
|
|
1650
1658
|
), Ye = o.useCallback(
|
|
1651
1659
|
(d) => {
|
|
1652
|
-
|
|
1660
|
+
U(!1), F(!1), v(-1), I(
|
|
1653
1661
|
oe,
|
|
1654
1662
|
d,
|
|
1655
1663
|
m(),
|
|
1656
1664
|
void 0
|
|
1657
|
-
), y &&
|
|
1665
|
+
), y && W(d, !1);
|
|
1658
1666
|
},
|
|
1659
|
-
[oe,
|
|
1667
|
+
[oe, U, F, v, W]
|
|
1660
1668
|
), et = o.useCallback(
|
|
1661
1669
|
(d) => {
|
|
1662
1670
|
d.preventDefault();
|
|
@@ -1665,7 +1673,7 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, n)
|
|
|
1665
1673
|
), ye = o.useCallback(
|
|
1666
1674
|
(d, b) => {
|
|
1667
1675
|
h && (h[b].disabled || I(
|
|
1668
|
-
|
|
1676
|
+
q,
|
|
1669
1677
|
d,
|
|
1670
1678
|
m(),
|
|
1671
1679
|
{
|
|
@@ -1674,62 +1682,62 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, n)
|
|
|
1674
1682
|
}
|
|
1675
1683
|
));
|
|
1676
1684
|
},
|
|
1677
|
-
[
|
|
1685
|
+
[q]
|
|
1678
1686
|
), tt = o.useCallback(
|
|
1679
1687
|
(d, b) => {
|
|
1680
|
-
!d.target || !h || (
|
|
1688
|
+
!d.target || !h || (v(b), F(!1), ye(d, b), W(d, !1));
|
|
1681
1689
|
},
|
|
1682
|
-
[
|
|
1690
|
+
[v, F, ye, W]
|
|
1683
1691
|
), st = o.useCallback(
|
|
1684
1692
|
(d) => {
|
|
1685
|
-
|
|
1693
|
+
T(document) === k.current && d.preventDefault();
|
|
1686
1694
|
},
|
|
1687
1695
|
[k]
|
|
1688
1696
|
), nt = o.useCallback(
|
|
1689
1697
|
(d) => {
|
|
1690
|
-
const b =
|
|
1698
|
+
const b = Q, ke = h ? h.length : -1;
|
|
1691
1699
|
if (d.altKey) {
|
|
1692
|
-
!y && d.keyCode === r.down && (d.preventDefault(), F(!0),
|
|
1700
|
+
!y && d.keyCode === r.down && (d.preventDefault(), F(!0), v(0)), y && d.keyCode === r.up && (d.preventDefault(), F(!1), v(-1));
|
|
1693
1701
|
return;
|
|
1694
1702
|
}
|
|
1695
1703
|
switch (d.keyCode) {
|
|
1696
1704
|
case r.enter:
|
|
1697
1705
|
case r.space:
|
|
1698
|
-
b >= 0 && ye(d, b), h || Fe(d), d.preventDefault(), F(!y),
|
|
1706
|
+
b >= 0 && ye(d, b), h || Fe(d), d.preventDefault(), F(!y), v(y ? -1 : 0);
|
|
1699
1707
|
break;
|
|
1700
1708
|
case r.esc:
|
|
1701
|
-
d.preventDefault(), F(!1),
|
|
1709
|
+
d.preventDefault(), F(!1), v(-1);
|
|
1702
1710
|
break;
|
|
1703
1711
|
case r.home:
|
|
1704
|
-
d.preventDefault(),
|
|
1712
|
+
d.preventDefault(), v(0);
|
|
1705
1713
|
break;
|
|
1706
1714
|
case r.end:
|
|
1707
|
-
d.preventDefault(),
|
|
1715
|
+
d.preventDefault(), v(ke - 1);
|
|
1708
1716
|
break;
|
|
1709
1717
|
case r.down:
|
|
1710
1718
|
case r.right:
|
|
1711
|
-
d.preventDefault(),
|
|
1719
|
+
d.preventDefault(), v(b + 1 >= ke ? 0 : b + 1);
|
|
1712
1720
|
break;
|
|
1713
1721
|
case r.up:
|
|
1714
1722
|
case r.left:
|
|
1715
|
-
d.preventDefault(),
|
|
1723
|
+
d.preventDefault(), v(b - 1 < 0 ? ke - 1 : b - 1);
|
|
1716
1724
|
break;
|
|
1717
1725
|
}
|
|
1718
1726
|
I(
|
|
1719
|
-
|
|
1727
|
+
X,
|
|
1720
1728
|
d,
|
|
1721
1729
|
m(),
|
|
1722
1730
|
void 0
|
|
1723
1731
|
);
|
|
1724
1732
|
},
|
|
1725
|
-
[
|
|
1733
|
+
[X, Q, v, Y, F]
|
|
1726
1734
|
), ot = o.useMemo(
|
|
1727
1735
|
() => f(
|
|
1728
1736
|
"k-fab k-fab-solid",
|
|
1729
1737
|
{
|
|
1730
|
-
"k-fab-sm":
|
|
1731
|
-
"k-fab-md":
|
|
1732
|
-
"k-fab-lg":
|
|
1738
|
+
"k-fab-sm": N === "small",
|
|
1739
|
+
"k-fab-md": N === "medium",
|
|
1740
|
+
"k-fab-lg": N === "large",
|
|
1733
1741
|
"k-disabled": l,
|
|
1734
1742
|
"k-pos-absolute": w === "absolute",
|
|
1735
1743
|
"k-pos-fixed": w === "fixed",
|
|
@@ -1740,7 +1748,7 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, n)
|
|
|
1740
1748
|
`k-${t.vertical}-${t.horizontal}`,
|
|
1741
1749
|
a
|
|
1742
1750
|
),
|
|
1743
|
-
[E,
|
|
1751
|
+
[E, N, x, l, w, t, ce, a]
|
|
1744
1752
|
), it = h && h.map((d, b) => /* @__PURE__ */ o.createElement(
|
|
1745
1753
|
Be,
|
|
1746
1754
|
{
|
|
@@ -1749,7 +1757,7 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, n)
|
|
|
1749
1757
|
index: b,
|
|
1750
1758
|
id: `${de}-${b}`,
|
|
1751
1759
|
disabled: l || d.disabled,
|
|
1752
|
-
focused:
|
|
1760
|
+
focused: Q === b,
|
|
1753
1761
|
dataItem: d,
|
|
1754
1762
|
item: D,
|
|
1755
1763
|
className: f(
|
|
@@ -1759,21 +1767,21 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, n)
|
|
|
1759
1767
|
onClick: tt,
|
|
1760
1768
|
onDown: st
|
|
1761
1769
|
}
|
|
1762
|
-
)), ze = !!((u || c) && !
|
|
1770
|
+
)), ze = !!((u || c) && !S), at = k.current ? k.current.offsetWidth : 0, lt = 32, Pe = at / 2 - lt / 2;
|
|
1763
1771
|
return /* @__PURE__ */ o.createElement(ct.Provider, { value: le }, /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(
|
|
1764
1772
|
"button",
|
|
1765
1773
|
{
|
|
1766
1774
|
ref: k,
|
|
1767
|
-
id:
|
|
1775
|
+
id: C || Je,
|
|
1768
1776
|
role: "button",
|
|
1769
1777
|
type: "button",
|
|
1770
1778
|
"aria-disabled": l,
|
|
1771
1779
|
"aria-expanded": h ? y : void 0,
|
|
1772
1780
|
"aria-haspopup": !!h,
|
|
1773
|
-
"aria-label": `${
|
|
1781
|
+
"aria-label": `${S || ""} floatingactionbutton`,
|
|
1774
1782
|
"aria-owns": h ? de : void 0,
|
|
1775
|
-
"aria-activedescendant":
|
|
1776
|
-
tabIndex: me(
|
|
1783
|
+
"aria-activedescendant": Q >= 0 && h ? `${de}-${Q}` : void 0,
|
|
1784
|
+
tabIndex: me(L, l),
|
|
1777
1785
|
accessKey: K,
|
|
1778
1786
|
dir: ge,
|
|
1779
1787
|
disabled: l,
|
|
@@ -1784,11 +1792,11 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, n)
|
|
|
1784
1792
|
onFocus: Qe,
|
|
1785
1793
|
onBlur: Ye,
|
|
1786
1794
|
onKeyDown: nt,
|
|
1787
|
-
...
|
|
1795
|
+
...H
|
|
1788
1796
|
},
|
|
1789
1797
|
u || c ? /* @__PURE__ */ o.createElement($, { className: "k-fab-icon", name: u, icon: c }) : g ? /* @__PURE__ */ o.createElement("span", { role: "presentation", className: g }) : null,
|
|
1790
|
-
|
|
1791
|
-
),
|
|
1798
|
+
S && /* @__PURE__ */ o.createElement("span", { className: "k-fab-text" }, S)
|
|
1799
|
+
), _ && y && /* @__PURE__ */ o.createElement(
|
|
1792
1800
|
"div",
|
|
1793
1801
|
{
|
|
1794
1802
|
className: "k-overlay",
|
|
@@ -1805,8 +1813,8 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, n)
|
|
|
1805
1813
|
show: y,
|
|
1806
1814
|
animate: z.animate,
|
|
1807
1815
|
popupClass: f("k-popup-transparent k-fab-popup", z.popupClass),
|
|
1808
|
-
anchorAlign: z.anchorAlign ||
|
|
1809
|
-
popupAlign: z.popupAlign ||
|
|
1816
|
+
anchorAlign: z.anchorAlign || St(t, Y),
|
|
1817
|
+
popupAlign: z.popupAlign || Nt(t, Y),
|
|
1810
1818
|
style: { boxShadow: "none" }
|
|
1811
1819
|
},
|
|
1812
1820
|
/* @__PURE__ */ o.createElement(
|
|
@@ -1814,7 +1822,7 @@ const Ke = "16px", he = (e) => typeof e == "number" ? e + "px" : e, Nt = (e, n)
|
|
|
1814
1822
|
{
|
|
1815
1823
|
ref: fe,
|
|
1816
1824
|
role: "menu",
|
|
1817
|
-
"aria-labelledby":
|
|
1825
|
+
"aria-labelledby": C,
|
|
1818
1826
|
id: de,
|
|
1819
1827
|
className: f("k-fab-items", {
|
|
1820
1828
|
"k-fab-items-bottom": t.vertical !== "bottom",
|
|
@@ -1868,7 +1876,7 @@ Ve.propTypes = {
|
|
|
1868
1876
|
modal: s.bool,
|
|
1869
1877
|
overlayStyle: s.object
|
|
1870
1878
|
};
|
|
1871
|
-
const
|
|
1879
|
+
const ee = {
|
|
1872
1880
|
align: { vertical: "bottom", horizontal: "end" },
|
|
1873
1881
|
size: "medium",
|
|
1874
1882
|
rounded: "full",
|
|
@@ -1876,17 +1884,17 @@ const Y = {
|
|
|
1876
1884
|
positionMode: "fixed"
|
|
1877
1885
|
};
|
|
1878
1886
|
Ve.displayName = "KendoFloatingActionButton";
|
|
1879
|
-
const Ot = $e(
|
|
1887
|
+
const Ot = $e(Se);
|
|
1880
1888
|
Ot.displayName = "KendoReactDropDownButton";
|
|
1881
1889
|
const Kt = $e(Ee);
|
|
1882
1890
|
Kt.displayName = "KendoReactSplitButton";
|
|
1883
1891
|
export {
|
|
1884
1892
|
ne as Button,
|
|
1885
1893
|
bt as ButtonGroup,
|
|
1886
|
-
|
|
1887
|
-
|
|
1894
|
+
Z as Chip,
|
|
1895
|
+
Ne as ChipList,
|
|
1888
1896
|
Ot as DropDownButton,
|
|
1889
|
-
|
|
1897
|
+
Se as DropDownButtonClassComponent,
|
|
1890
1898
|
Ue as DropDownButtonItem,
|
|
1891
1899
|
Ve as FloatingActionButton,
|
|
1892
1900
|
Be as FloatingActionButtonItem,
|