@progress/kendo-react-inputs 9.4.0-develop.9 → 9.4.0
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 +40 -51
- package/colors/ColorPicker.js +1 -1
- package/colors/ColorPicker.mjs +243 -226
- package/colors/FlatColorPicker.js +1 -1
- package/colors/FlatColorPicker.mjs +156 -151
- package/colors/Picker.js +1 -1
- package/colors/Picker.mjs +17 -17
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/index.d.mts +8 -0
- package/index.d.ts +8 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +10 -10
package/colors/ColorPicker.mjs
CHANGED
|
@@ -7,345 +7,362 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as t from "react";
|
|
9
9
|
import a from "prop-types";
|
|
10
|
-
import { createPropsContext as
|
|
11
|
-
import { packageMetadata as
|
|
12
|
-
import { Picker as
|
|
13
|
-
import { ColorGradient as
|
|
14
|
-
import { ColorPalette as
|
|
15
|
-
import { FlatColorPicker as
|
|
16
|
-
import { Button as
|
|
17
|
-
import { caretAltDownIcon as
|
|
18
|
-
import { colorPickerAdaptiveTitle as
|
|
19
|
-
import { useLocalization as
|
|
20
|
-
import { AdaptiveMode as
|
|
21
|
-
import { ActionSheetContent as
|
|
22
|
-
const
|
|
10
|
+
import { createPropsContext as Ve, validatePackage as He, usePropsContext as Ue, useAdaptiveModeContext as Ke, canUseDOM as We, Navigation as $e, getActiveElement as Ge, keepFocusInContainer as I, focusFirstFocusableChild as ue, useDir as Me, classNames as G, kendoThemeMaps as de, getTabIndex as Ze, IconWrap as je, svgIconPropType as qe } from "@progress/kendo-react-common";
|
|
11
|
+
import { packageMetadata as Je } from "../package-metadata.mjs";
|
|
12
|
+
import { Picker as Qe } from "./Picker.mjs";
|
|
13
|
+
import { ColorGradient as Xe } from "./ColorGradient.mjs";
|
|
14
|
+
import { ColorPalette as Ye, DEFAULT_PRESET as et, DEFAULT_TILE_SIZE as tt } from "./ColorPalette.mjs";
|
|
15
|
+
import { FlatColorPicker as z } from "./FlatColorPicker.mjs";
|
|
16
|
+
import { Button as nt } from "@progress/kendo-react-buttons";
|
|
17
|
+
import { caretAltDownIcon as at } from "@progress/kendo-svg-icons";
|
|
18
|
+
import { colorPickerAdaptiveTitle as pe, messages as B, flatColorPickerCancelBtn as fe, flatColorPickerApplyBtn as me, colorPickerDropdownButtonAriaLabel as ve } from "../messages/index.mjs";
|
|
19
|
+
import { useLocalization as rt } from "@progress/kendo-react-intl";
|
|
20
|
+
import { AdaptiveMode as ot } from "../common/AdaptiveMode.mjs";
|
|
21
|
+
import { ActionSheetContent as lt } from "@progress/kendo-react-layout";
|
|
22
|
+
const it = {
|
|
23
23
|
opacity: !0
|
|
24
|
-
},
|
|
25
|
-
palette:
|
|
26
|
-
tileSize:
|
|
27
|
-
},
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
size:
|
|
32
|
-
rounded:
|
|
33
|
-
fillMode: S =
|
|
34
|
-
gradientSettings:
|
|
35
|
-
paletteSettings: j =
|
|
36
|
-
flatColorPickerSettings:
|
|
37
|
-
view:
|
|
38
|
-
views:
|
|
24
|
+
}, ct = {
|
|
25
|
+
palette: et,
|
|
26
|
+
tileSize: tt
|
|
27
|
+
}, M = (D) => D !== void 0, st = Ve(), ge = t.forwardRef((D, ke) => {
|
|
28
|
+
var re, oe;
|
|
29
|
+
He(Je);
|
|
30
|
+
const o = Ue(st, D), b = rt(), Z = Ke(), {
|
|
31
|
+
size: u = k.size,
|
|
32
|
+
rounded: x = k.rounded,
|
|
33
|
+
fillMode: S = k.fillMode,
|
|
34
|
+
gradientSettings: C = k.gradientSettings,
|
|
35
|
+
paletteSettings: j = k.paletteSettings,
|
|
36
|
+
flatColorPickerSettings: w,
|
|
37
|
+
view: d = o.views ? void 0 : k.view,
|
|
38
|
+
views: c = d ? void 0 : k.views,
|
|
39
39
|
activeView: q,
|
|
40
40
|
popupSettings: m,
|
|
41
|
-
valid:
|
|
42
|
-
disabled:
|
|
43
|
-
tabIndex:
|
|
44
|
-
icon:
|
|
45
|
-
svgIcon:
|
|
46
|
-
iconClassName:
|
|
47
|
-
onChange:
|
|
48
|
-
onFocus:
|
|
49
|
-
onBlur:
|
|
50
|
-
onActiveColorClick:
|
|
51
|
-
className:
|
|
52
|
-
adaptive:
|
|
53
|
-
adaptiveTitle: J =
|
|
54
|
-
} =
|
|
55
|
-
|
|
41
|
+
valid: Ce,
|
|
42
|
+
disabled: L,
|
|
43
|
+
tabIndex: Ee,
|
|
44
|
+
icon: N,
|
|
45
|
+
svgIcon: O,
|
|
46
|
+
iconClassName: T,
|
|
47
|
+
onChange: F,
|
|
48
|
+
onFocus: V,
|
|
49
|
+
onBlur: H,
|
|
50
|
+
onActiveColorClick: U,
|
|
51
|
+
className: be,
|
|
52
|
+
adaptive: we,
|
|
53
|
+
adaptiveTitle: J = b.toLanguageString(pe, B[pe])
|
|
54
|
+
} = o, s = t.useRef(null), y = t.useRef(null), P = t.useRef(null), f = t.useRef(null), E = t.useRef(), ye = t.useRef(null), [he, Q] = t.useState(!1), [Se, Te] = t.useState(o.defaultValue), [Pe, _e] = t.useState(!1), [_, Re] = t.useState(), K = M(o.value), v = M(o.open), l = K ? o.value : Se, g = v ? o.open : Pe, X = t.useRef(l), Y = t.useCallback(() => {
|
|
55
|
+
s.current && s.current.focus();
|
|
56
56
|
}, []);
|
|
57
57
|
t.useImperativeHandle(
|
|
58
|
-
|
|
58
|
+
ke,
|
|
59
59
|
() => ({
|
|
60
60
|
// we agreed that each element will have focus method exposed
|
|
61
|
-
element:
|
|
62
|
-
actionElement:
|
|
63
|
-
value:
|
|
64
|
-
focus:
|
|
61
|
+
element: s.current,
|
|
62
|
+
actionElement: ye.current,
|
|
63
|
+
value: l,
|
|
64
|
+
focus: Y
|
|
65
65
|
}),
|
|
66
|
-
[
|
|
66
|
+
[l, Y]
|
|
67
67
|
);
|
|
68
|
-
const
|
|
68
|
+
const Ae = !!(_ && Z && _ <= Z.medium && we);
|
|
69
69
|
t.useEffect(() => {
|
|
70
|
-
const e =
|
|
70
|
+
const e = We && window.ResizeObserver && new window.ResizeObserver(Oe.bind(void 0));
|
|
71
71
|
return document != null && document.body && e && e.observe(document.body), () => {
|
|
72
72
|
document != null && document.body && e && e.disconnect();
|
|
73
73
|
};
|
|
74
74
|
}, []);
|
|
75
|
-
const
|
|
76
|
-
(e,
|
|
77
|
-
|
|
75
|
+
const r = t.useCallback(
|
|
76
|
+
(e, i) => {
|
|
77
|
+
v || (!e && !i && s && s.current && s.current.focus(), _e(e));
|
|
78
78
|
},
|
|
79
|
-
[
|
|
80
|
-
),
|
|
81
|
-
root:
|
|
79
|
+
[v]
|
|
80
|
+
), ee = t.useMemo(() => new $e({
|
|
81
|
+
root: s,
|
|
82
82
|
selectors: [".k-colorpicker", ".k-color-picker-popup"],
|
|
83
83
|
tabIndex: 0,
|
|
84
84
|
keyboardEvents: {
|
|
85
85
|
keydown: {
|
|
86
|
-
Escape: (e,
|
|
87
|
-
|
|
86
|
+
Escape: (e, i, n) => {
|
|
87
|
+
r(!1);
|
|
88
88
|
},
|
|
89
|
-
Enter: (e,
|
|
90
|
-
!
|
|
89
|
+
Enter: (e, i, n) => {
|
|
90
|
+
!v && e === s.current && (n.preventDefault(), n.stopPropagation(), r(!0));
|
|
91
91
|
},
|
|
92
|
-
ArrowDown: (e,
|
|
93
|
-
n.altKey && (n.preventDefault(), n.stopPropagation(),
|
|
92
|
+
ArrowDown: (e, i, n) => {
|
|
93
|
+
n.altKey && (n.preventDefault(), n.stopPropagation(), r(!0));
|
|
94
94
|
},
|
|
95
|
-
ArrowUp: (e,
|
|
96
|
-
n.altKey && (n.preventDefault(), n.stopPropagation(),
|
|
95
|
+
ArrowUp: (e, i, n) => {
|
|
96
|
+
n.altKey && (n.preventDefault(), n.stopPropagation(), r(!1));
|
|
97
97
|
},
|
|
98
|
-
Tab: (e,
|
|
99
|
-
var
|
|
100
|
-
if (
|
|
101
|
-
const
|
|
102
|
-
|
|
98
|
+
Tab: (e, i, n) => {
|
|
99
|
+
var h, le, ie;
|
|
100
|
+
if (Ge(document) !== s.current) {
|
|
101
|
+
const ce = (h = P.current) == null ? void 0 : h.wrapperRef.current, A = (le = y.current) == null ? void 0 : le.wrapperRef.current, se = (ie = f.current) == null ? void 0 : ie.element;
|
|
102
|
+
d === "palette" && ce ? I(n, ce) : d === "gradient" && A ? I(n, A) : d === "combo" && A ? I(n, A.parentElement) : c && se && I(n, se);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
}), [
|
|
108
|
-
|
|
109
|
-
}, [
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
107
|
+
}), [r, v]), Ie = t.useCallback(ee.triggerKeyboardEvent.bind(ee), []), ze = t.useCallback(() => {
|
|
108
|
+
v || (y.current && y.current.wrapperRef.current ? ue(y.current.wrapperRef.current) : P.current ? P.current.focus() : f.current && f.current.element && ue(f.current.element));
|
|
109
|
+
}, [v]), R = (e) => X.current = e, te = t.useCallback(
|
|
110
|
+
(e) => {
|
|
111
|
+
const i = {
|
|
112
|
+
value: X.current,
|
|
113
|
+
nativeEvent: e.nativeEvent,
|
|
114
|
+
syntheticEvent: e
|
|
115
|
+
};
|
|
116
|
+
p(i), r(!g, !0);
|
|
117
|
+
},
|
|
118
|
+
[g]
|
|
119
|
+
), W = t.useCallback(() => {
|
|
120
|
+
r(!1, !0);
|
|
121
|
+
}, [r]), Be = t.useCallback(
|
|
114
122
|
(e) => {
|
|
115
|
-
|
|
123
|
+
U && U.call(void 0, {
|
|
116
124
|
syntheticEvent: e,
|
|
117
125
|
nativeEvent: e.nativeEvent,
|
|
118
|
-
value:
|
|
126
|
+
value: l,
|
|
119
127
|
target: {
|
|
120
|
-
element:
|
|
121
|
-
value:
|
|
128
|
+
element: s.current,
|
|
129
|
+
value: l
|
|
122
130
|
}
|
|
123
131
|
});
|
|
124
132
|
},
|
|
125
|
-
[
|
|
126
|
-
),
|
|
133
|
+
[U, l]
|
|
134
|
+
), De = t.useCallback(
|
|
127
135
|
(e) => {
|
|
128
|
-
|
|
136
|
+
E.current ? (clearTimeout(E.current), E.current = void 0) : Q(!0), V && V.call(void 0, {
|
|
129
137
|
nativeEvent: e.nativeEvent,
|
|
130
138
|
syntheticEvent: e
|
|
131
139
|
});
|
|
132
140
|
},
|
|
133
|
-
[
|
|
134
|
-
),
|
|
135
|
-
|
|
136
|
-
}, []),
|
|
141
|
+
[V]
|
|
142
|
+
), xe = t.useCallback(() => {
|
|
143
|
+
r(!1, !0), Q(!1), E.current = void 0;
|
|
144
|
+
}, []), Le = t.useCallback(
|
|
137
145
|
(e) => {
|
|
138
|
-
clearTimeout(
|
|
146
|
+
clearTimeout(E.current), E.current = window.setTimeout(xe), H && H.call(void 0, {
|
|
139
147
|
nativeEvent: e.nativeEvent,
|
|
140
148
|
syntheticEvent: e
|
|
141
149
|
});
|
|
142
150
|
},
|
|
143
|
-
[
|
|
144
|
-
),
|
|
145
|
-
(e,
|
|
146
|
-
var
|
|
147
|
-
const n =
|
|
148
|
-
|
|
151
|
+
[H]
|
|
152
|
+
), p = t.useCallback(
|
|
153
|
+
(e, i) => {
|
|
154
|
+
var h;
|
|
155
|
+
const n = i ? e.rgbaValue || "" : (h = e.value) != null ? h : "";
|
|
156
|
+
K || Te(n), F && F.call(void 0, {
|
|
149
157
|
value: n,
|
|
150
158
|
nativeEvent: e.nativeEvent,
|
|
151
159
|
syntheticEvent: e.syntheticEvent,
|
|
152
160
|
target: {
|
|
153
|
-
element:
|
|
161
|
+
element: s.current,
|
|
154
162
|
value: n
|
|
155
163
|
}
|
|
156
|
-
});
|
|
164
|
+
}), r(!1);
|
|
157
165
|
},
|
|
158
|
-
[
|
|
159
|
-
),
|
|
160
|
-
(e) =>
|
|
161
|
-
[
|
|
162
|
-
),
|
|
163
|
-
(e) => /* @__PURE__ */ t.createElement(t.Fragment, null, (
|
|
164
|
-
|
|
166
|
+
[K, F]
|
|
167
|
+
), ne = t.useCallback(
|
|
168
|
+
(e) => p(e, !0),
|
|
169
|
+
[M, p]
|
|
170
|
+
), $ = t.useCallback(
|
|
171
|
+
(e) => /* @__PURE__ */ t.createElement(t.Fragment, null, (d === "combo" || d === "gradient") && /* @__PURE__ */ t.createElement(
|
|
172
|
+
Xe,
|
|
165
173
|
{
|
|
166
|
-
...
|
|
174
|
+
...C,
|
|
167
175
|
_adaptive: e,
|
|
168
|
-
ref:
|
|
176
|
+
ref: y,
|
|
169
177
|
isInsidePopup: !0,
|
|
170
|
-
size: e ? "large" :
|
|
178
|
+
size: e ? "large" : u,
|
|
171
179
|
fillMode: S,
|
|
172
|
-
value:
|
|
173
|
-
onChange:
|
|
180
|
+
value: l,
|
|
181
|
+
onChange: p
|
|
174
182
|
}
|
|
175
|
-
), (
|
|
176
|
-
|
|
183
|
+
), (d === "combo" || d === "palette") && /* @__PURE__ */ t.createElement(
|
|
184
|
+
Ye,
|
|
177
185
|
{
|
|
178
186
|
...j,
|
|
179
|
-
ref:
|
|
180
|
-
size: e ? "large" :
|
|
181
|
-
value:
|
|
182
|
-
onChange:
|
|
187
|
+
ref: P,
|
|
188
|
+
size: e ? "large" : u,
|
|
189
|
+
value: l,
|
|
190
|
+
onChange: ne
|
|
183
191
|
}
|
|
184
|
-
),
|
|
185
|
-
|
|
192
|
+
), c && c[0] === "gradient" && c[1] === "palette" && /* @__PURE__ */ t.createElement(
|
|
193
|
+
z,
|
|
186
194
|
{
|
|
187
|
-
...
|
|
188
|
-
_gradientSettings: { _adaptive: e },
|
|
189
|
-
ref:
|
|
190
|
-
size: e ? "large" :
|
|
195
|
+
...w,
|
|
196
|
+
_gradientSettings: { _adaptive: e, ...C },
|
|
197
|
+
ref: f,
|
|
198
|
+
size: e ? "large" : u,
|
|
191
199
|
views: ["gradient", "palette"],
|
|
192
200
|
activeView: q,
|
|
201
|
+
setOpen: r,
|
|
193
202
|
showButtons: !e,
|
|
194
|
-
value:
|
|
195
|
-
onChange:
|
|
203
|
+
value: l,
|
|
204
|
+
onChange: p,
|
|
205
|
+
setAdaptiveModeValue: R
|
|
196
206
|
}
|
|
197
|
-
),
|
|
198
|
-
|
|
207
|
+
), c && c[0] === "palette" && c[1] === "gradient" && /* @__PURE__ */ t.createElement(
|
|
208
|
+
z,
|
|
199
209
|
{
|
|
200
|
-
...
|
|
201
|
-
_gradientSettings: { _adaptive: e },
|
|
202
|
-
ref:
|
|
203
|
-
size: e ? "large" :
|
|
210
|
+
...w,
|
|
211
|
+
_gradientSettings: { _adaptive: e, ...C },
|
|
212
|
+
ref: f,
|
|
213
|
+
size: e ? "large" : u,
|
|
204
214
|
views: ["palette", "gradient"],
|
|
215
|
+
setOpen: r,
|
|
205
216
|
showButtons: !e,
|
|
206
|
-
value:
|
|
207
|
-
onChange:
|
|
217
|
+
value: l,
|
|
218
|
+
onChange: p,
|
|
219
|
+
setAdaptiveModeValue: R
|
|
208
220
|
}
|
|
209
|
-
),
|
|
210
|
-
|
|
221
|
+
), c && c.includes("gradient") && !c.includes("palette") && /* @__PURE__ */ t.createElement(
|
|
222
|
+
z,
|
|
211
223
|
{
|
|
212
|
-
...
|
|
213
|
-
_gradientSettings: { _adaptive: e },
|
|
214
|
-
ref:
|
|
215
|
-
size: e ? "large" :
|
|
224
|
+
...w,
|
|
225
|
+
_gradientSettings: { _adaptive: e, ...C },
|
|
226
|
+
ref: f,
|
|
227
|
+
size: e ? "large" : u,
|
|
216
228
|
views: ["gradient"],
|
|
217
229
|
showButtons: !e,
|
|
218
|
-
|
|
219
|
-
|
|
230
|
+
setOpen: r,
|
|
231
|
+
value: l,
|
|
232
|
+
onChange: p,
|
|
233
|
+
setAdaptiveModeValue: R
|
|
220
234
|
}
|
|
221
|
-
),
|
|
222
|
-
|
|
235
|
+
), c && c.includes("palette") && !c.includes("gradient") && /* @__PURE__ */ t.createElement(
|
|
236
|
+
z,
|
|
223
237
|
{
|
|
224
|
-
...
|
|
225
|
-
_gradientSettings: { _adaptive: e },
|
|
226
|
-
ref:
|
|
227
|
-
size: e ? "large" :
|
|
238
|
+
...w,
|
|
239
|
+
_gradientSettings: { _adaptive: e, ...C },
|
|
240
|
+
ref: f,
|
|
241
|
+
size: e ? "large" : u,
|
|
228
242
|
views: ["palette"],
|
|
229
243
|
showButtons: !e,
|
|
230
|
-
|
|
231
|
-
|
|
244
|
+
setOpen: r,
|
|
245
|
+
value: l,
|
|
246
|
+
onChange: p,
|
|
247
|
+
setAdaptiveModeValue: R
|
|
232
248
|
}
|
|
233
249
|
)),
|
|
234
250
|
[
|
|
235
251
|
q,
|
|
236
252
|
S,
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
253
|
+
w,
|
|
254
|
+
C,
|
|
255
|
+
p,
|
|
256
|
+
ne,
|
|
241
257
|
j,
|
|
242
|
-
|
|
243
|
-
i,
|
|
258
|
+
r,
|
|
244
259
|
u,
|
|
245
|
-
|
|
260
|
+
l,
|
|
261
|
+
d,
|
|
262
|
+
c
|
|
246
263
|
]
|
|
247
|
-
),
|
|
248
|
-
var
|
|
264
|
+
), Ne = t.useCallback(() => {
|
|
265
|
+
var i;
|
|
249
266
|
const e = {
|
|
250
|
-
animation: !!((
|
|
267
|
+
animation: !!((i = m == null ? void 0 : m.animate) == null || i),
|
|
251
268
|
title: J,
|
|
252
|
-
expand:
|
|
253
|
-
onClose:
|
|
254
|
-
windowWidth:
|
|
269
|
+
expand: g,
|
|
270
|
+
onClose: W,
|
|
271
|
+
windowWidth: _,
|
|
255
272
|
footer: {
|
|
256
|
-
cancelText:
|
|
257
|
-
onCancel:
|
|
258
|
-
applyText:
|
|
259
|
-
onApply:
|
|
273
|
+
cancelText: b.toLanguageString(fe, B[fe]),
|
|
274
|
+
onCancel: W,
|
|
275
|
+
applyText: b.toLanguageString(me, B[me]),
|
|
276
|
+
onApply: te
|
|
260
277
|
}
|
|
261
278
|
};
|
|
262
|
-
return /* @__PURE__ */ t.createElement(
|
|
279
|
+
return /* @__PURE__ */ t.createElement(ot, { ...e }, /* @__PURE__ */ t.createElement(lt, { overflowHidden: !0 }, $(!0)));
|
|
263
280
|
}, [
|
|
264
281
|
m == null ? void 0 : m.animate,
|
|
265
282
|
J,
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
]),
|
|
273
|
-
for (const
|
|
274
|
-
|
|
275
|
-
}, []),
|
|
283
|
+
g,
|
|
284
|
+
W,
|
|
285
|
+
_,
|
|
286
|
+
b,
|
|
287
|
+
te,
|
|
288
|
+
$
|
|
289
|
+
]), Oe = t.useCallback((e) => {
|
|
290
|
+
for (const i of e)
|
|
291
|
+
Re(i.target.clientWidth);
|
|
292
|
+
}, []), ae = Me(s, o.dir), Fe = Ce !== !1;
|
|
276
293
|
return /* @__PURE__ */ t.createElement(
|
|
277
294
|
"span",
|
|
278
295
|
{
|
|
279
|
-
id:
|
|
296
|
+
id: o.id,
|
|
280
297
|
role: "combobox",
|
|
281
|
-
"aria-label":
|
|
282
|
-
"aria-labelledby":
|
|
283
|
-
"aria-describedby":
|
|
298
|
+
"aria-label": o.ariaLabel,
|
|
299
|
+
"aria-labelledby": o.ariaLabelledBy,
|
|
300
|
+
"aria-describedby": o.ariaDescribedBy,
|
|
284
301
|
"aria-haspopup": "dialog",
|
|
285
|
-
"aria-expanded":
|
|
286
|
-
"aria-controls": `k-colorpicker-popup-${(
|
|
287
|
-
"aria-disabled":
|
|
288
|
-
className:
|
|
289
|
-
[`k-picker-${
|
|
302
|
+
"aria-expanded": g,
|
|
303
|
+
"aria-controls": `k-colorpicker-popup-${(re = o.id) != null ? re : 0}`,
|
|
304
|
+
"aria-disabled": L ? "true" : void 0,
|
|
305
|
+
className: G("k-colorpicker", "k-picker", "k-icon-picker", {
|
|
306
|
+
[`k-picker-${de.sizeMap[u] || u}`]: u,
|
|
290
307
|
[`k-picker-${S}`]: S,
|
|
291
|
-
[`k-rounded-${
|
|
292
|
-
"k-invalid": !
|
|
293
|
-
"k-disabled":
|
|
294
|
-
"k-focus":
|
|
295
|
-
className:
|
|
308
|
+
[`k-rounded-${de.roundedMap[x] || x}`]: x,
|
|
309
|
+
"k-invalid": !Fe,
|
|
310
|
+
"k-disabled": L,
|
|
311
|
+
"k-focus": he,
|
|
312
|
+
className: be
|
|
296
313
|
}),
|
|
297
|
-
ref:
|
|
298
|
-
tabIndex:
|
|
299
|
-
title:
|
|
300
|
-
onKeyDown:
|
|
301
|
-
onFocus:
|
|
302
|
-
onBlur:
|
|
303
|
-
dir:
|
|
314
|
+
ref: s,
|
|
315
|
+
tabIndex: Ze(Ee, L),
|
|
316
|
+
title: o.title,
|
|
317
|
+
onKeyDown: Ie,
|
|
318
|
+
onFocus: De,
|
|
319
|
+
onBlur: Le,
|
|
320
|
+
dir: ae
|
|
304
321
|
},
|
|
305
322
|
/* @__PURE__ */ t.createElement(
|
|
306
|
-
|
|
323
|
+
Qe,
|
|
307
324
|
{
|
|
308
|
-
dir:
|
|
309
|
-
open:
|
|
310
|
-
onOpen:
|
|
311
|
-
popupAnchor:
|
|
312
|
-
popupSettings: { id: `k-colorpicker-popup-${(
|
|
313
|
-
input: /* @__PURE__ */ t.createElement("span", { onClick:
|
|
325
|
+
dir: ae,
|
|
326
|
+
open: g,
|
|
327
|
+
onOpen: ze,
|
|
328
|
+
popupAnchor: s.current || void 0,
|
|
329
|
+
popupSettings: { id: `k-colorpicker-popup-${(oe = o.id) != null ? oe : 0}`, ...m },
|
|
330
|
+
input: /* @__PURE__ */ t.createElement("span", { onClick: Be, className: "k-input-inner" }, /* @__PURE__ */ t.createElement(
|
|
314
331
|
"span",
|
|
315
332
|
{
|
|
316
|
-
className:
|
|
317
|
-
"k-no-color": !
|
|
318
|
-
"k-icon-color-preview":
|
|
333
|
+
className: G("k-value-icon", "k-color-preview", {
|
|
334
|
+
"k-no-color": !l,
|
|
335
|
+
"k-icon-color-preview": N || O || T
|
|
319
336
|
})
|
|
320
337
|
},
|
|
321
|
-
|
|
322
|
-
!
|
|
323
|
-
/* @__PURE__ */ t.createElement("span", { className: "k-color-preview-mask", style: { backgroundColor:
|
|
338
|
+
T && /* @__PURE__ */ t.createElement("span", { className: G("k-color-preview-icon", T) }),
|
|
339
|
+
!T && (N || O) && /* @__PURE__ */ t.createElement(je, { name: N, icon: O }),
|
|
340
|
+
/* @__PURE__ */ t.createElement("span", { className: "k-color-preview-mask", style: { backgroundColor: l } })
|
|
324
341
|
)),
|
|
325
342
|
button: /* @__PURE__ */ t.createElement(
|
|
326
|
-
|
|
343
|
+
nt,
|
|
327
344
|
{
|
|
328
345
|
tabIndex: -1,
|
|
329
346
|
type: "button",
|
|
330
|
-
onClick:
|
|
347
|
+
onClick: () => r(!g),
|
|
331
348
|
className: "k-input-button",
|
|
332
349
|
rounded: null,
|
|
333
350
|
icon: "caret-alt-down",
|
|
334
|
-
svgIcon:
|
|
335
|
-
"aria-label":
|
|
336
|
-
|
|
337
|
-
|
|
351
|
+
svgIcon: at,
|
|
352
|
+
"aria-label": b.toLanguageString(
|
|
353
|
+
ve,
|
|
354
|
+
B[ve]
|
|
338
355
|
)
|
|
339
356
|
}
|
|
340
357
|
),
|
|
341
|
-
content:
|
|
342
|
-
_mobileMode:
|
|
343
|
-
_actionSheet:
|
|
358
|
+
content: $(!1),
|
|
359
|
+
_mobileMode: Ae,
|
|
360
|
+
_actionSheet: Ne()
|
|
344
361
|
}
|
|
345
362
|
)
|
|
346
363
|
);
|
|
347
364
|
});
|
|
348
|
-
|
|
365
|
+
ge.propTypes = {
|
|
349
366
|
value: a.string,
|
|
350
367
|
defaultValue: a.string,
|
|
351
368
|
disabled: a.bool,
|
|
@@ -354,7 +371,7 @@ me.propTypes = {
|
|
|
354
371
|
dir: a.string,
|
|
355
372
|
id: a.string,
|
|
356
373
|
icon: a.string,
|
|
357
|
-
svgIcon:
|
|
374
|
+
svgIcon: qe,
|
|
358
375
|
ariaLabelledBy: a.string,
|
|
359
376
|
ariaDescribedBy: a.string,
|
|
360
377
|
size: a.oneOf([null, "small", "medium", "large"]),
|
|
@@ -364,17 +381,17 @@ me.propTypes = {
|
|
|
364
381
|
adaptive: a.bool,
|
|
365
382
|
adaptiveTitle: a.string
|
|
366
383
|
};
|
|
367
|
-
const
|
|
384
|
+
const k = {
|
|
368
385
|
size: "medium",
|
|
369
386
|
rounded: "medium",
|
|
370
387
|
fillMode: "solid",
|
|
371
388
|
view: "palette",
|
|
372
389
|
views: ["gradient", "palette"],
|
|
373
|
-
gradientSettings:
|
|
374
|
-
paletteSettings:
|
|
390
|
+
gradientSettings: it,
|
|
391
|
+
paletteSettings: ct
|
|
375
392
|
};
|
|
376
|
-
|
|
393
|
+
ge.displayName = "KendoColorPicker";
|
|
377
394
|
export {
|
|
378
|
-
|
|
379
|
-
|
|
395
|
+
ge as ColorPicker,
|
|
396
|
+
st as ColorPickerPropsContext
|
|
380
397
|
};
|