@citygross/components 0.8.143 → 0.8.144

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.
@@ -1,4 +1,10 @@
1
1
  import { TCgButtonStyle } from './CgButton.types';
2
- export declare const CsharedButtonStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<TCgButtonStyle, import("styled-components").DefaultTheme>>;
3
- export declare const ButtonStyle: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, Omit<import("./CgButton.types").TCgButtonRoot, "children" | "loading" | "variant"> & import("./CgButton.types").TButtonSizeAttributes & import("./CgButton.types").TButtonVariantAttributes, never>;
4
- export declare const LinkAsButton: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, Omit<import("./CgButton.types").TCgButtonRoot, "children" | "loading" | "variant"> & import("./CgButton.types").TButtonSizeAttributes & import("./CgButton.types").TButtonVariantAttributes, never>;
2
+ export declare const sharedButtonStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<TCgButtonStyle, import("styled-components").DefaultTheme>>;
3
+ export declare const ButtonStyle: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, Omit<import("./CgButton.types").TCgButtonRoot, "children" | "loading" | "variant"> & {
4
+ sizeAttributes: import("./CgButton.types").TButtonSizeAttributes;
5
+ variantAttributes: import("./CgButton.types").TButtonVariantAttributes;
6
+ }, never>;
7
+ export declare const DivAsButton: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Omit<import("./CgButton.types").TCgButtonRoot, "children" | "loading" | "variant"> & {
8
+ sizeAttributes: import("./CgButton.types").TButtonSizeAttributes;
9
+ variantAttributes: import("./CgButton.types").TButtonVariantAttributes;
10
+ }, never>;
@@ -22,8 +22,10 @@ export declare type TCgButtonRoot = {
22
22
  variant?: EButtonVariant;
23
23
  };
24
24
  export declare type TCgButton = TCgButtonRoot & React.ButtonHTMLAttributes<HTMLButtonElement>;
25
- export declare type TCgReactRouterLinkAsButton = TCgButtonRoot;
26
- export declare type TCgButtonStyle = Omit<TCgButtonRoot, 'children' | 'loading' | 'variant'> & TButtonSizeAttributes & TButtonVariantAttributes;
25
+ export declare type TCgButtonStyle = Omit<TCgButtonRoot, 'children' | 'loading' | 'variant'> & {
26
+ sizeAttributes: TButtonSizeAttributes;
27
+ variantAttributes: TButtonVariantAttributes;
28
+ };
27
29
  export declare type TButtonSizeAttributes = {
28
30
  fontSize?: number;
29
31
  height?: number;
@@ -0,0 +1,2 @@
1
+ import { TCgButtonRoot } from '../CgButton.types';
2
+ export declare const DivAsButton: ({ boxShadow, children, circle, fullWidth, rounded, size, variant, ...props }: TCgButtonRoot) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { EButtonSize, EButtonVariant, TButtonSizeAttributes, TButtonVariantAttributes } from '../components/CgButton/CgButton.types';
2
- export declare const FGetButtonAttributes: (buttonSize?: EButtonSize, buttonVariant?: EButtonVariant) => {
2
+ export declare const getButtonAttributes: (buttonSize?: EButtonSize, buttonVariant?: EButtonVariant) => {
3
3
  sizeAttributes: TButtonSizeAttributes;
4
4
  variantAttributes: TButtonVariantAttributes;
5
5
  };
@@ -15,8 +15,8 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
15
15
 
16
16
  var CgButton = React.forwardRef(function (_a, ref) {
17
17
  var boxShadow = _a.boxShadow, children = _a.children, circle = _a.circle, fullWidth = _a.fullWidth, loading = _a.loading, rounded = _a.rounded, _b = _a.size, size = _b === void 0 ? CgButton_types.EButtonSize.medium : _b, _c = _a.variant, variant = _c === void 0 ? CgButton_types.EButtonVariant.primary : _c, props = _tslib.__rest(_a, ["boxShadow", "children", "circle", "fullWidth", "loading", "rounded", "size", "variant"]);
18
- var _d = button.FGetButtonAttributes(size, variant), sizeAttributes = _d.sizeAttributes, variantAttributes = _d.variantAttributes;
19
- return (React__default["default"].createElement(CgButton_styles.ButtonStyle, _tslib.__assign({ backgroundColor: variantAttributes.backgroundColor, backgroundHover: variantAttributes.backgroundHover, backgroundDisabled: variantAttributes.backgroundDisabled, backgroundActive: variantAttributes.backgroundActive, border: variantAttributes.border, boxShadow: boxShadow, circle: circle, fontColor: variantAttributes.fontColor, fontSize: sizeAttributes.fontSize, height: sizeAttributes.height, fullWidth: fullWidth, paddingX: sizeAttributes.paddingX, paddingY: sizeAttributes.paddingY, ref: ref, rounded: rounded, size: size }, props),
18
+ var _d = button.getButtonAttributes(size, variant), sizeAttributes = _d.sizeAttributes, variantAttributes = _d.variantAttributes;
19
+ return (React__default["default"].createElement(CgButton_styles.ButtonStyle, _tslib.__assign({ boxShadow: boxShadow, circle: circle, fullWidth: fullWidth, ref: ref, rounded: rounded, size: size, sizeAttributes: sizeAttributes, variantAttributes: variantAttributes }, props),
20
20
  loading && (React__default["default"].createElement(Spinner.Spinner, { animationSpeedMs: 1000, size: sizeAttributes.loadingSpinner })),
21
21
  children));
22
22
  });
@@ -13,10 +13,12 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
13
13
  var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
14
14
 
15
15
  var _a, _b, _c, _d, _e;
16
- var CsharedButtonStyles = styled.css(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n background-color: ", ";\n color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n gap: ", "px;\n font-family: ", ";\n font-size: ", "px;\n font-weight: ", ";\n height: ", ";\n width: ", ";\n padding: ", ";\n transition: background-color 0.3s ease;\n white-space: nowrap;\n\n &:active {\n background-color: ", ";\n }\n\n &:hover {\n background-color: ", ";\n }\n\n ", "\n"], ["\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n background-color: ", ";\n color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n gap: ", "px;\n font-family: ", ";\n font-size: ", "px;\n font-weight: ", ";\n height: ", ";\n width: ", ";\n padding: ", ";\n transition: background-color 0.3s ease;\n white-space: nowrap;\n\n &:active {\n background-color: ", ";\n }\n\n &:hover {\n background-color: ", ";\n }\n\n ", "\n"])), function (_a) {
16
+ var sharedButtonStyles = styled.css(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n background-color: ", ";\n color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n gap: ", "px;\n font-family: ", ";\n font-size: ", "px;\n font-weight: ", ";\n height: ", ";\n width: ", ";\n padding: ", ";\n transition: background-color 0.3s ease;\n white-space: nowrap;\n\n &:not(:disabled):hover {\n background-color: ", ";\n }\n\n &:not(:disabled):active,\n &:not(:disabled):hover:active,\n &:not(:disabled):focus:active {\n background-color: ", ";\n }\n\n ", "\n"], ["\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n background-color: ", ";\n color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n gap: ", "px;\n font-family: ", ";\n font-size: ", "px;\n font-weight: ", ";\n height: ", ";\n width: ", ";\n padding: ", ";\n transition: background-color 0.3s ease;\n white-space: nowrap;\n\n &:not(:disabled):hover {\n background-color: ", ";\n }\n\n &:not(:disabled):active,\n &:not(:disabled):hover:active,\n &:not(:disabled):focus:active {\n background-color: ", ";\n }\n\n ", "\n"])), function (_a) {
17
17
  var _b;
18
- var border = _a.border;
19
- return border ? "1px solid ".concat((_b = designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.placeholder) : 'none';
18
+ var variantAttributes = _a.variantAttributes;
19
+ return variantAttributes.border
20
+ ? "1px solid ".concat((_b = designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.placeholder)
21
+ : 'none';
20
22
  }, function (_a) {
21
23
  var _b, _c, _d;
22
24
  var circle = _a.circle, rounded = _a.rounded;
@@ -34,38 +36,40 @@ var CsharedButtonStyles = styled.css(templateObject_1 || (templateObject_1 = _ts
34
36
  : (_c = designTokens.theme.attributes) === null || _c === void 0 ? void 0 : _c.boxShadow.layoutShadowInsetMedium
35
37
  : 'none';
36
38
  }, function (_a) {
37
- var backgroundColor = _a.backgroundColor;
38
- return backgroundColor;
39
+ var variantAttributes = _a.variantAttributes;
40
+ return variantAttributes.backgroundColor;
39
41
  }, function (_a) {
40
- var fontColor = _a.fontColor;
41
- return fontColor;
42
+ var variantAttributes = _a.variantAttributes;
43
+ return variantAttributes.fontColor;
42
44
  }, (_a = designTokens.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs, (_b = designTokens.theme.typography) === null || _b === void 0 ? void 0 : _b.type.primary, function (_a) {
43
- var fontSize = _a.fontSize;
44
- return fontSize;
45
+ var sizeAttributes = _a.sizeAttributes;
46
+ return sizeAttributes.fontSize;
45
47
  }, (_d = (_c = designTokens.theme.typography) === null || _c === void 0 ? void 0 : _c.weight) === null || _d === void 0 ? void 0 : _d.medium, function (_a) {
46
- var circle = _a.circle, height = _a.height;
47
- return (!circle ? "".concat(height, "px") : 'max-content');
48
+ var circle = _a.circle, sizeAttributes = _a.sizeAttributes;
49
+ return !circle ? "".concat(sizeAttributes.height, "px") : 'max-content';
48
50
  }, function (_a) {
49
51
  var fullWidth = _a.fullWidth;
50
52
  return (fullWidth ? '100%' : 'max-content');
51
53
  }, function (_a) {
52
- var circle = _a.circle, paddingX = _a.paddingX, paddingY = _a.paddingY;
53
- return circle ? "".concat(paddingY, "px") : "".concat(paddingY, "px ").concat(paddingX, "px");
54
+ var circle = _a.circle, sizeAttributes = _a.sizeAttributes;
55
+ return circle
56
+ ? "".concat(sizeAttributes.paddingY, "px")
57
+ : "".concat(sizeAttributes.paddingY, "px ").concat(sizeAttributes.paddingX, "px");
54
58
  }, function (_a) {
55
- var backgroundActive = _a.backgroundActive;
56
- return backgroundActive;
59
+ var variantAttributes = _a.variantAttributes;
60
+ return variantAttributes.backgroundHover;
57
61
  }, function (_a) {
58
- var backgroundHover = _a.backgroundHover;
59
- return backgroundHover;
62
+ var variantAttributes = _a.variantAttributes;
63
+ return variantAttributes.backgroundActive;
60
64
  }, global_styles.focusVisible);
61
- var ButtonStyle = styled__default["default"].button(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n ", "\n\n cursor: pointer;\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: default;\n }\n"], ["\n ", "\n\n cursor: pointer;\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: default;\n }\n"])), CsharedButtonStyles, function (_a) {
62
- var backgroundDisabled = _a.backgroundDisabled;
63
- return backgroundDisabled;
65
+ var ButtonStyle = styled__default["default"].button(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n ", "\n cursor: pointer;\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: default;\n }\n"], ["\n ", "\n cursor: pointer;\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: default;\n }\n"])), sharedButtonStyles, function (_a) {
66
+ var variantAttributes = _a.variantAttributes;
67
+ return variantAttributes.backgroundDisabled;
64
68
  }, (_e = designTokens.theme.palette) === null || _e === void 0 ? void 0 : _e.placeholder);
65
- var LinkAsButton = styled__default["default"].a(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n ", "\n text-decoration: none;\n"], ["\n ", "\n text-decoration: none;\n"])), CsharedButtonStyles);
69
+ var DivAsButton = styled__default["default"].div(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n ", "\n cursor: pointer;\n"], ["\n ", "\n cursor: pointer;\n"])), sharedButtonStyles);
66
70
  var templateObject_1, templateObject_2, templateObject_3;
67
71
 
68
72
  exports.ButtonStyle = ButtonStyle;
69
- exports.CsharedButtonStyles = CsharedButtonStyles;
70
- exports.LinkAsButton = LinkAsButton;
73
+ exports.DivAsButton = DivAsButton;
74
+ exports.sharedButtonStyles = sharedButtonStyles;
71
75
  //# sourceMappingURL=CgButton.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CgButton.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CgButton.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -84,10 +84,10 @@ var getButtonVariantAttributes = function (buttonVariant) {
84
84
  return {};
85
85
  }
86
86
  };
87
- var FGetButtonAttributes = function (buttonSize, buttonVariant) { return ({
87
+ var getButtonAttributes = function (buttonSize, buttonVariant) { return ({
88
88
  sizeAttributes: getButtonSizeAttributes(buttonSize),
89
89
  variantAttributes: getButtonVariantAttributes(buttonVariant)
90
90
  }); };
91
91
 
92
- exports.FGetButtonAttributes = FGetButtonAttributes;
92
+ exports.getButtonAttributes = getButtonAttributes;
93
93
  //# sourceMappingURL=button.js.map
@@ -140,8 +140,8 @@ Object.defineProperty(exports, 'EButtonVariant', {
140
140
  get: function () { return CgButton_types.EButtonVariant; }
141
141
  });
142
142
  exports.ButtonStyle = CgButton_styles.ButtonStyle;
143
- exports.CsharedButtonStyles = CgButton_styles.CsharedButtonStyles;
144
- exports.LinkAsButton = CgButton_styles.LinkAsButton;
143
+ exports.DivAsButton = CgButton_styles.DivAsButton;
144
+ exports.sharedButtonStyles = CgButton_styles.sharedButtonStyles;
145
145
  exports.Chip = Chip.Chip;
146
146
  exports.Collapsable = Collapsable.Collapsable;
147
147
  exports.CouponCode = CouponCode.CouponCode;
@@ -271,5 +271,5 @@ exports.WarningLabel = WarningLabel.WarningLabel;
271
271
  exports.ZipCodeInput = ZipCodeInput.ZipCodeInput;
272
272
  exports.PageContainer = PageContainer.PageContainer;
273
273
  exports.TwoColumnsPageContainer = TwoColumnsPageContainer.TwoColumnsPageContainer;
274
- exports.FGetButtonAttributes = button.FGetButtonAttributes;
274
+ exports.getButtonAttributes = button.getButtonAttributes;
275
275
  //# sourceMappingURL=index.js.map
@@ -3,12 +3,12 @@ import React, { forwardRef } from 'react';
3
3
  import { ButtonStyle } from './CgButton.styles.js';
4
4
  import { Spinner } from '../Spinner/Spinner.js';
5
5
  import { EButtonSize, EButtonVariant } from './CgButton.types.js';
6
- import { FGetButtonAttributes } from '../../helpers/button.js';
6
+ import { getButtonAttributes } from '../../helpers/button.js';
7
7
 
8
8
  var CgButton = forwardRef(function (_a, ref) {
9
9
  var boxShadow = _a.boxShadow, children = _a.children, circle = _a.circle, fullWidth = _a.fullWidth, loading = _a.loading, rounded = _a.rounded, _b = _a.size, size = _b === void 0 ? EButtonSize.medium : _b, _c = _a.variant, variant = _c === void 0 ? EButtonVariant.primary : _c, props = __rest(_a, ["boxShadow", "children", "circle", "fullWidth", "loading", "rounded", "size", "variant"]);
10
- var _d = FGetButtonAttributes(size, variant), sizeAttributes = _d.sizeAttributes, variantAttributes = _d.variantAttributes;
11
- return (React.createElement(ButtonStyle, __assign({ backgroundColor: variantAttributes.backgroundColor, backgroundHover: variantAttributes.backgroundHover, backgroundDisabled: variantAttributes.backgroundDisabled, backgroundActive: variantAttributes.backgroundActive, border: variantAttributes.border, boxShadow: boxShadow, circle: circle, fontColor: variantAttributes.fontColor, fontSize: sizeAttributes.fontSize, height: sizeAttributes.height, fullWidth: fullWidth, paddingX: sizeAttributes.paddingX, paddingY: sizeAttributes.paddingY, ref: ref, rounded: rounded, size: size }, props),
10
+ var _d = getButtonAttributes(size, variant), sizeAttributes = _d.sizeAttributes, variantAttributes = _d.variantAttributes;
11
+ return (React.createElement(ButtonStyle, __assign({ boxShadow: boxShadow, circle: circle, fullWidth: fullWidth, ref: ref, rounded: rounded, size: size, sizeAttributes: sizeAttributes, variantAttributes: variantAttributes }, props),
12
12
  loading && (React.createElement(Spinner, { animationSpeedMs: 1000, size: sizeAttributes.loadingSpinner })),
13
13
  children));
14
14
  });
@@ -5,10 +5,12 @@ import { EButtonSize } from './CgButton.types.js';
5
5
  import { theme } from '@citygross/design-tokens';
6
6
 
7
7
  var _a, _b, _c, _d, _e;
8
- var CsharedButtonStyles = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n background-color: ", ";\n color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n gap: ", "px;\n font-family: ", ";\n font-size: ", "px;\n font-weight: ", ";\n height: ", ";\n width: ", ";\n padding: ", ";\n transition: background-color 0.3s ease;\n white-space: nowrap;\n\n &:active {\n background-color: ", ";\n }\n\n &:hover {\n background-color: ", ";\n }\n\n ", "\n"], ["\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n background-color: ", ";\n color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n gap: ", "px;\n font-family: ", ";\n font-size: ", "px;\n font-weight: ", ";\n height: ", ";\n width: ", ";\n padding: ", ";\n transition: background-color 0.3s ease;\n white-space: nowrap;\n\n &:active {\n background-color: ", ";\n }\n\n &:hover {\n background-color: ", ";\n }\n\n ", "\n"])), function (_a) {
8
+ var sharedButtonStyles = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n background-color: ", ";\n color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n gap: ", "px;\n font-family: ", ";\n font-size: ", "px;\n font-weight: ", ";\n height: ", ";\n width: ", ";\n padding: ", ";\n transition: background-color 0.3s ease;\n white-space: nowrap;\n\n &:not(:disabled):hover {\n background-color: ", ";\n }\n\n &:not(:disabled):active,\n &:not(:disabled):hover:active,\n &:not(:disabled):focus:active {\n background-color: ", ";\n }\n\n ", "\n"], ["\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n background-color: ", ";\n color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n gap: ", "px;\n font-family: ", ";\n font-size: ", "px;\n font-weight: ", ";\n height: ", ";\n width: ", ";\n padding: ", ";\n transition: background-color 0.3s ease;\n white-space: nowrap;\n\n &:not(:disabled):hover {\n background-color: ", ";\n }\n\n &:not(:disabled):active,\n &:not(:disabled):hover:active,\n &:not(:disabled):focus:active {\n background-color: ", ";\n }\n\n ", "\n"])), function (_a) {
9
9
  var _b;
10
- var border = _a.border;
11
- return border ? "1px solid ".concat((_b = theme.palette) === null || _b === void 0 ? void 0 : _b.placeholder) : 'none';
10
+ var variantAttributes = _a.variantAttributes;
11
+ return variantAttributes.border
12
+ ? "1px solid ".concat((_b = theme.palette) === null || _b === void 0 ? void 0 : _b.placeholder)
13
+ : 'none';
12
14
  }, function (_a) {
13
15
  var _b, _c, _d;
14
16
  var circle = _a.circle, rounded = _a.rounded;
@@ -26,36 +28,38 @@ var CsharedButtonStyles = css(templateObject_1 || (templateObject_1 = __makeTemp
26
28
  : (_c = theme.attributes) === null || _c === void 0 ? void 0 : _c.boxShadow.layoutShadowInsetMedium
27
29
  : 'none';
28
30
  }, function (_a) {
29
- var backgroundColor = _a.backgroundColor;
30
- return backgroundColor;
31
+ var variantAttributes = _a.variantAttributes;
32
+ return variantAttributes.backgroundColor;
31
33
  }, function (_a) {
32
- var fontColor = _a.fontColor;
33
- return fontColor;
34
+ var variantAttributes = _a.variantAttributes;
35
+ return variantAttributes.fontColor;
34
36
  }, (_a = theme.spacings) === null || _a === void 0 ? void 0 : _a.xs, (_b = theme.typography) === null || _b === void 0 ? void 0 : _b.type.primary, function (_a) {
35
- var fontSize = _a.fontSize;
36
- return fontSize;
37
+ var sizeAttributes = _a.sizeAttributes;
38
+ return sizeAttributes.fontSize;
37
39
  }, (_d = (_c = theme.typography) === null || _c === void 0 ? void 0 : _c.weight) === null || _d === void 0 ? void 0 : _d.medium, function (_a) {
38
- var circle = _a.circle, height = _a.height;
39
- return (!circle ? "".concat(height, "px") : 'max-content');
40
+ var circle = _a.circle, sizeAttributes = _a.sizeAttributes;
41
+ return !circle ? "".concat(sizeAttributes.height, "px") : 'max-content';
40
42
  }, function (_a) {
41
43
  var fullWidth = _a.fullWidth;
42
44
  return (fullWidth ? '100%' : 'max-content');
43
45
  }, function (_a) {
44
- var circle = _a.circle, paddingX = _a.paddingX, paddingY = _a.paddingY;
45
- return circle ? "".concat(paddingY, "px") : "".concat(paddingY, "px ").concat(paddingX, "px");
46
+ var circle = _a.circle, sizeAttributes = _a.sizeAttributes;
47
+ return circle
48
+ ? "".concat(sizeAttributes.paddingY, "px")
49
+ : "".concat(sizeAttributes.paddingY, "px ").concat(sizeAttributes.paddingX, "px");
46
50
  }, function (_a) {
47
- var backgroundActive = _a.backgroundActive;
48
- return backgroundActive;
51
+ var variantAttributes = _a.variantAttributes;
52
+ return variantAttributes.backgroundHover;
49
53
  }, function (_a) {
50
- var backgroundHover = _a.backgroundHover;
51
- return backgroundHover;
54
+ var variantAttributes = _a.variantAttributes;
55
+ return variantAttributes.backgroundActive;
52
56
  }, focusVisible);
53
- var ButtonStyle = styled.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n\n cursor: pointer;\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: default;\n }\n"], ["\n ", "\n\n cursor: pointer;\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: default;\n }\n"])), CsharedButtonStyles, function (_a) {
54
- var backgroundDisabled = _a.backgroundDisabled;
55
- return backgroundDisabled;
57
+ var ButtonStyle = styled.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n cursor: pointer;\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: default;\n }\n"], ["\n ", "\n cursor: pointer;\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: default;\n }\n"])), sharedButtonStyles, function (_a) {
58
+ var variantAttributes = _a.variantAttributes;
59
+ return variantAttributes.backgroundDisabled;
56
60
  }, (_e = theme.palette) === null || _e === void 0 ? void 0 : _e.placeholder);
57
- var LinkAsButton = styled.a(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n text-decoration: none;\n"], ["\n ", "\n text-decoration: none;\n"])), CsharedButtonStyles);
61
+ var DivAsButton = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n cursor: pointer;\n"], ["\n ", "\n cursor: pointer;\n"])), sharedButtonStyles);
58
62
  var templateObject_1, templateObject_2, templateObject_3;
59
63
 
60
- export { ButtonStyle, CsharedButtonStyles, LinkAsButton };
64
+ export { ButtonStyle, DivAsButton, sharedButtonStyles };
61
65
  //# sourceMappingURL=CgButton.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CgButton.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CgButton.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -80,10 +80,10 @@ var getButtonVariantAttributes = function (buttonVariant) {
80
80
  return {};
81
81
  }
82
82
  };
83
- var FGetButtonAttributes = function (buttonSize, buttonVariant) { return ({
83
+ var getButtonAttributes = function (buttonSize, buttonVariant) { return ({
84
84
  sizeAttributes: getButtonSizeAttributes(buttonSize),
85
85
  variantAttributes: getButtonVariantAttributes(buttonVariant)
86
86
  }); };
87
87
 
88
- export { FGetButtonAttributes };
88
+ export { getButtonAttributes };
89
89
  //# sourceMappingURL=button.js.map
@@ -16,7 +16,7 @@ export { CartSubTotal, ECartSubTotalTypes } from './components/CartSubTotal/Cart
16
16
  export { CartSummary } from './components/CartSummary/CartSummary.js';
17
17
  export { CgButton } from './components/CgButton/CgButton.js';
18
18
  export { EButtonSize, EButtonVariant } from './components/CgButton/CgButton.types.js';
19
- export { ButtonStyle, CsharedButtonStyles, LinkAsButton } from './components/CgButton/CgButton.styles.js';
19
+ export { ButtonStyle, DivAsButton, sharedButtonStyles } from './components/CgButton/CgButton.styles.js';
20
20
  export { Chip } from './components/Chips/Chip.js';
21
21
  export { Collapsable } from './components/Collapsable/Collapsable.js';
22
22
  export { CouponCode, ECouponCodeStatus } from './components/CouponCode/CouponCode.js';
@@ -94,5 +94,5 @@ export { WarningLabel } from './components/WarningLabel/WarningLabel.js';
94
94
  export { ZipCodeInput } from './components/ZipCodeInput/ZipCodeInput.js';
95
95
  export { PageContainer } from './containers/PageContainer/PageContainer.js';
96
96
  export { TwoColumnsPageContainer } from './containers/TwoColumnsContainer/TwoColumnsPageContainer.js';
97
- export { FGetButtonAttributes } from './helpers/button.js';
97
+ export { getButtonAttributes } from './helpers/button.js';
98
98
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citygross/components",
3
- "version": "0.8.143",
3
+ "version": "0.8.144",
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": "7f7ddcd1db35c205206c1f7f6a830b1e6efa5291"
77
+ "gitHead": "6e953b71579d653a5f1e24897e69183101f0a469"
78
78
  }