@citygross/components 0.7.237 → 0.7.239
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/CgButton/CgButton.d.ts +25 -0
- package/build/@types/components/CgButton/CgButton.styles.d.ts +11 -0
- package/build/@types/index.d.ts +1 -0
- package/build/cjs/_virtual/_tslib.js +6 -2
- package/build/cjs/_virtual/_tslib.js.map +1 -1
- package/build/cjs/components/src/components/AddressBlock/AddressBlock.js +2 -0
- package/build/cjs/components/src/components/AddressBlock/AddressBlock.js.map +1 -1
- package/build/cjs/components/src/components/CgButton/CgButton.js +22 -0
- package/build/cjs/components/src/components/CgButton/CgButton.js.map +1 -0
- package/build/cjs/components/src/components/CgButton/CgButton.styles.js +69 -0
- package/build/cjs/components/src/components/CgButton/CgButton.styles.js.map +1 -0
- package/build/cjs/components/src/components/InfoTextBlock/InfoTextBlock.js +1 -0
- package/build/cjs/components/src/components/InfoTextBlock/InfoTextBlock.js.map +1 -1
- package/build/cjs/components/src/components/WarningLabel/WarningLabel.js +2 -0
- package/build/cjs/components/src/components/WarningLabel/WarningLabel.js.map +1 -1
- package/build/cjs/components/src/index.js +9 -0
- package/build/cjs/components/src/index.js.map +1 -1
- package/build/cjs/utils/build/index.js +18202 -18189
- package/build/cjs/utils/build/index.js.map +1 -1
- package/build/es/_virtual/_tslib.js +6 -2
- package/build/es/_virtual/_tslib.js.map +1 -1
- package/build/es/components/src/components/AddressBlock/AddressBlock.js +2 -0
- package/build/es/components/src/components/AddressBlock/AddressBlock.js.map +1 -1
- package/build/es/components/src/components/CgButton/CgButton.js +20 -0
- package/build/es/components/src/components/CgButton/CgButton.js.map +1 -0
- package/build/es/components/src/components/CgButton/CgButton.styles.js +63 -0
- package/build/es/components/src/components/CgButton/CgButton.styles.js.map +1 -0
- package/build/es/components/src/components/InfoTextBlock/InfoTextBlock.js +1 -0
- package/build/es/components/src/components/InfoTextBlock/InfoTextBlock.js.map +1 -1
- package/build/es/components/src/components/WarningLabel/WarningLabel.js +2 -0
- package/build/es/components/src/components/WarningLabel/WarningLabel.js.map +1 -1
- package/build/es/components/src/index.js +1 -0
- package/build/es/components/src/index.js.map +1 -1
- package/build/es/utils/build/index.js +18202 -18189
- package/build/es/utils/build/index.js.map +1 -1
- package/package.json +4 -2
- package/build/@types/components/AddressBlock/AddressBlock.stories.d.ts +0 -22
- package/build/@types/components/AlertBox/AlertBox.stories.d.ts +0 -28
- package/build/@types/components/BackButton/BackButton.stories.d.ts +0 -20
- package/build/@types/components/BackgroundImage/BackgroundImage.stories.d.ts +0 -9
- package/build/@types/components/Badge/Badge.stories.d.ts +0 -31
- package/build/@types/components/Box/Box.stories.d.ts +0 -26
- package/build/@types/components/Button/Button.stories.d.ts +0 -54
- package/build/@types/components/CartItemSummary/CartItemSummary.stories.d.ts +0 -8
- package/build/@types/components/CartSummary/CartSummary.stories.d.ts +0 -10
- package/build/@types/components/Chips/Chip.stories.d.ts +0 -28
- package/build/@types/components/Collapsable/Collapsable.stories.d.ts +0 -9
- package/build/@types/components/CustomerInfoBlock/CustomerInfoBlock.stories.d.ts +0 -8
- package/build/@types/components/DateBox/DateBox.stories.d.ts +0 -20
- package/build/@types/components/DeliverySelectionButton/DeliverySelectionButton.stories.d.ts +0 -13
- package/build/@types/components/DeliverySlotItem/DeliverySlotItem.stories.d.ts +0 -8
- package/build/@types/components/DeliveryTimeBlock/DeliveryTimeBlock.stories.d.ts +0 -22
- package/build/@types/components/Divider/Divider.stories.d.ts +0 -9
- package/build/@types/components/DotIndicator/DotIndicator.stories.d.ts +0 -24
- package/build/@types/components/Dropdown/Dropdown.stories.d.ts +0 -19
- package/build/@types/components/Form/Form.stories.d.ts +0 -8
- package/build/@types/components/FormControl/FormControl.stories.d.ts +0 -9
- package/build/@types/components/FormElements/Checkbox/Checkbox.stories.d.ts +0 -14
- package/build/@types/components/FormElements/Input/Input.stories.d.ts +0 -17
- package/build/@types/components/FormElements/Radio/Radio.stories.d.ts +0 -8
- package/build/@types/components/FormElements/Switch/Switch.stories.d.ts +0 -11
- package/build/@types/components/FormElements/TextArea/TextArea.stories.d.ts +0 -16
- package/build/@types/components/FormGroup/FormGroup.stories.d.ts +0 -8
- package/build/@types/components/GridContainer/GridContainer.stories.d.ts +0 -8
- package/build/@types/components/Header/Header.stories.d.ts +0 -10
- package/build/@types/components/HeaderLink/HeaderLink.stories.d.ts +0 -15
- package/build/@types/components/HighlightBox/HighlighBox.stories.d.ts +0 -8
- package/build/@types/components/IconText/IconText.stories.d.ts +0 -10
- package/build/@types/components/IconToolTip/IconToolTip.stories.d.ts +0 -14
- package/build/@types/components/InfoTextBlock/InfoTextBlock.stories.d.ts +0 -24
- package/build/@types/components/LayoutBox/LayoutBox.stories.d.ts +0 -19
- package/build/@types/components/Links/Link.stories.d.ts +0 -19
- package/build/@types/components/ListItem/ListItem.stories.d.ts +0 -11
- package/build/@types/components/ListItemWithRadio/ListItemWithRadio.stories.d.ts +0 -9
- package/build/@types/components/Logo/Logo.stories.d.ts +0 -8
- package/build/@types/components/MaxHeightText/MaxHeightText.stories.d.ts +0 -8
- package/build/@types/components/Menu/Menu.stories.d.ts +0 -16
- package/build/@types/components/MenuListItem/MenuListItem.stories.d.ts +0 -9
- package/build/@types/components/MobileTable/MobileTable.stories.d.ts +0 -7
- package/build/@types/components/Modal/Modal.stories.d.ts +0 -20
- package/build/@types/components/Nav/Nav.stories.d.ts +0 -14
- package/build/@types/components/NavMainLink/NavMainLink.stories.d.ts +0 -9
- package/build/@types/components/Pagination/Pagination.stories.d.ts +0 -8
- package/build/@types/components/PriceTag/PriceTag.stories.d.ts +0 -11
- package/build/@types/components/ProgressBar/ProgressBar.stories.d.ts +0 -28
- package/build/@types/components/QuantitySelector/QuantitySelect.stories.d.ts +0 -9
- package/build/@types/components/RadioBox/RadioBox.stories.d.ts +0 -47
- package/build/@types/components/RadioGroup/RadioGroup.stories.d.ts +0 -10
- package/build/@types/components/RadioListItem/RadioListItem.stories.d.ts +0 -12
- package/build/@types/components/RippleContainer/RippleContainer.stories.d.ts +0 -8
- package/build/@types/components/SearchBar/SearchBar.stories.d.ts +0 -24
- package/build/@types/components/SearchListItem/SearchListItem.stories.d.ts +0 -12
- package/build/@types/components/SearchSuggestionChip/SearchSuggestionChip.stories.d.ts +0 -9
- package/build/@types/components/Select/Select.stories.d.ts +0 -8
- package/build/@types/components/SideModal/SideModal.stories.d.ts +0 -8
- package/build/@types/components/SlideInOutContainer/SlideInOutContainer.stories.d.ts +0 -8
- package/build/@types/components/Slider/Slider.stories.d.ts +0 -9
- package/build/@types/components/Spacer/Spacer.stories.d.ts +0 -10
- package/build/@types/components/Spinner/Spinner.stories.d.ts +0 -25
- package/build/@types/components/Stepper/Stepper.stories.d.ts +0 -13
- package/build/@types/components/StepperMobile/StepperMobile.stories.d.ts +0 -8
- package/build/@types/components/Table/Table.stories.d.ts +0 -9
- package/build/@types/components/Timeline/Timeline.stories.d.ts +0 -68
- package/build/@types/components/ToolTip/ToolTip.stories.d.ts +0 -8
- package/build/@types/components/Typography/bodyText.stories.d.ts +0 -57
- package/build/@types/components/Typography/h1.stories.d.ts +0 -37
- package/build/@types/components/Typography/h2.stories.d.ts +0 -37
- package/build/@types/components/Typography/h3.stories.d.ts +0 -37
- package/build/@types/components/UnorderedList/UnorderedList.stories.d.ts +0 -7
- package/build/@types/components/WarningLabel/WarningLabel.stories.d.ts +0 -18
- package/build/@types/components/ZipCodeInput/ZipCodeInput.stories.d.ts +0 -9
- package/build/@types/containers/PageContainer/PageContainer.stories.d.ts +0 -26
- package/build/@types/containers/TwoColumnsContainer/TwoColumnsPageContainer.stories.d.ts +0 -42
- package/build/@types/containers/WizardContainer/WizardContainer.stories.d.ts +0 -24
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare enum ECgButtonSize {
|
|
3
|
+
'small' = 0,
|
|
4
|
+
'medium' = 1,
|
|
5
|
+
'large' = 2
|
|
6
|
+
}
|
|
7
|
+
export declare enum EButtonVariant {
|
|
8
|
+
'primary' = 0,
|
|
9
|
+
'secondary' = 1,
|
|
10
|
+
'tertiary' = 2,
|
|
11
|
+
'prio' = 3,
|
|
12
|
+
'ghost' = 4
|
|
13
|
+
}
|
|
14
|
+
export declare type TCgButton = {
|
|
15
|
+
size?: ECgButtonSize;
|
|
16
|
+
variant?: EButtonVariant;
|
|
17
|
+
icon?: React.ReactNode;
|
|
18
|
+
flexReverse?: boolean;
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
onClick?: () => void;
|
|
23
|
+
};
|
|
24
|
+
declare const CgButton: ({ size, variant, icon, flexReverse, disabled, onClick, children }: TCgButton) => JSX.Element;
|
|
25
|
+
export default CgButton;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ECgButtonSize, EButtonVariant } from './CgButton';
|
|
3
|
+
export declare type TCgButtonStyleProps = {
|
|
4
|
+
size?: ECgButtonSize;
|
|
5
|
+
variant?: EButtonVariant;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
flexReverse?: boolean;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
isIconOnly?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const CgButtonContainer: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, TCgButtonStyleProps, never>;
|
package/build/@types/index.d.ts
CHANGED
|
@@ -73,3 +73,4 @@ export * from './components/SlideInOutContainer/SlideInOutContainer';
|
|
|
73
73
|
export * from './components/SearchSuggestionChip/SearchSuggestionChip';
|
|
74
74
|
export * from './components/ZipCodeInput/ZipCodeInput';
|
|
75
75
|
export * from './components/MaxHeightText/MaxHeightText';
|
|
76
|
+
export * from './components/CgButton/CgButton';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/******************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation.
|
|
7
7
|
|
|
8
8
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -43,7 +43,11 @@ function __rest(s, e) {
|
|
|
43
43
|
function __makeTemplateObject(cooked, raw) {
|
|
44
44
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
45
45
|
return cooked;
|
|
46
|
-
}
|
|
46
|
+
}
|
|
47
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
48
|
+
var e = new Error(message);
|
|
49
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
50
|
+
};
|
|
47
51
|
|
|
48
52
|
exports.__makeTemplateObject = __makeTemplateObject;
|
|
49
53
|
exports.__rest = __rest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_tslib.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_tslib.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -17,6 +17,7 @@ require('../Header/Header.styles.js');
|
|
|
17
17
|
require('../HeaderLink/HeaderLink.styles.js');
|
|
18
18
|
require('../BackgroundImage/BackgroundImage.styles.js');
|
|
19
19
|
require('../Badge/Badge.styles.js');
|
|
20
|
+
require('../../../../_virtual/_tslib.js');
|
|
20
21
|
require('../Box/Box.styles.js');
|
|
21
22
|
require('../Button/Button.styles.js');
|
|
22
23
|
require('../BackButton/BackButton.styles.js');
|
|
@@ -88,6 +89,7 @@ require('../SlideInOutContainer/SlideInOutContainer.styles.js');
|
|
|
88
89
|
require('../SearchSuggestionChip/SearchSuggestionChip.styles.js');
|
|
89
90
|
require('../ZipCodeInput/ZipCodeInput.styles.js');
|
|
90
91
|
require('../MaxHeightText/styles.js');
|
|
92
|
+
require('../CgButton/CgButton.js');
|
|
91
93
|
|
|
92
94
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
93
95
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
require('react');
|
|
6
|
+
require('./CgButton.styles.js');
|
|
7
|
+
|
|
8
|
+
exports.ECgButtonSize = void 0;
|
|
9
|
+
(function (ECgButtonSize) {
|
|
10
|
+
ECgButtonSize[ECgButtonSize["small"] = 0] = "small";
|
|
11
|
+
ECgButtonSize[ECgButtonSize["medium"] = 1] = "medium";
|
|
12
|
+
ECgButtonSize[ECgButtonSize["large"] = 2] = "large";
|
|
13
|
+
})(exports.ECgButtonSize || (exports.ECgButtonSize = {}));
|
|
14
|
+
exports.EButtonVariant = void 0;
|
|
15
|
+
(function (EButtonVariant) {
|
|
16
|
+
EButtonVariant[EButtonVariant["primary"] = 0] = "primary";
|
|
17
|
+
EButtonVariant[EButtonVariant["secondary"] = 1] = "secondary";
|
|
18
|
+
EButtonVariant[EButtonVariant["tertiary"] = 2] = "tertiary";
|
|
19
|
+
EButtonVariant[EButtonVariant["prio"] = 3] = "prio";
|
|
20
|
+
EButtonVariant[EButtonVariant["ghost"] = 4] = "ghost";
|
|
21
|
+
})(exports.EButtonVariant || (exports.EButtonVariant = {}));
|
|
22
|
+
//# sourceMappingURL=CgButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CgButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _tslib = require('../../../../_virtual/_tslib.js');
|
|
4
|
+
var styled = require('styled-components');
|
|
5
|
+
var global_styles = require('../../shared/global.styles.js');
|
|
6
|
+
var CgButton = require('./CgButton.js');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
|
+
|
|
12
|
+
var disabledBase = styled.css(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n color: ", ";\n background-color: ", ";\n"], ["\n color: ", ";\n background-color: ", ";\n"])), function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.white; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.light; });
|
|
13
|
+
var CgPrimary = styled.css(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n &:disabled {\n ", "\n }\n"], ["\n background-color: ", ";\n color: ", ";\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n &:disabled {\n ", "\n }\n"])), function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.brandBlue; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.white; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.brandBlueHover; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.brandBlueActive; }, disabledBase);
|
|
14
|
+
var CgGhost = styled.css(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n &:disabled {\n color: ", ";\n }\n"], ["\n background-color: ", ";\n color: ", ";\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n &:disabled {\n color: ", ";\n }\n"])), function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.white; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.darkest; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.lightest; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.lighter; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.disabledGray; });
|
|
15
|
+
var CgSecondary = styled.css(templateObject_4 || (templateObject_4 = _tslib.__makeTemplateObject(["\n ", "\n border: 1px solid ", ";\n \n"], ["\n ", "\n border: 1px solid ", ";\n \n"])), CgGhost, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.medium; });
|
|
16
|
+
var CgTertiary = styled.css(templateObject_5 || (templateObject_5 = _tslib.__makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n &:disabled {\n ", "\n }\n"], ["\n background-color: ", ";\n color: ", ";\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n &:disabled {\n ", "\n }\n"])), function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.brandYellow; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.darkest; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.brandYellowHover; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.brandYellowActive; }, disabledBase);
|
|
17
|
+
var CgPrio = styled.css(templateObject_6 || (templateObject_6 = _tslib.__makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n &:disabled {\n ", "\n }\n"], ["\n background-color: ", ";\n color: ", ";\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n &:disabled {\n ", "\n }\n"])), function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.brandPurple; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.white; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.brandPrioHover; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.brandPrioActive; }, disabledBase);
|
|
18
|
+
var buttonFontSize = function (size, fontSize) {
|
|
19
|
+
var _a, _b;
|
|
20
|
+
switch (size) {
|
|
21
|
+
case CgButton.ECgButtonSize.small:
|
|
22
|
+
return "".concat((_a = fontSize === null || fontSize === void 0 ? void 0 : fontSize.size) === null || _a === void 0 ? void 0 : _a.s2, "px");
|
|
23
|
+
default:
|
|
24
|
+
return "".concat((_b = fontSize === null || fontSize === void 0 ? void 0 : fontSize.size) === null || _b === void 0 ? void 0 : _b.s3, "px");
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
var buttonPadding = function (size, spacings) {
|
|
28
|
+
switch (size) {
|
|
29
|
+
case CgButton.ECgButtonSize.small:
|
|
30
|
+
return "".concat(spacings === null || spacings === void 0 ? void 0 : spacings.xxs2, "px ").concat(spacings === null || spacings === void 0 ? void 0 : spacings.xs, "px");
|
|
31
|
+
case CgButton.ECgButtonSize.medium:
|
|
32
|
+
return "".concat(spacings === null || spacings === void 0 ? void 0 : spacings.xs, "px ").concat(spacings === null || spacings === void 0 ? void 0 : spacings.xs2, "px");
|
|
33
|
+
default:
|
|
34
|
+
return "".concat(spacings === null || spacings === void 0 ? void 0 : spacings.xs2, "px ").concat(spacings === null || spacings === void 0 ? void 0 : spacings.sm, "px");
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var buttonShadow = function (size, variant) {
|
|
38
|
+
if (variant === CgButton.EButtonVariant.secondary || variant === CgButton.EButtonVariant.ghost)
|
|
39
|
+
return 'none';
|
|
40
|
+
switch (size) {
|
|
41
|
+
case CgButton.ECgButtonSize.small:
|
|
42
|
+
return 'inset 0px -1px 0px rgba(0, 0, 0, 0.15)';
|
|
43
|
+
default:
|
|
44
|
+
return 'inset 0px -2px 0px rgba(0, 0, 0, 0.15)';
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
styled__default["default"].button(templateObject_7 || (templateObject_7 = _tslib.__makeTemplateObject(["\n border-radius: ", "px;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: ", "px;\n flex-direction: ", ";\n font-size ", ";\n padding: ", ";\n cursor: pointer;\n outline: none;\n border: none;\n position: relative;\n ", "\n &:disabled{\n cursor: default;\n }\n &:after{\n content: '';\n display: block;\n width: 100%;\n height: 100%;\n position: absolute;\n box-shadow: ", ";\n border-radius: ", "px;\n top: 0;\n left: 0;\n }\n\n ", "\n"], ["\n border-radius: ", "px;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: ", "px;\n flex-direction: ", ";\n font-size ", ";\n padding: ", ";\n cursor: pointer;\n outline: none;\n border: none;\n position: relative;\n ", "\n &:disabled{\n cursor: default;\n }\n &:after{\n content: '';\n display: block;\n width: 100%;\n height: 100%;\n position: absolute;\n box-shadow: ", ";\n border-radius: ", "px;\n top: 0;\n left: 0;\n }\n\n ", "\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xxs; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs; }, function (props) { return (props.flexReverse ? 'row-reverse' : 'row'); }, function (props) { return buttonFontSize(props.size, props.theme.typography); }, function (props) {
|
|
48
|
+
var _a;
|
|
49
|
+
return props.isIconOnly
|
|
50
|
+
? "".concat((_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs, "px")
|
|
51
|
+
: buttonPadding(props.size, props.theme.spacings);
|
|
52
|
+
}, global_styles.focusVisible, function (props) { return buttonShadow(props.size, props.variant); }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xxs; }, function (props) {
|
|
53
|
+
switch (props.variant) {
|
|
54
|
+
case CgButton.EButtonVariant.primary:
|
|
55
|
+
return CgPrimary;
|
|
56
|
+
case CgButton.EButtonVariant.secondary:
|
|
57
|
+
return CgSecondary;
|
|
58
|
+
case CgButton.EButtonVariant.tertiary:
|
|
59
|
+
return CgTertiary;
|
|
60
|
+
case CgButton.EButtonVariant.prio:
|
|
61
|
+
return CgPrio;
|
|
62
|
+
case CgButton.EButtonVariant.ghost:
|
|
63
|
+
return CgGhost;
|
|
64
|
+
default:
|
|
65
|
+
return CgPrimary;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
69
|
+
//# sourceMappingURL=CgButton.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CgButton.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var Button = require('../Button/Button.js');
|
|
7
|
+
require('../../../../_virtual/_tslib.js');
|
|
7
8
|
var designTokens = require('@citygross/design-tokens');
|
|
8
9
|
require('../Button/Button.styles.js');
|
|
9
10
|
require('@citygross/typography');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfoTextBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InfoTextBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -17,6 +17,7 @@ require('../Header/Header.styles.js');
|
|
|
17
17
|
require('../HeaderLink/HeaderLink.styles.js');
|
|
18
18
|
require('../BackgroundImage/BackgroundImage.styles.js');
|
|
19
19
|
require('../Badge/Badge.styles.js');
|
|
20
|
+
require('../../../../_virtual/_tslib.js');
|
|
20
21
|
require('../Box/Box.styles.js');
|
|
21
22
|
require('../Button/Button.styles.js');
|
|
22
23
|
require('../BackButton/BackButton.styles.js');
|
|
@@ -88,6 +89,7 @@ require('../SlideInOutContainer/SlideInOutContainer.styles.js');
|
|
|
88
89
|
require('../SearchSuggestionChip/SearchSuggestionChip.styles.js');
|
|
89
90
|
require('../ZipCodeInput/ZipCodeInput.styles.js');
|
|
90
91
|
require('../MaxHeightText/styles.js');
|
|
92
|
+
require('../CgButton/CgButton.js');
|
|
91
93
|
|
|
92
94
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
93
95
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -80,6 +80,7 @@ var SlideInOutContainer = require('./components/SlideInOutContainer/SlideInOutCo
|
|
|
80
80
|
var SearchSuggestionChip = require('./components/SearchSuggestionChip/SearchSuggestionChip.js');
|
|
81
81
|
var ZipCodeInput = require('./components/ZipCodeInput/ZipCodeInput.js');
|
|
82
82
|
var MaxHeightText = require('./components/MaxHeightText/MaxHeightText.js');
|
|
83
|
+
var CgButton = require('./components/CgButton/CgButton.js');
|
|
83
84
|
|
|
84
85
|
|
|
85
86
|
|
|
@@ -192,4 +193,12 @@ exports.SlideInOutContainer = SlideInOutContainer.SlideInOutContainer;
|
|
|
192
193
|
exports.SearchSuggestionChip = SearchSuggestionChip.SearchSuggestionChip;
|
|
193
194
|
exports.ZipCodeInput = ZipCodeInput.ZipCodeInput;
|
|
194
195
|
exports.MaxHeightText = MaxHeightText.MaxHeightText;
|
|
196
|
+
Object.defineProperty(exports, 'EButtonVariant', {
|
|
197
|
+
enumerable: true,
|
|
198
|
+
get: function () { return CgButton.EButtonVariant; }
|
|
199
|
+
});
|
|
200
|
+
Object.defineProperty(exports, 'ECgButtonSize', {
|
|
201
|
+
enumerable: true,
|
|
202
|
+
get: function () { return CgButton.ECgButtonSize; }
|
|
203
|
+
});
|
|
195
204
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|