@progress/kendo-react-inputs 7.2.4-develop.3 → 7.3.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.js +8 -0
- package/checkbox/Checkbox.mjs +214 -0
- package/colors/ColorContrastLabels.js +8 -0
- package/colors/ColorContrastLabels.mjs +24 -0
- package/colors/ColorContrastSvg.js +8 -0
- package/colors/ColorContrastSvg.mjs +52 -0
- package/colors/ColorGradient.js +8 -0
- package/colors/ColorGradient.mjs +293 -0
- package/colors/ColorInput.js +8 -0
- package/colors/ColorInput.mjs +122 -0
- package/colors/ColorPalette.js +8 -0
- package/colors/ColorPalette.mjs +191 -0
- package/colors/ColorPicker.js +8 -0
- package/colors/ColorPicker.mjs +253 -0
- package/colors/FlatColorPicker.js +8 -0
- package/colors/FlatColorPicker.mjs +216 -0
- package/colors/HexInput.js +8 -0
- package/colors/HexInput.mjs +39 -0
- package/colors/Picker.js +8 -0
- package/colors/Picker.mjs +42 -0
- package/colors/models/palette-presets.js +8 -0
- package/colors/models/palette-presets.mjs +61 -0
- package/colors/utils/color-cache.js +8 -0
- package/colors/utils/color-cache.mjs +51 -0
- package/colors/utils/color-palette.service.js +8 -0
- package/colors/utils/color-palette.service.mjs +50 -0
- package/colors/utils/color-parser.js +8 -0
- package/colors/utils/color-parser.mjs +61 -0
- package/colors/utils/misc.js +8 -0
- package/colors/utils/misc.mjs +13 -0
- package/colors/utils/svg-calc.js +8 -0
- package/colors/utils/svg-calc.mjs +36 -0
- package/dist/cdn/js/kendo-react-inputs.js +8 -21
- package/index.d.mts +4275 -5
- package/index.d.ts +4275 -75
- package/index.js +8 -21
- package/index.mjs +97 -5042
- package/input/Input.js +8 -0
- package/input/Input.mjs +185 -0
- package/input/InputClearValue.js +8 -0
- package/input/InputClearValue.mjs +24 -0
- package/input/InputPrefix.js +8 -0
- package/input/InputPrefix.mjs +24 -0
- package/input/InputSeparator.js +8 -0
- package/input/InputSeparator.mjs +24 -0
- package/input/InputSuffix.js +8 -0
- package/input/InputSuffix.mjs +24 -0
- package/input/InputValidationIcon.js +8 -0
- package/input/InputValidationIcon.mjs +15 -0
- package/maskedtextbox/MaskedTextBox.js +8 -0
- package/maskedtextbox/MaskedTextBox.mjs +322 -0
- package/maskedtextbox/masking.service.js +8 -0
- package/maskedtextbox/masking.service.mjs +121 -0
- package/maskedtextbox/parsing/combinators.js +8 -0
- package/maskedtextbox/parsing/combinators.mjs +20 -0
- package/maskedtextbox/parsing/parsers.js +8 -0
- package/maskedtextbox/parsing/parsers.mjs +80 -0
- package/maskedtextbox/parsing/result.js +8 -0
- package/maskedtextbox/parsing/result.mjs +35 -0
- package/maskedtextbox/parsing/stream.js +8 -0
- package/maskedtextbox/parsing/stream.mjs +41 -0
- package/maskedtextbox/utils.js +8 -0
- package/maskedtextbox/utils.mjs +43 -0
- package/messages/index.js +8 -0
- package/messages/index.mjs +77 -0
- package/numerictextbox/NumericTextBox.js +8 -0
- package/numerictextbox/NumericTextBox.mjs +415 -0
- package/numerictextbox/utils/index.js +8 -0
- package/numerictextbox/utils/index.mjs +218 -0
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +19 -0
- package/package.json +8 -8
- package/radiobutton/RadioButton.js +8 -0
- package/radiobutton/RadioButton.mjs +138 -0
- package/radiobutton/RadioGroup.js +8 -0
- package/radiobutton/RadioGroup.mjs +135 -0
- package/range-slider/RangeSlider.js +20 -0
- package/range-slider/RangeSlider.mjs +337 -0
- package/range-slider/range-raducer.js +8 -0
- package/range-slider/range-raducer.mjs +90 -0
- package/rating/Rating.js +12 -0
- package/rating/Rating.mjs +323 -0
- package/rating/RatingItem.js +8 -0
- package/rating/RatingItem.mjs +144 -0
- package/rating/rating-reducer.js +8 -0
- package/rating/rating-reducer.mjs +34 -0
- package/rating/utils/index.js +8 -0
- package/rating/utils/index.mjs +28 -0
- package/signature/Signature.js +8 -0
- package/signature/Signature.mjs +335 -0
- package/signature/utils/index.js +8 -0
- package/signature/utils/index.mjs +17 -0
- package/slider/Slider.js +8 -0
- package/slider/Slider.mjs +223 -0
- package/slider/SliderLabel.js +8 -0
- package/slider/SliderLabel.mjs +39 -0
- package/switch/Switch.js +8 -0
- package/switch/Switch.mjs +228 -0
- package/textarea/TextArea.js +8 -0
- package/textarea/TextArea.mjs +196 -0
- package/textbox/Textbox.js +8 -0
- package/textbox/Textbox.mjs +125 -0
- package/checkbox/Checkbox.d.ts +0 -36
- package/checkbox/interfaces/CheckboxBlurEvent.d.ts +0 -11
- package/checkbox/interfaces/CheckboxChangeEvent.d.ts +0 -15
- package/checkbox/interfaces/CheckboxFocusEvent.d.ts +0 -11
- package/checkbox/interfaces/CheckboxProps.d.ts +0 -126
- package/colors/ColorContrastLabels.d.ts +0 -19
- package/colors/ColorContrastSvg.d.ts +0 -22
- package/colors/ColorGradient.d.ts +0 -191
- package/colors/ColorInput.d.ts +0 -34
- package/colors/ColorPalette.d.ts +0 -127
- package/colors/ColorPicker.d.ts +0 -34
- package/colors/FlatColorPicker.d.ts +0 -139
- package/colors/HexInput.d.ts +0 -33
- package/colors/Picker.d.ts +0 -10
- package/colors/interfaces/ColorGradientChangeEvent.d.ts +0 -15
- package/colors/interfaces/ColorGradientProps.d.ts +0 -101
- package/colors/interfaces/ColorPaletteChangeEvent.d.ts +0 -19
- package/colors/interfaces/ColorPaletteProps.d.ts +0 -87
- package/colors/interfaces/ColorPickerActiveColorClick.d.ts +0 -21
- package/colors/interfaces/ColorPickerBlurEvent.d.ts +0 -17
- package/colors/interfaces/ColorPickerChangeEvent.d.ts +0 -21
- package/colors/interfaces/ColorPickerFocusEvent.d.ts +0 -17
- package/colors/interfaces/ColorPickerGradientSettings.d.ts +0 -22
- package/colors/interfaces/ColorPickerPaletteSettings.d.ts +0 -36
- package/colors/interfaces/ColorPickerPopupSettings.d.ts +0 -18
- package/colors/interfaces/ColorPickerProps.d.ts +0 -165
- package/colors/interfaces/ColorPickerView.d.ts +0 -14
- package/colors/interfaces/PickerPopupSettings.d.ts +0 -22
- package/colors/interfaces/PickerProps.d.ts +0 -46
- package/colors/models/hsva.d.ts +0 -13
- package/colors/models/output-format.d.ts +0 -8
- package/colors/models/palette-presets.d.ts +0 -57
- package/colors/models/rgb.d.ts +0 -12
- package/colors/models/rgba.d.ts +0 -13
- package/colors/models/table-cell.d.ts +0 -11
- package/colors/models/tile-size.d.ts +0 -15
- package/colors/utils/color-cache.d.ts +0 -34
- package/colors/utils/color-palette.service.d.ts +0 -16
- package/colors/utils/color-parser.d.ts +0 -69
- package/colors/utils/misc.d.ts +0 -19
- package/colors/utils/svg-calc.d.ts +0 -66
- package/input/Input.d.ts +0 -171
- package/input/InputClearValue.d.ts +0 -19
- package/input/InputPrefix.d.ts +0 -29
- package/input/InputSeparator.d.ts +0 -29
- package/input/InputSuffix.d.ts +0 -29
- package/input/InputValidationIcon.d.ts +0 -18
- package/input/interfaces/InputChangeEvent.d.ts +0 -15
- package/interfaces/Direction.d.ts +0 -5
- package/interfaces/ToggleBaseProps.d.ts +0 -12
- package/maskedtextbox/MaskedTextBox.d.ts +0 -238
- package/maskedtextbox/MaskedTextBoxProps.d.ts +0 -200
- package/maskedtextbox/masking.service.d.ts +0 -45
- package/maskedtextbox/parsing/combinators.d.ts +0 -13
- package/maskedtextbox/parsing/parsers.d.ts +0 -51
- package/maskedtextbox/parsing/result.d.ts +0 -27
- package/maskedtextbox/parsing/stream.d.ts +0 -26
- package/maskedtextbox/utils.d.ts +0 -20
- package/messages/index.d.ts +0 -169
- package/numerictextbox/NumericTextBox.d.ts +0 -18
- package/numerictextbox/interfaces/NumericTextBoxBlurEvent.d.ts +0 -11
- package/numerictextbox/interfaces/NumericTextBoxChangeEvent.d.ts +0 -15
- package/numerictextbox/interfaces/NumericTextBoxFocusEvent.d.ts +0 -11
- package/numerictextbox/interfaces/NumericTextBoxHandle.d.ts +0 -43
- package/numerictextbox/interfaces/NumericTextBoxProps.d.ts +0 -188
- package/numerictextbox/interfaces/NumericTextBoxState.d.ts +0 -19
- package/numerictextbox/utils/index.d.ts +0 -123
- package/package-metadata.d.ts +0 -9
- package/radiobutton/RadioButton.d.ts +0 -27
- package/radiobutton/RadioGroup.d.ts +0 -27
- package/radiobutton/interfaces/RadioButtonBlurEvent.d.ts +0 -11
- package/radiobutton/interfaces/RadioButtonChangeEvent.d.ts +0 -15
- package/radiobutton/interfaces/RadioButtonFocusEvent.d.ts +0 -11
- package/radiobutton/interfaces/RadioButtonProps.d.ts +0 -101
- package/radiobutton/interfaces/RadioGroupChangeEvent.d.ts +0 -15
- package/radiobutton/interfaces/RadioGroupFocusEvent.d.ts +0 -11
- package/radiobutton/interfaces/RadioGroupProps.d.ts +0 -90
- package/range-slider/RangeSlider.d.ts +0 -142
- package/range-slider/range-raducer.d.ts +0 -40
- package/rating/Rating.d.ts +0 -170
- package/rating/RatingItem.d.ts +0 -108
- package/rating/models/index.d.ts +0 -88
- package/rating/rating-reducer.d.ts +0 -36
- package/rating/utils/index.d.ts +0 -28
- package/signature/Signature.d.ts +0 -18
- package/signature/interfaces/SignatureBlurEvent.d.ts +0 -11
- package/signature/interfaces/SignatureChangeEvent.d.ts +0 -15
- package/signature/interfaces/SignatureCloseEvent.d.ts +0 -11
- package/signature/interfaces/SignatureFocusEvent.d.ts +0 -11
- package/signature/interfaces/SignatureHandle.d.ts +0 -46
- package/signature/interfaces/SignatureOpenEvent.d.ts +0 -11
- package/signature/interfaces/SignatureProps.d.ts +0 -198
- package/signature/interfaces/index.d.ts +0 -11
- package/signature/utils/index.d.ts +0 -8
- package/slider/Slider.d.ts +0 -197
- package/slider/SliderLabel.d.ts +0 -38
- package/switch/Switch.d.ts +0 -294
- package/textarea/TextArea.d.ts +0 -40
- package/textarea/interfaces/TextAreaBlurEvent.d.ts +0 -11
- package/textarea/interfaces/TextAreaChangeEvent.d.ts +0 -15
- package/textarea/interfaces/TextAreaFocusEvent.d.ts +0 -11
- package/textarea/interfaces/TextAreaProps.d.ts +0 -140
- package/textbox/Textbox.d.ts +0 -80
package/slider/Slider.d.ts
DELETED
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
|
-
import { FormComponentProps, BaseEvent } from '@progress/kendo-react-common';
|
|
8
|
-
import { Direction } from '../interfaces/Direction';
|
|
9
|
-
/**
|
|
10
|
-
* The arguments for the `onChange` Slider event.
|
|
11
|
-
*/
|
|
12
|
-
export interface SliderChangeEvent extends BaseEvent<Slider> {
|
|
13
|
-
/**
|
|
14
|
-
* The current value of the Slider.
|
|
15
|
-
*/
|
|
16
|
-
value: number;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Represents the props of the [KendoReact Slider component]({% slug overview_slider %}).
|
|
20
|
-
*/
|
|
21
|
-
export interface SliderProps extends FormComponentProps {
|
|
22
|
-
children?: React.ReactNode;
|
|
23
|
-
/**
|
|
24
|
-
* The value of the Slider.
|
|
25
|
-
*/
|
|
26
|
-
value?: number;
|
|
27
|
-
/**
|
|
28
|
-
* The default value of the Slider.
|
|
29
|
-
*/
|
|
30
|
-
defaultValue?: number;
|
|
31
|
-
/**
|
|
32
|
-
* The minimum value of the Slider.
|
|
33
|
-
*/
|
|
34
|
-
min: number;
|
|
35
|
-
/**
|
|
36
|
-
* The maximum value of the Slider.
|
|
37
|
-
*/
|
|
38
|
-
max: number;
|
|
39
|
-
/**
|
|
40
|
-
* Specifies the step of the value increase and decrease.
|
|
41
|
-
*/
|
|
42
|
-
step?: number;
|
|
43
|
-
/**
|
|
44
|
-
* Determines the event handler that will be fired when the user edits the value.
|
|
45
|
-
*/
|
|
46
|
-
onChange?: (event: SliderChangeEvent) => void;
|
|
47
|
-
/**
|
|
48
|
-
* The styles that are applied to the Slider.
|
|
49
|
-
*/
|
|
50
|
-
style?: React.CSSProperties;
|
|
51
|
-
/**
|
|
52
|
-
* Sets additional classes to the Slider.
|
|
53
|
-
*/
|
|
54
|
-
className?: string;
|
|
55
|
-
/**
|
|
56
|
-
* Renders the arrow side buttons of the Slider if set to true.
|
|
57
|
-
*/
|
|
58
|
-
buttons?: boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Specifies the [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)
|
|
61
|
-
* of the Slider.
|
|
62
|
-
*/
|
|
63
|
-
tabIndex?: number;
|
|
64
|
-
/**
|
|
65
|
-
* Determines whether the Slider is disabled.
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* ```jsx
|
|
69
|
-
* class App extends React.Component {
|
|
70
|
-
* render() {
|
|
71
|
-
* return (
|
|
72
|
-
* <Slider disabled={true} min={0} max={10} defaultValue={5} />
|
|
73
|
-
* );
|
|
74
|
-
* }
|
|
75
|
-
* }
|
|
76
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
77
|
-
* ```
|
|
78
|
-
*/
|
|
79
|
-
disabled?: boolean;
|
|
80
|
-
/**
|
|
81
|
-
* If `vertical` is set to `true`, the orientation of the Slider changes from horizontal to vertical
|
|
82
|
-
* ([see example]({% slug orientation_slider %})).
|
|
83
|
-
*/
|
|
84
|
-
vertical?: boolean;
|
|
85
|
-
/**
|
|
86
|
-
* Specifies the id of the component.
|
|
87
|
-
*/
|
|
88
|
-
id?: string;
|
|
89
|
-
/**
|
|
90
|
-
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
91
|
-
* For example these elements could contain error or hint message.
|
|
92
|
-
*/
|
|
93
|
-
ariaDescribedBy?: string;
|
|
94
|
-
/**
|
|
95
|
-
* Identifies the element(s) which will label the component.
|
|
96
|
-
*/
|
|
97
|
-
ariaLabelledBy?: string;
|
|
98
|
-
/**
|
|
99
|
-
* The accessible label of the component.
|
|
100
|
-
*/
|
|
101
|
-
ariaLabel?: string;
|
|
102
|
-
dir?: Direction;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* @hidden
|
|
106
|
-
*/
|
|
107
|
-
interface SliderState {
|
|
108
|
-
value: number;
|
|
109
|
-
focused: boolean;
|
|
110
|
-
dir?: Direction;
|
|
111
|
-
}
|
|
112
|
-
/** @hidden */
|
|
113
|
-
export declare class SliderWithoutContext extends React.Component<SliderProps, SliderState> {
|
|
114
|
-
static displayName: string;
|
|
115
|
-
/**
|
|
116
|
-
* @hidden
|
|
117
|
-
*/
|
|
118
|
-
static propTypes: {
|
|
119
|
-
min: PropTypes.Validator<number>;
|
|
120
|
-
max: PropTypes.Validator<number>;
|
|
121
|
-
value: PropTypes.Requireable<number>;
|
|
122
|
-
vertical: PropTypes.Requireable<boolean>;
|
|
123
|
-
id: PropTypes.Requireable<string>;
|
|
124
|
-
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
125
|
-
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
126
|
-
ariaLabel: PropTypes.Requireable<string>;
|
|
127
|
-
};
|
|
128
|
-
/**
|
|
129
|
-
* @hidden
|
|
130
|
-
*/
|
|
131
|
-
static getDerivedStateFromProps(props: SliderProps, state: SliderState): {
|
|
132
|
-
value: number;
|
|
133
|
-
} | null;
|
|
134
|
-
/**
|
|
135
|
-
* @hidden
|
|
136
|
-
*/
|
|
137
|
-
state: {
|
|
138
|
-
value: number;
|
|
139
|
-
focused: boolean;
|
|
140
|
-
dir: Direction | undefined;
|
|
141
|
-
};
|
|
142
|
-
private _sliderTrack;
|
|
143
|
-
private _element;
|
|
144
|
-
constructor(props: SliderProps);
|
|
145
|
-
/**
|
|
146
|
-
* @hidden
|
|
147
|
-
*/
|
|
148
|
-
componentDidMount(): void;
|
|
149
|
-
/**
|
|
150
|
-
* @hidden
|
|
151
|
-
*/
|
|
152
|
-
buttons: (props: any) => any;
|
|
153
|
-
/**
|
|
154
|
-
* @hidden
|
|
155
|
-
*/
|
|
156
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
157
|
-
/**
|
|
158
|
-
* @hidden
|
|
159
|
-
*/
|
|
160
|
-
focus: () => void;
|
|
161
|
-
/**
|
|
162
|
-
* @hidden
|
|
163
|
-
*/
|
|
164
|
-
get sliderTrack(): HTMLDivElement | null;
|
|
165
|
-
private isLabel;
|
|
166
|
-
private onFocus;
|
|
167
|
-
private onBlur;
|
|
168
|
-
private onKeyDown;
|
|
169
|
-
private decrement;
|
|
170
|
-
private increment;
|
|
171
|
-
private dragStart;
|
|
172
|
-
private dragOver;
|
|
173
|
-
private drag;
|
|
174
|
-
private change;
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Represents the PropsContext of the `Slider` component.
|
|
178
|
-
* Used for global configuration of all `Slider` instances.
|
|
179
|
-
*
|
|
180
|
-
* For more information, refer to the [Inputs Props Context]({% slug props-context_inputs %}) article.
|
|
181
|
-
*/
|
|
182
|
-
export declare const SliderPropsContext: React.Context<(p: SliderProps) => SliderProps>;
|
|
183
|
-
/**
|
|
184
|
-
* Represent the `ref` of the Slider component.
|
|
185
|
-
*/
|
|
186
|
-
export interface SliderHandle extends Pick<SliderWithoutContext, keyof SliderWithoutContext> {
|
|
187
|
-
}
|
|
188
|
-
/** @hidden */
|
|
189
|
-
export type Slider = SliderHandle;
|
|
190
|
-
/**
|
|
191
|
-
* Represents the [KendoReact Slider component]({% slug overview_slider %}).
|
|
192
|
-
*
|
|
193
|
-
* Accepts properties of type [SliderProps]({% slug api_inputs_sliderprops %}).
|
|
194
|
-
* Obtaining the `ref` returns an object of type [SliderHandle]({% slug api_inputs_sliderhandle %}).
|
|
195
|
-
*/
|
|
196
|
-
export declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<any>>;
|
|
197
|
-
export {};
|
package/slider/SliderLabel.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
export declare const SLIDER_LABEL_ATTRIBUTE = "data-slider-label";
|
|
10
|
-
/**
|
|
11
|
-
* Represents the props of the KendoReact SliderLabel component.
|
|
12
|
-
*/
|
|
13
|
-
export interface SliderLabelProps {
|
|
14
|
-
/**
|
|
15
|
-
* The position in relative to the start of the SliderLabel component.
|
|
16
|
-
*/
|
|
17
|
-
position: number;
|
|
18
|
-
/**
|
|
19
|
-
* The onClick event of the SliderLabel component.
|
|
20
|
-
*/
|
|
21
|
-
onClick?: (event: React.MouseEvent<HTMLLIElement>) => void;
|
|
22
|
-
/**
|
|
23
|
-
* The title of the SliderLabel component.
|
|
24
|
-
*/
|
|
25
|
-
title?: string;
|
|
26
|
-
/**
|
|
27
|
-
* @hidden
|
|
28
|
-
*/
|
|
29
|
-
children?: React.ReactNode;
|
|
30
|
-
/**
|
|
31
|
-
* @hidden
|
|
32
|
-
*/
|
|
33
|
-
vertical?: boolean;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Represents the KendoReact SliderLabel component.
|
|
37
|
-
*/
|
|
38
|
-
export declare const SliderLabel: (props: SliderLabelProps) => import("react/jsx-runtime").JSX.Element;
|
package/switch/Switch.d.ts
DELETED
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
|
-
import { BaseEvent } from '@progress/kendo-react-common';
|
|
8
|
-
import { ToggleBaseProps } from '../interfaces/ToggleBaseProps';
|
|
9
|
-
import { FormComponent, FormComponentProps, FormComponentValidity } from '@progress/kendo-react-common';
|
|
10
|
-
/**
|
|
11
|
-
* The arguments for the `onChange` Switch event.
|
|
12
|
-
*/
|
|
13
|
-
export interface SwitchChangeEvent extends BaseEvent<Switch> {
|
|
14
|
-
/**
|
|
15
|
-
* The new value of the Switch.
|
|
16
|
-
*/
|
|
17
|
-
value: boolean;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Represents the props of the [KendoReact Switch component]({% slug overview_switch %}).
|
|
21
|
-
*/
|
|
22
|
-
export interface SwitchProps extends ToggleBaseProps, FormComponentProps {
|
|
23
|
-
/**
|
|
24
|
-
* Specifies the `accessKey` of the Switch.
|
|
25
|
-
*/
|
|
26
|
-
accessKey?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Sets the current value of the Switch ([see example]({% slug controlled_switch %})).
|
|
29
|
-
*/
|
|
30
|
-
checked?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Sets the `className` of the wrapping element of the Switch.
|
|
33
|
-
*/
|
|
34
|
-
className?: string;
|
|
35
|
-
/**
|
|
36
|
-
* Sets the value of the Switch when it is initially displayed ([see example]({% slug default_state %})).
|
|
37
|
-
*/
|
|
38
|
-
defaultChecked?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Sets the default value of the Switch.
|
|
41
|
-
*/
|
|
42
|
-
defaultValue?: any;
|
|
43
|
-
/**
|
|
44
|
-
* Disables the Switch when set to `true` ([see example]({% slug disabled_switch %})).
|
|
45
|
-
*/
|
|
46
|
-
disabled?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Sets the `dir` property of the wrapping element of the Switch.
|
|
49
|
-
*/
|
|
50
|
-
dir?: string;
|
|
51
|
-
/**
|
|
52
|
-
* Sets the `id` of the Switch.
|
|
53
|
-
*/
|
|
54
|
-
id?: string;
|
|
55
|
-
/**
|
|
56
|
-
* Configures the `size` of the Switch.
|
|
57
|
-
*
|
|
58
|
-
* The available options are:
|
|
59
|
-
* - small
|
|
60
|
-
* - medium
|
|
61
|
-
* - large
|
|
62
|
-
* - null—Does not set a size `className`.
|
|
63
|
-
*
|
|
64
|
-
* @default `medium`
|
|
65
|
-
*/
|
|
66
|
-
size?: null | 'small' | 'medium' | 'large';
|
|
67
|
-
/**
|
|
68
|
-
* Configures the `trackRounded` of the Switch.
|
|
69
|
-
*
|
|
70
|
-
* The available options are:
|
|
71
|
-
* - small
|
|
72
|
-
* - medium
|
|
73
|
-
* - large
|
|
74
|
-
* - full
|
|
75
|
-
* - null—Does not set a trackRounded `className`.
|
|
76
|
-
*
|
|
77
|
-
* @default `full`
|
|
78
|
-
*/
|
|
79
|
-
trackRounded?: null | 'small' | 'medium' | 'large' | 'full';
|
|
80
|
-
/**
|
|
81
|
-
* Configures the `thumbRounded` of the Switch.
|
|
82
|
-
*
|
|
83
|
-
* The available options are:
|
|
84
|
-
* - small
|
|
85
|
-
* - medium
|
|
86
|
-
* - large
|
|
87
|
-
* - full
|
|
88
|
-
* - null—Does not set a thumbRounded `className`.
|
|
89
|
-
*
|
|
90
|
-
* @default `full`
|
|
91
|
-
*/
|
|
92
|
-
thumbRounded?: null | 'small' | 'medium' | 'large' | 'full';
|
|
93
|
-
/**
|
|
94
|
-
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
95
|
-
* For example these elements could contain error or hint message.
|
|
96
|
-
*/
|
|
97
|
-
ariaDescribedBy?: string;
|
|
98
|
-
/**
|
|
99
|
-
* Identifies the element(s) which will label the component.
|
|
100
|
-
*/
|
|
101
|
-
ariaLabelledBy?: string;
|
|
102
|
-
/**
|
|
103
|
-
* Changes the **Off** label([see example]({% slug labels_switch %})).
|
|
104
|
-
*/
|
|
105
|
-
offLabel?: string;
|
|
106
|
-
/**
|
|
107
|
-
* Fires each time the Switch gets blurred.
|
|
108
|
-
*/
|
|
109
|
-
onBlur?: (event: React.FocusEvent<HTMLSpanElement>) => void;
|
|
110
|
-
/**
|
|
111
|
-
* Fires each time the user selects a new value ([see example]({% slug controlled_switch %})).
|
|
112
|
-
*/
|
|
113
|
-
onChange?: (event: SwitchChangeEvent) => void;
|
|
114
|
-
/**
|
|
115
|
-
* Fires each time the Switch component gets focused.
|
|
116
|
-
*/
|
|
117
|
-
onFocus?: (event: React.FocusEvent<HTMLSpanElement>) => void;
|
|
118
|
-
/**
|
|
119
|
-
* Changes the **On** label ([see example]({% slug labels_switch %})).
|
|
120
|
-
*/
|
|
121
|
-
onLabel?: string;
|
|
122
|
-
/**
|
|
123
|
-
* Specifies the [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
|
|
124
|
-
*/
|
|
125
|
-
tabIndex?: number;
|
|
126
|
-
/**
|
|
127
|
-
* Sets the value of the Switch. It can either be of the primitive (string, number, boolean) or of the complex (array) type.
|
|
128
|
-
*/
|
|
129
|
-
value?: string | number | string[] | boolean | null;
|
|
130
|
-
/**
|
|
131
|
-
* The accessible label of the component.
|
|
132
|
-
*/
|
|
133
|
-
ariaLabel?: string;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* @hidden
|
|
137
|
-
*/
|
|
138
|
-
export interface SwitchState {
|
|
139
|
-
checked: boolean;
|
|
140
|
-
focused: boolean;
|
|
141
|
-
}
|
|
142
|
-
/** @hidden */
|
|
143
|
-
export declare class SwitchWithoutContext extends React.Component<SwitchProps, SwitchState> implements FormComponent {
|
|
144
|
-
static displayName: string;
|
|
145
|
-
/**
|
|
146
|
-
* Gets the value of the Switch.
|
|
147
|
-
*/
|
|
148
|
-
get value(): boolean;
|
|
149
|
-
get element(): HTMLSpanElement | null;
|
|
150
|
-
get actionElement(): HTMLSpanElement | null;
|
|
151
|
-
/**
|
|
152
|
-
* Gets the `name` property of the Switch.
|
|
153
|
-
*/
|
|
154
|
-
get name(): string | undefined;
|
|
155
|
-
/**
|
|
156
|
-
* Represents the validity state into which the Switch is set.
|
|
157
|
-
*/
|
|
158
|
-
get validity(): FormComponentValidity;
|
|
159
|
-
/**
|
|
160
|
-
* @hidden
|
|
161
|
-
*/
|
|
162
|
-
protected get validityStyles(): boolean;
|
|
163
|
-
/**
|
|
164
|
-
* @hidden
|
|
165
|
-
*/
|
|
166
|
-
protected get required(): boolean;
|
|
167
|
-
/**
|
|
168
|
-
* @hidden
|
|
169
|
-
*/
|
|
170
|
-
protected setValidity: () => void;
|
|
171
|
-
protected limit: (offset: number, drag: HTMLSpanElement, wrapper: HTMLSpanElement) => number;
|
|
172
|
-
protected toggle: (value: boolean, event: any) => void;
|
|
173
|
-
/**
|
|
174
|
-
* @hidden
|
|
175
|
-
*/
|
|
176
|
-
static propTypes: {
|
|
177
|
-
accessKey: PropTypes.Requireable<string>;
|
|
178
|
-
checked: PropTypes.Requireable<boolean>;
|
|
179
|
-
className: PropTypes.Requireable<string>;
|
|
180
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
181
|
-
defaultChecked: PropTypes.Requireable<boolean>;
|
|
182
|
-
size: PropTypes.Requireable<"small" | "medium" | "large" | null | undefined>;
|
|
183
|
-
trackRounded: PropTypes.Requireable<"small" | "medium" | "large" | "full" | null | undefined>;
|
|
184
|
-
thumbRounded: PropTypes.Requireable<"small" | "medium" | "large" | "full" | null | undefined>;
|
|
185
|
-
dir: PropTypes.Requireable<string>;
|
|
186
|
-
id: PropTypes.Requireable<string>;
|
|
187
|
-
ariaLabelledBy: PropTypes.Requireable<string>;
|
|
188
|
-
ariaDescribedBy: PropTypes.Requireable<string>;
|
|
189
|
-
offLabel: PropTypes.Requireable<string>;
|
|
190
|
-
required: PropTypes.Requireable<boolean>;
|
|
191
|
-
tabIndex: PropTypes.Requireable<number>;
|
|
192
|
-
valid: PropTypes.Requireable<boolean>;
|
|
193
|
-
validate: PropTypes.Requireable<boolean>;
|
|
194
|
-
validationMessage: PropTypes.Requireable<string>;
|
|
195
|
-
onBlur: PropTypes.Requireable<any>;
|
|
196
|
-
onChange: PropTypes.Requireable<any>;
|
|
197
|
-
onFocus: PropTypes.Requireable<any>;
|
|
198
|
-
onLabel: PropTypes.Requireable<string>;
|
|
199
|
-
};
|
|
200
|
-
/**
|
|
201
|
-
* @hidden
|
|
202
|
-
*/
|
|
203
|
-
static defaultProps: {
|
|
204
|
-
disabled: boolean;
|
|
205
|
-
defaultChecked: boolean;
|
|
206
|
-
size: "small" | "medium" | "large" | null | undefined;
|
|
207
|
-
trackRounded: "small" | "medium" | "large" | "full" | null | undefined;
|
|
208
|
-
thumbRounded: "small" | "medium" | "large" | "full" | null | undefined;
|
|
209
|
-
offLabel: string;
|
|
210
|
-
onBlur: () => void;
|
|
211
|
-
onFocus: () => void;
|
|
212
|
-
onLabel: string;
|
|
213
|
-
required: boolean;
|
|
214
|
-
validityStyles: boolean;
|
|
215
|
-
};
|
|
216
|
-
/**
|
|
217
|
-
* @hidden
|
|
218
|
-
*/
|
|
219
|
-
readonly state: SwitchState;
|
|
220
|
-
private _element;
|
|
221
|
-
private _wrapper;
|
|
222
|
-
private _input;
|
|
223
|
-
private _id;
|
|
224
|
-
private valueDuringOnChange;
|
|
225
|
-
private dir?;
|
|
226
|
-
private defaultValidationMessage;
|
|
227
|
-
private eventTimeStamp?;
|
|
228
|
-
/**
|
|
229
|
-
* @hidden
|
|
230
|
-
*/
|
|
231
|
-
constructor(props: SwitchProps);
|
|
232
|
-
/**
|
|
233
|
-
* @hidden
|
|
234
|
-
*/
|
|
235
|
-
componentDidMount(): void;
|
|
236
|
-
/**
|
|
237
|
-
* @hidden
|
|
238
|
-
*/
|
|
239
|
-
componentDidUpdate(): void;
|
|
240
|
-
/**
|
|
241
|
-
* @hidden
|
|
242
|
-
*/
|
|
243
|
-
focus: () => void;
|
|
244
|
-
/**
|
|
245
|
-
* @hidden
|
|
246
|
-
*/
|
|
247
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
248
|
-
private dummyInput;
|
|
249
|
-
private handleClick;
|
|
250
|
-
private handleKeyDown;
|
|
251
|
-
private handleWrapperFocus;
|
|
252
|
-
private handleWrapperBlur;
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* Represents the PropsContext of the `Switch` component.
|
|
256
|
-
* Used for global configuration of all `Switch` instances.
|
|
257
|
-
*
|
|
258
|
-
* For more information, refer to the [Inputs Props Context]({% slug props-context_inputs %}) article.
|
|
259
|
-
*/
|
|
260
|
-
export declare const SwitchPropsContext: React.Context<(p: SwitchProps) => SwitchProps>;
|
|
261
|
-
/**
|
|
262
|
-
* Represent the `ref` of the Switch component.
|
|
263
|
-
*/
|
|
264
|
-
export interface SwitchHandle extends Pick<SwitchWithoutContext, keyof SwitchWithoutContext> {
|
|
265
|
-
/**
|
|
266
|
-
* @hidden
|
|
267
|
-
*/
|
|
268
|
-
actionElement: HTMLSpanElement | null;
|
|
269
|
-
/**
|
|
270
|
-
* Returns the HTML element of the Switch component.
|
|
271
|
-
*/
|
|
272
|
-
element: HTMLSpanElement | null;
|
|
273
|
-
/**
|
|
274
|
-
* Gets the `name` property of the Switch.
|
|
275
|
-
*/
|
|
276
|
-
name: string | undefined;
|
|
277
|
-
/**
|
|
278
|
-
* Represents the validity state into which the Switch is set.
|
|
279
|
-
*/
|
|
280
|
-
validity: FormComponentValidity;
|
|
281
|
-
/**
|
|
282
|
-
* Gets the value of the Switch.
|
|
283
|
-
*/
|
|
284
|
-
value: boolean;
|
|
285
|
-
}
|
|
286
|
-
/** @hidden */
|
|
287
|
-
export type Switch = SwitchHandle;
|
|
288
|
-
/**
|
|
289
|
-
* Represents the [KendoReact Switch component]({% slug overview_switch %}).
|
|
290
|
-
*
|
|
291
|
-
* Accepts properties of type [SwitchProps]({% slug api_inputs_switchprops %}).
|
|
292
|
-
* Obtaining the `ref` returns an object of type [SwitchHandle]({% slug api_inputs_switchhandle %}).
|
|
293
|
-
*/
|
|
294
|
-
export declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<any>>;
|
package/textarea/TextArea.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import { TextAreaProps } from './interfaces/TextAreaProps';
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
export interface TextAreaHandle {
|
|
11
|
-
element: React.RefObject<HTMLTextAreaElement | null>;
|
|
12
|
-
focus: any;
|
|
13
|
-
name?: string | null;
|
|
14
|
-
value?: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Represents the PropsContext of the `TextArea` component.
|
|
18
|
-
* Used for global configuration of all `TextArea` instances.
|
|
19
|
-
*
|
|
20
|
-
* For more information, refer to the [Inputs Props Context]({% slug props-context_inputs %}) article.
|
|
21
|
-
*/
|
|
22
|
-
export declare const TextAreaPropsContext: React.Context<(p: TextAreaProps) => TextAreaProps>;
|
|
23
|
-
/**
|
|
24
|
-
* Represents the [KendoReact TextArea component]({% slug overview_textarea %}).
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* Accepts properties of type [TextAreaProps]({% slug api_inputs_textareaprops %}).
|
|
28
|
-
* Obtaining the `ref` returns an object of type [TextAreaHandle]({% slug api_inputs_textareahandle %}).
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```jsx
|
|
32
|
-
* class App extends React.Component {
|
|
33
|
-
* render() {
|
|
34
|
-
* return <TextArea />;
|
|
35
|
-
* }
|
|
36
|
-
* }
|
|
37
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
export declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<TextAreaHandle | null>>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { TextAreaHandle } from './../TextArea';
|
|
6
|
-
import { BaseEvent } from '@progress/kendo-react-common';
|
|
7
|
-
/**
|
|
8
|
-
* The arguments for the `onBlur` TextArea event.
|
|
9
|
-
*/
|
|
10
|
-
export interface TextAreaBlurEvent extends BaseEvent<TextAreaHandle> {
|
|
11
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { TextAreaHandle } from './../TextArea';
|
|
6
|
-
import { BaseEvent } from '@progress/kendo-react-common';
|
|
7
|
-
/**
|
|
8
|
-
* The arguments for the `onChange` TextArea event.
|
|
9
|
-
*/
|
|
10
|
-
export interface TextAreaChangeEvent extends BaseEvent<TextAreaHandle> {
|
|
11
|
-
/**
|
|
12
|
-
* The new value of the TextArea.
|
|
13
|
-
*/
|
|
14
|
-
value: string;
|
|
15
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { TextAreaHandle } from './../TextArea';
|
|
6
|
-
import { BaseEvent } from '@progress/kendo-react-common';
|
|
7
|
-
/**
|
|
8
|
-
* The arguments for the `onFocus` TextArea event.
|
|
9
|
-
*/
|
|
10
|
-
export interface TextAreaFocusEvent extends BaseEvent<TextAreaHandle> {
|
|
11
|
-
}
|