@progress/kendo-react-inputs 5.17.0-dev.202308141334 → 5.17.0-dev.202308171202

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.
@@ -51,9 +51,9 @@ export var Checkbox = React.forwardRef(function (directProps, target) {
51
51
  var _a;
52
52
  validatePackage(packageMetadata);
53
53
  var props = usePropsContext(CheckboxPropsContext, directProps);
54
- var _b = props, ariaDescribedBy = _b.ariaDescribedBy, ariaLabelledBy = _b.ariaLabelledBy, checked = _b.checked, className = _b.className, children = _b.children, defaultChecked = _b.defaultChecked, disabled = _b.disabled, defaultValue = _b.defaultValue, id = _b.id, size = _b.size, rounded = _b.rounded, label = _b.label, labelPlacement = _b.labelPlacement, name = _b.name, labelOptional = _b.labelOptional, onChange = _b.onChange, onFocus = _b.onFocus, onBlur = _b.onBlur, tabIndex = _b.tabIndex, value = _b.value, required = _b.required, valid = _b.valid, validationMessage = _b.validationMessage, validityStyles = _b.validityStyles,
54
+ var _b = props, ariaDescribedBy = _b.ariaDescribedBy, ariaLabelledBy = _b.ariaLabelledBy, checked = _b.checked, className = _b.className, labelClassName = _b.labelClassName, children = _b.children, defaultChecked = _b.defaultChecked, disabled = _b.disabled, defaultValue = _b.defaultValue, id = _b.id, size = _b.size, rounded = _b.rounded, label = _b.label, labelPlacement = _b.labelPlacement, name = _b.name, labelOptional = _b.labelOptional, onChange = _b.onChange, onFocus = _b.onFocus, onBlur = _b.onBlur, tabIndex = _b.tabIndex, value = _b.value, required = _b.required, valid = _b.valid, validationMessage = _b.validationMessage, validityStyles = _b.validityStyles,
55
55
  // Removed to support direct use in Form Field component
56
- visited = _b.visited, touched = _b.touched, modified = _b.modified, others = __rest(_b, ["ariaDescribedBy", "ariaLabelledBy", "checked", "className", "children", "defaultChecked", "disabled", "defaultValue", "id", "size", "rounded", "label", "labelPlacement", "name", "labelOptional", "onChange", "onFocus", "onBlur", "tabIndex", "value", "required", "valid", "validationMessage", "validityStyles", "visited", "touched", "modified"]);
56
+ visited = _b.visited, touched = _b.touched, modified = _b.modified, others = __rest(_b, ["ariaDescribedBy", "ariaLabelledBy", "checked", "className", "labelClassName", "children", "defaultChecked", "disabled", "defaultValue", "id", "size", "rounded", "label", "labelPlacement", "name", "labelOptional", "onChange", "onFocus", "onBlur", "tabIndex", "value", "required", "valid", "validationMessage", "validityStyles", "visited", "touched", "modified"]);
57
57
  var elementRef = React.useRef(null);
58
58
  var focusElement = React.useCallback(function () {
59
59
  if (elementRef.current) {
@@ -159,7 +159,7 @@ export var Checkbox = React.forwardRef(function (directProps, target) {
159
159
  // removing value prop is required due to bug in react where
160
160
  // value set to undefined override default submit value
161
161
  valueProp === undefined ? (React.createElement("input", __assign({}, inputProps))) : (React.createElement("input", __assign({}, inputProps, { value: valueIsBoolean ? undefined : valueProp === null ? '' : valueProp })))));
162
- var checkboxLabel = (React.createElement(React.Fragment, null, label !== undefined ? (React.createElement("label", { className: 'k-checkbox-label', htmlFor: id || calculatedId, style: { userSelect: 'none' } },
162
+ var checkboxLabel = (React.createElement(React.Fragment, null, label !== undefined ? (React.createElement("label", { className: classNames('k-checkbox-label', labelClassName), htmlFor: id || calculatedId, style: { userSelect: 'none' } },
163
163
  label,
164
164
  labelOptional && React.createElement("span", { className: "k-label-optional" }, optionalMessage))) : null));
165
165
  return (React.createElement(React.Fragment, null, (labelPlacement === 'before') ? (React.createElement("span", { className: checkboxClasses, dir: 'rtl' },
@@ -28,6 +28,10 @@ export interface CheckboxProps extends ToggleBaseProps, FormComponentProps, Omit
28
28
  * Sets the `className` of the wrapping element of the Checkbox.
29
29
  */
30
30
  className?: string;
31
+ /**
32
+ * Sets the `className` of the label element of the Checkbox.
33
+ */
34
+ labelClassName?: string;
31
35
  /**
32
36
  * The React elements that are passed as children to the rendered component.
33
37
  */
@@ -15,6 +15,10 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
15
15
  * Renders a floating label for the Input component.
16
16
  */
17
17
  label?: string;
18
+ /**
19
+ * Sets a `className` for the floating label.
20
+ */
21
+ labelClassName?: string;
18
22
  /**
19
23
  * Represents the Input value.
20
24
  */
@@ -55,6 +59,7 @@ export declare class InputWithoutContext extends React.Component<InputProps, Inp
55
59
  */
56
60
  static propTypes: {
57
61
  label: PropTypes.Requireable<string>;
62
+ labelClassName: PropTypes.Requireable<string>;
58
63
  validationMessage: PropTypes.Requireable<string>;
59
64
  required: PropTypes.Requireable<boolean>;
60
65
  validate: PropTypes.Requireable<boolean>;
@@ -199,9 +199,9 @@ var InputWithoutContext = /** @class */ (function (_super) {
199
199
  */
200
200
  InputWithoutContext.prototype.render = function () {
201
201
  var _this = this;
202
- var _a = this.props, className = _a.className, label = _a.label, id = _a.id, validationMessage = _a.validationMessage, defaultValue = _a.defaultValue, valid = _a.valid,
202
+ var _a = this.props, className = _a.className, label = _a.label, labelClassName = _a.labelClassName, id = _a.id, validationMessage = _a.validationMessage, defaultValue = _a.defaultValue, valid = _a.valid,
203
203
  // Removed to support direct use in Form Field component
204
- visited = _a.visited, touched = _a.touched, modified = _a.modified, ariaLabelledBy = _a.ariaLabelledBy, ariaDescribedBy = _a.ariaDescribedBy, validityStyles = _a.validityStyles, style = _a.style, ariaLabel = _a.ariaLabel, props = __rest(_a, ["className", "label", "id", "validationMessage", "defaultValue", "valid", "visited", "touched", "modified", "ariaLabelledBy", "ariaDescribedBy", "validityStyles", "style", "ariaLabel"]);
204
+ visited = _a.visited, touched = _a.touched, modified = _a.modified, ariaLabelledBy = _a.ariaLabelledBy, ariaDescribedBy = _a.ariaDescribedBy, validityStyles = _a.validityStyles, style = _a.style, ariaLabel = _a.ariaLabel, props = __rest(_a, ["className", "label", "labelClassName", "id", "validationMessage", "defaultValue", "valid", "visited", "touched", "modified", "ariaLabelledBy", "ariaDescribedBy", "validityStyles", "style", "ariaLabel"]);
205
205
  var inputId = id || this._inputId;
206
206
  var isValid = !this.validityStyles || this.validity.valid;
207
207
  var inputClassName = classNames(className, 'k-input k-input-md k-rounded-md k-input-solid');
@@ -211,7 +211,7 @@ var InputWithoutContext = /** @class */ (function (_super) {
211
211
  _this._input = el;
212
212
  } })));
213
213
  return label ?
214
- (React.createElement(FloatingLabel, { label: label, editorId: inputId, editorValue: String(this.value), editorValid: isValid, editorDisabled: props.disabled, editorPlaceholder: props.placeholder, children: textbox, style: style, dir: props.dir }))
214
+ (React.createElement(FloatingLabel, { label: label, labelClassName: labelClassName, editorId: inputId, editorValue: String(this.value), editorValid: isValid, editorDisabled: props.disabled, editorPlaceholder: props.placeholder, children: textbox, style: style, dir: props.dir }))
215
215
  : textbox;
216
216
  };
217
217
  InputWithoutContext.displayName = 'Input';
@@ -220,6 +220,7 @@ var InputWithoutContext = /** @class */ (function (_super) {
220
220
  */
221
221
  InputWithoutContext.propTypes = {
222
222
  label: PropTypes.string,
223
+ labelClassName: PropTypes.string,
223
224
  validationMessage: PropTypes.string,
224
225
  required: PropTypes.bool,
225
226
  validate: PropTypes.bool,
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-react-inputs',
6
6
  productName: 'KendoReact',
7
7
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
8
- publishDate: 1692018124,
8
+ publishDate: 1692271414,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
11
11
  };
@@ -54,9 +54,9 @@ exports.Checkbox = React.forwardRef(function (directProps, target) {
54
54
  var _a;
55
55
  (0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
56
56
  var props = (0, kendo_react_common_1.usePropsContext)(exports.CheckboxPropsContext, directProps);
57
- var _b = props, ariaDescribedBy = _b.ariaDescribedBy, ariaLabelledBy = _b.ariaLabelledBy, checked = _b.checked, className = _b.className, children = _b.children, defaultChecked = _b.defaultChecked, disabled = _b.disabled, defaultValue = _b.defaultValue, id = _b.id, size = _b.size, rounded = _b.rounded, label = _b.label, labelPlacement = _b.labelPlacement, name = _b.name, labelOptional = _b.labelOptional, onChange = _b.onChange, onFocus = _b.onFocus, onBlur = _b.onBlur, tabIndex = _b.tabIndex, value = _b.value, required = _b.required, valid = _b.valid, validationMessage = _b.validationMessage, validityStyles = _b.validityStyles,
57
+ var _b = props, ariaDescribedBy = _b.ariaDescribedBy, ariaLabelledBy = _b.ariaLabelledBy, checked = _b.checked, className = _b.className, labelClassName = _b.labelClassName, children = _b.children, defaultChecked = _b.defaultChecked, disabled = _b.disabled, defaultValue = _b.defaultValue, id = _b.id, size = _b.size, rounded = _b.rounded, label = _b.label, labelPlacement = _b.labelPlacement, name = _b.name, labelOptional = _b.labelOptional, onChange = _b.onChange, onFocus = _b.onFocus, onBlur = _b.onBlur, tabIndex = _b.tabIndex, value = _b.value, required = _b.required, valid = _b.valid, validationMessage = _b.validationMessage, validityStyles = _b.validityStyles,
58
58
  // Removed to support direct use in Form Field component
59
- visited = _b.visited, touched = _b.touched, modified = _b.modified, others = __rest(_b, ["ariaDescribedBy", "ariaLabelledBy", "checked", "className", "children", "defaultChecked", "disabled", "defaultValue", "id", "size", "rounded", "label", "labelPlacement", "name", "labelOptional", "onChange", "onFocus", "onBlur", "tabIndex", "value", "required", "valid", "validationMessage", "validityStyles", "visited", "touched", "modified"]);
59
+ visited = _b.visited, touched = _b.touched, modified = _b.modified, others = __rest(_b, ["ariaDescribedBy", "ariaLabelledBy", "checked", "className", "labelClassName", "children", "defaultChecked", "disabled", "defaultValue", "id", "size", "rounded", "label", "labelPlacement", "name", "labelOptional", "onChange", "onFocus", "onBlur", "tabIndex", "value", "required", "valid", "validationMessage", "validityStyles", "visited", "touched", "modified"]);
60
60
  var elementRef = React.useRef(null);
61
61
  var focusElement = React.useCallback(function () {
62
62
  if (elementRef.current) {
@@ -162,7 +162,7 @@ exports.Checkbox = React.forwardRef(function (directProps, target) {
162
162
  // removing value prop is required due to bug in react where
163
163
  // value set to undefined override default submit value
164
164
  valueProp === undefined ? (React.createElement("input", __assign({}, inputProps))) : (React.createElement("input", __assign({}, inputProps, { value: valueIsBoolean ? undefined : valueProp === null ? '' : valueProp })))));
165
- var checkboxLabel = (React.createElement(React.Fragment, null, label !== undefined ? (React.createElement("label", { className: 'k-checkbox-label', htmlFor: id || calculatedId, style: { userSelect: 'none' } },
165
+ var checkboxLabel = (React.createElement(React.Fragment, null, label !== undefined ? (React.createElement("label", { className: (0, kendo_react_common_1.classNames)('k-checkbox-label', labelClassName), htmlFor: id || calculatedId, style: { userSelect: 'none' } },
166
166
  label,
167
167
  labelOptional && React.createElement("span", { className: "k-label-optional" }, optionalMessage))) : null));
168
168
  return (React.createElement(React.Fragment, null, (labelPlacement === 'before') ? (React.createElement("span", { className: checkboxClasses, dir: 'rtl' },
@@ -28,6 +28,10 @@ export interface CheckboxProps extends ToggleBaseProps, FormComponentProps, Omit
28
28
  * Sets the `className` of the wrapping element of the Checkbox.
29
29
  */
30
30
  className?: string;
31
+ /**
32
+ * Sets the `className` of the label element of the Checkbox.
33
+ */
34
+ labelClassName?: string;
31
35
  /**
32
36
  * The React elements that are passed as children to the rendered component.
33
37
  */
@@ -15,6 +15,10 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
15
15
  * Renders a floating label for the Input component.
16
16
  */
17
17
  label?: string;
18
+ /**
19
+ * Sets a `className` for the floating label.
20
+ */
21
+ labelClassName?: string;
18
22
  /**
19
23
  * Represents the Input value.
20
24
  */
@@ -55,6 +59,7 @@ export declare class InputWithoutContext extends React.Component<InputProps, Inp
55
59
  */
56
60
  static propTypes: {
57
61
  label: PropTypes.Requireable<string>;
62
+ labelClassName: PropTypes.Requireable<string>;
58
63
  validationMessage: PropTypes.Requireable<string>;
59
64
  required: PropTypes.Requireable<boolean>;
60
65
  validate: PropTypes.Requireable<boolean>;
@@ -202,9 +202,9 @@ var InputWithoutContext = /** @class */ (function (_super) {
202
202
  */
203
203
  InputWithoutContext.prototype.render = function () {
204
204
  var _this = this;
205
- var _a = this.props, className = _a.className, label = _a.label, id = _a.id, validationMessage = _a.validationMessage, defaultValue = _a.defaultValue, valid = _a.valid,
205
+ var _a = this.props, className = _a.className, label = _a.label, labelClassName = _a.labelClassName, id = _a.id, validationMessage = _a.validationMessage, defaultValue = _a.defaultValue, valid = _a.valid,
206
206
  // Removed to support direct use in Form Field component
207
- visited = _a.visited, touched = _a.touched, modified = _a.modified, ariaLabelledBy = _a.ariaLabelledBy, ariaDescribedBy = _a.ariaDescribedBy, validityStyles = _a.validityStyles, style = _a.style, ariaLabel = _a.ariaLabel, props = __rest(_a, ["className", "label", "id", "validationMessage", "defaultValue", "valid", "visited", "touched", "modified", "ariaLabelledBy", "ariaDescribedBy", "validityStyles", "style", "ariaLabel"]);
207
+ visited = _a.visited, touched = _a.touched, modified = _a.modified, ariaLabelledBy = _a.ariaLabelledBy, ariaDescribedBy = _a.ariaDescribedBy, validityStyles = _a.validityStyles, style = _a.style, ariaLabel = _a.ariaLabel, props = __rest(_a, ["className", "label", "labelClassName", "id", "validationMessage", "defaultValue", "valid", "visited", "touched", "modified", "ariaLabelledBy", "ariaDescribedBy", "validityStyles", "style", "ariaLabel"]);
208
208
  var inputId = id || this._inputId;
209
209
  var isValid = !this.validityStyles || this.validity.valid;
210
210
  var inputClassName = (0, kendo_react_common_1.classNames)(className, 'k-input k-input-md k-rounded-md k-input-solid');
@@ -214,7 +214,7 @@ var InputWithoutContext = /** @class */ (function (_super) {
214
214
  _this._input = el;
215
215
  } })));
216
216
  return label ?
217
- (React.createElement(kendo_react_labels_1.FloatingLabel, { label: label, editorId: inputId, editorValue: String(this.value), editorValid: isValid, editorDisabled: props.disabled, editorPlaceholder: props.placeholder, children: textbox, style: style, dir: props.dir }))
217
+ (React.createElement(kendo_react_labels_1.FloatingLabel, { label: label, labelClassName: labelClassName, editorId: inputId, editorValue: String(this.value), editorValid: isValid, editorDisabled: props.disabled, editorPlaceholder: props.placeholder, children: textbox, style: style, dir: props.dir }))
218
218
  : textbox;
219
219
  };
220
220
  InputWithoutContext.displayName = 'Input';
@@ -223,6 +223,7 @@ var InputWithoutContext = /** @class */ (function (_super) {
223
223
  */
224
224
  InputWithoutContext.propTypes = {
225
225
  label: PropTypes.string,
226
+ labelClassName: PropTypes.string,
226
227
  validationMessage: PropTypes.string,
227
228
  required: PropTypes.bool,
228
229
  validate: PropTypes.bool,
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-react-inputs',
9
9
  productName: 'KendoReact',
10
10
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
11
- publishDate: 1692018124,
11
+ publishDate: 1692271414,
12
12
  version: '',
13
13
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
14
14
  };