@progress/kendo-react-inputs 9.0.0-develop.2 → 9.0.0-develop.21

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.
Files changed (46) hide show
  1. package/README.md +63 -62
  2. package/colors/ColorContrastLabels.mjs +10 -1
  3. package/colors/ColorContrastSvg.mjs +14 -2
  4. package/colors/ColorInput.js +1 -1
  5. package/colors/ColorInput.mjs +15 -12
  6. package/colors/ColorPalette.js +1 -1
  7. package/colors/ColorPalette.mjs +13 -14
  8. package/colors/ColorPicker.mjs +62 -79
  9. package/colors/FlatColorPicker.mjs +68 -22
  10. package/colors/HexInput.js +1 -1
  11. package/colors/HexInput.mjs +9 -8
  12. package/colors/models/palette-presets.mjs +656 -12
  13. package/colors/utils/color-cache.js +1 -1
  14. package/colors/utils/color-cache.mjs +3 -6
  15. package/colors/utils/color-parser.js +1 -1
  16. package/colors/utils/color-parser.mjs +2 -5
  17. package/dist/cdn/js/kendo-react-inputs.js +1 -1
  18. package/index.d.mts +21 -87
  19. package/index.d.ts +21 -87
  20. package/index.js +1 -1
  21. package/index.mjs +65 -66
  22. package/input/Input.js +1 -1
  23. package/input/Input.mjs +144 -179
  24. package/input/InputClearValue.mjs +6 -11
  25. package/input/InputPrefix.mjs +17 -18
  26. package/input/InputSeparator.mjs +12 -10
  27. package/input/InputSuffix.mjs +17 -18
  28. package/input/InputValidationIcon.mjs +3 -1
  29. package/maskedtextbox/masking.service.js +1 -1
  30. package/maskedtextbox/masking.service.mjs +2 -2
  31. package/maskedtextbox/parsing/parsers.js +1 -1
  32. package/maskedtextbox/parsing/parsers.mjs +22 -23
  33. package/numerictextbox/NumericTextBox.mjs +259 -320
  34. package/numerictextbox/utils/index.mjs +16 -14
  35. package/package-metadata.mjs +1 -1
  36. package/package.json +9 -9
  37. package/radiobutton/RadioButton.mjs +7 -18
  38. package/radiobutton/RadioGroup.mjs +3 -6
  39. package/range-slider/RangeSlider.mjs +68 -62
  40. package/rating/Rating.mjs +73 -90
  41. package/rating/RatingItem.mjs +29 -50
  42. package/signature/Signature.mjs +60 -93
  43. package/slider/SliderLabel.mjs +6 -10
  44. package/switch/Switch.mjs +9 -5
  45. package/textarea/TextArea.mjs +19 -47
  46. package/textbox/Textbox.mjs +37 -55
@@ -87,12 +87,7 @@ const M = 11111111111111e-7, ae = 0.31111111111111117, de = 1, Y = 1, w = 0, m =
87
87
  m.test(n.charAt(l)) && s--, l++;
88
88
  return l;
89
89
  }, Oe = (t, n, r) => {
90
- const e = { ...t }, { prevLooseValue: u } = e, o = r.numberSymbols(), a = he(n, r), s = String(e.currentLooseValue), l = String(u), i = new RegExp(`[^\\d\\${o.decimal}]`, "g"), N = new RegExp(`[^\\d\\${o.decimal}\\${o.group}]`, "g"), C = new RegExp(`[\\d\\${o.decimal}\\${o.group}]`), x = s.replace(i, ""), b = $(s, m), E = b === -1 ? -1 : O(s, m), oe = s.indexOf(o.decimal), G = (s.substring(0, b) + s.substring(b, E).replace(N, "") + s.substring(E, s.length)).split("").filter((V) => a.indexOf(V) !== -1 || V.search(C) !== -1).join(""), S = r.formatNumber(ae, n).replace(i, ""), U = S.indexOf(o.decimal), I = U > -1 ? S.length - U - 1 : 0, j = r.formatNumber(de, n).replace(i, ""), X = j.indexOf(o.decimal), R = X > -1 ? j.length - X - 1 : 0, {
91
- positiveInfo: se,
92
- negativeInfo: ue,
93
- zeroInfo: ce,
94
- oneInfo: le
95
- } = be(n, r), g = [se, ue, ce, le], ie = g.findIndex((V) => V.findIndex((h) => !!h) !== -1) !== 1, v = s.length > 0 && s.length < l.length, Z = typeof n == "string" && n[0] === "p" && s && s.indexOf(o.percentSign) === -1;
90
+ const e = { ...t }, { prevLooseValue: u } = e, o = r.numberSymbols(), a = he(n, r), s = String(e.currentLooseValue), l = String(u), i = new RegExp(`[^\\d\\${o.decimal}]`, "g"), N = new RegExp(`[^\\d\\${o.decimal}\\${o.group}]`, "g"), C = new RegExp(`[\\d\\${o.decimal}\\${o.group}]`), x = s.replace(i, ""), b = $(s, m), E = b === -1 ? -1 : O(s, m), oe = s.indexOf(o.decimal), G = (s.substring(0, b) + s.substring(b, E).replace(N, "") + s.substring(E, s.length)).split("").filter((V) => a.indexOf(V) !== -1 || V.search(C) !== -1).join(""), S = r.formatNumber(ae, n).replace(i, ""), U = S.indexOf(o.decimal), I = U > -1 ? S.length - U - 1 : 0, j = r.formatNumber(de, n).replace(i, ""), X = j.indexOf(o.decimal), R = X > -1 ? j.length - X - 1 : 0, { positiveInfo: se, negativeInfo: ue, zeroInfo: ce, oneInfo: le } = be(n, r), g = [se, ue, ce, le], ie = g.findIndex((V) => V.findIndex((h) => !!h) !== -1) !== 1, v = s.length > 0 && s.length < l.length, Z = typeof n == "string" && n[0] === "p" && s && s.indexOf(o.percentSign) === -1;
96
91
  if (!e.isPaste) {
97
92
  if (s === "")
98
93
  return e.eventValue = null, e.currentLooseValue = "", e;
@@ -130,12 +125,7 @@ const M = 11111111111111e-7, ae = 0.31111111111111117, de = 1, Y = 1, w = 0, m =
130
125
  ), e;
131
126
  }
132
127
  if (xe(e, o))
133
- return e.eventValue = r.parseNumber(e.currentLooseValue, n), L(
134
- e,
135
- e.selectionStart,
136
- e.currentLooseValue,
137
- g
138
- ), e;
128
+ return e.eventValue = r.parseNumber(e.currentLooseValue, n), L(e, e.selectionStart, e.currentLooseValue, g), e;
139
129
  if (Le(e, o))
140
130
  return A(e, n, g, r), e;
141
131
  if (Z)
@@ -159,7 +149,13 @@ const M = 11111111111111e-7, ae = 0.31111111111111117, de = 1, Y = 1, w = 0, m =
159
149
  const c = p(e.eventValue, n, r);
160
150
  return L(
161
151
  e,
162
- Q(s, c, e.selectionEnd, v, i),
152
+ Q(
153
+ s,
154
+ c,
155
+ e.selectionEnd,
156
+ v,
157
+ i
158
+ ),
163
159
  c,
164
160
  g
165
161
  ), e.currentLooseValue = c, e;
@@ -178,7 +174,13 @@ const M = 11111111111111e-7, ae = 0.31111111111111117, de = 1, Y = 1, w = 0, m =
178
174
  const V = p(e.eventValue, n, r);
179
175
  s.length === 1 ? L(e, B(V, o), V, g) : L(
180
176
  e,
181
- Q(s, V, e.selectionEnd, v, i),
177
+ Q(
178
+ s,
179
+ V,
180
+ e.selectionEnd,
181
+ v,
182
+ i
183
+ ),
182
184
  V,
183
185
  g
184
186
  ), e.currentLooseValue = V;
@@ -10,7 +10,7 @@ const e = {
10
10
  name: "@progress/kendo-react-inputs",
11
11
  productName: "KendoReact",
12
12
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
13
- publishDate: 1729236266,
13
+ publishDate: 1731068587,
14
14
  version: "",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
16
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-inputs",
3
- "version": "9.0.0-develop.2",
3
+ "version": "9.0.0-develop.21",
4
4
  "description": "React Inputs offer a customizable interface for users to enter and pick different information. KendoReact Input package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -22,16 +22,16 @@
22
22
  },
23
23
  "sideEffects": false,
24
24
  "peerDependencies": {
25
- "@progress/kendo-drawing": "^1.20.4",
25
+ "@progress/kendo-drawing": "^1.21.1",
26
26
  "@progress/kendo-inputs-common": "^3.1.0",
27
27
  "@progress/kendo-licensing": "^1.3.4",
28
- "@progress/kendo-react-animation": "9.0.0-develop.2",
29
- "@progress/kendo-react-buttons": "9.0.0-develop.2",
30
- "@progress/kendo-react-common": "9.0.0-develop.2",
31
- "@progress/kendo-react-dialogs": "9.0.0-develop.2",
32
- "@progress/kendo-react-intl": "9.0.0-develop.2",
33
- "@progress/kendo-react-labels": "9.0.0-develop.2",
34
- "@progress/kendo-react-popup": "9.0.0-develop.2",
28
+ "@progress/kendo-react-animation": "9.0.0-develop.21",
29
+ "@progress/kendo-react-buttons": "9.0.0-develop.21",
30
+ "@progress/kendo-react-common": "9.0.0-develop.21",
31
+ "@progress/kendo-react-dialogs": "9.0.0-develop.21",
32
+ "@progress/kendo-react-intl": "9.0.0-develop.21",
33
+ "@progress/kendo-react-labels": "9.0.0-develop.21",
34
+ "@progress/kendo-react-popup": "9.0.0-develop.21",
35
35
  "@progress/kendo-svg-icons": "^3.0.0",
36
36
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
37
37
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
@@ -32,12 +32,9 @@ const W = S(), P = e.forwardRef((R, x) => {
32
32
  onBlur: i,
33
33
  required: H,
34
34
  ...j
35
- } = E, y = G(), u = y && y.uRadioButton, l = e.useRef(null), C = e.useCallback(
36
- () => {
37
- l.current && l.current.focus();
38
- },
39
- []
40
- ), s = e.useCallback(
35
+ } = E, y = G(), u = y && y.uRadioButton, l = e.useRef(null), C = e.useCallback(() => {
36
+ l.current && l.current.focus();
37
+ }, []), s = e.useCallback(
41
38
  () => ({
42
39
  element: l.current,
43
40
  focus: C
@@ -47,12 +44,9 @@ const W = S(), P = e.forwardRef((R, x) => {
47
44
  e.useImperativeHandle(x, s);
48
45
  const v = J(), K = e.useCallback(
49
46
  (n) => {
50
- d(
51
- h,
52
- n,
53
- s(),
54
- { value: r }
55
- );
47
+ d(h, n, s(), {
48
+ value: r
49
+ });
56
50
  },
57
51
  [h, r, t]
58
52
  ), L = e.useCallback(
@@ -67,12 +61,7 @@ const W = S(), P = e.forwardRef((R, x) => {
67
61
  [c, t]
68
62
  ), M = e.useCallback(
69
63
  (n) => {
70
- i && !t && d(
71
- i,
72
- n,
73
- s(),
74
- void 0
75
- );
64
+ i && !t && d(i, n, s(), void 0);
76
65
  },
77
66
  [i, t]
78
67
  ), O = {
@@ -30,12 +30,9 @@ const ee = J(), G = t.forwardRef((r, I) => {
30
30
  item: D = ae.item,
31
31
  onChange: c,
32
32
  onFocus: d
33
- } = m, f = X(), y = f && f.uRadioGroup, o = t.useRef(null), C = t.useCallback(
34
- () => {
35
- o.current && Y(o.current);
36
- },
37
- []
38
- ), i = t.useCallback(
33
+ } = m, f = X(), y = f && f.uRadioGroup, o = t.useRef(null), C = t.useCallback(() => {
34
+ o.current && Y(o.current);
35
+ }, []), i = t.useCallback(
39
36
  () => ({
40
37
  element: o.current,
41
38
  focus: C
@@ -31,24 +31,15 @@ const ae = (n, s, p) => {
31
31
  vertical: y.vertical,
32
32
  disabled: y.disabled,
33
33
  ...p
34
- }, c = a.useRef(null), u = a.useRef(null), g = a.useRef(null), b = a.useRef(null), I = a.useRef(null), P = a.useCallback(
35
- () => {
36
- b.current && b.current.focus();
37
- },
38
- [b]
39
- );
34
+ }, c = a.useRef(null), u = a.useRef(null), g = a.useRef(null), b = a.useRef(null), I = a.useRef(null), P = a.useCallback(() => {
35
+ b.current && b.current.focus();
36
+ }, [b]);
40
37
  a.useImperativeHandle(c, () => ({
41
38
  element: u.current,
42
39
  focus: P,
43
40
  props: e
44
41
  })), a.useImperativeHandle(s, () => c.current);
45
- const f = a.useMemo(
46
- () => e.min,
47
- [e.min]
48
- ), k = a.useMemo(
49
- () => e.max,
50
- [e.max]
51
- ), K = a.useMemo(
42
+ const f = a.useMemo(() => e.min, [e.min]), k = a.useMemo(() => e.max, [e.max]), K = a.useMemo(
52
43
  () => e.step !== void 0 ? e.step : y.step,
53
44
  [e.step, y.step]
54
45
  ), A = a.useMemo(
@@ -70,16 +61,7 @@ const ae = (n, s, p) => {
70
61
  state: e.value
71
62
  },
72
63
  H
73
- ), i = a.useMemo(
74
- () => e.value || x,
75
- [e.value, x]
76
- ), N = a.useRef(null), w = a.useRef(null), h = a.useMemo(
77
- () => (i.start - f) / (k - f) * 100,
78
- [i.start, f, k]
79
- ), D = a.useMemo(
80
- () => (i.end - f) / (k - f) * 100,
81
- [i.end, f, k]
82
- ), q = a.useMemo(
64
+ ), i = a.useMemo(() => e.value || x, [e.value, x]), N = a.useRef(null), w = a.useRef(null), h = a.useMemo(() => (i.start - f) / (k - f) * 100, [i.start, f, k]), D = a.useMemo(() => (i.end - f) / (k - f) * 100, [i.end, f, k]), q = a.useMemo(
83
65
  () => e.vertical ? { paddingTop: 0, height: "100%" } : {},
84
66
  [e.vertical]
85
67
  ), B = a.useMemo(
@@ -105,23 +87,26 @@ const ae = (n, s, p) => {
105
87
  ]
106
88
  ), G = a.useCallback(
107
89
  (t) => t <= i.start ? "start" : t >= i.end ? "end" : 2 * t < i.end + i.start ? "start" : "end",
108
- [
109
- x.start,
110
- x.end,
111
- e.value && e.value.start,
112
- e.value && e.value.end
113
- ]
90
+ [x.start, x.end, e.value && e.value.start, e.value && e.value.end]
114
91
  ), O = a.useCallback(
115
92
  (t) => {
116
93
  switch (t.keyCode) {
117
94
  case m.right:
118
- t.preventDefault(), l({ type: d === "rtl" ? r.decrease : r.increase, key: "start", event: t });
95
+ t.preventDefault(), l({
96
+ type: d === "rtl" ? r.decrease : r.increase,
97
+ key: "start",
98
+ event: t
99
+ });
119
100
  break;
120
101
  case m.up:
121
102
  t.preventDefault(), l({ type: r.increase, key: "start", event: t });
122
103
  break;
123
104
  case m.left:
124
- t.preventDefault(), l({ type: d === "rtl" ? r.increase : r.decrease, key: "start", event: t });
105
+ t.preventDefault(), l({
106
+ type: d === "rtl" ? r.increase : r.decrease,
107
+ key: "start",
108
+ event: t
109
+ });
125
110
  break;
126
111
  case m.down:
127
112
  t.preventDefault(), l({ type: r.decrease, key: "start", event: t });
@@ -133,10 +118,18 @@ const ae = (n, s, p) => {
133
118
  t.preventDefault(), l({ type: r.max, key: "start", event: t });
134
119
  break;
135
120
  case m.pageDown:
136
- t.preventDefault(), l({ type: d === "rtl" ? r.increaseLarge : r.decreaseLarge, key: "start", event: t });
121
+ t.preventDefault(), l({
122
+ type: d === "rtl" ? r.increaseLarge : r.decreaseLarge,
123
+ key: "start",
124
+ event: t
125
+ });
137
126
  break;
138
127
  case m.pageUp:
139
- t.preventDefault(), l({ type: d === "rtl" ? r.decreaseLarge : r.increaseLarge, key: "start", event: t });
128
+ t.preventDefault(), l({
129
+ type: d === "rtl" ? r.decreaseLarge : r.increaseLarge,
130
+ key: "start",
131
+ event: t
132
+ });
140
133
  break;
141
134
  }
142
135
  },
@@ -145,13 +138,21 @@ const ae = (n, s, p) => {
145
138
  (t) => {
146
139
  switch (t.keyCode) {
147
140
  case m.right:
148
- t.preventDefault(), l({ type: d === "rtl" ? r.decrease : r.increase, key: "end", event: t });
141
+ t.preventDefault(), l({
142
+ type: d === "rtl" ? r.decrease : r.increase,
143
+ key: "end",
144
+ event: t
145
+ });
149
146
  break;
150
147
  case m.up:
151
148
  t.preventDefault(), l({ type: r.increase, key: "end", event: t });
152
149
  break;
153
150
  case m.left:
154
- t.preventDefault(), l({ type: d === "rtl" ? r.increase : r.decrease, key: "end", event: t });
151
+ t.preventDefault(), l({
152
+ type: d === "rtl" ? r.increase : r.decrease,
153
+ key: "end",
154
+ event: t
155
+ });
155
156
  break;
156
157
  case m.down:
157
158
  t.preventDefault(), l({ type: r.decrease, key: "end", event: t });
@@ -163,10 +164,18 @@ const ae = (n, s, p) => {
163
164
  t.preventDefault(), l({ type: r.max, key: "end", event: t });
164
165
  break;
165
166
  case m.pageDown:
166
- t.preventDefault(), l({ type: d === "rtl" ? r.increaseLarge : r.decreaseLarge, key: "end", event: t });
167
+ t.preventDefault(), l({
168
+ type: d === "rtl" ? r.increaseLarge : r.decreaseLarge,
169
+ key: "end",
170
+ event: t
171
+ });
167
172
  break;
168
173
  case m.pageUp:
169
- t.preventDefault(), l({ type: d === "rtl" ? r.decreaseLarge : r.increaseLarge, key: "end", event: t });
174
+ t.preventDefault(), l({
175
+ type: d === "rtl" ? r.decreaseLarge : r.increaseLarge,
176
+ key: "end",
177
+ event: t
178
+ });
170
179
  break;
171
180
  }
172
181
  },
@@ -180,17 +189,21 @@ const ae = (n, s, p) => {
180
189
  },
181
190
  [e.vertical, f, k, l]
182
191
  );
183
- return J(w, {
184
- onPress: X,
185
- onDrag: (t) => {
186
- const o = $(t), v = T === "end" ? r.end : r.start;
187
- l({ type: v, payload: o, event: t });
192
+ return J(
193
+ w,
194
+ {
195
+ onPress: X,
196
+ onDrag: (t) => {
197
+ const o = $(t), v = T === "end" ? r.end : r.start;
198
+ l({ type: v, payload: o, event: t });
199
+ },
200
+ onRelease: (t) => {
201
+ const o = $(t), v = T === "end" ? r.end : r.start;
202
+ l({ type: v, payload: o, event: t }), E("");
203
+ }
188
204
  },
189
- onRelease: (t) => {
190
- const o = $(t), v = T === "end" ? r.end : r.start;
191
- l({ type: v, payload: o, event: t }), E("");
192
- }
193
- }, { autoScroll: !1 }), /* @__PURE__ */ a.createElement(
205
+ { autoScroll: !1 }
206
+ ), /* @__PURE__ */ a.createElement(
194
207
  "div",
195
208
  {
196
209
  id: e.id,
@@ -220,23 +233,16 @@ const ae = (n, s, p) => {
220
233
  ...B
221
234
  }
222
235
  },
223
- e.children && /* @__PURE__ */ a.createElement(
224
- "ul",
236
+ e.children && /* @__PURE__ */ a.createElement("ul", { className: "k-reset k-slider-items", style: { ...q } }, a.Children.map(e.children, (t, o) => t && a.cloneElement(
237
+ t,
225
238
  {
226
- className: "k-reset k-slider-items",
227
- style: { ...q }
239
+ position: 100 * (t.props.position - e.min) / (e.max - e.min),
240
+ vertical: e.vertical,
241
+ firstTick: o === 0,
242
+ lastTick: o === a.Children.count(e.children) - 1
228
243
  },
229
- a.Children.map(e.children, (t, o) => t && a.cloneElement(
230
- t,
231
- {
232
- position: 100 * (t.props.position - e.min) / (e.max - e.min),
233
- vertical: e.vertical,
234
- firstTick: o === 0,
235
- lastTick: o === a.Children.count(e.children) - 1
236
- },
237
- t.props.children
238
- ))
239
- ),
244
+ t.props.children
245
+ ))),
240
246
  /* @__PURE__ */ a.createElement(
241
247
  "div",
242
248
  {
package/rating/Rating.mjs CHANGED
@@ -48,28 +48,7 @@ const q = (n, g, v) => {
48
48
  });
49
49
  },
50
50
  [e.onChange]
51
- ), I = a.useMemo(
52
- () => e.min !== void 0 ? e.min : s.min,
53
- [e.min]
54
- ), x = a.useMemo(
55
- () => e.max !== void 0 ? e.max : s.max,
56
- [e.max]
57
- ), d = a.useMemo(
58
- () => e.precision || s.precision,
59
- [e.precision]
60
- ), i = a.useMemo(
61
- () => e.step !== void 0 ? e.step : s.step,
62
- [e.step]
63
- ), V = a.useMemo(
64
- () => e.readonly || s.readonly,
65
- [e.readonly]
66
- ), k = a.useMemo(
67
- () => e.disabled || s.disabled,
68
- [e.disabled]
69
- ), _ = a.useMemo(
70
- () => e.item || s.item,
71
- [e.item]
72
- ), [H, p] = q(
51
+ ), I = a.useMemo(() => e.min !== void 0 ? e.min : s.min, [e.min]), x = a.useMemo(() => e.max !== void 0 ? e.max : s.max, [e.max]), d = a.useMemo(() => e.precision || s.precision, [e.precision]), i = a.useMemo(() => e.step !== void 0 ? e.step : s.step, [e.step]), V = a.useMemo(() => e.readonly || s.readonly, [e.readonly]), k = a.useMemo(() => e.disabled || s.disabled, [e.disabled]), _ = a.useMemo(() => e.item || s.item, [e.item]), [H, p] = q(
73
52
  e.defaultValue !== void 0 ? e.defaultValue : s.defaultValue,
74
53
  {
75
54
  state: e.value,
@@ -78,35 +57,30 @@ const q = (n, g, v) => {
78
57
  step: d === "half" ? i / 2 : i
79
58
  },
80
59
  W
81
- ), [T, O] = q(
82
- null,
83
- {
84
- state: e.value,
85
- min: I,
86
- max: x,
87
- step: d === "half" ? i / 2 : i,
88
- precision: d
89
- }
90
- ), u = a.useMemo(
60
+ ), [T, O] = q(null, {
61
+ state: e.value,
62
+ min: I,
63
+ max: x,
64
+ step: d === "half" ? i / 2 : i,
65
+ precision: d
66
+ }), u = a.useMemo(
91
67
  () => e.value !== void 0 ? e.value : H,
92
68
  [e.value, H]
93
- ), C = a.useMemo(
94
- () => T,
95
- [T]
96
- ), z = a.useMemo(
69
+ ), C = a.useMemo(() => T, [T]), z = a.useMemo(
97
70
  () => e.selection || s.selection,
98
71
  [e.selection]
99
- ), E = a.useMemo(
100
- () => i / (d === "half" ? 2 : 1),
101
- [i, d]
102
- ), j = a.useCallback(
72
+ ), E = a.useMemo(() => i / (d === "half" ? 2 : 1), [i, d]), j = a.useCallback(
103
73
  (t) => {
104
74
  if (!(!t.target || !t.target.element || V || k)) {
105
75
  if (d === "half") {
106
76
  const l = t.target.element.getBoundingClientRect(), M = L(o || "ltr", l, t.syntheticEvent.clientX) ? D(t.target.value - i / 2, E) : t.target.value;
107
77
  p({ type: c.select, payload: M, event: t.syntheticEvent });
108
78
  } else
109
- p({ type: c.select, payload: t.target.value, event: t.syntheticEvent });
79
+ p({
80
+ type: c.select,
81
+ payload: t.target.value,
82
+ event: t.syntheticEvent
83
+ });
110
84
  if (e.onClick) {
111
85
  const l = {
112
86
  value: u,
@@ -153,14 +127,11 @@ const q = (n, g, v) => {
153
127
  });
154
128
  break;
155
129
  }
156
- e.onKeyDown && e.onKeyDown.call(
157
- void 0,
158
- {
159
- value: u,
160
- target: m.current,
161
- syntheticEvent: t
162
- }
163
- );
130
+ e.onKeyDown && e.onKeyDown.call(void 0, {
131
+ value: u,
132
+ target: m.current,
133
+ syntheticEvent: t
134
+ });
164
135
  }
165
136
  },
166
137
  [e.onKeyDown, p, u]
@@ -171,10 +142,7 @@ const q = (n, g, v) => {
171
142
  target: m.current,
172
143
  syntheticEvent: t
173
144
  };
174
- e.onFocus.call(
175
- void 0,
176
- l
177
- );
145
+ e.onFocus.call(void 0, l);
178
146
  }
179
147
  },
180
148
  [e.onFocus]
@@ -185,10 +153,7 @@ const q = (n, g, v) => {
185
153
  target: m.current,
186
154
  syntheticEvent: t
187
155
  };
188
- e.onBlur.call(
189
- void 0,
190
- l
191
- );
156
+ e.onBlur.call(void 0, l);
192
157
  }
193
158
  },
194
159
  [e.onBlur]
@@ -199,15 +164,16 @@ const q = (n, g, v) => {
199
164
  const l = t.target.element.getBoundingClientRect(), M = L(o || "ltr", l, t.syntheticEvent.clientX) ? t.target.value - i / 2 : t.target.value;
200
165
  O({ type: c.select, payload: M, event: t.syntheticEvent });
201
166
  } else
202
- O({ type: c.select, payload: t.target.value, event: t.syntheticEvent });
167
+ O({
168
+ type: c.select,
169
+ payload: t.target.value,
170
+ event: t.syntheticEvent
171
+ });
203
172
  },
204
173
  [d, i, o]
205
- ), Z = a.useCallback(
206
- (t) => {
207
- O({ type: c.reset, event: t.syntheticEvent });
208
- },
209
- []
210
- ), P = [], ee = re(D(x - I, E), i);
174
+ ), Z = a.useCallback((t) => {
175
+ O({ type: c.reset, event: t.syntheticEvent });
176
+ }, []), P = [], ee = re(D(x - I, E), i);
211
177
  for (let t = I; t <= x; t = D(t + i, E)) {
212
178
  const l = D(t + ee, E), f = d === "half" ? ce(l, C !== null ? C : u !== null ? u : 0, i) : !1, M = F(l, u, i, z), w = F(l, C !== null ? C : u, i, z), b = F(l, C, i, z);
213
179
  P.push(
@@ -227,10 +193,47 @@ const q = (n, g, v) => {
227
193
  onMouseMove: Y,
228
194
  onMouseLeave: Z
229
195
  },
230
- f && /* @__PURE__ */ a.createElement("span", { className: "k-rating-precision-complement" }, !(e.icon || e.svgIconOutline) && /* @__PURE__ */ a.createElement(y, { name: "star-outline", icon: $, style: { clipPath: `${o === "rtl" ? "inset(0 50% 0 0)" : "inset(0 0 0 50%)"}` }, size: "xlarge" }), (e.icon || e.svgIconOutline) && /* @__PURE__ */ a.createElement(y, { name: B(`${e.icon}-outline`), icon: e.svgIconOutline, size: "xlarge" })),
231
- f && /* @__PURE__ */ a.createElement("span", { className: "k-rating-precision-part" }, !(e.icon || e.svgIcon) && /* @__PURE__ */ a.createElement(y, { name: "star", icon: K, style: { clipPath: `${o === "rtl" ? "inset(0 0 0 50%)" : "inset(0 50% 0 0)"}` }, size: "xlarge" }), (e.icon || e.svgIcon) && /* @__PURE__ */ a.createElement(y, { name: e.icon ? B(e.icon) : void 0, icon: e.svgIcon, size: "xlarge" })),
196
+ f && /* @__PURE__ */ a.createElement("span", { className: "k-rating-precision-complement" }, !(e.icon || e.svgIconOutline) && /* @__PURE__ */ a.createElement(
197
+ y,
198
+ {
199
+ name: "star-outline",
200
+ icon: $,
201
+ style: { clipPath: `${o === "rtl" ? "inset(0 50% 0 0)" : "inset(0 0 0 50%)"}` },
202
+ size: "xlarge"
203
+ }
204
+ ), (e.icon || e.svgIconOutline) && /* @__PURE__ */ a.createElement(
205
+ y,
206
+ {
207
+ name: B(`${e.icon}-outline`),
208
+ icon: e.svgIconOutline,
209
+ size: "xlarge"
210
+ }
211
+ )),
212
+ f && /* @__PURE__ */ a.createElement("span", { className: "k-rating-precision-part" }, !(e.icon || e.svgIcon) && /* @__PURE__ */ a.createElement(
213
+ y,
214
+ {
215
+ name: "star",
216
+ icon: K,
217
+ style: { clipPath: `${o === "rtl" ? "inset(0 0 0 50%)" : "inset(0 50% 0 0)"}` },
218
+ size: "xlarge"
219
+ }
220
+ ), (e.icon || e.svgIcon) && /* @__PURE__ */ a.createElement(
221
+ y,
222
+ {
223
+ name: e.icon ? B(e.icon) : void 0,
224
+ icon: e.svgIcon,
225
+ size: "xlarge"
226
+ }
227
+ )),
232
228
  f && /* @__PURE__ */ a.createElement("span", { style: { width: "24px", height: "24px", display: "block" } }),
233
- !f && !(e.icon || e.svgIcon) && (b || w && !b) && /* @__PURE__ */ a.createElement(y, { name: "star", icon: K, size: "xlarge" }) || !(e.icon || e.svgIcon) && !b && !w && /* @__PURE__ */ a.createElement(y, { name: "star-outline", icon: $, size: "xlarge" }) || (e.icon || e.svgIcon) && (b || w && !b) && /* @__PURE__ */ a.createElement(y, { name: e.icon, icon: e.svgIcon, size: "xlarge" }) || (e.icon || e.svgIcon) && !b && /* @__PURE__ */ a.createElement(y, { name: B(`${e.icon}-outline`), icon: e.svgIconOutline, size: "xlarge" })
229
+ !f && !(e.icon || e.svgIcon) && (b || w && !b) && /* @__PURE__ */ a.createElement(y, { name: "star", icon: K, size: "xlarge" }) || !(e.icon || e.svgIcon) && !b && !w && /* @__PURE__ */ a.createElement(y, { name: "star-outline", icon: $, size: "xlarge" }) || (e.icon || e.svgIcon) && (b || w && !b) && /* @__PURE__ */ a.createElement(y, { name: e.icon, icon: e.svgIcon, size: "xlarge" }) || (e.icon || e.svgIcon) && !b && /* @__PURE__ */ a.createElement(
230
+ y,
231
+ {
232
+ name: B(`${e.icon}-outline`),
233
+ icon: e.svgIconOutline,
234
+ size: "xlarge"
235
+ }
236
+ )
234
237
  )
235
238
  );
236
239
  }
@@ -263,29 +266,9 @@ const q = (n, g, v) => {
263
266
  "aria-labelledby": e.ariaLabelledBy,
264
267
  "aria-describedby": e.ariaDescribedBy
265
268
  },
266
- /* @__PURE__ */ a.createElement(
267
- "input",
268
- {
269
- id: "rating",
270
- className: "k-hidden",
271
- readOnly: V,
272
- disabled: k
273
- }
274
- ),
275
- /* @__PURE__ */ a.createElement(
276
- "span",
277
- {
278
- className: "k-rating-container"
279
- },
280
- P
281
- ),
282
- e.label && /* @__PURE__ */ a.createElement(
283
- "span",
284
- {
285
- className: "k-rating-label"
286
- },
287
- e.label
288
- )
269
+ /* @__PURE__ */ a.createElement("input", { id: "rating", className: "k-hidden", readOnly: V, disabled: k }),
270
+ /* @__PURE__ */ a.createElement("span", { className: "k-rating-container" }, P),
271
+ e.label && /* @__PURE__ */ a.createElement("span", { className: "k-rating-label" }, e.label)
289
272
  );
290
273
  }), pe = {
291
274
  id: r.string,