@progress/kendo-react-inputs 14.5.0-develop.9 → 15.0.0-develop.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/MaskedTextBoxMcpWrapper.d.ts +17 -0
  2. package/MaskedTextBoxMcpWrapper.js +8 -0
  3. package/MaskedTextBoxMcpWrapper.mjs +18 -0
  4. package/README.md +4 -4
  5. package/checkbox/Checkbox.js +1 -1
  6. package/checkbox/Checkbox.mjs +64 -64
  7. package/colors/ColorGradient.js +1 -1
  8. package/colors/ColorGradient.mjs +74 -72
  9. package/colors/ColorInput.js +1 -1
  10. package/colors/ColorInput.mjs +57 -45
  11. package/colors/ColorPalette.js +1 -1
  12. package/colors/ColorPalette.mjs +84 -81
  13. package/colors/ColorPicker.js +1 -1
  14. package/colors/ColorPicker.mjs +203 -190
  15. package/colors/FlatColorPicker.js +1 -1
  16. package/colors/FlatColorPicker.mjs +86 -94
  17. package/colors/interfaces/ColorPickerProps.d.ts +6 -1
  18. package/dist/cdn/js/kendo-react-inputs.js +1 -1
  19. package/index.d.mts +5 -1
  20. package/index.d.ts +5 -1
  21. package/index.js +1 -1
  22. package/index.mjs +92 -89
  23. package/maskedtextbox/MaskedTextBoxProps.d.ts +6 -1
  24. package/messages/index.d.ts +55 -0
  25. package/messages/index.js +1 -1
  26. package/messages/index.mjs +82 -60
  27. package/numerictextbox/NumericTextBox.js +1 -1
  28. package/numerictextbox/NumericTextBox.mjs +190 -188
  29. package/numerictextbox/interfaces/NumericTextBoxProps.d.ts +6 -1
  30. package/package-metadata.js +1 -1
  31. package/package-metadata.mjs +2 -2
  32. package/package.json +10 -10
  33. package/radiobutton/RadioButton.js +1 -1
  34. package/radiobutton/RadioButton.mjs +23 -20
  35. package/radiobutton/interfaces/RadioButtonProps.d.ts +7 -0
  36. package/range-slider/RangeSlider.d.ts +14 -1
  37. package/range-slider/RangeSlider.js +11 -11
  38. package/range-slider/RangeSlider.mjs +188 -185
  39. package/rating/Rating.d.ts +6 -1
  40. package/rating/Rating.js +3 -3
  41. package/rating/Rating.mjs +88 -81
  42. package/signature/Signature.js +1 -1
  43. package/signature/Signature.mjs +127 -129
  44. package/signature/interfaces/SignatureProps.d.ts +6 -1
  45. package/slider/Slider.d.ts +6 -1
  46. package/slider/Slider.js +1 -1
  47. package/slider/Slider.mjs +149 -144
  48. package/slider/SliderLabel.js +1 -1
  49. package/slider/SliderLabel.mjs +3 -2
  50. package/switch/Switch.d.ts +6 -1
  51. package/switch/Switch.js +1 -1
  52. package/switch/Switch.mjs +100 -100
  53. package/textarea/TextArea.js +1 -1
  54. package/textarea/TextArea.mjs +101 -101
  55. package/textarea/interfaces/TextAreaProps.d.ts +6 -1
  56. package/textbox/Textbox.d.ts +20 -1
  57. package/textbox/Textbox.js +1 -1
  58. package/textbox/Textbox.mjs +92 -81
@@ -6,91 +6,91 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { SignaturePad as Le } from "@progress/kendo-inputs-common";
9
- import { Button as T } from "@progress/kendo-react-buttons";
10
- import { validatePackage as we, getLicenseMessage as Ie, usePropsContext as Pe, noop as f, useIsomorphicLayoutEffect as De, dispatchEvent as h, classNames as B, kendoThemeMaps as ee, getTabIndex as Te, WatermarkOverlay as Be, createPropsContext as Re } from "@progress/kendo-react-common";
11
- import { Dialog as Fe } from "@progress/kendo-react-dialogs";
12
- import { useLocalization as _e } from "@progress/kendo-react-intl";
9
+ import { Button as R } from "@progress/kendo-react-buttons";
10
+ import { validatePackage as Ie, getLicenseMessage as Pe, usePropsContext as De, noop as f, useIsomorphicLayoutEffect as Re, useWebMcpRegister as Te, dispatchEvent as h, classNames as T, kendoThemeMaps as Y, getTabIndex as Be, WatermarkOverlay as Fe, createPropsContext as _e } from "@progress/kendo-react-common";
11
+ import { Dialog as We } from "@progress/kendo-react-dialogs";
12
+ import { useLocalization as Ne } from "@progress/kendo-react-intl";
13
13
  import a from "prop-types";
14
14
  import * as o from "react";
15
- import { signatureMaximize as te, messages as R, signatureMinimize as oe, signatureClear as ne } from "../messages/index.mjs";
16
- import { packageMetadata as ae } from "../package-metadata.mjs";
17
- import { hasParent as Ne } from "./utils/index.mjs";
18
- import { hyperlinkOpenIcon as re, xIcon as We } from "@progress/kendo-svg-icons";
19
- const qe = 250, Ge = 84, se = 3, le = 2, Ae = "#000000", Ve = "#ffffff", ie = (d) => d !== void 0, je = Re(), F = o.forwardRef((d, ce) => {
20
- const ue = !we(ae, { component: "Signature" }), de = Ie(ae), _ = Pe(je, d), e = o.useMemo(
15
+ import { signatureMaximize as Z, messages as B, signatureMinimize as ee, signatureClear as te } from "../messages/index.mjs";
16
+ import { packageMetadata as oe } from "../package-metadata.mjs";
17
+ import { hasParent as qe } from "./utils/index.mjs";
18
+ import { hyperlinkOpenIcon as ne, xIcon as Ge } from "@progress/kendo-svg-icons";
19
+ const Ae = 250, Ve = 84, re = 3, se = 2, je = "#000000", Ue = "#ffffff", ae = (d) => d !== void 0, He = _e(), F = o.forwardRef((d, ie) => {
20
+ const le = !Ie(oe, { component: "Signature" }), ce = Pe(oe), _ = De(He, d), e = o.useMemo(
21
21
  () => ({
22
- strokeWidth: s.strokeWidth,
23
- smooth: s.smooth,
24
- popupScale: s.popupScale,
25
- exportScale: s.exportScale,
26
- maximizable: s.maximizable,
27
- disabled: s.disabled,
28
- required: s.required,
29
- validityStyles: s.validityStyles,
30
- onChange: s.onChange,
31
- onFocus: s.onFocus,
32
- onBlur: s.onBlur,
33
- onOpen: s.onOpen,
34
- onClose: s.onClose,
35
- size: s.size,
36
- rounded: s.rounded,
37
- fillMode: s.fillMode,
22
+ strokeWidth: i.strokeWidth,
23
+ smooth: i.smooth,
24
+ popupScale: i.popupScale,
25
+ exportScale: i.exportScale,
26
+ maximizable: i.maximizable,
27
+ disabled: i.disabled,
28
+ required: i.required,
29
+ validityStyles: i.validityStyles,
30
+ onChange: i.onChange,
31
+ onFocus: i.onFocus,
32
+ onBlur: i.onBlur,
33
+ onOpen: i.onOpen,
34
+ onClose: i.onClose,
35
+ size: i.size,
36
+ rounded: i.rounded,
37
+ fillMode: i.fillMode,
38
38
  ..._
39
39
  }),
40
40
  [_]
41
- ), S = _e(), c = o.useRef(null), g = o.useRef(null), N = o.useRef(null), W = o.useRef(null), z = o.useRef(null), [r, me] = o.useState(), [b, q] = o.useState(!1), [E, G] = o.useState(!1), [k, A] = o.useState(), [pe, fe] = o.useState(), V = ie(e.value) ? e.value : k, [ge, be] = o.useState(!1), p = ie(e.open), m = p ? e.open : ge, ke = e.maximized || E || !e.maximizable || e.disabled, ve = !(e.maximized && !E), ye = !(!(e.value || k) || E || e.readOnly || e.disabled), j = S.toLanguageString(te, R[te]), U = S.toLanguageString(oe, R[oe]), H = S.toLanguageString(ne, R[ne]), O = e.popupScale || se, x = e.exportScale || le, M = (t) => {
41
+ ), S = Ne(), u = o.useRef(null), g = o.useRef(null), W = o.useRef(null), N = o.useRef(null), z = o.useRef(null), [r, ue] = o.useState(), [k, q] = o.useState(!1), [E, G] = o.useState(!1), [b, A] = o.useState(), [de, me] = o.useState(), V = ae(e.value) ? e.value : b, [pe, fe] = o.useState(!1), p = ae(e.open), m = p ? e.open : pe, ge = e.maximized || E || !e.maximizable || e.disabled, ke = !(e.maximized && !E), be = !(!(e.value || b) || E || e.readOnly || e.disabled), ve = S.toLanguageString(Z, B[Z]), ye = S.toLanguageString(ee, B[ee]), Ce = S.toLanguageString(te, B[te]), O = e.popupScale || re, x = e.exportScale || se, M = (t) => {
42
42
  A(t), e.onChange && e.onChange({ value: t });
43
- }, Ce = (t) => {
43
+ }, he = (t) => {
44
44
  r == null || r.loadImage(t.value), M(t.value);
45
45
  };
46
46
  o.useEffect(() => {
47
- e.value !== k && (A(e.value), r == null || r.loadImage(e.value));
47
+ e.value !== b && (A(e.value), r == null || r.loadImage(e.value));
48
48
  }, [e.value]);
49
- const he = () => {
49
+ const Se = () => {
50
50
  r == null || r.clear(), M();
51
51
  }, v = o.useCallback(
52
52
  (t) => {
53
- p || be(t);
53
+ p || fe(t);
54
54
  },
55
55
  [p]
56
- ), Se = (t) => {
57
- var n, i;
58
- Q(t), (i = ((n = z.current) == null ? void 0 : n.element) || g.current) == null || i.focus();
59
- }, L = o.useCallback(() => {
60
- let t = Ae;
61
- return !e.color && typeof document != "undefined" && c.current && (t = getComputedStyle(c.current).color), e.color || t;
62
- }, [e.color]), w = o.useCallback(() => {
63
- let t = Ve;
64
- return !e.backgroundColor && typeof document != "undefined" && c.current && (t = getComputedStyle(c.current).backgroundColor), e.backgroundColor || t;
65
- }, [e.backgroundColor]), $ = () => ({
56
+ ), ze = (t) => {
57
+ var n, s;
58
+ X(t), (s = ((n = z.current) == null ? void 0 : n.element) || g.current) == null || s.focus();
59
+ }, w = o.useCallback(() => {
60
+ let t = je;
61
+ return !e.color && typeof document != "undefined" && u.current && (t = getComputedStyle(u.current).color), e.color || t;
62
+ }, [e.color]), L = o.useCallback(() => {
63
+ let t = Ue;
64
+ return !e.backgroundColor && typeof document != "undefined" && u.current && (t = getComputedStyle(u.current).backgroundColor), e.backgroundColor || t;
65
+ }, [e.backgroundColor]), j = () => ({
66
66
  scale: e.maximized ? e.popupScale : 1,
67
- color: L(),
68
- backgroundColor: w(),
67
+ color: w(),
68
+ backgroundColor: L(),
69
69
  strokeWidth: e.strokeWidth,
70
70
  smooth: e.smooth,
71
71
  readonly: e.readOnly
72
- }), K = async (t) => {
73
- const { width: n, height: i } = t;
72
+ }), U = async (t) => {
73
+ const { width: n, height: s } = t;
74
74
  return await (r == null ? void 0 : r.exportImage({
75
75
  width: n * x,
76
- height: i * x
76
+ height: s * x
77
77
  }));
78
78
  };
79
79
  o.useEffect(() => {
80
- const t = g.current, n = new Le(t, $());
81
- return V && n.loadImage(V), me(n), () => n.destroy();
80
+ const t = g.current, n = new Le(t, j());
81
+ return V && n.loadImage(V), ue(n), () => n.destroy();
82
82
  }, []), o.useEffect(() => {
83
83
  r == null || r.setOptions({
84
- onChange: async () => M(await K(Y())),
84
+ onChange: async () => M(await U(J())),
85
85
  onDraw: () => G(!0),
86
86
  onDrawEnd: () => G(!1)
87
87
  });
88
- }, [r]), De(
89
- () => r == null ? void 0 : r.setOptions($()),
88
+ }, [r]), Re(
89
+ () => r == null ? void 0 : r.setOptions(j()),
90
90
  [e.readOnly, e.color, e.backgroundColor, e.strokeWidth, e.smooth]
91
91
  ), o.useEffect(() => {
92
- var i, l;
93
- const t = (l = (i = N.current) == null ? void 0 : i.element) == null ? void 0 : l.querySelector(".k-overlay");
92
+ var s, c;
93
+ const t = (c = (s = W.current) == null ? void 0 : s.element) == null ? void 0 : c.querySelector(".k-overlay");
94
94
  if (!t)
95
95
  return;
96
96
  const n = () => v(!1);
@@ -99,183 +99,181 @@ const qe = 250, Ge = 84, se = 3, le = 2, Ae = "#000000", Ve = "#ffffff", ie = (d
99
99
  if (!m || typeof document == "undefined")
100
100
  return;
101
101
  const t = (n) => {
102
- var i, l;
103
- n.key === "Escape" && (v(!1), (l = (i = z.current) == null ? void 0 : i.element) == null || l.focus());
102
+ var s, c;
103
+ n.key === "Escape" && (v(!1), (c = (s = z.current) == null ? void 0 : s.element) == null || c.focus());
104
104
  };
105
105
  return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
106
106
  }, [m]), o.useEffect(() => {
107
107
  var t, n;
108
- e.maximized && ((n = (t = W.current) == null ? void 0 : t.element) == null || n.focus());
108
+ e.maximized && ((n = (t = N.current) == null ? void 0 : t.element) == null || n.focus());
109
109
  }, []);
110
110
  const I = o.useCallback(() => {
111
111
  var t;
112
112
  return (t = g.current) == null ? void 0 : t.focus();
113
- }, []), y = o.useCallback(() => e.value, [e.value]), X = o.useCallback(() => e.name, [e.name]), C = o.useCallback(() => e.required, [e.required]), P = o.useCallback(() => {
114
- const t = e.validationMessage !== void 0, i = !y(), l = e.valid !== void 0 ? e.valid : !C() || !i;
113
+ }, []), y = o.useCallback(() => e.value, [e.value]), H = o.useCallback(() => e.name, [e.name]), C = o.useCallback(() => e.required, [e.required]), P = o.useCallback(() => {
114
+ const t = e.validationMessage !== void 0, s = !y(), c = e.valid !== void 0 ? e.valid : !C() || !s;
115
115
  return {
116
116
  customError: t,
117
- valid: l,
118
- valueMissing: i
117
+ valid: c,
118
+ valueMissing: s
119
119
  };
120
- }, [e.validationMessage, e.valid, y, C]), D = o.useCallback(() => e.validityStyles, [e.validityStyles]), J = o.useCallback(() => e, [e]), u = o.useCallback(() => {
120
+ }, [e.validationMessage, e.valid, y, C]), D = o.useCallback(() => e.validityStyles, [e.validityStyles]), $ = o.useCallback(() => e, [e]), l = o.useCallback(() => {
121
121
  const t = {
122
- element: c.current,
122
+ element: u.current,
123
123
  focus: I
124
124
  };
125
- return Object.defineProperty(t, "name", { get: X }), Object.defineProperty(t, "value", { get: y }), Object.defineProperty(t, "validity", { get: P }), Object.defineProperty(t, "validityStyles", { get: D }), Object.defineProperty(t, "required", { get: C }), Object.defineProperty(t, "props", { get: J }), Object.defineProperty(t, "color", { get: L }), Object.defineProperty(t, "backgroundColor", { get: w }), t;
125
+ return Object.defineProperty(t, "name", { get: H }), Object.defineProperty(t, "value", { get: y }), Object.defineProperty(t, "validity", { get: P }), Object.defineProperty(t, "validityStyles", { get: D }), Object.defineProperty(t, "required", { get: C }), Object.defineProperty(t, "props", { get: $ }), Object.defineProperty(t, "color", { get: w }), Object.defineProperty(t, "backgroundColor", { get: L }), t;
126
126
  }, [
127
- X,
127
+ H,
128
128
  y,
129
129
  P,
130
130
  D,
131
131
  C,
132
132
  I,
133
- J,
134
- L,
135
- w
133
+ $,
134
+ w,
135
+ L
136
136
  ]);
137
- o.useImperativeHandle(ce, u);
138
- const ze = o.useCallback(
137
+ o.useImperativeHandle(ie, l);
138
+ const K = o.useRef(null);
139
+ o.useImperativeHandle(K, l), Te("signature", K, e, e.webMcp);
140
+ const Ee = o.useCallback(
139
141
  (t) => {
140
- b || e.maximized || (q(!0), h(e.onFocus, t, u(), {}));
142
+ k || e.maximized || (q(!0), h(e.onFocus, t, l(), {}));
141
143
  },
142
- [b, e.onFocus, u]
143
- ), Ee = o.useCallback(
144
+ [k, e.onFocus, l]
145
+ ), Oe = o.useCallback(
144
146
  (t) => {
145
- Ne(t.relatedTarget, c.current) || (q(!1), h(e.onBlur, t, u(), {}));
147
+ qe(t.relatedTarget, u.current) || (q(!1), h(e.onBlur, t, l(), {}));
146
148
  },
147
- [b, e.onBlur, u]
148
- ), Oe = o.useCallback(
149
+ [k, e.onBlur, l]
150
+ ), xe = o.useCallback(
149
151
  async (t) => {
150
- fe(await K(Z())), v(!0), h(e.onOpen, t, u(), {});
152
+ me(await U(Q())), v(!0), h(e.onOpen, t, l(), {});
151
153
  },
152
- [m, p, e.onOpen, e.value, k, u]
153
- ), Q = o.useCallback(
154
+ [m, p, e.onOpen, e.value, b, l]
155
+ ), X = o.useCallback(
154
156
  (t) => {
155
- v(!1), h(e.onClose, t, u(), {});
157
+ v(!1), h(e.onClose, t, l(), {});
156
158
  },
157
- [m, p, e.onClose, u]
158
- ), xe = () => {
159
- he(), I();
160
- }, Y = () => {
161
- var i, l;
162
- const t = e.width || ((i = c.current) == null ? void 0 : i.offsetWidth) || qe, n = e.height || ((l = c.current) == null ? void 0 : l.offsetHeight) || Ge;
159
+ [m, p, e.onClose, l]
160
+ ), Me = () => {
161
+ Se(), I();
162
+ }, J = () => {
163
+ var s, c;
164
+ const t = e.width || ((s = u.current) == null ? void 0 : s.offsetWidth) || Ae, n = e.height || ((c = u.current) == null ? void 0 : c.offsetHeight) || Ve;
163
165
  return {
164
166
  width: t,
165
167
  height: n
166
168
  };
167
- }, Z = () => {
168
- const { width: t, height: n } = Y();
169
+ }, Q = () => {
170
+ const { width: t, height: n } = J();
169
171
  return {
170
172
  width: t * O,
171
173
  height: n * O
172
174
  };
173
- }, Me = !D() || P().valid;
175
+ }, we = !D() || P().valid;
174
176
  return /* @__PURE__ */ o.createElement(
175
177
  "div",
176
178
  {
177
- ref: c,
179
+ ref: u,
178
180
  dir: e.dir,
179
181
  style: { width: e.width, height: e.height, ...e.style },
180
- className: B(
182
+ className: T(
181
183
  "k-input",
182
184
  "k-signature",
183
185
  {
184
186
  "k-signature-maximized": e.maximized,
185
- [`k-signature-${ee.sizeMap[e.size] || e.size}`]: e.size,
187
+ [`k-signature-${Y.sizeMap[e.size] || e.size}`]: e.size,
186
188
  [`k-signature-${e.fillMode}`]: e.fillMode,
187
189
  [`k-input-${e.fillMode}`]: e.fillMode,
188
- [`k-rounded-${ee.roundedMap[e.rounded] || e.rounded}`]: e.rounded,
189
- "k-invalid": !Me,
190
+ [`k-rounded-${Y.roundedMap[e.rounded] || e.rounded}`]: e.rounded,
191
+ "k-invalid": !we,
190
192
  "k-required": e.required,
191
193
  "k-disabled": e.disabled,
192
- "k-focus": b
194
+ "k-focus": k
193
195
  },
194
196
  e.className
195
197
  ),
196
- onFocus: ze,
197
- onBlur: Ee
198
+ onFocus: Ee,
199
+ onBlur: Oe
198
200
  },
199
201
  /* @__PURE__ */ o.createElement(
200
202
  "div",
201
203
  {
202
204
  className: "k-signature-canvas",
203
205
  ref: g,
204
- tabIndex: Te(e.tabIndex, e.disabled),
205
206
  role: "img",
207
+ tabIndex: Be(e.tabIndex, e.disabled),
206
208
  id: e.id,
207
209
  "aria-label": e.ariaLabel,
208
210
  "aria-labelledby": e.ariaLabelledBy,
209
211
  "aria-describedby": e.ariaDescribedBy,
210
- "aria-disabled": e.disabled ? "true" : void 0,
211
212
  style: e.inputStyle
212
213
  }
213
214
  ),
214
215
  /* @__PURE__ */ o.createElement("div", { className: "k-signature-actions k-signature-actions-top" }, /* @__PURE__ */ o.createElement(
215
- T,
216
+ R,
216
217
  {
217
218
  type: "button",
218
- className: B("k-signature-action", "k-signature-maximize", {
219
- "k-hidden": e.disabled || ke
219
+ className: T("k-signature-action", "k-signature-maximize", {
220
+ "k-hidden": e.disabled || ge
220
221
  }),
221
222
  ref: z,
222
223
  icon: "hyperlink-open",
223
- svgIcon: re,
224
+ svgIcon: ne,
224
225
  size: e.size,
225
226
  rounded: e.rounded,
226
227
  fillMode: "flat",
227
- onClick: Oe,
228
- "aria-label": j,
229
- title: j
228
+ onClick: xe,
229
+ title: ve
230
230
  }
231
231
  ), /* @__PURE__ */ o.createElement(
232
- T,
232
+ R,
233
233
  {
234
234
  type: "button",
235
- className: B("k-signature-action", "k-signature-minimize", "k-rotate-180", {
236
- "k-hidden": e.disabled || ve
235
+ className: T("k-signature-action", "k-signature-minimize", {
236
+ "k-hidden": e.disabled || ke
237
237
  }),
238
- ref: W,
238
+ ref: N,
239
239
  icon: "hyperlink-open",
240
- svgIcon: re,
240
+ svgIcon: ne,
241
241
  size: e.size,
242
242
  rounded: e.rounded,
243
243
  fillMode: "flat",
244
- onClick: Q,
245
- "aria-label": U,
246
- title: U
244
+ onClick: X,
245
+ title: ye
247
246
  }
248
247
  )),
249
248
  !e.hideLine && /* @__PURE__ */ o.createElement("div", { className: "k-signature-line", style: { zIndex: 2, pointerEvents: "none" } }),
250
- /* @__PURE__ */ o.createElement("div", { className: "k-signature-actions k-signature-actions-bottom" }, ye && /* @__PURE__ */ o.createElement(
251
- T,
249
+ /* @__PURE__ */ o.createElement("div", { className: "k-signature-actions k-signature-actions-bottom" }, be && /* @__PURE__ */ o.createElement(
250
+ R,
252
251
  {
253
252
  type: "button",
254
253
  className: "k-signature-action k-signature-clear",
255
254
  icon: "x",
256
- svgIcon: We,
255
+ svgIcon: Ge,
257
256
  size: e.size,
258
257
  rounded: e.rounded,
259
258
  fillMode: "flat",
260
- onClick: xe,
261
- "aria-label": H,
262
- title: H
259
+ onClick: Me,
260
+ title: Ce
263
261
  }
264
262
  )),
265
- m && /* @__PURE__ */ o.createElement(Fe, { ref: N }, /* @__PURE__ */ o.createElement(
263
+ m && /* @__PURE__ */ o.createElement(We, { ref: W }, /* @__PURE__ */ o.createElement(
266
264
  F,
267
265
  {
268
266
  ...e,
269
- ...Z(),
270
- value: pe,
267
+ ...Q(),
268
+ value: de,
271
269
  maximized: !0,
272
270
  exportScale: 1 / O * x,
273
271
  open: !1,
274
- onChange: Ce,
275
- onClose: Se
272
+ onChange: he,
273
+ onClose: ze
276
274
  }
277
275
  )),
278
- ue && /* @__PURE__ */ o.createElement(Be, { message: de })
276
+ le && /* @__PURE__ */ o.createElement(Fe, { message: ce })
279
277
  );
280
278
  });
281
279
  F.propTypes = {
@@ -300,11 +298,11 @@ F.propTypes = {
300
298
  rounded: a.oneOf(["small", "medium", "large", "none"]),
301
299
  fillMode: a.oneOf(["solid", "flat", "outline"])
302
300
  };
303
- const s = {
301
+ const i = {
304
302
  strokeWidth: 1,
305
303
  smooth: !1,
306
- popupScale: se,
307
- exportScale: le,
304
+ popupScale: re,
305
+ exportScale: se,
308
306
  maximizable: !0,
309
307
  disabled: !1,
310
308
  required: !1,
@@ -321,5 +319,5 @@ const s = {
321
319
  F.displayName = "KendoSignature";
322
320
  export {
323
321
  F as Signature,
324
- je as SignaturePropsContext
322
+ He as SignaturePropsContext
325
323
  };
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { FormComponentProps } from '@progress/kendo-react-common';
8
+ import { FormComponentProps, WebMcpProps } from '@progress/kendo-react-common';
9
9
  import { SignatureChangeEvent } from './SignatureChangeEvent';
10
10
  import { SignatureFocusEvent } from './SignatureFocusEvent';
11
11
  import { SignatureBlurEvent } from './SignatureBlurEvent';
@@ -332,4 +332,9 @@ export interface SignatureProps extends FormComponentProps {
332
332
  children?: React.ReactNode;
333
333
  /** @hidden */
334
334
  maximized?: boolean;
335
+ /**
336
+ * Enables Web MCP tool registration for this component.
337
+ * Requires a parent `WebMcpProvider` from `@progress/kendo-react-webmcp`.
338
+ */
339
+ webMcp?: boolean | WebMcpProps;
335
340
  }
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { FormComponentProps, BaseEvent } from '@progress/kendo-react-common';
8
+ import { FormComponentProps, BaseEvent, WebMcpProps } from '@progress/kendo-react-common';
9
9
  import { Direction } from '../interfaces/Direction';
10
10
  import * as React from 'react';
11
11
  /**
@@ -196,6 +196,11 @@ export interface SliderProps extends FormComponentProps {
196
196
  * ```
197
197
  */
198
198
  dir?: Direction;
199
+ /**
200
+ * Enables Web MCP tool registration for this component.
201
+ * Requires a parent `WebMcpProvider` from `@progress/kendo-react-webmcp`.
202
+ */
203
+ webMcp?: boolean | WebMcpProps;
199
204
  }
200
205
  /** @hidden */
201
206
  export declare const SliderWithoutContext: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<SliderHandle>>;
package/slider/Slider.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),r=require("prop-types"),c=require("@progress/kendo-react-common"),F=require("@progress/kendo-react-intl"),m=require("../messages/index.js"),ae=require("./SliderLabel.js"),j=require("@progress/kendo-react-buttons"),f=require("@progress/kendo-svg-icons");function le(e){const k=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const d in e)if(d!=="default"){const b=Object.getOwnPropertyDescriptor(e,d);Object.defineProperty(k,d,b.get?b:{enumerable:!0,get:()=>e[d]})}}return k.default=e,Object.freeze(k)}const i=le(a),h={step:1,largeStep:10,buttons:!1,vertical:!1,disabled:!1,tabIndex:0},E=i.forwardRef((e,k)=>{var A,M,O;const{step:d=h.step,largeStep:b=h.largeStep,vertical:l=h.vertical,disabled:u=h.disabled,tabIndex:P=h.tabIndex}=e,[U,H]=a.useState((A=e.defaultValue)!=null?A:e.min),[W,z]=a.useState(!1),[R,X]=a.useState(e.dir),L=a.useRef(null),y=a.useRef(null),N=a.useMemo(()=>new F.LocalizationService,[]),q=a.useRef(null),B=e.value!==void 0,I=B&&e.value!==void 0?e.value:U,o=a.useMemo(()=>{const{min:t,max:n}=e;return I<t?t:I>n?n:I},[I,e.min,e.max]),C=a.useMemo(()=>{const{min:t,max:n}=e,s=n-t;return s===0?0:(o-t)/s*100},[o,e.min,e.max]),v=(M=e.dir)!=null?M:R;a.useEffect(()=>{if(e.dir===void 0&&y.current){const n=window.getComputedStyle(y.current).direction;n!==R&&X(n)}},[e.dir,R]);const K=a.useCallback(t=>{let n=t;for(;n;){if(n.getAttribute(ae.SLIDER_LABEL_ATTRIBUTE))return!0;n=n.parentElement}return!1},[]),g=a.useCallback((t,n)=>{const s=Math.min(Math.max(n,e.min),e.max);B||H(s),c.dispatchEvent(e.onChange,t,q.current,{value:s})},[e.min,e.max,e.onChange,B]),G=a.useCallback(()=>{z(!0)},[]),Y=a.useCallback(()=>{z(!1)},[]),J=a.useCallback(t=>{if(u)return;let n;t.keyCode===c.Keys.left||t.keyCode===c.Keys.down?n=o-(d||0):t.keyCode===c.Keys.right||t.keyCode===c.Keys.up?n=o+(d||0):t.keyCode===c.Keys.pageDown?n=o-(b||0):t.keyCode===c.Keys.pageUp?n=o+(b||0):t.keyCode===c.Keys.home?n=e.min:t.keyCode===c.Keys.end&&(n=e.max),n!==void 0&&(t.preventDefault(),g(t,n))},[o,d,b,e.min,e.max,g,u]),Q=a.useCallback(t=>{t.preventDefault(),!u&&g(t,o-(d||0))},[o,d,g,u]),Z=a.useCallback(t=>{t.preventDefault(),!u&&g(t,o+(d||0))},[o,d,g,u]),w=a.useCallback(t=>{const n=t.element.getBoundingClientRect();let s;l?s=n.bottom-t.event.clientY:s=v==="rtl"?n.right-t.event.clientX:t.event.clientX-n.left;const S=l?n.height:n.width,x=s/S;g(t,e.min+x*(e.max-e.min))},[l,e.min,e.max,v,g]),$=a.useCallback(t=>{K(t.event.originalEvent.target)||(t.event.isTouch&&t.event.originalEvent.preventDefault(),w(t))},[K,w]),p=a.useCallback(t=>{t.event.originalEvent.preventDefault(),w(t)},[w]),D=a.useCallback(()=>{y.current&&y.current.focus()},[]),ee=a.useCallback(t=>{if(!t.enabled)return t.children;let n,s,S,x;return v==="rtl"?(n=l?f.chevronUpIcon:f.chevronLeftIcon,s=l?f.chevronDownIcon:f.chevronRightIcon,S=l?"chevron-up":"chevron-left",x=l?"chevron-down":"chevron-right"):(n=l?f.chevronUpIcon:f.chevronRightIcon,s=l?f.chevronDownIcon:f.chevronLeftIcon,S=l?"chevron-up":"chevron-right",x=l?"chevron-down":"chevron-left"),i.createElement(i.Fragment,null,i.createElement(j.Button,{className:"k-button-decrease",rounded:"full",icon:x,svgIcon:s,title:t.decrementTitle,onClick:t.decrement}),t.children,i.createElement(j.Button,{className:"k-button-increase",rounded:"full",icon:S,svgIcon:n,title:t.incrementTitle,onClick:t.increment}))},[v,l]);a.useImperativeHandle(k,()=>({props:e,sliderTrack:L.current,focus:D}),[e,D]),a.useEffect(()=>{q.current={props:e,sliderTrack:L.current,focus:D}},[e,D]);const te=l?{marginTop:"0.5rem",marginBottom:"0.5rem"}:{marginLeft:"0.5rem",marginRight:"0.5rem"},ne=l?{paddingTop:0,height:"100%"}:{};let T;return l?T={bottom:"calc("+C+"%)",zIndex:1}:v==="rtl"?T={right:"calc("+C+"% - 13px)",zIndex:1}:T={left:"calc("+C+"%)",zIndex:1},i.createElement("div",{ref:y,dir:v,id:e.id,style:{gap:0,...e.style},onFocus:G,onBlur:Y,onKeyDown:J,className:c.classNames("k-slider",{"k-focus":W,"k-disabled":u,"k-slider-horizontal":!l,"k-slider-vertical":l},e.className)},ee({enabled:(O=e.buttons)!=null?O:h.buttons,decrement:Q,increment:Z,incrementTitle:N.toLanguageString(m.sliderIncreaseValue,m.messages[m.sliderIncreaseValue]),decrementTitle:N.toLanguageString(m.sliderDecreaseValue,m.messages[m.sliderDecreaseValue]),children:i.createElement(c.Draggable,{onDrag:p,onPress:$,autoScroll:!1},i.createElement("div",{className:"k-slider-track-wrap",style:{flexGrow:1,position:"relative",touchAction:"none",...te}},e.children&&i.createElement("ul",{className:"k-reset k-slider-items",style:{margin:0,...ne}},i.Children.map(e.children,(t,n)=>t&&i.cloneElement(t,{position:100*(t.props.position-e.min)/(e.max-e.min),vertical:l,firstTick:n===0,lastTick:n===i.Children.count(e.children)-1},t.props.children))),i.createElement("div",{className:"k-slider-track",style:l?{bottom:0,height:"100%"}:{[v==="rtl"?"right":"left"]:0,width:"100%"},ref:L},i.createElement("div",{className:"k-slider-selection",style:l?{height:C+"%"}:{width:C+"%"}}),i.createElement("span",{role:"slider","aria-valuemin":e.min,"aria-valuemax":e.max,"aria-valuenow":o,"aria-valuetext":String(o),"aria-orientation":l?"vertical":void 0,"aria-disabled":u?"true":void 0,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy,"aria-label":e.ariaLabel,tabIndex:c.getTabIndex(P,u,void 0),className:"k-draghandle k-draghandle-end",title:N.toLanguageString(m.sliderDragTitle,m.messages[m.sliderDragTitle]),style:T}))))}))});E.displayName="Slider";const _=c.createPropsContext(),V=c.withPropsContext(_,E);V.displayName="KendoReactSlider";V.propTypes={value:r.number,defaultValue:r.number,min:r.number.isRequired,max:r.number.isRequired,step:r.number,largeStep:r.number,onChange:r.func,style:r.object,className:r.string,buttons:r.bool,tabIndex:r.number,disabled:r.bool,vertical:r.bool,id:r.string,ariaDescribedBy:r.string,ariaLabelledBy:r.string,ariaLabel:r.string,dir:r.oneOf(["ltr","rtl"]),children:r.node};F.registerForLocalization(E);exports.Slider=V;exports.SliderPropsContext=_;exports.SliderWithoutContext=E;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),i=require("prop-types"),s=require("@progress/kendo-react-common"),F=require("@progress/kendo-react-intl"),r=require("../messages/index.js"),ae=require("./SliderLabel.js"),j=require("@progress/kendo-react-buttons"),f=require("@progress/kendo-svg-icons");function le(e){const k=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const v=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(k,o,v.get?v:{enumerable:!0,get:()=>e[o]})}}return k.default=e,Object.freeze(k)}const c=le(a),h={step:1,largeStep:10,buttons:!1,vertical:!1,disabled:!1,tabIndex:0},R=c.forwardRef((e,k)=>{var K,M,O;const{step:o=h.step,largeStep:v=h.largeStep,vertical:l=h.vertical,disabled:m=h.disabled,tabIndex:P=h.tabIndex}=e,[U,W]=a.useState((K=e.defaultValue)!=null?K:e.min),[H,z]=a.useState(!1),[E,X]=a.useState(e.dir),N=a.useRef(null),y=a.useRef(null),S=a.useMemo(()=>new F.LocalizationService,[]),A=a.useRef(null),B=e.value!==void 0,w=B&&e.value!==void 0?e.value:U,d=a.useMemo(()=>w<e.min?e.min:w>e.max?e.max:w,[w,e.min,e.max]),C=a.useMemo(()=>{const t=e.max-e.min;return t===0?0:(d-e.min)/t*100},[d,e.min,e.max]),b=(M=e.dir)!=null?M:E;a.useEffect(()=>{if(e.dir===void 0&&y.current){const n=window.getComputedStyle(y.current).direction;n!==E&&X(n)}},[e.dir,E]);const q=a.useCallback(t=>{let n=t;for(;n;){if(n.getAttribute(ae.SLIDER_LABEL_ATTRIBUTE))return!0;n=n.parentElement}return!1},[]),g=a.useCallback((t,n)=>{const u=Math.min(Math.max(n,e.min),e.max);B||W(u),s.dispatchEvent(e.onChange,t,A.current,{value:u})},[e.min,e.max,e.onChange,B]),G=a.useCallback(()=>{z(!0)},[]),Y=a.useCallback(()=>{z(!1)},[]),J=a.useCallback(t=>{if(m)return;let n;t.keyCode===s.Keys.left||t.keyCode===s.Keys.down?n=d-(o||0):t.keyCode===s.Keys.right||t.keyCode===s.Keys.up?n=d+(o||0):t.keyCode===s.Keys.pageDown?n=d-(v||0):t.keyCode===s.Keys.pageUp?n=d+(v||0):t.keyCode===s.Keys.home?n=e.min:t.keyCode===s.Keys.end&&(n=e.max),n!==void 0&&(t.preventDefault(),g(t,n))},[d,o,v,e.min,e.max,g,m]),Q=a.useCallback(t=>{t.preventDefault(),!m&&g(t,d-(o||0))},[d,o,g,m]),Z=a.useCallback(t=>{t.preventDefault(),!m&&g(t,d+(o||0))},[d,o,g,m]),D=a.useCallback(t=>{const n=t.element.getBoundingClientRect();let u;l?u=n.bottom-t.event.clientY:u=b==="rtl"?n.right-t.event.clientX:t.event.clientX-n.left;const x=l?n.height:n.width,I=u/x;g(t,e.min+I*(e.max-e.min))},[l,e.min,e.max,b,g]),$=a.useCallback(t=>{q(t.event.originalEvent.target)||(t.event.isTouch&&t.event.originalEvent.preventDefault(),D(t))},[q,D]),p=a.useCallback(t=>{t.event.originalEvent.preventDefault(),D(t)},[D]),L=a.useCallback(()=>{y.current&&y.current.focus()},[]),ee=a.useCallback(t=>{if(!t.enabled)return t.children;let n,u,x,I;return b==="rtl"?(n=l?f.chevronUpIcon:f.chevronLeftIcon,u=l?f.chevronDownIcon:f.chevronRightIcon,x=l?"chevron-up":"chevron-left",I=l?"chevron-down":"chevron-right"):(n=l?f.chevronUpIcon:f.chevronRightIcon,u=l?f.chevronDownIcon:f.chevronLeftIcon,x=l?"chevron-up":"chevron-right",I=l?"chevron-down":"chevron-left"),c.createElement(c.Fragment,null,c.createElement(j.Button,{className:"k-button-decrease",rounded:"full",icon:I,svgIcon:u,title:t.decrementTitle,onClick:t.decrement}),t.children,c.createElement(j.Button,{className:"k-button-increase",rounded:"full",icon:x,svgIcon:n,title:t.incrementTitle,onClick:t.increment}))},[b,l]);a.useImperativeHandle(k,()=>({props:e,sliderTrack:N.current,focus:L}),[e,L]),s.useWebMcpRegister("slider",A,e,e.webMcp),a.useEffect(()=>{A.current={props:e,sliderTrack:N.current,focus:L}},[e,L]);const te=l?{marginTop:"0.5rem",marginBottom:"0.5rem"}:{marginLeft:"0.5rem",marginRight:"0.5rem"},ne=l?{paddingTop:0,height:"100%"}:{};let T;return l?T={bottom:"calc("+C+"%)",zIndex:1}:b==="rtl"?T={right:"calc("+C+"% - 13px)",zIndex:1}:T={left:"calc("+C+"%)",zIndex:1},c.createElement("div",{ref:y,dir:b,id:e.id,"aria-label":e.ariaLabel||S.toLanguageString(r.sliderAriaLabel,r.messages[r.sliderAriaLabel]),style:{gap:0,...e.style},onFocus:G,onBlur:Y,onKeyDown:J,className:s.classNames("k-slider",{"k-focus":H,"k-disabled":m,"k-slider-horizontal":!l,"k-slider-vertical":l},e.className)},ee({enabled:(O=e.buttons)!=null?O:h.buttons,decrement:Q,increment:Z,incrementTitle:S.toLanguageString(r.sliderIncreaseValue,r.messages[r.sliderIncreaseValue]),decrementTitle:S.toLanguageString(r.sliderDecreaseValue,r.messages[r.sliderDecreaseValue]),children:c.createElement(s.Draggable,{onDrag:p,onPress:$,autoScroll:!1},c.createElement("div",{className:"k-slider-track-wrap",style:{flexGrow:1,position:"relative",touchAction:"none",...te}},e.children&&c.createElement("ul",{className:"k-reset k-slider-items","aria-hidden":"true",style:{margin:0,...ne}},c.Children.map(e.children,(t,n)=>t&&c.cloneElement(t,{position:100*(t.props.position-e.min)/(e.max-e.min),vertical:l,firstTick:n===0,lastTick:n===c.Children.count(e.children)-1},t.props.children))),c.createElement("div",{className:"k-slider-track",style:l?{bottom:0,height:"100%"}:{[b==="rtl"?"right":"left"]:0,width:"100%"},ref:N},c.createElement("div",{className:"k-slider-selection",style:l?{height:C+"%"}:{width:C+"%"}}),c.createElement("span",{role:"slider","aria-valuemin":e.min,"aria-valuemax":e.max,"aria-valuenow":d,"aria-orientation":l?"vertical":void 0,"aria-disabled":m?"true":void 0,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy,"aria-label":e.ariaLabel||S.toLanguageString(r.sliderAriaLabel,r.messages[r.sliderAriaLabel]),tabIndex:s.getTabIndex(P,m,void 0),className:"k-draghandle k-draghandle-end",title:S.toLanguageString(r.sliderDragTitle,r.messages[r.sliderDragTitle]),style:T}))))}))});R.displayName="Slider";const _=s.createPropsContext(),V=s.withPropsContext(_,R);V.displayName="KendoReactSlider";V.propTypes={value:i.number,defaultValue:i.number,min:i.number.isRequired,max:i.number.isRequired,step:i.number,largeStep:i.number,onChange:i.func,style:i.object,className:i.string,buttons:i.bool,tabIndex:i.number,disabled:i.bool,vertical:i.bool,id:i.string,ariaDescribedBy:i.string,ariaLabelledBy:i.string,ariaLabel:i.string,dir:i.oneOf(["ltr","rtl"]),children:i.node};F.registerForLocalization(R);exports.Slider=V;exports.SliderPropsContext=_;exports.SliderWithoutContext=R;