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