@yamada-ui/radio 0.4.3 → 0.5.0

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.
@@ -40,7 +40,7 @@ var useRadio = (props) => {
40
40
  const [isFocused, setFocused] = useState(false);
41
41
  const [isHovered, setHovered] = useState(false);
42
42
  const [isActive, setActive] = useState(false);
43
- const [isChecked, setIsChecked] = useState(!!props.defaultChecked);
43
+ const [isChecked, setIsChecked] = useState(!!props.defaultIsChecked);
44
44
  const isControlled = props.isChecked !== void 0;
45
45
  const checked = isControlled ? props.isChecked : isChecked;
46
46
  useEffect(() => {
@@ -218,7 +218,7 @@ var Radio = forwardRef(
218
218
  "name",
219
219
  "value",
220
220
  "defaultValue",
221
- "defaultChecked",
221
+ "defaultIsChecked",
222
222
  "isChecked",
223
223
  "onChange",
224
224
  "onBlur",
package/dist/index.js CHANGED
@@ -178,7 +178,7 @@ var useRadio = (props) => {
178
178
  const [isFocused, setFocused] = (0, import_react2.useState)(false);
179
179
  const [isHovered, setHovered] = (0, import_react2.useState)(false);
180
180
  const [isActive, setActive] = (0, import_react2.useState)(false);
181
- const [isChecked, setIsChecked] = (0, import_react2.useState)(!!props.defaultChecked);
181
+ const [isChecked, setIsChecked] = (0, import_react2.useState)(!!props.defaultIsChecked);
182
182
  const isControlled = props.isChecked !== void 0;
183
183
  const checked = isControlled ? props.isChecked : isChecked;
184
184
  (0, import_react2.useEffect)(() => {
@@ -356,7 +356,7 @@ var Radio = (0, import_react2.forwardRef)(
356
356
  "name",
357
357
  "value",
358
358
  "defaultValue",
359
- "defaultChecked",
359
+ "defaultIsChecked",
360
360
  "isChecked",
361
361
  "onChange",
362
362
  "onBlur",
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  RadioGroup,
5
5
  useRadio,
6
6
  useRadioGroup
7
- } from "./chunk-GSD74F4W.mjs";
7
+ } from "./chunk-DYAHEFLQ.mjs";
8
8
  export {
9
9
  Radio,
10
10
  RadioGroup,
@@ -60,7 +60,7 @@ declare const useRadioGroup: <Y extends string | number = string>({ id, name, is
60
60
  onChange: (ev: ChangeEvent<HTMLInputElement> | Y) => void;
61
61
  }>;
62
62
  };
63
- type UseRadioGroupReturn = ReturnType<typeof useRadioGroup>;
63
+ type UseRadioGroupReturn<Y extends string | number = string> = ReturnType<typeof useRadioGroup<Y>>;
64
64
  type RadioGroupProps<Y extends string | number = string> = ThemeProps<"Radio"> & Omit<FlexProps, "onChange"> & UseRadioGroupProps<Y> & FormControlOptions & {
65
65
  /**
66
66
  * If provided, generate radios based on items.
@@ -60,7 +60,7 @@ declare const useRadioGroup: <Y extends string | number = string>({ id, name, is
60
60
  onChange: (ev: ChangeEvent<HTMLInputElement> | Y) => void;
61
61
  }>;
62
62
  };
63
- type UseRadioGroupReturn = ReturnType<typeof useRadioGroup>;
63
+ type UseRadioGroupReturn<Y extends string | number = string> = ReturnType<typeof useRadioGroup<Y>>;
64
64
  type RadioGroupProps<Y extends string | number = string> = ThemeProps<"Radio"> & Omit<FlexProps, "onChange"> & UseRadioGroupProps<Y> & FormControlOptions & {
65
65
  /**
66
66
  * If provided, generate radios based on items.
@@ -45,7 +45,7 @@ var useRadio = (props) => {
45
45
  const [isFocused, setFocused] = (0, import_react.useState)(false);
46
46
  const [isHovered, setHovered] = (0, import_react.useState)(false);
47
47
  const [isActive, setActive] = (0, import_react.useState)(false);
48
- const [isChecked, setIsChecked] = (0, import_react.useState)(!!props.defaultChecked);
48
+ const [isChecked, setIsChecked] = (0, import_react.useState)(!!props.defaultIsChecked);
49
49
  const isControlled = props.isChecked !== void 0;
50
50
  const checked = isControlled ? props.isChecked : isChecked;
51
51
  (0, import_react.useEffect)(() => {
@@ -223,7 +223,7 @@ var Radio = (0, import_react.forwardRef)(
223
223
  "name",
224
224
  "value",
225
225
  "defaultValue",
226
- "defaultChecked",
226
+ "defaultIsChecked",
227
227
  "isChecked",
228
228
  "onChange",
229
229
  "onBlur",
@@ -3,7 +3,7 @@ import {
3
3
  RadioGroup,
4
4
  useRadioGroup,
5
5
  useRadioGroupContenxt
6
- } from "./chunk-GSD74F4W.mjs";
6
+ } from "./chunk-DYAHEFLQ.mjs";
7
7
  export {
8
8
  RadioGroup,
9
9
  useRadioGroup,
package/dist/radio.d.mts CHANGED
@@ -21,7 +21,7 @@ type UseRadioProps<Y extends string | number = string> = FormControlOptions & {
21
21
  *
22
22
  * @default false
23
23
  */
24
- defaultChecked?: boolean;
24
+ defaultIsChecked?: boolean;
25
25
  /**
26
26
  * If `true`, the radio will be checked.
27
27
  *
@@ -51,7 +51,7 @@ type RadioOptions = {
51
51
  labelProps?: HTMLUIProps<"span">;
52
52
  };
53
53
  type RadioProps<Y extends string | number = string> = Omit<HTMLUIProps<"label">, keyof UseRadioProps> & ThemeProps<"Radio"> & UseRadioProps<Y> & RadioOptions;
54
- declare const Radio: (<Y extends string | number = string>(props: Omit<HTMLUIProps<"label">, "value" | "name" | "id" | "onChange" | "defaultChecked" | keyof FormControlOptions | "isChecked"> & ThemeProps<"Radio"> & FormControlOptions & {
54
+ declare const Radio: (<Y extends string | number = string>(props: Omit<HTMLUIProps<"label">, "value" | "name" | "id" | "onChange" | keyof FormControlOptions | "defaultIsChecked" | "isChecked"> & ThemeProps<"Radio"> & FormControlOptions & {
55
55
  /**
56
56
  * id assigned to input.
57
57
  */
@@ -69,7 +69,7 @@ declare const Radio: (<Y extends string | number = string>(props: Omit<HTMLUIPro
69
69
  *
70
70
  * @default false
71
71
  */
72
- defaultChecked?: boolean | undefined;
72
+ defaultIsChecked?: boolean | undefined;
73
73
  /**
74
74
  * If `true`, the radio will be checked.
75
75
  *
package/dist/radio.d.ts CHANGED
@@ -21,7 +21,7 @@ type UseRadioProps<Y extends string | number = string> = FormControlOptions & {
21
21
  *
22
22
  * @default false
23
23
  */
24
- defaultChecked?: boolean;
24
+ defaultIsChecked?: boolean;
25
25
  /**
26
26
  * If `true`, the radio will be checked.
27
27
  *
@@ -51,7 +51,7 @@ type RadioOptions = {
51
51
  labelProps?: HTMLUIProps<"span">;
52
52
  };
53
53
  type RadioProps<Y extends string | number = string> = Omit<HTMLUIProps<"label">, keyof UseRadioProps> & ThemeProps<"Radio"> & UseRadioProps<Y> & RadioOptions;
54
- declare const Radio: (<Y extends string | number = string>(props: Omit<HTMLUIProps<"label">, "value" | "name" | "id" | "onChange" | "defaultChecked" | keyof FormControlOptions | "isChecked"> & ThemeProps<"Radio"> & FormControlOptions & {
54
+ declare const Radio: (<Y extends string | number = string>(props: Omit<HTMLUIProps<"label">, "value" | "name" | "id" | "onChange" | keyof FormControlOptions | "defaultIsChecked" | "isChecked"> & ThemeProps<"Radio"> & FormControlOptions & {
55
55
  /**
56
56
  * id assigned to input.
57
57
  */
@@ -69,7 +69,7 @@ declare const Radio: (<Y extends string | number = string>(props: Omit<HTMLUIPro
69
69
  *
70
70
  * @default false
71
71
  */
72
- defaultChecked?: boolean | undefined;
72
+ defaultIsChecked?: boolean | undefined;
73
73
  /**
74
74
  * If `true`, the radio will be checked.
75
75
  *
package/dist/radio.js CHANGED
@@ -174,7 +174,7 @@ var useRadio = (props) => {
174
174
  const [isFocused, setFocused] = (0, import_react2.useState)(false);
175
175
  const [isHovered, setHovered] = (0, import_react2.useState)(false);
176
176
  const [isActive, setActive] = (0, import_react2.useState)(false);
177
- const [isChecked, setIsChecked] = (0, import_react2.useState)(!!props.defaultChecked);
177
+ const [isChecked, setIsChecked] = (0, import_react2.useState)(!!props.defaultIsChecked);
178
178
  const isControlled = props.isChecked !== void 0;
179
179
  const checked = isControlled ? props.isChecked : isChecked;
180
180
  (0, import_react2.useEffect)(() => {
@@ -352,7 +352,7 @@ var Radio = (0, import_react2.forwardRef)(
352
352
  "name",
353
353
  "value",
354
354
  "defaultValue",
355
- "defaultChecked",
355
+ "defaultIsChecked",
356
356
  "isChecked",
357
357
  "onChange",
358
358
  "onBlur",
package/dist/radio.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  Radio,
4
4
  useRadio
5
- } from "./chunk-GSD74F4W.mjs";
5
+ } from "./chunk-DYAHEFLQ.mjs";
6
6
  export {
7
7
  Radio,
8
8
  useRadio
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamada-ui/radio",
3
- "version": "0.4.3",
3
+ "version": "0.5.0",
4
4
  "description": "Yamada UI radio component",
5
5
  "keywords": [
6
6
  "yamada",