@taikai/rocket-kit 3.0.7 → 3.0.8
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/molecules/checkbox-group/index.d.ts +9 -2
- package/dist/rocket-kit.cjs.development.js +6 -2
- package/dist/rocket-kit.cjs.development.js.map +1 -1
- package/dist/rocket-kit.cjs.production.min.js +1 -1
- package/dist/rocket-kit.cjs.production.min.js.map +1 -1
- package/dist/rocket-kit.esm.js +6 -2
- package/dist/rocket-kit.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import React, { CSSProperties } from 'react';
|
|
2
|
+
import { CheckboxProps } from '../../atoms/checkbox';
|
|
2
3
|
export declare type CheckboxItem = {
|
|
3
4
|
value: string;
|
|
4
5
|
label?: string | React.ReactNode;
|
|
5
|
-
checked?: boolean;
|
|
6
|
+
checked?: boolean | null;
|
|
7
|
+
/** The item changes can be tracked here
|
|
8
|
+
* or inside the `CheckboxGroup' onChange`
|
|
9
|
+
*/
|
|
6
10
|
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
7
11
|
error?: string;
|
|
8
12
|
disabled?: boolean;
|
|
@@ -16,7 +20,10 @@ export interface CheckboxGroupProps {
|
|
|
16
20
|
children?: React.ReactNode;
|
|
17
21
|
options?: CheckboxItem[];
|
|
18
22
|
error?: string;
|
|
19
|
-
|
|
23
|
+
/** The item changes can be tracked here
|
|
24
|
+
* or inside the `CheckboxItem' onChange`
|
|
25
|
+
*/
|
|
26
|
+
onChange?: CheckboxProps['onChange'];
|
|
20
27
|
disabled?: boolean;
|
|
21
28
|
}
|
|
22
29
|
declare const CheckboxGroup: (props: CheckboxGroupProps) => React.JSX.Element;
|
|
@@ -5277,8 +5277,12 @@ const CheckboxGroup = props => {
|
|
|
5277
5277
|
}, /*#__PURE__*/React__default.createElement(Checkbox, {
|
|
5278
5278
|
label: value.label,
|
|
5279
5279
|
value: value.value,
|
|
5280
|
-
checked: value.checked,
|
|
5281
|
-
onChange:
|
|
5280
|
+
checked: value.checked ?? undefined,
|
|
5281
|
+
onChange: event => {
|
|
5282
|
+
var _value$onChange;
|
|
5283
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
|
5284
|
+
(_value$onChange = value.onChange) === null || _value$onChange === void 0 ? void 0 : _value$onChange.call(value, event);
|
|
5285
|
+
},
|
|
5282
5286
|
error: !!error,
|
|
5283
5287
|
disabled: disabled
|
|
5284
5288
|
}))) : null, error ? /*#__PURE__*/React__default.createElement(ErrorField, {
|