@progress/kendo-react-inputs 14.5.0-develop.13 → 14.5.0-develop.14
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/MaskedTextBoxMcpWrapper.d.ts +17 -0
- package/MaskedTextBoxMcpWrapper.js +8 -0
- package/MaskedTextBoxMcpWrapper.mjs +18 -0
- package/colors/ColorPicker.js +1 -1
- package/colors/ColorPicker.mjs +194 -183
- package/colors/interfaces/ColorPickerProps.d.ts +6 -1
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/index.d.mts +5 -1
- package/index.d.ts +5 -1
- package/index.js +1 -1
- package/index.mjs +92 -89
- package/maskedtextbox/MaskedTextBoxProps.d.ts +6 -1
- package/numerictextbox/NumericTextBox.js +1 -1
- package/numerictextbox/NumericTextBox.mjs +170 -168
- package/numerictextbox/interfaces/NumericTextBoxProps.d.ts +6 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +10 -10
- package/range-slider/RangeSlider.d.ts +6 -1
- package/range-slider/RangeSlider.js +2 -2
- package/range-slider/RangeSlider.mjs +43 -43
- package/rating/Rating.d.ts +6 -1
- package/rating/Rating.js +2 -2
- package/rating/Rating.mjs +62 -62
- package/signature/Signature.js +1 -1
- package/signature/Signature.mjs +94 -92
- package/signature/interfaces/SignatureProps.d.ts +6 -1
- package/slider/Slider.d.ts +6 -1
- package/slider/Slider.js +1 -1
- package/slider/Slider.mjs +131 -134
- package/switch/Switch.d.ts +6 -1
- package/switch/Switch.js +1 -1
- package/switch/Switch.mjs +88 -86
- package/textarea/TextArea.js +1 -1
- package/textarea/TextArea.mjs +97 -95
- package/textarea/interfaces/TextAreaProps.d.ts +6 -1
- package/textbox/Textbox.d.ts +20 -1
- package/textbox/Textbox.js +1 -1
- package/textbox/Textbox.mjs +92 -81
package/colors/ColorPicker.mjs
CHANGED
|
@@ -7,302 +7,313 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as t from "react";
|
|
9
9
|
import o from "prop-types";
|
|
10
|
-
import { validatePackage as $e, getLicenseMessage as Ge, usePropsContext as
|
|
11
|
-
import { packageMetadata as
|
|
12
|
-
import { Picker as
|
|
13
|
-
import { ColorGradient as
|
|
14
|
-
import { DEFAULT_TILE_SIZE as
|
|
15
|
-
import { FlatColorPicker as
|
|
16
|
-
import { Button as
|
|
17
|
-
import { chevronDownIcon as
|
|
18
|
-
import { colorPickerAdaptiveTitle as
|
|
19
|
-
import { useLocalization as
|
|
20
|
-
import { AdaptiveMode as
|
|
21
|
-
import { ActionSheetContent as
|
|
22
|
-
const
|
|
10
|
+
import { validatePackage as $e, getLicenseMessage as Ge, usePropsContext as Ze, useAdaptiveModeContext as je, useWebMcpRegister as qe, canUseDOM as Je, Navigation as Qe, getActiveElement as Xe, keepFocusInContainer as L, focusFirstFocusableChild as ve, WatermarkOverlay as Ye, useDir as et, getTabIndex as tt, classNames as q, kendoThemeMaps as ge, IconWrap as nt, createPropsContext as at, svgIconPropType as ot } from "@progress/kendo-react-common";
|
|
11
|
+
import { packageMetadata as ke } from "../package-metadata.mjs";
|
|
12
|
+
import { Picker as rt } from "./Picker.mjs";
|
|
13
|
+
import { ColorGradient as lt } from "./ColorGradient.mjs";
|
|
14
|
+
import { DEFAULT_TILE_SIZE as it, DEFAULT_PRESET as st, ColorPalette as ct } from "./ColorPalette.mjs";
|
|
15
|
+
import { FlatColorPicker as D } from "./FlatColorPicker.mjs";
|
|
16
|
+
import { Button as ut } from "@progress/kendo-react-buttons";
|
|
17
|
+
import { chevronDownIcon as dt } from "@progress/kendo-svg-icons";
|
|
18
|
+
import { colorPickerAdaptiveTitle as Ee, messages as x, flatColorPickerApplyBtn as Ce, flatColorPickerCancelBtn as be, colorPickerDropdownButtonAriaLabel as we } from "../messages/index.mjs";
|
|
19
|
+
import { useLocalization as pt } from "@progress/kendo-react-intl";
|
|
20
|
+
import { AdaptiveMode as ft } from "../common/AdaptiveMode.mjs";
|
|
21
|
+
import { ActionSheetContent as mt } from "@progress/kendo-react-layout";
|
|
22
|
+
const vt = {
|
|
23
23
|
opacity: !0
|
|
24
|
-
},
|
|
25
|
-
palette:
|
|
26
|
-
tileSize:
|
|
27
|
-
},
|
|
28
|
-
var
|
|
29
|
-
const
|
|
30
|
-
size: u =
|
|
31
|
-
rounded: v =
|
|
32
|
-
fillMode:
|
|
33
|
-
gradientSettings:
|
|
34
|
-
paletteSettings: h =
|
|
24
|
+
}, gt = {
|
|
25
|
+
palette: st,
|
|
26
|
+
tileSize: it
|
|
27
|
+
}, J = (N) => N !== void 0, kt = at(), Se = t.forwardRef((N, he) => {
|
|
28
|
+
var ce, ue;
|
|
29
|
+
const ye = !$e(ke, { component: "ColorPicker" }), _e = Ge(ke), r = Ze(kt, N), S = pt(), Q = je(), {
|
|
30
|
+
size: u = E.size,
|
|
31
|
+
rounded: v = E.rounded,
|
|
32
|
+
fillMode: O = E.fillMode,
|
|
33
|
+
gradientSettings: C = E.gradientSettings,
|
|
34
|
+
paletteSettings: h = E.paletteSettings,
|
|
35
35
|
flatColorPickerSettings: y,
|
|
36
|
-
view: d = r.views ? void 0 :
|
|
37
|
-
views:
|
|
38
|
-
activeView:
|
|
36
|
+
view: d = r.views ? void 0 : E.view,
|
|
37
|
+
views: c = d ? void 0 : E.views,
|
|
38
|
+
activeView: X,
|
|
39
39
|
popupSettings: g,
|
|
40
|
-
valid:
|
|
41
|
-
disabled:
|
|
42
|
-
tabIndex:
|
|
43
|
-
icon:
|
|
44
|
-
svgIcon:
|
|
40
|
+
valid: Te,
|
|
41
|
+
disabled: F,
|
|
42
|
+
tabIndex: Pe,
|
|
43
|
+
icon: V,
|
|
44
|
+
svgIcon: H,
|
|
45
45
|
iconClassName: P,
|
|
46
|
-
onChange:
|
|
47
|
-
onFocus:
|
|
46
|
+
onChange: W,
|
|
47
|
+
onFocus: M,
|
|
48
48
|
onBlur: U,
|
|
49
49
|
onActiveColorClick: K,
|
|
50
|
-
className:
|
|
51
|
-
adaptive:
|
|
52
|
-
adaptiveTitle:
|
|
53
|
-
adaptiveSubtitle:
|
|
50
|
+
className: Re,
|
|
51
|
+
adaptive: Ae,
|
|
52
|
+
adaptiveTitle: Y = S.toLanguageString(Ee, x[Ee]),
|
|
53
|
+
adaptiveSubtitle: ee,
|
|
54
54
|
showButtons: b = !0
|
|
55
|
-
} = r,
|
|
56
|
-
|
|
55
|
+
} = r, i = t.useRef(null), _ = t.useRef(null), R = t.useRef(null), m = t.useRef(null), w = t.useRef(void 0), te = t.useRef(null), [Ie, ne] = t.useState(!1), [Be, ze] = t.useState(r.defaultValue || void 0), [Le, De] = t.useState(!1), [A, xe] = t.useState(), $ = J(r.value), k = J(r.open), l = $ ? r.value : Be, p = k ? r.open : Le, ae = t.useRef(l), I = t.useCallback(() => {
|
|
56
|
+
i.current && i.current.focus();
|
|
57
57
|
}, []);
|
|
58
58
|
t.useImperativeHandle(
|
|
59
|
-
|
|
59
|
+
he,
|
|
60
60
|
() => ({
|
|
61
61
|
// we agreed that each element will have focus method exposed
|
|
62
|
-
element:
|
|
63
|
-
actionElement:
|
|
64
|
-
value:
|
|
65
|
-
focus:
|
|
62
|
+
element: i.current,
|
|
63
|
+
actionElement: te.current,
|
|
64
|
+
value: l,
|
|
65
|
+
focus: I
|
|
66
66
|
}),
|
|
67
|
-
[
|
|
67
|
+
[l, I]
|
|
68
68
|
);
|
|
69
|
-
const
|
|
69
|
+
const oe = t.useRef(null);
|
|
70
|
+
t.useImperativeHandle(
|
|
71
|
+
oe,
|
|
72
|
+
() => ({
|
|
73
|
+
element: i.current,
|
|
74
|
+
actionElement: te.current,
|
|
75
|
+
value: l,
|
|
76
|
+
focus: I
|
|
77
|
+
}),
|
|
78
|
+
[l, I]
|
|
79
|
+
), qe("colorpicker", oe, r, r.webMcp);
|
|
80
|
+
const G = !!(A && Q && A <= Q.medium && Ae);
|
|
70
81
|
t.useEffect(() => {
|
|
71
|
-
const e =
|
|
82
|
+
const e = Je && window.ResizeObserver && new window.ResizeObserver(Ue.bind(void 0));
|
|
72
83
|
return document != null && document.body && e && e.observe(document.body), () => {
|
|
73
84
|
document != null && document.body && e && e.disconnect();
|
|
74
85
|
};
|
|
75
86
|
}, []);
|
|
76
87
|
const a = t.useCallback(
|
|
77
|
-
(e,
|
|
78
|
-
k || (!e && !
|
|
88
|
+
(e, s) => {
|
|
89
|
+
k || (!e && !s && i && i.current && i.current.focus(), De(e));
|
|
79
90
|
},
|
|
80
91
|
[k]
|
|
81
|
-
),
|
|
82
|
-
root:
|
|
92
|
+
), re = t.useMemo(() => new Qe({
|
|
93
|
+
root: i,
|
|
83
94
|
selectors: [".k-colorpicker", ".k-color-picker-popup"],
|
|
84
95
|
tabIndex: 0,
|
|
85
96
|
keyboardEvents: {
|
|
86
97
|
keydown: {
|
|
87
|
-
Escape: (e,
|
|
98
|
+
Escape: (e, s, n) => {
|
|
88
99
|
a(!1);
|
|
89
100
|
},
|
|
90
|
-
Enter: (e,
|
|
91
|
-
!k && e ===
|
|
101
|
+
Enter: (e, s, n) => {
|
|
102
|
+
!k && e === i.current && (n.preventDefault(), n.stopPropagation(), a(!0));
|
|
92
103
|
},
|
|
93
|
-
ArrowDown: (e,
|
|
104
|
+
ArrowDown: (e, s, n) => {
|
|
94
105
|
n.altKey && (n.preventDefault(), n.stopPropagation(), a(!0));
|
|
95
106
|
},
|
|
96
|
-
ArrowUp: (e,
|
|
107
|
+
ArrowUp: (e, s, n) => {
|
|
97
108
|
n.altKey && (n.preventDefault(), n.stopPropagation(), a(!1));
|
|
98
109
|
},
|
|
99
|
-
Tab: (e,
|
|
100
|
-
var T,
|
|
101
|
-
if (
|
|
102
|
-
const
|
|
103
|
-
d === "palette" &&
|
|
110
|
+
Tab: (e, s, n) => {
|
|
111
|
+
var T, de, pe;
|
|
112
|
+
if (Xe(document) !== i.current) {
|
|
113
|
+
const fe = (T = R.current) == null ? void 0 : T.wrapperRef.current, z = (de = _.current) == null ? void 0 : de.wrapperRef.current, me = (pe = m.current) == null ? void 0 : pe.element;
|
|
114
|
+
d === "palette" && fe ? L(n, fe) : d === "gradient" && z ? L(n, z) : d === "combo" && z ? L(n, z.parentElement) : c && me && L(n, me);
|
|
104
115
|
}
|
|
105
116
|
}
|
|
106
117
|
}
|
|
107
118
|
}
|
|
108
|
-
}), [a, k]),
|
|
109
|
-
k || (_.current && _.current.wrapperRef.current ?
|
|
110
|
-
}, [k]),
|
|
119
|
+
}), [a, k]), Ne = t.useCallback(re.triggerKeyboardEvent.bind(re), []), Oe = t.useCallback(() => {
|
|
120
|
+
k || (_.current && _.current.wrapperRef.current ? ve(_.current.wrapperRef.current) : R.current ? R.current.focus() : m.current && m.current.element && ve(m.current.element));
|
|
121
|
+
}, [k]), B = (e) => ae.current = e, le = t.useCallback(
|
|
111
122
|
(e) => {
|
|
112
|
-
const
|
|
113
|
-
value:
|
|
123
|
+
const s = {
|
|
124
|
+
value: ae.current,
|
|
114
125
|
nativeEvent: e.nativeEvent,
|
|
115
126
|
syntheticEvent: e
|
|
116
127
|
};
|
|
117
|
-
f(
|
|
128
|
+
f(s), a(!p, !0);
|
|
118
129
|
},
|
|
119
130
|
[p]
|
|
120
|
-
),
|
|
131
|
+
), Z = t.useCallback(() => {
|
|
121
132
|
a(!1, !0);
|
|
122
|
-
}, [a]),
|
|
133
|
+
}, [a]), Fe = t.useCallback(
|
|
123
134
|
(e) => {
|
|
124
135
|
K && K.call(void 0, {
|
|
125
136
|
syntheticEvent: e,
|
|
126
137
|
nativeEvent: e.nativeEvent,
|
|
127
|
-
value:
|
|
138
|
+
value: l,
|
|
128
139
|
target: {
|
|
129
|
-
element:
|
|
130
|
-
value:
|
|
140
|
+
element: i.current,
|
|
141
|
+
value: l
|
|
131
142
|
}
|
|
132
143
|
});
|
|
133
144
|
},
|
|
134
|
-
[K,
|
|
135
|
-
),
|
|
145
|
+
[K, l]
|
|
146
|
+
), Ve = t.useCallback(
|
|
136
147
|
(e) => {
|
|
137
|
-
w.current ? (clearTimeout(w.current), w.current = void 0) : (
|
|
148
|
+
w.current ? (clearTimeout(w.current), w.current = void 0) : (ne(!0), G && !p && a(!0)), M && M.call(void 0, {
|
|
138
149
|
nativeEvent: e.nativeEvent,
|
|
139
150
|
syntheticEvent: e
|
|
140
151
|
});
|
|
141
152
|
},
|
|
142
|
-
[G,
|
|
143
|
-
),
|
|
144
|
-
a(!1, !0),
|
|
145
|
-
}, []),
|
|
153
|
+
[G, M, p, a]
|
|
154
|
+
), He = t.useCallback(() => {
|
|
155
|
+
a(!1, !0), ne(!1), w.current = void 0;
|
|
156
|
+
}, []), We = t.useCallback(
|
|
146
157
|
(e) => {
|
|
147
|
-
clearTimeout(w.current), w.current = window.setTimeout(
|
|
158
|
+
clearTimeout(w.current), w.current = window.setTimeout(He), U && U.call(void 0, {
|
|
148
159
|
nativeEvent: e.nativeEvent,
|
|
149
160
|
syntheticEvent: e
|
|
150
161
|
});
|
|
151
162
|
},
|
|
152
163
|
[U]
|
|
153
164
|
), f = t.useCallback(
|
|
154
|
-
(e,
|
|
165
|
+
(e, s) => {
|
|
155
166
|
var T;
|
|
156
|
-
const n =
|
|
157
|
-
$ ||
|
|
167
|
+
const n = s ? e.rgbaValue || "" : (T = e.value) != null ? T : "";
|
|
168
|
+
$ || ze(n), W && W.call(void 0, {
|
|
158
169
|
value: n,
|
|
159
170
|
nativeEvent: e.nativeEvent,
|
|
160
171
|
syntheticEvent: e.syntheticEvent,
|
|
161
172
|
target: {
|
|
162
|
-
element:
|
|
173
|
+
element: i.current,
|
|
163
174
|
value: n
|
|
164
175
|
}
|
|
165
176
|
}), a(!1);
|
|
166
177
|
},
|
|
167
|
-
[$,
|
|
168
|
-
),
|
|
178
|
+
[$, W]
|
|
179
|
+
), ie = t.useCallback(
|
|
169
180
|
(e) => f(e, !0),
|
|
170
|
-
[
|
|
171
|
-
),
|
|
181
|
+
[J, f]
|
|
182
|
+
), j = t.useCallback(
|
|
172
183
|
(e) => /* @__PURE__ */ t.createElement(t.Fragment, null, (d === "combo" || d === "gradient") && /* @__PURE__ */ t.createElement(
|
|
173
|
-
|
|
184
|
+
lt,
|
|
174
185
|
{
|
|
175
|
-
...
|
|
186
|
+
...C,
|
|
176
187
|
_adaptive: e,
|
|
177
188
|
ref: _,
|
|
178
189
|
isInsidePopup: !0,
|
|
179
190
|
size: e ? "large" : u,
|
|
180
|
-
value:
|
|
191
|
+
value: l,
|
|
181
192
|
onChange: f
|
|
182
193
|
}
|
|
183
194
|
), (d === "combo" || d === "palette") && /* @__PURE__ */ t.createElement(
|
|
184
|
-
|
|
195
|
+
ct,
|
|
185
196
|
{
|
|
186
197
|
...h,
|
|
187
198
|
ref: R,
|
|
188
199
|
size: e ? "large" : u,
|
|
189
|
-
value:
|
|
190
|
-
onChange:
|
|
200
|
+
value: l,
|
|
201
|
+
onChange: ie
|
|
191
202
|
}
|
|
192
|
-
),
|
|
193
|
-
|
|
203
|
+
), c && c[0] === "gradient" && c[1] === "palette" && /* @__PURE__ */ t.createElement(
|
|
204
|
+
D,
|
|
194
205
|
{
|
|
195
206
|
...y,
|
|
196
207
|
_paletteSettings: h,
|
|
197
|
-
_gradientSettings: { _adaptive: e, ...
|
|
208
|
+
_gradientSettings: { _adaptive: e, ...C },
|
|
198
209
|
ref: m,
|
|
199
210
|
size: e ? "large" : u,
|
|
200
211
|
rounded: v,
|
|
201
212
|
views: ["gradient", "palette"],
|
|
202
|
-
activeView:
|
|
213
|
+
activeView: X,
|
|
203
214
|
setOpen: a,
|
|
204
215
|
showButtons: e ? !1 : b,
|
|
205
|
-
value:
|
|
216
|
+
value: l,
|
|
206
217
|
onChange: f,
|
|
207
|
-
setAdaptiveModeValue:
|
|
218
|
+
setAdaptiveModeValue: B
|
|
208
219
|
}
|
|
209
|
-
),
|
|
210
|
-
|
|
220
|
+
), c && c[0] === "palette" && c[1] === "gradient" && /* @__PURE__ */ t.createElement(
|
|
221
|
+
D,
|
|
211
222
|
{
|
|
212
223
|
...y,
|
|
213
224
|
_paletteSettings: h,
|
|
214
|
-
_gradientSettings: { _adaptive: e, ...
|
|
225
|
+
_gradientSettings: { _adaptive: e, ...C },
|
|
215
226
|
ref: m,
|
|
216
227
|
size: e ? "large" : u,
|
|
217
228
|
rounded: v,
|
|
218
229
|
views: ["palette", "gradient"],
|
|
219
230
|
setOpen: a,
|
|
220
231
|
showButtons: e ? !1 : b,
|
|
221
|
-
value:
|
|
232
|
+
value: l,
|
|
222
233
|
onChange: f,
|
|
223
|
-
setAdaptiveModeValue:
|
|
234
|
+
setAdaptiveModeValue: B
|
|
224
235
|
}
|
|
225
|
-
),
|
|
226
|
-
|
|
236
|
+
), c && c.includes("gradient") && !c.includes("palette") && /* @__PURE__ */ t.createElement(
|
|
237
|
+
D,
|
|
227
238
|
{
|
|
228
239
|
...y,
|
|
229
|
-
_gradientSettings: { _adaptive: e, ...
|
|
240
|
+
_gradientSettings: { _adaptive: e, ...C },
|
|
230
241
|
ref: m,
|
|
231
242
|
size: e ? "large" : u,
|
|
232
243
|
rounded: v,
|
|
233
244
|
views: ["gradient"],
|
|
234
245
|
showButtons: e ? !1 : b,
|
|
235
246
|
setOpen: a,
|
|
236
|
-
value:
|
|
247
|
+
value: l,
|
|
237
248
|
onChange: f,
|
|
238
|
-
setAdaptiveModeValue:
|
|
249
|
+
setAdaptiveModeValue: B
|
|
239
250
|
}
|
|
240
|
-
),
|
|
241
|
-
|
|
251
|
+
), c && c.includes("palette") && !c.includes("gradient") && /* @__PURE__ */ t.createElement(
|
|
252
|
+
D,
|
|
242
253
|
{
|
|
243
254
|
...y,
|
|
244
255
|
_paletteSettings: h,
|
|
245
|
-
_gradientSettings: { _adaptive: e, ...
|
|
256
|
+
_gradientSettings: { _adaptive: e, ...C },
|
|
246
257
|
ref: m,
|
|
247
258
|
size: e ? "large" : u,
|
|
248
259
|
rounded: v,
|
|
249
260
|
views: ["palette"],
|
|
250
261
|
showButtons: e ? !1 : b,
|
|
251
262
|
setOpen: a,
|
|
252
|
-
value:
|
|
263
|
+
value: l,
|
|
253
264
|
onChange: f,
|
|
254
|
-
setAdaptiveModeValue:
|
|
265
|
+
setAdaptiveModeValue: B
|
|
255
266
|
}
|
|
256
|
-
),
|
|
267
|
+
), ye && /* @__PURE__ */ t.createElement(Ye, { message: _e })),
|
|
257
268
|
[
|
|
258
|
-
|
|
259
|
-
|
|
269
|
+
X,
|
|
270
|
+
O,
|
|
260
271
|
y,
|
|
261
|
-
|
|
272
|
+
C,
|
|
262
273
|
f,
|
|
263
|
-
|
|
274
|
+
ie,
|
|
264
275
|
h,
|
|
265
276
|
a,
|
|
266
277
|
u,
|
|
267
|
-
|
|
278
|
+
l,
|
|
268
279
|
d,
|
|
269
|
-
|
|
280
|
+
c
|
|
270
281
|
]
|
|
271
|
-
),
|
|
272
|
-
var
|
|
282
|
+
), Me = t.useCallback(() => {
|
|
283
|
+
var s;
|
|
273
284
|
const e = {
|
|
274
|
-
animation: !!((
|
|
275
|
-
title:
|
|
276
|
-
subTitle:
|
|
285
|
+
animation: !!((s = g == null ? void 0 : g.animate) == null || s),
|
|
286
|
+
title: Y,
|
|
287
|
+
subTitle: ee,
|
|
277
288
|
expand: p,
|
|
278
|
-
onClose:
|
|
289
|
+
onClose: Z,
|
|
279
290
|
windowWidth: A,
|
|
280
291
|
footer: b ? {
|
|
281
292
|
cancelText: S.toLanguageString(
|
|
282
|
-
|
|
283
|
-
|
|
293
|
+
be,
|
|
294
|
+
x[be]
|
|
284
295
|
),
|
|
285
|
-
onCancel:
|
|
286
|
-
applyText: S.toLanguageString(
|
|
287
|
-
onApply:
|
|
296
|
+
onCancel: Z,
|
|
297
|
+
applyText: S.toLanguageString(Ce, x[Ce]),
|
|
298
|
+
onApply: le
|
|
288
299
|
} : void 0
|
|
289
300
|
};
|
|
290
|
-
return /* @__PURE__ */ t.createElement(
|
|
301
|
+
return /* @__PURE__ */ t.createElement(ft, { ...e }, /* @__PURE__ */ t.createElement(mt, null, j(!0)));
|
|
291
302
|
}, [
|
|
292
303
|
g == null ? void 0 : g.animate,
|
|
293
|
-
X,
|
|
294
304
|
Y,
|
|
305
|
+
ee,
|
|
295
306
|
p,
|
|
296
|
-
|
|
307
|
+
Z,
|
|
297
308
|
A,
|
|
298
309
|
b,
|
|
299
310
|
S,
|
|
300
|
-
|
|
301
|
-
|
|
311
|
+
le,
|
|
312
|
+
j
|
|
302
313
|
]), Ue = t.useCallback((e) => {
|
|
303
|
-
for (const
|
|
304
|
-
|
|
305
|
-
}, []),
|
|
314
|
+
for (const s of e)
|
|
315
|
+
xe(s.target.clientWidth);
|
|
316
|
+
}, []), se = et(i, r.dir), Ke = Te !== !1;
|
|
306
317
|
return /* @__PURE__ */ t.createElement(
|
|
307
318
|
"span",
|
|
308
319
|
{
|
|
@@ -313,69 +324,69 @@ const ft = {
|
|
|
313
324
|
"aria-describedby": r.ariaDescribedBy,
|
|
314
325
|
"aria-haspopup": "dialog",
|
|
315
326
|
"aria-expanded": p,
|
|
316
|
-
"aria-controls": `k-colorpicker-popup-${(
|
|
317
|
-
"aria-disabled":
|
|
318
|
-
className:
|
|
319
|
-
[`k-picker-${
|
|
320
|
-
[`k-picker-${
|
|
321
|
-
[`k-rounded-${
|
|
327
|
+
"aria-controls": `k-colorpicker-popup-${(ce = r.id) != null ? ce : 0}`,
|
|
328
|
+
"aria-disabled": F ? "true" : void 0,
|
|
329
|
+
className: q("k-colorpicker", "k-picker", "k-icon-picker", {
|
|
330
|
+
[`k-picker-${ge.sizeMap[u] || u}`]: u,
|
|
331
|
+
[`k-picker-${O}`]: O,
|
|
332
|
+
[`k-rounded-${ge.roundedMap[v] || v}`]: v,
|
|
322
333
|
"k-invalid": !Ke,
|
|
323
|
-
"k-disabled":
|
|
324
|
-
"k-focus":
|
|
325
|
-
className:
|
|
334
|
+
"k-disabled": F,
|
|
335
|
+
"k-focus": Ie,
|
|
336
|
+
className: Re
|
|
326
337
|
}),
|
|
327
|
-
ref:
|
|
328
|
-
tabIndex:
|
|
338
|
+
ref: i,
|
|
339
|
+
tabIndex: tt(Pe, F),
|
|
329
340
|
title: r.title,
|
|
330
|
-
onKeyDown:
|
|
331
|
-
onFocus:
|
|
332
|
-
onBlur:
|
|
333
|
-
dir:
|
|
341
|
+
onKeyDown: Ne,
|
|
342
|
+
onFocus: Ve,
|
|
343
|
+
onBlur: We,
|
|
344
|
+
dir: se
|
|
334
345
|
},
|
|
335
346
|
/* @__PURE__ */ t.createElement(
|
|
336
|
-
|
|
347
|
+
rt,
|
|
337
348
|
{
|
|
338
|
-
dir:
|
|
349
|
+
dir: se,
|
|
339
350
|
open: p,
|
|
340
|
-
onOpen:
|
|
341
|
-
popupAnchor:
|
|
342
|
-
popupSettings: { id: `k-colorpicker-popup-${(
|
|
343
|
-
input: /* @__PURE__ */ t.createElement("span", { onClick:
|
|
351
|
+
onOpen: Oe,
|
|
352
|
+
popupAnchor: i.current || void 0,
|
|
353
|
+
popupSettings: { id: `k-colorpicker-popup-${(ue = r.id) != null ? ue : 0}`, ...g },
|
|
354
|
+
input: /* @__PURE__ */ t.createElement("span", { onClick: Fe, className: "k-input-inner" }, /* @__PURE__ */ t.createElement(
|
|
344
355
|
"span",
|
|
345
356
|
{
|
|
346
|
-
className:
|
|
347
|
-
"k-no-color": !
|
|
348
|
-
"k-icon-color-preview":
|
|
357
|
+
className: q("k-value-icon", "k-color-preview", {
|
|
358
|
+
"k-no-color": !l,
|
|
359
|
+
"k-icon-color-preview": V || H || P
|
|
349
360
|
})
|
|
350
361
|
},
|
|
351
|
-
P && /* @__PURE__ */ t.createElement("span", { className:
|
|
352
|
-
!P && (
|
|
353
|
-
/* @__PURE__ */ t.createElement("span", { className: "k-color-preview-mask", style: { backgroundColor:
|
|
362
|
+
P && /* @__PURE__ */ t.createElement("span", { className: q("k-color-preview-icon", P) }),
|
|
363
|
+
!P && (V || H) && /* @__PURE__ */ t.createElement(nt, { name: V, icon: H }),
|
|
364
|
+
/* @__PURE__ */ t.createElement("span", { className: "k-color-preview-mask", style: { backgroundColor: l } })
|
|
354
365
|
)),
|
|
355
366
|
button: /* @__PURE__ */ t.createElement(
|
|
356
|
-
|
|
367
|
+
ut,
|
|
357
368
|
{
|
|
358
369
|
tabIndex: -1,
|
|
359
370
|
type: "button",
|
|
360
371
|
onClick: () => a(!p),
|
|
361
372
|
className: "k-input-button",
|
|
362
373
|
icon: "chevron-down",
|
|
363
|
-
svgIcon:
|
|
374
|
+
svgIcon: dt,
|
|
364
375
|
size: u,
|
|
365
376
|
"aria-label": S.toLanguageString(
|
|
366
|
-
|
|
367
|
-
|
|
377
|
+
we,
|
|
378
|
+
x[we]
|
|
368
379
|
)
|
|
369
380
|
}
|
|
370
381
|
),
|
|
371
|
-
content:
|
|
382
|
+
content: j(!1),
|
|
372
383
|
_mobileMode: G,
|
|
373
|
-
_actionSheet:
|
|
384
|
+
_actionSheet: Me()
|
|
374
385
|
}
|
|
375
386
|
)
|
|
376
387
|
);
|
|
377
388
|
});
|
|
378
|
-
|
|
389
|
+
Se.propTypes = {
|
|
379
390
|
value: o.string,
|
|
380
391
|
defaultValue: o.string,
|
|
381
392
|
disabled: o.bool,
|
|
@@ -384,7 +395,7 @@ be.propTypes = {
|
|
|
384
395
|
dir: o.string,
|
|
385
396
|
id: o.string,
|
|
386
397
|
icon: o.string,
|
|
387
|
-
svgIcon:
|
|
398
|
+
svgIcon: ot,
|
|
388
399
|
ariaLabelledBy: o.string,
|
|
389
400
|
ariaDescribedBy: o.string,
|
|
390
401
|
size: o.oneOf(["small", "medium", "large"]),
|
|
@@ -395,17 +406,17 @@ be.propTypes = {
|
|
|
395
406
|
adaptiveTitle: o.string,
|
|
396
407
|
adaptiveSubtitle: o.string
|
|
397
408
|
};
|
|
398
|
-
const
|
|
409
|
+
const E = {
|
|
399
410
|
size: void 0,
|
|
400
411
|
rounded: void 0,
|
|
401
412
|
fillMode: void 0,
|
|
402
413
|
view: "palette",
|
|
403
414
|
views: ["gradient", "palette"],
|
|
404
|
-
gradientSettings:
|
|
405
|
-
paletteSettings:
|
|
415
|
+
gradientSettings: vt,
|
|
416
|
+
paletteSettings: gt
|
|
406
417
|
};
|
|
407
|
-
|
|
418
|
+
Se.displayName = "KendoColorPicker";
|
|
408
419
|
export {
|
|
409
|
-
|
|
410
|
-
|
|
420
|
+
Se as ColorPicker,
|
|
421
|
+
kt as ColorPickerPropsContext
|
|
411
422
|
};
|
|
@@ -13,7 +13,7 @@ import { ColorPickerPopupSettings } from './ColorPickerPopupSettings';
|
|
|
13
13
|
import { ColorPickerPaletteSettings } from './ColorPickerPaletteSettings';
|
|
14
14
|
import { ColorPickerGradientSettings } from './ColorPickerGradientSettings';
|
|
15
15
|
import { ColorPickerView } from './ColorPickerView';
|
|
16
|
-
import { SVGIcon } from '@progress/kendo-react-common';
|
|
16
|
+
import { SVGIcon, WebMcpProps } from '@progress/kendo-react-common';
|
|
17
17
|
import { FlatColorPickerProps } from '../FlatColorPicker.js';
|
|
18
18
|
/**
|
|
19
19
|
* Represents the props of the [KendoReact ColorPicker component](https://www.telerik.com/kendo-react-ui/components/inputs/colorpicker).
|
|
@@ -251,6 +251,11 @@ export interface ColorPickerProps {
|
|
|
251
251
|
* ```
|
|
252
252
|
*/
|
|
253
253
|
adaptiveSubtitle?: string;
|
|
254
|
+
/**
|
|
255
|
+
* Enables Web MCP tool registration for this component.
|
|
256
|
+
* Requires a parent `WebMcpProvider` from `@progress/kendo-react-webmcp`.
|
|
257
|
+
*/
|
|
258
|
+
webMcp?: boolean | WebMcpProps;
|
|
254
259
|
/**
|
|
255
260
|
* Specifies whether action buttons (Apply/Cancel) will be rendered in the popup footer.
|
|
256
261
|
*
|