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