@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
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as a from "react";
|
|
10
|
+
import t from "prop-types";
|
|
11
|
+
import { dispatchEvent as C, noop as h, Keys as m, validatePackage as S, classNames as p, kendoThemeMaps as c, getTabIndex as N, createPropsContext as D, withIdHOC as E, withPropsContext as M } from "@progress/kendo-react-common";
|
|
12
|
+
import { provideLocalizationService as L } from "@progress/kendo-react-intl";
|
|
13
|
+
import { switchValidation as f, messages as B } from "../messages/index.mjs";
|
|
14
|
+
import { packageMetadata as O } from "../package-metadata.mjs";
|
|
15
|
+
const r = class r extends a.Component {
|
|
16
|
+
/**
|
|
17
|
+
* @hidden
|
|
18
|
+
*/
|
|
19
|
+
constructor(l) {
|
|
20
|
+
super(l), this.setValidity = () => {
|
|
21
|
+
this._input && this._input.setCustomValidity && this._input.setCustomValidity(
|
|
22
|
+
this.validity.valid ? "" : this.props.validationMessage || this.defaultValidationMessage.toLanguageString(f, B[f])
|
|
23
|
+
);
|
|
24
|
+
}, this.limit = (e, i, s) => {
|
|
25
|
+
const d = s.offsetWidth, o = i.offsetWidth;
|
|
26
|
+
return e < 0 ? 0 : e > d - o ? d - o : e;
|
|
27
|
+
}, this.toggle = (e, i) => {
|
|
28
|
+
this.setState({ checked: e }), this.valueDuringOnChange = e, C(this.props.onChange, i, this, { value: e }), this.valueDuringOnChange = void 0;
|
|
29
|
+
}, this._element = null, this._wrapper = null, this._input = null, this._id = this.props.id, this.defaultValidationMessage = L(this), this.focus = () => {
|
|
30
|
+
this.actionElement && this.actionElement.focus();
|
|
31
|
+
}, this.dummyInput = (e) => /* @__PURE__ */ a.createElement(
|
|
32
|
+
"input",
|
|
33
|
+
{
|
|
34
|
+
type: "checkbox",
|
|
35
|
+
checked: this.props.checked,
|
|
36
|
+
ref: (i) => {
|
|
37
|
+
this._input = i;
|
|
38
|
+
},
|
|
39
|
+
tabIndex: -1,
|
|
40
|
+
"aria-hidden": !0,
|
|
41
|
+
value: e,
|
|
42
|
+
style: { opacity: 0, width: 1, border: 0, zIndex: -1, position: "absolute", left: "50%" },
|
|
43
|
+
onChange: h,
|
|
44
|
+
name: this.name || void 0
|
|
45
|
+
}
|
|
46
|
+
), this.handleClick = (e) => {
|
|
47
|
+
this.eventTimeStamp !== e.timeStamp && (this.eventTimeStamp = e.timeStamp, this.toggle(!this.value, e));
|
|
48
|
+
}, this.handleKeyDown = (e) => {
|
|
49
|
+
if (this.props.disabled)
|
|
50
|
+
return;
|
|
51
|
+
const { keyCode: i } = e;
|
|
52
|
+
(i === m.space || i === m.enter) && (this.toggle(!this.value, e), e.preventDefault());
|
|
53
|
+
}, this.handleWrapperFocus = (e) => {
|
|
54
|
+
if (this.props.disabled)
|
|
55
|
+
return;
|
|
56
|
+
this.setState({ focused: !0 });
|
|
57
|
+
const { onFocus: i } = this.props;
|
|
58
|
+
i && i.call(void 0, e);
|
|
59
|
+
}, this.handleWrapperBlur = (e) => {
|
|
60
|
+
if (this.props.disabled)
|
|
61
|
+
return;
|
|
62
|
+
this.setState({ focused: !1 });
|
|
63
|
+
const { onBlur: i } = this.props;
|
|
64
|
+
i && i.call(void 0, e);
|
|
65
|
+
}, S(O), this.state = {
|
|
66
|
+
checked: l.defaultChecked || r.defaultProps.defaultChecked,
|
|
67
|
+
focused: !1
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Gets the value of the Switch.
|
|
72
|
+
*/
|
|
73
|
+
get value() {
|
|
74
|
+
return this.valueDuringOnChange !== void 0 ? this.valueDuringOnChange : this.props.checked !== void 0 ? this.props.checked : this.state.checked;
|
|
75
|
+
}
|
|
76
|
+
get element() {
|
|
77
|
+
return this._element;
|
|
78
|
+
}
|
|
79
|
+
get actionElement() {
|
|
80
|
+
return this._wrapper;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Gets the `name` property of the Switch.
|
|
84
|
+
*/
|
|
85
|
+
get name() {
|
|
86
|
+
return this.props.name;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Represents the validity state into which the Switch is set.
|
|
90
|
+
*/
|
|
91
|
+
get validity() {
|
|
92
|
+
const l = this.props.validationMessage !== void 0, e = this.props.valid !== void 0 ? this.props.valid : this.props.required ? !!this.value : !0, i = this.props.valid !== void 0 ? this.props.valid : e;
|
|
93
|
+
return {
|
|
94
|
+
customError: l,
|
|
95
|
+
valid: i,
|
|
96
|
+
valueMissing: this.value === null
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @hidden
|
|
101
|
+
*/
|
|
102
|
+
get validityStyles() {
|
|
103
|
+
return this.props.validityStyles !== void 0 ? this.props.validityStyles : r.defaultProps.validityStyles;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* @hidden
|
|
107
|
+
*/
|
|
108
|
+
get required() {
|
|
109
|
+
return this.props.required !== void 0 ? this.props.required : r.defaultProps.required;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* @hidden
|
|
113
|
+
*/
|
|
114
|
+
componentDidMount() {
|
|
115
|
+
this.setValidity(), this.forceUpdate();
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* @hidden
|
|
119
|
+
*/
|
|
120
|
+
componentDidUpdate() {
|
|
121
|
+
this.setValidity();
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* @hidden
|
|
125
|
+
*/
|
|
126
|
+
render() {
|
|
127
|
+
const { focused: l } = this.state, { dir: e, disabled: i, trackRounded: s, thumbRounded: d, size: o, offLabel: g, onLabel: v, tabIndex: b } = this.props;
|
|
128
|
+
this.dir = e || this.element && getComputedStyle(this.element).direction || void 0;
|
|
129
|
+
const y = !this.validityStyles || this.validity.valid, k = p(
|
|
130
|
+
"k-switch",
|
|
131
|
+
{
|
|
132
|
+
[`k-switch-${c.sizeMap[o] || o}`]: o,
|
|
133
|
+
[`k-rounded-${c.roundedMap[s] || s}`]: s,
|
|
134
|
+
"k-switch-on": this.value,
|
|
135
|
+
"k-switch-off": !this.value,
|
|
136
|
+
"k-focus": l,
|
|
137
|
+
"k-disabled": i,
|
|
138
|
+
"k-invalid": !y
|
|
139
|
+
},
|
|
140
|
+
this.props.className
|
|
141
|
+
), w = {
|
|
142
|
+
"aria-checked": this.value,
|
|
143
|
+
"aria-disabled": i || void 0,
|
|
144
|
+
"aria-labelledby": this.props.ariaLabelledBy,
|
|
145
|
+
"aria-describedby": this.props.ariaDescribedBy,
|
|
146
|
+
"aria-label": this.props.ariaLabel
|
|
147
|
+
};
|
|
148
|
+
return /* @__PURE__ */ a.createElement(
|
|
149
|
+
"span",
|
|
150
|
+
{
|
|
151
|
+
ref: (n) => {
|
|
152
|
+
this._wrapper = n;
|
|
153
|
+
},
|
|
154
|
+
role: "switch",
|
|
155
|
+
...w,
|
|
156
|
+
className: k,
|
|
157
|
+
dir: this.dir,
|
|
158
|
+
onKeyDown: this.handleKeyDown,
|
|
159
|
+
onClick: this.handleClick,
|
|
160
|
+
onBlur: this.handleWrapperBlur,
|
|
161
|
+
onFocus: this.handleWrapperFocus,
|
|
162
|
+
tabIndex: N(b, i, void 0),
|
|
163
|
+
accessKey: this.props.accessKey,
|
|
164
|
+
id: this.props.id || this._id
|
|
165
|
+
},
|
|
166
|
+
/* @__PURE__ */ a.createElement(
|
|
167
|
+
"span",
|
|
168
|
+
{
|
|
169
|
+
className: p(
|
|
170
|
+
"k-switch-track",
|
|
171
|
+
{ [`k-rounded-${c.roundedMap[s] || s}`]: s }
|
|
172
|
+
),
|
|
173
|
+
ref: (n) => {
|
|
174
|
+
this._element = n;
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
this.dummyInput(this.value),
|
|
178
|
+
/* @__PURE__ */ a.createElement("span", { className: "k-switch-label-on" }, v),
|
|
179
|
+
/* @__PURE__ */ a.createElement("span", { className: "k-switch-label-off" }, g)
|
|
180
|
+
),
|
|
181
|
+
/* @__PURE__ */ a.createElement("span", { className: "k-switch-thumb-wrap" }, /* @__PURE__ */ a.createElement("span", { className: p("k-switch-thumb", { [`k-rounded-${d}`]: d }) }))
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
r.displayName = "Switch", r.propTypes = {
|
|
186
|
+
accessKey: t.string,
|
|
187
|
+
checked: t.bool,
|
|
188
|
+
className: t.string,
|
|
189
|
+
disabled: t.bool,
|
|
190
|
+
defaultChecked: t.bool,
|
|
191
|
+
size: t.oneOf([null, "small", "medium", "large"]),
|
|
192
|
+
trackRounded: t.oneOf([null, "small", "medium", "large", "full"]),
|
|
193
|
+
thumbRounded: t.oneOf([null, "small", "medium", "large", "full"]),
|
|
194
|
+
dir: t.string,
|
|
195
|
+
id: t.string,
|
|
196
|
+
ariaLabelledBy: t.string,
|
|
197
|
+
ariaDescribedBy: t.string,
|
|
198
|
+
offLabel: t.string,
|
|
199
|
+
required: t.bool,
|
|
200
|
+
tabIndex: t.number,
|
|
201
|
+
valid: t.bool,
|
|
202
|
+
validate: t.bool,
|
|
203
|
+
validationMessage: t.string,
|
|
204
|
+
onBlur: t.any,
|
|
205
|
+
onChange: t.any,
|
|
206
|
+
onFocus: t.any,
|
|
207
|
+
onLabel: t.string
|
|
208
|
+
}, r.defaultProps = {
|
|
209
|
+
disabled: !1,
|
|
210
|
+
defaultChecked: !1,
|
|
211
|
+
size: "medium",
|
|
212
|
+
trackRounded: "full",
|
|
213
|
+
thumbRounded: "full",
|
|
214
|
+
offLabel: "OFF",
|
|
215
|
+
onBlur: h,
|
|
216
|
+
onFocus: h,
|
|
217
|
+
onLabel: "ON",
|
|
218
|
+
required: !1,
|
|
219
|
+
validityStyles: !0
|
|
220
|
+
};
|
|
221
|
+
let u = r;
|
|
222
|
+
const V = D(), I = E(M(V, u));
|
|
223
|
+
I.displayName = "KendoReactSwitch";
|
|
224
|
+
export {
|
|
225
|
+
I as Switch,
|
|
226
|
+
V as SwitchPropsContext,
|
|
227
|
+
u as SwitchWithoutContext
|
|
228
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const re=require("react"),e=require("prop-types"),a=require("@progress/kendo-react-common");function ne(s){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const o in s)if(o!=="default"){const l=Object.getOwnPropertyDescriptor(s,o);Object.defineProperty(u,o,l.get?l:{enumerable:!0,get:()=>s[o]})}}return u.default=s,Object.freeze(u)}const t=ne(re),V=a.createPropsContext(),m=t.forwardRef((s,u)=>{const o=a.usePropsContext(V,s),{size:l,rounded:p,fillMode:k,prefix:z=void 0,suffix:A=void 0,ariaDescribedBy:B,ariaLabelledBy:w,autoSize:N,className:j,defaultValue:R,disabled:n,readOnly:q,required:b,rows:D,id:H,name:F,placeholder:$,style:L,tabIndex:_,value:g,valid:P,validationMessage:T,validityStyles:O,onChange:x,onFocus:v,onBlur:y,visited:se,touched:le,modified:ie,...K}=o,r=t.useRef(null),S=t.useCallback(()=>{r.current&&r.current.focus()},[]),[E,M]=t.useState(R),[G,J]=a.useCustomComponent(z),[Q,U]=a.useCustomComponent(A),d=g!==void 0,c=d?g:E,f=t.useCallback(()=>({element:r,focus:S,get value(){return c},get name(){return r.current&&r.current.name}}),[S,c]);t.useImperativeHandle(u,f);const[W,I]=t.useState("auto"),X=a.useId(),Y=a.useDir(r,o.dir),h=P!==void 0?P:b?!!c:!0;t.useEffect(()=>{r.current&&r.current.setCustomValidity&&r.current.setCustomValidity(h?"":T||"")},[h,T]),a.useIsomorphicLayoutEffect(()=>{r.current&&I(`${r.current.scrollHeight}px`)},[c]);const Z=t.useCallback(i=>{const C=i.target.value;I("auto"),!d&&!n&&M(C),x&&!n&&a.dispatchEvent(x,i,{...f(),value:C},{value:C})},[M,x,n,d]),ee=t.useCallback(i=>{v&&!n&&a.dispatchEvent(v,i,f(),void 0)},[v,n]),te=t.useCallback(i=>{y&&!n&&a.dispatchEvent(y,i,f(),void 0)},[y,n]),ae={id:H||X,role:"textbox",name:F,className:"k-input-inner !k-overflow-auto",ref:r,disabled:n,rows:D,placeholder:$,readOnly:q,required:b,tabIndex:a.getTabIndex(_,n),style:N?{resize:"none",overflow:"hidden",height:W}:{},"aria-labelledby":w,"aria-describedby":B,"aria-multiline":!0,"aria-disabled":n||void 0,value:d?g:E,...K,onChange:Z,onFocus:ee,onBlur:te};return t.createElement("span",{className:a.classNames("k-input","k-textarea",{[`k-input-${a.kendoThemeMaps.sizeMap[l]||l}`]:l,[`k-input-${k}`]:k,[`k-rounded-${a.kendoThemeMaps.roundedMap[p]||p}`]:p,"k-invalid":!(h||O!==void 0||O===!0),"k-required":b,"k-disabled":n},j),style:L,dir:Y},o.prefix&&t.createElement(G,{...J}),t.createElement("textarea",{...ae}),o.suffix&&t.createElement(Q,{...U}))});m.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"])};const oe={size:"medium",rounded:"medium",fillMode:"solid"};m.displayName="KendoTextArea";m.defaultProps=oe;exports.TextArea=m;exports.TextAreaPropsContext=V;
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as t from "react";
|
|
10
|
+
import e from "prop-types";
|
|
11
|
+
import { createPropsContext as ne, usePropsContext as se, useCustomComponent as E, useId as oe, useDir as le, useIsomorphicLayoutEffect as ie, dispatchEvent as v, getTabIndex as ue, classNames as de, kendoThemeMaps as z } from "@progress/kendo-react-common";
|
|
12
|
+
const ce = ne(), y = t.forwardRef((M, O) => {
|
|
13
|
+
const s = se(ce, M), {
|
|
14
|
+
size: u,
|
|
15
|
+
rounded: d,
|
|
16
|
+
fillMode: h,
|
|
17
|
+
prefix: S = void 0,
|
|
18
|
+
suffix: w = void 0,
|
|
19
|
+
ariaDescribedBy: A,
|
|
20
|
+
ariaLabelledBy: N,
|
|
21
|
+
autoSize: H,
|
|
22
|
+
className: F,
|
|
23
|
+
defaultValue: R,
|
|
24
|
+
disabled: r,
|
|
25
|
+
readOnly: $,
|
|
26
|
+
required: c,
|
|
27
|
+
rows: D,
|
|
28
|
+
id: L,
|
|
29
|
+
name: q,
|
|
30
|
+
placeholder: j,
|
|
31
|
+
style: K,
|
|
32
|
+
tabIndex: G,
|
|
33
|
+
value: f,
|
|
34
|
+
valid: C,
|
|
35
|
+
validationMessage: k,
|
|
36
|
+
validityStyles: P,
|
|
37
|
+
onChange: m,
|
|
38
|
+
onFocus: p,
|
|
39
|
+
onBlur: b,
|
|
40
|
+
// Removed to support direct use in Form Field component
|
|
41
|
+
visited: me,
|
|
42
|
+
touched: pe,
|
|
43
|
+
modified: be,
|
|
44
|
+
...J
|
|
45
|
+
} = s, a = t.useRef(null), I = t.useCallback(
|
|
46
|
+
() => {
|
|
47
|
+
a.current && a.current.focus();
|
|
48
|
+
},
|
|
49
|
+
[]
|
|
50
|
+
), [T, V] = t.useState(R), [Q, U] = E(S), [W, X] = E(w), o = f !== void 0, l = o ? f : T, i = t.useCallback(
|
|
51
|
+
() => ({
|
|
52
|
+
element: a,
|
|
53
|
+
focus: I,
|
|
54
|
+
get value() {
|
|
55
|
+
return l;
|
|
56
|
+
},
|
|
57
|
+
get name() {
|
|
58
|
+
return a.current && a.current.name;
|
|
59
|
+
}
|
|
60
|
+
}),
|
|
61
|
+
[I, l]
|
|
62
|
+
);
|
|
63
|
+
t.useImperativeHandle(O, i);
|
|
64
|
+
const [Y, B] = t.useState("auto"), Z = oe(), _ = le(a, s.dir), x = C !== void 0 ? C : c ? !!l : !0;
|
|
65
|
+
t.useEffect(
|
|
66
|
+
() => {
|
|
67
|
+
a.current && a.current.setCustomValidity && a.current.setCustomValidity(
|
|
68
|
+
x ? "" : k || ""
|
|
69
|
+
);
|
|
70
|
+
},
|
|
71
|
+
[x, k]
|
|
72
|
+
), ie(
|
|
73
|
+
() => {
|
|
74
|
+
a.current && B(`${a.current.scrollHeight}px`);
|
|
75
|
+
},
|
|
76
|
+
[l]
|
|
77
|
+
);
|
|
78
|
+
const ee = t.useCallback(
|
|
79
|
+
(n) => {
|
|
80
|
+
const g = n.target.value;
|
|
81
|
+
B("auto"), !o && !r && V(g), m && !r && v(
|
|
82
|
+
m,
|
|
83
|
+
n,
|
|
84
|
+
{
|
|
85
|
+
...i(),
|
|
86
|
+
value: g
|
|
87
|
+
},
|
|
88
|
+
{ value: g }
|
|
89
|
+
);
|
|
90
|
+
},
|
|
91
|
+
[V, m, r, o]
|
|
92
|
+
), te = t.useCallback(
|
|
93
|
+
(n) => {
|
|
94
|
+
p && !r && v(
|
|
95
|
+
p,
|
|
96
|
+
n,
|
|
97
|
+
i(),
|
|
98
|
+
void 0
|
|
99
|
+
);
|
|
100
|
+
},
|
|
101
|
+
[p, r]
|
|
102
|
+
), ae = t.useCallback(
|
|
103
|
+
(n) => {
|
|
104
|
+
b && !r && v(
|
|
105
|
+
b,
|
|
106
|
+
n,
|
|
107
|
+
i(),
|
|
108
|
+
void 0
|
|
109
|
+
);
|
|
110
|
+
},
|
|
111
|
+
[b, r]
|
|
112
|
+
), re = {
|
|
113
|
+
id: L || Z,
|
|
114
|
+
role: "textbox",
|
|
115
|
+
name: q,
|
|
116
|
+
className: "k-input-inner !k-overflow-auto",
|
|
117
|
+
ref: a,
|
|
118
|
+
disabled: r,
|
|
119
|
+
rows: D,
|
|
120
|
+
placeholder: j,
|
|
121
|
+
readOnly: $,
|
|
122
|
+
required: c,
|
|
123
|
+
tabIndex: ue(G, r),
|
|
124
|
+
style: H ? { resize: "none", overflow: "hidden", height: Y } : {},
|
|
125
|
+
"aria-labelledby": N,
|
|
126
|
+
"aria-describedby": A,
|
|
127
|
+
"aria-multiline": !0,
|
|
128
|
+
"aria-disabled": r || void 0,
|
|
129
|
+
value: o ? f : T,
|
|
130
|
+
...J,
|
|
131
|
+
onChange: ee,
|
|
132
|
+
onFocus: te,
|
|
133
|
+
onBlur: ae
|
|
134
|
+
};
|
|
135
|
+
return /* @__PURE__ */ t.createElement(
|
|
136
|
+
"span",
|
|
137
|
+
{
|
|
138
|
+
className: de(
|
|
139
|
+
"k-input",
|
|
140
|
+
"k-textarea",
|
|
141
|
+
{
|
|
142
|
+
[`k-input-${z.sizeMap[u] || u}`]: u,
|
|
143
|
+
[`k-input-${h}`]: h,
|
|
144
|
+
[`k-rounded-${z.roundedMap[d] || d}`]: d,
|
|
145
|
+
"k-invalid": !(x || P !== void 0 || P === !0),
|
|
146
|
+
"k-required": c,
|
|
147
|
+
"k-disabled": r
|
|
148
|
+
},
|
|
149
|
+
F
|
|
150
|
+
),
|
|
151
|
+
style: K,
|
|
152
|
+
dir: _
|
|
153
|
+
},
|
|
154
|
+
s.prefix && /* @__PURE__ */ t.createElement(Q, { ...U }),
|
|
155
|
+
/* @__PURE__ */ t.createElement("textarea", { ...re }),
|
|
156
|
+
s.suffix && /* @__PURE__ */ t.createElement(W, { ...X })
|
|
157
|
+
);
|
|
158
|
+
});
|
|
159
|
+
y.propTypes = {
|
|
160
|
+
ariaDescribedBy: e.string,
|
|
161
|
+
ariaLabelledBy: e.string,
|
|
162
|
+
autoSize: e.bool,
|
|
163
|
+
className: e.string,
|
|
164
|
+
defaultValue: e.string,
|
|
165
|
+
dir: e.string,
|
|
166
|
+
disabled: e.bool,
|
|
167
|
+
readOnly: e.bool,
|
|
168
|
+
rows: e.number,
|
|
169
|
+
id: e.string,
|
|
170
|
+
name: e.string,
|
|
171
|
+
placeholder: e.string,
|
|
172
|
+
style: e.object,
|
|
173
|
+
tabIndex: e.number,
|
|
174
|
+
value: e.oneOfType([
|
|
175
|
+
e.string,
|
|
176
|
+
e.arrayOf(e.string),
|
|
177
|
+
e.number
|
|
178
|
+
]),
|
|
179
|
+
onChange: e.func,
|
|
180
|
+
onFocus: e.func,
|
|
181
|
+
onBlur: e.func,
|
|
182
|
+
size: e.oneOf([null, "small", "medium", "large"]),
|
|
183
|
+
rounded: e.oneOf([null, "small", "medium", "large", "full"]),
|
|
184
|
+
fillMode: e.oneOf([null, "solid", "flat", "outline"])
|
|
185
|
+
};
|
|
186
|
+
const fe = {
|
|
187
|
+
size: "medium",
|
|
188
|
+
rounded: "medium",
|
|
189
|
+
fillMode: "solid"
|
|
190
|
+
};
|
|
191
|
+
y.displayName = "KendoTextArea";
|
|
192
|
+
y.defaultProps = fe;
|
|
193
|
+
export {
|
|
194
|
+
y as TextArea,
|
|
195
|
+
ce as TextAreaPropsContext
|
|
196
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),d=require("prop-types"),a=require("@progress/kendo-react-common"),E=require("../package-metadata.js");function F(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,l.get?l:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const t=F(S),s=t.forwardRef((e,r)=>{a.validatePackage(E.packageMetadata);const n=t.useRef(null),l=t.useRef(null),o=t.useRef(),v=t.useCallback(()=>{var u;return o.current!==void 0?o.current:(u=n.current)==null?void 0:u.value},[]);t.useImperativeHandle(l,()=>({get element(){return n.current},get name(){return n.current&&n.current.name},get value(){return v()}})),t.useImperativeHandle(r,()=>l.current);const{size:c,fillMode:m,rounded:i,className:k,dir:p,style:x,prefix:h=f.prefix,suffix:C=f.suffix,valid:q,modified:N,touched:j,visited:z,...b}=e,[y]=a.useCustomComponent(h),[M]=a.useCustomComponent(C),[_,g]=t.useState(!1),B=u=>{g(!0)},O=u=>{g(!1)},R=t.useCallback(u=>{o.current=u.target.value,e.onChange&&e.onChange.call(void 0,{syntheticEvent:u,nativeEvent:u.nativeEvent,value:u.target.value,target:l.current}),o.current=void 0},[e.onChange]),{onFocus:T,onBlur:P}=a.useAsyncFocusBlur({onFocus:B,onBlur:O,onSyncFocus:e.onFocus,onSyncBlur:e.onBlur});return t.createElement("span",{style:x,dir:p,className:a.classNames("k-textbox k-input",{[`k-input-${a.kendoThemeMaps.sizeMap[c]||c}`]:c,[`k-input-${m}`]:m,[`k-rounded-${a.kendoThemeMaps.roundedMap[i]||i}`]:i},{"k-focus":_,"k-required":e.required,"k-disabled":e.disabled,"k-invalid":e.valid===!1},k),onFocus:T,onBlur:P},t.createElement(y,null),t.createElement("input",{ref:n,className:"k-input-inner",...b,onChange:R}),t.createElement(M,null))}),f={prefix:e=>null,suffix:e=>null,size:"medium",rounded:"medium",fillMode:"solid"};s.propTypes={size:d.oneOf([null,"small","medium","large"]),rounded:d.oneOf([null,"small","medium","large","full"]),fillMode:d.oneOf([null,"solid","flat","outline"])};s.displayName="KendoReactTextBoxComponent";s.defaultProps=f;exports.TextBox=s;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as e from "react";
|
|
10
|
+
import s from "prop-types";
|
|
11
|
+
import { validatePackage as T, useCustomComponent as m, useAsyncFocusBlur as z, classNames as S, kendoThemeMaps as v } from "@progress/kendo-react-common";
|
|
12
|
+
import { packageMetadata as O } from "../package-metadata.mjs";
|
|
13
|
+
const c = e.forwardRef((n, g) => {
|
|
14
|
+
T(O);
|
|
15
|
+
const u = e.useRef(null), r = e.useRef(null), l = e.useRef(), k = e.useCallback(
|
|
16
|
+
() => {
|
|
17
|
+
var t;
|
|
18
|
+
return l.current !== void 0 ? l.current : (t = u.current) == null ? void 0 : t.value;
|
|
19
|
+
},
|
|
20
|
+
[]
|
|
21
|
+
);
|
|
22
|
+
e.useImperativeHandle(
|
|
23
|
+
r,
|
|
24
|
+
() => ({
|
|
25
|
+
get element() {
|
|
26
|
+
return u.current;
|
|
27
|
+
},
|
|
28
|
+
get name() {
|
|
29
|
+
return u.current && u.current.name;
|
|
30
|
+
},
|
|
31
|
+
get value() {
|
|
32
|
+
return k();
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
), e.useImperativeHandle(
|
|
36
|
+
g,
|
|
37
|
+
() => r.current
|
|
38
|
+
);
|
|
39
|
+
const {
|
|
40
|
+
size: a,
|
|
41
|
+
fillMode: d,
|
|
42
|
+
rounded: o,
|
|
43
|
+
className: x,
|
|
44
|
+
dir: h,
|
|
45
|
+
style: p,
|
|
46
|
+
prefix: C = i.prefix,
|
|
47
|
+
suffix: y = i.suffix,
|
|
48
|
+
valid: $,
|
|
49
|
+
// Destruct to avoid warning when used inside a form field
|
|
50
|
+
modified: q,
|
|
51
|
+
touched: H,
|
|
52
|
+
visited: I,
|
|
53
|
+
...B
|
|
54
|
+
} = n, [E] = m(C), [F] = m(y), [M, f] = e.useState(!1), R = (t) => {
|
|
55
|
+
f(!0);
|
|
56
|
+
}, _ = (t) => {
|
|
57
|
+
f(!1);
|
|
58
|
+
}, b = e.useCallback(
|
|
59
|
+
(t) => {
|
|
60
|
+
l.current = t.target.value, n.onChange && n.onChange.call(void 0, {
|
|
61
|
+
syntheticEvent: t,
|
|
62
|
+
nativeEvent: t.nativeEvent,
|
|
63
|
+
value: t.target.value,
|
|
64
|
+
target: r.current
|
|
65
|
+
}), l.current = void 0;
|
|
66
|
+
},
|
|
67
|
+
[n.onChange]
|
|
68
|
+
), { onFocus: N, onBlur: P } = z({
|
|
69
|
+
onFocus: R,
|
|
70
|
+
onBlur: _,
|
|
71
|
+
onSyncFocus: n.onFocus,
|
|
72
|
+
onSyncBlur: n.onBlur
|
|
73
|
+
});
|
|
74
|
+
return /* @__PURE__ */ e.createElement(
|
|
75
|
+
"span",
|
|
76
|
+
{
|
|
77
|
+
style: p,
|
|
78
|
+
dir: h,
|
|
79
|
+
className: S(
|
|
80
|
+
"k-textbox k-input",
|
|
81
|
+
{
|
|
82
|
+
[`k-input-${v.sizeMap[a] || a}`]: a,
|
|
83
|
+
[`k-input-${d}`]: d,
|
|
84
|
+
[`k-rounded-${v.roundedMap[o] || o}`]: o
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"k-focus": M,
|
|
88
|
+
"k-required": n.required,
|
|
89
|
+
"k-disabled": n.disabled,
|
|
90
|
+
"k-invalid": n.valid === !1
|
|
91
|
+
},
|
|
92
|
+
x
|
|
93
|
+
),
|
|
94
|
+
onFocus: N,
|
|
95
|
+
onBlur: P
|
|
96
|
+
},
|
|
97
|
+
/* @__PURE__ */ e.createElement(E, null),
|
|
98
|
+
/* @__PURE__ */ e.createElement(
|
|
99
|
+
"input",
|
|
100
|
+
{
|
|
101
|
+
ref: u,
|
|
102
|
+
className: "k-input-inner",
|
|
103
|
+
...B,
|
|
104
|
+
onChange: b
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
/* @__PURE__ */ e.createElement(F, null)
|
|
108
|
+
);
|
|
109
|
+
}), i = {
|
|
110
|
+
prefix: (n) => null,
|
|
111
|
+
suffix: (n) => null,
|
|
112
|
+
size: "medium",
|
|
113
|
+
rounded: "medium",
|
|
114
|
+
fillMode: "solid"
|
|
115
|
+
};
|
|
116
|
+
c.propTypes = {
|
|
117
|
+
size: s.oneOf([null, "small", "medium", "large"]),
|
|
118
|
+
rounded: s.oneOf([null, "small", "medium", "large", "full"]),
|
|
119
|
+
fillMode: s.oneOf([null, "solid", "flat", "outline"])
|
|
120
|
+
};
|
|
121
|
+
c.displayName = "KendoReactTextBoxComponent";
|
|
122
|
+
c.defaultProps = i;
|
|
123
|
+
export {
|
|
124
|
+
c as TextBox
|
|
125
|
+
};
|
package/checkbox/Checkbox.d.ts
DELETED
|
@@ -1,36 +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 { CheckboxProps } from './interfaces/CheckboxProps';
|
|
7
|
-
/**
|
|
8
|
-
* The Checkbox ref.
|
|
9
|
-
*/
|
|
10
|
-
export interface CheckboxHandle {
|
|
11
|
-
element: HTMLInputElement | null;
|
|
12
|
-
focus: any;
|
|
13
|
-
value?: string | number | string[] | boolean | null;
|
|
14
|
-
name?: string | null;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Represents the PropsContext of the `Checkbox` component.
|
|
18
|
-
* Used for global configuration of all `Checkbox` instances.
|
|
19
|
-
*
|
|
20
|
-
* For more information, refer to the [Inputs Props Context]({% slug props-context_inputs %}) article.
|
|
21
|
-
*/
|
|
22
|
-
export declare const CheckboxPropsContext: React.Context<(p: CheckboxProps) => CheckboxProps>;
|
|
23
|
-
/**
|
|
24
|
-
* Represents the [KendoReact Checkbox component]({% slug overview_checkbox %}).
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```jsx
|
|
28
|
-
* class App extends React.Component {
|
|
29
|
-
* render() {
|
|
30
|
-
* return <Checkbox />;
|
|
31
|
-
* }
|
|
32
|
-
* }
|
|
33
|
-
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<CheckboxHandle | 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 { CheckboxHandle } from './../Checkbox';
|
|
6
|
-
import { BaseEvent } from '@progress/kendo-react-common';
|
|
7
|
-
/**
|
|
8
|
-
* The arguments for the `onBlur` Checkbox event.
|
|
9
|
-
*/
|
|
10
|
-
export interface CheckboxBlurEvent extends BaseEvent<CheckboxHandle> {
|
|
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 { CheckboxHandle } from './../Checkbox';
|
|
6
|
-
import { BaseEvent } from '@progress/kendo-react-common';
|
|
7
|
-
/**
|
|
8
|
-
* The arguments for the `onChange` Checkbox event.
|
|
9
|
-
*/
|
|
10
|
-
export interface CheckboxChangeEvent extends BaseEvent<CheckboxHandle> {
|
|
11
|
-
/**
|
|
12
|
-
* The new value of the Checkbox.
|
|
13
|
-
*/
|
|
14
|
-
value: boolean;
|
|
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 { CheckboxHandle } from './../Checkbox';
|
|
6
|
-
import { BaseEvent } from '@progress/kendo-react-common';
|
|
7
|
-
/**
|
|
8
|
-
* The arguments for the `onFocus` Checkbox event.
|
|
9
|
-
*/
|
|
10
|
-
export interface CheckboxFocusEvent extends BaseEvent<CheckboxHandle> {
|
|
11
|
-
}
|