@progress/kendo-react-inputs 13.3.0-develop.9 → 13.4.0-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/checkbox/Checkbox.d.ts +49 -0
- package/checkbox/Checkbox.js +1 -1
- package/checkbox/Checkbox.mjs +35 -36
- package/checkbox/interfaces/CheckboxBlurEvent.d.ts +14 -0
- package/checkbox/interfaces/CheckboxChangeEvent.d.ts +18 -0
- package/checkbox/interfaces/CheckboxFocusEvent.d.ts +14 -0
- package/checkbox/interfaces/CheckboxProps.d.ts +148 -0
- package/colors/ColorContrastLabels.d.ts +22 -0
- package/colors/ColorContrastSvg.d.ts +25 -0
- package/colors/ColorGradient.d.ts +215 -0
- package/colors/ColorGradient.js +1 -1
- package/colors/ColorGradient.mjs +20 -19
- package/colors/ColorInput.d.ts +40 -0
- package/colors/ColorInput.js +1 -1
- package/colors/ColorInput.mjs +20 -16
- package/colors/ColorPalette.d.ts +129 -0
- package/colors/ColorPalette.js +1 -1
- package/colors/ColorPalette.mjs +7 -7
- package/colors/ColorPicker.d.ts +34 -0
- package/colors/ColorPicker.js +1 -1
- package/colors/ColorPicker.mjs +96 -94
- package/colors/FlatColorPicker.d.ts +189 -0
- package/colors/FlatColorPicker.js +1 -1
- package/colors/FlatColorPicker.mjs +41 -40
- package/colors/HexInput.d.ts +39 -0
- package/colors/HexInput.js +1 -1
- package/colors/HexInput.mjs +2 -1
- package/colors/Picker.d.ts +13 -0
- package/colors/interfaces/ColorGradientChangeEvent.d.ts +18 -0
- package/colors/interfaces/ColorGradientProps.d.ts +160 -0
- package/colors/interfaces/ColorPaletteChangeEvent.d.ts +22 -0
- package/colors/interfaces/ColorPaletteProps.d.ts +116 -0
- package/colors/interfaces/ColorPickerActiveColorClick.d.ts +29 -0
- package/colors/interfaces/ColorPickerBlurEvent.d.ts +20 -0
- package/colors/interfaces/ColorPickerChangeEvent.d.ts +29 -0
- package/colors/interfaces/ColorPickerFocusEvent.d.ts +20 -0
- package/colors/interfaces/ColorPickerGradientSettings.d.ts +29 -0
- package/colors/interfaces/ColorPickerPaletteSettings.d.ts +39 -0
- package/colors/interfaces/ColorPickerPopupSettings.d.ts +21 -0
- package/colors/interfaces/ColorPickerProps.d.ts +242 -0
- package/colors/interfaces/ColorPickerView.d.ts +17 -0
- package/colors/interfaces/PickerPopupSettings.d.ts +29 -0
- package/colors/interfaces/PickerProps.d.ts +57 -0
- package/colors/models/hsva.d.ts +16 -0
- package/colors/models/output-format.d.ts +11 -0
- package/colors/models/palette-presets.d.ts +60 -0
- package/colors/models/rgb.d.ts +15 -0
- package/colors/models/rgba.d.ts +16 -0
- package/colors/models/table-cell.d.ts +14 -0
- package/colors/models/tile-size.d.ts +18 -0
- package/colors/utils/color-cache.d.ts +37 -0
- package/colors/utils/color-palette.service.d.ts +19 -0
- package/colors/utils/color-parser.d.ts +72 -0
- package/colors/utils/color-parser.js +1 -1
- package/colors/utils/color-parser.mjs +1 -1
- package/colors/utils/misc.d.ts +23 -0
- package/colors/utils/svg-calc.d.ts +69 -0
- package/common/AdaptiveMode.d.ts +21 -0
- package/common/SliderTooltip.d.ts +25 -0
- package/common/SwitchController.d.ts +38 -0
- package/common/SwitchModel.d.ts +14 -0
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/index.d.mts +72 -5128
- package/index.d.ts +72 -5128
- package/input/Input.d.ts +119 -0
- package/input/Input.js +1 -1
- package/input/Input.mjs +45 -43
- package/input/InputClearValue.d.ts +28 -0
- package/input/InputPrefix.d.ts +30 -0
- package/input/InputSeparator.d.ts +30 -0
- package/input/InputSuffix.d.ts +32 -0
- package/input/InputValidationIcon.d.ts +21 -0
- package/input/interfaces/InputChangeEvent.d.ts +18 -0
- package/interfaces/Direction.d.ts +8 -0
- package/interfaces/ToggleBaseProps.d.ts +24 -0
- package/maskedtextbox/MaskedTextBox.d.ts +224 -0
- package/maskedtextbox/MaskedTextBox.js +1 -1
- package/maskedtextbox/MaskedTextBox.mjs +80 -79
- package/maskedtextbox/MaskedTextBoxProps.d.ts +273 -0
- package/maskedtextbox/masking.service.d.ts +48 -0
- package/maskedtextbox/masking.service.mjs +9 -9
- package/maskedtextbox/parsing/combinators.d.ts +16 -0
- package/maskedtextbox/parsing/parsers.d.ts +54 -0
- package/maskedtextbox/parsing/result.d.ts +30 -0
- package/maskedtextbox/parsing/stream.d.ts +29 -0
- package/maskedtextbox/utils.d.ts +23 -0
- package/messages/index.d.ts +177 -0
- package/numerictextbox/NumericTextBox.d.ts +21 -0
- package/numerictextbox/NumericTextBox.js +1 -1
- package/numerictextbox/NumericTextBox.mjs +161 -161
- package/numerictextbox/interfaces/NumericTextBoxBlurEvent.d.ts +14 -0
- package/numerictextbox/interfaces/NumericTextBoxChangeEvent.d.ts +18 -0
- package/numerictextbox/interfaces/NumericTextBoxFocusEvent.d.ts +14 -0
- package/numerictextbox/interfaces/NumericTextBoxHandle.d.ts +46 -0
- package/numerictextbox/interfaces/NumericTextBoxProps.d.ts +212 -0
- package/numerictextbox/interfaces/NumericTextBoxState.d.ts +22 -0
- package/numerictextbox/utils/index.d.ts +126 -0
- package/package-metadata.d.ts +12 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +10 -16
- package/package.json +10 -10
- package/radiobutton/RadioButton.d.ts +36 -0
- package/radiobutton/RadioButton.js +1 -1
- package/radiobutton/RadioButton.mjs +8 -8
- package/radiobutton/RadioGroup.d.ts +36 -0
- package/radiobutton/interfaces/RadioButtonBlurEvent.d.ts +14 -0
- package/radiobutton/interfaces/RadioButtonChangeEvent.d.ts +18 -0
- package/radiobutton/interfaces/RadioButtonFocusEvent.d.ts +14 -0
- package/radiobutton/interfaces/RadioButtonProps.d.ts +107 -0
- package/radiobutton/interfaces/RadioGroupChangeEvent.d.ts +18 -0
- package/radiobutton/interfaces/RadioGroupFocusEvent.d.ts +14 -0
- package/radiobutton/interfaces/RadioGroupProps.d.ts +178 -0
- package/range-slider/RangeSlider.d.ts +152 -0
- package/range-slider/range-raducer.d.ts +46 -0
- package/rating/Rating.d.ts +302 -0
- package/rating/Rating.mjs +3 -3
- package/rating/RatingItem.d.ts +111 -0
- package/rating/models/index.d.ts +91 -0
- package/rating/rating-reducer.d.ts +39 -0
- package/rating/utils/index.d.ts +31 -0
- package/signature/Signature.d.ts +21 -0
- package/signature/Signature.js +1 -1
- package/signature/Signature.mjs +26 -23
- package/signature/interfaces/SignatureBlurEvent.d.ts +14 -0
- package/signature/interfaces/SignatureChangeEvent.d.ts +18 -0
- package/signature/interfaces/SignatureCloseEvent.d.ts +14 -0
- package/signature/interfaces/SignatureFocusEvent.d.ts +14 -0
- package/signature/interfaces/SignatureHandle.d.ts +49 -0
- package/signature/interfaces/SignatureOpenEvent.d.ts +14 -0
- package/signature/interfaces/SignatureProps.d.ts +324 -0
- package/signature/interfaces/index.d.ts +14 -0
- package/signature/utils/index.d.ts +11 -0
- package/slider/Slider.d.ts +288 -0
- package/slider/Slider.mjs +9 -9
- package/slider/SliderLabel.d.ts +51 -0
- package/switch/Switch.d.ts +397 -0
- package/switch/Switch.js +1 -1
- package/switch/Switch.mjs +29 -22
- package/textarea/TextArea.d.ts +40 -0
- package/textarea/TextArea.js +1 -1
- package/textarea/TextArea.mjs +41 -41
- package/textarea/interfaces/TextAreaBlurEvent.d.ts +14 -0
- package/textarea/interfaces/TextAreaChangeEvent.d.ts +18 -0
- package/textarea/interfaces/TextAreaFocusEvent.d.ts +14 -0
- package/textarea/interfaces/TextAreaProps.d.ts +199 -0
- package/textbox/Textbox.d.ts +99 -0
- package/textbox/Textbox.js +1 -1
- package/textbox/Textbox.mjs +70 -66
- package/utils.d.ts +11 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { CheckboxProps } from './interfaces/CheckboxProps.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* The Checkbox ref.
|
|
12
|
+
*/
|
|
13
|
+
export interface CheckboxHandle {
|
|
14
|
+
/**
|
|
15
|
+
* The HTML input element of the Checkbox component.
|
|
16
|
+
*/
|
|
17
|
+
element: HTMLInputElement | null;
|
|
18
|
+
/**
|
|
19
|
+
* Focuses the Checkbox component.
|
|
20
|
+
*/
|
|
21
|
+
focus: any;
|
|
22
|
+
/**
|
|
23
|
+
* The value of the Checkbox component.
|
|
24
|
+
*/
|
|
25
|
+
value?: string | number | string[] | boolean | null;
|
|
26
|
+
/**
|
|
27
|
+
* The name of the Checkbox component.
|
|
28
|
+
*/
|
|
29
|
+
name?: string | null;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Represents the PropsContext of the `Checkbox` component.
|
|
33
|
+
* Used for global configuration of all `Checkbox` instances.
|
|
34
|
+
*
|
|
35
|
+
* For more information, refer to the [Inputs Props Context](https://www.telerik.com/kendo-react-ui/components/inputs/props-context) article.
|
|
36
|
+
*/
|
|
37
|
+
export declare const CheckboxPropsContext: React.Context<(p: CheckboxProps) => CheckboxProps>;
|
|
38
|
+
/**
|
|
39
|
+
* Represents the [KendoReact Checkbox component](https://www.telerik.com/kendo-react-ui/components/inputs/checkbox).
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```jsx
|
|
43
|
+
* const App = () => {
|
|
44
|
+
* return <Checkbox />;
|
|
45
|
+
* }
|
|
46
|
+
* const root = ReactDOM.createRoot(document.getElementById('app'));
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<CheckboxHandle | null>>;
|
package/checkbox/Checkbox.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ge=require("react"),e=require("prop-types"),o=require("@progress/kendo-react-common"),ye=require("@progress/kendo-react-intl"),I=require("../messages/index.js");function xe(
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ge=require("react"),e=require("prop-types"),o=require("@progress/kendo-react-common"),ye=require("@progress/kendo-react-intl"),I=require("../messages/index.js");function xe(s){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const r in s)if(r!=="default"){const p=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(u,r,p.get?p:{enumerable:!0,get:()=>s[r]})}}return u.default=s,Object.freeze(u)}const t=xe(ge),A=o.createPropsContext(),M=t.forwardRef((s,u)=>{const r=o.usePropsContext(A,s),{ariaDescribedBy:p,ariaLabelledBy:W,checked:O,className:G,labelClassName:J,children:Q,defaultChecked:X,disabled:n,defaultValue:Y,id:B,size:h=$.size,rounded:v=$.rounded,label:q,labelPlacement:z,name:Z,labelOptional:ee,onChange:C,onFocus:g,onBlur:y,tabIndex:te,value:i,required:k,valid:D,validationMessage:T,validityStyles:F,autoFocus:ae,visited:Pe,touched:Ve,modified:Ee,...ne}=r,l=t.useRef(null),K=t.useCallback(()=>{l.current&&l.current.focus()},[]),d=t.useCallback(()=>({element:l.current,focus:K,get name(){return l.current&&l.current.name}}),[K]);t.useImperativeHandle(u,d);const[oe,le]=t.useState(X),[ce,se]=t.useState(Y),R=typeof i=="boolean"||i===null,x=O!==void 0,b=R,P=b?i:ce,V=x?O:b?void 0:oe,w=V===void 0&&P,j=w?P:V,m=w||b?i===null?i:void 0:i||P,re=j===null||m===null,L=o.useId(),ie=ye.useLocalization(),_=a=>ie.toLanguageString(a,I.messages[a]),H=_(I.checkboxValidation),de=_(I.checkboxOptionalText),E=D!==void 0?D:k?!!V:!0;t.useEffect(()=>{l.current&&l.current.setCustomValidity&&l.current.setCustomValidity(E?"":T||H)},[E,T,H]);const f=t.useCallback((a,c)=>{!b&&!n&&(se(c),!x&&!n&&le(c)),C&&!n&&o.dispatchEvent(C,a,{...d(),value:c},{value:c})},[x,n,C,b,d]),ue=t.useCallback(a=>{const c=a.target.checked;f(a,c)},[f,i]),be=t.useCallback(a=>{if(n)return;const{keyCode:c}=a,Ce=a.currentTarget.checked;c===o.Keys.space&&(a.preventDefault(),a.stopPropagation(),f(a,!Ce))},[n,f]),pe=t.useCallback(a=>{if(n)return;const{keyCode:c}=a;c===o.Keys.space&&a.preventDefault()},[n]),ke=t.useCallback(a=>{g&&!n&&o.dispatchEvent(g,a,d(),void 0)},[g,n,d]),me=t.useCallback(a=>{y&&!n&&o.dispatchEvent(y,a,d(),void 0)},[y,n,d]),fe=o.useDir(l,r.dir),he=o.classNames("k-checkbox-wrap",G),U={type:"checkbox",className:o.classNames("k-checkbox",{[`k-checkbox-${o.kendoThemeMaps.sizeMap[h]||h}`]:h,[`k-rounded-${o.kendoThemeMaps.roundedMap[v]||v}`]:v,"k-indeterminate":re,"k-disabled":n,"k-invalid k-invalid":!(E||F!==void 0||F===!0)}),ref:l,name:Z,id:B||L,disabled:n,required:k!==void 0?k:!1,tabIndex:o.getTabIndex(te,n),role:"checkbox",checked:!!j,"aria-describedby":p,"aria-labelledby":W,"aria-disabled":n||void 0,"aria-required":k,autoFocus:ae,...ne,onChange:ue,onKeyDown:be,onKeyUp:pe,onFocus:ke,onBlur:me},ve=m===void 0?t.createElement("input",{...U}):t.createElement("input",{...U,value:R?void 0:m===null?"":m}),N=q!==void 0?t.createElement("label",{className:o.classNames("k-checkbox-label",J),htmlFor:B||L,style:{userSelect:"none"}},q,ee&&t.createElement("span",{className:"k-label-optional"},de)):null,S=t.createElement("span",{className:he},ve,Q);return t.createElement(t.Fragment,null,z==="before"?t.createElement("div",{dir:"rtl"},S,N):z==="after"?t.createElement("div",{dir:"ltr"},S,N):t.createElement("div",{dir:fe},S,N))});M.propTypes={checked:e.bool,className:e.string,defaultChecked:e.bool,defaultValue:e.any,dir:e.string,disabled:e.bool,id:e.string,size:e.oneOf(["small","medium","large"]),rounded:e.oneOf(["small","medium","large"]),ariaLabelledBy:e.string,ariaDescribedBy:e.string,label:e.any,labelPlacement:e.string,labelOptional:e.bool,name:e.string,tabIndex:e.number,value:e.any,validationMessage:e.string,required:e.bool,validate:e.bool,valid:e.bool,autoFocus:e.bool,onChange:e.func,onFocus:e.func,onBlur:e.func};const $={size:void 0,rounded:void 0};M.displayName="KendoCheckbox";exports.Checkbox=M;exports.CheckboxPropsContext=A;
|
package/checkbox/Checkbox.mjs
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as a from "react";
|
|
9
9
|
import e from "prop-types";
|
|
10
|
-
import { createPropsContext as ye, usePropsContext as xe, useId as Ve, dispatchEvent as V, Keys as H, useDir as Ee, classNames as E,
|
|
10
|
+
import { createPropsContext as ye, usePropsContext as xe, useId as Ve, dispatchEvent as V, Keys as H, useDir as Ee, classNames as E, getTabIndex as Pe, kendoThemeMaps as U } from "@progress/kendo-react-common";
|
|
11
11
|
import { useLocalization as Be } from "@progress/kendo-react-intl";
|
|
12
|
-
import { messages as Ie, checkboxValidation as
|
|
13
|
-
const
|
|
14
|
-
const P = xe(
|
|
12
|
+
import { messages as Ie, checkboxValidation as Ne, checkboxOptionalText as ze } from "../messages/index.mjs";
|
|
13
|
+
const Fe = ye(), A = a.forwardRef((W, j) => {
|
|
14
|
+
const P = xe(Fe, W), {
|
|
15
15
|
ariaDescribedBy: G,
|
|
16
16
|
ariaLabelledBy: J,
|
|
17
17
|
checked: B,
|
|
@@ -24,8 +24,8 @@ const ze = ye(), A = a.forwardRef((W, j) => {
|
|
|
24
24
|
id: I,
|
|
25
25
|
size: b = $.size,
|
|
26
26
|
rounded: m = $.rounded,
|
|
27
|
-
label:
|
|
28
|
-
labelPlacement:
|
|
27
|
+
label: N,
|
|
28
|
+
labelPlacement: z,
|
|
29
29
|
name: ee,
|
|
30
30
|
labelOptional: ae,
|
|
31
31
|
onChange: p,
|
|
@@ -34,7 +34,7 @@ const ze = ye(), A = a.forwardRef((W, j) => {
|
|
|
34
34
|
tabIndex: te,
|
|
35
35
|
value: s,
|
|
36
36
|
required: i,
|
|
37
|
-
valid:
|
|
37
|
+
valid: F,
|
|
38
38
|
validationMessage: M,
|
|
39
39
|
validityStyles: S,
|
|
40
40
|
autoFocus: oe,
|
|
@@ -42,57 +42,57 @@ const ze = ye(), A = a.forwardRef((W, j) => {
|
|
|
42
42
|
visited: Me,
|
|
43
43
|
touched: Se,
|
|
44
44
|
modified: De,
|
|
45
|
-
...
|
|
46
|
-
} = P,
|
|
47
|
-
|
|
45
|
+
...ne
|
|
46
|
+
} = P, n = a.useRef(null), D = a.useCallback(() => {
|
|
47
|
+
n.current && n.current.focus();
|
|
48
48
|
}, []), c = a.useCallback(
|
|
49
49
|
() => ({
|
|
50
|
-
element:
|
|
50
|
+
element: n.current,
|
|
51
51
|
focus: D,
|
|
52
52
|
get name() {
|
|
53
|
-
return
|
|
53
|
+
return n.current && n.current.name;
|
|
54
54
|
}
|
|
55
55
|
}),
|
|
56
56
|
[D]
|
|
57
57
|
);
|
|
58
58
|
a.useImperativeHandle(j, c);
|
|
59
|
-
const [
|
|
59
|
+
const [le, se] = a.useState(Z), [ce, re] = a.useState(_), K = typeof s == "boolean" || s === null, h = B !== void 0, r = K, v = r ? s : ce, C = h ? B : r ? void 0 : le, T = C === void 0 && v, w = T ? v : C, d = T || r ? s === null ? s : void 0 : s || v, ie = w === null || d === null, L = Ve(), de = Be(), O = (t) => de.toLanguageString(t, Ie[t]), q = O(Ne), ue = O(ze), g = F !== void 0 ? F : i ? !!C : !0;
|
|
60
60
|
a.useEffect(() => {
|
|
61
|
-
|
|
61
|
+
n.current && n.current.setCustomValidity && n.current.setCustomValidity(g ? "" : M || q);
|
|
62
62
|
}, [g, M, q]);
|
|
63
63
|
const u = a.useCallback(
|
|
64
|
-
(t,
|
|
65
|
-
!r && !o && (re(
|
|
64
|
+
(t, l) => {
|
|
65
|
+
!r && !o && (re(l), !h && !o && se(l)), p && !o && V(
|
|
66
66
|
p,
|
|
67
67
|
t,
|
|
68
68
|
{
|
|
69
69
|
...c(),
|
|
70
|
-
value:
|
|
70
|
+
value: l
|
|
71
71
|
},
|
|
72
|
-
{ value:
|
|
72
|
+
{ value: l }
|
|
73
73
|
);
|
|
74
74
|
},
|
|
75
75
|
[h, o, p, r, c]
|
|
76
76
|
), be = a.useCallback(
|
|
77
77
|
(t) => {
|
|
78
|
-
const
|
|
79
|
-
u(t,
|
|
78
|
+
const l = t.target.checked;
|
|
79
|
+
u(t, l);
|
|
80
80
|
},
|
|
81
81
|
[u, s]
|
|
82
82
|
), me = a.useCallback(
|
|
83
83
|
(t) => {
|
|
84
84
|
if (o)
|
|
85
85
|
return;
|
|
86
|
-
const { keyCode:
|
|
87
|
-
|
|
86
|
+
const { keyCode: l } = t, ge = t.currentTarget.checked;
|
|
87
|
+
l === H.space && (t.preventDefault(), t.stopPropagation(), u(t, !ge));
|
|
88
88
|
},
|
|
89
89
|
[o, u]
|
|
90
90
|
), pe = a.useCallback(
|
|
91
91
|
(t) => {
|
|
92
92
|
if (o)
|
|
93
93
|
return;
|
|
94
|
-
const { keyCode:
|
|
95
|
-
|
|
94
|
+
const { keyCode: l } = t;
|
|
95
|
+
l === H.space && t.preventDefault();
|
|
96
96
|
},
|
|
97
97
|
[o]
|
|
98
98
|
), ke = a.useCallback(
|
|
@@ -105,7 +105,7 @@ const ze = ye(), A = a.forwardRef((W, j) => {
|
|
|
105
105
|
f && !o && V(f, t, c(), void 0);
|
|
106
106
|
},
|
|
107
107
|
[f, o, c]
|
|
108
|
-
), he = Ee(
|
|
108
|
+
), he = Ee(n, P.dir), ve = E("k-checkbox-wrap", Q), R = {
|
|
109
109
|
type: "checkbox",
|
|
110
110
|
className: E("k-checkbox", {
|
|
111
111
|
[`k-checkbox-${U.sizeMap[b] || b}`]: b,
|
|
@@ -114,7 +114,7 @@ const ze = ye(), A = a.forwardRef((W, j) => {
|
|
|
114
114
|
"k-disabled": o,
|
|
115
115
|
"k-invalid k-invalid": !(g || S !== void 0 || S === !0)
|
|
116
116
|
}),
|
|
117
|
-
ref:
|
|
117
|
+
ref: n,
|
|
118
118
|
name: ee,
|
|
119
119
|
id: I || L,
|
|
120
120
|
disabled: o,
|
|
@@ -127,7 +127,7 @@ const ze = ye(), A = a.forwardRef((W, j) => {
|
|
|
127
127
|
"aria-disabled": o || void 0,
|
|
128
128
|
"aria-required": i,
|
|
129
129
|
autoFocus: oe,
|
|
130
|
-
...
|
|
130
|
+
...ne,
|
|
131
131
|
onChange: be,
|
|
132
132
|
onKeyDown: me,
|
|
133
133
|
onKeyUp: pe,
|
|
@@ -137,17 +137,17 @@ const ze = ye(), A = a.forwardRef((W, j) => {
|
|
|
137
137
|
// removing value prop is required due to bug in react where
|
|
138
138
|
// value set to undefined override default submit value
|
|
139
139
|
d === void 0 ? /* @__PURE__ */ a.createElement("input", { ...R }) : /* @__PURE__ */ a.createElement("input", { ...R, value: K ? void 0 : d === null ? "" : d })
|
|
140
|
-
), y =
|
|
140
|
+
), y = N !== void 0 ? /* @__PURE__ */ a.createElement(
|
|
141
141
|
"label",
|
|
142
142
|
{
|
|
143
143
|
className: E("k-checkbox-label", X),
|
|
144
144
|
htmlFor: I || L,
|
|
145
145
|
style: { userSelect: "none" }
|
|
146
146
|
},
|
|
147
|
-
|
|
147
|
+
N,
|
|
148
148
|
ae && /* @__PURE__ */ a.createElement("span", { className: "k-label-optional" }, ue)
|
|
149
149
|
) : null, x = /* @__PURE__ */ a.createElement("span", { className: ve }, Ce, Y);
|
|
150
|
-
return /* @__PURE__ */ a.createElement(a.Fragment, null,
|
|
150
|
+
return /* @__PURE__ */ a.createElement(a.Fragment, null, z === "before" ? /* @__PURE__ */ a.createElement("div", { dir: "rtl" }, x, y) : z === "after" ? /* @__PURE__ */ a.createElement("div", { dir: "ltr" }, x, y) : /* @__PURE__ */ a.createElement("div", { dir: he }, x, y));
|
|
151
151
|
});
|
|
152
152
|
A.propTypes = {
|
|
153
153
|
checked: e.bool,
|
|
@@ -157,8 +157,8 @@ A.propTypes = {
|
|
|
157
157
|
dir: e.string,
|
|
158
158
|
disabled: e.bool,
|
|
159
159
|
id: e.string,
|
|
160
|
-
size: e.oneOf([
|
|
161
|
-
rounded: e.oneOf([
|
|
160
|
+
size: e.oneOf(["small", "medium", "large"]),
|
|
161
|
+
rounded: e.oneOf(["small", "medium", "large"]),
|
|
162
162
|
ariaLabelledBy: e.string,
|
|
163
163
|
ariaDescribedBy: e.string,
|
|
164
164
|
label: e.any,
|
|
@@ -177,12 +177,11 @@ A.propTypes = {
|
|
|
177
177
|
onBlur: e.func
|
|
178
178
|
};
|
|
179
179
|
const $ = {
|
|
180
|
-
size:
|
|
181
|
-
rounded:
|
|
182
|
-
autoFocus: !1
|
|
180
|
+
size: void 0,
|
|
181
|
+
rounded: void 0
|
|
183
182
|
};
|
|
184
183
|
A.displayName = "KendoCheckbox";
|
|
185
184
|
export {
|
|
186
185
|
A as Checkbox,
|
|
187
|
-
|
|
186
|
+
Fe as CheckboxPropsContext
|
|
188
187
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { CheckboxHandle } from './../Checkbox.js';
|
|
9
|
+
import { BaseEvent } from '@progress/kendo-react-common';
|
|
10
|
+
/**
|
|
11
|
+
* The arguments for the `onBlur` Checkbox event.
|
|
12
|
+
*/
|
|
13
|
+
export interface CheckboxBlurEvent extends BaseEvent<CheckboxHandle> {
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { CheckboxHandle } from './../Checkbox.js';
|
|
9
|
+
import { BaseEvent } from '@progress/kendo-react-common';
|
|
10
|
+
/**
|
|
11
|
+
* The arguments for the `onChange` Checkbox event.
|
|
12
|
+
*/
|
|
13
|
+
export interface CheckboxChangeEvent extends BaseEvent<CheckboxHandle> {
|
|
14
|
+
/**
|
|
15
|
+
* The new value of the Checkbox.
|
|
16
|
+
*/
|
|
17
|
+
value: boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { CheckboxHandle } from './../Checkbox.js';
|
|
9
|
+
import { BaseEvent } from '@progress/kendo-react-common';
|
|
10
|
+
/**
|
|
11
|
+
* The arguments for the `onFocus` Checkbox event.
|
|
12
|
+
*/
|
|
13
|
+
export interface CheckboxFocusEvent extends BaseEvent<CheckboxHandle> {
|
|
14
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ToggleBaseProps } from '../../interfaces/ToggleBaseProps.js';
|
|
9
|
+
import { FormComponentProps } from '@progress/kendo-react-common';
|
|
10
|
+
import { CheckboxChangeEvent } from './CheckboxChangeEvent.js';
|
|
11
|
+
import { CheckboxFocusEvent } from './CheckboxFocusEvent.js';
|
|
12
|
+
import { CheckboxBlurEvent } from './CheckboxBlurEvent.js';
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
17
|
+
/**
|
|
18
|
+
* Represents the props of the [KendoReact Checkbox component](https://www.telerik.com/kendo-react-ui/components/inputs/checkbox).
|
|
19
|
+
* Extends the [native input props](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement).
|
|
20
|
+
*/
|
|
21
|
+
export interface CheckboxProps extends ToggleBaseProps, FormComponentProps, Omit<React.InputHTMLAttributes<HTMLInputElement>, 'checked' | 'value' | 'size' | 'onChange' | 'onFocus' | 'onBlur'> {
|
|
22
|
+
/**
|
|
23
|
+
* Sets the checked state of the Checkbox.
|
|
24
|
+
* Set to null to enable the indeterminate state of the Checkbox ([see example](https://www.telerik.com/kendo-react-ui/components/inputs/checkbox)).
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```jsx
|
|
28
|
+
* <Checkbox checked={true} />
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
checked?: boolean | null;
|
|
32
|
+
/**
|
|
33
|
+
* If the type is different than boolean and the `checked` property is provided it's passed to the underlying `input` element.
|
|
34
|
+
* If set to boolean and the `checked` property is omitted sets the checked state of the Checkbox.
|
|
35
|
+
* Set null to enable the indeterminate state of the Checkbox ([see example](https://www.telerik.com/kendo-react-ui/components/inputs/checkbox)).
|
|
36
|
+
*/
|
|
37
|
+
value?: string | number | string[] | boolean | null;
|
|
38
|
+
/**
|
|
39
|
+
* Sets the `className` of the wrapping element of the Checkbox.
|
|
40
|
+
*/
|
|
41
|
+
className?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Sets the `className` of the label element of the Checkbox.
|
|
44
|
+
*/
|
|
45
|
+
labelClassName?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The React elements that are passed as children to the rendered component.
|
|
48
|
+
*/
|
|
49
|
+
children?: any;
|
|
50
|
+
/**
|
|
51
|
+
* Sets the default value of checked attribute when used in uncontrolled mode ([see example](https://www.telerik.com/kendo-react-ui/components/inputs/switch/default-state)).
|
|
52
|
+
*/
|
|
53
|
+
defaultChecked?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* The default value of the Checkbox.
|
|
56
|
+
*/
|
|
57
|
+
defaultValue?: any;
|
|
58
|
+
/**
|
|
59
|
+
* Represents the `dir` HTML attribute. This is used to switch from LTR to RTL.
|
|
60
|
+
*/
|
|
61
|
+
dir?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Sets the disabled state of the Checkbox
|
|
64
|
+
* ([see example](https://www.telerik.com/kendo-react-ui/components/inputs/checkbox/disabled)).
|
|
65
|
+
*/
|
|
66
|
+
disabled?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Sets the `id` of the Checkbox.
|
|
69
|
+
*/
|
|
70
|
+
id?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Configures the `size` of the Checkbox.
|
|
73
|
+
*
|
|
74
|
+
* The available options are:
|
|
75
|
+
* - small
|
|
76
|
+
* - medium
|
|
77
|
+
* - large
|
|
78
|
+
* - null—Does not set a size `className`.
|
|
79
|
+
*
|
|
80
|
+
* @default `medium`
|
|
81
|
+
*/
|
|
82
|
+
size?: 'small' | 'medium' | 'large';
|
|
83
|
+
/**
|
|
84
|
+
* Configures the `rounded` style of the Checkbox.
|
|
85
|
+
*
|
|
86
|
+
* The available options are:
|
|
87
|
+
* - small
|
|
88
|
+
* - medium
|
|
89
|
+
* - large
|
|
90
|
+
* - null—Does not set a rounded `className`.
|
|
91
|
+
*
|
|
92
|
+
* @default `medium`
|
|
93
|
+
*/
|
|
94
|
+
rounded?: 'small' | 'medium' | 'large';
|
|
95
|
+
/**
|
|
96
|
+
* 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).
|
|
97
|
+
* For example these elements could contain error or hint message.
|
|
98
|
+
*/
|
|
99
|
+
ariaDescribedBy?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Identifies the element(s) which will label the component.
|
|
102
|
+
*/
|
|
103
|
+
ariaLabelledBy?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Sets the label of the Checkbox component ([see example](https://www.telerik.com/kendo-react-ui/components/inputs/checkbox/labels)).
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```jsx
|
|
109
|
+
* <Checkbox label="Accept Terms" />
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
label?: React.ReactNode;
|
|
113
|
+
/**
|
|
114
|
+
* Sets the label position of the Checkbox component ([see example](https://www.telerik.com/kendo-react-ui/components/inputs/checkbox/labels)).
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* ```jsx
|
|
118
|
+
* <Checkbox labelPlacement="before" />
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
labelPlacement?: 'before' | 'after';
|
|
122
|
+
/**
|
|
123
|
+
* Sets the optional text after the label of the Checkbox component.
|
|
124
|
+
*/
|
|
125
|
+
labelOptional?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Sets the `tabIndex` property of the Checkbox.
|
|
128
|
+
* Defaults to `0`.
|
|
129
|
+
*/
|
|
130
|
+
tabIndex?: number;
|
|
131
|
+
/**
|
|
132
|
+
* Represents the `autoFocus` HTML attribute that will be applied to the input element of the Checkbox. (Defaults to `false`)
|
|
133
|
+
*/
|
|
134
|
+
autoFocus?: boolean;
|
|
135
|
+
/**
|
|
136
|
+
* The event handler that will be fired when the user edits the value.
|
|
137
|
+
*/
|
|
138
|
+
onChange?: (event: CheckboxChangeEvent) => void;
|
|
139
|
+
/**
|
|
140
|
+
* The event handler that will be fired when Checkbox is focused.
|
|
141
|
+
*/
|
|
142
|
+
onFocus?: (event: CheckboxFocusEvent) => void;
|
|
143
|
+
/**
|
|
144
|
+
* The event handler that will be fired when Checkbox is blurred.
|
|
145
|
+
*/
|
|
146
|
+
onBlur?: (event: CheckboxBlurEvent) => void;
|
|
147
|
+
}
|
|
148
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { RGBA } from './models/rgba.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export interface ColorContrastLabelProps {
|
|
14
|
+
bgColor: RGBA;
|
|
15
|
+
rgba: RGBA;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
export declare class ColorContrastLabels extends React.Component<ColorContrastLabelProps, {}> {
|
|
21
|
+
render(): React.JSX.Element;
|
|
22
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { HSVA } from './models/hsva.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export interface ColorContrastSvgProps {
|
|
14
|
+
metrics: ClientRect | undefined;
|
|
15
|
+
backgroundColor: string;
|
|
16
|
+
hsva: HSVA;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @hidden
|
|
20
|
+
*/
|
|
21
|
+
export declare class ColorContrastSvg extends React.Component<ColorContrastSvgProps> {
|
|
22
|
+
renderSvgCurveLine(): string;
|
|
23
|
+
shouldComponentUpdate(nextProps: ColorContrastSvgProps): boolean;
|
|
24
|
+
render(): React.JSX.Element;
|
|
25
|
+
}
|