@progress/kendo-react-inputs 14.0.1-develop.1 → 14.0.2-develop.1

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,23 +7,23 @@
7
7
  */
8
8
  import * as e from "react";
9
9
  import a from "prop-types";
10
- import { usePropsContext as Ve, useId as Pe, dispatchEvent as P, useKendoPaste as Ee, Keys as _, useDir as Be, classNames as E, getTabIndex as Ne, kendoThemeMaps as $, createPropsContext as Ie } from "@progress/kendo-react-common";
10
+ import { usePropsContext as Ve, useId as Pe, dispatchEvent as P, useKendoPaste as Ee, Keys as $, useDir as Be, classNames as E, getTabIndex as Ne, kendoThemeMaps as A, createPropsContext as Ie } from "@progress/kendo-react-common";
11
11
  import { useLocalization as Fe } from "@progress/kendo-react-intl";
12
12
  import { messages as ze, checkboxValidation as Ke, checkboxOptionalText as Me } from "../messages/index.mjs";
13
- const Se = Ie(), W = e.forwardRef((j, G) => {
14
- const B = Ve(Se, j), {
15
- ariaDescribedBy: J,
16
- ariaLabelledBy: Q,
13
+ const Se = Ie(), j = e.forwardRef((G, J) => {
14
+ const B = Ve(Se, G), {
15
+ ariaDescribedBy: Q,
16
+ ariaLabelledBy: X,
17
17
  checked: N,
18
- className: X,
19
- labelClassName: Y,
20
- children: Z,
18
+ className: Y,
19
+ labelClassName: Z,
20
+ children: _,
21
21
  defaultChecked: ee,
22
22
  disabled: o,
23
23
  defaultValue: ae,
24
24
  id: b,
25
- size: m = A.size,
26
- rounded: p = A.rounded,
25
+ size: m = W.size,
26
+ rounded: p = W.rounded,
27
27
  label: I,
28
28
  labelPlacement: F,
29
29
  name: z,
@@ -55,7 +55,7 @@ const Se = Ie(), W = e.forwardRef((j, G) => {
55
55
  }),
56
56
  [D]
57
57
  );
58
- e.useImperativeHandle(G, c);
58
+ e.useImperativeHandle(J, c);
59
59
  const [se, ce] = e.useState(ee), [re, ie] = e.useState(ae), T = typeof s == "boolean" || s === null, v = N !== void 0, i = T, C = i ? s : re, g = v ? N : i ? void 0 : se, w = z || b, L = g === void 0 && C, O = L ? C : g, u = L || i ? s === null ? s : void 0 : s || C, de = O === null || u === null, q = Pe(), ue = Fe(), R = (t) => ue.toLanguageString(t, ze[t]), H = R(Ke), be = R(Me), y = K !== void 0 ? K : d ? !!g : !0;
60
60
  e.useEffect(() => {
61
61
  n.current && n.current.setCustomValidity && n.current.setCustomValidity(y ? "" : M || H);
@@ -99,7 +99,7 @@ const Se = Ie(), W = e.forwardRef((j, G) => {
99
99
  if (o)
100
100
  return;
101
101
  const { keyCode: l } = t, xe = t.currentTarget.checked;
102
- l === _.space && (t.preventDefault(), t.stopPropagation(), r(t, !xe));
102
+ l === $.space && (t.preventDefault(), t.stopPropagation(), r(t, !xe));
103
103
  },
104
104
  [o, r]
105
105
  ), fe = e.useCallback(
@@ -107,7 +107,7 @@ const Se = Ie(), W = e.forwardRef((j, G) => {
107
107
  if (o)
108
108
  return;
109
109
  const { keyCode: l } = t;
110
- l === _.space && t.preventDefault();
110
+ l === $.space && t.preventDefault();
111
111
  },
112
112
  [o]
113
113
  ), he = e.useCallback(
@@ -120,11 +120,11 @@ const Se = Ie(), W = e.forwardRef((j, G) => {
120
120
  h && !o && P(h, t, c(), void 0);
121
121
  },
122
122
  [h, o, c]
123
- ), Ce = Be(n, B.dir), ge = E("k-checkbox-wrap", X), U = {
123
+ ), Ce = Be(n, B.dir), ge = E("k-checkbox-wrap", Y), U = {
124
124
  type: "checkbox",
125
125
  className: E("k-checkbox", {
126
- [`k-checkbox-${$.sizeMap[m] || m}`]: m,
127
- [`k-rounded-${$.roundedMap[p] || p}`]: p,
126
+ [`k-checkbox-${A.sizeMap[m] || m}`]: m,
127
+ [`k-rounded-${A.roundedMap[p] || p}`]: p,
128
128
  "k-indeterminate": de,
129
129
  "k-disabled": o,
130
130
  "k-invalid k-invalid": !(y || S !== void 0 || S === !0)
@@ -137,8 +137,8 @@ const Se = Ie(), W = e.forwardRef((j, G) => {
137
137
  tabIndex: Ne(oe, o),
138
138
  role: "checkbox",
139
139
  checked: !!O,
140
- "aria-describedby": J,
141
- "aria-labelledby": Q,
140
+ "aria-describedby": Q,
141
+ "aria-labelledby": X,
142
142
  "aria-disabled": o || void 0,
143
143
  "aria-required": d,
144
144
  autoFocus: ne,
@@ -155,16 +155,16 @@ const Se = Ie(), W = e.forwardRef((j, G) => {
155
155
  ), x = I !== void 0 ? /* @__PURE__ */ e.createElement(
156
156
  "label",
157
157
  {
158
- className: E("k-checkbox-label", Y),
158
+ className: E("k-checkbox-label", Z),
159
159
  htmlFor: b || q,
160
160
  style: { userSelect: "none" }
161
161
  },
162
162
  I,
163
163
  te && /* @__PURE__ */ e.createElement("span", { className: "k-label-optional" }, be)
164
- ) : null, V = /* @__PURE__ */ e.createElement("span", { className: ge }, ye, Z);
164
+ ) : null, V = /* @__PURE__ */ e.createElement("span", { className: ge }, ye, _);
165
165
  return /* @__PURE__ */ e.createElement(e.Fragment, null, F === "before" ? /* @__PURE__ */ e.createElement("div", { dir: "rtl" }, V, x) : F === "after" ? /* @__PURE__ */ e.createElement("div", { dir: "ltr" }, V, x) : /* @__PURE__ */ e.createElement("div", { dir: Ce }, V, x));
166
166
  });
167
- W.propTypes = {
167
+ j.propTypes = {
168
168
  checked: a.bool,
169
169
  className: a.string,
170
170
  defaultChecked: a.bool,
@@ -191,12 +191,12 @@ W.propTypes = {
191
191
  onFocus: a.func,
192
192
  onBlur: a.func
193
193
  };
194
- const A = {
194
+ const W = {
195
195
  size: void 0,
196
196
  rounded: void 0
197
197
  };
198
- W.displayName = "KendoCheckbox";
198
+ j.displayName = "KendoCheckbox";
199
199
  export {
200
- W as Checkbox,
200
+ j as Checkbox,
201
201
  Se as CheckboxPropsContext
202
202
  };
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import * as r from "react";
9
9
  import o from "prop-types";
10
- import { withIdHOC as F, withPropsContext as G, createPropsContext as M, validatePackage as A, getLicenseMessage as _, canUseDOM as N, Navigation as f, getActiveElement as b, disableNavigatableContainer as C, focusFirstFocusableChild as I, enableNavigatableContainer as T, keepFocusInContainer as O, TABBABLE_ELEMENTS as z, getTabIndex as k, classNames as B, kendoThemeMaps as P, Draggable as V, WatermarkOverlay as K } from "@progress/kendo-react-common";
10
+ import { withIdHOC as F, withPropsContext as G, createPropsContext as M, validatePackage as A, getLicenseMessage as N, canUseDOM as I, Navigation as f, getActiveElement as b, disableNavigatableContainer as C, focusFirstFocusableChild as _, enableNavigatableContainer as T, keepFocusInContainer as O, TABBABLE_ELEMENTS as z, getTabIndex as k, classNames as B, kendoThemeMaps as P, Draggable as V, WatermarkOverlay as K } from "@progress/kendo-react-common";
11
11
  import { packageMetadata as R } from "../package-metadata.mjs";
12
12
  import { Slider as S } from "../slider/Slider.mjs";
13
13
  import { isPresent as y, fitIntoBounds as E } from "./utils/misc.mjs";
@@ -69,7 +69,7 @@ const ae = "rgba", L = "rgba(255, 255, 255, 1)", g = 2, v = 5, h = class h exten
69
69
  }, this.onKeyDown = (e) => {
70
70
  var s;
71
71
  (s = this.navigation) == null || s.triggerKeyboardEvent(e);
72
- }, this.showLicenseWatermark = !A(R, { component: "ColorGradient" }), this.licenseMessage = _(R);
72
+ }, this.showLicenseWatermark = !A(R, { component: "ColorGradient" }), this.licenseMessage = N(R);
73
73
  const a = t.value || t.defaultValue || d(L, ae);
74
74
  this.state = Object.assign({}, h.getStateFromValue(a), {
75
75
  isFirstRender: !0,
@@ -86,7 +86,7 @@ const ae = "rgba", L = "rgba(255, 255, 255, 1)", g = 2, v = 5, h = class h exten
86
86
  * @hidden
87
87
  */
88
88
  componentDidMount() {
89
- if (this.setAlphaSliderBackground(this.state.backgroundColor), this.state.isFirstRender && this.setState({ isFirstRender: !1 }), this.gradientWrapper && (this.resizeObserver = N && window.ResizeObserver && new window.ResizeObserver(() => {
89
+ if (this.setAlphaSliderBackground(this.state.backgroundColor), this.state.isFirstRender && this.setState({ isFirstRender: !1 }), this.gradientWrapper && (this.resizeObserver = I && window.ResizeObserver && new window.ResizeObserver(() => {
90
90
  this.forceUpdate();
91
91
  }), this.resizeObserver && this.resizeObserver.observe(this.gradientWrapper)), this.wrapperRef && this.hsvGradientRef) {
92
92
  let t = 0, a = 0;
@@ -122,7 +122,7 @@ const ae = "rgba", L = "rgba(255, 255, 255, 1)", g = 2, v = 5, h = class h exten
122
122
  b(document) === t ? C(t) : O(e, t, z);
123
123
  },
124
124
  Enter: (t, a, e) => {
125
- b(document) === t && (I(t), T(t));
125
+ b(document) === t && (_(t), T(t));
126
126
  },
127
127
  Escape: (t, a, e) => {
128
128
  b(document) !== t && (t.focus(), C(t));
@@ -6,10 +6,10 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as R from "react";
9
- import { useRef as z, useMemo as O, useState as U, useEffect as re, useCallback as p, useImperativeHandle as V } from "react";
9
+ import { useRef as O, useMemo as U, useState as V, useEffect as re, useCallback as p, useImperativeHandle as M } from "react";
10
10
  import l from "prop-types";
11
11
  import { ColorPaletteService as se } from "./utils/color-palette.service.mjs";
12
- import { withIdHOC as le, createPropsContext as ne, usePropsContext as ae, dispatchEvent as M, classNames as H, getTabIndex as ce } from "@progress/kendo-react-common";
12
+ import { withIdHOC as le, createPropsContext as ne, usePropsContext as ae, dispatchEvent as _, classNames as H, getTabIndex as ce } from "@progress/kendo-react-common";
13
13
  import { PALETTEPRESETS as ie } from "./models/palette-presets.mjs";
14
14
  import { parseColor as $ } from "./utils/color-parser.mjs";
15
15
  const ue = 24, de = 10, fe = "office", F = {
@@ -41,16 +41,16 @@ const ue = 24, de = 10, fe = "office", F = {
41
41
  id: Z,
42
42
  ariaLabelledBy: G,
43
43
  ariaDescribedBy: J
44
- } = K, k = z(null), Q = z({
44
+ } = K, k = O(null), Q = O({
45
45
  focus: () => {
46
46
  var o;
47
47
  (o = k.current) == null || o.focus();
48
48
  },
49
49
  wrapperRef: k
50
- }), A = S != null ? S : F.columns, f = O(() => we(I), [I]), t = O(() => {
50
+ }), A = S != null ? S : F.columns, f = U(() => we(I), [I]), t = U(() => {
51
51
  const o = new se();
52
52
  return o.setColorMatrix(f, A), o;
53
- }, [f, A]), [C, T] = U(() => y !== void 0 ? y : j || ""), [x, b] = U(""), h = y !== void 0;
53
+ }, [f, A]), [C, T] = V(() => y !== void 0 ? y : j || ""), [x, b] = V(""), h = y !== void 0;
54
54
  re(() => {
55
55
  h && T(y);
56
56
  }, [y, h]);
@@ -116,7 +116,7 @@ const ue = 24, de = 10, fe = "office", F = {
116
116
  const s = r();
117
117
  if (s && (h || T(s), g)) {
118
118
  const e = $(s, "rgba");
119
- M(g, o, null, {
119
+ _(g, o, null, {
120
120
  value: s,
121
121
  rgbaValue: e || ""
122
122
  });
@@ -133,7 +133,7 @@ const ue = 24, de = 10, fe = "office", F = {
133
133
  const r = o;
134
134
  if (h || T(r), g) {
135
135
  const w = $(r, "rgba");
136
- M(g, u, null, {
136
+ _(g, u, null, {
137
137
  value: r,
138
138
  rgbaValue: w || ""
139
139
  });
@@ -162,7 +162,7 @@ const ue = 24, de = 10, fe = "office", F = {
162
162
  );
163
163
  }),
164
164
  [C, x, c, N]
165
- ), oe = p(() => t.colorRows.map((u, r) => /* @__PURE__ */ R.createElement("tr", { key: u[0] || r, role: "row" }, B(u, r))), [t, B]), _ = p(
165
+ ), oe = p(() => t.colorRows.map((u, r) => /* @__PURE__ */ R.createElement("tr", { key: u[0] || r, role: "row" }, B(u, r))), [t, B]), z = p(
166
166
  () => ({
167
167
  focus: () => {
168
168
  var o;
@@ -172,7 +172,7 @@ const ue = 24, de = 10, fe = "office", F = {
172
172
  }),
173
173
  []
174
174
  );
175
- V(Q, _), V(P, _);
175
+ M(Q, z), M(P, z);
176
176
  const te = H("k-colorpalette", W, {
177
177
  "k-disabled": i,
178
178
  "k-colorpalette-sm": L === "small",
@@ -39,7 +39,7 @@ const pt = {
39
39
  popupSettings: g,
40
40
  valid: ye,
41
41
  disabled: N,
42
- tabIndex: _e,
42
+ tabIndex: he,
43
43
  icon: O,
44
44
  svgIcon: F,
45
45
  iconClassName: T,
@@ -47,11 +47,11 @@ const pt = {
47
47
  onFocus: H,
48
48
  onBlur: W,
49
49
  onActiveColorClick: U,
50
- className: he,
50
+ className: _e,
51
51
  adaptive: Te,
52
52
  adaptiveTitle: Q = w.toLanguageString(ve, L[ve]),
53
53
  adaptiveSubtitle: X
54
- } = o, s = t.useRef(null), _ = t.useRef(null), P = t.useRef(null), m = t.useRef(null), b = t.useRef(void 0), Pe = t.useRef(null), [Re, Y] = t.useState(!1), [Ae, Ie] = t.useState(o.defaultValue || void 0), [ze, Be] = t.useState(!1), [R, Le] = t.useState(), K = j(o.value), k = j(o.open), i = K ? o.value : Ae, p = k ? o.open : ze, ee = t.useRef(i), te = t.useCallback(() => {
54
+ } = o, s = t.useRef(null), h = t.useRef(null), P = t.useRef(null), m = t.useRef(null), b = t.useRef(void 0), Pe = t.useRef(null), [Re, Y] = t.useState(!1), [Ae, Ie] = t.useState(o.defaultValue || void 0), [ze, Be] = t.useState(!1), [R, Le] = t.useState(), K = j(o.value), k = j(o.open), i = K ? o.value : Ae, p = k ? o.open : ze, ee = t.useRef(i), te = t.useCallback(() => {
55
55
  s.current && s.current.focus();
56
56
  }, []);
57
57
  t.useImperativeHandle(
@@ -96,16 +96,16 @@ const pt = {
96
96
  n.altKey && (n.preventDefault(), n.stopPropagation(), a(!1));
97
97
  },
98
98
  Tab: (e, l, n) => {
99
- var h, ce, se;
99
+ var _, ce, se;
100
100
  if (qe(document) !== s.current) {
101
- const ue = (h = P.current) == null ? void 0 : h.wrapperRef.current, I = (ce = _.current) == null ? void 0 : ce.wrapperRef.current, de = (se = m.current) == null ? void 0 : se.element;
101
+ const ue = (_ = P.current) == null ? void 0 : _.wrapperRef.current, I = (ce = h.current) == null ? void 0 : ce.wrapperRef.current, de = (se = m.current) == null ? void 0 : se.element;
102
102
  d === "palette" && ue ? z(n, ue) : d === "gradient" && I ? z(n, I) : d === "combo" && I ? z(n, I.parentElement) : c && de && z(n, de);
103
103
  }
104
104
  }
105
105
  }
106
106
  }
107
107
  }), [a, k]), De = t.useCallback(ne.triggerKeyboardEvent.bind(ne), []), xe = t.useCallback(() => {
108
- k || (_.current && _.current.wrapperRef.current ? pe(_.current.wrapperRef.current) : P.current ? P.current.focus() : m.current && m.current.element && pe(m.current.element));
108
+ k || (h.current && h.current.wrapperRef.current ? pe(h.current.wrapperRef.current) : P.current ? P.current.focus() : m.current && m.current.element && pe(m.current.element));
109
109
  }, [k]), A = (e) => ee.current = e, ae = t.useCallback(
110
110
  (e) => {
111
111
  const l = {
@@ -151,8 +151,8 @@ const pt = {
151
151
  [W]
152
152
  ), f = t.useCallback(
153
153
  (e, l) => {
154
- var h;
155
- const n = l ? e.rgbaValue || "" : (h = e.value) != null ? h : "";
154
+ var _;
155
+ const n = l ? e.rgbaValue || "" : (_ = e.value) != null ? _ : "";
156
156
  K || Ie(n), V && V.call(void 0, {
157
157
  value: n,
158
158
  nativeEvent: e.nativeEvent,
@@ -173,7 +173,7 @@ const pt = {
173
173
  {
174
174
  ...E,
175
175
  _adaptive: e,
176
- ref: _,
176
+ ref: h,
177
177
  isInsidePopup: !0,
178
178
  size: e ? "large" : u,
179
179
  value: i,
@@ -317,10 +317,10 @@ const pt = {
317
317
  "k-invalid": !Ue,
318
318
  "k-disabled": N,
319
319
  "k-focus": Re,
320
- className: he
320
+ className: _e
321
321
  }),
322
322
  ref: s,
323
- tabIndex: Xe(_e, N),
323
+ tabIndex: Xe(he, N),
324
324
  title: o.title,
325
325
  onKeyDown: De,
326
326
  onFocus: Oe,
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import * as a from "react";
9
9
  import l from "prop-types";
10
- import { validatePackage as le, getLicenseMessage as ne, Navigation as oe, getActiveElement as B, disableNavigatableContainer as K, focusFirstFocusableChild as ie, enableNavigatableContainer as re, keepFocusInContainer as ce, classNames as M, kendoThemeMaps as se, getTabIndex as de, WatermarkOverlay as ve } from "@progress/kendo-react-common";
10
+ import { validatePackage as le, getLicenseMessage as ne, Navigation as oe, getActiveElement as _, disableNavigatableContainer as K, focusFirstFocusableChild as ie, enableNavigatableContainer as re, keepFocusInContainer as ce, classNames as M, kendoThemeMaps as se, getTabIndex as de, WatermarkOverlay as ve } from "@progress/kendo-react-common";
11
11
  import { ButtonGroup as L, Button as d } from "@progress/kendo-react-buttons";
12
12
  import { dropletSliderIcon as V, paletteIcon as G, dropletSlashIcon as ue } from "@progress/kendo-svg-icons";
13
13
  import { ColorPalette as ge } from "./ColorPalette.mjs";
@@ -30,7 +30,7 @@ const D = a.forwardRef((e, H) => {
30
30
  (h || "ColorGradient") === "ColorGradient"
31
31
  ), [s, x] = a.useState(
32
32
  (r != null ? r : [])[0] === "gradient" && P === "gradient"
33
- ), [i, E] = a.useState(e.value || b || void 0), [g, _] = a.useState(e.value || b || void 0), I = e.value !== void 0 ? e.value : void 0;
33
+ ), [i, E] = a.useState(e.value || b || void 0), [g, I] = a.useState(e.value || b || void 0), B = e.value !== void 0 ? e.value : void 0;
34
34
  a.useEffect(() => {
35
35
  E(e.value);
36
36
  }, [e.value]);
@@ -43,9 +43,9 @@ const D = a.forwardRef((e, H) => {
43
43
  element: y.current,
44
44
  focus: R,
45
45
  props: e,
46
- value: I
46
+ value: B
47
47
  }),
48
- [I, R, e]
48
+ [B, R, e]
49
49
  ), a.useImperativeHandle(H, () => f.current);
50
50
  const A = a.useCallback(
51
51
  (t) => {
@@ -61,7 +61,7 @@ const D = a.forwardRef((e, H) => {
61
61
  (t) => {
62
62
  var c;
63
63
  const n = b || void 0;
64
- if (E(n), _(n), (c = e._gradientSettings) != null && c._adaptive && e.setAdaptiveModeValue && e.setAdaptiveModeValue(n), e.onPreviewChange) {
64
+ if (E(n), I(n), (c = e._gradientSettings) != null && c._adaptive && e.setAdaptiveModeValue && e.setAdaptiveModeValue(n), e.onPreviewChange) {
65
65
  const S = {
66
66
  value: n,
67
67
  nativeEvent: t.nativeEvent,
@@ -87,7 +87,7 @@ const D = a.forwardRef((e, H) => {
87
87
  [e.onPreviewChange]
88
88
  ), Y = a.useCallback(
89
89
  (t) => {
90
- if (i !== void 0 && _(i), e.onChange) {
90
+ if (i !== void 0 && I(i), e.onChange) {
91
91
  const n = {
92
92
  value: i,
93
93
  nativeEvent: t.nativeEvent,
@@ -114,7 +114,7 @@ const D = a.forwardRef((e, H) => {
114
114
  ), ee = a.useCallback(
115
115
  (t) => {
116
116
  var c, S;
117
- if ((!t.relatedTarget || !((c = y.current) != null && c.contains(t.relatedTarget))) && !((S = e._gradientSettings) != null && S._adaptive) && (!w && i !== void 0 && _(i), !w && e.onChange)) {
117
+ if ((!t.relatedTarget || !((c = y.current) != null && c.contains(t.relatedTarget))) && !((S = e._gradientSettings) != null && S._adaptive) && (!w && i !== void 0 && I(i), !w && e.onChange)) {
118
118
  const te = {
119
119
  value: i,
120
120
  nativeEvent: t.nativeEvent,
@@ -132,13 +132,13 @@ const D = a.forwardRef((e, H) => {
132
132
  keyboardEvents: {
133
133
  keydown: {
134
134
  Tab: (t, n, c) => {
135
- B(document) === t ? K(t) : ce(c, t);
135
+ _(document) === t ? K(t) : ce(c, t);
136
136
  },
137
137
  Enter: (t, n, c) => {
138
- B(document) === t && (ie(t), re(t));
138
+ _(document) === t && (ie(t), re(t));
139
139
  },
140
140
  Escape: (t, n, c) => {
141
- B(document) !== t && (t.focus(), K(t));
141
+ _(document) !== t && (t.focus(), K(t));
142
142
  }
143
143
  }
144
144
  }
@@ -277,7 +277,7 @@ const D = a.forwardRef((e, H) => {
277
277
  "span",
278
278
  {
279
279
  className: M("k-coloreditor-preview-color", "k-color-preview", {
280
- "k-no-color": I === void 0
280
+ "k-no-color": B === void 0
281
281
  })
282
282
  },
283
283
  /* @__PURE__ */ a.createElement(