@progress/kendo-react-inputs 9.1.1-develop.4 → 9.2.0-develop.2

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,16 +7,16 @@
7
7
  */
8
8
  "use client";
9
9
  import * as t from "react";
10
- import r from "prop-types";
11
- import { validatePackage as w, useUnstyled as H, useCustomComponent as g, useAsyncFocusBlur as p, classNames as h, uTextBox as C } from "@progress/kendo-react-common";
12
- import { packageMetadata as A } from "../package-metadata.mjs";
10
+ import a from "prop-types";
11
+ import { validatePackage as I, useUnstyled as j, useCustomComponent as x, useAsyncFocusBlur as w, classNames as h, uTextBox as C } from "@progress/kendo-react-common";
12
+ import { packageMetadata as H } from "../package-metadata.mjs";
13
13
  const B = t.forwardRef((e, F) => {
14
- w(A);
15
- const l = t.useRef(null), o = t.useRef(null), a = t.useRef(), i = H(), s = i && i.uTextBox, y = t.useCallback(() => {
14
+ I(H);
15
+ const l = t.useRef(null), s = t.useRef(null), r = t.useRef(), i = j(), o = i && i.uTextBox, b = t.useCallback(() => {
16
16
  var n;
17
- return a.current !== void 0 ? a.current : (n = l.current) == null ? void 0 : n.value;
17
+ return r.current !== void 0 ? r.current : (n = l.current) == null ? void 0 : n.value;
18
18
  }, []);
19
- t.useImperativeHandle(o, () => ({
19
+ t.useImperativeHandle(s, () => ({
20
20
  get element() {
21
21
  return l.current;
22
22
  },
@@ -24,48 +24,49 @@ const B = t.forwardRef((e, F) => {
24
24
  return l.current && l.current.name;
25
25
  },
26
26
  get value() {
27
- return y();
27
+ return b();
28
28
  }
29
- })), t.useImperativeHandle(F, () => o.current);
29
+ })), t.useImperativeHandle(F, () => s.current);
30
30
  const {
31
31
  size: c = u.size,
32
32
  fillMode: d = u.fillMode,
33
33
  rounded: f = u.rounded,
34
- autoFocus: E = u.autoFocus,
34
+ autoFocus: y = u.autoFocus,
35
+ inputAttributes: E,
35
36
  className: m,
36
37
  dir: R,
37
38
  style: _,
38
- prefix: b = u.prefix,
39
- suffix: M = u.suffix,
39
+ prefix: M = u.prefix,
40
+ suffix: N = u.suffix,
40
41
  valid: D,
41
42
  // Destruct to avoid warning when used inside a form field
42
43
  modified: G,
43
44
  touched: K,
44
45
  visited: U,
45
- ...N
46
- } = e, [T] = g(b), [q] = g(M), [v, x] = t.useState(!1), k = (n) => {
47
- x(!0);
48
- }, z = (n) => {
49
- x(!1);
46
+ ...T
47
+ } = e, [q] = x(M), [k] = x(N), [v, g] = t.useState(!1), z = (n) => {
48
+ g(!0);
49
+ }, O = (n) => {
50
+ g(!1);
50
51
  }, P = t.useCallback(
51
52
  (n) => {
52
- a.current = n.target.value, e.onChange && e.onChange.call(void 0, {
53
+ r.current = n.target.value, e.onChange && e.onChange.call(void 0, {
53
54
  syntheticEvent: n,
54
55
  nativeEvent: n.nativeEvent,
55
56
  value: n.target.value,
56
- target: o.current
57
- }), a.current = void 0;
57
+ target: s.current
58
+ }), r.current = void 0;
58
59
  },
59
60
  [e.onChange]
60
- ), { onFocus: S, onBlur: I } = p({
61
- onFocus: k,
62
- onBlur: z,
61
+ ), { onFocus: S, onBlur: p } = w({
62
+ onFocus: z,
63
+ onBlur: O,
63
64
  onSyncFocus: e.onFocus,
64
65
  onSyncBlur: e.onBlur
65
- }), O = t.useMemo(
66
+ }), A = t.useMemo(
66
67
  () => h(
67
68
  C.wrapper({
68
- c: s,
69
+ c: o,
69
70
  rounded: f,
70
71
  fillMode: d,
71
72
  size: c,
@@ -76,19 +77,19 @@ const B = t.forwardRef((e, F) => {
76
77
  }),
77
78
  m
78
79
  ),
79
- [m, d, v, e.disabled, e.required, e.valid, f, c, s]
80
+ [m, d, v, e.disabled, e.required, e.valid, f, c, o]
80
81
  );
81
- return /* @__PURE__ */ t.createElement("span", { style: _, dir: R, className: O, onFocus: S, onBlur: I }, /* @__PURE__ */ t.createElement(T, null), /* @__PURE__ */ t.createElement(
82
+ return /* @__PURE__ */ t.createElement("span", { style: _, dir: R, className: A, onFocus: S, onBlur: p }, /* @__PURE__ */ t.createElement(q, null), /* @__PURE__ */ t.createElement(
82
83
  "input",
83
84
  {
84
85
  ref: l,
85
- className: h(C.inputInner({ c: s })),
86
- autoFocus: E,
87
- ...N,
86
+ className: h(C.inputInner({ c: o })),
87
+ autoFocus: y,
88
+ ...Object.assign({}, T, E),
88
89
  "aria-required": e.required,
89
90
  onChange: P
90
91
  }
91
- ), /* @__PURE__ */ t.createElement(q, null));
92
+ ), /* @__PURE__ */ t.createElement(k, null));
92
93
  }), u = {
93
94
  prefix: (e) => null,
94
95
  suffix: (e) => null,
@@ -98,10 +99,11 @@ const B = t.forwardRef((e, F) => {
98
99
  autoFocus: !1
99
100
  };
100
101
  B.propTypes = {
101
- size: r.oneOf([null, "small", "medium", "large"]),
102
- rounded: r.oneOf([null, "small", "medium", "large", "full"]),
103
- fillMode: r.oneOf([null, "solid", "flat", "outline"]),
104
- autoFocus: r.bool
102
+ size: a.oneOf([null, "small", "medium", "large"]),
103
+ rounded: a.oneOf([null, "small", "medium", "large", "full"]),
104
+ fillMode: a.oneOf([null, "solid", "flat", "outline"]),
105
+ autoFocus: a.bool,
106
+ inputAttributes: a.object
105
107
  };
106
108
  B.displayName = "KendoReactTextBoxComponent";
107
109
  export {