@citygross/components 0.8.96 → 0.8.98
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/RadioBox/RadioBoxItem.d.ts +6 -6
- package/build/cjs/components/src/components/Button/Button.js +1 -1
- package/build/cjs/components/src/components/Button/IconButton.js +1 -1
- package/build/cjs/components/src/components/Button/NavButton.js +1 -1
- package/build/cjs/components/src/components/Button/PaginationButton.js +1 -1
- package/build/cjs/components/src/components/Button/SaveButton.js +1 -1
- package/build/cjs/components/src/components/RadioBox/RadioBoxItem.js +13 -5
- package/build/cjs/components/src/components/RadioBox/RadioBoxItem.js.map +1 -1
- package/build/es/components/src/components/Button/Button.js +1 -1
- package/build/es/components/src/components/Button/IconButton.js +1 -1
- package/build/es/components/src/components/Button/NavButton.js +1 -1
- package/build/es/components/src/components/Button/PaginationButton.js +1 -1
- package/build/es/components/src/components/Button/SaveButton.js +1 -1
- package/build/es/components/src/components/RadioBox/RadioBoxItem.js +13 -5
- package/build/es/components/src/components/RadioBox/RadioBoxItem.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,14 +2,14 @@ import React from 'react';
|
|
|
2
2
|
import { TRadioColor } from '../FormElements/Radio/Radio';
|
|
3
3
|
import * as styles from './RadioBoxItem.styles';
|
|
4
4
|
export declare type TRadioBox = styles.TBaseRadioBox & {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
radioColor?: keyof TRadioColor;
|
|
7
|
-
name: string;
|
|
8
|
-
setActive?: () => void;
|
|
9
5
|
background?: string;
|
|
10
6
|
border?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
hideRadioButton?: boolean;
|
|
11
9
|
flexDirection?: string;
|
|
10
|
+
name: string;
|
|
11
|
+
radioColor?: keyof TRadioColor;
|
|
12
12
|
padding?: number;
|
|
13
|
-
|
|
13
|
+
setActive?: () => void;
|
|
14
14
|
};
|
|
15
|
-
export declare
|
|
15
|
+
export declare const RadioBoxItem: ({ align, background, border, boxShadow, checked, children, hideRadioButton, flexDirection, isDisabled, name, padding, radioColor, setActive }: TRadioBox) => JSX.Element;
|
|
@@ -35,7 +35,7 @@ function Button(_a) {
|
|
|
35
35
|
? selected
|
|
36
36
|
? (_b = designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.white
|
|
37
37
|
: designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette[color]
|
|
38
|
-
: 'white', fullWidth: fullWidth, flexReverse: flexReverse, icon: icon, selected: selected, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, size: size, xsSize: xsSize, onClick: function (e) { return onClick && onClick(e); }, borderRadius: borderRadius, childGap: childGap, hoverBackground: hoverBackground, noShadow: noShadow },
|
|
38
|
+
: 'white', fullWidth: fullWidth, flexReverse: flexReverse, icon: icon, selected: selected, disabled: loading || isDisabled, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, size: size, xsSize: xsSize, onClick: function (e) { return onClick && onClick(e); }, borderRadius: borderRadius, childGap: childGap, hoverBackground: hoverBackground, noShadow: noShadow },
|
|
39
39
|
loading && (React__default["default"].createElement(Button_styles.Loading, null,
|
|
40
40
|
React__default["default"].createElement(Button_styles.LoadingContainer, { xsSize: xsSize, size: size },
|
|
41
41
|
React__default["default"].createElement(Button_styles.LoadingSpinner, null)))),
|
|
@@ -13,7 +13,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
13
13
|
|
|
14
14
|
function IconButton(_a) {
|
|
15
15
|
var _b = _a.color, color = _b === void 0 ? 'darkest' : _b, height = _a.height, icon = _a.icon, isDisabled = _a.isDisabled, loading = _a.loading, noWrap = _a.noWrap, onClick = _a.onClick, border = _a.border, shadow = _a.shadow, width = _a.width, buttonBadge = _a.buttonBadge, badgeBackground = _a.badgeBackground, tabIndex = _a.tabIndex, opacity = _a.opacity, props = _tslib.__rest(_a, ["color", "height", "icon", "isDisabled", "loading", "noWrap", "onClick", "border", "shadow", "width", "buttonBadge", "badgeBackground", "tabIndex", "opacity"]);
|
|
16
|
-
return (React__default["default"].createElement(Button_styles.BaseIconButton, _tslib.__assign({ tabIndex: tabIndex, color: designTokens.theme && designTokens.theme.palette ? designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette[color] : '#333333', height: height, icon: icon, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: function (e) { return onClick && onClick(e); }, width: width, opacity: opacity, border: border, shadow: shadow }, props),
|
|
16
|
+
return (React__default["default"].createElement(Button_styles.BaseIconButton, _tslib.__assign({ tabIndex: tabIndex, color: designTokens.theme && designTokens.theme.palette ? designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette[color] : '#333333', height: height, icon: icon, disabled: loading || isDisabled, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: function (e) { return onClick && onClick(e); }, width: width, opacity: opacity, border: border, shadow: shadow }, props),
|
|
17
17
|
loading && (React__default["default"].createElement(Button_styles.Loading, null,
|
|
18
18
|
React__default["default"].createElement(Button_styles.LoadingContainer, null,
|
|
19
19
|
React__default["default"].createElement(Button_styles.LoadingSpinner, null)))),
|
|
@@ -13,7 +13,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
13
13
|
|
|
14
14
|
function NavButton(_a) {
|
|
15
15
|
var _b = _a.color, color = _b === void 0 ? 'darkest' : _b, height = _a.height, icon = _a.icon, isDisabled = _a.isDisabled, loading = _a.loading, noWrap = _a.noWrap, onClick = _a.onClick, border = _a.border, shadow = _a.shadow, width = _a.width, buttonBadge = _a.buttonBadge, badgeBackground = _a.badgeBackground, size = _a.size, flexReverse = _a.flexReverse, childGap = _a.childGap, children = _a.children, _c = _a.center, center = _c === void 0 ? true : _c, fullWidth = _a.fullWidth, xsSize = _a.xsSize, borderRadius = _a.borderRadius, hoverBackground = _a.hoverBackground, noShadow = _a.noShadow, tabIndex = _a.tabIndex, keepLabel = _a.keepLabel, minWidth = _a.minWidth, badgeMinWidth = _a.badgeMinWidth, id = _a.id, props = _tslib.__rest(_a, ["color", "height", "icon", "isDisabled", "loading", "noWrap", "onClick", "border", "shadow", "width", "buttonBadge", "badgeBackground", "size", "flexReverse", "childGap", "children", "center", "fullWidth", "xsSize", "borderRadius", "hoverBackground", "noShadow", "tabIndex", "keepLabel", "minWidth", "badgeMinWidth", "id"]);
|
|
16
|
-
return (React__default["default"].createElement(Button_styles.NavButton, _tslib.__assign({ tabIndex: tabIndex, color: designTokens.theme && designTokens.theme.palette ? designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette[color] : '#333333', height: height, icon: icon, keepLabel: keepLabel, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: function (e) { return onClick && onClick(e); }, width: width, border: border, shadow: shadow, center: center, fullWidth: fullWidth, flexReverse: flexReverse, size: size, xsSize: xsSize, borderRadius: borderRadius, childGap: childGap, hoverBackground: hoverBackground, noShadow: noShadow, minWidth: minWidth, id: id || 'nav-button' }, props),
|
|
16
|
+
return (React__default["default"].createElement(Button_styles.NavButton, _tslib.__assign({ tabIndex: tabIndex, color: designTokens.theme && designTokens.theme.palette ? designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette[color] : '#333333', height: height, icon: icon, keepLabel: keepLabel, isDisabled: loading || isDisabled, disabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: function (e) { return onClick && onClick(e); }, width: width, border: border, shadow: shadow, center: center, fullWidth: fullWidth, flexReverse: flexReverse, size: size, xsSize: xsSize, borderRadius: borderRadius, childGap: childGap, hoverBackground: hoverBackground, noShadow: noShadow, minWidth: minWidth, id: id || 'nav-button' }, props),
|
|
17
17
|
loading && (React__default["default"].createElement(Button_styles.Loading, null,
|
|
18
18
|
React__default["default"].createElement(Button_styles.LoadingContainer, null,
|
|
19
19
|
React__default["default"].createElement(Button_styles.LoadingSpinner, null)))),
|
|
@@ -12,7 +12,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
12
12
|
|
|
13
13
|
function PaginationButton(_a) {
|
|
14
14
|
var _b = _a.color, color = _b === void 0 ? 'primary' : _b, height = _a.height, icon = _a.icon, isDisabled = _a.isDisabled, loading = _a.loading, noWrap = _a.noWrap, onClick = _a.onClick, width = _a.width, children = _a.children;
|
|
15
|
-
return (React__default["default"].createElement(Button_styles.BasePaginationButton, { color: designTokens.theme && designTokens.theme.palette ? designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette[color] : 'white', height: height, icon: icon, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: function (e) { return onClick && onClick(e); }, width: width },
|
|
15
|
+
return (React__default["default"].createElement(Button_styles.BasePaginationButton, { color: designTokens.theme && designTokens.theme.palette ? designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette[color] : 'white', height: height, icon: icon, disabled: loading || isDisabled, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: function (e) { return onClick && onClick(e); }, width: width },
|
|
16
16
|
loading && (React__default["default"].createElement(Button_styles.Loading, null,
|
|
17
17
|
React__default["default"].createElement(Button_styles.LoadingContainer, null,
|
|
18
18
|
React__default["default"].createElement(Button_styles.LoadingSpinner, null)))),
|
|
@@ -22,7 +22,7 @@ function SaveButton(_a) {
|
|
|
22
22
|
}, (_a = designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.animations) === null || _a === void 0 ? void 0 : _a.saveButtonAnimationComplete);
|
|
23
23
|
}
|
|
24
24
|
}, [saved]);
|
|
25
|
-
return (React__default["default"].createElement(Button_styles.BasePrimaryButton, { color: saved ? onSavedColor : color, isDisabled: loading || isDisabled, loading: loading || null, size: size, fullWidth: fullWidth, icon: icon, noWrap: noWrap, onClick: saved ? function () { } : function (e) { return onClick(e); } },
|
|
25
|
+
return (React__default["default"].createElement(Button_styles.BasePrimaryButton, { color: saved ? onSavedColor : color, disabled: loading || isDisabled, isDisabled: loading || isDisabled, loading: loading || null, size: size, fullWidth: fullWidth, icon: icon, noWrap: noWrap, onClick: saved ? function () { } : function (e) { return onClick(e); } },
|
|
26
26
|
loading && (React__default["default"].createElement(Button_styles.Loading, null,
|
|
27
27
|
React__default["default"].createElement(Button_styles.LoadingContainer, { xsSize: xsSize, size: size },
|
|
28
28
|
React__default["default"].createElement(Button_styles.LoadingSpinner, null)))),
|
|
@@ -11,13 +11,21 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
|
|
12
12
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
13
|
|
|
14
|
-
function
|
|
14
|
+
var RadioBoxItem = function (_a) {
|
|
15
15
|
var _b, _c, _d;
|
|
16
|
-
var _e = _a.
|
|
17
|
-
return (React__default["default"].createElement(RadioBoxItem_styles.BaseRadioBox, { align: align, checked: checked,
|
|
18
|
-
|
|
16
|
+
var _e = _a.align, align = _e === void 0 ? 'flex-start' : _e, _f = _a.background, background = _f === void 0 ? (_b = designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.white : _f, _g = _a.border, border = _g === void 0 ? (_c = designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette) === null || _c === void 0 ? void 0 : _c.border : _g, _h = _a.boxShadow, boxShadow = _h === void 0 ? true : _h, checked = _a.checked, children = _a.children, _j = _a.hideRadioButton, hideRadioButton = _j === void 0 ? false : _j, flexDirection = _a.flexDirection, isDisabled = _a.isDisabled, name = _a.name, _k = _a.padding, padding = _k === void 0 ? (_d = designTokens.theme.spacings) === null || _d === void 0 ? void 0 : _d.md : _k, _l = _a.radioColor, radioColor = _l === void 0 ? 'alertGreen' : _l, setActive = _a.setActive;
|
|
17
|
+
return (React__default["default"].createElement(RadioBoxItem_styles.BaseRadioBox, { align: align, "aria-checked": checked, background: background, border: border, boxShadow: boxShadow, checked: checked, flexDirection: flexDirection, isDisabled: isDisabled, onClick: !isDisabled ? setActive : undefined, onKeyDown: !isDisabled && setActive
|
|
18
|
+
? function (e) {
|
|
19
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
20
|
+
if (e.key === ' ')
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
setActive();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
: undefined, padding: padding, role: "radio", tabIndex: 0 },
|
|
26
|
+
!hideRadioButton && (React__default["default"].createElement(Radio.Radio, { checked: checked, customColor: radioColor, disabled: isDisabled, name: name, onChange: setActive !== null && setActive !== void 0 ? setActive : undefined })),
|
|
19
27
|
children));
|
|
20
|
-
}
|
|
28
|
+
};
|
|
21
29
|
|
|
22
30
|
exports.RadioBoxItem = RadioBoxItem;
|
|
23
31
|
//# sourceMappingURL=RadioBoxItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioBoxItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RadioBoxItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -27,7 +27,7 @@ function Button(_a) {
|
|
|
27
27
|
? selected
|
|
28
28
|
? (_b = theme === null || theme === void 0 ? void 0 : theme.palette) === null || _b === void 0 ? void 0 : _b.white
|
|
29
29
|
: theme === null || theme === void 0 ? void 0 : theme.palette[color]
|
|
30
|
-
: 'white', fullWidth: fullWidth, flexReverse: flexReverse, icon: icon, selected: selected, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, size: size, xsSize: xsSize, onClick: function (e) { return onClick && onClick(e); }, borderRadius: borderRadius, childGap: childGap, hoverBackground: hoverBackground, noShadow: noShadow },
|
|
30
|
+
: 'white', fullWidth: fullWidth, flexReverse: flexReverse, icon: icon, selected: selected, disabled: loading || isDisabled, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, size: size, xsSize: xsSize, onClick: function (e) { return onClick && onClick(e); }, borderRadius: borderRadius, childGap: childGap, hoverBackground: hoverBackground, noShadow: noShadow },
|
|
31
31
|
loading && (React.createElement(Loading, null,
|
|
32
32
|
React.createElement(LoadingContainer, { xsSize: xsSize, size: size },
|
|
33
33
|
React.createElement(LoadingSpinner, null)))),
|
|
@@ -5,7 +5,7 @@ import { BaseIconButton, Loading, LoadingContainer, LoadingSpinner, ButtonBadge
|
|
|
5
5
|
|
|
6
6
|
function IconButton(_a) {
|
|
7
7
|
var _b = _a.color, color = _b === void 0 ? 'darkest' : _b, height = _a.height, icon = _a.icon, isDisabled = _a.isDisabled, loading = _a.loading, noWrap = _a.noWrap, onClick = _a.onClick, border = _a.border, shadow = _a.shadow, width = _a.width, buttonBadge = _a.buttonBadge, badgeBackground = _a.badgeBackground, tabIndex = _a.tabIndex, opacity = _a.opacity, props = __rest(_a, ["color", "height", "icon", "isDisabled", "loading", "noWrap", "onClick", "border", "shadow", "width", "buttonBadge", "badgeBackground", "tabIndex", "opacity"]);
|
|
8
|
-
return (React.createElement(BaseIconButton, __assign({ tabIndex: tabIndex, color: theme && theme.palette ? theme === null || theme === void 0 ? void 0 : theme.palette[color] : '#333333', height: height, icon: icon, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: function (e) { return onClick && onClick(e); }, width: width, opacity: opacity, border: border, shadow: shadow }, props),
|
|
8
|
+
return (React.createElement(BaseIconButton, __assign({ tabIndex: tabIndex, color: theme && theme.palette ? theme === null || theme === void 0 ? void 0 : theme.palette[color] : '#333333', height: height, icon: icon, disabled: loading || isDisabled, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: function (e) { return onClick && onClick(e); }, width: width, opacity: opacity, border: border, shadow: shadow }, props),
|
|
9
9
|
loading && (React.createElement(Loading, null,
|
|
10
10
|
React.createElement(LoadingContainer, null,
|
|
11
11
|
React.createElement(LoadingSpinner, null)))),
|
|
@@ -5,7 +5,7 @@ import { theme } from '@citygross/design-tokens';
|
|
|
5
5
|
|
|
6
6
|
function NavButton(_a) {
|
|
7
7
|
var _b = _a.color, color = _b === void 0 ? 'darkest' : _b, height = _a.height, icon = _a.icon, isDisabled = _a.isDisabled, loading = _a.loading, noWrap = _a.noWrap, onClick = _a.onClick, border = _a.border, shadow = _a.shadow, width = _a.width, buttonBadge = _a.buttonBadge, badgeBackground = _a.badgeBackground, size = _a.size, flexReverse = _a.flexReverse, childGap = _a.childGap, children = _a.children, _c = _a.center, center = _c === void 0 ? true : _c, fullWidth = _a.fullWidth, xsSize = _a.xsSize, borderRadius = _a.borderRadius, hoverBackground = _a.hoverBackground, noShadow = _a.noShadow, tabIndex = _a.tabIndex, keepLabel = _a.keepLabel, minWidth = _a.minWidth, badgeMinWidth = _a.badgeMinWidth, id = _a.id, props = __rest(_a, ["color", "height", "icon", "isDisabled", "loading", "noWrap", "onClick", "border", "shadow", "width", "buttonBadge", "badgeBackground", "size", "flexReverse", "childGap", "children", "center", "fullWidth", "xsSize", "borderRadius", "hoverBackground", "noShadow", "tabIndex", "keepLabel", "minWidth", "badgeMinWidth", "id"]);
|
|
8
|
-
return (React.createElement(NavButton$1, __assign({ tabIndex: tabIndex, color: theme && theme.palette ? theme === null || theme === void 0 ? void 0 : theme.palette[color] : '#333333', height: height, icon: icon, keepLabel: keepLabel, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: function (e) { return onClick && onClick(e); }, width: width, border: border, shadow: shadow, center: center, fullWidth: fullWidth, flexReverse: flexReverse, size: size, xsSize: xsSize, borderRadius: borderRadius, childGap: childGap, hoverBackground: hoverBackground, noShadow: noShadow, minWidth: minWidth, id: id || 'nav-button' }, props),
|
|
8
|
+
return (React.createElement(NavButton$1, __assign({ tabIndex: tabIndex, color: theme && theme.palette ? theme === null || theme === void 0 ? void 0 : theme.palette[color] : '#333333', height: height, icon: icon, keepLabel: keepLabel, isDisabled: loading || isDisabled, disabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: function (e) { return onClick && onClick(e); }, width: width, border: border, shadow: shadow, center: center, fullWidth: fullWidth, flexReverse: flexReverse, size: size, xsSize: xsSize, borderRadius: borderRadius, childGap: childGap, hoverBackground: hoverBackground, noShadow: noShadow, minWidth: minWidth, id: id || 'nav-button' }, props),
|
|
9
9
|
loading && (React.createElement(Loading, null,
|
|
10
10
|
React.createElement(LoadingContainer, null,
|
|
11
11
|
React.createElement(LoadingSpinner, null)))),
|
|
@@ -4,7 +4,7 @@ import { BasePaginationButton, Loading, LoadingContainer, LoadingSpinner } from
|
|
|
4
4
|
|
|
5
5
|
function PaginationButton(_a) {
|
|
6
6
|
var _b = _a.color, color = _b === void 0 ? 'primary' : _b, height = _a.height, icon = _a.icon, isDisabled = _a.isDisabled, loading = _a.loading, noWrap = _a.noWrap, onClick = _a.onClick, width = _a.width, children = _a.children;
|
|
7
|
-
return (React.createElement(BasePaginationButton, { color: theme && theme.palette ? theme === null || theme === void 0 ? void 0 : theme.palette[color] : 'white', height: height, icon: icon, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: function (e) { return onClick && onClick(e); }, width: width },
|
|
7
|
+
return (React.createElement(BasePaginationButton, { color: theme && theme.palette ? theme === null || theme === void 0 ? void 0 : theme.palette[color] : 'white', height: height, icon: icon, disabled: loading || isDisabled, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: function (e) { return onClick && onClick(e); }, width: width },
|
|
8
8
|
loading && (React.createElement(Loading, null,
|
|
9
9
|
React.createElement(LoadingContainer, null,
|
|
10
10
|
React.createElement(LoadingSpinner, null)))),
|
|
@@ -14,7 +14,7 @@ function SaveButton(_a) {
|
|
|
14
14
|
}, (_a = theme === null || theme === void 0 ? void 0 : theme.animations) === null || _a === void 0 ? void 0 : _a.saveButtonAnimationComplete);
|
|
15
15
|
}
|
|
16
16
|
}, [saved]);
|
|
17
|
-
return (React.createElement(BasePrimaryButton, { color: saved ? onSavedColor : color, isDisabled: loading || isDisabled, loading: loading || null, size: size, fullWidth: fullWidth, icon: icon, noWrap: noWrap, onClick: saved ? function () { } : function (e) { return onClick(e); } },
|
|
17
|
+
return (React.createElement(BasePrimaryButton, { color: saved ? onSavedColor : color, disabled: loading || isDisabled, isDisabled: loading || isDisabled, loading: loading || null, size: size, fullWidth: fullWidth, icon: icon, noWrap: noWrap, onClick: saved ? function () { } : function (e) { return onClick(e); } },
|
|
18
18
|
loading && (React.createElement(Loading, null,
|
|
19
19
|
React.createElement(LoadingContainer, { xsSize: xsSize, size: size },
|
|
20
20
|
React.createElement(LoadingSpinner, null)))),
|
|
@@ -3,13 +3,21 @@ import { theme } from '@citygross/design-tokens';
|
|
|
3
3
|
import { Radio } from '../FormElements/Radio/Radio.js';
|
|
4
4
|
import { BaseRadioBox } from './RadioBoxItem.styles.js';
|
|
5
5
|
|
|
6
|
-
function
|
|
6
|
+
var RadioBoxItem = function (_a) {
|
|
7
7
|
var _b, _c, _d;
|
|
8
|
-
var _e = _a.
|
|
9
|
-
return (React.createElement(BaseRadioBox, { align: align, checked: checked,
|
|
10
|
-
|
|
8
|
+
var _e = _a.align, align = _e === void 0 ? 'flex-start' : _e, _f = _a.background, background = _f === void 0 ? (_b = theme === null || theme === void 0 ? void 0 : theme.palette) === null || _b === void 0 ? void 0 : _b.white : _f, _g = _a.border, border = _g === void 0 ? (_c = theme === null || theme === void 0 ? void 0 : theme.palette) === null || _c === void 0 ? void 0 : _c.border : _g, _h = _a.boxShadow, boxShadow = _h === void 0 ? true : _h, checked = _a.checked, children = _a.children, _j = _a.hideRadioButton, hideRadioButton = _j === void 0 ? false : _j, flexDirection = _a.flexDirection, isDisabled = _a.isDisabled, name = _a.name, _k = _a.padding, padding = _k === void 0 ? (_d = theme.spacings) === null || _d === void 0 ? void 0 : _d.md : _k, _l = _a.radioColor, radioColor = _l === void 0 ? 'alertGreen' : _l, setActive = _a.setActive;
|
|
9
|
+
return (React.createElement(BaseRadioBox, { align: align, "aria-checked": checked, background: background, border: border, boxShadow: boxShadow, checked: checked, flexDirection: flexDirection, isDisabled: isDisabled, onClick: !isDisabled ? setActive : undefined, onKeyDown: !isDisabled && setActive
|
|
10
|
+
? function (e) {
|
|
11
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
12
|
+
if (e.key === ' ')
|
|
13
|
+
e.preventDefault();
|
|
14
|
+
setActive();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
: undefined, padding: padding, role: "radio", tabIndex: 0 },
|
|
18
|
+
!hideRadioButton && (React.createElement(Radio, { checked: checked, customColor: radioColor, disabled: isDisabled, name: name, onChange: setActive !== null && setActive !== void 0 ? setActive : undefined })),
|
|
11
19
|
children));
|
|
12
|
-
}
|
|
20
|
+
};
|
|
13
21
|
|
|
14
22
|
export { RadioBoxItem };
|
|
15
23
|
//# sourceMappingURL=RadioBoxItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioBoxItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RadioBoxItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.98",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"react-slick": "^0.30.1",
|
|
77
77
|
"slick-carousel": "^1.8.1"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "8bbb9d2dba82e657408150305de3e4ab39aa1aa8"
|
|
80
80
|
}
|