@citygross/components 0.16.19 → 0.16.20
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/cjs/components/src/components/FormElements/Checkbox/Checkbox.js +2 -2
- package/build/cjs/components/src/helpers/form-element.js +1 -1
- package/build/es/components/src/components/FormElements/Checkbox/Checkbox.js +2 -2
- package/build/es/components/src/helpers/form-element.js +1 -1
- package/package.json +2 -2
|
@@ -18,11 +18,11 @@ var Checkbox = function (_a) {
|
|
|
18
18
|
var alignItems = _a.alignItems, checked = _a.checked, disabled = _a.disabled, hideLabel = _a.hideLabel, label = _a.label, props = _tslib.__rest(_a, ["alignItems", "checked", "disabled", "hideLabel", "label"]);
|
|
19
19
|
var _b = formElement.getColorAttributes(checked, disabled), iconColor = _b.iconColor, labelColor = _b.labelColor, attributes = _tslib.__rest(_b, ["iconColor", "labelColor"]);
|
|
20
20
|
return (React__default["default"].createElement(FormElement_styles.OptionInputWrapper, { alignItems: alignItems, as: "label", disabled: disabled },
|
|
21
|
-
React__default["default"].createElement(Checkbox_styles.CheckboxInput, _tslib.__assign({ "aria-label": label, checked: checked, disabled: disabled, type: "checkbox" }, props)),
|
|
21
|
+
React__default["default"].createElement(Checkbox_styles.CheckboxInput, _tslib.__assign({ "aria-label": hideLabel ? label : undefined, checked: checked, disabled: disabled, type: "checkbox" }, props)),
|
|
22
22
|
React__default["default"].createElement(Checkbox_styles.CheckboxContainer, { "aria-hidden": "true", attributes: attributes, alignItems: alignItems },
|
|
23
23
|
React__default["default"].createElement(Checkbox_styles.IconContainer, null,
|
|
24
24
|
React__default["default"].createElement(icons.Icons.CheckMark, { color: iconColor }))),
|
|
25
|
-
!hideLabel &&
|
|
25
|
+
!hideLabel && React__default["default"].createElement(typography.BodyText, { color: labelColor }, label)));
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
exports.Checkbox = Checkbox;
|
|
@@ -17,7 +17,7 @@ var getColorAttributes = function (checked, disabled, isRadio) {
|
|
|
17
17
|
if (!checked) {
|
|
18
18
|
if (!disabled) {
|
|
19
19
|
return {
|
|
20
|
-
backgroundColor: (_a = designTokens.theme.palette) === null || _a === void 0 ? void 0 : _a.
|
|
20
|
+
backgroundColor: (_a = designTokens.theme.palette) === null || _a === void 0 ? void 0 : _a.white,
|
|
21
21
|
borderColor: (_b = designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.placeholder,
|
|
22
22
|
hoverBackgroundColor: (_c = designTokens.theme.palette) === null || _c === void 0 ? void 0 : _c.lightest,
|
|
23
23
|
iconColor: (_d = designTokens.theme.palette) === null || _d === void 0 ? void 0 : _d.transparent,
|
|
@@ -10,11 +10,11 @@ var Checkbox = function (_a) {
|
|
|
10
10
|
var alignItems = _a.alignItems, checked = _a.checked, disabled = _a.disabled, hideLabel = _a.hideLabel, label = _a.label, props = __rest(_a, ["alignItems", "checked", "disabled", "hideLabel", "label"]);
|
|
11
11
|
var _b = getColorAttributes(checked, disabled), iconColor = _b.iconColor, labelColor = _b.labelColor, attributes = __rest(_b, ["iconColor", "labelColor"]);
|
|
12
12
|
return (React.createElement(OptionInputWrapper, { alignItems: alignItems, as: "label", disabled: disabled },
|
|
13
|
-
React.createElement(CheckboxInput, __assign({ "aria-label": label, checked: checked, disabled: disabled, type: "checkbox" }, props)),
|
|
13
|
+
React.createElement(CheckboxInput, __assign({ "aria-label": hideLabel ? label : undefined, checked: checked, disabled: disabled, type: "checkbox" }, props)),
|
|
14
14
|
React.createElement(CheckboxContainer, { "aria-hidden": "true", attributes: attributes, alignItems: alignItems },
|
|
15
15
|
React.createElement(IconContainer, null,
|
|
16
16
|
React.createElement(Icons.CheckMark, { color: iconColor }))),
|
|
17
|
-
!hideLabel &&
|
|
17
|
+
!hideLabel && React.createElement(BodyText, { color: labelColor }, label)));
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export { Checkbox };
|
|
@@ -13,7 +13,7 @@ var getColorAttributes = function (checked, disabled, isRadio) {
|
|
|
13
13
|
if (!checked) {
|
|
14
14
|
if (!disabled) {
|
|
15
15
|
return {
|
|
16
|
-
backgroundColor: (_a = theme.palette) === null || _a === void 0 ? void 0 : _a.
|
|
16
|
+
backgroundColor: (_a = theme.palette) === null || _a === void 0 ? void 0 : _a.white,
|
|
17
17
|
borderColor: (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.placeholder,
|
|
18
18
|
hoverBackgroundColor: (_c = theme.palette) === null || _c === void 0 ? void 0 : _c.lightest,
|
|
19
19
|
iconColor: (_d = theme.palette) === null || _d === void 0 ? void 0 : _d.transparent,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.20",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"react-slick": "^0.30.1",
|
|
75
75
|
"slick-carousel": "^1.8.1"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "3ebe5619a1886ef2172947653608ac74f964564b"
|
|
78
78
|
}
|