@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.
- 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 +12 -9
- 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/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 +1 -1
- package/index.d.ts +1 -1
- package/input/Input.js +1 -1
- package/input/Input.mjs +14 -10
- 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 +8 -8
- 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
|
@@ -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(
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
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(
|
|
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(
|
|
206
|
-
|
|
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,
|