@yamada-ui/checkbox 1.0.35 → 1.0.36-dev-20240624102031
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/dist/checkbox-group.d.mts +8 -6
- package/dist/checkbox-group.d.ts +8 -6
- package/dist/checkbox.d.mts +31 -29
- package/dist/checkbox.d.ts +31 -29
- package/package.json +5 -5
|
@@ -38,10 +38,10 @@ declare const useCheckboxGroup: <Y extends string | number = string, M extends D
|
|
|
38
38
|
setValue: react.Dispatch<react.SetStateAction<Y[]>>;
|
|
39
39
|
onChange: (evOrValue: ChangeEvent<HTMLInputElement> | Y) => void;
|
|
40
40
|
getCheckboxProps: UIPropGetter<"input", {
|
|
41
|
-
value?: Y
|
|
41
|
+
value?: Y;
|
|
42
42
|
}, {
|
|
43
|
-
value?: Y
|
|
44
|
-
isChecked?: boolean
|
|
43
|
+
value?: Y;
|
|
44
|
+
isChecked?: boolean;
|
|
45
45
|
}>;
|
|
46
46
|
};
|
|
47
47
|
type UseCheckboxGroupReturn<Y extends string | number = string> = ReturnType<typeof useCheckboxGroup<Y>>;
|
|
@@ -59,8 +59,10 @@ type CheckboxContext = ThemeProps<"Checkbox"> & FormControlOptions & {
|
|
|
59
59
|
};
|
|
60
60
|
declare const useCheckboxGroupContext: () => CheckboxContext | undefined;
|
|
61
61
|
|
|
62
|
-
declare const CheckboxGroup:
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
declare const CheckboxGroup: {
|
|
63
|
+
<Y extends string | number = string>(props: CheckboxGroupProps<Y> & {
|
|
64
|
+
ref?: Ref<HTMLDivElement>;
|
|
65
|
+
}): JSX.Element;
|
|
66
|
+
} & ComponentArgs;
|
|
65
67
|
|
|
66
68
|
export { CheckboxGroup, type CheckboxGroupProps, type CheckboxItem, type UseCheckboxGroupProps, type UseCheckboxGroupReturn, useCheckboxGroup, useCheckboxGroupContext };
|
package/dist/checkbox-group.d.ts
CHANGED
|
@@ -38,10 +38,10 @@ declare const useCheckboxGroup: <Y extends string | number = string, M extends D
|
|
|
38
38
|
setValue: react.Dispatch<react.SetStateAction<Y[]>>;
|
|
39
39
|
onChange: (evOrValue: ChangeEvent<HTMLInputElement> | Y) => void;
|
|
40
40
|
getCheckboxProps: UIPropGetter<"input", {
|
|
41
|
-
value?: Y
|
|
41
|
+
value?: Y;
|
|
42
42
|
}, {
|
|
43
|
-
value?: Y
|
|
44
|
-
isChecked?: boolean
|
|
43
|
+
value?: Y;
|
|
44
|
+
isChecked?: boolean;
|
|
45
45
|
}>;
|
|
46
46
|
};
|
|
47
47
|
type UseCheckboxGroupReturn<Y extends string | number = string> = ReturnType<typeof useCheckboxGroup<Y>>;
|
|
@@ -59,8 +59,10 @@ type CheckboxContext = ThemeProps<"Checkbox"> & FormControlOptions & {
|
|
|
59
59
|
};
|
|
60
60
|
declare const useCheckboxGroupContext: () => CheckboxContext | undefined;
|
|
61
61
|
|
|
62
|
-
declare const CheckboxGroup:
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
declare const CheckboxGroup: {
|
|
63
|
+
<Y extends string | number = string>(props: CheckboxGroupProps<Y> & {
|
|
64
|
+
ref?: Ref<HTMLDivElement>;
|
|
65
|
+
}): JSX.Element;
|
|
66
|
+
} & ComponentArgs;
|
|
65
67
|
|
|
66
68
|
export { CheckboxGroup, type CheckboxGroupProps, type CheckboxItem, type UseCheckboxGroupProps, type UseCheckboxGroupReturn, useCheckboxGroup, useCheckboxGroupContext };
|
package/dist/checkbox.d.mts
CHANGED
|
@@ -72,23 +72,23 @@ declare const useCheckbox: <Y extends string | number = string, M extends Dict =
|
|
|
72
72
|
onFocus: (event: react.FocusEvent<HTMLElement, Element>) => void;
|
|
73
73
|
onBlur: (event: react.FocusEvent<HTMLElement, Element>) => void;
|
|
74
74
|
} & Omit<FormControlOptions & {
|
|
75
|
-
id?: string
|
|
75
|
+
id?: string;
|
|
76
76
|
onFocus?: FocusEventHandler<HTMLElement> | undefined;
|
|
77
77
|
onBlur?: FocusEventHandler<HTMLElement> | undefined;
|
|
78
|
-
disabled?: boolean
|
|
79
|
-
readOnly?: boolean
|
|
80
|
-
required?: boolean
|
|
78
|
+
disabled?: boolean;
|
|
79
|
+
readOnly?: boolean;
|
|
80
|
+
required?: boolean;
|
|
81
81
|
} & {
|
|
82
82
|
id: string;
|
|
83
83
|
} & Omit<FormControlOptions & {
|
|
84
84
|
/**
|
|
85
85
|
* id assigned to input.
|
|
86
86
|
*/
|
|
87
|
-
id?: string
|
|
87
|
+
id?: string;
|
|
88
88
|
/**
|
|
89
89
|
* The HTML `name` attribute used for forms.
|
|
90
90
|
*/
|
|
91
|
-
name?: string
|
|
91
|
+
name?: string;
|
|
92
92
|
/**
|
|
93
93
|
* The value to be used in the checkbox input.
|
|
94
94
|
*/
|
|
@@ -98,35 +98,35 @@ declare const useCheckbox: <Y extends string | number = string, M extends Dict =
|
|
|
98
98
|
*
|
|
99
99
|
* @default false
|
|
100
100
|
*/
|
|
101
|
-
defaultIsChecked?: boolean
|
|
101
|
+
defaultIsChecked?: boolean;
|
|
102
102
|
/**
|
|
103
103
|
* If `true`, the checkbox will be checked.
|
|
104
104
|
*
|
|
105
105
|
* @default false
|
|
106
106
|
*/
|
|
107
|
-
isChecked?: boolean
|
|
107
|
+
isChecked?: boolean;
|
|
108
108
|
/**
|
|
109
109
|
* If `true`, the checkbox will be indeterminate.
|
|
110
110
|
*
|
|
111
111
|
* @default false
|
|
112
112
|
*/
|
|
113
|
-
isIndeterminate?: boolean
|
|
113
|
+
isIndeterminate?: boolean;
|
|
114
114
|
/**
|
|
115
115
|
* The callback invoked when the checked state changes.
|
|
116
116
|
*/
|
|
117
|
-
onChange?: ChangeEventHandler<HTMLInputElement
|
|
117
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
118
118
|
/**
|
|
119
119
|
* The callback invoked when the checkbox is focused.
|
|
120
120
|
*/
|
|
121
|
-
onFocus?: FocusEventHandler<HTMLInputElement
|
|
121
|
+
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
122
122
|
/**
|
|
123
123
|
* The callback invoked when the checkbox is blurred.
|
|
124
124
|
*/
|
|
125
|
-
onBlur?: FocusEventHandler<HTMLInputElement
|
|
125
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
126
126
|
/**
|
|
127
127
|
* The tab-index property of the underlying input element.
|
|
128
128
|
*/
|
|
129
|
-
tabIndex?: number
|
|
129
|
+
tabIndex?: number;
|
|
130
130
|
} & M, "id">, "id" | "onFocus" | "onBlur" | "isRequired" | "isDisabled" | "isInvalid" | "isReadOnly" | "disabled" | "readOnly" | "required">, "id" | "tabIndex" | "onFocus" | "onBlur" | "onChange" | "name" | "value" | "defaultIsChecked" | "isChecked" | "isIndeterminate" | "disabled" | "readOnly" | "required">, any>;
|
|
131
131
|
isFocusVisible: boolean;
|
|
132
132
|
isFocused: boolean;
|
|
@@ -134,23 +134,23 @@ declare const useCheckbox: <Y extends string | number = string, M extends Dict =
|
|
|
134
134
|
isActive: boolean;
|
|
135
135
|
isChecked: boolean;
|
|
136
136
|
isIndeterminate: (FormControlOptions & {
|
|
137
|
-
id?: string
|
|
137
|
+
id?: string;
|
|
138
138
|
onFocus?: FocusEventHandler<HTMLElement> | undefined;
|
|
139
139
|
onBlur?: FocusEventHandler<HTMLElement> | undefined;
|
|
140
|
-
disabled?: boolean
|
|
141
|
-
readOnly?: boolean
|
|
142
|
-
required?: boolean
|
|
140
|
+
disabled?: boolean;
|
|
141
|
+
readOnly?: boolean;
|
|
142
|
+
required?: boolean;
|
|
143
143
|
} & {
|
|
144
144
|
id: string;
|
|
145
145
|
} & Omit<FormControlOptions & {
|
|
146
146
|
/**
|
|
147
147
|
* id assigned to input.
|
|
148
148
|
*/
|
|
149
|
-
id?: string
|
|
149
|
+
id?: string;
|
|
150
150
|
/**
|
|
151
151
|
* The HTML `name` attribute used for forms.
|
|
152
152
|
*/
|
|
153
|
-
name?: string
|
|
153
|
+
name?: string;
|
|
154
154
|
/**
|
|
155
155
|
* The value to be used in the checkbox input.
|
|
156
156
|
*/
|
|
@@ -160,35 +160,35 @@ declare const useCheckbox: <Y extends string | number = string, M extends Dict =
|
|
|
160
160
|
*
|
|
161
161
|
* @default false
|
|
162
162
|
*/
|
|
163
|
-
defaultIsChecked?: boolean
|
|
163
|
+
defaultIsChecked?: boolean;
|
|
164
164
|
/**
|
|
165
165
|
* If `true`, the checkbox will be checked.
|
|
166
166
|
*
|
|
167
167
|
* @default false
|
|
168
168
|
*/
|
|
169
|
-
isChecked?: boolean
|
|
169
|
+
isChecked?: boolean;
|
|
170
170
|
/**
|
|
171
171
|
* If `true`, the checkbox will be indeterminate.
|
|
172
172
|
*
|
|
173
173
|
* @default false
|
|
174
174
|
*/
|
|
175
|
-
isIndeterminate?: boolean
|
|
175
|
+
isIndeterminate?: boolean;
|
|
176
176
|
/**
|
|
177
177
|
* The callback invoked when the checked state changes.
|
|
178
178
|
*/
|
|
179
|
-
onChange?: ChangeEventHandler<HTMLInputElement
|
|
179
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
180
180
|
/**
|
|
181
181
|
* The callback invoked when the checkbox is focused.
|
|
182
182
|
*/
|
|
183
|
-
onFocus?: FocusEventHandler<HTMLInputElement
|
|
183
|
+
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
184
184
|
/**
|
|
185
185
|
* The callback invoked when the checkbox is blurred.
|
|
186
186
|
*/
|
|
187
|
-
onBlur?: FocusEventHandler<HTMLInputElement
|
|
187
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
188
188
|
/**
|
|
189
189
|
* The tab-index property of the underlying input element.
|
|
190
190
|
*/
|
|
191
|
-
tabIndex?: number
|
|
191
|
+
tabIndex?: number;
|
|
192
192
|
} & M, "id">)["isIndeterminate"] | undefined;
|
|
193
193
|
getContainerProps: UIPropGetter;
|
|
194
194
|
getIconProps: UIPropGetter;
|
|
@@ -218,9 +218,11 @@ type CheckboxProps<Y extends string | number = string> = Omit<Merge<HTMLUIProps<
|
|
|
218
218
|
*
|
|
219
219
|
* @see Docs https://yamada-ui.com/components/forms/checkbox
|
|
220
220
|
*/
|
|
221
|
-
declare const Checkbox:
|
|
222
|
-
|
|
223
|
-
|
|
221
|
+
declare const Checkbox: {
|
|
222
|
+
<Y extends string | number = string>(props: CheckboxProps<Y> & {
|
|
223
|
+
ref?: Ref<HTMLInputElement>;
|
|
224
|
+
}): JSX.Element;
|
|
225
|
+
} & ComponentArgs;
|
|
224
226
|
type CheckboxIconProps = HTMLUIProps<"svg"> & SVGMotionProps<SVGSVGElement> & FormControlOptions & {
|
|
225
227
|
/**
|
|
226
228
|
* If `true`, the icon will be indeterminate.
|
package/dist/checkbox.d.ts
CHANGED
|
@@ -72,23 +72,23 @@ declare const useCheckbox: <Y extends string | number = string, M extends Dict =
|
|
|
72
72
|
onFocus: (event: react.FocusEvent<HTMLElement, Element>) => void;
|
|
73
73
|
onBlur: (event: react.FocusEvent<HTMLElement, Element>) => void;
|
|
74
74
|
} & Omit<FormControlOptions & {
|
|
75
|
-
id?: string
|
|
75
|
+
id?: string;
|
|
76
76
|
onFocus?: FocusEventHandler<HTMLElement> | undefined;
|
|
77
77
|
onBlur?: FocusEventHandler<HTMLElement> | undefined;
|
|
78
|
-
disabled?: boolean
|
|
79
|
-
readOnly?: boolean
|
|
80
|
-
required?: boolean
|
|
78
|
+
disabled?: boolean;
|
|
79
|
+
readOnly?: boolean;
|
|
80
|
+
required?: boolean;
|
|
81
81
|
} & {
|
|
82
82
|
id: string;
|
|
83
83
|
} & Omit<FormControlOptions & {
|
|
84
84
|
/**
|
|
85
85
|
* id assigned to input.
|
|
86
86
|
*/
|
|
87
|
-
id?: string
|
|
87
|
+
id?: string;
|
|
88
88
|
/**
|
|
89
89
|
* The HTML `name` attribute used for forms.
|
|
90
90
|
*/
|
|
91
|
-
name?: string
|
|
91
|
+
name?: string;
|
|
92
92
|
/**
|
|
93
93
|
* The value to be used in the checkbox input.
|
|
94
94
|
*/
|
|
@@ -98,35 +98,35 @@ declare const useCheckbox: <Y extends string | number = string, M extends Dict =
|
|
|
98
98
|
*
|
|
99
99
|
* @default false
|
|
100
100
|
*/
|
|
101
|
-
defaultIsChecked?: boolean
|
|
101
|
+
defaultIsChecked?: boolean;
|
|
102
102
|
/**
|
|
103
103
|
* If `true`, the checkbox will be checked.
|
|
104
104
|
*
|
|
105
105
|
* @default false
|
|
106
106
|
*/
|
|
107
|
-
isChecked?: boolean
|
|
107
|
+
isChecked?: boolean;
|
|
108
108
|
/**
|
|
109
109
|
* If `true`, the checkbox will be indeterminate.
|
|
110
110
|
*
|
|
111
111
|
* @default false
|
|
112
112
|
*/
|
|
113
|
-
isIndeterminate?: boolean
|
|
113
|
+
isIndeterminate?: boolean;
|
|
114
114
|
/**
|
|
115
115
|
* The callback invoked when the checked state changes.
|
|
116
116
|
*/
|
|
117
|
-
onChange?: ChangeEventHandler<HTMLInputElement
|
|
117
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
118
118
|
/**
|
|
119
119
|
* The callback invoked when the checkbox is focused.
|
|
120
120
|
*/
|
|
121
|
-
onFocus?: FocusEventHandler<HTMLInputElement
|
|
121
|
+
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
122
122
|
/**
|
|
123
123
|
* The callback invoked when the checkbox is blurred.
|
|
124
124
|
*/
|
|
125
|
-
onBlur?: FocusEventHandler<HTMLInputElement
|
|
125
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
126
126
|
/**
|
|
127
127
|
* The tab-index property of the underlying input element.
|
|
128
128
|
*/
|
|
129
|
-
tabIndex?: number
|
|
129
|
+
tabIndex?: number;
|
|
130
130
|
} & M, "id">, "id" | "onFocus" | "onBlur" | "isRequired" | "isDisabled" | "isInvalid" | "isReadOnly" | "disabled" | "readOnly" | "required">, "id" | "tabIndex" | "onFocus" | "onBlur" | "onChange" | "name" | "value" | "defaultIsChecked" | "isChecked" | "isIndeterminate" | "disabled" | "readOnly" | "required">, any>;
|
|
131
131
|
isFocusVisible: boolean;
|
|
132
132
|
isFocused: boolean;
|
|
@@ -134,23 +134,23 @@ declare const useCheckbox: <Y extends string | number = string, M extends Dict =
|
|
|
134
134
|
isActive: boolean;
|
|
135
135
|
isChecked: boolean;
|
|
136
136
|
isIndeterminate: (FormControlOptions & {
|
|
137
|
-
id?: string
|
|
137
|
+
id?: string;
|
|
138
138
|
onFocus?: FocusEventHandler<HTMLElement> | undefined;
|
|
139
139
|
onBlur?: FocusEventHandler<HTMLElement> | undefined;
|
|
140
|
-
disabled?: boolean
|
|
141
|
-
readOnly?: boolean
|
|
142
|
-
required?: boolean
|
|
140
|
+
disabled?: boolean;
|
|
141
|
+
readOnly?: boolean;
|
|
142
|
+
required?: boolean;
|
|
143
143
|
} & {
|
|
144
144
|
id: string;
|
|
145
145
|
} & Omit<FormControlOptions & {
|
|
146
146
|
/**
|
|
147
147
|
* id assigned to input.
|
|
148
148
|
*/
|
|
149
|
-
id?: string
|
|
149
|
+
id?: string;
|
|
150
150
|
/**
|
|
151
151
|
* The HTML `name` attribute used for forms.
|
|
152
152
|
*/
|
|
153
|
-
name?: string
|
|
153
|
+
name?: string;
|
|
154
154
|
/**
|
|
155
155
|
* The value to be used in the checkbox input.
|
|
156
156
|
*/
|
|
@@ -160,35 +160,35 @@ declare const useCheckbox: <Y extends string | number = string, M extends Dict =
|
|
|
160
160
|
*
|
|
161
161
|
* @default false
|
|
162
162
|
*/
|
|
163
|
-
defaultIsChecked?: boolean
|
|
163
|
+
defaultIsChecked?: boolean;
|
|
164
164
|
/**
|
|
165
165
|
* If `true`, the checkbox will be checked.
|
|
166
166
|
*
|
|
167
167
|
* @default false
|
|
168
168
|
*/
|
|
169
|
-
isChecked?: boolean
|
|
169
|
+
isChecked?: boolean;
|
|
170
170
|
/**
|
|
171
171
|
* If `true`, the checkbox will be indeterminate.
|
|
172
172
|
*
|
|
173
173
|
* @default false
|
|
174
174
|
*/
|
|
175
|
-
isIndeterminate?: boolean
|
|
175
|
+
isIndeterminate?: boolean;
|
|
176
176
|
/**
|
|
177
177
|
* The callback invoked when the checked state changes.
|
|
178
178
|
*/
|
|
179
|
-
onChange?: ChangeEventHandler<HTMLInputElement
|
|
179
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
180
180
|
/**
|
|
181
181
|
* The callback invoked when the checkbox is focused.
|
|
182
182
|
*/
|
|
183
|
-
onFocus?: FocusEventHandler<HTMLInputElement
|
|
183
|
+
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
184
184
|
/**
|
|
185
185
|
* The callback invoked when the checkbox is blurred.
|
|
186
186
|
*/
|
|
187
|
-
onBlur?: FocusEventHandler<HTMLInputElement
|
|
187
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
188
188
|
/**
|
|
189
189
|
* The tab-index property of the underlying input element.
|
|
190
190
|
*/
|
|
191
|
-
tabIndex?: number
|
|
191
|
+
tabIndex?: number;
|
|
192
192
|
} & M, "id">)["isIndeterminate"] | undefined;
|
|
193
193
|
getContainerProps: UIPropGetter;
|
|
194
194
|
getIconProps: UIPropGetter;
|
|
@@ -218,9 +218,11 @@ type CheckboxProps<Y extends string | number = string> = Omit<Merge<HTMLUIProps<
|
|
|
218
218
|
*
|
|
219
219
|
* @see Docs https://yamada-ui.com/components/forms/checkbox
|
|
220
220
|
*/
|
|
221
|
-
declare const Checkbox:
|
|
222
|
-
|
|
223
|
-
|
|
221
|
+
declare const Checkbox: {
|
|
222
|
+
<Y extends string | number = string>(props: CheckboxProps<Y> & {
|
|
223
|
+
ref?: Ref<HTMLInputElement>;
|
|
224
|
+
}): JSX.Element;
|
|
225
|
+
} & ComponentArgs;
|
|
224
226
|
type CheckboxIconProps = HTMLUIProps<"svg"> & SVGMotionProps<SVGSVGElement> & FormControlOptions & {
|
|
225
227
|
/**
|
|
226
228
|
* If `true`, the icon will be indeterminate.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamada-ui/checkbox",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.36-dev-20240624102031",
|
|
4
4
|
"description": "Yamada UI checkbox component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yamada",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"url": "https://github.com/yamada-ui/yamada-ui/issues"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@yamada-ui/core": "1.
|
|
39
|
+
"@yamada-ui/core": "1.9.0-dev-20240624102031",
|
|
40
40
|
"@yamada-ui/utils": "1.3.0",
|
|
41
|
-
"@yamada-ui/layouts": "1.1.
|
|
42
|
-
"@yamada-ui/form-control": "1.1.
|
|
43
|
-
"@yamada-ui/motion": "2.0.
|
|
41
|
+
"@yamada-ui/layouts": "1.1.27-dev-20240624102031",
|
|
42
|
+
"@yamada-ui/form-control": "1.1.5-dev-20240624102031",
|
|
43
|
+
"@yamada-ui/motion": "2.0.1-dev-20240624102031",
|
|
44
44
|
"@yamada-ui/use-focus-visible": "1.1.2",
|
|
45
45
|
"@yamada-ui/use-controllable-state": "1.0.15"
|
|
46
46
|
},
|