@progress/kendo-react-inputs 9.0.0-develop.2 → 9.0.0-develop.20
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/README.md +63 -62
- package/colors/ColorContrastLabels.mjs +10 -1
- package/colors/ColorContrastSvg.mjs +14 -2
- package/colors/ColorInput.js +1 -1
- package/colors/ColorInput.mjs +15 -12
- package/colors/ColorPalette.js +1 -1
- package/colors/ColorPalette.mjs +13 -14
- package/colors/ColorPicker.mjs +62 -79
- package/colors/FlatColorPicker.mjs +68 -22
- package/colors/HexInput.js +1 -1
- package/colors/HexInput.mjs +9 -8
- package/colors/models/palette-presets.mjs +656 -12
- package/colors/utils/color-cache.js +1 -1
- package/colors/utils/color-cache.mjs +3 -6
- package/colors/utils/color-parser.js +1 -1
- package/colors/utils/color-parser.mjs +2 -5
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/index.d.mts +21 -87
- package/index.d.ts +21 -87
- package/index.js +1 -1
- package/index.mjs +65 -66
- package/input/Input.js +1 -1
- package/input/Input.mjs +144 -179
- package/input/InputClearValue.mjs +6 -11
- package/input/InputPrefix.mjs +17 -18
- package/input/InputSeparator.mjs +12 -10
- package/input/InputSuffix.mjs +17 -18
- package/input/InputValidationIcon.mjs +3 -1
- package/maskedtextbox/masking.service.js +1 -1
- package/maskedtextbox/masking.service.mjs +2 -2
- package/maskedtextbox/parsing/parsers.js +1 -1
- package/maskedtextbox/parsing/parsers.mjs +22 -23
- package/numerictextbox/NumericTextBox.mjs +259 -320
- package/numerictextbox/utils/index.mjs +16 -14
- package/package-metadata.mjs +1 -1
- package/package.json +9 -9
- package/radiobutton/RadioButton.mjs +7 -18
- package/radiobutton/RadioGroup.mjs +3 -6
- package/range-slider/RangeSlider.mjs +68 -62
- package/rating/Rating.mjs +73 -90
- package/rating/RatingItem.mjs +29 -50
- package/signature/Signature.mjs +60 -93
- package/slider/SliderLabel.mjs +6 -10
- package/switch/Switch.mjs +9 -5
- package/textarea/TextArea.mjs +19 -47
- 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}
|
|
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
|
-
}
|
|
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
|
-
}
|
|
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
|
-
}
|
|
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),
|
|
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
|
-
|
|
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,
|