@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
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t={};function o(c,a,e){t[c]={value:a,hsva:e}}function r(c,a,e){t[c]={value:a,rgba:e}}function n(c,a,e){t[c]={value:a,hex:e}}function h(c){delete t[c]}function d(c,a){if(c){const e=t[c];return e&&e.value===a?e.hex:void 0}else return}function i(c,a){if(c){const e=t[c];return e&&e.value===a?e.hsva:void 0}else return}function u(c,a){if(c){const e=t[c];return e&&e.value===a?e.rgba:void 0}else return}exports.cacheHex=n;exports.cacheHsva=o;exports.cacheRgba=r;exports.getCachedHex=d;exports.getCachedHsva=i;exports.getCachedRgba=u;exports.removeCachedColor=h;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t={};function o(c,a,e){t[c]={value:a,hsva:e}}function r(c,a,e){t[c]={value:a,rgba:e}}function n(c,a,e){t[c]={value:a,hex:e}}function h(c){delete t[c]}function d(c,a){if(c){const e=t[c];return e&&e.value===a?e.hex:void 0}}function i(c,a){if(c){const e=t[c];return e&&e.value===a?e.hsva:void 0}}function u(c,a){if(c){const e=t[c];return e&&e.value===a?e.rgba:void 0}}exports.cacheHex=n;exports.cacheHsva=o;exports.cacheRgba=r;exports.getCachedHex=d;exports.getCachedHsva=i;exports.getCachedRgba=u;exports.removeCachedColor=h;
@@ -23,22 +23,19 @@ function u(c, o) {
23
23
  if (c) {
24
24
  const e = a[c];
25
25
  return e && e.value === o ? e.hex : void 0;
26
- } else
27
- return;
26
+ }
28
27
  }
29
28
  function h(c, o) {
30
29
  if (c) {
31
30
  const e = a[c];
32
31
  return e && e.value === o ? e.hsva : void 0;
33
- } else
34
- return;
32
+ }
35
33
  }
36
34
  function v(c, o) {
37
35
  if (c) {
38
36
  const e = a[c];
39
37
  return e && e.value === o ? e.rgba : void 0;
40
- } else
41
- return;
38
+ }
42
39
  }
43
40
  export {
44
41
  r as cacheHex,
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@progress/kendo-drawing"),r=require("./misc.js"),m=(t,o,n=!0)=>{if(["hex","rgba"].indexOf(o)===-1)throw new Error(`Unsupported color output format '${o}'. The available options are 'hex' or 'rgba'.`);if(!r.isPresent(t))return;const s=a.parseColor(t.trim(),n);if(r.isPresent(s))return o==="hex"?s.toCss():s.toCssRgba()},p=(t,o=!0)=>{const n=a.parseColor(t,o);return r.isPresent(n)?n.toHSV():{}},C=(t,o=!0)=>{const n=a.parseColor(t,o);return r.isPresent(n)?n.toBytes():{}},B=t=>{const o=r.fitIntoBounds(t.h,0,359.9),n=r.fitIntoBounds(t.s,0,1),e=r.fitIntoBounds(t.v,0,1),s=r.fitIntoBounds(t.a,0,1);return a.Color.fromHSV(o,n,e,s).toCssRgba()},I=t=>B({h:t,s:1,v:1,a:1}),h=t=>{const o=r.fitIntoBounds(t.r,0,255),n=r.fitIntoBounds(t.g,0,255),e=r.fitIntoBounds(t.b,0,255),s=r.fitIntoBounds(t.a,0,1);return a.Color.fromBytes(o,n,e,s).toCssRgba()},i=(t,o)=>{const n=r.fitIntoBounds(t.r,0,255),e=r.fitIntoBounds(t.g,0,255),s=r.fitIntoBounds(t.b,0,255),u=r.fitIntoBounds(t.a,0,1),d=r.fitIntoBounds(o.r,0,255),l=r.fitIntoBounds(o.g,0,255),f=r.fitIntoBounds(o.b,0,255);return{r:Math.round((1-u)*d+u*n),g:Math.round((1-u)*l+u*e),b:Math.round((1-u)*f+u*s)}},c=t=>{let o=[t.r||0,t.g||0,t.b||0].map(function(n){return n/=255,n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)});return o[0]*.2126+o[1]*.7152+o[2]*.0722},g=(t,o)=>{const n=Math.max(t,o),e=Math.min(t,o);return(n+.05)/(e+.05)},R=(t,o)=>g(c(i(t,o)),c(i(o,{r:0,g:0,b:0,a:1})));exports.getColorFromHSV=B;exports.getColorFromHue=I;exports.getColorFromRGBA=h;exports.getContrast=g;exports.getContrastFromTwoRGBAs=R;exports.getHSV=p;exports.getLuminance=c;exports.getRGBA=C;exports.getRGBFromRGBA=i;exports.parseColor=m;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@progress/kendo-drawing"),r=require("./misc.js"),m=(t,o,n=!0)=>{if(["hex","rgba"].indexOf(o)===-1)throw new Error(`Unsupported color output format '${o}'. The available options are 'hex' or 'rgba'.`);if(!r.isPresent(t))return;const s=a.parseColor(t.trim(),n);if(r.isPresent(s))return o==="hex"?s.toCss():s.toCssRgba()},p=(t,o=!0)=>{const n=a.parseColor(t,o);return r.isPresent(n)?n.toHSV():{}},C=(t,o=!0)=>{const n=a.parseColor(t,o);return r.isPresent(n)?n.toBytes():{}},B=t=>{const o=r.fitIntoBounds(t.h,0,359.9),n=r.fitIntoBounds(t.s,0,1),e=r.fitIntoBounds(t.v,0,1),s=r.fitIntoBounds(t.a,0,1);return a.Color.fromHSV(o,n,e,s).toCssRgba()},I=t=>B({h:t,s:1,v:1,a:1}),h=t=>{const o=r.fitIntoBounds(t.r,0,255),n=r.fitIntoBounds(t.g,0,255),e=r.fitIntoBounds(t.b,0,255),s=r.fitIntoBounds(t.a,0,1);return a.Color.fromBytes(o,n,e,s).toCssRgba()},i=(t,o)=>{const n=r.fitIntoBounds(t.r,0,255),e=r.fitIntoBounds(t.g,0,255),s=r.fitIntoBounds(t.b,0,255),u=r.fitIntoBounds(t.a,0,1),d=r.fitIntoBounds(o.r,0,255),f=r.fitIntoBounds(o.g,0,255),l=r.fitIntoBounds(o.b,0,255);return{r:Math.round((1-u)*d+u*n),g:Math.round((1-u)*f+u*e),b:Math.round((1-u)*l+u*s)}},c=t=>{const o=[t.r||0,t.g||0,t.b||0].map(function(n){return n/=255,n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)});return o[0]*.2126+o[1]*.7152+o[2]*.0722},g=(t,o)=>{const n=Math.max(t,o),e=Math.min(t,o);return(n+.05)/(e+.05)},R=(t,o)=>g(c(i(t,o)),c(i(o,{r:0,g:0,b:0,a:1})));exports.getColorFromHSV=B;exports.getColorFromHue=I;exports.getColorFromRGBA=h;exports.getContrast=g;exports.getContrastFromTwoRGBAs=R;exports.getHSV=p;exports.getLuminance=c;exports.getRGBA=C;exports.getRGBFromRGBA=i;exports.parseColor=m;
@@ -36,17 +36,14 @@ const B = (t, r, o = !0) => {
36
36
  b: Math.round((1 - a) * l + a * n)
37
37
  };
38
38
  }, p = (t) => {
39
- let r = [t.r || 0, t.g || 0, t.b || 0].map(function(o) {
39
+ const r = [t.r || 0, t.g || 0, t.b || 0].map(function(o) {
40
40
  return o /= 255, o <= 0.03928 ? o / 12.92 : Math.pow((o + 0.055) / 1.055, 2.4);
41
41
  });
42
42
  return r[0] * 0.2126 + r[1] * 0.7152 + r[2] * 0.0722;
43
43
  }, b = (t, r) => {
44
44
  const o = Math.max(t, r), e = Math.min(t, r);
45
45
  return (o + 0.05) / (e + 0.05);
46
- }, M = (t, r) => b(
47
- p(i(t, r)),
48
- p(i(r, { r: 0, g: 0, b: 0, a: 1 }))
49
- );
46
+ }, M = (t, r) => b(p(i(t, r)), p(i(r, { r: 0, g: 0, b: 0, a: 1 })));
50
47
  export {
51
48
  C as getColorFromHSV,
52
49
  w as getColorFromHue,