@progress/kendo-react-inputs 10.2.0-develop.3 → 10.2.0-develop.5

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.
@@ -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 I, 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";
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 z } from "./FlatColorPicker.mjs";
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 B, flatColorPickerCancelBtn as fe, flatColorPickerApplyBtn as me, colorPickerDropdownButtonAriaLabel as ve } from "../messages/index.mjs";
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 = (D) => D !== void 0, dt = He(), ge = t.forwardRef((D, ke) => {
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, D), b = lt(), j = Ke(), {
29
+ const Ce = !We(Xe, { component: "ColorPicker" }), o = Ue(dt, L), b = lt(), j = Ke(), {
30
30
  size: u = k.size,
31
- rounded: L = k.rounded,
32
- fillMode: S = k.fillMode,
31
+ rounded: x = k.rounded,
32
+ fillMode: _ = k.fillMode,
33
33
  gradientSettings: C = k.gradientSettings,
34
- paletteSettings: x = k.paletteSettings,
35
- flatColorPickerSettings: w,
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, B[pe])
53
- } = o, s = t.useRef(null), y = t.useRef(null), T = t.useRef(null), f = t.useRef(null), E = t.useRef(void 0), he = t.useRef(null), [Se, Q] = t.useState(!1), [Pe, Te] = t.useState(o.defaultValue), [_e, Re] = t.useState(!1), [_, Ae] = t.useState(), K = Z(o.value), v = Z(o.open), l = K ? o.value : Pe, g = v ? o.open : _e, X = t.useRef(l), Y = t.useCallback(() => {
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), [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: he.current,
61
+ actionElement: Se.current,
62
62
  value: l,
63
63
  focus: Y
64
64
  }),
65
65
  [l, Y]
66
66
  );
67
- const Ie = !!(_ && j && _ <= j.medium && ye);
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, A = (le = y.current) == null ? void 0 : le.wrapperRef.current, se = (ie = f.current) == null ? void 0 : ie.element;
101
- d === "palette" && ce ? I(n, ce) : d === "gradient" && A ? I(n, A) : d === "combo" && A ? I(n, A.parentElement) : c && se && I(n, se);
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 || (y.current && y.current.wrapperRef.current ? ue(y.current.wrapperRef.current) : T.current ? T.current.focus() : f.current && f.current.element && ue(f.current.element));
108
- }, [v]), R = (e) => X.current = e, te = t.useCallback(
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 || Te(n), V && V.call(void 0, {
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: y,
175
+ ref: S,
176
176
  isInsidePopup: !0,
177
177
  size: e ? "large" : u,
178
- fillMode: S,
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
- ...x,
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
- z,
192
+ B,
193
193
  {
194
- ...w,
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: R
205
+ setAdaptiveModeValue: A
205
206
  }
206
207
  ), c && c[0] === "palette" && c[1] === "gradient" && /* @__PURE__ */ t.createElement(
207
- z,
208
+ B,
208
209
  {
209
- ...w,
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: R
220
+ setAdaptiveModeValue: A
219
221
  }
220
222
  ), c && c.includes("gradient") && !c.includes("palette") && /* @__PURE__ */ t.createElement(
221
- z,
223
+ B,
222
224
  {
223
- ...w,
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: R
234
+ setAdaptiveModeValue: A
233
235
  }
234
236
  ), c && c.includes("palette") && !c.includes("gradient") && /* @__PURE__ */ t.createElement(
235
- z,
237
+ B,
236
238
  {
237
- ...w,
238
- _paletteSettings: x,
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: R
249
+ setAdaptiveModeValue: A
248
250
  }
249
251
  ), Ce && /* @__PURE__ */ t.createElement(Ze, null)),
250
252
  [
251
253
  q,
252
- S,
253
- w,
254
+ _,
255
+ y,
254
256
  C,
255
257
  p,
256
258
  ne,
257
- x,
259
+ w,
258
260
  r,
259
261
  u,
260
262
  l,
@@ -268,11 +270,11 @@ 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, B[fe]),
275
+ cancelText: b.toLanguageString(fe, D[fe]),
274
276
  onCancel: $,
275
- applyText: b.toLanguageString(me, B[me]),
277
+ applyText: b.toLanguageString(me, D[me]),
276
278
  onApply: te
277
279
  }
278
280
  };
@@ -282,7 +284,7 @@ const st = {
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-${S}`]: S,
308
- [`k-rounded-${de.roundedMap[L] || L}`]: L,
309
+ [`k-picker-${_}`]: _,
310
+ [`k-rounded-${de.roundedMap[x] || x}`]: x,
309
311
  "k-invalid": !Ve,
310
312
  "k-disabled": N,
311
- "k-focus": Se,
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
- B[ve]
356
+ D[ve]
355
357
  )
356
358
  }
357
359
  ),