@progress/kendo-react-inputs 9.0.0-develop.2 → 9.0.0-develop.4

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 (42) hide show
  1. package/README.md +63 -62
  2. package/colors/ColorContrastLabels.mjs +10 -1
  3. package/colors/ColorContrastSvg.mjs +14 -2
  4. package/colors/ColorInput.js +1 -1
  5. package/colors/ColorInput.mjs +12 -9
  6. package/colors/ColorPalette.js +1 -1
  7. package/colors/ColorPalette.mjs +13 -14
  8. package/colors/ColorPicker.mjs +62 -79
  9. package/colors/FlatColorPicker.mjs +68 -22
  10. package/colors/models/palette-presets.mjs +656 -12
  11. package/colors/utils/color-cache.js +1 -1
  12. package/colors/utils/color-cache.mjs +3 -6
  13. package/colors/utils/color-parser.js +1 -1
  14. package/colors/utils/color-parser.mjs +2 -5
  15. package/dist/cdn/js/kendo-react-inputs.js +1 -1
  16. package/index.d.mts +1 -1
  17. package/index.d.ts +1 -1
  18. package/input/Input.js +1 -1
  19. package/input/Input.mjs +14 -10
  20. package/input/InputClearValue.mjs +6 -11
  21. package/input/InputPrefix.mjs +17 -18
  22. package/input/InputSeparator.mjs +12 -10
  23. package/input/InputSuffix.mjs +17 -18
  24. package/input/InputValidationIcon.mjs +3 -1
  25. package/maskedtextbox/masking.service.js +1 -1
  26. package/maskedtextbox/masking.service.mjs +2 -2
  27. package/maskedtextbox/parsing/parsers.js +1 -1
  28. package/maskedtextbox/parsing/parsers.mjs +22 -23
  29. package/numerictextbox/NumericTextBox.mjs +259 -320
  30. package/numerictextbox/utils/index.mjs +16 -14
  31. package/package-metadata.mjs +1 -1
  32. package/package.json +8 -8
  33. package/radiobutton/RadioButton.mjs +7 -18
  34. package/radiobutton/RadioGroup.mjs +3 -6
  35. package/range-slider/RangeSlider.mjs +68 -62
  36. package/rating/Rating.mjs +73 -90
  37. package/rating/RatingItem.mjs +29 -50
  38. package/signature/Signature.mjs +60 -93
  39. package/slider/SliderLabel.mjs +6 -10
  40. package/switch/Switch.mjs +9 -5
  41. package/textarea/TextArea.mjs +19 -47
  42. package/textbox/Textbox.mjs +37 -55
@@ -18,22 +18,25 @@ import { useLocalization as ae } from "@progress/kendo-react-intl";
18
18
  import { flatColorPickerColorGradientBtn as I, messages as m, flatColorPickerColorPaletteBtn as G, flatColorPickerClearBtn as L, flatColorPickerCancelBtn as te, flatColorPickerApplyBtn as oe } from "../messages/index.mjs";
19
19
  const S = e.forwardRef((a, x) => {
20
20
  q(ee);
21
- const v = e.useRef(null), C = e.useRef(null), R = e.useRef(null), { defaultValue: r, showButtons: k = !0, showPreview: V = !0, showClearButton: F = !0 } = a, [c, T] = e.useState((a.view || "ColorGradient") === "ColorGradient"), [l, s] = e.useState(a.value || r || void 0), [i, b] = e.useState(a.value || r || void 0), f = a.value !== void 0 ? a.value : void 0;
21
+ const v = e.useRef(null), C = e.useRef(null), R = e.useRef(null), { defaultValue: r, showButtons: k = !0, showPreview: V = !0, showClearButton: F = !0 } = a, [c, T] = e.useState(
22
+ (a.view || "ColorGradient") === "ColorGradient"
23
+ ), [l, s] = e.useState(a.value || r || void 0), [i, b] = e.useState(a.value || r || void 0), f = a.value !== void 0 ? a.value : void 0;
22
24
  e.useEffect(() => {
23
25
  s(a.value);
24
26
  }, [a.value]);
25
- const g = ae(), y = e.useCallback(
26
- () => {
27
- v.current && v.current.focus();
28
- },
29
- [v]
30
- );
31
- e.useImperativeHandle(v, () => ({
32
- element: C.current,
33
- focus: y,
34
- props: a,
35
- value: f
36
- }), [f, y, a]), e.useImperativeHandle(x, () => v.current);
27
+ const g = ae(), y = e.useCallback(() => {
28
+ v.current && v.current.focus();
29
+ }, [v]);
30
+ e.useImperativeHandle(
31
+ v,
32
+ () => ({
33
+ element: C.current,
34
+ focus: y,
35
+ props: a,
36
+ value: f
37
+ }),
38
+ [f, y, a]
39
+ ), e.useImperativeHandle(x, () => v.current);
37
40
  const w = e.useCallback(
38
41
  (t) => {
39
42
  (t === "ColorGradient" && !c || t === "ColorPalette" && c) && T(!c);
@@ -75,12 +78,9 @@ const S = e.forwardRef((a, x) => {
75
78
  }
76
79
  },
77
80
  [l, a.onChange]
78
- ), K = e.useCallback(
79
- () => {
80
- s(i);
81
- },
82
- [i]
83
- ), z = e.useCallback(
81
+ ), K = e.useCallback(() => {
82
+ s(i);
83
+ }, [i]), z = e.useCallback(
84
84
  (t) => {
85
85
  if (s(i), a.onPreviewChange) {
86
86
  const n = {
@@ -190,7 +190,36 @@ const S = e.forwardRef((a, x) => {
190
190
  icon: "droplet-slash",
191
191
  svgIcon: Z
192
192
  }
193
- ), V && /* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-preview k-vstack" }, /* @__PURE__ */ e.createElement("span", { className: E("k-coloreditor-preview-color", "k-color-preview", { "k-no-color": f === void 0 }) }, /* @__PURE__ */ e.createElement("span", { className: "k-color-preview-mask", style: { background: l || void 0 } })), /* @__PURE__ */ e.createElement("span", { className: E("k-coloreditor-current-color", "k-color-preview", { "k-no-color": i === void 0 }), onClick: z }, /* @__PURE__ */ e.createElement("span", { className: "k-color-preview-mask", style: { background: i || void 0 } }))))),
193
+ ), V && /* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-preview k-vstack" }, /* @__PURE__ */ e.createElement(
194
+ "span",
195
+ {
196
+ className: E("k-coloreditor-preview-color", "k-color-preview", {
197
+ "k-no-color": f === void 0
198
+ })
199
+ },
200
+ /* @__PURE__ */ e.createElement(
201
+ "span",
202
+ {
203
+ className: "k-color-preview-mask",
204
+ style: { background: l || void 0 }
205
+ }
206
+ )
207
+ ), /* @__PURE__ */ e.createElement(
208
+ "span",
209
+ {
210
+ className: E("k-coloreditor-current-color", "k-color-preview", {
211
+ "k-no-color": i === void 0
212
+ }),
213
+ onClick: z
214
+ },
215
+ /* @__PURE__ */ e.createElement(
216
+ "span",
217
+ {
218
+ className: "k-color-preview-mask",
219
+ style: { background: i || void 0 }
220
+ }
221
+ )
222
+ )))),
194
223
  /* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-views k-vstack" }, c ? /* @__PURE__ */ e.createElement(
195
224
  p,
196
225
  {
@@ -202,8 +231,25 @@ const S = e.forwardRef((a, x) => {
202
231
  opacity: a.opacity,
203
232
  format: a.format
204
233
  }
205
- ) : /* @__PURE__ */ e.createElement($, { ariaDisabled: !0, ariaLabelledBy: "required_label", value: l, onChange: P })),
206
- k && /* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-footer k-actions k-actions-end k-actions-horizontal" }, /* @__PURE__ */ e.createElement(u, { type: "button", className: "k-coloreditor-cancel", onClick: K }, m[te]), /* @__PURE__ */ e.createElement(u, { type: "button", themeColor: "primary", className: "k-coloreditor-apply", onClick: M }, m[oe]))
234
+ ) : /* @__PURE__ */ e.createElement(
235
+ $,
236
+ {
237
+ ariaDisabled: !0,
238
+ ariaLabelledBy: "required_label",
239
+ value: l,
240
+ onChange: P
241
+ }
242
+ )),
243
+ k && /* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-footer k-actions k-actions-end k-actions-horizontal" }, /* @__PURE__ */ e.createElement(u, { type: "button", className: "k-coloreditor-cancel", onClick: K }, m[te]), /* @__PURE__ */ e.createElement(
244
+ u,
245
+ {
246
+ type: "button",
247
+ themeColor: "primary",
248
+ className: "k-coloreditor-apply",
249
+ onClick: M
250
+ },
251
+ m[oe]
252
+ ))
207
253
  );
208
254
  }), le = {
209
255
  id: o.string,