@progress/kendo-react-inputs 9.4.0-develop.1 → 9.4.0-develop.11
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.js +1 -1
- package/checkbox/Checkbox.mjs +0 -1
- package/colors/ColorContrastLabels.js +1 -1
- package/colors/ColorContrastLabels.mjs +2 -3
- package/colors/ColorContrastSvg.js +1 -1
- package/colors/ColorContrastSvg.mjs +11 -12
- package/colors/ColorGradient.js +1 -1
- package/colors/ColorGradient.mjs +85 -75
- package/colors/ColorInput.js +1 -1
- package/colors/ColorInput.mjs +55 -45
- package/colors/ColorPalette.js +1 -1
- package/colors/ColorPalette.mjs +55 -47
- package/colors/ColorPicker.js +1 -1
- package/colors/ColorPicker.mjs +312 -183
- package/colors/FlatColorPicker.js +1 -1
- package/colors/FlatColorPicker.mjs +224 -139
- package/colors/HexInput.js +1 -1
- package/colors/HexInput.mjs +10 -9
- package/colors/Picker.js +1 -1
- package/colors/Picker.mjs +22 -23
- package/colors/models/palette-presets.js +1 -1
- package/colors/models/palette-presets.mjs +1 -2
- package/colors/utils/color-cache.js +1 -1
- package/colors/utils/color-cache.mjs +12 -13
- package/colors/utils/color-palette.service.js +1 -1
- package/colors/utils/color-palette.service.mjs +0 -1
- package/colors/utils/color-parser.js +1 -1
- package/colors/utils/color-parser.mjs +5 -6
- package/colors/utils/misc.js +1 -1
- package/colors/utils/misc.mjs +0 -1
- package/colors/utils/svg-calc.js +1 -1
- package/colors/utils/svg-calc.mjs +9 -10
- package/common/AdaptiveMode.js +8 -0
- package/common/AdaptiveMode.mjs +73 -0
- package/dist/cdn/js/kendo-react-inputs.js +8 -1
- package/index.d.mts +118 -10
- package/index.d.ts +118 -10
- package/index.js +2 -1
- package/index.mjs +4 -4
- package/input/Input.js +1 -1
- package/input/Input.mjs +8 -9
- package/input/InputClearValue.js +1 -1
- package/input/InputClearValue.mjs +3 -4
- package/input/InputPrefix.js +1 -1
- package/input/InputPrefix.mjs +4 -5
- package/input/InputSeparator.js +1 -1
- package/input/InputSeparator.mjs +8 -9
- package/input/InputSuffix.js +1 -1
- package/input/InputSuffix.mjs +4 -5
- package/input/InputValidationIcon.js +1 -1
- package/input/InputValidationIcon.mjs +3 -4
- package/maskedtextbox/MaskedTextBox.js +1 -1
- package/maskedtextbox/MaskedTextBox.mjs +0 -1
- package/maskedtextbox/masking.service.js +1 -1
- package/maskedtextbox/masking.service.mjs +0 -1
- package/maskedtextbox/parsing/combinators.js +1 -1
- package/maskedtextbox/parsing/combinators.mjs +8 -9
- package/maskedtextbox/parsing/parsers.js +1 -1
- package/maskedtextbox/parsing/parsers.mjs +0 -1
- package/maskedtextbox/parsing/result.js +1 -1
- package/maskedtextbox/parsing/result.mjs +7 -8
- package/maskedtextbox/parsing/stream.js +1 -1
- package/maskedtextbox/parsing/stream.mjs +0 -1
- package/maskedtextbox/utils.js +1 -1
- package/maskedtextbox/utils.mjs +11 -12
- package/messages/index.js +1 -1
- package/messages/index.mjs +39 -38
- package/numerictextbox/NumericTextBox.js +1 -1
- package/numerictextbox/NumericTextBox.mjs +0 -1
- package/numerictextbox/utils/index.js +1 -1
- package/numerictextbox/utils/index.mjs +0 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -3
- package/package.json +9 -9
- package/radiobutton/RadioButton.js +1 -1
- package/radiobutton/RadioButton.mjs +0 -1
- package/radiobutton/RadioGroup.js +1 -1
- package/radiobutton/RadioGroup.mjs +0 -1
- package/range-slider/RangeSlider.js +1 -1
- package/range-slider/RangeSlider.mjs +0 -1
- package/range-slider/range-raducer.js +1 -1
- package/range-slider/range-raducer.mjs +2 -3
- package/rating/Rating.js +1 -1
- package/rating/Rating.mjs +0 -1
- package/rating/RatingItem.js +1 -1
- package/rating/RatingItem.mjs +0 -1
- package/rating/rating-reducer.js +1 -1
- package/rating/rating-reducer.mjs +0 -1
- package/rating/utils/index.js +1 -1
- package/rating/utils/index.mjs +0 -1
- package/signature/Signature.js +1 -1
- package/signature/Signature.mjs +0 -1
- package/signature/utils/index.js +1 -1
- package/signature/utils/index.mjs +3 -4
- package/slider/Slider.js +1 -1
- package/slider/Slider.mjs +0 -1
- package/slider/SliderLabel.js +1 -1
- package/slider/SliderLabel.mjs +3 -4
- package/switch/Switch.js +1 -1
- package/switch/Switch.mjs +0 -1
- package/textarea/TextArea.js +1 -1
- package/textarea/TextArea.mjs +0 -1
- package/textbox/Textbox.js +1 -1
- package/textbox/Textbox.mjs +7 -8
|
@@ -5,127 +5,142 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as e from "react";
|
|
10
|
-
import
|
|
11
|
-
import { validatePackage as
|
|
12
|
-
import { ButtonGroup as
|
|
13
|
-
import { dropletSliderIcon as
|
|
14
|
-
import { ColorPalette as
|
|
15
|
-
import { ColorGradient as
|
|
16
|
-
import { packageMetadata as
|
|
17
|
-
import { useLocalization as
|
|
18
|
-
import { flatColorPickerColorGradientBtn as
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
9
|
+
import l from "prop-types";
|
|
10
|
+
import { validatePackage as Z, Navigation as p, getActiveElement as S, disableNavigatableContainer as K, keepFocusInContainer as ee, focusFirstFocusableChild as ae, enableNavigatableContainer as te, getTabIndex as le, classNames as L, kendoThemeMaps as oe } from "@progress/kendo-react-common";
|
|
11
|
+
import { ButtonGroup as G, Button as s } from "@progress/kendo-react-buttons";
|
|
12
|
+
import { dropletSliderIcon as M, paletteIcon as V, dropletSlashIcon as ne } from "@progress/kendo-svg-icons";
|
|
13
|
+
import { ColorPalette as ie } from "./ColorPalette.mjs";
|
|
14
|
+
import { ColorGradient as re } from "./ColorGradient.mjs";
|
|
15
|
+
import { packageMetadata as ce } from "../package-metadata.mjs";
|
|
16
|
+
import { useLocalization as se } from "@progress/kendo-react-intl";
|
|
17
|
+
import { flatColorPickerColorGradientBtn as b, messages as d, flatColorPickerColorPaletteBtn as f, flatColorPickerClearBtn as T, flatColorPickerCancelBtn as de, flatColorPickerApplyBtn as ue } from "../messages/index.mjs";
|
|
18
|
+
const A = e.forwardRef((a, D) => {
|
|
19
|
+
Z(ce);
|
|
20
|
+
const h = e.useRef(null), y = e.useRef(null), H = e.useRef(null), {
|
|
21
|
+
defaultValue: u,
|
|
22
|
+
showButtons: w = !0,
|
|
23
|
+
showPreview: q = !0,
|
|
24
|
+
showClearButton: O = !0,
|
|
25
|
+
view: E = a.views ? void 0 : "ColorGradient",
|
|
26
|
+
views: i = E ? void 0 : ["gradient", "palette"],
|
|
27
|
+
activeView: P = "gradient",
|
|
28
|
+
size: o = "medium"
|
|
29
|
+
} = a, [v, $] = e.useState(
|
|
30
|
+
(E || "ColorGradient") === "ColorGradient"
|
|
31
|
+
), [c, _] = e.useState(
|
|
32
|
+
(i != null ? i : [])[0] === "gradient" && P === "gradient"
|
|
33
|
+
), [n, C] = e.useState(a.value || u || void 0), [g, N] = e.useState(a.value || u || void 0), B = a.value !== void 0 ? a.value : void 0;
|
|
24
34
|
e.useEffect(() => {
|
|
25
|
-
|
|
35
|
+
C(a.value);
|
|
26
36
|
}, [a.value]);
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
}, [
|
|
37
|
+
const m = se(), x = e.useCallback(() => {
|
|
38
|
+
h.current && h.current.focus();
|
|
39
|
+
}, [h]);
|
|
30
40
|
e.useImperativeHandle(
|
|
31
|
-
|
|
41
|
+
h,
|
|
32
42
|
() => ({
|
|
33
|
-
element:
|
|
34
|
-
focus:
|
|
43
|
+
element: y.current,
|
|
44
|
+
focus: x,
|
|
35
45
|
props: a,
|
|
36
|
-
value:
|
|
46
|
+
value: B
|
|
37
47
|
}),
|
|
38
|
-
[
|
|
39
|
-
), e.useImperativeHandle(
|
|
40
|
-
const
|
|
48
|
+
[B, x, a]
|
|
49
|
+
), e.useImperativeHandle(D, () => h.current);
|
|
50
|
+
const R = e.useCallback(
|
|
41
51
|
(t) => {
|
|
42
|
-
(t === "ColorGradient" && !
|
|
52
|
+
(t === "ColorGradient" && !v || t === "ColorPalette" && v) && $(!v);
|
|
43
53
|
},
|
|
44
|
-
[
|
|
45
|
-
),
|
|
54
|
+
[v]
|
|
55
|
+
), I = e.useCallback(
|
|
46
56
|
(t) => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
57
|
+
t === "gradient" && !c || t === "palette" && c || t === "palette" && P === "gradient" ? _(!c) : t === "gradient" && P === "palette" && _(!0);
|
|
58
|
+
},
|
|
59
|
+
[P, c]
|
|
60
|
+
), j = e.useCallback(
|
|
61
|
+
(t) => {
|
|
62
|
+
if (u ? (C(u), N(u)) : (C(void 0), N(void 0)), a.onPreviewChange) {
|
|
63
|
+
const r = {
|
|
64
|
+
value: u || void 0,
|
|
50
65
|
nativeEvent: t.nativeEvent,
|
|
51
66
|
syntheticEvent: t
|
|
52
67
|
};
|
|
53
|
-
a.onPreviewChange.call(void 0,
|
|
68
|
+
a.onPreviewChange.call(void 0, r);
|
|
54
69
|
}
|
|
55
70
|
},
|
|
56
|
-
[
|
|
57
|
-
),
|
|
71
|
+
[u, a.onPreviewChange]
|
|
72
|
+
), z = e.useCallback(
|
|
58
73
|
(t) => {
|
|
59
|
-
if (
|
|
60
|
-
const
|
|
74
|
+
if (C(t.value), a.onPreviewChange) {
|
|
75
|
+
const r = {
|
|
61
76
|
value: t.value,
|
|
62
77
|
nativeEvent: t.nativeEvent,
|
|
63
78
|
syntheticEvent: t.syntheticEvent
|
|
64
79
|
};
|
|
65
|
-
a.onPreviewChange.call(void 0,
|
|
80
|
+
a.onPreviewChange.call(void 0, r);
|
|
66
81
|
}
|
|
67
82
|
},
|
|
68
83
|
[a.onPreviewChange]
|
|
69
|
-
),
|
|
84
|
+
), J = e.useCallback(
|
|
70
85
|
(t) => {
|
|
71
|
-
if (
|
|
72
|
-
const
|
|
73
|
-
value:
|
|
86
|
+
if (n !== void 0 && N(n), a.onChange) {
|
|
87
|
+
const r = {
|
|
88
|
+
value: n,
|
|
74
89
|
nativeEvent: t.nativeEvent,
|
|
75
90
|
syntheticEvent: t
|
|
76
91
|
};
|
|
77
|
-
a.onChange.call(void 0,
|
|
92
|
+
a.onChange.call(void 0, r);
|
|
78
93
|
}
|
|
79
94
|
},
|
|
80
|
-
[
|
|
81
|
-
),
|
|
82
|
-
|
|
83
|
-
}, [
|
|
95
|
+
[n, a.onChange]
|
|
96
|
+
), Q = e.useCallback(() => {
|
|
97
|
+
C(g);
|
|
98
|
+
}, [g]), U = e.useCallback(
|
|
84
99
|
(t) => {
|
|
85
|
-
if (
|
|
86
|
-
const
|
|
87
|
-
value:
|
|
100
|
+
if (C(g), a.onPreviewChange) {
|
|
101
|
+
const r = {
|
|
102
|
+
value: g,
|
|
88
103
|
nativeEvent: t.nativeEvent,
|
|
89
104
|
syntheticEvent: t
|
|
90
105
|
};
|
|
91
|
-
a.onPreviewChange.call(void 0,
|
|
106
|
+
a.onPreviewChange.call(void 0, r);
|
|
92
107
|
}
|
|
93
108
|
},
|
|
94
|
-
[
|
|
95
|
-
),
|
|
109
|
+
[g, a.onPreviewChange]
|
|
110
|
+
), W = e.useCallback(
|
|
96
111
|
(t) => {
|
|
97
|
-
var
|
|
98
|
-
if ((!t.relatedTarget || !((
|
|
99
|
-
const
|
|
100
|
-
value:
|
|
112
|
+
var k;
|
|
113
|
+
if ((!t.relatedTarget || !((k = y.current) != null && k.contains(t.relatedTarget))) && (!w && n !== void 0 && N(n), !w && a.onChange)) {
|
|
114
|
+
const Y = {
|
|
115
|
+
value: n,
|
|
101
116
|
nativeEvent: t.nativeEvent,
|
|
102
117
|
syntheticEvent: t
|
|
103
118
|
};
|
|
104
|
-
a.onChange.call(void 0,
|
|
119
|
+
a.onChange.call(void 0, Y);
|
|
105
120
|
}
|
|
106
121
|
},
|
|
107
|
-
[
|
|
108
|
-
),
|
|
109
|
-
() => new
|
|
110
|
-
root:
|
|
122
|
+
[n, w, a.onChange]
|
|
123
|
+
), F = e.useMemo(
|
|
124
|
+
() => new p({
|
|
125
|
+
root: y,
|
|
111
126
|
selectors: [".k-coloreditor"],
|
|
112
127
|
tabIndex: 0,
|
|
113
128
|
keyboardEvents: {
|
|
114
129
|
keydown: {
|
|
115
|
-
Tab: (t,
|
|
116
|
-
|
|
130
|
+
Tab: (t, r, k) => {
|
|
131
|
+
S(document) === t ? K(t) : ee(k, t);
|
|
117
132
|
},
|
|
118
|
-
Enter: (t,
|
|
119
|
-
|
|
133
|
+
Enter: (t, r, k) => {
|
|
134
|
+
S(document) === t && (ae(t), te(t));
|
|
120
135
|
},
|
|
121
|
-
Escape: (t,
|
|
122
|
-
|
|
136
|
+
Escape: (t, r, k) => {
|
|
137
|
+
S(document) !== t && (t.focus(), K(t));
|
|
123
138
|
}
|
|
124
139
|
}
|
|
125
140
|
}
|
|
126
141
|
}),
|
|
127
142
|
[]
|
|
128
|
-
),
|
|
143
|
+
), X = e.useCallback(F.triggerKeyboardEvent.bind(F), []);
|
|
129
144
|
return /* @__PURE__ */ e.createElement(
|
|
130
145
|
"div",
|
|
131
146
|
{
|
|
@@ -135,144 +150,214 @@ const S = e.forwardRef((a, x) => {
|
|
|
135
150
|
"aria-labelledby": a.ariaLabelledBy,
|
|
136
151
|
"aria-disabled": a.disabled ? "true" : void 0,
|
|
137
152
|
style: a.style,
|
|
138
|
-
ref:
|
|
139
|
-
tabIndex:
|
|
140
|
-
className:
|
|
153
|
+
ref: y,
|
|
154
|
+
tabIndex: le(a.tabIndex, a.disabled),
|
|
155
|
+
className: L(
|
|
141
156
|
"k-flatcolorpicker k-coloreditor",
|
|
142
157
|
{
|
|
158
|
+
[`k-coloreditor-${oe.sizeMap[o] || o}`]: o,
|
|
143
159
|
"k-disabled": a.disabled
|
|
144
160
|
},
|
|
145
161
|
a.className
|
|
146
162
|
),
|
|
147
|
-
onBlur:
|
|
148
|
-
onKeyDown:
|
|
163
|
+
onBlur: W,
|
|
164
|
+
onKeyDown: X
|
|
149
165
|
},
|
|
150
|
-
a.header || /* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-header k-hstack" }, /* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-header-actions k-hstack" }, /* @__PURE__ */ e.createElement(
|
|
151
|
-
|
|
166
|
+
a.header || /* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-header k-hstack" }, /* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-header-actions k-hstack" }, i && i[0] === "gradient" && i[1] === "palette" && /* @__PURE__ */ e.createElement(G, { className: "k-button-group-flat" }, /* @__PURE__ */ e.createElement(
|
|
167
|
+
s,
|
|
152
168
|
{
|
|
153
169
|
type: "button",
|
|
154
|
-
"aria-label":
|
|
155
|
-
|
|
156
|
-
|
|
170
|
+
"aria-label": m.toLanguageString(
|
|
171
|
+
b,
|
|
172
|
+
d[b]
|
|
157
173
|
),
|
|
158
174
|
togglable: !0,
|
|
159
175
|
fillMode: "flat",
|
|
176
|
+
size: o,
|
|
177
|
+
svgIcon: M,
|
|
160
178
|
selected: c,
|
|
161
|
-
onClick: () =>
|
|
162
|
-
icon: "droplet-slider",
|
|
163
|
-
svgIcon: X
|
|
179
|
+
onClick: () => I("gradient")
|
|
164
180
|
}
|
|
165
181
|
), /* @__PURE__ */ e.createElement(
|
|
166
|
-
|
|
182
|
+
s,
|
|
183
|
+
{
|
|
184
|
+
type: "button",
|
|
185
|
+
"aria-label": m.toLanguageString(
|
|
186
|
+
f,
|
|
187
|
+
d[f]
|
|
188
|
+
),
|
|
189
|
+
togglable: !0,
|
|
190
|
+
fillMode: "flat",
|
|
191
|
+
size: o,
|
|
192
|
+
svgIcon: V,
|
|
193
|
+
selected: !c,
|
|
194
|
+
onClick: () => I("palette")
|
|
195
|
+
}
|
|
196
|
+
)), i && i[0] === "palette" && i[1] === "gradient" && /* @__PURE__ */ e.createElement(G, { className: "k-button-group-flat" }, /* @__PURE__ */ e.createElement(
|
|
197
|
+
s,
|
|
167
198
|
{
|
|
168
199
|
type: "button",
|
|
169
|
-
"aria-label":
|
|
170
|
-
|
|
171
|
-
|
|
200
|
+
"aria-label": m.toLanguageString(
|
|
201
|
+
f,
|
|
202
|
+
d[f]
|
|
172
203
|
),
|
|
173
204
|
togglable: !0,
|
|
174
205
|
fillMode: "flat",
|
|
206
|
+
size: o,
|
|
207
|
+
svgIcon: V,
|
|
175
208
|
selected: !c,
|
|
176
|
-
onClick: () =>
|
|
209
|
+
onClick: () => I("palette")
|
|
210
|
+
}
|
|
211
|
+
), /* @__PURE__ */ e.createElement(
|
|
212
|
+
s,
|
|
213
|
+
{
|
|
214
|
+
type: "button",
|
|
215
|
+
"aria-label": m.toLanguageString(
|
|
216
|
+
b,
|
|
217
|
+
d[b]
|
|
218
|
+
),
|
|
219
|
+
togglable: !0,
|
|
220
|
+
fillMode: "flat",
|
|
221
|
+
size: o,
|
|
222
|
+
svgIcon: M,
|
|
223
|
+
selected: c,
|
|
224
|
+
onClick: () => I("gradient")
|
|
225
|
+
}
|
|
226
|
+
)), E && /* @__PURE__ */ e.createElement(G, { className: "k-button-group-flat" }, /* @__PURE__ */ e.createElement(
|
|
227
|
+
s,
|
|
228
|
+
{
|
|
229
|
+
type: "button",
|
|
230
|
+
"aria-label": m.toLanguageString(
|
|
231
|
+
b,
|
|
232
|
+
d[b]
|
|
233
|
+
),
|
|
234
|
+
togglable: !0,
|
|
235
|
+
fillMode: "flat",
|
|
236
|
+
size: o,
|
|
237
|
+
selected: v,
|
|
238
|
+
onClick: () => R("ColorGradient"),
|
|
239
|
+
icon: "droplet-slider",
|
|
240
|
+
svgIcon: M
|
|
241
|
+
}
|
|
242
|
+
), /* @__PURE__ */ e.createElement(
|
|
243
|
+
s,
|
|
244
|
+
{
|
|
245
|
+
type: "button",
|
|
246
|
+
"aria-label": m.toLanguageString(
|
|
247
|
+
f,
|
|
248
|
+
d[f]
|
|
249
|
+
),
|
|
250
|
+
togglable: !0,
|
|
251
|
+
fillMode: "flat",
|
|
252
|
+
size: o,
|
|
253
|
+
selected: !v,
|
|
254
|
+
onClick: () => R("ColorPalette"),
|
|
177
255
|
icon: "palette",
|
|
178
|
-
svgIcon:
|
|
256
|
+
svgIcon: V
|
|
179
257
|
}
|
|
180
|
-
))), /* @__PURE__ */ e.createElement("div", { className: "k-spacer" }), /* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-header-actions k-hstack" },
|
|
181
|
-
|
|
258
|
+
))), /* @__PURE__ */ e.createElement("div", { className: "k-spacer" }), /* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-header-actions k-hstack" }, O && /* @__PURE__ */ e.createElement(
|
|
259
|
+
s,
|
|
182
260
|
{
|
|
183
261
|
type: "button",
|
|
184
262
|
fillMode: "flat",
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
263
|
+
size: o,
|
|
264
|
+
onClick: j,
|
|
265
|
+
"aria-label": m.toLanguageString(
|
|
266
|
+
T,
|
|
267
|
+
d[T]
|
|
189
268
|
),
|
|
190
269
|
icon: "droplet-slash",
|
|
191
|
-
svgIcon:
|
|
270
|
+
svgIcon: ne
|
|
192
271
|
}
|
|
193
|
-
),
|
|
272
|
+
), q && /* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-preview k-vstack" }, /* @__PURE__ */ e.createElement(
|
|
194
273
|
"span",
|
|
195
274
|
{
|
|
196
|
-
className:
|
|
197
|
-
"k-no-color":
|
|
275
|
+
className: L("k-coloreditor-preview-color", "k-color-preview", {
|
|
276
|
+
"k-no-color": B === void 0
|
|
198
277
|
})
|
|
199
278
|
},
|
|
200
279
|
/* @__PURE__ */ e.createElement(
|
|
201
280
|
"span",
|
|
202
281
|
{
|
|
203
282
|
className: "k-color-preview-mask",
|
|
204
|
-
style: { background:
|
|
283
|
+
style: { background: n || void 0 }
|
|
205
284
|
}
|
|
206
285
|
)
|
|
207
286
|
), /* @__PURE__ */ e.createElement(
|
|
208
287
|
"span",
|
|
209
288
|
{
|
|
210
|
-
className:
|
|
211
|
-
"k-no-color":
|
|
289
|
+
className: L("k-coloreditor-current-color", "k-color-preview", {
|
|
290
|
+
"k-no-color": g === void 0
|
|
212
291
|
}),
|
|
213
|
-
onClick:
|
|
292
|
+
onClick: U
|
|
214
293
|
},
|
|
215
294
|
/* @__PURE__ */ e.createElement(
|
|
216
295
|
"span",
|
|
217
296
|
{
|
|
218
297
|
className: "k-color-preview-mask",
|
|
219
|
-
style: { background:
|
|
298
|
+
style: { background: g || void 0 }
|
|
220
299
|
}
|
|
221
300
|
)
|
|
222
301
|
)))),
|
|
223
|
-
/* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-views k-vstack" }, c
|
|
224
|
-
|
|
302
|
+
/* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-views k-vstack" }, (E && v || i && c) && /* @__PURE__ */ e.createElement(
|
|
303
|
+
re,
|
|
225
304
|
{
|
|
226
|
-
ref:
|
|
305
|
+
ref: H,
|
|
227
306
|
role: "none",
|
|
228
307
|
ariaLabel: void 0,
|
|
229
|
-
value:
|
|
230
|
-
onChange:
|
|
308
|
+
value: n,
|
|
309
|
+
onChange: z,
|
|
231
310
|
opacity: a.opacity,
|
|
232
|
-
format: a.format
|
|
311
|
+
format: a.format,
|
|
312
|
+
size: o,
|
|
313
|
+
_adaptive: a._gradientSettings ? a._gradientSettings._adaptive : void 0
|
|
233
314
|
}
|
|
234
|
-
)
|
|
235
|
-
|
|
315
|
+
), (E && !v || i && !c) && /* @__PURE__ */ e.createElement(
|
|
316
|
+
ie,
|
|
236
317
|
{
|
|
237
318
|
ariaDisabled: !0,
|
|
238
319
|
ariaLabelledBy: "required_label",
|
|
239
|
-
value:
|
|
240
|
-
onChange:
|
|
320
|
+
value: n,
|
|
321
|
+
onChange: z,
|
|
322
|
+
size: o
|
|
241
323
|
}
|
|
242
324
|
)),
|
|
243
|
-
|
|
244
|
-
|
|
325
|
+
w && /* @__PURE__ */ e.createElement("div", { className: "k-coloreditor-footer k-actions k-actions-end k-actions-horizontal" }, /* @__PURE__ */ e.createElement(s, { type: "button", className: "k-coloreditor-cancel", size: o, onClick: Q }, d[de]), /* @__PURE__ */ e.createElement(
|
|
326
|
+
s,
|
|
245
327
|
{
|
|
246
328
|
type: "button",
|
|
247
329
|
themeColor: "primary",
|
|
248
330
|
className: "k-coloreditor-apply",
|
|
249
|
-
|
|
331
|
+
size: o,
|
|
332
|
+
onClick: J
|
|
250
333
|
},
|
|
251
|
-
|
|
334
|
+
d[ue]
|
|
252
335
|
))
|
|
253
336
|
);
|
|
254
|
-
}),
|
|
255
|
-
id:
|
|
256
|
-
style:
|
|
257
|
-
className:
|
|
258
|
-
value:
|
|
259
|
-
defaultValue:
|
|
260
|
-
onPreviewChange:
|
|
261
|
-
onChange:
|
|
262
|
-
opacity:
|
|
263
|
-
format:
|
|
264
|
-
tabIndex:
|
|
265
|
-
ariaLabel:
|
|
266
|
-
ariaLabelledBy:
|
|
267
|
-
disabled:
|
|
268
|
-
view:
|
|
269
|
-
header:
|
|
270
|
-
showClearButton:
|
|
271
|
-
showPreview:
|
|
272
|
-
showButtons:
|
|
337
|
+
}), ve = {
|
|
338
|
+
id: l.string,
|
|
339
|
+
style: l.any,
|
|
340
|
+
className: l.string,
|
|
341
|
+
value: l.string,
|
|
342
|
+
defaultValue: l.string,
|
|
343
|
+
onPreviewChange: l.func,
|
|
344
|
+
onChange: l.func,
|
|
345
|
+
opacity: l.bool,
|
|
346
|
+
format: l.any,
|
|
347
|
+
tabIndex: l.number,
|
|
348
|
+
ariaLabel: l.string,
|
|
349
|
+
ariaLabelledBy: l.string,
|
|
350
|
+
disabled: l.bool,
|
|
351
|
+
view: l.any,
|
|
352
|
+
header: l.any,
|
|
353
|
+
showClearButton: l.bool,
|
|
354
|
+
showPreview: l.bool,
|
|
355
|
+
showButtons: l.bool,
|
|
356
|
+
views: l.array,
|
|
357
|
+
size: l.oneOf([null, "small", "medium", "large"])
|
|
273
358
|
};
|
|
274
|
-
|
|
275
|
-
|
|
359
|
+
A.displayName = "KendoFlatColorPicker";
|
|
360
|
+
A.propTypes = ve;
|
|
276
361
|
export {
|
|
277
|
-
|
|
362
|
+
A as FlatColorPicker
|
|
278
363
|
};
|
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
|
|
8
|
+
"use strict";const l=require("react"),o=require("./utils/color-parser.js"),n=require("./utils/misc.js"),h=require("../textbox/Textbox.js");function c(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=c(l);class u extends a.Component{constructor(e){super(e),this.onChange=t=>{const s=t.target.value,i=o.parseColor(s,"rgba");this.setState({hex:s}),n.isPresent(i)&&this.props.onHexChange(s,i,t)},this.onBlur=()=>{n.isPresent(o.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})}static getDerivedStateFromProps(e,t){return e.hex!==t.originalHex?{hex:e.hex,originalHex:e.hex}:null}}module.exports=u;
|
package/colors/HexInput.mjs
CHANGED
|
@@ -5,18 +5,17 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as i from "react";
|
|
10
|
-
import { parseColor as
|
|
11
|
-
import { isPresent as
|
|
9
|
+
import { parseColor as o } from "./utils/color-parser.mjs";
|
|
10
|
+
import { isPresent as a } from "./utils/misc.mjs";
|
|
12
11
|
import { TextBox as h } from "../textbox/Textbox.mjs";
|
|
13
|
-
class
|
|
12
|
+
class u extends i.Component {
|
|
14
13
|
constructor(e) {
|
|
15
14
|
super(e), this.onChange = (t) => {
|
|
16
|
-
const s = t.target.value, r =
|
|
17
|
-
this.setState({ hex: s }),
|
|
15
|
+
const s = t.target.value, r = o(s, "rgba");
|
|
16
|
+
this.setState({ hex: s }), a(r) && this.props.onHexChange(s, r, t);
|
|
18
17
|
}, this.onBlur = () => {
|
|
19
|
-
o(
|
|
18
|
+
a(o(this.state.hex, "rgba")) || this.setState({ hex: this.state.originalHex });
|
|
20
19
|
}, this.state = { hex: this.props.hex, originalHex: this.props.hex };
|
|
21
20
|
}
|
|
22
21
|
render() {
|
|
@@ -27,7 +26,9 @@ class p extends i.Component {
|
|
|
27
26
|
onChange: this.onChange,
|
|
28
27
|
onBlur: this.onBlur,
|
|
29
28
|
disabled: this.props.disabled,
|
|
30
|
-
className: "k-hex-value"
|
|
29
|
+
className: "k-hex-value",
|
|
30
|
+
size: this.props.size,
|
|
31
|
+
fillMode: this.props.fillMode
|
|
31
32
|
}
|
|
32
33
|
);
|
|
33
34
|
}
|
|
@@ -36,5 +37,5 @@ class p extends i.Component {
|
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
export {
|
|
39
|
-
|
|
40
|
+
u as default
|
|
40
41
|
};
|
package/colors/Picker.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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),a=require("@progress/kendo-react-popup"),u=require("@progress/kendo-react-common");function s(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const c=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,c.get?c:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const n=s(r),m="bottom",p="top",i=e=>{const o=e.popupSettings||{},t=e.dir==="rtl"?"right":"left",c=n.useMemo(()=>({horizontal:t,vertical:m}),[t]),l=n.useMemo(()=>({horizontal:t,vertical:p}),[t]);return n.createElement(n.Fragment,null,e.input,e.button,!e._mobileMode&&n.createElement(a.Popup,{style:{...(o||{}).style,direction:e.dir},...o,anchor:e.popupAnchor,anchorAlign:c,popupAlign:l,show:e.open,onOpen:e.onOpen,onClose:e.onClose,className:u.classNames(o.className),popupClass:"k-colorpicker-popup k-color-picker-popup"},e.content),e._mobileMode&&e._actionSheet)};i.displayName="KendoPickerComponent";exports.Picker=i;
|
package/colors/Picker.mjs
CHANGED
|
@@ -5,39 +5,38 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
import
|
|
10
|
-
import { Popup as i } from "@progress/kendo-react-popup";
|
|
8
|
+
import * as e from "react";
|
|
9
|
+
import { Popup as l } from "@progress/kendo-react-popup";
|
|
11
10
|
import { classNames as a } from "@progress/kendo-react-common";
|
|
12
|
-
const
|
|
13
|
-
const n =
|
|
14
|
-
() => ({ horizontal:
|
|
15
|
-
[
|
|
16
|
-
),
|
|
17
|
-
() => ({ horizontal:
|
|
18
|
-
[
|
|
11
|
+
const m = "bottom", r = "top", s = (o) => {
|
|
12
|
+
const n = o.popupSettings || {}, t = o.dir === "rtl" ? "right" : "left", c = e.useMemo(
|
|
13
|
+
() => ({ horizontal: t, vertical: m }),
|
|
14
|
+
[t]
|
|
15
|
+
), i = e.useMemo(
|
|
16
|
+
() => ({ horizontal: t, vertical: r }),
|
|
17
|
+
[t]
|
|
19
18
|
);
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
|
|
19
|
+
return /* @__PURE__ */ e.createElement(e.Fragment, null, o.input, o.button, !o._mobileMode && /* @__PURE__ */ e.createElement(
|
|
20
|
+
l,
|
|
22
21
|
{
|
|
23
22
|
style: {
|
|
24
23
|
...(n || {}).style,
|
|
25
|
-
direction:
|
|
24
|
+
direction: o.dir
|
|
26
25
|
},
|
|
27
26
|
...n,
|
|
28
|
-
anchor:
|
|
27
|
+
anchor: o.popupAnchor,
|
|
29
28
|
anchorAlign: c,
|
|
30
|
-
popupAlign:
|
|
31
|
-
show:
|
|
32
|
-
onOpen:
|
|
33
|
-
onClose:
|
|
29
|
+
popupAlign: i,
|
|
30
|
+
show: o.open,
|
|
31
|
+
onOpen: o.onOpen,
|
|
32
|
+
onClose: o.onClose,
|
|
34
33
|
className: a(n.className),
|
|
35
|
-
popupClass: "k-color-picker-popup"
|
|
34
|
+
popupClass: "k-colorpicker-popup k-color-picker-popup"
|
|
36
35
|
},
|
|
37
|
-
|
|
38
|
-
));
|
|
36
|
+
o.content
|
|
37
|
+
), o._mobileMode && o._actionSheet);
|
|
39
38
|
};
|
|
40
|
-
|
|
39
|
+
s.displayName = "KendoPickerComponent";
|
|
41
40
|
export {
|
|
42
|
-
|
|
41
|
+
s as Picker
|
|
43
42
|
};
|