@true-engineering/true-react-common-ui-kit 3.0.0-alpha.8 → 3.0.0-alpha.9

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.
@@ -3,7 +3,7 @@ import { ICommonProps } from '../../types';
3
3
  import { ICheckboxStyles } from './Checkbox.styles';
4
4
  export interface ICheckboxProps<V> extends ICommonProps<ICheckboxStyles> {
5
5
  children?: ReactNode;
6
- isChecked?: boolean;
6
+ isChecked: boolean | undefined;
7
7
  isSemiChecked?: boolean;
8
8
  isDisabled?: boolean;
9
9
  isReadonly?: boolean;
@@ -5,7 +5,7 @@ import { ISwitchStyles } from './Switch.styles';
5
5
  export interface ISwitchProps<V extends string> extends ICommonProps<ISwitchStyles> {
6
6
  children?: ReactNode;
7
7
  value: V;
8
- isChecked: boolean;
8
+ isChecked: boolean | undefined;
9
9
  isDisabled?: boolean;
10
10
  isInvalid?: boolean;
11
11
  /**
@@ -27699,7 +27699,7 @@ function _object_spread_props$5(target, source) {
27699
27699
  return target;
27700
27700
  }
27701
27701
  var Switch = function(param) {
27702
- var isDisabled = param.isDisabled, isChecked = param.isChecked, isInvalid = param.isInvalid, value = param.value, children = param.children, _param_labelPosition = param.labelPosition, labelPosition = _param_labelPosition === void 0 ? "right" : _param_labelPosition, _param_color = param.color, color = _param_color === void 0 ? "primary" : _param_color, data = param.data, tweakStyles = param.tweakStyles, testId = param.testId, onChange = param.onChange;
27702
+ var isDisabled = param.isDisabled, _param_isChecked = param.isChecked, isChecked = _param_isChecked === void 0 ? false : _param_isChecked, isInvalid = param.isInvalid, value = param.value, children = param.children, _param_labelPosition = param.labelPosition, labelPosition = _param_labelPosition === void 0 ? "right" : _param_labelPosition, _param_color = param.color, color = _param_color === void 0 ? "primary" : _param_color, data = param.data, tweakStyles = param.tweakStyles, testId = param.testId, onChange = param.onChange;
27703
27703
  var classes = useStyles$5({
27704
27704
  theme: tweakStyles
27705
27705
  });
@@ -27689,7 +27689,7 @@
27689
27689
  return target;
27690
27690
  }
27691
27691
  var Switch = function(param) {
27692
- var isDisabled = param.isDisabled, isChecked = param.isChecked, isInvalid = param.isInvalid, value = param.value, children = param.children, _param_labelPosition = param.labelPosition, labelPosition = _param_labelPosition === void 0 ? "right" : _param_labelPosition, _param_color = param.color, color = _param_color === void 0 ? "primary" : _param_color, data = param.data, tweakStyles = param.tweakStyles, testId = param.testId, onChange = param.onChange;
27692
+ var isDisabled = param.isDisabled, _param_isChecked = param.isChecked, isChecked = _param_isChecked === void 0 ? false : _param_isChecked, isInvalid = param.isInvalid, value = param.value, children = param.children, _param_labelPosition = param.labelPosition, labelPosition = _param_labelPosition === void 0 ? "right" : _param_labelPosition, _param_color = param.color, color = _param_color === void 0 ? "primary" : _param_color, data = param.data, tweakStyles = param.tweakStyles, testId = param.testId, onChange = param.onChange;
27693
27693
  var classes = useStyles$5({
27694
27694
  theme: tweakStyles
27695
27695
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@true-engineering/true-react-common-ui-kit",
3
- "version": "3.0.0-alpha.8",
3
+ "version": "3.0.0-alpha.9",
4
4
  "description": "True Engineering React UI Kit with theming support",
5
5
  "author": "True Engineering (https://trueengineering.ru)",
6
6
  "keywords": [
@@ -12,7 +12,7 @@ import { useStyles, ICheckboxStyles } from './Checkbox.styles';
12
12
 
13
13
  export interface ICheckboxProps<V> extends ICommonProps<ICheckboxStyles> {
14
14
  children?: ReactNode;
15
- isChecked?: boolean;
15
+ isChecked: boolean | undefined;
16
16
  isSemiChecked?: boolean;
17
17
  isDisabled?: boolean;
18
18
  isReadonly?: boolean;
@@ -9,7 +9,7 @@ import { useStyles, ISwitchStyles } from './Switch.styles';
9
9
  export interface ISwitchProps<V extends string> extends ICommonProps<ISwitchStyles> {
10
10
  children?: ReactNode;
11
11
  value: V;
12
- isChecked: boolean;
12
+ isChecked: boolean | undefined;
13
13
  isDisabled?: boolean;
14
14
  isInvalid?: boolean;
15
15
  /**
@@ -25,7 +25,7 @@ export interface ISwitchProps<V extends string> extends ICommonProps<ISwitchStyl
25
25
 
26
26
  export const Switch = <V extends string>({
27
27
  isDisabled,
28
- isChecked,
28
+ isChecked = false,
29
29
  isInvalid,
30
30
  value,
31
31
  children,