@citygross/components 0.7.160 → 0.7.161
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/Button/Button.styles.d.ts +2 -0
- package/build/@types/components/Button/NavButton.d.ts +3 -1
- package/build/cjs/components/src/components/Button/Button.styles.js +3 -3
- package/build/cjs/components/src/components/Button/NavButton.js +3 -3
- package/build/es/components/src/components/Button/Button.styles.js +3 -3
- package/build/es/components/src/components/Button/NavButton.js +3 -3
- package/package.json +2 -2
|
@@ -23,6 +23,7 @@ declare type TBasePrimaryButton = TButton & {
|
|
|
23
23
|
};
|
|
24
24
|
declare type TNavButton = {
|
|
25
25
|
keepLabel?: boolean;
|
|
26
|
+
minWidth?: number;
|
|
26
27
|
};
|
|
27
28
|
export declare type TBaseSmallButton = Omit<TButton, 'size' | 'flexReverse' | 'fullWidth' | 'center'> & {
|
|
28
29
|
width?: number;
|
|
@@ -39,6 +40,7 @@ export declare type TButtonChildContainer = Pick<TBasePrimaryButton, 'childGap'
|
|
|
39
40
|
export declare type TButtonBadge = {
|
|
40
41
|
background?: string;
|
|
41
42
|
smallBadge?: boolean;
|
|
43
|
+
minWidth?: number;
|
|
42
44
|
};
|
|
43
45
|
export declare const BaseButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, TButton, never>;
|
|
44
46
|
export declare const BasePrimaryCSS: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<TBasePrimaryButton, import("styled-components").DefaultTheme>>;
|
|
@@ -12,5 +12,7 @@ export declare type TNavButton = styles.TButton & styles.TBaseSmallButton & {
|
|
|
12
12
|
href?: string;
|
|
13
13
|
tabIndex?: number;
|
|
14
14
|
keepLabel?: boolean;
|
|
15
|
+
minWidth?: number;
|
|
16
|
+
badgeMinWidth?: number;
|
|
15
17
|
};
|
|
16
|
-
export declare function NavButton({ color, height, icon, isDisabled, loading, noWrap, onClick, border, shadow, width, buttonBadge, badgeBackground, size, flexReverse, childGap, children, center, fullWidth, xsSize, borderRadius, hoverBackground, noShadow, tabIndex, keepLabel, ...props }: TNavButton): JSX.Element;
|
|
18
|
+
export declare function NavButton({ 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, ...props }: TNavButton): JSX.Element;
|
|
@@ -151,13 +151,13 @@ var BasePaginationButton = styled__default["default"](BaseButton)(templateObject
|
|
|
151
151
|
? 'box-shadow: inset 0px -1px 0px rgba(0, 0, 0, 0.15)'
|
|
152
152
|
: "box-shadow: inset 0px 0px 0px 1px ".concat((_c = props.theme.palette) === null || _c === void 0 ? void 0 : _c.medium);
|
|
153
153
|
});
|
|
154
|
-
var ButtonBadge = styled__default["default"].div(templateObject_14 || (templateObject_14 = _tslib.__makeTemplateObject(["\n position: absolute;\n top: ", "px;\n right: ", "px;\n padding: ", ";\n background: ", ";\n color: white;\n width: fit-content;\n border-radius: 100px;\n font-size: ", "px;\n line-height: ", "px;\n"], ["\n position: absolute;\n top: ", "px;\n right: ", "px;\n padding: ", ";\n background: ", ";\n color: white;\n width: fit-content;\n border-radius: 100px;\n font-size: ", "px;\n line-height: ", "px;\n"])), function (props) { var _a; return (props === null || props === void 0 ? void 0 : props.smallBadge) ? 0 : (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.buttonBadgeTopPosition; }, function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.buttonBadgeRightPosition; }, function (props) {
|
|
154
|
+
var ButtonBadge = styled__default["default"].div(templateObject_14 || (templateObject_14 = _tslib.__makeTemplateObject(["\n position: absolute;\n top: ", "px;\n right: ", "px;\n padding: ", ";\n background: ", ";\n color: white;\n width: fit-content;\n border-radius: 100px;\n font-size: ", "px;\n line-height: ", "px;\n ", ";\n"], ["\n position: absolute;\n top: ", "px;\n right: ", "px;\n padding: ", ";\n background: ", ";\n color: white;\n width: fit-content;\n border-radius: 100px;\n font-size: ", "px;\n line-height: ", "px;\n ", ";\n"])), function (props) { var _a; return (props === null || props === void 0 ? void 0 : props.smallBadge) ? 0 : (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.buttonBadgeTopPosition; }, function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.buttonBadgeRightPosition; }, function (props) {
|
|
155
155
|
var _a, _b, _c, _d;
|
|
156
156
|
return props.smallBadge
|
|
157
157
|
? "".concat((_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.buttonBadgePaddingSmall, "px ").concat((_b = props.theme.constants) === null || _b === void 0 ? void 0 : _b.buttonBadgePadding, "px")
|
|
158
158
|
: "".concat((_c = props.theme.spacings) === null || _c === void 0 ? void 0 : _c.xxs, "px ").concat((_d = props.theme.constants) === null || _d === void 0 ? void 0 : _d.buttonBadgePadding, "px");
|
|
159
|
-
}, function (props) { var _a; return (_a = props.background) !== null && _a !== void 0 ? _a : 'black'; }, function (props) { var _a, _b; return (_b = (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.size) === null || _b === void 0 ? void 0 : _b.xs; }, function (props) { var _a, _b; return (_b = (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.lineHeight) === null || _b === void 0 ? void 0 : _b.xs; });
|
|
160
|
-
var NavButton = styled__default["default"](BaseButton)(templateObject_15 || (templateObject_15 = _tslib.__makeTemplateObject(["\n @media (max-width: ", "px) {\n ", "\n }\n\n @media (min-width: ", "px) {\n ", "\n }\n"], ["\n @media (max-width: ", "px) {\n ", "\n }\n\n @media (min-width: ", "px) {\n ", "\n }\n"])), function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.headerBreakpoint; }, function (props) { return (props.keepLabel ? BasePrimaryCSS : BaseIconButtonCSS); }, function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.headerBreakpoint; }, BasePrimaryCSS);
|
|
159
|
+
}, function (props) { var _a; return (_a = props.background) !== null && _a !== void 0 ? _a : 'black'; }, function (props) { var _a, _b; return (_b = (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.size) === null || _b === void 0 ? void 0 : _b.xs; }, function (props) { var _a, _b; return (_b = (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.lineHeight) === null || _b === void 0 ? void 0 : _b.xs; }, function (props) { return props.minWidth && "min-width: ".concat(props.minWidth, "px"); });
|
|
160
|
+
var NavButton = styled__default["default"](BaseButton)(templateObject_15 || (templateObject_15 = _tslib.__makeTemplateObject(["\n @media (max-width: ", "px) {\n ", "\n }\n\n @media (min-width: ", "px) {\n ", "\n }\n ", ";\n"], ["\n @media (max-width: ", "px) {\n ", "\n }\n\n @media (min-width: ", "px) {\n ", "\n }\n ", ";\n"])), function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.headerBreakpoint; }, function (props) { return (props.keepLabel ? BasePrimaryCSS : BaseIconButtonCSS); }, function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.headerBreakpoint; }, BasePrimaryCSS, function (props) { return props.minWidth && "min-width: ".concat(props.minWidth, "px"); });
|
|
161
161
|
var NavButtonIcon = styled__default["default"].div(templateObject_16 || (templateObject_16 = _tslib.__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n @media (min-width: ", "px) {\n display: none;\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n @media (min-width: ", "px) {\n display: none;\n }\n"])), function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.headerBreakpoint; });
|
|
162
162
|
var NavButtonChild = styled__default["default"].div(templateObject_17 || (templateObject_17 = _tslib.__makeTemplateObject(["\n ", "\n @media (min-width: ", "px) {\n ", "\n }\n"], ["\n ", "\n @media (min-width: ", "px) {\n ", "\n }\n"])), function (props) {
|
|
163
163
|
return props.keepLabel
|
|
@@ -12,8 +12,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
13
|
|
|
14
14
|
function NavButton(_a) {
|
|
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, 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"]);
|
|
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 }, props),
|
|
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, 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"]);
|
|
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 }, 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)))),
|
|
@@ -21,7 +21,7 @@ function NavButton(_a) {
|
|
|
21
21
|
icon ? (React__default["default"].createElement(Button_styles.NavButtonChild, { size: size, flexReverse: flexReverse, noWrap: noWrap, keepLabel: keepLabel, childGap: childGap },
|
|
22
22
|
icon,
|
|
23
23
|
children)) : (children),
|
|
24
|
-
buttonBadge ? (React__default["default"].createElement(Button_styles.ButtonBadge, { background: badgeBackground, smallBadge: true }, buttonBadge)) : null));
|
|
24
|
+
buttonBadge ? (React__default["default"].createElement(Button_styles.ButtonBadge, { background: badgeBackground, smallBadge: true, minWidth: badgeMinWidth }, buttonBadge)) : null));
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
exports.NavButton = NavButton;
|
|
@@ -143,13 +143,13 @@ var BasePaginationButton = styled(BaseButton)(templateObject_13 || (templateObje
|
|
|
143
143
|
? 'box-shadow: inset 0px -1px 0px rgba(0, 0, 0, 0.15)'
|
|
144
144
|
: "box-shadow: inset 0px 0px 0px 1px ".concat((_c = props.theme.palette) === null || _c === void 0 ? void 0 : _c.medium);
|
|
145
145
|
});
|
|
146
|
-
var ButtonBadge = styled.div(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n position: absolute;\n top: ", "px;\n right: ", "px;\n padding: ", ";\n background: ", ";\n color: white;\n width: fit-content;\n border-radius: 100px;\n font-size: ", "px;\n line-height: ", "px;\n"], ["\n position: absolute;\n top: ", "px;\n right: ", "px;\n padding: ", ";\n background: ", ";\n color: white;\n width: fit-content;\n border-radius: 100px;\n font-size: ", "px;\n line-height: ", "px;\n"])), function (props) { var _a; return (props === null || props === void 0 ? void 0 : props.smallBadge) ? 0 : (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.buttonBadgeTopPosition; }, function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.buttonBadgeRightPosition; }, function (props) {
|
|
146
|
+
var ButtonBadge = styled.div(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n position: absolute;\n top: ", "px;\n right: ", "px;\n padding: ", ";\n background: ", ";\n color: white;\n width: fit-content;\n border-radius: 100px;\n font-size: ", "px;\n line-height: ", "px;\n ", ";\n"], ["\n position: absolute;\n top: ", "px;\n right: ", "px;\n padding: ", ";\n background: ", ";\n color: white;\n width: fit-content;\n border-radius: 100px;\n font-size: ", "px;\n line-height: ", "px;\n ", ";\n"])), function (props) { var _a; return (props === null || props === void 0 ? void 0 : props.smallBadge) ? 0 : (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.buttonBadgeTopPosition; }, function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.buttonBadgeRightPosition; }, function (props) {
|
|
147
147
|
var _a, _b, _c, _d;
|
|
148
148
|
return props.smallBadge
|
|
149
149
|
? "".concat((_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.buttonBadgePaddingSmall, "px ").concat((_b = props.theme.constants) === null || _b === void 0 ? void 0 : _b.buttonBadgePadding, "px")
|
|
150
150
|
: "".concat((_c = props.theme.spacings) === null || _c === void 0 ? void 0 : _c.xxs, "px ").concat((_d = props.theme.constants) === null || _d === void 0 ? void 0 : _d.buttonBadgePadding, "px");
|
|
151
|
-
}, function (props) { var _a; return (_a = props.background) !== null && _a !== void 0 ? _a : 'black'; }, function (props) { var _a, _b; return (_b = (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.size) === null || _b === void 0 ? void 0 : _b.xs; }, function (props) { var _a, _b; return (_b = (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.lineHeight) === null || _b === void 0 ? void 0 : _b.xs; });
|
|
152
|
-
var NavButton = styled(BaseButton)(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n @media (max-width: ", "px) {\n ", "\n }\n\n @media (min-width: ", "px) {\n ", "\n }\n"], ["\n @media (max-width: ", "px) {\n ", "\n }\n\n @media (min-width: ", "px) {\n ", "\n }\n"])), function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.headerBreakpoint; }, function (props) { return (props.keepLabel ? BasePrimaryCSS : BaseIconButtonCSS); }, function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.headerBreakpoint; }, BasePrimaryCSS);
|
|
151
|
+
}, function (props) { var _a; return (_a = props.background) !== null && _a !== void 0 ? _a : 'black'; }, function (props) { var _a, _b; return (_b = (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.size) === null || _b === void 0 ? void 0 : _b.xs; }, function (props) { var _a, _b; return (_b = (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.lineHeight) === null || _b === void 0 ? void 0 : _b.xs; }, function (props) { return props.minWidth && "min-width: ".concat(props.minWidth, "px"); });
|
|
152
|
+
var NavButton = styled(BaseButton)(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n @media (max-width: ", "px) {\n ", "\n }\n\n @media (min-width: ", "px) {\n ", "\n }\n ", ";\n"], ["\n @media (max-width: ", "px) {\n ", "\n }\n\n @media (min-width: ", "px) {\n ", "\n }\n ", ";\n"])), function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.headerBreakpoint; }, function (props) { return (props.keepLabel ? BasePrimaryCSS : BaseIconButtonCSS); }, function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.headerBreakpoint; }, BasePrimaryCSS, function (props) { return props.minWidth && "min-width: ".concat(props.minWidth, "px"); });
|
|
153
153
|
var NavButtonIcon = styled.div(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n @media (min-width: ", "px) {\n display: none;\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n @media (min-width: ", "px) {\n display: none;\n }\n"])), function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.headerBreakpoint; });
|
|
154
154
|
var NavButtonChild = styled.div(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n ", "\n @media (min-width: ", "px) {\n ", "\n }\n"], ["\n ", "\n @media (min-width: ", "px) {\n ", "\n }\n"])), function (props) {
|
|
155
155
|
return props.keepLabel
|
|
@@ -4,8 +4,8 @@ import { NavButton as NavButton$1, Loading, LoadingContainer, LoadingSpinner, Na
|
|
|
4
4
|
import { theme } from '@citygross/design-tokens';
|
|
5
5
|
|
|
6
6
|
function NavButton(_a) {
|
|
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, 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"]);
|
|
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 }, props),
|
|
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, 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"]);
|
|
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 }, props),
|
|
9
9
|
loading && (React.createElement(Loading, null,
|
|
10
10
|
React.createElement(LoadingContainer, null,
|
|
11
11
|
React.createElement(LoadingSpinner, null)))),
|
|
@@ -13,7 +13,7 @@ function NavButton(_a) {
|
|
|
13
13
|
icon ? (React.createElement(NavButtonChild, { size: size, flexReverse: flexReverse, noWrap: noWrap, keepLabel: keepLabel, childGap: childGap },
|
|
14
14
|
icon,
|
|
15
15
|
children)) : (children),
|
|
16
|
-
buttonBadge ? (React.createElement(ButtonBadge, { background: badgeBackground, smallBadge: true }, buttonBadge)) : null));
|
|
16
|
+
buttonBadge ? (React.createElement(ButtonBadge, { background: badgeBackground, smallBadge: true, minWidth: badgeMinWidth }, buttonBadge)) : null));
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export { NavButton };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.161",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"moment": "^2.29.1",
|
|
72
72
|
"react-loading-skeleton": "^2.2.0"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "e306cf645de0216b9133915cce06c1fca5816d60"
|
|
75
75
|
}
|