@mailstep/design-system 0.6.73-beta.4 → 0.6.73

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailstep/design-system",
3
- "version": "0.6.73-beta.4",
3
+ "version": "0.6.73",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -6,7 +6,7 @@ import { SocialLinks } from './components/SocialLinks';
6
6
  import { EMAIL_ADDRESS } from './utils/links';
7
7
  import { Trans } from '@lingui/react';
8
8
  import { x } from '@xstyled/styled-components';
9
- import { Wrapper, MailTo, LanguageBox, LogoWrapper, MainLogo, CardBodyWithLanguage, Version } from './styles';
9
+ import { Wrapper, MailTo, LanguageBox, LogoWrapper, MainLogo, Version, CardBodyWithLanguage } from './styles';
10
10
  var Login = function (_a) {
11
11
  var onSubmit = _a.onSubmit, activeLanguage = _a.activeLanguage, onLanguageChange = _a.onLanguageChange, children = _a.children, brand = _a.brand, brandVariant = _a.brandVariant, isSubmitting = _a.isSubmitting, isSubmitDisabled = _a.isSubmitDisabled, withDistributionCenterSelect = _a.withDistributionCenterSelect, distributionCenterOptions = _a.distributionCenterOptions, selectedDistributionCenter = _a.selectedDistributionCenter, onChangeDistributionCenter = _a.onChangeDistributionCenter, languageItems = _a.languageItems, version = _a.version, backgroundImage = _a.backgroundImage, _b = _a.hasSupport, hasSupport = _b === void 0 ? true : _b, _c = _a.hasSocialLinks, hasSocialLinks = _c === void 0 ? true : _c;
12
12
  return (_jsxs(Wrapper, { backgroundImage: backgroundImage, children: [_jsxs(CardBodyWithLanguage, { children: [_jsx(LogoWrapper, { children: _jsx(MainLogo, { brand: brand, variant: brandVariant }) }), _jsxs(LanguageBox, { children: [hasSupport && (_jsxs(x.div, { mr: 4, children: [_jsx(H6, { color: "gray1", variant: "bold", mt: "8px", mb: "8px", as: "h6", children: _jsx(Trans, { id: "form.heading.support", message: "Support:" }) }), _jsx(MailTo, { href: "mailto:mailstep@mailstep.cz", children: EMAIL_ADDRESS })] })), _jsx(LanguageSwitch, { activeLanguage: activeLanguage, onLanguageChange: onLanguageChange, languageItems: languageItems })] }), _jsx(LoginForm, { onSubmit: onSubmit, isSubmitDisabled: isSubmitDisabled, isSubmitting: isSubmitting, onChangeDistributionCenter: onChangeDistributionCenter, withDistributionCenterSelect: withDistributionCenterSelect, distributionCenterOptions: distributionCenterOptions, selectedDistributionCenter: selectedDistributionCenter })] }), children, version && _jsx(Version, { children: version }), hasSocialLinks && _jsx(SocialLinks, {})] }));
@@ -3,7 +3,7 @@ export declare const Wrapper: import("styled-components").StyledComponent<"div",
3
3
  backgroundImage?: "mailship" | undefined;
4
4
  }, never>;
5
5
  export declare const LanguageBox: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
6
- export declare const CardBodyWithLanguage: import("styled-components").StyledComponent<({ children, ...rest }: import("../../Elements/Card/types").PropsBody) => JSX.Element, import("@xstyled/system").Theme, {}, never>;
6
+ export declare const CardBodyWithLanguage: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
7
7
  export declare const MailTo: import("styled-components").StyledComponent<"a", import("@xstyled/system").Theme, {}, never>;
8
8
  export declare const LogoWrapper: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
9
9
  export declare const MainLogo: import("styled-components").StyledComponent<({ brand, variant, size, width, height, ...rest }: import("../../Elements/Logo/types").LogoProps) => JSX.Element | null, import("@xstyled/system").Theme, {}, never>;
@@ -2,7 +2,6 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
2
2
  if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
3
  return cooked;
4
4
  };
5
- import { CardBody } from '../../Elements/Card/Card';
6
5
  import Logo from '../../Elements/Logo/Logo';
7
6
  import mailship from './assets/mailship.jpg';
8
7
  import styled, { th } from '@xstyled/styled-components';
@@ -14,7 +13,7 @@ export var Wrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTe
14
13
  return "transparent ".concat(backgroundImage && "url(".concat(backgroundImageMap[backgroundImage], ")"), " 50% 0% no-repeat padding-box;");
15
14
  });
16
15
  export var LanguageBox = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n margin: 15px 0;\n align-items: flex-end;\n justify-content: space-between;\n @media (min-width: 1024px) {\n justify-content: flex-end;\n margin: 40px 0;\n }\n"], ["\n display: flex;\n margin: 15px 0;\n align-items: flex-end;\n justify-content: space-between;\n @media (min-width: 1024px) {\n justify-content: flex-end;\n margin: 40px 0;\n }\n"])));
17
- export var CardBodyWithLanguage = styled(CardBody)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n justify-content: start;\n padding: 0 32px 10px 32px;\n flex-grow: 1;\n margin: auto;\n width: 500px;\n @media (min-width: 1024px) {\n display: block;\n flex-grow: 0;\n }\n"], ["\n display: flex;\n justify-content: start;\n padding: 0 32px 10px 32px;\n flex-grow: 1;\n margin: auto;\n width: 500px;\n @media (min-width: 1024px) {\n display: block;\n flex-grow: 0;\n }\n"])));
16
+ export var CardBodyWithLanguage = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n justify-content: start;\n padding: 0 32px 10px 32px;\n flex-grow: 1;\n margin: auto;\n width: 500px;\n @media (min-width: 1024px) {\n display: block;\n flex-grow: 0;\n }\n"], ["\n display: flex;\n justify-content: start;\n padding: 0 32px 10px 32px;\n flex-grow: 1;\n margin: auto;\n width: 500px;\n @media (min-width: 1024px) {\n display: block;\n flex-grow: 0;\n }\n"])));
18
17
  export var MailTo = styled.a(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n &:hover {\n color: ", ";\n }\n"], ["\n color: ", ";\n &:hover {\n color: ", ";\n }\n"])), th.color('typoPrimary'), th.color('red1'));
19
18
  export var LogoWrapper = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n margin-top: 30px;\n @media (min-width: 1024px) {\n display: block;\n margin-top: 0;\n }\n"], ["\n display: flex;\n justify-content: center;\n margin-top: 30px;\n @media (min-width: 1024px) {\n display: block;\n margin-top: 0;\n }\n"])));
20
19
  export var MainLogo = styled(Logo)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n width: 50%;\n height: auto;\n"], ["\n width: 50%;\n height: auto;\n"])));
@@ -14,7 +14,7 @@ export var Stepper = function (_a) {
14
14
  if (!(items === null || items === void 0 ? void 0 : items.length))
15
15
  return null;
16
16
  return (_jsxs(Container, { children: [_jsx(ItemsWrapper, { total: items.length, hasComponent: !!Component, children: items.map(function (_a, index) {
17
- var title = _a.title, disabled = _a.disabled, completed = _a.completed, icon = _a.icon;
18
- return (_jsx(StepItem, { onClick: handleChangeStep === null || handleChangeStep === void 0 ? void 0 : handleChangeStep(index), title: title, index: index, total: items.length, activeStep: activeStep, disabled: disabled, completed: completed, hasStepNumbering: hasStepNumbering, icon: icon }, title));
17
+ var title = _a.title, disabled = _a.disabled, visible = _a.visible, completed = _a.completed, icon = _a.icon;
18
+ return (_jsx(StepItem, { onClick: handleChangeStep === null || handleChangeStep === void 0 ? void 0 : handleChangeStep(index), title: title, index: index, total: items.length, activeStep: activeStep, disabled: disabled, visible: visible, completed: completed, hasStepNumbering: hasStepNumbering, icon: icon }, title));
19
19
  }) }), Component && _jsx(Component, { handleGoToNextStep: handleGoToNextStep, isLoading: isLoading })] }));
20
20
  };
@@ -5,6 +5,7 @@ type StepItemProps = {
5
5
  index: number;
6
6
  activeStep: number;
7
7
  disabled?: boolean;
8
+ visible?: boolean;
8
9
  completed?: boolean;
9
10
  icon?: string;
10
11
  hasStepNumbering?: boolean;
@@ -6,8 +6,8 @@ import { x } from '@xstyled/styled-components';
6
6
  import isBoolean from 'lodash/isBoolean';
7
7
  import { Line, StepItemContainer, ContentWrapper } from './styles';
8
8
  export var StepItem = function (_a) {
9
- var title = _a.title, index = _a.index, disabled = _a.disabled, activeStep = _a.activeStep, completed = _a.completed, icon = _a.icon, _b = _a.hasStepNumbering, hasStepNumbering = _b === void 0 ? true : _b, total = _a.total, onClick = _a.onClick;
9
+ var title = _a.title, index = _a.index, disabled = _a.disabled, activeStep = _a.activeStep, completed = _a.completed, icon = _a.icon, _b = _a.hasStepNumbering, hasStepNumbering = _b === void 0 ? true : _b, _c = _a.visible, visible = _c === void 0 ? true : _c, total = _a.total, onClick = _a.onClick;
10
10
  var isActiveStep = index === activeStep;
11
11
  var isCompletedStep = isBoolean(completed) ? completed : index < activeStep;
12
- return (_jsxs(StepItemContainer, { onClick: !disabled && isCompletedStep ? onClick : undefined, isActiveStep: isActiveStep, isDisabled: disabled, total: total, children: [_jsx(Line, { isActiveStep: isActiveStep, isCompletedStep: isCompletedStep }), _jsxs(ContentWrapper, { children: [_jsx(StepCircle, { icon: isCompletedStep ? 'check' : icon, isCompleted: isCompletedStep, isActiveStep: isActiveStep, children: index + 1 }), _jsxs(x.div, { alignSelf: "center", children: [hasStepNumbering && (_jsx(x.span, { textTransform: "uppercase", children: _jsxs(H7, { color: isCompletedStep ? 'red1' : 'gray1', variant: "semiBold", mt: 0, mb: "4px", children: [_jsx(Trans, { id: "step", message: "Step" }), ": ", index + 1] }) })), _jsx(Paragraph2, { variant: "medium", children: title })] })] })] }));
12
+ return (_jsxs(StepItemContainer, { onClick: !disabled && isCompletedStep ? onClick : undefined, isActiveStep: isActiveStep, isDisabled: disabled, isVisible: visible, total: total, children: [_jsx(Line, { isActiveStep: isActiveStep, isCompletedStep: isCompletedStep }), _jsxs(ContentWrapper, { children: [_jsx(StepCircle, { icon: isCompletedStep ? 'check' : icon, isCompleted: isCompletedStep, isActiveStep: isActiveStep, children: index + 1 }), _jsxs(x.div, { alignSelf: "center", children: [hasStepNumbering && (_jsx(x.span, { textTransform: "uppercase", children: _jsxs(H7, { color: isCompletedStep ? 'red1' : 'gray1', variant: "semiBold", mt: 0, mb: "4px", children: [_jsx(Trans, { id: "step", message: "Step" }), ": ", index + 1] }) })), _jsx(Paragraph2, { variant: "medium", children: title })] })] })] }));
13
13
  };
@@ -1,6 +1,7 @@
1
1
  export declare const StepItemContainer: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {
2
2
  isActiveStep: boolean;
3
3
  isDisabled?: boolean | undefined;
4
+ isVisible?: boolean | undefined;
4
5
  total: number;
5
6
  onClick?: (() => void) | undefined;
6
7
  }, never>;
@@ -14,12 +14,15 @@ var responsiveCss = css(templateObject_1 || (templateObject_1 = __makeTemplateOb
14
14
  var total = _a.total;
15
15
  return total * 240;
16
16
  }, StepCircleContainer);
17
- export var StepItemContainer = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border-radius: 10px;\n width: 240px;\n padding: 24px;\n background-color: ", ";\n cursor: ", ";\n ", "\n"], ["\n border-radius: 10px;\n width: 240px;\n padding: 24px;\n background-color: ", ";\n cursor: ", ";\n ", "\n"])), function (_a) {
17
+ export var StepItemContainer = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border-radius: 10px;\n width: 240px;\n padding: 24px;\n background-color: ", ";\n cursor: ", ";\n display: ", ";\n ", "\n"], ["\n border-radius: 10px;\n width: 240px;\n padding: 24px;\n background-color: ", ";\n cursor: ", ";\n display: ", ";\n ", "\n"])), function (_a) {
18
18
  var isActiveStep = _a.isActiveStep;
19
19
  return (isActiveStep ? th.color('bgLightGray1') : 'transparent');
20
20
  }, function (_a) {
21
21
  var isDisabled = _a.isDisabled, onClick = _a.onClick;
22
22
  return (isDisabled ? 'not-allowed' : onClick ? 'pointer' : 'auto');
23
+ }, function (_a) {
24
+ var isVisible = _a.isVisible;
25
+ return (isVisible ? 'block' : 'none');
23
26
  }, responsiveCss);
24
27
  export var Line = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 4px;\n border-radius: 8px;\n width: 100%;\n background-color: ", ";\n margin-bottom: 16px;\n"], ["\n height: 4px;\n border-radius: 8px;\n width: 100%;\n background-color: ", ";\n margin-bottom: 16px;\n"])), function (_a) {
25
28
  var isActiveStep = _a.isActiveStep, isCompletedStep = _a.isCompletedStep;
@@ -52,7 +52,7 @@ var iconItems = [
52
52
  },
53
53
  {
54
54
  title: 'Processed in stock',
55
- icon: 'boxRamp'
55
+ icon: 'boxRamp',
56
56
  },
57
57
  {
58
58
  title: 'Log Processed in stock',
@@ -16,5 +16,6 @@ export type StepperItem = {
16
16
  icon?: string;
17
17
  completed?: boolean;
18
18
  disabled?: boolean;
19
+ visible?: boolean;
19
20
  component?: FC<StepperPassedDownProps>;
20
21
  };
@@ -1,6 +1,4 @@
1
- import { CardComponentProps, CardProps, PropsBody, PropsCardImage } from './types';
2
- export declare const Card: ({ children, block, hasBorder, backgroundColor, ...rest }: CardProps) => JSX.Element;
3
- export declare const CardBody: ({ children, ...rest }: PropsBody) => JSX.Element;
4
- export declare const CardImage: ({ children, color, ...rest }: PropsCardImage) => JSX.Element;
5
- declare const CardComponent: ({ img, body, children, color }: CardComponentProps) => import("react/jsx-runtime").JSX.Element;
6
- export default CardComponent;
1
+ import { FC } from 'react';
2
+ import { CardProps } from './types';
3
+ declare const Card: FC<CardProps>;
4
+ export default Card;
@@ -1,45 +1,7 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { StyledCard } from './styles';
3
+ var Card = function (_a) {
4
+ var children = _a.children, _b = _a.display, display = _b === void 0 ? 'block' : _b, bg = _a.bg, onClick = _a.onClick, maxWidth = _a.maxWidth;
5
+ return (_jsx(StyledCard, { onClick: onClick, bg: bg, display: display, maxWidth: maxWidth, hasOnClick: !!onClick, children: children }));
11
6
  };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
- import { th } from '@xstyled/styled-components';
25
- import { useTheme } from '@xstyled/styled-components';
26
- import { StyledCard, CardWrapper, StyledBody, ImageWrapper, StyledImage } from './styles';
27
- export var Card = function (_a) {
28
- var children = _a.children, block = _a.block, _b = _a.hasBorder, hasBorder = _b === void 0 ? true : _b, backgroundColor = _a.backgroundColor, rest = __rest(_a, ["children", "block", "hasBorder", "backgroundColor"]);
29
- return (_jsx(CardWrapper, { block: block, children: _jsx(StyledCard, __assign({ block: block, hasBorder: hasBorder, backgroundColor: backgroundColor }, rest, { children: children })) }));
30
- };
31
- export var CardBody = function (_a) {
32
- var children = _a.children, rest = __rest(_a, ["children"]);
33
- return _jsx(StyledBody, __assign({}, rest, { children: children }));
34
- };
35
- export var CardImage = function (_a) {
36
- var children = _a.children, _b = _a.color, color = _b === void 0 ? 'white' : _b, rest = __rest(_a, ["children", "color"]);
37
- var theme = useTheme();
38
- var themeColor = th.color(color)({ theme: theme });
39
- return (_jsx(ImageWrapper, { color: themeColor, children: _jsx(StyledImage, __assign({}, rest, { children: children })) }));
40
- };
41
- var CardComponent = function (_a) {
42
- var img = _a.img, body = _a.body, children = _a.children, color = _a.color;
43
- return (_jsxs(Card, { children: [img && (_jsx(CardImage, { color: color, children: _jsx("img", { src: img, width: "300" }) })), _jsxs(CardBody, { children: [body, children] })] }));
44
- };
45
- export default CardComponent;
7
+ export default Card;
@@ -1,3 +1,2 @@
1
- import CardComponent from './Card';
2
- export { Card, CardImage, CardBody } from './Card';
3
- export default CardComponent;
1
+ import Card from './Card';
2
+ export default Card;
@@ -1,3 +1,2 @@
1
- import CardComponent from './Card';
2
- export { Card, CardImage, CardBody } from './Card';
3
- export default CardComponent;
1
+ import Card from './Card';
2
+ export default Card;
@@ -2,14 +2,13 @@
2
2
  import type { StoryObj } from '@storybook/react';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: ({ children, block, hasBorder, backgroundColor, ...rest }: import("../types").CardProps) => JSX.Element;
5
+ component: import("react").FC<import("../types").CardProps>;
6
6
  tags: string[];
7
7
  argTypes: {};
8
8
  };
9
9
  export default meta;
10
10
  type Story = StoryObj<typeof meta>;
11
11
  export declare const Default: Story;
12
- export declare const NoBorder: Story;
13
- export declare const WithPadding: Story;
14
- export declare const WithShadow: Story;
15
- export declare const WithBackground: Story;
12
+ export declare const WithOnClick: Story;
13
+ export declare const CustomBg: Story;
14
+ export declare const WithMaxWidth: Story;
@@ -1,43 +1,34 @@
1
- import { Card } from '../Card';
1
+ import Card from '../Card';
2
2
  var longText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.';
3
3
  var meta = {
4
4
  title: 'Elements/Card',
5
5
  component: Card,
6
6
  tags: ['autodocs'],
7
- argTypes: {},
7
+ argTypes: {}
8
8
  };
9
9
  export default meta;
10
10
  export var Default = {
11
11
  args: {
12
- children: longText,
13
- },
14
- };
15
- export var NoBorder = {
16
- args: {
17
- children: longText,
18
- hasBorder: false,
19
- },
12
+ children: longText
13
+ }
20
14
  };
21
- export var WithPadding = {
15
+ export var WithOnClick = {
22
16
  args: {
23
17
  children: longText,
24
- p: '20px',
25
- },
18
+ onClick: function () {
19
+ console.log('click');
20
+ }
21
+ }
26
22
  };
27
- export var WithShadow = {
23
+ export var CustomBg = {
28
24
  args: {
29
- display: 'block',
30
- shadow: true,
31
25
  children: longText,
32
- p: '20px',
33
- },
26
+ bg: 'green20'
27
+ }
34
28
  };
35
- export var WithBackground = {
29
+ export var WithMaxWidth = {
36
30
  args: {
37
- display: 'block',
38
- shadow: true,
39
31
  children: longText,
40
- p: '20px',
41
- backgroundColor: 'red2'
42
- },
32
+ maxWidth: '400px'
33
+ }
43
34
  };
@@ -1,14 +1,7 @@
1
- /// <reference types="react" />
2
- export declare const CardWrapper: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {
3
- block?: boolean | undefined;
4
- }, never>;
1
+ import { Display } from './types';
5
2
  export declare const StyledCard: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {
6
- block?: boolean | undefined;
7
- hasBorder?: boolean | undefined;
8
- shadow?: boolean | undefined;
9
- p?: string | undefined;
10
- backgroundColor?: string | undefined;
3
+ display: Display;
4
+ bg?: string | undefined;
5
+ hasOnClick: boolean;
6
+ maxWidth?: string | undefined;
11
7
  }, never>;
12
- export declare const ImageWrapper: import("styled-components").StyledComponent<(props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "color">) => import("react").ReactElement<any, "div">, import("@xstyled/system").Theme, import("@xstyled/system").SystemProps<import("@xstyled/system").Theme>, "color">;
13
- export declare const StyledImage: import("styled-components").StyledComponent<(props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "color">) => import("react").ReactElement<any, "div">, import("@xstyled/system").Theme, import("@xstyled/system").SystemProps<import("@xstyled/system").Theme>, "color">;
14
- export declare const StyledBody: import("styled-components").StyledComponent<(props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "color">) => import("react").ReactElement<any, "div">, import("@xstyled/system").Theme, import("@xstyled/system").SystemProps<import("@xstyled/system").Theme>, "color">;
@@ -2,33 +2,19 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
2
2
  if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
3
  return cooked;
4
4
  };
5
- import styled, { x, css, down } from '@xstyled/styled-components';
5
+ import styled, { css } from '@xstyled/styled-components';
6
6
  import { th } from '@xstyled/styled-components';
7
- var wrapper = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n box-sizing: border-box;\n font-family: ", ";\n :after {\n box-sizing: border-box;\n }\n"], ["\n display: flex;\n box-sizing: border-box;\n font-family: ", ";\n :after {\n box-sizing: border-box;\n }\n"])), th('fonts.primary'));
8
- export var CardWrapper = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", ";\n display: ", ";\n justify-content: center;\n flex-wrap: wrap;\n"], ["\n ", ";\n display: ", ";\n justify-content: center;\n flex-wrap: wrap;\n"])), wrapper, function (_a) {
9
- var block = _a.block;
10
- return (block ? 'block' : 'inline-flex');
11
- });
12
- export var StyledCard = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n justify-content: space-between;\n display: ", ";\n padding: ", ";\n box-shadow: ", ";\n border: ", ";\n background-color: ", ";\n border-color: lightGray3;\n border-radius: 4px;\n"], ["\n justify-content: space-between;\n display: ", ";\n padding: ", ";\n box-shadow: ", ";\n border: ", ";\n background-color: ", ";\n border-color: lightGray3;\n border-radius: 4px;\n"])), function (_a) {
13
- var block = _a.block;
14
- return (block ? 'block' : 'inline-flex');
15
- }, function (_a) {
16
- var p = _a.p;
17
- return p || 'initial';
18
- }, function (_a) {
19
- var shadow = _a.shadow;
20
- return (shadow ? th.shadow('smooth') : 'none');
7
+ export var StyledCard = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: ", ";\n padding: 20px;\n border: 1px solid;\n background-color: ", ";\n border-color: ", ";\n border-radius: 12px;\n width: 100%;\n\n ", "\n\n ", "\n"], ["\n display: ", ";\n padding: 20px;\n border: 1px solid;\n background-color: ", ";\n border-color: ", ";\n border-radius: 12px;\n width: 100%;\n\n ", "\n\n ", "\n"])), function (_a) {
8
+ var display = _a.display;
9
+ return display;
21
10
  }, function (_a) {
22
- var hasBorder = _a.hasBorder;
23
- return (hasBorder ? th.border('slim') : 'none');
11
+ var bg = _a.bg;
12
+ return (bg ? th.color(bg) : 'white');
13
+ }, th.color('lightGray6'), function (_a) {
14
+ var maxWidth = _a.maxWidth;
15
+ return maxWidth && "max-width: ".concat(maxWidth, ";");
24
16
  }, function (_a) {
25
- var backgroundColor = _a.backgroundColor;
26
- return (backgroundColor ? th.color(backgroundColor) : 'initial');
17
+ var hasOnClick = _a.hasOnClick;
18
+ return hasOnClick && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n cursor: pointer;\n &:hover {\n border-color: ", ";\n }\n "], ["\n cursor: pointer;\n &:hover {\n border-color: ", ";\n }\n "])), th.color('gray1'));
27
19
  });
28
- export var ImageWrapper = styled(x.div)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", ";\n justify-content: center;\n flex-direction: column;\n background-color: ", ";\n ", "\n"], ["\n ", ";\n justify-content: center;\n flex-direction: column;\n background-color: ", ";\n ", "\n"])), wrapper, function (_a) {
29
- var color = _a.color;
30
- return color;
31
- }, down('lg', css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: none;\n "], ["\n display: none;\n "])))));
32
- export var StyledImage = styled(x.div)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n align-self: center;\n justify-content: center;\n object-fit: cover;\n"], ["\n display: flex;\n align-self: center;\n justify-content: center;\n object-fit: cover;\n"])));
33
- export var StyledBody = styled(x.div)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", ";\n justify-content: center;\n flex-direction: column;\n"], ["\n ", ";\n justify-content: center;\n flex-direction: column;\n"])), wrapper);
34
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
20
+ var templateObject_1, templateObject_2;
@@ -1,21 +1,9 @@
1
1
  /// <reference types="react" />
2
- import { StyledCard } from './styles';
3
2
  export type CardProps = {
4
3
  children: React.ReactNode;
5
- shadow?: boolean;
6
- block?: boolean;
7
- hasBorder?: boolean;
8
- } & React.ComponentProps<typeof StyledCard>;
9
- export type PropsBody = {
10
- children: React.ReactNode;
11
- };
12
- export type PropsCardImage = {
13
- children: React.ReactNode;
14
- color?: string;
15
- };
16
- export type CardComponentProps = {
17
- img?: string;
18
- children?: React.ReactNode;
19
- body?: React.ReactNode;
20
- color?: string;
4
+ display?: Display;
5
+ onClick?: () => void;
6
+ bg?: string;
7
+ maxWidth?: string;
21
8
  };
9
+ export type Display = 'block' | 'flex';
package/ui/index.d.ts CHANGED
@@ -55,7 +55,6 @@ export * from './Elements/Avatar';
55
55
  export * from './Elements/Badge';
56
56
  export * from './Elements/BorderedBox';
57
57
  export * from './Elements/Button';
58
- export * from './Elements/Card';
59
58
  export * from './Elements/Dropdown';
60
59
  export * from './Elements/ErrorMessage';
61
60
  export * from './Elements/Icon';