@progress/kendo-react-inputs 13.3.0-develop.9 → 13.4.0-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.
Files changed (149) hide show
  1. package/checkbox/Checkbox.d.ts +49 -0
  2. package/checkbox/Checkbox.js +1 -1
  3. package/checkbox/Checkbox.mjs +35 -36
  4. package/checkbox/interfaces/CheckboxBlurEvent.d.ts +14 -0
  5. package/checkbox/interfaces/CheckboxChangeEvent.d.ts +18 -0
  6. package/checkbox/interfaces/CheckboxFocusEvent.d.ts +14 -0
  7. package/checkbox/interfaces/CheckboxProps.d.ts +148 -0
  8. package/colors/ColorContrastLabels.d.ts +22 -0
  9. package/colors/ColorContrastSvg.d.ts +25 -0
  10. package/colors/ColorGradient.d.ts +215 -0
  11. package/colors/ColorGradient.js +1 -1
  12. package/colors/ColorGradient.mjs +20 -19
  13. package/colors/ColorInput.d.ts +40 -0
  14. package/colors/ColorInput.js +1 -1
  15. package/colors/ColorInput.mjs +20 -16
  16. package/colors/ColorPalette.d.ts +129 -0
  17. package/colors/ColorPalette.js +1 -1
  18. package/colors/ColorPalette.mjs +7 -7
  19. package/colors/ColorPicker.d.ts +34 -0
  20. package/colors/ColorPicker.js +1 -1
  21. package/colors/ColorPicker.mjs +96 -94
  22. package/colors/FlatColorPicker.d.ts +189 -0
  23. package/colors/FlatColorPicker.js +1 -1
  24. package/colors/FlatColorPicker.mjs +41 -40
  25. package/colors/HexInput.d.ts +39 -0
  26. package/colors/HexInput.js +1 -1
  27. package/colors/HexInput.mjs +2 -1
  28. package/colors/Picker.d.ts +13 -0
  29. package/colors/interfaces/ColorGradientChangeEvent.d.ts +18 -0
  30. package/colors/interfaces/ColorGradientProps.d.ts +160 -0
  31. package/colors/interfaces/ColorPaletteChangeEvent.d.ts +22 -0
  32. package/colors/interfaces/ColorPaletteProps.d.ts +116 -0
  33. package/colors/interfaces/ColorPickerActiveColorClick.d.ts +29 -0
  34. package/colors/interfaces/ColorPickerBlurEvent.d.ts +20 -0
  35. package/colors/interfaces/ColorPickerChangeEvent.d.ts +29 -0
  36. package/colors/interfaces/ColorPickerFocusEvent.d.ts +20 -0
  37. package/colors/interfaces/ColorPickerGradientSettings.d.ts +29 -0
  38. package/colors/interfaces/ColorPickerPaletteSettings.d.ts +39 -0
  39. package/colors/interfaces/ColorPickerPopupSettings.d.ts +21 -0
  40. package/colors/interfaces/ColorPickerProps.d.ts +242 -0
  41. package/colors/interfaces/ColorPickerView.d.ts +17 -0
  42. package/colors/interfaces/PickerPopupSettings.d.ts +29 -0
  43. package/colors/interfaces/PickerProps.d.ts +57 -0
  44. package/colors/models/hsva.d.ts +16 -0
  45. package/colors/models/output-format.d.ts +11 -0
  46. package/colors/models/palette-presets.d.ts +60 -0
  47. package/colors/models/rgb.d.ts +15 -0
  48. package/colors/models/rgba.d.ts +16 -0
  49. package/colors/models/table-cell.d.ts +14 -0
  50. package/colors/models/tile-size.d.ts +18 -0
  51. package/colors/utils/color-cache.d.ts +37 -0
  52. package/colors/utils/color-palette.service.d.ts +19 -0
  53. package/colors/utils/color-parser.d.ts +72 -0
  54. package/colors/utils/color-parser.js +1 -1
  55. package/colors/utils/color-parser.mjs +1 -1
  56. package/colors/utils/misc.d.ts +23 -0
  57. package/colors/utils/svg-calc.d.ts +69 -0
  58. package/common/AdaptiveMode.d.ts +21 -0
  59. package/common/SliderTooltip.d.ts +25 -0
  60. package/common/SwitchController.d.ts +38 -0
  61. package/common/SwitchModel.d.ts +14 -0
  62. package/dist/cdn/js/kendo-react-inputs.js +1 -1
  63. package/index.d.mts +72 -5128
  64. package/index.d.ts +72 -5128
  65. package/input/Input.d.ts +119 -0
  66. package/input/Input.js +1 -1
  67. package/input/Input.mjs +45 -43
  68. package/input/InputClearValue.d.ts +28 -0
  69. package/input/InputPrefix.d.ts +30 -0
  70. package/input/InputSeparator.d.ts +30 -0
  71. package/input/InputSuffix.d.ts +32 -0
  72. package/input/InputValidationIcon.d.ts +21 -0
  73. package/input/interfaces/InputChangeEvent.d.ts +18 -0
  74. package/interfaces/Direction.d.ts +8 -0
  75. package/interfaces/ToggleBaseProps.d.ts +24 -0
  76. package/maskedtextbox/MaskedTextBox.d.ts +224 -0
  77. package/maskedtextbox/MaskedTextBox.js +1 -1
  78. package/maskedtextbox/MaskedTextBox.mjs +80 -79
  79. package/maskedtextbox/MaskedTextBoxProps.d.ts +273 -0
  80. package/maskedtextbox/masking.service.d.ts +48 -0
  81. package/maskedtextbox/masking.service.mjs +9 -9
  82. package/maskedtextbox/parsing/combinators.d.ts +16 -0
  83. package/maskedtextbox/parsing/parsers.d.ts +54 -0
  84. package/maskedtextbox/parsing/result.d.ts +30 -0
  85. package/maskedtextbox/parsing/stream.d.ts +29 -0
  86. package/maskedtextbox/utils.d.ts +23 -0
  87. package/messages/index.d.ts +177 -0
  88. package/numerictextbox/NumericTextBox.d.ts +21 -0
  89. package/numerictextbox/NumericTextBox.js +1 -1
  90. package/numerictextbox/NumericTextBox.mjs +161 -161
  91. package/numerictextbox/interfaces/NumericTextBoxBlurEvent.d.ts +14 -0
  92. package/numerictextbox/interfaces/NumericTextBoxChangeEvent.d.ts +18 -0
  93. package/numerictextbox/interfaces/NumericTextBoxFocusEvent.d.ts +14 -0
  94. package/numerictextbox/interfaces/NumericTextBoxHandle.d.ts +46 -0
  95. package/numerictextbox/interfaces/NumericTextBoxProps.d.ts +212 -0
  96. package/numerictextbox/interfaces/NumericTextBoxState.d.ts +22 -0
  97. package/numerictextbox/utils/index.d.ts +126 -0
  98. package/package-metadata.d.ts +12 -0
  99. package/package-metadata.js +1 -1
  100. package/package-metadata.mjs +10 -16
  101. package/package.json +10 -10
  102. package/radiobutton/RadioButton.d.ts +36 -0
  103. package/radiobutton/RadioButton.js +1 -1
  104. package/radiobutton/RadioButton.mjs +8 -8
  105. package/radiobutton/RadioGroup.d.ts +36 -0
  106. package/radiobutton/interfaces/RadioButtonBlurEvent.d.ts +14 -0
  107. package/radiobutton/interfaces/RadioButtonChangeEvent.d.ts +18 -0
  108. package/radiobutton/interfaces/RadioButtonFocusEvent.d.ts +14 -0
  109. package/radiobutton/interfaces/RadioButtonProps.d.ts +107 -0
  110. package/radiobutton/interfaces/RadioGroupChangeEvent.d.ts +18 -0
  111. package/radiobutton/interfaces/RadioGroupFocusEvent.d.ts +14 -0
  112. package/radiobutton/interfaces/RadioGroupProps.d.ts +178 -0
  113. package/range-slider/RangeSlider.d.ts +152 -0
  114. package/range-slider/range-raducer.d.ts +46 -0
  115. package/rating/Rating.d.ts +302 -0
  116. package/rating/Rating.mjs +3 -3
  117. package/rating/RatingItem.d.ts +111 -0
  118. package/rating/models/index.d.ts +91 -0
  119. package/rating/rating-reducer.d.ts +39 -0
  120. package/rating/utils/index.d.ts +31 -0
  121. package/signature/Signature.d.ts +21 -0
  122. package/signature/Signature.js +1 -1
  123. package/signature/Signature.mjs +26 -23
  124. package/signature/interfaces/SignatureBlurEvent.d.ts +14 -0
  125. package/signature/interfaces/SignatureChangeEvent.d.ts +18 -0
  126. package/signature/interfaces/SignatureCloseEvent.d.ts +14 -0
  127. package/signature/interfaces/SignatureFocusEvent.d.ts +14 -0
  128. package/signature/interfaces/SignatureHandle.d.ts +49 -0
  129. package/signature/interfaces/SignatureOpenEvent.d.ts +14 -0
  130. package/signature/interfaces/SignatureProps.d.ts +324 -0
  131. package/signature/interfaces/index.d.ts +14 -0
  132. package/signature/utils/index.d.ts +11 -0
  133. package/slider/Slider.d.ts +288 -0
  134. package/slider/Slider.mjs +9 -9
  135. package/slider/SliderLabel.d.ts +51 -0
  136. package/switch/Switch.d.ts +397 -0
  137. package/switch/Switch.js +1 -1
  138. package/switch/Switch.mjs +29 -22
  139. package/textarea/TextArea.d.ts +40 -0
  140. package/textarea/TextArea.js +1 -1
  141. package/textarea/TextArea.mjs +41 -41
  142. package/textarea/interfaces/TextAreaBlurEvent.d.ts +14 -0
  143. package/textarea/interfaces/TextAreaChangeEvent.d.ts +18 -0
  144. package/textarea/interfaces/TextAreaFocusEvent.d.ts +14 -0
  145. package/textarea/interfaces/TextAreaProps.d.ts +199 -0
  146. package/textbox/Textbox.d.ts +99 -0
  147. package/textbox/Textbox.js +1 -1
  148. package/textbox/Textbox.mjs +70 -66
  149. package/utils.d.ts +11 -0
@@ -0,0 +1,397 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { default as PropTypes } from 'prop-types';
9
+ import { BaseEvent, FormComponent, FormComponentProps, FormComponentValidity } from '@progress/kendo-react-common';
10
+ import { ToggleBaseProps } from '../interfaces/ToggleBaseProps.js';
11
+ import * as React from 'react';
12
+ /**
13
+ * The arguments for the `onChange` Switch event.
14
+ */
15
+ export interface SwitchChangeEvent extends BaseEvent<Switch> {
16
+ /**
17
+ * The new value of the Switch.
18
+ */
19
+ value: boolean;
20
+ }
21
+ /**
22
+ * Represents the props of the [KendoReact Switch component](https://www.telerik.com/kendo-react-ui/components/inputs/switch).
23
+ */
24
+ export interface SwitchProps extends ToggleBaseProps, FormComponentProps {
25
+ /**
26
+ * Specifies the `accessKey` of the Switch.
27
+ *
28
+ * @example
29
+ * ```jsx
30
+ * <Switch accessKey="s" />
31
+ * ```
32
+ */
33
+ accessKey?: string;
34
+ /**
35
+ * Sets the current value of the Switch ([see example](https://www.telerik.com/kendo-react-ui/components/inputs/switch/controlled-switch)).
36
+ *
37
+ * @example
38
+ * ```jsx
39
+ * <Switch checked={true} />
40
+ * ```
41
+ */
42
+ checked?: boolean;
43
+ /**
44
+ * Adds custom CSS classes to the Switch.
45
+ *
46
+ * @example
47
+ * ```jsx
48
+ * <Switch className="custom-class" />
49
+ * ```
50
+ */
51
+ className?: string;
52
+ /**
53
+ * Sets the value of the Switch when it is initially displayed ([see example](https://www.telerik.com/kendo-react-ui/components/inputs/switch/default-state)).
54
+ *
55
+ * @example
56
+ * ```jsx
57
+ * <Switch defaultChecked={true} />
58
+ * ```
59
+ */
60
+ defaultChecked?: boolean;
61
+ /**
62
+ * Specifies the default value of the Switch.
63
+ *
64
+ * @example
65
+ * ```jsx
66
+ * <Switch defaultValue={true} />
67
+ * ```
68
+ */
69
+ defaultValue?: any;
70
+ /**
71
+ * Disables the Switch when set to `true` ([see example](https://www.telerik.com/kendo-react-ui/components/inputs/switch/disabled-state)).
72
+ *
73
+ * @example
74
+ * ```jsx
75
+ * <Switch disabled={true} />
76
+ * ```
77
+ */
78
+ disabled?: boolean;
79
+ /**
80
+ * Specifies the `dir` property of the wrapping element of the Switch.
81
+ *
82
+ * @example
83
+ * ```jsx
84
+ * <Switch dir="rtl" />
85
+ * ```
86
+ */
87
+ dir?: string;
88
+ /**
89
+ * Specifies the `id` of the Switch.
90
+ *
91
+ * @example
92
+ * ```jsx
93
+ * <Switch id="switch-component" />
94
+ * ```
95
+ */
96
+ id?: string;
97
+ /**
98
+ * Configures the `size` of the Switch.
99
+ *
100
+ * The available options are:
101
+ * - small
102
+ * - medium
103
+ * - large
104
+ * - null&mdash;Does not set a size `className`.
105
+ *
106
+ * @default `medium`
107
+ * @example
108
+ * ```jsx
109
+ * <Switch size="large" />
110
+ * ```
111
+ */
112
+ size?: 'small' | 'medium' | 'large';
113
+ /**
114
+ * Configures the `trackRounded` of the Switch.
115
+ *
116
+ * The available options are:
117
+ * - small
118
+ * - medium
119
+ * - large
120
+ * - full
121
+ * - null&mdash;Does not set a trackRounded `className`.
122
+ *
123
+ * @default undefined (theme-controlled)
124
+ * @example
125
+ * ```jsx
126
+ * <Switch trackRounded="medium" />
127
+ * ```
128
+ */
129
+ trackRounded?: 'small' | 'medium' | 'large' | 'full';
130
+ /**
131
+ * Configures the `thumbRounded` property of the Switch.
132
+ *
133
+ * The available options are:
134
+ * - small
135
+ * - medium
136
+ * - large
137
+ * - full
138
+ * - null&mdash;Does not set a thumbRounded `className`.
139
+ *
140
+ * @default undefined (theme-controlled)
141
+ * @example
142
+ * ```jsx
143
+ * <Switch thumbRounded="full" />
144
+ * ```
145
+ */
146
+ thumbRounded?: 'small' | 'medium' | 'large' | 'full';
147
+ /**
148
+ * Identifies the element(s) which will describe the component.
149
+ * For example these elements could contain error or hint message.
150
+ *
151
+ * @example
152
+ * ```jsx
153
+ * <Switch ariaDescribedBy="description-id" />
154
+ * ```
155
+ */
156
+ ariaDescribedBy?: string;
157
+ /**
158
+ * Identifies the element(s) which will label the component.
159
+ *
160
+ * @example
161
+ * ```jsx
162
+ * <Switch ariaLabelledBy="label-id" />
163
+ * ```
164
+ */
165
+ ariaLabelledBy?: string;
166
+ /**
167
+ * Sets a custom label for the **Off** state.
168
+ *
169
+ * @example
170
+ * ```jsx
171
+ * <Switch offLabel="No" />
172
+ * ```
173
+ */
174
+ offLabel?: React.ReactNode;
175
+ /**
176
+ * Fires when the Switch is blurred.
177
+ *
178
+ * @example
179
+ * ```jsx
180
+ * <Switch onBlur={(event) => console.log('Blurred')} />
181
+ * ```
182
+ */
183
+ onBlur?: (event: React.FocusEvent<HTMLSpanElement>) => void;
184
+ /**
185
+ * Fires when the value of the Switch changes.
186
+ *
187
+ * @example
188
+ * ```jsx
189
+ * <Switch onChange={(event) => console.log(event.value)} />
190
+ * ```
191
+ */
192
+ onChange?: (event: SwitchChangeEvent) => void;
193
+ /**
194
+ * Fires when the Switch is focused.
195
+ *
196
+ * @example
197
+ * ```jsx
198
+ * <Switch onFocus={(event) => console.log('Focused')} />
199
+ * ```
200
+ */
201
+ onFocus?: (event: React.FocusEvent<HTMLSpanElement>) => void;
202
+ /**
203
+ * Sets a custom label for the **On** state.
204
+ *
205
+ * @example
206
+ * ```jsx
207
+ * <Switch onLabel="Yes" />
208
+ * ```
209
+ */
210
+ onLabel?: React.ReactNode;
211
+ /**
212
+ * Specifies the [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
213
+ *
214
+ * @example
215
+ * ```jsx
216
+ * <Switch tabIndex={0} />
217
+ * ```
218
+ */
219
+ tabIndex?: number;
220
+ /**
221
+ * Specifies the value of the Switch.
222
+ *
223
+ * @example
224
+ * ```jsx
225
+ * <Switch value={true} />
226
+ * ```
227
+ */
228
+ value?: string | number | string[] | boolean | null;
229
+ /**
230
+ * Specifies the accessible label of the Switch.
231
+ *
232
+ * @example
233
+ * ```jsx
234
+ * <Switch ariaLabel="Toggle switch" />
235
+ * ```
236
+ */
237
+ ariaLabel?: string;
238
+ }
239
+ /**
240
+ * @hidden
241
+ */
242
+ export interface SwitchState {
243
+ checked: boolean;
244
+ focused: boolean;
245
+ }
246
+ /** @hidden */
247
+ export declare class SwitchWithoutContext extends React.Component<SwitchProps, SwitchState> implements FormComponent {
248
+ static displayName: string;
249
+ /**
250
+ * Gets the value of the Switch.
251
+ */
252
+ get value(): boolean;
253
+ get element(): HTMLSpanElement | null;
254
+ get actionElement(): HTMLSpanElement | null;
255
+ /**
256
+ * Gets the `name` property of the Switch.
257
+ */
258
+ get name(): string | undefined;
259
+ /**
260
+ * Represents the validity state into which the Switch is set.
261
+ */
262
+ get validity(): FormComponentValidity;
263
+ /**
264
+ * @hidden
265
+ */
266
+ protected get validityStyles(): boolean;
267
+ /**
268
+ * @hidden
269
+ */
270
+ protected get required(): boolean;
271
+ /**
272
+ * @hidden
273
+ */
274
+ protected setValidity: () => void;
275
+ protected limit: (offset: number, drag: HTMLSpanElement, wrapper: HTMLSpanElement) => number;
276
+ protected toggle: (value: boolean, event: any) => void;
277
+ /**
278
+ * @hidden
279
+ */
280
+ static propTypes: {
281
+ accessKey: PropTypes.Requireable<string>;
282
+ checked: PropTypes.Requireable<boolean>;
283
+ className: PropTypes.Requireable<string>;
284
+ disabled: PropTypes.Requireable<boolean>;
285
+ defaultChecked: PropTypes.Requireable<boolean>;
286
+ size: PropTypes.Requireable<"small" | "medium" | "large" | undefined>;
287
+ trackRounded: PropTypes.Requireable<"small" | "medium" | "large" | "full" | undefined>;
288
+ thumbRounded: PropTypes.Requireable<"small" | "medium" | "large" | "full" | undefined>;
289
+ dir: PropTypes.Requireable<string>;
290
+ id: PropTypes.Requireable<string>;
291
+ ariaLabelledBy: PropTypes.Requireable<string>;
292
+ ariaDescribedBy: PropTypes.Requireable<string>;
293
+ offLabel: PropTypes.Requireable<string>;
294
+ required: PropTypes.Requireable<boolean>;
295
+ tabIndex: PropTypes.Requireable<number>;
296
+ valid: PropTypes.Requireable<boolean>;
297
+ validate: PropTypes.Requireable<boolean>;
298
+ validationMessage: PropTypes.Requireable<string>;
299
+ onBlur: PropTypes.Requireable<any>;
300
+ onChange: PropTypes.Requireable<any>;
301
+ onFocus: PropTypes.Requireable<any>;
302
+ onLabel: PropTypes.Requireable<string>;
303
+ };
304
+ /**
305
+ * @hidden
306
+ */
307
+ static defaultProps: {
308
+ disabled: boolean;
309
+ defaultChecked: boolean;
310
+ size: undefined;
311
+ trackRounded: undefined;
312
+ thumbRounded: undefined;
313
+ offLabel: string;
314
+ onBlur: () => void;
315
+ onFocus: () => void;
316
+ onLabel: string;
317
+ validityStyles: boolean;
318
+ };
319
+ /**
320
+ * @hidden
321
+ */
322
+ readonly state: SwitchState;
323
+ private _element;
324
+ private _wrapper;
325
+ private _input;
326
+ private _id;
327
+ private valueDuringOnChange;
328
+ private dir?;
329
+ private defaultValidationMessage;
330
+ private eventTimeStamp?;
331
+ /**
332
+ * @hidden
333
+ */
334
+ constructor(props: SwitchProps);
335
+ /**
336
+ * @hidden
337
+ */
338
+ componentDidMount(): void;
339
+ /**
340
+ * @hidden
341
+ */
342
+ componentDidUpdate(): void;
343
+ /**
344
+ * @hidden
345
+ */
346
+ focus: () => void;
347
+ /**
348
+ * @hidden
349
+ */
350
+ render(): React.JSX.Element;
351
+ private dummyInput;
352
+ private handleClick;
353
+ private handleKeyDown;
354
+ private handleWrapperFocus;
355
+ private handleWrapperBlur;
356
+ }
357
+ /**
358
+ * Represents the PropsContext of the `Switch` component.
359
+ * Used for global configuration of all `Switch` instances.
360
+ *
361
+ * For more information, refer to the [Inputs Props Context](https://www.telerik.com/kendo-react-ui/components/inputs/props-context) article.
362
+ */
363
+ export declare const SwitchPropsContext: React.Context<(p: SwitchProps) => SwitchProps>;
364
+ /**
365
+ * Represent the `ref` of the Switch component.
366
+ */
367
+ export interface SwitchHandle extends Pick<SwitchWithoutContext, keyof SwitchWithoutContext> {
368
+ /**
369
+ * @hidden
370
+ */
371
+ actionElement: HTMLSpanElement | null;
372
+ /**
373
+ * Returns the HTML element of the Switch component.
374
+ */
375
+ element: HTMLSpanElement | null;
376
+ /**
377
+ * Gets the `name` property of the Switch.
378
+ */
379
+ name: string | undefined;
380
+ /**
381
+ * Represents the validity state into which the Switch is set.
382
+ */
383
+ validity: FormComponentValidity;
384
+ /**
385
+ * Gets the value of the Switch.
386
+ */
387
+ value: boolean;
388
+ }
389
+ /** @hidden */
390
+ export type Switch = SwitchHandle;
391
+ /**
392
+ * Represents the [KendoReact Switch component](https://www.telerik.com/kendo-react-ui/components/inputs/switch).
393
+ *
394
+ * Accepts properties of type [SwitchProps](https://www.telerik.com/kendo-react-ui/components/inputs/api/switchprops).
395
+ * Obtaining the `ref` returns an object of type [SwitchHandle](https://www.telerik.com/kendo-react-ui/components/inputs/api/switchhandle).
396
+ */
397
+ export declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<any>>;
package/switch/Switch.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react"),s=require("prop-types"),i=require("@progress/kendo-react-common"),S=require("@progress/kendo-react-intl"),p=require("../messages/index.js");function N(d){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(d){for(const e in d)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(d,e);Object.defineProperty(a,e,t.get?t:{enumerable:!0,get:()=>d[e]})}}return a.default=d,Object.freeze(a)}const r=N(C),n=class n extends r.Component{constructor(a){super(a),this.setValidity=()=>{this._input&&this._input.setCustomValidity&&this._input.setCustomValidity(this.validity.valid?"":this.props.validationMessage||this.defaultValidationMessage.toLanguageString(p.switchValidation,p.messages[p.switchValidation]))},this.limit=(e,t,h)=>{const l=h.offsetWidth,o=t.offsetWidth;return e<0?0:e>l-o?l-o:e},this.toggle=(e,t)=>{this.setState({checked:e}),this.valueDuringOnChange=e,i.dispatchEvent(this.props.onChange,t,this,{value:e}),this.valueDuringOnChange=void 0},this._element=null,this._wrapper=null,this._input=null,this._id=this.props.id,this.defaultValidationMessage=S.provideLocalizationService(this),this.focus=()=>{this.actionElement&&this.actionElement.focus()},this.dummyInput=e=>r.createElement("input",{type:"checkbox",checked:this.props.checked,ref:t=>{this._input=t},tabIndex:-1,"aria-hidden":!0,value:e,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"},onChange:i.noop,name:this.name||void 0}),this.handleClick=e=>{this.eventTimeStamp!==e.timeStamp&&(this.eventTimeStamp=e.timeStamp,this.toggle(!this.value,e))},this.handleKeyDown=e=>{if(this.props.disabled)return;const{keyCode:t}=e;(t===i.Keys.space||t===i.Keys.enter)&&(this.toggle(!this.value,e),e.preventDefault())},this.handleWrapperFocus=e=>{if(this.props.disabled)return;this.setState({focused:!0});const{onFocus:t}=this.props;t&&t.call(void 0,e)},this.handleWrapperBlur=e=>{if(this.props.disabled)return;this.setState({focused:!1});const{onBlur:t}=this.props;t&&t.call(void 0,e)},this.state={checked:a.defaultChecked||n.defaultProps.defaultChecked,focused:!1}}get value(){return this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.checked!==void 0?this.props.checked:this.state.checked}get element(){return this._element}get actionElement(){return this._wrapper}get name(){return this.props.name}get validity(){const a=this.props.validationMessage!==void 0,e=this.props.valid!==void 0?this.props.valid:this.props.required?!!this.value:!0,t=this.props.valid!==void 0?this.props.valid:e;return{customError:a,valid:t,valueMissing:this.value===null}}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:n.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:!1}componentDidMount(){this.setValidity(),this.forceUpdate()}componentDidUpdate(){this.setValidity()}render(){const{focused:a}=this.state,{dir:e,disabled:t,trackRounded:h,thumbRounded:l,size:o,offLabel:m,onLabel:f,tabIndex:y}=this.props;this.dir=e||this.element&&getComputedStyle(this.element).direction||void 0;const v=!this.validityStyles||this.validity.valid,k=i.classNames("k-switch",{[`k-switch-${i.kendoThemeMaps.sizeMap[o]||o}`]:o,"k-switch-on":this.value,"k-switch-off":!this.value,"k-focus":a,"k-disabled":t,"k-invalid":!v},this.props.className),w={"aria-checked":this.value,"aria-disabled":t||void 0,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,"aria-label":this.props.ariaLabel,"aria-required":this.props.required};return r.createElement("span",{ref:u=>{this._wrapper=u},role:"switch",...w,className:k,dir:this.dir,onKeyDown:this.handleKeyDown,onClick:this.handleClick,onBlur:this.handleWrapperBlur,onFocus:this.handleWrapperFocus,tabIndex:i.getTabIndex(y,t,void 0),accessKey:this.props.accessKey,id:this.props.id||this._id},r.createElement("span",{className:i.classNames("k-switch-track",{[`k-rounded-${i.kendoThemeMaps.roundedMap[h]||h}`]:h}),ref:u=>{this._element=u}},this.dummyInput(this.value),f?r.createElement("span",{className:"k-switch-label-on"},f):"",m?r.createElement("span",{className:"k-switch-label-off"},m):""),r.createElement("span",{className:"k-switch-thumb-wrap"},r.createElement("span",{className:i.classNames("k-switch-thumb",{[`k-rounded-${i.kendoThemeMaps.roundedMap[l]||l}`]:l})})))}};n.displayName="Switch",n.propTypes={accessKey:s.string,checked:s.bool,className:s.string,disabled:s.bool,defaultChecked:s.bool,size:s.oneOf([null,"small","medium","large"]),trackRounded:s.oneOf([null,"small","medium","large","full"]),thumbRounded:s.oneOf([null,"small","medium","large","full"]),dir:s.string,id:s.string,ariaLabelledBy:s.string,ariaDescribedBy:s.string,offLabel:s.string,required:s.bool,tabIndex:s.number,valid:s.bool,validate:s.bool,validationMessage:s.string,onBlur:s.any,onChange:s.any,onFocus:s.any,onLabel:s.string},n.defaultProps={disabled:!1,defaultChecked:!1,size:"medium",trackRounded:"full",thumbRounded:"full",offLabel:"OFF",onBlur:i.noop,onFocus:i.noop,onLabel:"ON",validityStyles:!0};let c=n;const g=i.createPropsContext(),b=i.withIdHOC(i.withPropsContext(g,c));b.displayName="KendoReactSwitch";exports.Switch=b;exports.SwitchPropsContext=g;exports.SwitchWithoutContext=c;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react"),i=require("prop-types"),s=require("@progress/kendo-react-common"),S=require("@progress/kendo-react-intl"),u=require("../messages/index.js");function N(d){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(d){for(const e in d)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(d,e);Object.defineProperty(a,e,t.get?t:{enumerable:!0,get:()=>d[e]})}}return a.default=d,Object.freeze(a)}const r=N(C),n=class n extends r.Component{constructor(a){super(a),this.setValidity=()=>{this._input&&this._input.setCustomValidity&&this._input.setCustomValidity(this.validity.valid?"":this.props.validationMessage||this.defaultValidationMessage.toLanguageString(u.switchValidation,u.messages[u.switchValidation]))},this.limit=(e,t,h)=>{const o=h.offsetWidth,l=t.offsetWidth;return e<0?0:e>o-l?o-l:e},this.toggle=(e,t)=>{this.setState({checked:e}),this.valueDuringOnChange=e,s.dispatchEvent(this.props.onChange,t,this,{value:e}),this.valueDuringOnChange=void 0},this._element=null,this._wrapper=null,this._input=null,this._id=this.props.id,this.defaultValidationMessage=S.provideLocalizationService(this),this.focus=()=>{this.actionElement&&this.actionElement.focus()},this.dummyInput=e=>r.createElement("input",{type:"checkbox",checked:this.props.checked,ref:t=>{this._input=t},tabIndex:-1,"aria-hidden":!0,value:e,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"},onChange:s.noop,name:this.name||void 0}),this.handleClick=e=>{this.eventTimeStamp!==e.timeStamp&&(this.eventTimeStamp=e.timeStamp,this.toggle(!this.value,e))},this.handleKeyDown=e=>{if(this.props.disabled)return;const{keyCode:t}=e;(t===s.Keys.space||t===s.Keys.enter)&&(this.toggle(!this.value,e),e.preventDefault())},this.handleWrapperFocus=e=>{if(this.props.disabled)return;this.setState({focused:!0});const{onFocus:t}=this.props;t&&t.call(void 0,e)},this.handleWrapperBlur=e=>{if(this.props.disabled)return;this.setState({focused:!1});const{onBlur:t}=this.props;t&&t.call(void 0,e)},this.state={checked:a.defaultChecked||n.defaultProps.defaultChecked,focused:!1}}get value(){return this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.props.checked!==void 0?this.props.checked:this.state.checked}get element(){return this._element}get actionElement(){return this._wrapper}get name(){return this.props.name}get validity(){const a=this.props.validationMessage!==void 0,e=this.props.valid!==void 0?this.props.valid:this.props.required?!!this.value:!0,t=this.props.valid!==void 0?this.props.valid:e;return{customError:a,valid:t,valueMissing:this.value===null}}get validityStyles(){return this.props.validityStyles!==void 0?this.props.validityStyles:n.defaultProps.validityStyles}get required(){return this.props.required!==void 0?this.props.required:!1}componentDidMount(){this.setValidity(),this.forceUpdate()}componentDidUpdate(){this.setValidity()}render(){const{focused:a}=this.state,{dir:e,disabled:t,trackRounded:h,thumbRounded:o,size:l,offLabel:m,onLabel:f,tabIndex:v}=this.props;this.dir=e||this.element&&getComputedStyle(this.element).direction||void 0;const y=!this.validityStyles||this.validity.valid,k=s.classNames("k-switch",{[`k-switch-${s.kendoThemeMaps.sizeMap[l]||l}`]:l,"k-switch-on":this.value,"k-switch-off":!this.value,"k-focus":a,"k-disabled":t,"k-invalid":!y},this.props.className),w={"aria-checked":this.value,"aria-disabled":t||void 0,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,"aria-label":this.props.ariaLabel,"aria-required":this.props.required};return r.createElement("span",{ref:p=>{this._wrapper=p},role:"switch",...w,className:k,dir:this.dir,onKeyDown:this.handleKeyDown,onClick:this.handleClick,onBlur:this.handleWrapperBlur,onFocus:this.handleWrapperFocus,tabIndex:s.getTabIndex(v,t,void 0),accessKey:this.props.accessKey,id:this.props.id||this._id},r.createElement("span",{className:s.classNames("k-switch-track",{[`k-rounded-${s.kendoThemeMaps.roundedMap[h]||h}`]:h}),ref:p=>{this._element=p}},this.dummyInput(this.value),f?r.createElement("span",{className:"k-switch-label-on"},f):"",m?r.createElement("span",{className:"k-switch-label-off"},m):""),r.createElement("span",{className:"k-switch-thumb-wrap"},r.createElement("span",{className:s.classNames("k-switch-thumb",{[`k-rounded-${s.kendoThemeMaps.roundedMap[o]||o}`]:o})})))}};n.displayName="Switch",n.propTypes={accessKey:i.string,checked:i.bool,className:i.string,disabled:i.bool,defaultChecked:i.bool,size:i.oneOf(["small","medium","large"]),trackRounded:i.oneOf(["small","medium","large","full"]),thumbRounded:i.oneOf(["small","medium","large","full"]),dir:i.string,id:i.string,ariaLabelledBy:i.string,ariaDescribedBy:i.string,offLabel:i.string,required:i.bool,tabIndex:i.number,valid:i.bool,validate:i.bool,validationMessage:i.string,onBlur:i.any,onChange:i.any,onFocus:i.any,onLabel:i.string},n.defaultProps={disabled:!1,defaultChecked:!1,size:void 0,trackRounded:void 0,thumbRounded:void 0,offLabel:"OFF",onBlur:s.noop,onFocus:s.noop,onLabel:"ON",validityStyles:!0};let c=n;const g=s.createPropsContext(),b=s.withIdHOC(s.withPropsContext(g,c));b.displayName="KendoReactSwitch";exports.Switch=b;exports.SwitchPropsContext=g;exports.SwitchWithoutContext=c;
package/switch/Switch.mjs CHANGED
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import * as s from "react";
9
9
  import t from "prop-types";
10
- import { dispatchEvent as C, noop as h, Keys as v, classNames as p, kendoThemeMaps as c, getTabIndex as S, createPropsContext as N, withIdHOC as D, withPropsContext as E } from "@progress/kendo-react-common";
10
+ import { withIdHOC as C, withPropsContext as S, createPropsContext as N, dispatchEvent as D, noop as h, Keys as v, classNames as p, kendoThemeMaps as c, getTabIndex as E } from "@progress/kendo-react-common";
11
11
  import { provideLocalizationService as L } from "@progress/kendo-react-intl";
12
12
  import { switchValidation as g, messages as M } from "../messages/index.mjs";
13
13
  const a = class a extends s.Component {
@@ -19,11 +19,11 @@ const a = class a extends s.Component {
19
19
  this._input && this._input.setCustomValidity && this._input.setCustomValidity(
20
20
  this.validity.valid ? "" : this.props.validationMessage || this.defaultValidationMessage.toLanguageString(g, M[g])
21
21
  );
22
- }, this.limit = (e, i, n) => {
23
- const l = n.offsetWidth, o = i.offsetWidth;
24
- return e < 0 ? 0 : e > l - o ? l - o : e;
22
+ }, this.limit = (e, i, d) => {
23
+ const o = d.offsetWidth, l = i.offsetWidth;
24
+ return e < 0 ? 0 : e > o - l ? o - l : e;
25
25
  }, this.toggle = (e, i) => {
26
- this.setState({ checked: e }), this.valueDuringOnChange = e, C(this.props.onChange, i, this, { value: e }), this.valueDuringOnChange = void 0;
26
+ this.setState({ checked: e }), this.valueDuringOnChange = e, D(this.props.onChange, i, this, { value: e }), this.valueDuringOnChange = void 0;
27
27
  }, this._element = null, this._wrapper = null, this._input = null, this._id = this.props.id, this.defaultValidationMessage = L(this), this.focus = () => {
28
28
  this.actionElement && this.actionElement.focus();
29
29
  }, this.dummyInput = (e) => /* @__PURE__ */ s.createElement(
@@ -122,12 +122,12 @@ const a = class a extends s.Component {
122
122
  * @hidden
123
123
  */
124
124
  render() {
125
- const { focused: r } = this.state, { dir: e, disabled: i, trackRounded: n, thumbRounded: l, size: o, offLabel: m, onLabel: f, tabIndex: b } = this.props;
125
+ const { focused: r } = this.state, { dir: e, disabled: i, trackRounded: d, thumbRounded: o, size: l, offLabel: m, onLabel: f, tabIndex: b } = this.props;
126
126
  this.dir = e || this.element && getComputedStyle(this.element).direction || void 0;
127
127
  const y = !this.validityStyles || this.validity.valid, k = p(
128
128
  "k-switch",
129
129
  {
130
- [`k-switch-${c.sizeMap[o] || o}`]: o,
130
+ [`k-switch-${c.sizeMap[l] || l}`]: l,
131
131
  "k-switch-on": this.value,
132
132
  "k-switch-off": !this.value,
133
133
  "k-focus": r,
@@ -146,8 +146,8 @@ const a = class a extends s.Component {
146
146
  return /* @__PURE__ */ s.createElement(
147
147
  "span",
148
148
  {
149
- ref: (d) => {
150
- this._wrapper = d;
149
+ ref: (n) => {
150
+ this._wrapper = n;
151
151
  },
152
152
  role: "switch",
153
153
  ...w,
@@ -157,7 +157,7 @@ const a = class a extends s.Component {
157
157
  onClick: this.handleClick,
158
158
  onBlur: this.handleWrapperBlur,
159
159
  onFocus: this.handleWrapperFocus,
160
- tabIndex: S(b, i, void 0),
160
+ tabIndex: E(b, i, void 0),
161
161
  accessKey: this.props.accessKey,
162
162
  id: this.props.id || this._id
163
163
  },
@@ -165,17 +165,24 @@ const a = class a extends s.Component {
165
165
  "span",
166
166
  {
167
167
  className: p("k-switch-track", {
168
- [`k-rounded-${c.roundedMap[n] || n}`]: n
168
+ [`k-rounded-${c.roundedMap[d] || d}`]: d
169
169
  }),
170
- ref: (d) => {
171
- this._element = d;
170
+ ref: (n) => {
171
+ this._element = n;
172
172
  }
173
173
  },
174
174
  this.dummyInput(this.value),
175
175
  f ? /* @__PURE__ */ s.createElement("span", { className: "k-switch-label-on" }, f) : "",
176
176
  m ? /* @__PURE__ */ s.createElement("span", { className: "k-switch-label-off" }, m) : ""
177
177
  ),
178
- /* @__PURE__ */ s.createElement("span", { className: "k-switch-thumb-wrap" }, /* @__PURE__ */ s.createElement("span", { className: p("k-switch-thumb", { [`k-rounded-${c.roundedMap[l] || l}`]: l }) }))
178
+ /* @__PURE__ */ s.createElement("span", { className: "k-switch-thumb-wrap" }, /* @__PURE__ */ s.createElement(
179
+ "span",
180
+ {
181
+ className: p("k-switch-thumb", {
182
+ [`k-rounded-${c.roundedMap[o] || o}`]: o
183
+ })
184
+ }
185
+ ))
179
186
  );
180
187
  }
181
188
  };
@@ -185,9 +192,9 @@ a.displayName = "Switch", a.propTypes = {
185
192
  className: t.string,
186
193
  disabled: t.bool,
187
194
  defaultChecked: t.bool,
188
- size: t.oneOf([null, "small", "medium", "large"]),
189
- trackRounded: t.oneOf([null, "small", "medium", "large", "full"]),
190
- thumbRounded: t.oneOf([null, "small", "medium", "large", "full"]),
195
+ size: t.oneOf(["small", "medium", "large"]),
196
+ trackRounded: t.oneOf(["small", "medium", "large", "full"]),
197
+ thumbRounded: t.oneOf(["small", "medium", "large", "full"]),
191
198
  dir: t.string,
192
199
  id: t.string,
193
200
  ariaLabelledBy: t.string,
@@ -205,9 +212,9 @@ a.displayName = "Switch", a.propTypes = {
205
212
  }, a.defaultProps = {
206
213
  disabled: !1,
207
214
  defaultChecked: !1,
208
- size: "medium",
209
- trackRounded: "full",
210
- thumbRounded: "full",
215
+ size: void 0,
216
+ trackRounded: void 0,
217
+ thumbRounded: void 0,
211
218
  offLabel: "OFF",
212
219
  onBlur: h,
213
220
  onFocus: h,
@@ -215,8 +222,8 @@ a.displayName = "Switch", a.propTypes = {
215
222
  validityStyles: !0
216
223
  };
217
224
  let u = a;
218
- const B = N(), O = D(
219
- E(
225
+ const B = N(), O = C(
226
+ S(
220
227
  B,
221
228
  u
222
229
  )
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { TextAreaProps } from './interfaces/TextAreaProps.js';
9
+ import * as React from 'react';
10
+ /**
11
+ * @hidden
12
+ */
13
+ export interface TextAreaHandle {
14
+ element: React.RefObject<HTMLTextAreaElement | null>;
15
+ focus: any;
16
+ blur: any;
17
+ name?: string | null;
18
+ value?: string;
19
+ }
20
+ /**
21
+ * Represents the PropsContext of the `TextArea` component.
22
+ * Used for global configuration of all `TextArea` instances.
23
+ *
24
+ * For more information, refer to the [Inputs Props Context](https://www.telerik.com/kendo-react-ui/components/inputs/props-context) article.
25
+ */
26
+ export declare const TextAreaPropsContext: React.Context<(p: TextAreaProps) => TextAreaProps>;
27
+ /**
28
+ * Represents the [KendoReact TextArea component](https://www.telerik.com/kendo-react-ui/components/inputs/textarea).
29
+ *
30
+ *
31
+ * Accepts properties of type [TextAreaProps](https://www.telerik.com/kendo-react-ui/components/inputs/api/textareaprops).
32
+ *
33
+ * @example
34
+ * ```jsx
35
+ * const App = () => {
36
+ * return <TextArea />;
37
+ * }
38
+ * ```
39
+ */
40
+ export declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<TextAreaHandle | null>>;
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const me=require("react"),e=require("prop-types"),a=require("@progress/kendo-react-common");function pe(l){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const s in l)if(s!=="default"){const u=Object.getOwnPropertyDescriptor(l,s);Object.defineProperty(c,s,u.get?u:{enumerable:!0,get:()=>l[s]})}}return c.default=l,Object.freeze(c)}const t=pe(me),q=a.createPropsContext(),S=t.forwardRef((l,c)=>{const s=a.usePropsContext(q,l),{size:u=f.size,rounded:x=f.rounded,fillMode:T=f.fillMode,autoFocus:R=f.autoFocus,flow:v=f.flow,prefix:D=null,suffix:H=null,ariaDescribedBy:$,ariaLabelledBy:L,autoSize:m,className:_,defaultValue:K,disabled:r,readOnly:G,required:p,rows:J,id:Q,name:U,placeholder:W,style:X,tabIndex:Y,value:y,valid:P,validationMessage:w,validityStyles:M,onChange:h,onFocus:k,onBlur:C,visited:be,touched:ge,modified:xe,resizable:d,inputAttributes:Z,textareaStyle:E,...ee}=s,o=t.useRef(null),A=t.useCallback(()=>{o.current&&o.current.focus()},[]),F=t.useCallback(()=>{o.current&&o.current.blur()},[]),[I,V]=t.useState(K),[te,B]=t.useState(!1),[ae,oe]=a.useCustomComponent(D),[re,ne]=a.useCustomComponent(H),b=y!==void 0,g=b?y:I,i=t.useCallback(()=>({element:o,focus:A,blur:F,get value(){return g},get name(){return o.current&&o.current.name}}),[F,A,g]);t.useImperativeHandle(c,i);const[N,j]=t.useState("auto"),se=a.useId(),le=a.useDir(o,s.dir),z=P!==void 0?P:p?!!g:!0;t.useEffect(()=>{o.current&&o.current.setCustomValidity&&o.current.setCustomValidity(z?"":w||"")},[z,w]),a.useIsomorphicLayoutEffect(()=>{o.current&&j(`${o.current.scrollHeight}px`)},[g]);const ue=t.useCallback(n=>{const O=n.target.value;j("auto"),!b&&!r&&V(O),h&&!r&&a.dispatchEvent(h,n,{...i(),value:O},{value:O})},[V,h,r,b]),ie=t.useCallback(n=>{B(!0),k&&!r&&a.dispatchEvent(k,n,i(),void 0)},[k,r,i]),ce=t.useCallback(n=>{B(!1),C&&!r&&a.dispatchEvent(C,n,i(),void 0)},[C,r,i]),de=t.useMemo(()=>{let n={};return m?n={resize:"none",overflow:"hidden",height:N}:d&&(n={resize:d}),{...n,...E}},[m,d,N,E]),fe={id:Q||se,role:"textbox",name:U,className:a.classNames("k-input-inner","!k-overflow-auto",{"k-resize":!m&&d!=="none","k-resize-none":m||d==="none","!k-flex-none":v==="vertical"}),ref:o,disabled:r,rows:J,placeholder:W,readOnly:G,required:p,tabIndex:a.getTabIndex(Y,r),autoFocus:R,style:de,"aria-labelledby":L,"aria-describedby":$,"aria-multiline":!0,"aria-disabled":r||void 0,"aria-required":p,value:b?y:I,...Object.assign({},ee,Z),onChange:ue,onFocus:ie,onBlur:ce};return t.createElement("span",{className:a.classNames("k-input","k-textarea",{[`k-input-${a.kendoThemeMaps.sizeMap[u]||u}`]:u,[`k-input-${T}`]:T,[`k-rounded-${a.kendoThemeMaps.roundedMap[x]||x}`]:x,"k-invalid":!(z||M!==void 0||M===!0),"k-required":p,"k-disabled":r,"k-focus":te,"!k-flex-col":v==="vertical","!k-flex-row":v==="horizontal"},_),style:X,dir:le},s.prefix&&t.createElement(ae,{...oe}),t.createElement("textarea",{...fe}),s.suffix&&t.createElement(re,{...ne}))});S.propTypes={ariaDescribedBy:e.string,ariaLabelledBy:e.string,autoSize:e.bool,className:e.string,defaultValue:e.string,dir:e.string,disabled:e.bool,readOnly:e.bool,rows:e.number,id:e.string,name:e.string,placeholder:e.string,style:e.object,tabIndex:e.number,value:e.oneOfType([e.string,e.arrayOf(e.string),e.number]),onChange:e.func,onFocus:e.func,onBlur:e.func,size:e.oneOf([null,"small","medium","large"]),rounded:e.oneOf([null,"small","medium","large","full"]),fillMode:e.oneOf([null,"solid","flat","outline"]),resizable:e.oneOf(["none","both","horizontal","vertical"]),autoFocus:e.bool,flow:e.oneOf(["vertical","horizontal"])};const f={size:"medium",rounded:"medium",fillMode:"solid",autoFocus:!1,flow:"horizontal"};S.displayName="KendoTextArea";exports.TextArea=S;exports.TextAreaPropsContext=q;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const me=require("react"),e=require("prop-types"),o=require("@progress/kendo-react-common");function pe(l){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const s in l)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(l,s);Object.defineProperty(c,s,i.get?i:{enumerable:!0,get:()=>l[s]})}}return c.default=l,Object.freeze(c)}const t=pe(me),q=o.createPropsContext(),S=t.forwardRef((l,c)=>{const s=o.usePropsContext(q,l),{size:i=f.size,rounded:x=f.rounded,fillMode:T=f.fillMode,autoFocus:R=f.autoFocus,flow:v=f.flow,prefix:D=null,suffix:H=null,ariaDescribedBy:$,ariaLabelledBy:L,autoSize:m,className:_,defaultValue:K,disabled:r,readOnly:G,required:p,rows:J,id:Q,name:U,placeholder:W,style:X,tabIndex:Y,value:y,valid:P,validationMessage:w,validityStyles:M,onChange:h,onFocus:k,onBlur:C,visited:be,touched:ge,modified:xe,resizable:d,inputAttributes:Z,textareaStyle:E,...ee}=s,a=t.useRef(null),A=t.useCallback(()=>{a.current&&a.current.focus()},[]),F=t.useCallback(()=>{a.current&&a.current.blur()},[]),[I,V]=t.useState(K),[te,B]=t.useState(!1),[oe,ae]=o.useCustomComponent(D),[re,ne]=o.useCustomComponent(H),b=y!==void 0,g=b?y:I,u=t.useCallback(()=>({element:a,focus:A,blur:F,get value(){return g},get name(){return a.current&&a.current.name}}),[F,A,g]);t.useImperativeHandle(c,u);const[N,j]=t.useState("auto"),se=o.useId(),le=o.useDir(a,s.dir),z=P!==void 0?P:p?!!g:!0;t.useEffect(()=>{a.current&&a.current.setCustomValidity&&a.current.setCustomValidity(z?"":w||"")},[z,w]),o.useIsomorphicLayoutEffect(()=>{a.current&&j(`${a.current.scrollHeight}px`)},[g]);const ie=t.useCallback(n=>{const O=n.target.value;j("auto"),!b&&!r&&V(O),h&&!r&&o.dispatchEvent(h,n,{...u(),value:O},{value:O})},[V,h,r,b]),ue=t.useCallback(n=>{B(!0),k&&!r&&o.dispatchEvent(k,n,u(),void 0)},[k,r,u]),ce=t.useCallback(n=>{B(!1),C&&!r&&o.dispatchEvent(C,n,u(),void 0)},[C,r,u]),de=t.useMemo(()=>{let n={};return m?n={resize:"none",overflow:"hidden",height:N}:d&&(n={resize:d}),{...n,...E}},[m,d,N,E]),fe={id:Q||se,role:"textbox",name:U,className:o.classNames("k-input-inner","!k-overflow-auto",{"k-resize":!m&&d!=="none","k-resize-none":m||d==="none","!k-flex-none":v==="vertical"}),ref:a,disabled:r,rows:J,placeholder:W,readOnly:G,required:p,tabIndex:o.getTabIndex(Y,r),autoFocus:R,style:de,"aria-labelledby":L,"aria-describedby":$,"aria-multiline":!0,"aria-disabled":r||void 0,"aria-required":p,value:b?y:I,...Object.assign({},ee,Z),onChange:ie,onFocus:ue,onBlur:ce};return t.createElement("span",{className:o.classNames("k-input","k-textarea",{[`k-input-${o.kendoThemeMaps.sizeMap[i]||i}`]:i,[`k-input-${T}`]:T,[`k-rounded-${o.kendoThemeMaps.roundedMap[x]||x}`]:x,"k-invalid":!(z||M!==void 0||M===!0),"k-required":p,"k-disabled":r,"k-focus":te,"!k-flex-col":v==="vertical","!k-flex-row":v==="horizontal"},_),style:X,dir:le},s.prefix&&t.createElement(oe,{...ae}),t.createElement("textarea",{...fe}),s.suffix&&t.createElement(re,{...ne}))});S.propTypes={ariaDescribedBy:e.string,ariaLabelledBy:e.string,autoSize:e.bool,className:e.string,defaultValue:e.string,dir:e.string,disabled:e.bool,readOnly:e.bool,rows:e.number,id:e.string,name:e.string,placeholder:e.string,style:e.object,tabIndex:e.number,value:e.oneOfType([e.string,e.arrayOf(e.string),e.number]),onChange:e.func,onFocus:e.func,onBlur:e.func,size:e.oneOf(["small","medium","large"]),rounded:e.oneOf(["small","medium","large","full"]),fillMode:e.oneOf(["solid","flat","outline"]),resizable:e.oneOf(["none","both","horizontal","vertical"]),autoFocus:e.bool,flow:e.oneOf(["vertical","horizontal"])};const f={size:void 0,rounded:void 0,fillMode:void 0,autoFocus:!1,flow:"horizontal"};S.displayName="KendoTextArea";exports.TextArea=S;exports.TextAreaPropsContext=q;