@true-engineering/true-react-common-ui-kit 4.0.0-alpha42 → 4.0.0-alpha44

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.
@@ -1,2 +1,3 @@
1
1
  export * from './Checkbox';
2
2
  export type { ICheckboxStyles } from './Checkbox.styles';
3
+ export * from './types';
@@ -1,10 +1,12 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ICommonProps } from '../../types';
3
+ import { IRadioButtonSize } from './types';
3
4
  import { IRadioButtonStyles } from './RadioButton.styles';
4
5
  export interface IRadioButtonProps<Value extends string> extends ICommonProps<IRadioButtonStyles> {
5
6
  children?: ReactNode;
6
7
  value: Value;
7
8
  groupName: string;
9
+ size?: IRadioButtonSize;
8
10
  isChecked?: boolean;
9
11
  /** @default false */
10
12
  isDisabled?: boolean;
@@ -12,4 +14,4 @@ export interface IRadioButtonProps<Value extends string> extends ICommonProps<IR
12
14
  isInvalid?: boolean;
13
15
  onChange: (value: Value) => void | Promise<void>;
14
16
  }
15
- export declare function RadioButton<Value extends string>({ children, value, groupName, isChecked, isDisabled, isInvalid, data, testId, tweakStyles, onChange, }: IRadioButtonProps<Value>): JSX.Element;
17
+ export declare function RadioButton<Value extends string>({ children, value, groupName, size, isChecked, isDisabled, isInvalid, data, testId, tweakStyles, onChange, }: IRadioButtonProps<Value>): JSX.Element;
@@ -1,3 +1,4 @@
1
1
  import { ITweakStyles } from '../../theme';
2
+ import { IRadioButtonSizes } from './types';
2
3
  export declare const useStyles: import("../../theme").IUseStyles<"content" | "input" | "isDisabled" | "label" | "isInvalid", unknown>;
3
- export type IRadioButtonStyles = ITweakStyles<typeof useStyles>;
4
+ export type IRadioButtonStyles = ITweakStyles<typeof useStyles, IRadioButtonSizes>;
@@ -1,2 +1,3 @@
1
1
  export * from './RadioButton';
2
2
  export type { IRadioButtonStyles } from './RadioButton.styles';
3
+ export * from './types';
@@ -0,0 +1,3 @@
1
+ export interface IRadioButtonSizes {
2
+ }
3
+ export type IRadioButtonSize = keyof IRadioButtonSizes;
@@ -28689,15 +28689,15 @@ function _object_spread_props$c(target, source) {
28689
28689
  return target;
28690
28690
  }
28691
28691
  function RadioButton(param) {
28692
- var children = param.children, value = param.value, groupName = param.groupName, isChecked = param.isChecked, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, _param_isInvalid = param.isInvalid, isInvalid = _param_isInvalid === void 0 ? false : _param_isInvalid, data = param.data, testId = param.testId, tweakStyles = param.tweakStyles, onChange = param.onChange;
28692
+ var children = param.children, value = param.value, groupName = param.groupName, size2 = param.size, isChecked = param.isChecked, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, _param_isInvalid = param.isInvalid, isInvalid = _param_isInvalid === void 0 ? false : _param_isInvalid, data = param.data, testId = param.testId, tweakStyles = param.tweakStyles, onChange = param.onChange;
28693
28693
  var classes = useStyles$8({
28694
28694
  theme: tweakStyles
28695
28695
  });
28696
28696
  var _obj2;
28697
28697
  return /* @__PURE__ */ jsxs("label", _object_spread_props$c(_object_spread$c({
28698
- className: clsx(classes.label, isDisabled && classes.isDisabled),
28698
+ className: clsx(classes.label, isNotEmpty(size2) && classes[size2], _define_property$c({}, classes.isDisabled, isDisabled)),
28699
28699
  htmlFor: "".concat(groupName, "--").concat(value)
28700
- }, addDataTestId(testId), addDataAttributes(data)), {
28700
+ }, addDataAttributes$1(data, testId)), {
28701
28701
  children: [
28702
28702
  /* @__PURE__ */ jsx("input", {
28703
28703
  id: "".concat(groupName, "--").concat(value),