@citygross/components 0.13.9 → 0.13.10
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/build/@types/components/FormElements/Checkbox/Checkbox.d.ts +2 -2
- package/build/cjs/components/src/components/FormElements/Checkbox/Checkbox.js +2 -2
- package/build/cjs/components/src/components/ListItem/ListItem.js +1 -1
- package/build/es/components/src/components/FormElements/Checkbox/Checkbox.js +2 -2
- package/build/es/components/src/components/ListItem/ListItem.js +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'react';
|
|
2
2
|
export declare type TCheckbox = {
|
|
3
|
+
hideLabel?: boolean;
|
|
3
4
|
label: string;
|
|
4
|
-
showLabel?: boolean;
|
|
5
5
|
} & InputHTMLAttributes<HTMLInputElement>;
|
|
6
|
-
export declare const Checkbox: ({
|
|
6
|
+
export declare const Checkbox: ({ hideLabel, label, ...props }: TCheckbox) => JSX.Element;
|
|
@@ -16,7 +16,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
16
16
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
17
|
|
|
18
18
|
var Checkbox = function (_a) {
|
|
19
|
-
var
|
|
19
|
+
var hideLabel = _a.hideLabel, label = _a.label, props = _tslib.__rest(_a, ["hideLabel", "label"]);
|
|
20
20
|
var checked = props.checked, disabled = props.disabled;
|
|
21
21
|
var _b = formElement.getColorAttributes(checked, disabled), iconColor = _b.iconColor, labelColor = _b.labelColor, attributes = _tslib.__rest(_b, ["iconColor", "labelColor"]);
|
|
22
22
|
return (React__default["default"].createElement(FormElement_styles.OptionInputWrapper, { as: "label", disabled: disabled },
|
|
@@ -24,7 +24,7 @@ var Checkbox = function (_a) {
|
|
|
24
24
|
React__default["default"].createElement(Checkbox_styles.CheckboxContainer, { attributes: attributes },
|
|
25
25
|
React__default["default"].createElement(Checkbox_styles.IconContainer, null,
|
|
26
26
|
React__default["default"].createElement(icons.Icons.CheckMark, { color: iconColor }))),
|
|
27
|
-
|
|
27
|
+
hideLabel ? (React__default["default"].createElement(ScreenReader.ScreenReader, { string: label })) : (React__default["default"].createElement(typography.BodyText, { color: labelColor, size: typography.TextTypes.TextSize.SMALL }, label))));
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
exports.Checkbox = Checkbox;
|
|
@@ -46,7 +46,7 @@ var ListItem = function (_a) {
|
|
|
46
46
|
if (checkbox.onChange) {
|
|
47
47
|
checkbox.onChange(e.target.checked);
|
|
48
48
|
}
|
|
49
|
-
},
|
|
49
|
+
}, value: checkbox.value })); }))))),
|
|
50
50
|
(item === null || item === void 0 ? void 0 : item.secondaryDescription) && item.secondaryDescription)),
|
|
51
51
|
children && (React__default["default"].createElement(ListItem_styles.ListRight, { alignment: alignment }, children))));
|
|
52
52
|
};
|
|
@@ -8,7 +8,7 @@ import { CheckboxContainer, IconContainer } from './Checkbox.styles.js';
|
|
|
8
8
|
import { OptionInputWrapper, HiddenInput } from '../FormElement.styles.js';
|
|
9
9
|
|
|
10
10
|
var Checkbox = function (_a) {
|
|
11
|
-
var
|
|
11
|
+
var hideLabel = _a.hideLabel, label = _a.label, props = __rest(_a, ["hideLabel", "label"]);
|
|
12
12
|
var checked = props.checked, disabled = props.disabled;
|
|
13
13
|
var _b = getColorAttributes(checked, disabled), iconColor = _b.iconColor, labelColor = _b.labelColor, attributes = __rest(_b, ["iconColor", "labelColor"]);
|
|
14
14
|
return (React.createElement(OptionInputWrapper, { as: "label", disabled: disabled },
|
|
@@ -16,7 +16,7 @@ var Checkbox = function (_a) {
|
|
|
16
16
|
React.createElement(CheckboxContainer, { attributes: attributes },
|
|
17
17
|
React.createElement(IconContainer, null,
|
|
18
18
|
React.createElement(Icons.CheckMark, { color: iconColor }))),
|
|
19
|
-
|
|
19
|
+
hideLabel ? (React.createElement(ScreenReader, { string: label })) : (React.createElement(BodyText, { color: labelColor, size: TextTypes.TextSize.SMALL }, label))));
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export { Checkbox };
|
|
@@ -37,7 +37,7 @@ var ListItem = function (_a) {
|
|
|
37
37
|
if (checkbox.onChange) {
|
|
38
38
|
checkbox.onChange(e.target.checked);
|
|
39
39
|
}
|
|
40
|
-
},
|
|
40
|
+
}, value: checkbox.value })); }))))),
|
|
41
41
|
(item === null || item === void 0 ? void 0 : item.secondaryDescription) && item.secondaryDescription)),
|
|
42
42
|
children && (React.createElement(ListRight, { alignment: alignment }, children))));
|
|
43
43
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.10",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"react-slick": "^0.30.1",
|
|
76
76
|
"slick-carousel": "^1.8.1"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "393dfcc52223ee0b522eb96c07a9ea4cc7a0573b"
|
|
79
79
|
}
|