@progress/kendo-vue-inputs 11.0.0 → 11.1.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.
- package/checkbox/Checkbox.d.ts +7 -1
- package/checkbox/interfaces/CheckboxProps.d.ts +39 -25
- package/colors/ColorGradient.d.ts +11 -1
- package/colors/ColorGradient.mjs +3 -0
- package/colors/ColorPalette.d.ts +11 -1
- package/colors/ColorPalette.mjs +3 -0
- package/colors/ColorPicker.d.ts +8 -1
- package/colors/FlatColorPicker.d.ts +51 -21
- package/colors/FlatColorPicker.mjs +3 -0
- package/colors/interfaces/ColorGradientProps.d.ts +39 -20
- package/colors/interfaces/ColorPaletteProps.d.ts +35 -19
- package/colors/interfaces/ColorPickerPaletteSettings.d.ts +12 -9
- package/colors/interfaces/ColorPickerPopupSettings.d.ts +3 -3
- package/colors/interfaces/ColorPickerProps.d.ts +72 -40
- package/colors/interfaces/ColorPickerView.d.ts +4 -4
- package/dist/cdn/js/kendo-vue-inputs.js +1 -1
- package/input/Input.d.ts +80 -31
- package/input/Input.mjs +3 -0
- package/input-separator/InputSeparator.d.ts +7 -8
- package/input-separator/InputSeparator.mjs +1 -1
- package/interfaces/ToggleBaseProps.d.ts +10 -1
- package/maskedtextbox/MaskedTextBox.d.ts +13 -1
- package/maskedtextbox/MaskedTextBox.mjs +3 -0
- package/maskedtextbox/MaskedTextBoxProps.d.ts +76 -48
- package/numerictextbox/NumericTextBox.d.ts +15 -3
- package/numerictextbox/NumericTextBox.mjs +3 -0
- package/numerictextbox/interfaces/NumericTextBoxProps.d.ts +60 -35
- package/otpinput/OTPInput.d.ts +14 -1
- package/otpinput/OTPInput.mjs +7 -0
- package/otpinput/OTPInputHandle.d.ts +1 -1
- package/otpinput/interfaces/OTPInputProps.d.ts +73 -65
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +10 -10
- package/radiobutton/RadioButton.d.ts +7 -1
- package/radiobutton/RadioGroup.d.ts +7 -1
- package/radiobutton/interfaces/RadioButtonProps.d.ts +42 -25
- package/radiobutton/interfaces/RadioGroupProps.d.ts +31 -23
- package/range-slider/RangeSlider.d.ts +60 -28
- package/range-slider/RangeSlider.mjs +3 -0
- package/rating/Rating.d.ts +8 -1
- package/rating/interfaces/RatingItemProps.d.ts +5 -5
- package/rating/interfaces/RatingProps.d.ts +55 -28
- package/signature/Signature.d.ts +8 -1
- package/signature/interfaces/SignatureProps.d.ts +54 -37
- package/slider/Slider.d.ts +46 -22
- package/slider/Slider.mjs +3 -0
- package/slider/SliderLabel.d.ts +12 -6
- package/switch/Switch.d.ts +55 -23
- package/switch/Switch.mjs +3 -0
- package/textarea/TextArea.d.ts +12 -27
- package/textarea/TextArea.mjs +3 -0
- package/textarea/interfaces/TextAreaProps.d.ts +62 -41
- package/textbox/TextBox.d.ts +89 -37
- package/textbox/TextBox.mjs +3 -0
|
@@ -12,21 +12,24 @@ import { SignatureBlurEvent } from './SignatureBlurEvent';
|
|
|
12
12
|
import { SignatureOpenEvent } from './SignatureOpenEvent';
|
|
13
13
|
import { SignatureCloseEvent } from './SignatureCloseEvent';
|
|
14
14
|
/**
|
|
15
|
-
* Represents the props of the [Kendo UI for Vue Signature component](
|
|
15
|
+
* Represents the props of the [Kendo UI for Vue Signature component](slug:overview_signature).
|
|
16
16
|
*/
|
|
17
17
|
export interface SignatureProps extends FormComponentProps {
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Sets the value of the Signature.
|
|
20
20
|
*
|
|
21
21
|
* The value is an image encoded as a [Data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs).
|
|
22
22
|
*/
|
|
23
23
|
value?: string;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Sets the value of the Signature when you use `v-model`.
|
|
26
26
|
*/
|
|
27
27
|
modelValue?: string;
|
|
28
28
|
/**
|
|
29
|
-
* Sets the `tabIndex`
|
|
29
|
+
* Sets the `tabIndex` of the Signature.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* This property is related to accessibility.
|
|
30
33
|
*/
|
|
31
34
|
tabIndex?: number;
|
|
32
35
|
/**
|
|
@@ -34,36 +37,45 @@ export interface SignatureProps extends FormComponentProps {
|
|
|
34
37
|
*/
|
|
35
38
|
id?: string;
|
|
36
39
|
/**
|
|
37
|
-
*
|
|
40
|
+
* Sets the `dir` HTML attribute of the Signature.
|
|
38
41
|
*/
|
|
39
42
|
dir?: string;
|
|
40
43
|
/**
|
|
41
|
-
*
|
|
44
|
+
* Sets the `name` of the Signature input.
|
|
42
45
|
*/
|
|
43
46
|
name?: string;
|
|
44
47
|
/**
|
|
45
|
-
*
|
|
46
|
-
* For example these elements
|
|
48
|
+
* Sets the IDs of the elements that describe the Signature, like the [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-describedby).
|
|
49
|
+
* For example, these elements can contain an error or a hint message.
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
* This property is related to accessibility.
|
|
47
53
|
*/
|
|
48
54
|
ariaDescribedBy?: string;
|
|
49
55
|
/**
|
|
50
|
-
*
|
|
56
|
+
* Sets the IDs of the elements that label the Signature.
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* This property is related to accessibility.
|
|
51
60
|
*/
|
|
52
61
|
ariaLabelledBy?: string;
|
|
53
62
|
/**
|
|
54
|
-
*
|
|
63
|
+
* Sets the accessible label of the Signature.
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* This property is related to accessibility.
|
|
55
67
|
*/
|
|
56
68
|
ariaLabel?: string;
|
|
57
69
|
/**
|
|
58
|
-
*
|
|
70
|
+
* Sets whether the Signature is read-only.
|
|
59
71
|
*/
|
|
60
72
|
readOnly?: boolean;
|
|
61
73
|
/**
|
|
62
|
-
*
|
|
74
|
+
* Sets whether the Signature is disabled.
|
|
63
75
|
*/
|
|
64
76
|
disabled?: boolean;
|
|
65
77
|
/**
|
|
66
|
-
*
|
|
78
|
+
* Sets the `size` of the Signature.
|
|
67
79
|
*
|
|
68
80
|
* The available options are:
|
|
69
81
|
* - small
|
|
@@ -74,19 +86,20 @@ export interface SignatureProps extends FormComponentProps {
|
|
|
74
86
|
*/
|
|
75
87
|
size?: 'small' | 'medium' | 'large';
|
|
76
88
|
/**
|
|
77
|
-
*
|
|
89
|
+
* Sets the border radius of the Signature.
|
|
78
90
|
*
|
|
79
91
|
* The available options are:
|
|
80
92
|
* - none
|
|
81
93
|
* - small
|
|
82
94
|
* - medium
|
|
83
95
|
* - large
|
|
96
|
+
* - full
|
|
84
97
|
*
|
|
85
98
|
* @default undefined
|
|
86
99
|
*/
|
|
87
100
|
rounded?: 'none' | 'small' | 'medium' | 'large' | 'full';
|
|
88
101
|
/**
|
|
89
|
-
*
|
|
102
|
+
* Sets the `fillMode` of the Signature. The fill mode controls the background and the border.
|
|
90
103
|
*
|
|
91
104
|
* The available options are:
|
|
92
105
|
* - solid
|
|
@@ -97,101 +110,105 @@ export interface SignatureProps extends FormComponentProps {
|
|
|
97
110
|
*/
|
|
98
111
|
fillMode?: 'solid' | 'flat' | 'outline';
|
|
99
112
|
/**
|
|
100
|
-
*
|
|
113
|
+
* Sets the stroke color of the signature.
|
|
101
114
|
*
|
|
102
115
|
* Accepts CSS color names and hex values.
|
|
103
116
|
*
|
|
104
|
-
*
|
|
117
|
+
* When you do not set it, the theme `$kendo-input-text` variable sets the color.
|
|
105
118
|
*/
|
|
106
119
|
color?: string;
|
|
107
120
|
/**
|
|
108
|
-
*
|
|
121
|
+
* Sets the background color of the signature.
|
|
109
122
|
*
|
|
110
123
|
* Accepts CSS color names and hex values.
|
|
111
124
|
*
|
|
112
|
-
*
|
|
125
|
+
* When you do not set it, the theme `$kendo-input-bg` variable sets the color.
|
|
113
126
|
*/
|
|
114
127
|
backgroundColor?: string;
|
|
115
128
|
/**
|
|
116
|
-
*
|
|
129
|
+
* Sets the stroke width of the signature.
|
|
117
130
|
*
|
|
118
131
|
* @default 1
|
|
119
132
|
*/
|
|
120
133
|
strokeWidth?: number;
|
|
121
134
|
/**
|
|
122
|
-
*
|
|
135
|
+
* Sets whether the Signature smooths out the signature lines.
|
|
123
136
|
*
|
|
124
137
|
* @default false
|
|
125
138
|
*/
|
|
126
139
|
smooth?: boolean;
|
|
127
140
|
/**
|
|
128
|
-
*
|
|
141
|
+
* Sets whether the user can maximize the Signature.
|
|
129
142
|
*
|
|
130
143
|
* @default true
|
|
131
144
|
*/
|
|
132
145
|
maximizable?: boolean;
|
|
133
146
|
/**
|
|
134
|
-
* Sets the open
|
|
147
|
+
* Sets whether the Signature popup is open. Use it to control the popup state.
|
|
135
148
|
*/
|
|
136
149
|
open?: boolean;
|
|
137
150
|
/**
|
|
138
|
-
*
|
|
151
|
+
* Sets the scale factor for the popup.
|
|
139
152
|
*
|
|
140
|
-
* The Signature width and height
|
|
153
|
+
* The Signature multiplies its width and height by this scale when it shows the popup.
|
|
141
154
|
*
|
|
142
155
|
* @default 3
|
|
143
156
|
*/
|
|
144
157
|
popupScale?: number;
|
|
145
158
|
/**
|
|
146
|
-
*
|
|
159
|
+
* Sets the scale factor for the exported image.
|
|
147
160
|
*
|
|
148
|
-
* The Signature width and height
|
|
161
|
+
* The Signature multiplies its width and height by this scale when it converts the signature to an image.
|
|
149
162
|
*
|
|
150
163
|
* @default 2
|
|
151
164
|
*/
|
|
152
165
|
exportScale?: number;
|
|
153
166
|
/**
|
|
154
|
-
*
|
|
167
|
+
* Hides the dotted line in the background when you set it to `true`.
|
|
155
168
|
*
|
|
156
169
|
* @default false
|
|
157
170
|
*/
|
|
158
171
|
hideLine?: boolean;
|
|
159
172
|
/**
|
|
160
|
-
*
|
|
173
|
+
* Sets the `style` HTML attribute of the input element.
|
|
161
174
|
*/
|
|
162
175
|
inputStyle?: object;
|
|
163
176
|
/**
|
|
164
|
-
*
|
|
177
|
+
* Fires each time the user changes the value. The event name is `change`.
|
|
165
178
|
*/
|
|
166
179
|
onChange?: (event: SignatureChangeEvent) => void;
|
|
167
180
|
/**
|
|
168
|
-
*
|
|
181
|
+
* Fires when the Signature gets the focus. The event name is `focus`.
|
|
169
182
|
*/
|
|
170
183
|
onFocus?: (event: SignatureFocusEvent) => void;
|
|
171
184
|
/**
|
|
172
|
-
*
|
|
185
|
+
* Fires when the Signature loses the focus. The event name is `blur`.
|
|
173
186
|
*/
|
|
174
187
|
onBlur?: (event: SignatureBlurEvent) => void;
|
|
175
188
|
/**
|
|
176
|
-
*
|
|
189
|
+
* Fires when the Signature popup opens. The event name is `open`.
|
|
177
190
|
*/
|
|
178
191
|
onOpen?: (event: SignatureOpenEvent) => void;
|
|
179
192
|
/**
|
|
180
|
-
*
|
|
193
|
+
* Fires when the Signature popup closes. The event name is `close`.
|
|
181
194
|
*/
|
|
182
195
|
onClose?: (event: SignatureCloseEvent) => void;
|
|
183
196
|
/** @hidden */
|
|
184
197
|
maximized?: boolean;
|
|
185
198
|
/**
|
|
186
|
-
*
|
|
199
|
+
* Sets the validation message of the Signature.
|
|
187
200
|
*/
|
|
188
201
|
validationMessage?: string;
|
|
189
202
|
/**
|
|
190
|
-
*
|
|
203
|
+
* Sets whether the Signature shows the validity styles.
|
|
204
|
+
*
|
|
205
|
+
* @default true
|
|
191
206
|
*/
|
|
192
207
|
validityStyles?: boolean;
|
|
193
208
|
/**
|
|
194
|
-
*
|
|
209
|
+
* Sets whether the Signature requires a value.
|
|
210
|
+
*
|
|
211
|
+
* @default false
|
|
195
212
|
*/
|
|
196
213
|
required?: boolean;
|
|
197
214
|
}
|
package/slider/Slider.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { PropType } from 'vue';
|
|
|
10
10
|
import { SliderFocusEvent } from './interfaces/SliderFocusEvent';
|
|
11
11
|
import { SliderBlurEvent } from './interfaces/SliderBlurEvent';
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Represents the arguments of the `change` event of the Slider.
|
|
14
14
|
*/
|
|
15
15
|
export interface SliderChangeEvent {
|
|
16
16
|
/**
|
|
@@ -18,16 +18,16 @@ export interface SliderChangeEvent {
|
|
|
18
18
|
*/
|
|
19
19
|
value: number;
|
|
20
20
|
/**
|
|
21
|
-
* The native event.
|
|
21
|
+
* The native DOM event.
|
|
22
22
|
*/
|
|
23
23
|
event: any;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* Represents the props of the [Kendo UI for Vue Slider component](
|
|
26
|
+
* Represents the props of the [Kendo UI for Vue Slider component](slug:overview_slider).
|
|
27
27
|
*/
|
|
28
28
|
export interface SliderProps extends FormComponentProps {
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Sets the value of the Slider. Use it to control the value.
|
|
31
31
|
*/
|
|
32
32
|
value?: number;
|
|
33
33
|
/**
|
|
@@ -35,68 +35,89 @@ export interface SliderProps extends FormComponentProps {
|
|
|
35
35
|
*/
|
|
36
36
|
modelValue?: number;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* Sets the initial value of the Slider when you do not set `value`.
|
|
39
39
|
*/
|
|
40
40
|
defaultValue?: number;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Sets the minimum value of the Slider.
|
|
43
43
|
*/
|
|
44
44
|
min: number;
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* Sets the maximum value of the Slider.
|
|
47
47
|
*/
|
|
48
48
|
max: number;
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
50
|
+
* Sets the step by which the value increases or decreases.
|
|
51
51
|
*/
|
|
52
52
|
step?: number;
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* Fires each time the user changes the value. The event name is `change`.
|
|
55
55
|
*/
|
|
56
56
|
onChange?: (event: SliderChangeEvent) => void;
|
|
57
57
|
/**
|
|
58
|
-
* Renders the arrow side buttons of the Slider
|
|
58
|
+
* Renders the arrow side buttons of the Slider when you set it to `true`.
|
|
59
59
|
*/
|
|
60
60
|
buttons?: boolean;
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* Sets the [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)
|
|
63
63
|
* of the Slider.
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* This property is related to accessibility.
|
|
64
67
|
*/
|
|
65
68
|
tabIndex?: number;
|
|
66
69
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
70
|
+
* Sets whether the Slider is disabled.
|
|
69
71
|
*/
|
|
70
72
|
disabled?: boolean;
|
|
71
73
|
/**
|
|
72
|
-
*
|
|
73
|
-
* ([see example](
|
|
74
|
+
* Changes the orientation of the Slider from horizontal to vertical when you set it to `true`
|
|
75
|
+
* ([see example](slug:orientation_slider)).
|
|
74
76
|
*/
|
|
75
77
|
vertical?: boolean;
|
|
76
78
|
/**
|
|
77
|
-
*
|
|
79
|
+
* Sets the `id` of the wrapping element of the Slider.
|
|
78
80
|
*/
|
|
79
81
|
id?: string;
|
|
80
82
|
/**
|
|
81
|
-
*
|
|
82
|
-
* For example these elements
|
|
83
|
+
* Sets the IDs of the elements that describe the Slider, like the [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-describedby).
|
|
84
|
+
* For example, these elements can contain an error or a hint message.
|
|
85
|
+
*
|
|
86
|
+
* @remarks
|
|
87
|
+
* This property is related to accessibility.
|
|
83
88
|
*/
|
|
84
89
|
ariaDescribedBy?: string;
|
|
85
90
|
/**
|
|
86
|
-
*
|
|
91
|
+
* Sets the IDs of the elements that label the Slider.
|
|
92
|
+
*
|
|
93
|
+
* @remarks
|
|
94
|
+
* This property is related to accessibility.
|
|
87
95
|
*/
|
|
88
96
|
ariaLabelledBy?: string;
|
|
89
97
|
/**
|
|
90
|
-
*
|
|
98
|
+
* Sets the `dir` HTML attribute of the Slider.
|
|
91
99
|
*/
|
|
92
100
|
dir?: string;
|
|
93
101
|
/**
|
|
94
|
-
*
|
|
102
|
+
* Sets the `aria-label` attribute of the Slider.
|
|
103
|
+
*
|
|
104
|
+
* @remarks
|
|
105
|
+
* This property is related to accessibility.
|
|
95
106
|
*/
|
|
96
107
|
ariaLabel?: string;
|
|
97
108
|
}
|
|
98
109
|
/**
|
|
99
|
-
*
|
|
110
|
+
* Represents the [Kendo UI for Vue Slider component](slug:overview_slider).
|
|
111
|
+
* Accepts properties of type [SliderProps](slug:api_inputs_sliderprops).
|
|
112
|
+
* Use the Slider to let the user select a number from a range by dragging a handle.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```vue
|
|
116
|
+
* <Slider :min="0" :max="100" :step="10" :default-value="40" :buttons="true" />
|
|
117
|
+
* ```
|
|
118
|
+
*
|
|
119
|
+
* @remarks
|
|
120
|
+
* Supported children components are: {@link SliderLabel}.
|
|
100
121
|
*/
|
|
101
122
|
declare const Slider: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
102
123
|
modelValue: {
|
|
@@ -138,6 +159,9 @@ declare const Slider: import('vue').DefineComponent<import('vue').ExtractPropTyp
|
|
|
138
159
|
computedValue(): number;
|
|
139
160
|
sliderTrack(): any;
|
|
140
161
|
}, {
|
|
162
|
+
/**
|
|
163
|
+
* Moves the focus to the Slider.
|
|
164
|
+
*/
|
|
141
165
|
focus(): void;
|
|
142
166
|
isLabel(target: any): boolean;
|
|
143
167
|
onFocus(event: any): void;
|
package/slider/Slider.mjs
CHANGED
package/slider/SliderLabel.d.ts
CHANGED
|
@@ -14,15 +14,16 @@ export declare const SLIDER_LABEL_ATTRIBUTE = "data-slider-label";
|
|
|
14
14
|
*/
|
|
15
15
|
export interface SliderLabelProps {
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Sets the value at which the SliderLabel appears on the Slider or RangeSlider track.
|
|
18
|
+
* Use a value between the `min` and `max` of the parent component.
|
|
18
19
|
*/
|
|
19
20
|
position: number;
|
|
20
21
|
/**
|
|
21
|
-
*
|
|
22
|
+
* Fires when the user clicks the SliderLabel. The event name is `click`.
|
|
22
23
|
*/
|
|
23
24
|
onClick?: (event: any) => void;
|
|
24
25
|
/**
|
|
25
|
-
*
|
|
26
|
+
* Sets the `title` HTML attribute of the SliderLabel.
|
|
26
27
|
*/
|
|
27
28
|
title?: string;
|
|
28
29
|
/**
|
|
@@ -31,9 +32,14 @@ export interface SliderLabelProps {
|
|
|
31
32
|
vertical?: boolean;
|
|
32
33
|
}
|
|
33
34
|
/**
|
|
34
|
-
* Represents the Kendo UI for Vue SliderLabel component.
|
|
35
|
-
*
|
|
36
|
-
*
|
|
35
|
+
* Represents the [Kendo UI for Vue SliderLabel component](slug:labels_slider).
|
|
36
|
+
* Accepts properties of type [SliderLabelProps](slug:api_inputs_sliderlabelprops).
|
|
37
|
+
* Use the SliderLabel inside a Slider or a RangeSlider to show a label at a specific value on the track.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```vue
|
|
41
|
+
* <SliderLabel :position="50" :title="'Middle'">50</SliderLabel>
|
|
42
|
+
* ```
|
|
37
43
|
*/
|
|
38
44
|
declare const SliderLabel: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
39
45
|
position: NumberConstructor;
|
package/switch/Switch.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ToggleBaseProps } from '../interfaces/ToggleBaseProps';
|
|
|
10
10
|
import { SwitchFocusEvent } from './interfaces/SwitchFocusEvent';
|
|
11
11
|
import { SwitchBlurEvent } from './interfaces/SwitchBlurEvent';
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Represents the arguments of the `change` event of the Switch.
|
|
14
14
|
*/
|
|
15
15
|
export interface SwitchChangeEvent {
|
|
16
16
|
/**
|
|
@@ -19,19 +19,22 @@ export interface SwitchChangeEvent {
|
|
|
19
19
|
value: boolean;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Represents the props of the [Kendo UI for Vue Switch component](
|
|
22
|
+
* Represents the props of the [Kendo UI for Vue Switch component](slug:overview_switch).
|
|
23
23
|
*/
|
|
24
24
|
export interface SwitchProps extends ToggleBaseProps, FormComponentProps {
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Sets the `name` of the Switch.
|
|
27
27
|
*/
|
|
28
28
|
name?: string;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Sets the `accessKey` of the Switch.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* This property is related to accessibility.
|
|
31
34
|
*/
|
|
32
35
|
accessKey?: string;
|
|
33
36
|
/**
|
|
34
|
-
* Sets the current value of the Switch ([see example](
|
|
37
|
+
* Sets the current value of the Switch ([see example](slug:controlled_switch)).
|
|
35
38
|
*/
|
|
36
39
|
checked?: boolean;
|
|
37
40
|
/**
|
|
@@ -39,7 +42,9 @@ export interface SwitchProps extends ToggleBaseProps, FormComponentProps {
|
|
|
39
42
|
*/
|
|
40
43
|
className?: string;
|
|
41
44
|
/**
|
|
42
|
-
* Sets the value of the Switch
|
|
45
|
+
* Sets the initial value of the Switch ([see example](slug:default_state)).
|
|
46
|
+
*
|
|
47
|
+
* @default false
|
|
43
48
|
*/
|
|
44
49
|
defaultChecked?: boolean;
|
|
45
50
|
/**
|
|
@@ -47,11 +52,13 @@ export interface SwitchProps extends ToggleBaseProps, FormComponentProps {
|
|
|
47
52
|
*/
|
|
48
53
|
defaultValue?: any;
|
|
49
54
|
/**
|
|
50
|
-
* Disables the Switch when set to `true` ([see example](
|
|
55
|
+
* Disables the Switch when you set it to `true` ([see example](slug:disabled_switch)).
|
|
56
|
+
*
|
|
57
|
+
* @default false
|
|
51
58
|
*/
|
|
52
59
|
disabled?: boolean;
|
|
53
60
|
/**
|
|
54
|
-
* Sets the `dir`
|
|
61
|
+
* Sets the `dir` attribute of the wrapping element of the Switch.
|
|
55
62
|
*/
|
|
56
63
|
dir?: string;
|
|
57
64
|
/**
|
|
@@ -59,7 +66,7 @@ export interface SwitchProps extends ToggleBaseProps, FormComponentProps {
|
|
|
59
66
|
*/
|
|
60
67
|
id?: string;
|
|
61
68
|
/**
|
|
62
|
-
*
|
|
69
|
+
* Sets the size of the Switch.
|
|
63
70
|
*
|
|
64
71
|
* The available options are:
|
|
65
72
|
* - small
|
|
@@ -70,7 +77,7 @@ export interface SwitchProps extends ToggleBaseProps, FormComponentProps {
|
|
|
70
77
|
*/
|
|
71
78
|
size?: 'small' | 'medium' | 'large';
|
|
72
79
|
/**
|
|
73
|
-
*
|
|
80
|
+
* Sets the border radius of the Switch track.
|
|
74
81
|
*
|
|
75
82
|
* The available options are:
|
|
76
83
|
* - none
|
|
@@ -83,7 +90,7 @@ export interface SwitchProps extends ToggleBaseProps, FormComponentProps {
|
|
|
83
90
|
*/
|
|
84
91
|
trackRounded?: 'none' | 'small' | 'medium' | 'large' | 'full';
|
|
85
92
|
/**
|
|
86
|
-
*
|
|
93
|
+
* Sets the border radius of the Switch thumb.
|
|
87
94
|
*
|
|
88
95
|
* The available options are:
|
|
89
96
|
* - none
|
|
@@ -96,47 +103,69 @@ export interface SwitchProps extends ToggleBaseProps, FormComponentProps {
|
|
|
96
103
|
*/
|
|
97
104
|
thumbRounded?: 'none' | 'small' | 'medium' | 'large' | 'full';
|
|
98
105
|
/**
|
|
99
|
-
*
|
|
100
|
-
* For example these elements
|
|
106
|
+
* Sets the IDs of the elements that describe the Switch, like the [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-describedby).
|
|
107
|
+
* For example, these elements can contain an error or a hint message.
|
|
108
|
+
*
|
|
109
|
+
* @remarks
|
|
110
|
+
* This property is related to accessibility.
|
|
101
111
|
*/
|
|
102
112
|
ariaDescribedBy?: string;
|
|
103
113
|
/**
|
|
104
|
-
*
|
|
114
|
+
* Sets the IDs of the elements that label the Switch.
|
|
115
|
+
*
|
|
116
|
+
* @remarks
|
|
117
|
+
* This property is related to accessibility.
|
|
105
118
|
*/
|
|
106
119
|
ariaLabelledBy?: string;
|
|
107
120
|
/**
|
|
108
|
-
*
|
|
121
|
+
* Sets the text of the **Off** label ([see example](slug:labels_switch)).
|
|
122
|
+
*
|
|
123
|
+
* @default 'OFF'
|
|
109
124
|
*/
|
|
110
125
|
offLabel?: string;
|
|
111
126
|
/**
|
|
112
|
-
* Fires each time the Switch
|
|
127
|
+
* Fires each time the Switch loses the focus. The event name is `blur`.
|
|
113
128
|
*/
|
|
114
129
|
onBlur?: (event: any) => void;
|
|
115
130
|
/**
|
|
116
|
-
* Fires each time the user
|
|
131
|
+
* Fires each time the user changes the value ([see example](slug:controlled_switch)). The event name is `change`.
|
|
117
132
|
*/
|
|
118
133
|
onChange?: (event: SwitchChangeEvent) => void;
|
|
119
134
|
/**
|
|
120
|
-
* Fires each time the Switch
|
|
135
|
+
* Fires each time the Switch gets the focus. The event name is `focus`.
|
|
121
136
|
*/
|
|
122
137
|
onFocus?: (event: any) => void;
|
|
123
138
|
/**
|
|
124
|
-
*
|
|
139
|
+
* Sets the text of the **On** label ([see example](slug:labels_switch)).
|
|
140
|
+
*
|
|
141
|
+
* @default 'ON'
|
|
125
142
|
*/
|
|
126
143
|
onLabel?: string;
|
|
127
144
|
/**
|
|
128
|
-
*
|
|
145
|
+
* Sets the [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the Switch.
|
|
146
|
+
*
|
|
147
|
+
* @remarks
|
|
148
|
+
* This property is related to accessibility.
|
|
129
149
|
*/
|
|
130
150
|
tabIndex?: number;
|
|
131
151
|
/**
|
|
132
|
-
* Sets the value of the Switch.
|
|
152
|
+
* Sets the value of the Switch. The value can be a primitive (`string`, `number`, `boolean`) or a complex (`array`) type.
|
|
133
153
|
*/
|
|
134
154
|
value?: string | number | string[] | boolean | null;
|
|
155
|
+
/**
|
|
156
|
+
* Sets the value of the Switch when you use `v-model`.
|
|
157
|
+
*/
|
|
135
158
|
modelValue?: string | number | string[] | boolean | null;
|
|
136
159
|
}
|
|
137
160
|
/**
|
|
138
|
-
* Represents the [Kendo UI for Vue Switch component](
|
|
139
|
-
* Accepts properties of type [SwitchProps](
|
|
161
|
+
* Represents the [Kendo UI for Vue Switch component](slug:overview_switch).
|
|
162
|
+
* Accepts properties of type [SwitchProps](slug:api_inputs_switchprops).
|
|
163
|
+
* Use the Switch to let the user turn a setting on or off.
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* ```vue
|
|
167
|
+
* <Switch :default-checked="true" :on-label="'Yes'" :off-label="'No'" />
|
|
168
|
+
* ```
|
|
140
169
|
*/
|
|
141
170
|
declare const Switch: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
142
171
|
name: StringConstructor;
|
|
@@ -222,6 +251,9 @@ declare const Switch: import('vue').DefineComponent<import('vue').ExtractPropTyp
|
|
|
222
251
|
'k-switch-thumb': boolean;
|
|
223
252
|
};
|
|
224
253
|
}, {
|
|
254
|
+
/**
|
|
255
|
+
* Moves the focus to the Switch.
|
|
256
|
+
*/
|
|
225
257
|
focus(): void;
|
|
226
258
|
element(): HTMLSpanElement | null;
|
|
227
259
|
validity(): FormComponentValidity;
|