@progress/kendo-react-inputs 13.4.0-develop.1 → 13.4.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.
@@ -10,20 +10,20 @@ import e from "prop-types";
10
10
  import { createPropsContext as ye, usePropsContext as xe, useId as Ve, dispatchEvent as V, Keys as H, useDir as Ee, classNames as E, getTabIndex as Pe, kendoThemeMaps as U } from "@progress/kendo-react-common";
11
11
  import { useLocalization as Be } from "@progress/kendo-react-intl";
12
12
  import { messages as Ie, checkboxValidation as Ne, checkboxOptionalText as ze } from "../messages/index.mjs";
13
- const Fe = ye(), A = a.forwardRef((W, j) => {
14
- const P = xe(Fe, W), {
15
- ariaDescribedBy: G,
16
- ariaLabelledBy: J,
13
+ const Fe = ye(), $ = a.forwardRef((A, W) => {
14
+ const P = xe(Fe, A), {
15
+ ariaDescribedBy: j,
16
+ ariaLabelledBy: G,
17
17
  checked: B,
18
- className: Q,
19
- labelClassName: X,
20
- children: Y,
21
- defaultChecked: Z,
18
+ className: J,
19
+ labelClassName: Q,
20
+ children: X,
21
+ defaultChecked: Y,
22
22
  disabled: o,
23
- defaultValue: _,
23
+ defaultValue: Z,
24
24
  id: I,
25
- size: b = $.size,
26
- rounded: m = $.rounded,
25
+ size: b = _.size,
26
+ rounded: m = _.rounded,
27
27
  label: N,
28
28
  labelPlacement: z,
29
29
  name: ee,
@@ -55,8 +55,8 @@ const Fe = ye(), A = a.forwardRef((W, j) => {
55
55
  }),
56
56
  [D]
57
57
  );
58
- a.useImperativeHandle(j, c);
59
- const [le, se] = a.useState(Z), [ce, re] = a.useState(_), K = typeof s == "boolean" || s === null, h = B !== void 0, r = K, v = r ? s : ce, C = h ? B : r ? void 0 : le, T = C === void 0 && v, w = T ? v : C, d = T || r ? s === null ? s : void 0 : s || v, ie = w === null || d === null, L = Ve(), de = Be(), O = (t) => de.toLanguageString(t, Ie[t]), q = O(Ne), ue = O(ze), g = F !== void 0 ? F : i ? !!C : !0;
58
+ a.useImperativeHandle(W, c);
59
+ const [le, se] = a.useState(Y), [ce, re] = a.useState(Z), K = typeof s == "boolean" || s === null, h = B !== void 0, r = K, v = r ? s : ce, C = h ? B : r ? void 0 : le, T = C === void 0 && v, w = T ? v : C, d = T || r ? s === null ? s : void 0 : s || v, ie = w === null || d === null, L = Ve(), de = Be(), O = (t) => de.toLanguageString(t, Ie[t]), q = O(Ne), ue = O(ze), g = F !== void 0 ? F : i ? !!C : !0;
60
60
  a.useEffect(() => {
61
61
  n.current && n.current.setCustomValidity && n.current.setCustomValidity(g ? "" : M || q);
62
62
  }, [g, M, q]);
@@ -105,7 +105,7 @@ const Fe = ye(), A = a.forwardRef((W, j) => {
105
105
  f && !o && V(f, t, c(), void 0);
106
106
  },
107
107
  [f, o, c]
108
- ), he = Ee(n, P.dir), ve = E("k-checkbox-wrap", Q), R = {
108
+ ), he = Ee(n, P.dir), ve = E("k-checkbox-wrap", J), R = {
109
109
  type: "checkbox",
110
110
  className: E("k-checkbox", {
111
111
  [`k-checkbox-${U.sizeMap[b] || b}`]: b,
@@ -122,8 +122,8 @@ const Fe = ye(), A = a.forwardRef((W, j) => {
122
122
  tabIndex: Pe(te, o),
123
123
  role: "checkbox",
124
124
  checked: !!w,
125
- "aria-describedby": G,
126
- "aria-labelledby": J,
125
+ "aria-describedby": j,
126
+ "aria-labelledby": G,
127
127
  "aria-disabled": o || void 0,
128
128
  "aria-required": i,
129
129
  autoFocus: oe,
@@ -140,16 +140,16 @@ const Fe = ye(), A = a.forwardRef((W, j) => {
140
140
  ), y = N !== void 0 ? /* @__PURE__ */ a.createElement(
141
141
  "label",
142
142
  {
143
- className: E("k-checkbox-label", X),
143
+ className: E("k-checkbox-label", Q),
144
144
  htmlFor: I || L,
145
145
  style: { userSelect: "none" }
146
146
  },
147
147
  N,
148
148
  ae && /* @__PURE__ */ a.createElement("span", { className: "k-label-optional" }, ue)
149
- ) : null, x = /* @__PURE__ */ a.createElement("span", { className: ve }, Ce, Y);
149
+ ) : null, x = /* @__PURE__ */ a.createElement("span", { className: ve }, Ce, X);
150
150
  return /* @__PURE__ */ a.createElement(a.Fragment, null, z === "before" ? /* @__PURE__ */ a.createElement("div", { dir: "rtl" }, x, y) : z === "after" ? /* @__PURE__ */ a.createElement("div", { dir: "ltr" }, x, y) : /* @__PURE__ */ a.createElement("div", { dir: he }, x, y));
151
151
  });
152
- A.propTypes = {
152
+ $.propTypes = {
153
153
  checked: e.bool,
154
154
  className: e.string,
155
155
  defaultChecked: e.bool,
@@ -176,12 +176,12 @@ A.propTypes = {
176
176
  onFocus: e.func,
177
177
  onBlur: e.func
178
178
  };
179
- const $ = {
179
+ const _ = {
180
180
  size: void 0,
181
181
  rounded: void 0
182
182
  };
183
- A.displayName = "KendoCheckbox";
183
+ $.displayName = "KendoCheckbox";
184
184
  export {
185
- A as Checkbox,
185
+ $ as Checkbox,
186
186
  Fe as CheckboxPropsContext
187
187
  };
@@ -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, createPropsContext as G, withPropsContext 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";
10
+ import { withIdHOC as F, createPropsContext as G, withPropsContext 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";
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 = N(R);
72
+ }, this.showLicenseWatermark = !A(R, { component: "ColorGradient" }), this.licenseMessage = _(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 = I && window.ResizeObserver && new window.ResizeObserver(() => {
89
+ if (this.setAlphaSliderBackground(this.state.backgroundColor), this.state.isFirstRender && this.setState({ isFirstRender: !1 }), this.gradientWrapper && (this.resizeObserver = N && 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 && (_(t), T(t));
125
+ b(document) === t && (I(t), T(t));
126
126
  },
127
127
  Escape: (t, a, e) => {
128
128
  b(document) !== t && (t.focus(), C(t));
@@ -39,7 +39,7 @@ const pt = {
39
39
  popupSettings: g,
40
40
  valid: ye,
41
41
  disabled: N,
42
- tabIndex: he,
42
+ tabIndex: _e,
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: _e,
50
+ className: he,
51
51
  adaptive: Te,
52
52
  adaptiveTitle: Q = w.toLanguageString(ve, L[ve]),
53
53
  adaptiveSubtitle: X
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(() => {
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(() => {
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 _, ce, se;
99
+ var h, ce, se;
100
100
  if (Je(document) !== s.current) {
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;
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;
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 || (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));
108
+ k || (_.current && _.current.wrapperRef.current ? pe(_.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 _;
155
- const n = l ? e.rgbaValue || "" : (_ = e.value) != null ? _ : "";
154
+ var h;
155
+ const n = l ? e.rgbaValue || "" : (h = e.value) != null ? h : "";
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: h,
176
+ ref: _,
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: _e
320
+ className: he
321
321
  }),
322
322
  ref: s,
323
- tabIndex: Ye(he, N),
323
+ tabIndex: Ye(_e, 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 _, disableNavigatableContainer as K, focusFirstFocusableChild as ie, enableNavigatableContainer as re, keepFocusInContainer as ce, classNames as M, getTabIndex as se, kendoThemeMaps as de, WatermarkOverlay as ve } from "@progress/kendo-react-common";
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, getTabIndex as se, kendoThemeMaps 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, I] = a.useState(e.value || b || void 0), B = e.value !== void 0 ? e.value : void 0;
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;
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: B
46
+ value: I
47
47
  }),
48
- [B, R, e]
48
+ [I, 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), I(n), (c = e._gradientSettings) != null && c._adaptive && e.setAdaptiveModeValue && e.setAdaptiveModeValue(n), e.onPreviewChange) {
64
+ if (E(n), _(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(i), e.onChange) {
90
+ if (i !== void 0 && _(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(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), !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
- _(document) === t ? K(t) : ce(c, t);
135
+ B(document) === t ? K(t) : ce(c, t);
136
136
  },
137
137
  Enter: (t, n, c) => {
138
- _(document) === t && (ie(t), re(t));
138
+ B(document) === t && (ie(t), re(t));
139
139
  },
140
140
  Escape: (t, n, c) => {
141
- _(document) !== t && (t.focus(), K(t));
141
+ B(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": B === void 0
280
+ "k-no-color": I === void 0
281
281
  })
282
282
  },
283
283
  /* @__PURE__ */ a.createElement(