@progress/kendo-react-inputs 13.3.0 → 13.4.0-develop.2
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/checkbox/Checkbox.d.ts +49 -0
- package/checkbox/Checkbox.js +1 -1
- package/checkbox/Checkbox.mjs +35 -36
- package/checkbox/interfaces/CheckboxBlurEvent.d.ts +14 -0
- package/checkbox/interfaces/CheckboxChangeEvent.d.ts +18 -0
- package/checkbox/interfaces/CheckboxFocusEvent.d.ts +14 -0
- package/checkbox/interfaces/CheckboxProps.d.ts +148 -0
- package/colors/ColorContrastLabels.d.ts +22 -0
- package/colors/ColorContrastSvg.d.ts +25 -0
- package/colors/ColorGradient.d.ts +215 -0
- package/colors/ColorGradient.js +1 -1
- package/colors/ColorGradient.mjs +20 -19
- package/colors/ColorInput.d.ts +40 -0
- package/colors/ColorInput.js +1 -1
- package/colors/ColorInput.mjs +20 -16
- package/colors/ColorPalette.d.ts +129 -0
- package/colors/ColorPalette.js +1 -1
- package/colors/ColorPalette.mjs +7 -7
- package/colors/ColorPicker.d.ts +34 -0
- package/colors/ColorPicker.js +1 -1
- package/colors/ColorPicker.mjs +96 -94
- package/colors/FlatColorPicker.d.ts +189 -0
- package/colors/FlatColorPicker.js +1 -1
- package/colors/FlatColorPicker.mjs +41 -40
- package/colors/HexInput.d.ts +39 -0
- package/colors/HexInput.js +1 -1
- package/colors/HexInput.mjs +2 -1
- package/colors/Picker.d.ts +13 -0
- package/colors/interfaces/ColorGradientChangeEvent.d.ts +18 -0
- package/colors/interfaces/ColorGradientProps.d.ts +160 -0
- package/colors/interfaces/ColorPaletteChangeEvent.d.ts +22 -0
- package/colors/interfaces/ColorPaletteProps.d.ts +116 -0
- package/colors/interfaces/ColorPickerActiveColorClick.d.ts +29 -0
- package/colors/interfaces/ColorPickerBlurEvent.d.ts +20 -0
- package/colors/interfaces/ColorPickerChangeEvent.d.ts +29 -0
- package/colors/interfaces/ColorPickerFocusEvent.d.ts +20 -0
- package/colors/interfaces/ColorPickerGradientSettings.d.ts +29 -0
- package/colors/interfaces/ColorPickerPaletteSettings.d.ts +39 -0
- package/colors/interfaces/ColorPickerPopupSettings.d.ts +21 -0
- package/colors/interfaces/ColorPickerProps.d.ts +242 -0
- package/colors/interfaces/ColorPickerView.d.ts +17 -0
- package/colors/interfaces/PickerPopupSettings.d.ts +29 -0
- package/colors/interfaces/PickerProps.d.ts +57 -0
- package/colors/models/hsva.d.ts +16 -0
- package/colors/models/output-format.d.ts +11 -0
- package/colors/models/palette-presets.d.ts +60 -0
- package/colors/models/rgb.d.ts +15 -0
- package/colors/models/rgba.d.ts +16 -0
- package/colors/models/table-cell.d.ts +14 -0
- package/colors/models/tile-size.d.ts +18 -0
- package/colors/utils/color-cache.d.ts +37 -0
- package/colors/utils/color-palette.service.d.ts +19 -0
- package/colors/utils/color-parser.d.ts +72 -0
- package/colors/utils/color-parser.js +1 -1
- package/colors/utils/color-parser.mjs +1 -1
- package/colors/utils/misc.d.ts +23 -0
- package/colors/utils/svg-calc.d.ts +69 -0
- package/common/AdaptiveMode.d.ts +21 -0
- package/common/SliderTooltip.d.ts +25 -0
- package/common/SwitchController.d.ts +38 -0
- package/common/SwitchModel.d.ts +14 -0
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/index.d.mts +72 -5128
- package/index.d.ts +72 -5128
- package/input/Input.d.ts +119 -0
- package/input/Input.js +1 -1
- package/input/Input.mjs +45 -43
- package/input/InputClearValue.d.ts +28 -0
- package/input/InputPrefix.d.ts +30 -0
- package/input/InputSeparator.d.ts +30 -0
- package/input/InputSuffix.d.ts +32 -0
- package/input/InputValidationIcon.d.ts +21 -0
- package/input/interfaces/InputChangeEvent.d.ts +18 -0
- package/interfaces/Direction.d.ts +8 -0
- package/interfaces/ToggleBaseProps.d.ts +24 -0
- package/maskedtextbox/MaskedTextBox.d.ts +224 -0
- package/maskedtextbox/MaskedTextBox.js +1 -1
- package/maskedtextbox/MaskedTextBox.mjs +80 -79
- package/maskedtextbox/MaskedTextBoxProps.d.ts +273 -0
- package/maskedtextbox/masking.service.d.ts +48 -0
- package/maskedtextbox/masking.service.mjs +9 -9
- package/maskedtextbox/parsing/combinators.d.ts +16 -0
- package/maskedtextbox/parsing/parsers.d.ts +54 -0
- package/maskedtextbox/parsing/result.d.ts +30 -0
- package/maskedtextbox/parsing/stream.d.ts +29 -0
- package/maskedtextbox/utils.d.ts +23 -0
- package/messages/index.d.ts +177 -0
- package/numerictextbox/NumericTextBox.d.ts +21 -0
- package/numerictextbox/NumericTextBox.js +1 -1
- package/numerictextbox/NumericTextBox.mjs +161 -161
- package/numerictextbox/interfaces/NumericTextBoxBlurEvent.d.ts +14 -0
- package/numerictextbox/interfaces/NumericTextBoxChangeEvent.d.ts +18 -0
- package/numerictextbox/interfaces/NumericTextBoxFocusEvent.d.ts +14 -0
- package/numerictextbox/interfaces/NumericTextBoxHandle.d.ts +46 -0
- package/numerictextbox/interfaces/NumericTextBoxProps.d.ts +212 -0
- package/numerictextbox/interfaces/NumericTextBoxState.d.ts +22 -0
- package/numerictextbox/utils/index.d.ts +126 -0
- package/package-metadata.d.ts +12 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +10 -16
- package/package.json +10 -10
- package/radiobutton/RadioButton.d.ts +36 -0
- package/radiobutton/RadioButton.js +1 -1
- package/radiobutton/RadioButton.mjs +8 -8
- package/radiobutton/RadioGroup.d.ts +36 -0
- package/radiobutton/interfaces/RadioButtonBlurEvent.d.ts +14 -0
- package/radiobutton/interfaces/RadioButtonChangeEvent.d.ts +18 -0
- package/radiobutton/interfaces/RadioButtonFocusEvent.d.ts +14 -0
- package/radiobutton/interfaces/RadioButtonProps.d.ts +107 -0
- package/radiobutton/interfaces/RadioGroupChangeEvent.d.ts +18 -0
- package/radiobutton/interfaces/RadioGroupFocusEvent.d.ts +14 -0
- package/radiobutton/interfaces/RadioGroupProps.d.ts +178 -0
- package/range-slider/RangeSlider.d.ts +152 -0
- package/range-slider/range-raducer.d.ts +46 -0
- package/rating/Rating.d.ts +302 -0
- package/rating/Rating.mjs +3 -3
- package/rating/RatingItem.d.ts +111 -0
- package/rating/models/index.d.ts +91 -0
- package/rating/rating-reducer.d.ts +39 -0
- package/rating/utils/index.d.ts +31 -0
- package/signature/Signature.d.ts +21 -0
- package/signature/Signature.js +1 -1
- package/signature/Signature.mjs +26 -23
- package/signature/interfaces/SignatureBlurEvent.d.ts +14 -0
- package/signature/interfaces/SignatureChangeEvent.d.ts +18 -0
- package/signature/interfaces/SignatureCloseEvent.d.ts +14 -0
- package/signature/interfaces/SignatureFocusEvent.d.ts +14 -0
- package/signature/interfaces/SignatureHandle.d.ts +49 -0
- package/signature/interfaces/SignatureOpenEvent.d.ts +14 -0
- package/signature/interfaces/SignatureProps.d.ts +324 -0
- package/signature/interfaces/index.d.ts +14 -0
- package/signature/utils/index.d.ts +11 -0
- package/slider/Slider.d.ts +288 -0
- package/slider/Slider.mjs +9 -9
- package/slider/SliderLabel.d.ts +51 -0
- package/switch/Switch.d.ts +397 -0
- package/switch/Switch.js +1 -1
- package/switch/Switch.mjs +29 -22
- package/textarea/TextArea.d.ts +40 -0
- package/textarea/TextArea.js +1 -1
- package/textarea/TextArea.mjs +41 -41
- package/textarea/interfaces/TextAreaBlurEvent.d.ts +14 -0
- package/textarea/interfaces/TextAreaChangeEvent.d.ts +18 -0
- package/textarea/interfaces/TextAreaFocusEvent.d.ts +14 -0
- package/textarea/interfaces/TextAreaProps.d.ts +199 -0
- package/textbox/Textbox.d.ts +99 -0
- package/textbox/Textbox.js +1 -1
- package/textbox/Textbox.mjs +70 -66
- package/utils.d.ts +11 -0
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as a from "react";
|
|
9
9
|
import l from "prop-types";
|
|
10
|
-
import { validatePackage as
|
|
10
|
+
import { validatePackage as le, getLicenseMessage as ne, Navigation as oe, getActiveElement as _, disableNavigatableContainer as K, focusFirstFocusableChild as ie, enableNavigatableContainer as re, keepFocusInContainer as ce, classNames as M, getTabIndex as se, kendoThemeMaps as de, WatermarkOverlay as ve } from "@progress/kendo-react-common";
|
|
11
11
|
import { ButtonGroup as L, Button as d } from "@progress/kendo-react-buttons";
|
|
12
|
-
import { dropletSliderIcon as V, paletteIcon as G, dropletSlashIcon as
|
|
13
|
-
import { ColorPalette as
|
|
14
|
-
import { ColorGradient as
|
|
12
|
+
import { dropletSliderIcon as V, paletteIcon as G, dropletSlashIcon as ue } from "@progress/kendo-svg-icons";
|
|
13
|
+
import { ColorPalette as ge } from "./ColorPalette.mjs";
|
|
14
|
+
import { ColorGradient as me } from "./ColorGradient.mjs";
|
|
15
15
|
import { packageMetadata as O } from "../package-metadata.mjs";
|
|
16
|
-
import { useLocalization as
|
|
17
|
-
import { flatColorPickerColorGradientBtn as k, messages as v, flatColorPickerColorPaletteBtn as C, flatColorPickerClearBtn as T, flatColorPickerApplyBtn as
|
|
16
|
+
import { useLocalization as ke } from "@progress/kendo-react-intl";
|
|
17
|
+
import { flatColorPickerColorGradientBtn as k, messages as v, flatColorPickerColorPaletteBtn as C, flatColorPickerClearBtn as T, flatColorPickerApplyBtn as Ce, flatColorPickerCancelBtn as fe } from "../messages/index.mjs";
|
|
18
18
|
const D = a.forwardRef((e, H) => {
|
|
19
|
-
const W = !
|
|
19
|
+
const W = !le(O, { component: "FlatColorPicker" }), q = ne(O), f = a.useRef(null), y = a.useRef(null), $ = a.useRef(null), {
|
|
20
20
|
defaultValue: b,
|
|
21
21
|
showButtons: w = !0,
|
|
22
22
|
showPreview: j = !0,
|
|
@@ -24,8 +24,9 @@ const D = a.forwardRef((e, H) => {
|
|
|
24
24
|
view: h = e.views ? void 0 : "ColorGradient",
|
|
25
25
|
views: r = h ? void 0 : ["gradient", "palette"],
|
|
26
26
|
activeView: P = "gradient",
|
|
27
|
-
size: o =
|
|
28
|
-
|
|
27
|
+
size: o = void 0,
|
|
28
|
+
rounded: Q = void 0
|
|
29
|
+
} = e, [u, U] = a.useState(
|
|
29
30
|
(h || "ColorGradient") === "ColorGradient"
|
|
30
31
|
), [s, x] = a.useState(
|
|
31
32
|
(r != null ? r : [])[0] === "gradient" && P === "gradient"
|
|
@@ -33,7 +34,7 @@ const D = a.forwardRef((e, H) => {
|
|
|
33
34
|
a.useEffect(() => {
|
|
34
35
|
E(e.value);
|
|
35
36
|
}, [e.value]);
|
|
36
|
-
const m =
|
|
37
|
+
const m = ke(), R = a.useCallback(() => {
|
|
37
38
|
f.current && f.current.focus();
|
|
38
39
|
}, [f]);
|
|
39
40
|
a.useImperativeHandle(
|
|
@@ -48,7 +49,7 @@ const D = a.forwardRef((e, H) => {
|
|
|
48
49
|
), a.useImperativeHandle(H, () => f.current);
|
|
49
50
|
const A = a.useCallback(
|
|
50
51
|
(t) => {
|
|
51
|
-
(t === "ColorGradient" && !u || t === "ColorPalette" && u) &&
|
|
52
|
+
(t === "ColorGradient" && !u || t === "ColorPalette" && u) && U(!u);
|
|
52
53
|
},
|
|
53
54
|
[u]
|
|
54
55
|
), N = a.useCallback(
|
|
@@ -56,7 +57,7 @@ const D = a.forwardRef((e, H) => {
|
|
|
56
57
|
t === "gradient" && !s || t === "palette" && s || t === "palette" && P === "gradient" ? x(!s) : t === "gradient" && P === "palette" && x(!0);
|
|
57
58
|
},
|
|
58
59
|
[P, s]
|
|
59
|
-
),
|
|
60
|
+
), X = a.useCallback(
|
|
60
61
|
(t) => {
|
|
61
62
|
var c;
|
|
62
63
|
const n = b || void 0;
|
|
@@ -84,7 +85,7 @@ const D = a.forwardRef((e, H) => {
|
|
|
84
85
|
(n = e._gradientSettings) != null && n._adaptive && e.setAdaptiveModeValue && e.setAdaptiveModeValue(t.value);
|
|
85
86
|
},
|
|
86
87
|
[e.onPreviewChange]
|
|
87
|
-
),
|
|
88
|
+
), Y = a.useCallback(
|
|
88
89
|
(t) => {
|
|
89
90
|
if (i !== void 0 && I(i), e.onChange) {
|
|
90
91
|
const n = {
|
|
@@ -96,9 +97,9 @@ const D = a.forwardRef((e, H) => {
|
|
|
96
97
|
}
|
|
97
98
|
},
|
|
98
99
|
[i, e.onChange]
|
|
99
|
-
),
|
|
100
|
+
), Z = a.useCallback(() => {
|
|
100
101
|
E(g), e.setOpen && e.setOpen(!1);
|
|
101
|
-
}, [g]),
|
|
102
|
+
}, [g]), p = a.useCallback(
|
|
102
103
|
(t) => {
|
|
103
104
|
if (E(g), e.onPreviewChange) {
|
|
104
105
|
const n = {
|
|
@@ -110,28 +111,28 @@ const D = a.forwardRef((e, H) => {
|
|
|
110
111
|
}
|
|
111
112
|
},
|
|
112
113
|
[g, e.onPreviewChange]
|
|
113
|
-
),
|
|
114
|
+
), ee = a.useCallback(
|
|
114
115
|
(t) => {
|
|
115
116
|
var c, S;
|
|
116
117
|
if ((!t.relatedTarget || !((c = y.current) != null && c.contains(t.relatedTarget))) && !((S = e._gradientSettings) != null && S._adaptive) && (!w && i !== void 0 && I(i), !w && e.onChange)) {
|
|
117
|
-
const
|
|
118
|
+
const te = {
|
|
118
119
|
value: i,
|
|
119
120
|
nativeEvent: t.nativeEvent,
|
|
120
121
|
syntheticEvent: t
|
|
121
122
|
};
|
|
122
|
-
e.onChange.call(void 0,
|
|
123
|
+
e.onChange.call(void 0, te);
|
|
123
124
|
}
|
|
124
125
|
},
|
|
125
126
|
[i, w, e.onChange]
|
|
126
127
|
), z = a.useMemo(
|
|
127
|
-
() => new
|
|
128
|
+
() => new oe({
|
|
128
129
|
root: y,
|
|
129
130
|
selectors: [".k-coloreditor"],
|
|
130
131
|
tabIndex: 0,
|
|
131
132
|
keyboardEvents: {
|
|
132
133
|
keydown: {
|
|
133
134
|
Tab: (t, n, c) => {
|
|
134
|
-
_(document) === t ? K(t) :
|
|
135
|
+
_(document) === t ? K(t) : ce(c, t);
|
|
135
136
|
},
|
|
136
137
|
Enter: (t, n, c) => {
|
|
137
138
|
_(document) === t && (ie(t), re(t));
|
|
@@ -143,7 +144,7 @@ const D = a.forwardRef((e, H) => {
|
|
|
143
144
|
}
|
|
144
145
|
}),
|
|
145
146
|
[]
|
|
146
|
-
),
|
|
147
|
+
), ae = a.useCallback(z.triggerKeyboardEvent.bind(z), []);
|
|
147
148
|
return /* @__PURE__ */ a.createElement(
|
|
148
149
|
"div",
|
|
149
150
|
{
|
|
@@ -154,17 +155,17 @@ const D = a.forwardRef((e, H) => {
|
|
|
154
155
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
155
156
|
style: { position: "relative", ...e.style },
|
|
156
157
|
ref: y,
|
|
157
|
-
tabIndex:
|
|
158
|
+
tabIndex: se(e.tabIndex, e.disabled),
|
|
158
159
|
className: M(
|
|
159
160
|
"k-flatcolorpicker k-coloreditor",
|
|
160
161
|
{
|
|
161
|
-
[`k-coloreditor-${
|
|
162
|
+
[`k-coloreditor-${de.sizeMap[o] || o}`]: o,
|
|
162
163
|
"k-disabled": e.disabled
|
|
163
164
|
},
|
|
164
165
|
e.className
|
|
165
166
|
),
|
|
166
|
-
onBlur:
|
|
167
|
-
onKeyDown:
|
|
167
|
+
onBlur: ee,
|
|
168
|
+
onKeyDown: ae
|
|
168
169
|
},
|
|
169
170
|
e.header || /* @__PURE__ */ a.createElement("div", { className: "k-coloreditor-header k-hstack" }, /* @__PURE__ */ a.createElement("div", { className: "k-coloreditor-header-actions k-hstack" }, r && r[0] === "gradient" && r[1] === "palette" && /* @__PURE__ */ a.createElement(L, { className: "k-button-group-flat" }, /* @__PURE__ */ a.createElement(
|
|
170
171
|
d,
|
|
@@ -175,8 +176,8 @@ const D = a.forwardRef((e, H) => {
|
|
|
175
176
|
v[k]
|
|
176
177
|
),
|
|
177
178
|
togglable: !0,
|
|
178
|
-
fillMode: "flat",
|
|
179
179
|
size: o,
|
|
180
|
+
fillMode: "flat",
|
|
180
181
|
svgIcon: V,
|
|
181
182
|
selected: s,
|
|
182
183
|
onClick: () => N("gradient")
|
|
@@ -190,8 +191,8 @@ const D = a.forwardRef((e, H) => {
|
|
|
190
191
|
v[C]
|
|
191
192
|
),
|
|
192
193
|
togglable: !0,
|
|
193
|
-
fillMode: "flat",
|
|
194
194
|
size: o,
|
|
195
|
+
fillMode: "flat",
|
|
195
196
|
svgIcon: G,
|
|
196
197
|
selected: !s,
|
|
197
198
|
onClick: () => N("palette")
|
|
@@ -264,13 +265,13 @@ const D = a.forwardRef((e, H) => {
|
|
|
264
265
|
type: "button",
|
|
265
266
|
fillMode: "flat",
|
|
266
267
|
size: o,
|
|
267
|
-
onClick:
|
|
268
|
+
onClick: X,
|
|
268
269
|
"aria-label": m.toLanguageString(
|
|
269
270
|
T,
|
|
270
271
|
v[T]
|
|
271
272
|
),
|
|
272
273
|
icon: "droplet-slash",
|
|
273
|
-
svgIcon:
|
|
274
|
+
svgIcon: ue
|
|
274
275
|
}
|
|
275
276
|
), j && /* @__PURE__ */ a.createElement("div", { className: "k-coloreditor-preview k-vstack" }, /* @__PURE__ */ a.createElement(
|
|
276
277
|
"span",
|
|
@@ -292,7 +293,7 @@ const D = a.forwardRef((e, H) => {
|
|
|
292
293
|
className: M("k-coloreditor-current-color", "k-color-preview", {
|
|
293
294
|
"k-no-color": g === void 0
|
|
294
295
|
}),
|
|
295
|
-
onClick:
|
|
296
|
+
onClick: p
|
|
296
297
|
},
|
|
297
298
|
/* @__PURE__ */ a.createElement(
|
|
298
299
|
"span",
|
|
@@ -301,9 +302,9 @@ const D = a.forwardRef((e, H) => {
|
|
|
301
302
|
style: { background: g || void 0 }
|
|
302
303
|
}
|
|
303
304
|
)
|
|
304
|
-
))), W && /* @__PURE__ */ a.createElement(
|
|
305
|
+
))), W && /* @__PURE__ */ a.createElement(ve, { message: q })),
|
|
305
306
|
/* @__PURE__ */ a.createElement("div", { className: "k-coloreditor-views k-vstack" }, (h && u || r && s) && /* @__PURE__ */ a.createElement(
|
|
306
|
-
|
|
307
|
+
me,
|
|
307
308
|
{
|
|
308
309
|
ref: $,
|
|
309
310
|
role: "none",
|
|
@@ -313,11 +314,12 @@ const D = a.forwardRef((e, H) => {
|
|
|
313
314
|
opacity: e.opacity,
|
|
314
315
|
format: e.format,
|
|
315
316
|
size: o,
|
|
317
|
+
rounded: Q,
|
|
316
318
|
_adaptive: e._gradientSettings ? e._gradientSettings._adaptive : void 0,
|
|
317
319
|
...e._gradientSettings
|
|
318
320
|
}
|
|
319
321
|
), (h && !u || r && !s) && /* @__PURE__ */ a.createElement(
|
|
320
|
-
|
|
322
|
+
ge,
|
|
321
323
|
{
|
|
322
324
|
ariaDisabled: !0,
|
|
323
325
|
ariaLabelledBy: "required_label",
|
|
@@ -333,13 +335,12 @@ const D = a.forwardRef((e, H) => {
|
|
|
333
335
|
type: "button",
|
|
334
336
|
themeColor: "primary",
|
|
335
337
|
className: "k-coloreditor-apply",
|
|
336
|
-
|
|
337
|
-
onClick: X
|
|
338
|
+
onClick: Y
|
|
338
339
|
},
|
|
339
|
-
v[
|
|
340
|
-
), /* @__PURE__ */ a.createElement(d, { type: "button", className: "k-coloreditor-cancel",
|
|
340
|
+
v[Ce]
|
|
341
|
+
), /* @__PURE__ */ a.createElement(d, { type: "button", className: "k-coloreditor-cancel", onClick: Z }, v[fe]))
|
|
341
342
|
);
|
|
342
|
-
}),
|
|
343
|
+
}), be = {
|
|
343
344
|
id: l.string,
|
|
344
345
|
style: l.any,
|
|
345
346
|
className: l.string,
|
|
@@ -359,10 +360,10 @@ const D = a.forwardRef((e, H) => {
|
|
|
359
360
|
showPreview: l.bool,
|
|
360
361
|
showButtons: l.bool,
|
|
361
362
|
views: l.array,
|
|
362
|
-
size: l.oneOf([
|
|
363
|
+
size: l.oneOf(["small", "medium", "large"])
|
|
363
364
|
};
|
|
364
365
|
D.displayName = "KendoFlatColorPicker";
|
|
365
|
-
D.propTypes =
|
|
366
|
+
D.propTypes = be;
|
|
366
367
|
export {
|
|
367
368
|
D as FlatColorPicker
|
|
368
369
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export interface HexInputProps {
|
|
13
|
+
hex: string;
|
|
14
|
+
onHexChange: any;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
size?: 'small' | 'medium' | 'large';
|
|
17
|
+
fillMode?: 'solid' | 'outline' | 'flat';
|
|
18
|
+
rounded?: 'small' | 'medium' | 'large' | 'full';
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @hidden
|
|
22
|
+
*/
|
|
23
|
+
export interface HexInputState {
|
|
24
|
+
originalHex: string;
|
|
25
|
+
hex: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @hidden
|
|
29
|
+
*/
|
|
30
|
+
export default class HexInput extends React.Component<HexInputProps, HexInputState> {
|
|
31
|
+
constructor(props: HexInputProps);
|
|
32
|
+
render(): React.JSX.Element;
|
|
33
|
+
static getDerivedStateFromProps(props: HexInputProps, state: HexInputState): {
|
|
34
|
+
hex: string;
|
|
35
|
+
originalHex: string;
|
|
36
|
+
} | null;
|
|
37
|
+
private onChange;
|
|
38
|
+
private onBlur;
|
|
39
|
+
}
|
package/colors/HexInput.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";const l=require("react"),
|
|
8
|
+
"use strict";const l=require("react"),i=require("./utils/color-parser.js"),n=require("./utils/misc.js"),h=require("../textbox/Textbox.js");function u(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const a=u(l);class c extends a.Component{constructor(e){super(e),this.onChange=t=>{const s=t.target.value,o=i.parseColor(s,"rgba");this.setState({hex:s}),n.isPresent(o)&&this.props.onHexChange(s,o,t)},this.onBlur=()=>{n.isPresent(i.parseColor(this.state.hex,"rgba"))||this.setState({hex:this.state.originalHex})},this.state={hex:this.props.hex,originalHex:this.props.hex}}render(){return a.createElement(h.TextBox,{value:this.state.hex,onChange:this.onChange,onBlur:this.onBlur,disabled:this.props.disabled,className:"k-hex-value",size:this.props.size,fillMode:this.props.fillMode,rounded:this.props.rounded})}static getDerivedStateFromProps(e,t){return e.hex!==t.originalHex?{hex:e.hex,originalHex:e.hex}:null}}module.exports=c;
|
package/colors/HexInput.mjs
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { PickerProps } from './interfaces/PickerProps.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export declare const Picker: React.FunctionComponent<PickerProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { BaseEvent } from '@progress/kendo-react-common';
|
|
9
|
+
import { ColorGradient } from '../ColorGradient.js';
|
|
10
|
+
/**
|
|
11
|
+
* The arguments for the `onChange` ColorGradient event.
|
|
12
|
+
*/
|
|
13
|
+
export interface ColorGradientChangeEvent extends BaseEvent<ColorGradient> {
|
|
14
|
+
/**
|
|
15
|
+
* The current value of the ColorGradient.
|
|
16
|
+
*/
|
|
17
|
+
value: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ColorGradientChangeEvent } from './ColorGradientChangeEvent.js';
|
|
9
|
+
/**
|
|
10
|
+
* Represents the props of the [KendoReact ColorGradient component](https://www.telerik.com/kendo-react-ui/components/inputs/colorgradient).
|
|
11
|
+
*/
|
|
12
|
+
export interface ColorGradientProps {
|
|
13
|
+
/**
|
|
14
|
+
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
15
|
+
* For example these elements could contain error or hint message.
|
|
16
|
+
*/
|
|
17
|
+
ariaDescribedBy?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Represents the label of the `hsv` drag handle component used inside the ColorGradient.
|
|
20
|
+
*/
|
|
21
|
+
ariaLabelHSV?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Represent the label of the component.
|
|
24
|
+
*/
|
|
25
|
+
ariaLabel?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Identifies the element(s) which will label the component.
|
|
28
|
+
*/
|
|
29
|
+
ariaLabelledBy?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Represents the text rendered inside the `hsv` drag handle.
|
|
32
|
+
*/
|
|
33
|
+
ariaValueText?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Enables the color contrast tool.
|
|
36
|
+
* Sets the background color that will be compared to the selected value.
|
|
37
|
+
* The tool will calculate the contrast ratio between two colors.
|
|
38
|
+
* Currently, only the RGBA format is supported.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```jsx
|
|
42
|
+
* <ColorGradient backgroundColor="#ffffff" />
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
backgroundColor?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Sets additional classes to the ColorGradient.
|
|
48
|
+
*/
|
|
49
|
+
className?: string;
|
|
50
|
+
/**
|
|
51
|
+
* The default value of the ColorGradient.
|
|
52
|
+
*/
|
|
53
|
+
defaultValue?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Determines whether the ColorGradient is disabled
|
|
56
|
+
* ([more information and example](https://www.telerik.com/kendo-react-ui/components/inputs/colorgradient/disabled)).
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```jsx
|
|
60
|
+
* const App = () => (
|
|
61
|
+
* <ColorGradient disabled={true} />
|
|
62
|
+
* );
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
disabled?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Sets the default input format in the gradient input editor.
|
|
68
|
+
*
|
|
69
|
+
* @default 'rgb'
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```jsx
|
|
73
|
+
* <ColorGradient format="hex" />
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
format?: 'rgba' | 'rgb' | 'hex';
|
|
77
|
+
/**
|
|
78
|
+
* Determines the step (in pixels) when moving the gradient drag handle using
|
|
79
|
+
* the keyboard arrow keys while holding the shift key.
|
|
80
|
+
*
|
|
81
|
+
* @default 2
|
|
82
|
+
*/
|
|
83
|
+
gradientSliderSmallStep?: number;
|
|
84
|
+
/**
|
|
85
|
+
* Determines the step (in pixels) when moving the gradient drag handle
|
|
86
|
+
* using the keyboard arrow keys.
|
|
87
|
+
*
|
|
88
|
+
* @default 5
|
|
89
|
+
*/
|
|
90
|
+
gradientSliderStep?: number;
|
|
91
|
+
/**
|
|
92
|
+
* Specifies the id of the component.
|
|
93
|
+
*/
|
|
94
|
+
id?: string;
|
|
95
|
+
/**
|
|
96
|
+
* @hidden
|
|
97
|
+
*/
|
|
98
|
+
isInsidePopup?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Determines whether the alpha slider and the alpha input will be displayed. Defaults to `true`.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```jsx
|
|
104
|
+
* <ColorGradient opacity={false} />
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
opacity?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* @hidden
|
|
110
|
+
*/
|
|
111
|
+
role?: string;
|
|
112
|
+
/**
|
|
113
|
+
* The styles that are applied to the ColorGradient.
|
|
114
|
+
*/
|
|
115
|
+
style?: React.CSSProperties;
|
|
116
|
+
/**
|
|
117
|
+
* Sets the `tabIndex` property of the ColorGradient.
|
|
118
|
+
*/
|
|
119
|
+
tabIndex?: number;
|
|
120
|
+
/**
|
|
121
|
+
* The value of the ColorGradient.
|
|
122
|
+
*/
|
|
123
|
+
value?: string;
|
|
124
|
+
/**
|
|
125
|
+
* Determines the event handler that will be fired when the user edits the value.
|
|
126
|
+
*/
|
|
127
|
+
onChange?: (event: ColorGradientChangeEvent) => void;
|
|
128
|
+
/**
|
|
129
|
+
* Represents the focus event.
|
|
130
|
+
*/
|
|
131
|
+
onFocus?: (event: any) => void;
|
|
132
|
+
/**
|
|
133
|
+
* Configures the `size` of the ColorGradient.
|
|
134
|
+
*
|
|
135
|
+
* The available options are:
|
|
136
|
+
* - `small`
|
|
137
|
+
* - `medium`
|
|
138
|
+
* - `large`
|
|
139
|
+
*
|
|
140
|
+
* @default undefined (theme-controlled)
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```tsx
|
|
144
|
+
* <ColorGradient size="large" />
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
size?: 'small' | 'medium' | 'large';
|
|
148
|
+
/**
|
|
149
|
+
* @hidden
|
|
150
|
+
*/
|
|
151
|
+
fillMode?: 'solid' | 'flat' | 'outline';
|
|
152
|
+
/**
|
|
153
|
+
* @hidden
|
|
154
|
+
*/
|
|
155
|
+
rounded?: 'small' | 'medium' | 'large' | 'full';
|
|
156
|
+
/**
|
|
157
|
+
* @hidden
|
|
158
|
+
*/
|
|
159
|
+
_adaptive?: boolean;
|
|
160
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { BaseEvent } from '@progress/kendo-react-common';
|
|
9
|
+
import { ColorPalette } from '../ColorPalette.js';
|
|
10
|
+
/**
|
|
11
|
+
* The arguments for the `onChange` ColorPalette event.
|
|
12
|
+
*/
|
|
13
|
+
export interface ColorPaletteChangeEvent extends BaseEvent<ColorPalette> {
|
|
14
|
+
/**
|
|
15
|
+
* The current value of the ColorPalette.
|
|
16
|
+
*/
|
|
17
|
+
value: string;
|
|
18
|
+
/**
|
|
19
|
+
* The current value of the ColorPalette in RGBA format.
|
|
20
|
+
*/
|
|
21
|
+
rgbaValue: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { TileSize } from '../models/tile-size.js';
|
|
9
|
+
import { ColorPaletteChangeEvent } from './ColorPaletteChangeEvent.js';
|
|
10
|
+
/**
|
|
11
|
+
* Represents the props of the [KendoReact ColorPalette component](https://www.telerik.com/kendo-react-ui/components/inputs/colorpalette).
|
|
12
|
+
*/
|
|
13
|
+
export interface ColorPaletteProps {
|
|
14
|
+
/**
|
|
15
|
+
* The color palette that will be displayed.
|
|
16
|
+
*
|
|
17
|
+
* The supported values are:
|
|
18
|
+
* * The name of the predefined palette preset (for example, `office`, `basic`, and `apex`).
|
|
19
|
+
* * A string array.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```jsx
|
|
23
|
+
* <ColorPalette palette={['#ff0000', '#00ff00', '#0000ff']} />
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
palette?: string[] | string;
|
|
27
|
+
/**
|
|
28
|
+
* Specifies the number of columns that will be displayed.
|
|
29
|
+
* Defaults to `10`.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```jsx
|
|
33
|
+
* <ColorPalette columns={5} />
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
columns?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Specifies the size of a color cell in px.
|
|
39
|
+
* Defaults to `24`.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```jsx
|
|
43
|
+
* <ColorPalette tileSize={30} />
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
tileSize?: number | TileSize;
|
|
47
|
+
/**
|
|
48
|
+
* The default value of the ColorPalette.
|
|
49
|
+
*/
|
|
50
|
+
defaultValue?: string;
|
|
51
|
+
/**
|
|
52
|
+
* The value of the ColorPalette.
|
|
53
|
+
*/
|
|
54
|
+
value?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Determines whether the ColorPalette is disabled
|
|
57
|
+
* ([more information and example](https://www.telerik.com/kendo-react-ui/components/inputs/colorpalette/disabled)).
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```jsx
|
|
61
|
+
* const App = () => (
|
|
62
|
+
* <ColorPalette disabled={true} />
|
|
63
|
+
* );
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
disabled?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Sets the `tabIndex` property of the ColorPalette.
|
|
69
|
+
*/
|
|
70
|
+
tabIndex?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Specifies the id of the component.
|
|
73
|
+
*/
|
|
74
|
+
id?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
77
|
+
* For example these elements could contain error or hint message.
|
|
78
|
+
*/
|
|
79
|
+
ariaDescribedBy?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Identifies the element(s) which will label the component.
|
|
82
|
+
*/
|
|
83
|
+
ariaLabelledBy?: string;
|
|
84
|
+
/**
|
|
85
|
+
* @hidden
|
|
86
|
+
*/
|
|
87
|
+
ariaDisabled?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Determines the event handler that will be fired when the user edits the value.
|
|
90
|
+
*/
|
|
91
|
+
onChange?: (event: ColorPaletteChangeEvent) => void;
|
|
92
|
+
/**
|
|
93
|
+
* Represent the focus event of the ColorPalette.
|
|
94
|
+
*/
|
|
95
|
+
onFocus?: (event: FocusEvent) => void;
|
|
96
|
+
/**
|
|
97
|
+
* Sets additional classes to the ColorPalette.
|
|
98
|
+
*/
|
|
99
|
+
className?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Configures the `size` of the ColorPalette.
|
|
102
|
+
*
|
|
103
|
+
* The available options are:
|
|
104
|
+
* - `small`
|
|
105
|
+
* - `medium`
|
|
106
|
+
* - `large`
|
|
107
|
+
*
|
|
108
|
+
* @default undefined (theme-controlled)
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* ```tsx
|
|
112
|
+
* <ColorPalette size="large" />
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
size?: 'small' | 'medium' | 'large';
|
|
116
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ColorPickerHandle } from '../ColorPicker.js';
|
|
9
|
+
/**
|
|
10
|
+
* The arguments for the `onActiveColorClick` ColorPicker event.
|
|
11
|
+
*/
|
|
12
|
+
export interface ColorPickerActiveColorClick {
|
|
13
|
+
/**
|
|
14
|
+
* The current value of the ColorPicker.
|
|
15
|
+
*/
|
|
16
|
+
value: string;
|
|
17
|
+
/**
|
|
18
|
+
* A React Synthetic Event.
|
|
19
|
+
*/
|
|
20
|
+
syntheticEvent: React.SyntheticEvent<any>;
|
|
21
|
+
/**
|
|
22
|
+
* A native DOM event.
|
|
23
|
+
*/
|
|
24
|
+
nativeEvent: any;
|
|
25
|
+
/**
|
|
26
|
+
* The event target.
|
|
27
|
+
*/
|
|
28
|
+
target: ColorPickerHandle;
|
|
29
|
+
}
|