@citygross/components 0.8.114 → 0.8.116

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.
Files changed (56) hide show
  1. package/build/@types/components/CartCard/CartCard.d.ts +9 -9
  2. package/build/@types/components/CgButton/CgButton.d.ts +10 -28
  3. package/build/@types/components/CgButton/CgButton.styles.d.ts +1 -15
  4. package/build/@types/components/CgButton/CgButton.types.d.ts +39 -0
  5. package/build/@types/components/CouponCode/CouponCode.d.ts +10 -10
  6. package/build/@types/components/Header/Header.d.ts +4 -4
  7. package/build/@types/components/StepperMobile/StepperMobile.d.ts +3 -3
  8. package/build/@types/helpers/button.d.ts +5 -0
  9. package/build/cjs/components/src/components/AddressBlock/AddressBlock.js +1 -0
  10. package/build/cjs/components/src/components/AddressBlock/AddressBlock.js.map +1 -1
  11. package/build/cjs/components/src/components/CartCard/CartCard.js +6 -3
  12. package/build/cjs/components/src/components/CartCard/CartCard.js.map +1 -1
  13. package/build/cjs/components/src/components/CgButton/CgButton.js +11 -26
  14. package/build/cjs/components/src/components/CgButton/CgButton.js.map +1 -1
  15. package/build/cjs/components/src/components/CgButton/CgButton.styles.js +53 -67
  16. package/build/cjs/components/src/components/CgButton/CgButton.styles.js.map +1 -1
  17. package/build/cjs/components/src/components/CgButton/CgButton.types.js +19 -0
  18. package/build/cjs/components/src/components/CgButton/CgButton.types.js.map +1 -0
  19. package/build/cjs/components/src/components/CouponCode/CouponCode.js +8 -7
  20. package/build/cjs/components/src/components/CouponCode/CouponCode.js.map +1 -1
  21. package/build/cjs/components/src/components/Header/Header.js +3 -2
  22. package/build/cjs/components/src/components/Header/Header.js.map +1 -1
  23. package/build/cjs/components/src/components/StepperMobile/StepperMobile.js +7 -5
  24. package/build/cjs/components/src/components/StepperMobile/StepperMobile.js.map +1 -1
  25. package/build/cjs/components/src/components/WarningLabel/WarningLabel.js +1 -0
  26. package/build/cjs/components/src/components/WarningLabel/WarningLabel.js.map +1 -1
  27. package/build/cjs/components/src/helpers/button.js +93 -0
  28. package/build/cjs/components/src/helpers/button.js.map +1 -0
  29. package/build/cjs/components/src/index.js +0 -8
  30. package/build/cjs/components/src/index.js.map +1 -1
  31. package/build/cjs/design-tokens/build/index.js +11 -6
  32. package/build/cjs/design-tokens/build/index.js.map +1 -1
  33. package/build/es/components/src/components/AddressBlock/AddressBlock.js +1 -0
  34. package/build/es/components/src/components/AddressBlock/AddressBlock.js.map +1 -1
  35. package/build/es/components/src/components/CartCard/CartCard.js +7 -4
  36. package/build/es/components/src/components/CartCard/CartCard.js.map +1 -1
  37. package/build/es/components/src/components/CgButton/CgButton.js +14 -29
  38. package/build/es/components/src/components/CgButton/CgButton.js.map +1 -1
  39. package/build/es/components/src/components/CgButton/CgButton.styles.js +54 -66
  40. package/build/es/components/src/components/CgButton/CgButton.styles.js.map +1 -1
  41. package/build/es/components/src/components/CgButton/CgButton.types.js +17 -0
  42. package/build/es/components/src/components/CgButton/CgButton.types.js.map +1 -0
  43. package/build/es/components/src/components/CouponCode/CouponCode.js +10 -9
  44. package/build/es/components/src/components/CouponCode/CouponCode.js.map +1 -1
  45. package/build/es/components/src/components/Header/Header.js +4 -3
  46. package/build/es/components/src/components/Header/Header.js.map +1 -1
  47. package/build/es/components/src/components/StepperMobile/StepperMobile.js +7 -5
  48. package/build/es/components/src/components/StepperMobile/StepperMobile.js.map +1 -1
  49. package/build/es/components/src/components/WarningLabel/WarningLabel.js +1 -0
  50. package/build/es/components/src/components/WarningLabel/WarningLabel.js.map +1 -1
  51. package/build/es/components/src/helpers/button.js +89 -0
  52. package/build/es/components/src/helpers/button.js.map +1 -0
  53. package/build/es/components/src/index.js +1 -1
  54. package/build/es/design-tokens/build/index.js +11 -6
  55. package/build/es/design-tokens/build/index.js.map +1 -1
  56. package/package.json +5 -5
@@ -1,19 +1,19 @@
1
1
  import React from 'react';
2
2
  export declare type TCartCard = {
3
- markings?: React.ReactNode;
4
- title: string;
5
3
  description?: React.ReactNode;
6
- secondaryDescription?: React.ReactNode;
7
- showDelete?: boolean;
4
+ image: string;
5
+ markings?: React.ReactNode;
8
6
  maxReachedWarning?: string;
9
7
  maxValue?: number;
10
- setValue?: (value: number) => void;
11
- value?: number;
12
- price: React.ReactNode;
13
- image: string;
14
8
  onDelete?: () => void;
9
+ price: React.ReactNode;
15
10
  quanitytSelector?: React.ReactNode;
11
+ secondaryDescription?: React.ReactNode;
12
+ setValue?: (value: number) => void;
13
+ showDelete?: boolean;
14
+ title: string;
16
15
  titleLineClamp?: number;
17
16
  titleLink?: React.ReactNode;
17
+ value?: number;
18
18
  };
19
- export declare const CartCard: ({ markings, title, description, showDelete, maxReachedWarning, value, price, image, titleLink, onDelete, maxValue, secondaryDescription, quanitytSelector, titleLineClamp, }: TCartCard) => JSX.Element;
19
+ export declare const CartCard: ({ description, image, markings, maxReachedWarning, maxValue, onDelete, price, quanitytSelector, secondaryDescription, showDelete, title, titleLineClamp, titleLink, value }: TCartCard) => JSX.Element;
@@ -1,30 +1,12 @@
1
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
- ariaLabel?: string;
16
- buttonRef?: React.Ref<HTMLButtonElement>;
2
+ import { EButtonVariant, EButtonSize } from './CgButton.types';
3
+ export declare const CgButton: React.ForwardRefExoticComponent<{
4
+ boxShadow?: boolean | undefined;
17
5
  children?: React.ReactNode;
18
- disabled?: boolean;
19
- flexReverse?: boolean;
20
- fullWidth?: boolean;
21
- icon?: React.ReactNode;
22
- id?: string;
23
- loading?: boolean;
24
- onClick?: () => void;
25
- round?: boolean;
26
- shouldPreventDefault?: boolean;
27
- size?: ECgButtonSize;
28
- variant?: EButtonVariant;
29
- };
30
- export declare const CgButton: ({ ariaLabel, buttonRef, children, disabled, flexReverse, fullWidth, icon, id, loading, onClick, round, shouldPreventDefault, size, variant }: TCgButton) => JSX.Element;
6
+ circle?: boolean | undefined;
7
+ fullWidth?: boolean | undefined;
8
+ loading?: boolean | undefined;
9
+ rounded?: boolean | undefined;
10
+ size?: EButtonSize | undefined;
11
+ variant?: EButtonVariant | undefined;
12
+ } & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
@@ -1,15 +1 @@
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
- fullWidth?: boolean;
11
- round?: boolean;
12
- };
13
- export declare const CgButtonContainer: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, TCgButtonStyleProps, never>;
14
- export declare const CgButtonContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Pick<TCgButtonStyleProps, "flexReverse" | "size" | "loading">, never>;
15
- export declare const CgButtonLoader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
1
+ export declare const Container: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, Omit<import("./CgButton.types").TCgButton, "children" | "loading" | "variant"> & import("./CgButton.types").TButtonSizeAttributes & import("./CgButton.types").TButtonVariantAttributes, never>;
@@ -0,0 +1,39 @@
1
+ /// <reference types="react" />
2
+ export declare enum EButtonSize {
3
+ small = "small",
4
+ medium = "medium",
5
+ large = "large"
6
+ }
7
+ export declare enum EButtonVariant {
8
+ primary = "primary",
9
+ secondary = "secondary",
10
+ tertiary = "tertiary",
11
+ prio = "prio",
12
+ ghost = "ghost"
13
+ }
14
+ export declare type TCgButton = {
15
+ boxShadow?: boolean;
16
+ children?: React.ReactNode;
17
+ circle?: boolean;
18
+ fullWidth?: boolean;
19
+ loading?: boolean;
20
+ rounded?: boolean;
21
+ size?: EButtonSize;
22
+ variant?: EButtonVariant;
23
+ } & React.ButtonHTMLAttributes<HTMLButtonElement>;
24
+ export declare type TCgButtonStyle = Omit<TCgButton, 'children' | 'loading' | 'variant'> & TButtonSizeAttributes & TButtonVariantAttributes;
25
+ export declare type TButtonSizeAttributes = {
26
+ fontSize?: number;
27
+ height?: number;
28
+ loadingSpinner?: number;
29
+ paddingX?: number;
30
+ paddingY?: number;
31
+ };
32
+ export declare type TButtonVariantAttributes = {
33
+ backgroundActive?: string;
34
+ backgroundColor?: string;
35
+ backgroundDisabled?: string;
36
+ backgroundHover?: string;
37
+ border?: boolean;
38
+ fontColor?: string;
39
+ };
@@ -1,24 +1,24 @@
1
1
  /// <reference types="react" />
2
2
  export declare enum ECouponCodeStatus {
3
- Success = "Success",
4
- Invalid = "Invalid",
3
+ Empty = "Empty",
5
4
  Error = "Error",
6
- Empty = "Empty"
5
+ Invalid = "Invalid",
6
+ Success = "Success"
7
7
  }
8
8
  declare type TSubmitResult = {
9
- status: ECouponCodeStatus;
10
9
  message: string;
10
+ status: ECouponCodeStatus;
11
11
  };
12
12
  export declare type TCouponCode = {
13
13
  label: string;
14
- resetLabel: string;
15
- placeholder: string;
16
- onSubmit: () => void;
17
- status?: TSubmitResult;
18
14
  loading?: boolean;
15
+ onReset: () => void;
16
+ onSubmit: () => void;
17
+ placeholder: string;
18
+ resetLabel: string;
19
19
  setValue: (value: string) => void;
20
+ status?: TSubmitResult;
20
21
  value: string;
21
- onReset: () => void;
22
22
  };
23
- export declare function CouponCode({ label, resetLabel, placeholder, onSubmit, status, loading, value, setValue, onReset }: TCouponCode): JSX.Element;
23
+ export declare function CouponCode({ label, loading, onReset, onSubmit, placeholder, resetLabel, setValue, status, value }: TCouponCode): JSX.Element;
24
24
  export {};
@@ -1,11 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
2
  export declare type THeader = {
3
+ children?: ReactNode;
3
4
  logoImage?: JSX.Element;
4
5
  logOut?: () => void;
5
6
  logOutLabel?: string;
6
- children?: ReactNode;
7
- topLinkLabel: string;
8
- topLinkHref?: string;
9
7
  lowerContainerMaxWidth?: number;
8
+ topLinkHref?: string;
9
+ topLinkLabel: string;
10
10
  };
11
- export declare function Header({ logOut, logOutLabel, topLinkHref, topLinkLabel, logoImage, lowerContainerMaxWidth, children }: THeader): JSX.Element;
11
+ export declare function Header({ children, logoImage, logOut, logOutLabel, lowerContainerMaxWidth, topLinkHref, topLinkLabel }: THeader): JSX.Element;
@@ -1,10 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { IStepperItem } from '../Stepper/StepperList';
3
3
  export declare type TStepperMobile = {
4
- steps: IStepperItem[];
4
+ buttonText: string;
5
5
  current: number;
6
6
  setCurrent: () => void;
7
7
  setPrevious: () => void;
8
- buttonText: string;
8
+ steps: IStepperItem[];
9
9
  };
10
- export declare function StepperMobile({ steps, current, setCurrent, setPrevious, buttonText }: TStepperMobile): JSX.Element;
10
+ export declare const StepperMobile: ({ buttonText, current, setCurrent, setPrevious, steps }: TStepperMobile) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { EButtonSize, EButtonVariant, TButtonSizeAttributes, TButtonVariantAttributes } from '../components/CgButton/CgButton.types';
2
+ export declare const getButtonAttributes: (buttonSize?: EButtonSize, buttonVariant?: EButtonVariant) => {
3
+ sizeAttributes: TButtonSizeAttributes;
4
+ variantAttributes: TButtonVariantAttributes;
5
+ };
@@ -19,6 +19,7 @@ require('@citygross/design-tokens');
19
19
  require('../Button/Button.styles.js');
20
20
  require('../CartCard/CartCard.styles.js');
21
21
  require('../CgButton/CgButton.js');
22
+ require('../CgButton/CgButton.types.js');
22
23
  require('../CartCardLabel/CartCardLabel.styles.js');
23
24
  require('@citygross/utils');
24
25
  require('react-loading-skeleton');
@@ -1 +1 @@
1
- {"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -7,23 +7,26 @@ var fallback_grocery = require('./assets/fallback_grocery.svg.js');
7
7
  var CartCard_styles = require('./CartCard.styles.js');
8
8
  var icons = require('@citygross/icons');
9
9
  var CgButton = require('../CgButton/CgButton.js');
10
+ var CgButton_types = require('../CgButton/CgButton.types.js');
10
11
 
11
12
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
13
 
13
14
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
15
 
15
16
  var CartCard = function (_a) {
16
- var markings = _a.markings, title = _a.title, description = _a.description, showDelete = _a.showDelete, maxReachedWarning = _a.maxReachedWarning, value = _a.value, price = _a.price, image = _a.image, titleLink = _a.titleLink, onDelete = _a.onDelete, _b = _a.maxValue, maxValue = _b === void 0 ? 999 : _b, secondaryDescription = _a.secondaryDescription, quanitytSelector = _a.quanitytSelector, _c = _a.titleLineClamp, titleLineClamp = _c === void 0 ? 1 : _c;
17
+ var description = _a.description, image = _a.image, markings = _a.markings, maxReachedWarning = _a.maxReachedWarning, _b = _a.maxValue, maxValue = _b === void 0 ? 999 : _b, onDelete = _a.onDelete, price = _a.price, quanitytSelector = _a.quanitytSelector, secondaryDescription = _a.secondaryDescription, showDelete = _a.showDelete, title = _a.title, _c = _a.titleLineClamp, titleLineClamp = _c === void 0 ? 1 : _c, titleLink = _a.titleLink, value = _a.value;
17
18
  return (React__default["default"].createElement(CartCard_styles.CartCardContainer, null,
18
19
  React__default["default"].createElement(CartCard_styles.CartCardImage, { src: image || fallback_grocery }),
19
20
  React__default["default"].createElement(CartCard_styles.CartCardInner, null,
20
21
  React__default["default"].createElement(CartCard_styles.CartCardInnerTop, null,
21
22
  React__default["default"].createElement(CartCard_styles.CartCardInfo, null,
22
23
  markings && (React__default["default"].createElement(CartCard_styles.MarkingsContainer, null, markings)),
23
- titleLink || title && (React__default["default"].createElement(CartCard_styles.CartCardTitle, { titleLineClamp: titleLineClamp }, title)),
24
+ titleLink ||
25
+ (title && (React__default["default"].createElement(CartCard_styles.CartCardTitle, { titleLineClamp: titleLineClamp }, title))),
24
26
  description && description),
25
27
  showDelete && (React__default["default"].createElement(CartCard_styles.CartCardDelete, null,
26
- React__default["default"].createElement(CgButton.CgButton, { onClick: onDelete, variant: CgButton.EButtonVariant.secondary, icon: React__default["default"].createElement(icons.Icons.Trash, { width: 16, height: 16 }) })))),
28
+ React__default["default"].createElement(CgButton.CgButton, { onClick: onDelete, variant: CgButton_types.EButtonVariant.secondary },
29
+ React__default["default"].createElement(icons.Icons.Trash, { width: 16, height: 16 }))))),
27
30
  secondaryDescription && secondaryDescription,
28
31
  React__default["default"].createElement(CartCard_styles.CartCardPriceContainer, null,
29
32
  React__default["default"].createElement(CartCard_styles.PriceContainer, null,
@@ -1 +1 @@
1
- {"version":3,"file":"CartCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CartCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,40 +2,25 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var _tslib = require('../../../../_virtual/_tslib.js');
5
6
  var React = require('react');
6
7
  var CgButton_styles = require('./CgButton.styles.js');
7
8
  var Spinner = require('../Spinner/Spinner.js');
9
+ var CgButton_types = require('./CgButton.types.js');
10
+ var button = require('../../helpers/button.js');
8
11
 
9
12
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
13
 
11
14
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
12
15
 
13
- exports.ECgButtonSize = void 0;
14
- (function (ECgButtonSize) {
15
- ECgButtonSize[ECgButtonSize["small"] = 0] = "small";
16
- ECgButtonSize[ECgButtonSize["medium"] = 1] = "medium";
17
- ECgButtonSize[ECgButtonSize["large"] = 2] = "large";
18
- })(exports.ECgButtonSize || (exports.ECgButtonSize = {}));
19
- exports.EButtonVariant = void 0;
20
- (function (EButtonVariant) {
21
- EButtonVariant[EButtonVariant["primary"] = 0] = "primary";
22
- EButtonVariant[EButtonVariant["secondary"] = 1] = "secondary";
23
- EButtonVariant[EButtonVariant["tertiary"] = 2] = "tertiary";
24
- EButtonVariant[EButtonVariant["prio"] = 3] = "prio";
25
- EButtonVariant[EButtonVariant["ghost"] = 4] = "ghost";
26
- })(exports.EButtonVariant || (exports.EButtonVariant = {}));
27
- var CgButton = function (_a) {
28
- var ariaLabel = _a.ariaLabel, buttonRef = _a.buttonRef, children = _a.children, disabled = _a.disabled, flexReverse = _a.flexReverse, fullWidth = _a.fullWidth, icon = _a.icon, _b = _a.id, id = _b === void 0 ? 'cg-button' : _b, loading = _a.loading, onClick = _a.onClick, round = _a.round, _c = _a.shouldPreventDefault, shouldPreventDefault = _c === void 0 ? true : _c, size = _a.size, variant = _a.variant;
29
- return (React__default["default"].createElement(CgButton_styles.CgButtonContainer, { "aria-label": ariaLabel, disabled: disabled || loading, flexReverse: flexReverse, fullWidth: fullWidth, isIconOnly: !children, id: id, loading: loading, onClick: function (e) {
30
- shouldPreventDefault && e.preventDefault();
31
- onClick && onClick();
32
- }, ref: buttonRef, round: round, size: size, variant: variant },
33
- React__default["default"].createElement(CgButton_styles.CgButtonContent, { flexReverse: flexReverse, loading: loading, size: size },
34
- icon,
35
- children),
36
- loading && (React__default["default"].createElement(CgButton_styles.CgButtonLoader, null,
37
- React__default["default"].createElement(Spinner.Spinner, { animationSpeedMs: 1000, size: 16 })))));
38
- };
16
+ var CgButton = React.forwardRef(function (_a, ref) {
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.getButtonAttributes(size, variant), sizeAttributes = _d.sizeAttributes, variantAttributes = _d.variantAttributes;
19
+ return (React__default["default"].createElement(CgButton_styles.Container, _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),
20
+ loading && (React__default["default"].createElement(Spinner.Spinner, { animationSpeedMs: 1000, size: sizeAttributes.loadingSpinner })),
21
+ children));
22
+ });
23
+ CgButton.displayName = 'CgButton';
39
24
 
40
25
  exports.CgButton = CgButton;
41
26
  //# sourceMappingURL=CgButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CgButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CgButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -5,77 +5,63 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var _tslib = require('../../../../_virtual/_tslib.js');
6
6
  var styled = require('styled-components');
7
7
  var global_styles = require('../../shared/global.styles.js');
8
- var CgButton = require('./CgButton.js');
8
+ var CgButton_types = require('./CgButton.types.js');
9
+ var designTokens = require('@citygross/design-tokens');
9
10
 
10
11
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
12
 
12
13
  var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
13
14
 
14
- 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; });
15
- 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);
16
- 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; });
17
- 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.disabledGray; });
18
- 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);
19
- 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);
20
- var buttonFontSize = function (size, fontSize) {
21
- var _a, _b;
22
- switch (size) {
23
- case CgButton.ECgButtonSize.small:
24
- return "".concat((_a = fontSize === null || fontSize === void 0 ? void 0 : fontSize.size) === null || _a === void 0 ? void 0 : _a.s2, "px");
25
- default:
26
- return "".concat((_b = fontSize === null || fontSize === void 0 ? void 0 : fontSize.size) === null || _b === void 0 ? void 0 : _b.s3, "px");
27
- }
28
- };
29
- var buttonPadding = function (size, spacings) {
30
- switch (size) {
31
- case CgButton.ECgButtonSize.small:
32
- return "".concat(spacings === null || spacings === void 0 ? void 0 : spacings.xxs2, "px ").concat(spacings === null || spacings === void 0 ? void 0 : spacings.xs, "px");
33
- case CgButton.ECgButtonSize.medium:
34
- return "".concat(spacings === null || spacings === void 0 ? void 0 : spacings.xs, "px ").concat(spacings === null || spacings === void 0 ? void 0 : spacings.xs2, "px");
35
- default:
36
- return "".concat(spacings === null || spacings === void 0 ? void 0 : spacings.xs2, "px ").concat(spacings === null || spacings === void 0 ? void 0 : spacings.sm, "px");
37
- }
38
- };
39
- var buttonShadow = function (size, variant) {
40
- if (variant === CgButton.EButtonVariant.secondary || variant === CgButton.EButtonVariant.ghost)
41
- return 'none';
42
- switch (size) {
43
- case CgButton.ECgButtonSize.small:
44
- return 'inset 0px -1px 0px rgba(0, 0, 0, 0.15)';
45
- default:
46
- return 'inset 0px -2px 0px rgba(0, 0, 0, 0.15)';
47
- }
48
- };
49
- var CgButtonContainer = styled__default["default"].button(templateObject_7 || (templateObject_7 = _tslib.__makeTemplateObject(["\n border-radius: ", "px;\n padding: ", ";\n cursor: pointer;\n outline: none;\n border: none;\n position: relative;\n ", "\n font-family: ", ";\n\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"], ["\n border-radius: ", "px;\n padding: ", ";\n cursor: pointer;\n outline: none;\n border: none;\n position: relative;\n ", "\n font-family: ", ";\n\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"])), function (props) { var _a; return props.round ? '100' : (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xxs; }, function (props) {
50
- var _a;
51
- return props.isIconOnly
52
- ? "".concat((_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs, "px")
53
- : buttonPadding(props.size, props.theme.spacings);
54
- }, function (props) { return (props === null || props === void 0 ? void 0 : props.fullWidth) && "width: 100%;"; }, function (props) { var _a, _b; return (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.typography) === null || _b === void 0 ? void 0 : _b.type.primary; }, global_styles.focusVisible, function (props) { return buttonShadow(props.size, props.variant); }, function (props) { var _a; return props.round ? '100' : (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xxs; }, function (props) {
55
- switch (props.variant) {
56
- case CgButton.EButtonVariant.primary:
57
- return CgPrimary;
58
- case CgButton.EButtonVariant.secondary:
59
- return CgSecondary;
60
- case CgButton.EButtonVariant.tertiary:
61
- return CgTertiary;
62
- case CgButton.EButtonVariant.prio:
63
- return CgPrio;
64
- case CgButton.EButtonVariant.ghost:
65
- return CgGhost;
66
- default:
67
- return CgPrimary;
68
- }
69
- }, function (props) {
70
- var _a;
71
- return props.loading &&
72
- "\n background-color: ".concat((_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.lightest, "\n ");
73
- });
74
- var CgButtonContent = styled__default["default"].div(templateObject_8 || (templateObject_8 = _tslib.__makeTemplateObject(["\ndisplay: flex;\njustify-content: center;\nalign-items: center;\ngap: ", "px;\nflex-direction: ", ";\nfont-size ", ";\n", ";\nwhite-space: nowrap;\nmin-width: max-content;\n"], ["\ndisplay: flex;\njustify-content: center;\nalign-items: center;\ngap: ", "px;\nflex-direction: ", ";\nfont-size ", ";\n", ";\nwhite-space: nowrap;\nmin-width: max-content;\n"])), 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) { return (props === null || props === void 0 ? void 0 : props.loading) && "opacity: 0"; });
75
- var CgButtonLoader = styled__default["default"].div(templateObject_9 || (templateObject_9 = _tslib.__makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: grid;\n place-content: center;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: grid;\n place-content: center;\n"])));
76
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
15
+ var _a, _b, _c, _d, _e;
16
+ var Container = styled__default["default"].button(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n background-color: ", ";\n color: ", ";\n cursor: pointer;\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 &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: default;\n }\n\n ", "\n"], ["\n border: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n background-color: ", ";\n color: ", ";\n cursor: pointer;\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 &:disabled {\n background-color: ", ";\n color: ", ";\n cursor: default;\n }\n\n ", "\n"])), function (_a) {
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';
20
+ }, function (_a) {
21
+ var _b, _c, _d;
22
+ var circle = _a.circle, rounded = _a.rounded;
23
+ return circle
24
+ ? (_b = designTokens.theme.attributes) === null || _b === void 0 ? void 0 : _b.borderRadius.circle
25
+ : rounded
26
+ ? "".concat((_c = designTokens.theme.attributes) === null || _c === void 0 ? void 0 : _c.borderRadius.rounded, "px")
27
+ : "".concat((_d = designTokens.theme.spacings) === null || _d === void 0 ? void 0 : _d.xxs, "px");
28
+ }, function (_a) {
29
+ var _b, _c;
30
+ var boxShadow = _a.boxShadow, size = _a.size;
31
+ return boxShadow
32
+ ? size === CgButton_types.EButtonSize.small
33
+ ? (_b = designTokens.theme.attributes) === null || _b === void 0 ? void 0 : _b.boxShadow.layoutShadowInset
34
+ : (_c = designTokens.theme.attributes) === null || _c === void 0 ? void 0 : _c.boxShadow.layoutShadowInsetMedium
35
+ : 'none';
36
+ }, function (_a) {
37
+ var backgroundColor = _a.backgroundColor;
38
+ return backgroundColor;
39
+ }, function (_a) {
40
+ var fontColor = _a.fontColor;
41
+ return fontColor;
42
+ }, (_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
+ }, (_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
+ }, function (_a) {
49
+ var fullWidth = _a.fullWidth;
50
+ return (fullWidth ? '100%' : 'max-content');
51
+ }, 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
+ }, function (_a) {
55
+ var backgroundActive = _a.backgroundActive;
56
+ return backgroundActive;
57
+ }, function (_a) {
58
+ var backgroundHover = _a.backgroundHover;
59
+ return backgroundHover;
60
+ }, function (_a) {
61
+ var backgroundDisabled = _a.backgroundDisabled;
62
+ return backgroundDisabled;
63
+ }, (_e = designTokens.theme.palette) === null || _e === void 0 ? void 0 : _e.placeholder, global_styles.focusVisible);
64
+ var templateObject_1;
77
65
 
78
- exports.CgButtonContainer = CgButtonContainer;
79
- exports.CgButtonContent = CgButtonContent;
80
- exports.CgButtonLoader = CgButtonLoader;
66
+ exports.Container = Container;
81
67
  //# 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ exports.EButtonSize = void 0;
6
+ (function (EButtonSize) {
7
+ EButtonSize["small"] = "small";
8
+ EButtonSize["medium"] = "medium";
9
+ EButtonSize["large"] = "large";
10
+ })(exports.EButtonSize || (exports.EButtonSize = {}));
11
+ exports.EButtonVariant = void 0;
12
+ (function (EButtonVariant) {
13
+ EButtonVariant["primary"] = "primary";
14
+ EButtonVariant["secondary"] = "secondary";
15
+ EButtonVariant["tertiary"] = "tertiary";
16
+ EButtonVariant["prio"] = "prio";
17
+ EButtonVariant["ghost"] = "ghost";
18
+ })(exports.EButtonVariant || (exports.EButtonVariant = {}));
19
+ //# sourceMappingURL=CgButton.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CgButton.types.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var React = require('react');
6
6
  var CouponCode_styles = require('./CouponCode.styles.js');
7
7
  var CgButton = require('../CgButton/CgButton.js');
8
+ var CgButton_types = require('../CgButton/CgButton.types.js');
8
9
  var icons = require('@citygross/icons');
9
10
  var designTokens = require('@citygross/design-tokens');
10
11
  var Link = require('../Links/Link.js');
@@ -16,10 +17,10 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
16
17
 
17
18
  exports.ECouponCodeStatus = void 0;
18
19
  (function (ECouponCodeStatus) {
19
- ECouponCodeStatus["Success"] = "Success";
20
- ECouponCodeStatus["Invalid"] = "Invalid";
21
- ECouponCodeStatus["Error"] = "Error";
22
20
  ECouponCodeStatus["Empty"] = "Empty";
21
+ ECouponCodeStatus["Error"] = "Error";
22
+ ECouponCodeStatus["Invalid"] = "Invalid";
23
+ ECouponCodeStatus["Success"] = "Success";
23
24
  })(exports.ECouponCodeStatus || (exports.ECouponCodeStatus = {}));
24
25
  var CouponResultIcon = function (_a) {
25
26
  var _b, _c, _d;
@@ -34,9 +35,9 @@ var CouponResultIcon = function (_a) {
34
35
  }
35
36
  };
36
37
  function CouponCode(_a) {
37
- var label = _a.label, resetLabel = _a.resetLabel, placeholder = _a.placeholder, onSubmit = _a.onSubmit, status = _a.status, loading = _a.loading, value = _a.value, setValue = _a.setValue, onReset = _a.onReset;
38
+ var label = _a.label, loading = _a.loading, onReset = _a.onReset, onSubmit = _a.onSubmit, placeholder = _a.placeholder, resetLabel = _a.resetLabel, setValue = _a.setValue, status = _a.status, value = _a.value;
38
39
  var _b = React.useState(false), customFocus = _b[0], setCustomFocus = _b[1];
39
- return (React__default["default"].createElement(React__default["default"].Fragment, null, (status === null || status === void 0 ? void 0 : status.status) === exports.ECouponCodeStatus.Empty ? (React__default["default"].createElement(CouponCode_styles.CouponContainer, null,
40
+ return (React__default["default"].createElement(React.Fragment, null, (status === null || status === void 0 ? void 0 : status.status) === exports.ECouponCodeStatus.Empty ? (React__default["default"].createElement(CouponCode_styles.CouponContainer, null,
40
41
  React__default["default"].createElement(CouponCode_styles.CouponInputContainer, null,
41
42
  React__default["default"].createElement(CouponCode_styles.CouponInput, { type: "text", placeholder: placeholder, value: value, onChange: function (e) { return setValue(e.currentTarget.value); }, onMouseDown: function () {
42
43
  setCustomFocus(true);
@@ -47,9 +48,9 @@ function CouponCode(_a) {
47
48
  }
48
49
  }, onBlur: function () { return setCustomFocus(false); }, customFocus: customFocus })),
49
50
  React__default["default"].createElement("div", null,
50
- React__default["default"].createElement(CgButton.CgButton, { variant: CgButton.EButtonVariant.secondary, disabled: loading, onClick: function () { return onSubmit(); }, size: CgButton.ECgButtonSize.medium, fullWidth: true, loading: loading }, label)))) : (React__default["default"].createElement(CouponCode_styles.CouponResultContainer, { status: status === null || status === void 0 ? void 0 : status.status }, (status === null || status === void 0 ? void 0 : status.status) === exports.ECouponCodeStatus.Success ? (React__default["default"].createElement(CouponCode_styles.CouponResultMessage, null,
51
+ React__default["default"].createElement(CgButton.CgButton, { variant: CgButton_types.EButtonVariant.secondary, disabled: loading, onClick: function () { return onSubmit(); }, size: CgButton_types.EButtonSize.medium, fullWidth: true, loading: loading }, label)))) : (React__default["default"].createElement(CouponCode_styles.CouponResultContainer, { status: status === null || status === void 0 ? void 0 : status.status }, (status === null || status === void 0 ? void 0 : status.status) === exports.ECouponCodeStatus.Success ? (React__default["default"].createElement(CouponCode_styles.CouponResultMessage, null,
51
52
  React__default["default"].createElement(CouponResultIcon, { status: status === null || status === void 0 ? void 0 : status.status }),
52
- React__default["default"].createElement("p", null, status === null || status === void 0 ? void 0 : status.message))) : (React__default["default"].createElement(React__default["default"].Fragment, null,
53
+ React__default["default"].createElement("p", null, status === null || status === void 0 ? void 0 : status.message))) : (React__default["default"].createElement(React.Fragment, null,
53
54
  React__default["default"].createElement(CouponCode_styles.CouponResultMessage, null,
54
55
  React__default["default"].createElement(CouponResultIcon, { status: status === null || status === void 0 ? void 0 : status.status }),
55
56
  React__default["default"].createElement("p", null, status === null || status === void 0 ? void 0 : status.message)),
@@ -1 +1 @@
1
- {"version":3,"file":"CouponCode.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CouponCode.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -10,6 +10,7 @@ var Logo = require('../Logo/Logo.js');
10
10
  var Header_styles = require('./Header.styles.js');
11
11
  var HeaderLink = require('../HeaderLink/HeaderLink.js');
12
12
  var CgButton = require('../CgButton/CgButton.js');
13
+ var CgButton_types = require('../CgButton/CgButton.types.js');
13
14
 
14
15
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
16
 
@@ -17,14 +18,14 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
17
18
 
18
19
  function Header(_a) {
19
20
  var _b, _c;
20
- var logOut = _a.logOut, logOutLabel = _a.logOutLabel, _d = _a.topLinkHref, topLinkHref = _d === void 0 ? '/' : _d, topLinkLabel = _a.topLinkLabel, logoImage = _a.logoImage, _e = _a.lowerContainerMaxWidth, lowerContainerMaxWidth = _e === void 0 ? (_b = designTokens.theme.constants) === null || _b === void 0 ? void 0 : _b.pageContentMaxWidth : _e, children = _a.children;
21
+ var children = _a.children, logoImage = _a.logoImage, logOut = _a.logOut, logOutLabel = _a.logOutLabel, _d = _a.lowerContainerMaxWidth, lowerContainerMaxWidth = _d === void 0 ? (_b = designTokens.theme.constants) === null || _b === void 0 ? void 0 : _b.pageContentMaxWidth : _d, _e = _a.topLinkHref, topLinkHref = _e === void 0 ? '/' : _e, topLinkLabel = _a.topLinkLabel;
21
22
  var device = utils.useDetectDevice();
22
23
  return (React__default["default"].createElement(Header_styles.Wrapper, null,
23
24
  topLinkLabel && topLinkHref && (React__default["default"].createElement(HeaderLink.HeaderLink, { icon: React__default["default"].createElement(icons.Icons.ChevronLeft, { width: 20, height: 20, color: (_c = designTokens.theme.palette) === null || _c === void 0 ? void 0 : _c.white }), linkHref: topLinkHref, linkLabel: topLinkLabel })),
24
25
  (logoImage || logOutLabel) && (React__default["default"].createElement(Header_styles.HeaderWrapper, null,
25
26
  React__default["default"].createElement(Header_styles.HeaderContainer, { maxWidth: lowerContainerMaxWidth },
26
27
  logoImage && React__default["default"].createElement(Logo.Logo, { logoImage: logoImage }),
27
- logOut && (React__default["default"].createElement(CgButton.CgButton, { onClick: function () { return logOut && logOut(); }, variant: CgButton.EButtonVariant.secondary, size: device.isMobile ? CgButton.ECgButtonSize.medium : CgButton.ECgButtonSize.large }, logOutLabel))))),
28
+ logOut && (React__default["default"].createElement(CgButton.CgButton, { onClick: function () { return logOut && logOut(); }, variant: CgButton_types.EButtonVariant.secondary, size: device.isMobile ? CgButton_types.EButtonSize.medium : CgButton_types.EButtonSize.large }, logOutLabel))))),
28
29
  children && React__default["default"].createElement(Header_styles.MenuContainer, null, children)));
29
30
  }
30
31
 
@@ -1 +1 @@
1
- {"version":3,"file":"Header.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Header.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}