@progress/kendo-react-inputs 10.1.1-develop.1 → 10.2.0-develop.10
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/colors/ColorContrastSvg.js +1 -1
- package/colors/ColorContrastSvg.mjs +14 -14
- package/colors/ColorGradient.js +1 -1
- package/colors/ColorGradient.mjs +52 -46
- package/colors/ColorPicker.js +1 -1
- package/colors/ColorPicker.mjs +48 -46
- package/common/AdaptiveMode.js +1 -1
- package/common/AdaptiveMode.mjs +9 -9
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/index.d.mts +766 -131
- package/index.d.ts +766 -131
- package/maskedtextbox/MaskedTextBox.js +1 -1
- package/maskedtextbox/MaskedTextBox.mjs +3 -1
- package/numerictextbox/NumericTextBox.js +1 -1
- package/numerictextbox/NumericTextBox.mjs +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +10 -10
- package/slider/Slider.js +1 -1
- package/slider/Slider.mjs +6 -2
- package/textbox/Textbox.js +1 -1
- package/textbox/Textbox.mjs +1 -1
package/colors/ColorPicker.mjs
CHANGED
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as t from "react";
|
|
9
9
|
import a from "prop-types";
|
|
10
|
-
import { createPropsContext as He, validatePackage as We, usePropsContext as Ue, useAdaptiveModeContext as Ke, canUseDOM as $e, Navigation as Ge, getActiveElement as Me, keepFocusInContainer as
|
|
10
|
+
import { createPropsContext as He, validatePackage as We, usePropsContext as Ue, useAdaptiveModeContext as Ke, canUseDOM as $e, Navigation as Ge, getActiveElement as Me, keepFocusInContainer as z, focusFirstFocusableChild as ue, WatermarkOverlay as Ze, useDir as je, classNames as M, kendoThemeMaps as de, getTabIndex as qe, IconWrap as Je, svgIconPropType as Qe } from "@progress/kendo-react-common";
|
|
11
11
|
import { packageMetadata as Xe } from "../package-metadata.mjs";
|
|
12
12
|
import { Picker as Ye } from "./Picker.mjs";
|
|
13
13
|
import { ColorGradient as et } from "./ColorGradient.mjs";
|
|
14
14
|
import { ColorPalette as tt, DEFAULT_PRESET as nt, DEFAULT_TILE_SIZE as at } from "./ColorPalette.mjs";
|
|
15
|
-
import { FlatColorPicker as
|
|
15
|
+
import { FlatColorPicker as B } from "./FlatColorPicker.mjs";
|
|
16
16
|
import { Button as rt } from "@progress/kendo-react-buttons";
|
|
17
17
|
import { caretAltDownIcon as ot } from "@progress/kendo-svg-icons";
|
|
18
|
-
import { colorPickerAdaptiveTitle as pe, messages as
|
|
18
|
+
import { colorPickerAdaptiveTitle as pe, messages as D, flatColorPickerCancelBtn as fe, flatColorPickerApplyBtn as me, colorPickerDropdownButtonAriaLabel as ve } from "../messages/index.mjs";
|
|
19
19
|
import { useLocalization as lt } from "@progress/kendo-react-intl";
|
|
20
20
|
import { AdaptiveMode as it } from "../common/AdaptiveMode.mjs";
|
|
21
21
|
import { ActionSheetContent as ct } from "@progress/kendo-react-layout";
|
|
@@ -24,15 +24,15 @@ const st = {
|
|
|
24
24
|
}, ut = {
|
|
25
25
|
palette: nt,
|
|
26
26
|
tileSize: at
|
|
27
|
-
}, Z = (
|
|
27
|
+
}, Z = (L) => L !== void 0, dt = He(), ge = t.forwardRef((L, ke) => {
|
|
28
28
|
var re, oe;
|
|
29
|
-
const Ce = !We(Xe, { component: "ColorPicker" }), o = Ue(dt,
|
|
29
|
+
const Ce = !We(Xe, { component: "ColorPicker" }), o = Ue(dt, L), b = lt(), j = Ke(), {
|
|
30
30
|
size: u = k.size,
|
|
31
|
-
rounded:
|
|
32
|
-
fillMode:
|
|
31
|
+
rounded: x = k.rounded,
|
|
32
|
+
fillMode: _ = k.fillMode,
|
|
33
33
|
gradientSettings: C = k.gradientSettings,
|
|
34
|
-
paletteSettings:
|
|
35
|
-
flatColorPickerSettings:
|
|
34
|
+
paletteSettings: w = k.paletteSettings,
|
|
35
|
+
flatColorPickerSettings: y,
|
|
36
36
|
view: d = o.views ? void 0 : k.view,
|
|
37
37
|
views: c = d ? void 0 : k.views,
|
|
38
38
|
activeView: q,
|
|
@@ -49,8 +49,8 @@ const st = {
|
|
|
49
49
|
onActiveColorClick: U,
|
|
50
50
|
className: we,
|
|
51
51
|
adaptive: ye,
|
|
52
|
-
adaptiveTitle: J = b.toLanguageString(pe,
|
|
53
|
-
} = o, s = t.useRef(null),
|
|
52
|
+
adaptiveTitle: J = b.toLanguageString(pe, D[pe])
|
|
53
|
+
} = o, s = t.useRef(null), S = t.useRef(null), T = t.useRef(null), f = t.useRef(null), E = t.useRef(void 0), Se = t.useRef(null), [he, Q] = t.useState(!1), [_e, Pe] = t.useState(o.defaultValue || void 0), [Te, Re] = t.useState(!1), [R, Ae] = t.useState(), K = Z(o.value), v = Z(o.open), l = K ? o.value : _e, g = v ? o.open : Te, X = t.useRef(l), Y = t.useCallback(() => {
|
|
54
54
|
s.current && s.current.focus();
|
|
55
55
|
}, []);
|
|
56
56
|
t.useImperativeHandle(
|
|
@@ -58,13 +58,13 @@ const st = {
|
|
|
58
58
|
() => ({
|
|
59
59
|
// we agreed that each element will have focus method exposed
|
|
60
60
|
element: s.current,
|
|
61
|
-
actionElement:
|
|
61
|
+
actionElement: Se.current,
|
|
62
62
|
value: l,
|
|
63
63
|
focus: Y
|
|
64
64
|
}),
|
|
65
65
|
[l, Y]
|
|
66
66
|
);
|
|
67
|
-
const Ie = !!(
|
|
67
|
+
const Ie = !!(R && j && R <= j.medium && ye);
|
|
68
68
|
t.useEffect(() => {
|
|
69
69
|
const e = $e && window.ResizeObserver && new window.ResizeObserver(Fe.bind(void 0));
|
|
70
70
|
return document != null && document.body && e && e.observe(document.body), () => {
|
|
@@ -97,15 +97,15 @@ const st = {
|
|
|
97
97
|
Tab: (e, i, n) => {
|
|
98
98
|
var h, le, ie;
|
|
99
99
|
if (Me(document) !== s.current) {
|
|
100
|
-
const ce = (h = T.current) == null ? void 0 : h.wrapperRef.current,
|
|
101
|
-
d === "palette" && ce ?
|
|
100
|
+
const ce = (h = T.current) == null ? void 0 : h.wrapperRef.current, I = (le = S.current) == null ? void 0 : le.wrapperRef.current, se = (ie = f.current) == null ? void 0 : ie.element;
|
|
101
|
+
d === "palette" && ce ? z(n, ce) : d === "gradient" && I ? z(n, I) : d === "combo" && I ? z(n, I.parentElement) : c && se && z(n, se);
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
}), [r, v]), ze = t.useCallback(ee.triggerKeyboardEvent.bind(ee), []), Be = t.useCallback(() => {
|
|
107
|
-
v || (
|
|
108
|
-
}, [v]),
|
|
107
|
+
v || (S.current && S.current.wrapperRef.current ? ue(S.current.wrapperRef.current) : T.current ? T.current.focus() : f.current && f.current.element && ue(f.current.element));
|
|
108
|
+
}, [v]), A = (e) => X.current = e, te = t.useCallback(
|
|
109
109
|
(e) => {
|
|
110
110
|
const i = {
|
|
111
111
|
value: X.current,
|
|
@@ -152,7 +152,7 @@ const st = {
|
|
|
152
152
|
(e, i) => {
|
|
153
153
|
var h;
|
|
154
154
|
const n = i ? e.rgbaValue || "" : (h = e.value) != null ? h : "";
|
|
155
|
-
K ||
|
|
155
|
+
K || Pe(n), V && V.call(void 0, {
|
|
156
156
|
value: n,
|
|
157
157
|
nativeEvent: e.nativeEvent,
|
|
158
158
|
syntheticEvent: e.syntheticEvent,
|
|
@@ -172,26 +172,27 @@ const st = {
|
|
|
172
172
|
{
|
|
173
173
|
...C,
|
|
174
174
|
_adaptive: e,
|
|
175
|
-
ref:
|
|
175
|
+
ref: S,
|
|
176
176
|
isInsidePopup: !0,
|
|
177
177
|
size: e ? "large" : u,
|
|
178
|
-
fillMode:
|
|
178
|
+
fillMode: _,
|
|
179
179
|
value: l,
|
|
180
180
|
onChange: p
|
|
181
181
|
}
|
|
182
182
|
), (d === "combo" || d === "palette") && /* @__PURE__ */ t.createElement(
|
|
183
183
|
tt,
|
|
184
184
|
{
|
|
185
|
-
...
|
|
185
|
+
...w,
|
|
186
186
|
ref: T,
|
|
187
187
|
size: e ? "large" : u,
|
|
188
188
|
value: l,
|
|
189
189
|
onChange: ne
|
|
190
190
|
}
|
|
191
191
|
), c && c[0] === "gradient" && c[1] === "palette" && /* @__PURE__ */ t.createElement(
|
|
192
|
-
|
|
192
|
+
B,
|
|
193
193
|
{
|
|
194
|
-
...
|
|
194
|
+
...y,
|
|
195
|
+
_paletteSettings: w,
|
|
195
196
|
_gradientSettings: { _adaptive: e, ...C },
|
|
196
197
|
ref: f,
|
|
197
198
|
size: e ? "large" : u,
|
|
@@ -201,12 +202,13 @@ const st = {
|
|
|
201
202
|
showButtons: !e,
|
|
202
203
|
value: l,
|
|
203
204
|
onChange: p,
|
|
204
|
-
setAdaptiveModeValue:
|
|
205
|
+
setAdaptiveModeValue: A
|
|
205
206
|
}
|
|
206
207
|
), c && c[0] === "palette" && c[1] === "gradient" && /* @__PURE__ */ t.createElement(
|
|
207
|
-
|
|
208
|
+
B,
|
|
208
209
|
{
|
|
209
|
-
...
|
|
210
|
+
...y,
|
|
211
|
+
_paletteSettings: w,
|
|
210
212
|
_gradientSettings: { _adaptive: e, ...C },
|
|
211
213
|
ref: f,
|
|
212
214
|
size: e ? "large" : u,
|
|
@@ -215,12 +217,12 @@ const st = {
|
|
|
215
217
|
showButtons: !e,
|
|
216
218
|
value: l,
|
|
217
219
|
onChange: p,
|
|
218
|
-
setAdaptiveModeValue:
|
|
220
|
+
setAdaptiveModeValue: A
|
|
219
221
|
}
|
|
220
222
|
), c && c.includes("gradient") && !c.includes("palette") && /* @__PURE__ */ t.createElement(
|
|
221
|
-
|
|
223
|
+
B,
|
|
222
224
|
{
|
|
223
|
-
...
|
|
225
|
+
...y,
|
|
224
226
|
_gradientSettings: { _adaptive: e, ...C },
|
|
225
227
|
ref: f,
|
|
226
228
|
size: e ? "large" : u,
|
|
@@ -229,13 +231,13 @@ const st = {
|
|
|
229
231
|
setOpen: r,
|
|
230
232
|
value: l,
|
|
231
233
|
onChange: p,
|
|
232
|
-
setAdaptiveModeValue:
|
|
234
|
+
setAdaptiveModeValue: A
|
|
233
235
|
}
|
|
234
236
|
), c && c.includes("palette") && !c.includes("gradient") && /* @__PURE__ */ t.createElement(
|
|
235
|
-
|
|
237
|
+
B,
|
|
236
238
|
{
|
|
237
|
-
...
|
|
238
|
-
_paletteSettings:
|
|
239
|
+
...y,
|
|
240
|
+
_paletteSettings: w,
|
|
239
241
|
_gradientSettings: { _adaptive: e, ...C },
|
|
240
242
|
ref: f,
|
|
241
243
|
size: e ? "large" : u,
|
|
@@ -244,17 +246,17 @@ const st = {
|
|
|
244
246
|
setOpen: r,
|
|
245
247
|
value: l,
|
|
246
248
|
onChange: p,
|
|
247
|
-
setAdaptiveModeValue:
|
|
249
|
+
setAdaptiveModeValue: A
|
|
248
250
|
}
|
|
249
251
|
), Ce && /* @__PURE__ */ t.createElement(Ze, null)),
|
|
250
252
|
[
|
|
251
253
|
q,
|
|
252
|
-
|
|
253
|
-
|
|
254
|
+
_,
|
|
255
|
+
y,
|
|
254
256
|
C,
|
|
255
257
|
p,
|
|
256
258
|
ne,
|
|
257
|
-
|
|
259
|
+
w,
|
|
258
260
|
r,
|
|
259
261
|
u,
|
|
260
262
|
l,
|
|
@@ -268,21 +270,21 @@ const st = {
|
|
|
268
270
|
title: J,
|
|
269
271
|
expand: g,
|
|
270
272
|
onClose: $,
|
|
271
|
-
windowWidth:
|
|
273
|
+
windowWidth: R,
|
|
272
274
|
footer: {
|
|
273
|
-
cancelText: b.toLanguageString(fe,
|
|
275
|
+
cancelText: b.toLanguageString(fe, D[fe]),
|
|
274
276
|
onCancel: $,
|
|
275
|
-
applyText: b.toLanguageString(me,
|
|
277
|
+
applyText: b.toLanguageString(me, D[me]),
|
|
276
278
|
onApply: te
|
|
277
279
|
}
|
|
278
280
|
};
|
|
279
|
-
return /* @__PURE__ */ t.createElement(it, { ...e }, /* @__PURE__ */ t.createElement(ct,
|
|
281
|
+
return /* @__PURE__ */ t.createElement(it, { ...e }, /* @__PURE__ */ t.createElement(ct, null, G(!0)));
|
|
280
282
|
}, [
|
|
281
283
|
m == null ? void 0 : m.animate,
|
|
282
284
|
J,
|
|
283
285
|
g,
|
|
284
286
|
$,
|
|
285
|
-
|
|
287
|
+
R,
|
|
286
288
|
b,
|
|
287
289
|
te,
|
|
288
290
|
G
|
|
@@ -304,11 +306,11 @@ const st = {
|
|
|
304
306
|
"aria-disabled": N ? "true" : void 0,
|
|
305
307
|
className: M("k-colorpicker", "k-picker", "k-icon-picker", {
|
|
306
308
|
[`k-picker-${de.sizeMap[u] || u}`]: u,
|
|
307
|
-
[`k-picker-${
|
|
308
|
-
[`k-rounded-${de.roundedMap[
|
|
309
|
+
[`k-picker-${_}`]: _,
|
|
310
|
+
[`k-rounded-${de.roundedMap[x] || x}`]: x,
|
|
309
311
|
"k-invalid": !Ve,
|
|
310
312
|
"k-disabled": N,
|
|
311
|
-
"k-focus":
|
|
313
|
+
"k-focus": he,
|
|
312
314
|
className: we
|
|
313
315
|
}),
|
|
314
316
|
ref: s,
|
|
@@ -351,7 +353,7 @@ const st = {
|
|
|
351
353
|
svgIcon: ot,
|
|
352
354
|
"aria-label": b.toLanguageString(
|
|
353
355
|
ve,
|
|
354
|
-
|
|
356
|
+
D[ve]
|
|
355
357
|
)
|
|
356
358
|
}
|
|
357
359
|
),
|
package/common/AdaptiveMode.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 v=require("react"),s=require("@progress/kendo-react-layout"),k=require("@progress/kendo-svg-icons"),i=require("@progress/kendo-react-buttons"),y=require("@progress/kendo-react-common");function h(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const c=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,c.get?c:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const o=h(v),x=e=>{const{windowWidth:t=0,children:a,navigatable:c,navigatableElements:d,expand:u,animation:p,title:m,subTitle:b,footer:n,onClose:r}=e,f=()=>o.createElement(i.Button,{tabIndex:0,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",icon:"x",svgIcon:k.xIcon,onClick:r}),l=y.useAdaptiveModeContext(),g={navigatable:c||!1,navigatableElements:d||[],expand:u,animation:p,
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react"),s=require("@progress/kendo-react-layout"),k=require("@progress/kendo-svg-icons"),i=require("@progress/kendo-react-buttons"),y=require("@progress/kendo-react-common");function h(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const c=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,c.get?c:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const o=h(v),x=e=>{const{windowWidth:t=0,children:a,navigatable:c,navigatableElements:d,expand:u,animation:p,title:m,subTitle:b,footer:n,onClose:r}=e,f=()=>o.createElement(i.Button,{tabIndex:0,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",icon:"x",svgIcon:k.xIcon,onClick:r}),l=y.useAdaptiveModeContext(),g={navigatable:c||!1,navigatableElements:d||[],expand:u,animation:p,suffixActions:f(),onClose:r,animationStyles:l&&t<=l.small?{top:0,width:"100%",height:"100%"}:void 0,title:m,subTitle:b,className:"k-adaptive-actionsheet",position:l&&t<=l.small?"fullscreen":void 0};return o.createElement(s.ActionSheet,{...g},a,o.createElement(s.ActionSheetFooter,{className:"k-actions k-actions-stretched"},o.createElement(i.Button,{size:"large",className:"k-coloreditor-cancel","aria-label":n.cancelText,onClick:n.onCancel},n.cancelText),o.createElement(i.Button,{themeColor:"primary",size:"large",className:"k-coloreditor-apply","aria-label":n.applyText,onClick:n.onApply},n.applyText)))};exports.AdaptiveMode=x;
|
package/common/AdaptiveMode.mjs
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as t from "react";
|
|
9
|
-
import { ActionSheet as
|
|
9
|
+
import { ActionSheet as h, ActionSheetFooter as v } from "@progress/kendo-react-layout";
|
|
10
10
|
import { xIcon as C } from "@progress/kendo-svg-icons";
|
|
11
11
|
import { Button as o } from "@progress/kendo-react-buttons";
|
|
12
12
|
import { useAdaptiveModeContext as g } from "@progress/kendo-react-common";
|
|
13
|
-
const
|
|
13
|
+
const E = (i) => {
|
|
14
14
|
const {
|
|
15
15
|
windowWidth: l = 0,
|
|
16
16
|
children: c,
|
|
@@ -19,10 +19,10 @@ const A = (i) => {
|
|
|
19
19
|
expand: m,
|
|
20
20
|
animation: p,
|
|
21
21
|
title: d,
|
|
22
|
-
subTitle:
|
|
22
|
+
subTitle: f,
|
|
23
23
|
footer: e,
|
|
24
24
|
onClose: n
|
|
25
|
-
} = i,
|
|
25
|
+
} = i, x = () => /* @__PURE__ */ t.createElement(
|
|
26
26
|
o,
|
|
27
27
|
{
|
|
28
28
|
tabIndex: 0,
|
|
@@ -34,20 +34,20 @@ const A = (i) => {
|
|
|
34
34
|
svgIcon: C,
|
|
35
35
|
onClick: n
|
|
36
36
|
}
|
|
37
|
-
), a = g(),
|
|
37
|
+
), a = g(), b = {
|
|
38
38
|
navigatable: r || !1,
|
|
39
39
|
navigatableElements: s || [],
|
|
40
40
|
expand: m,
|
|
41
41
|
animation: p,
|
|
42
|
-
|
|
42
|
+
suffixActions: x(),
|
|
43
43
|
onClose: n,
|
|
44
44
|
animationStyles: a && l <= a.small ? { top: 0, width: "100%", height: "100%" } : void 0,
|
|
45
45
|
title: d,
|
|
46
|
-
subTitle:
|
|
46
|
+
subTitle: f,
|
|
47
47
|
className: "k-adaptive-actionsheet",
|
|
48
48
|
position: a && l <= a.small ? "fullscreen" : void 0
|
|
49
49
|
};
|
|
50
|
-
return /* @__PURE__ */ t.createElement(
|
|
50
|
+
return /* @__PURE__ */ t.createElement(h, { ...b }, c, /* @__PURE__ */ t.createElement(v, { className: "k-actions k-actions-stretched" }, /* @__PURE__ */ t.createElement(
|
|
51
51
|
o,
|
|
52
52
|
{
|
|
53
53
|
size: "large",
|
|
@@ -69,5 +69,5 @@ const A = (i) => {
|
|
|
69
69
|
)));
|
|
70
70
|
};
|
|
71
71
|
export {
|
|
72
|
-
|
|
72
|
+
E as AdaptiveMode
|
|
73
73
|
};
|