@mailstep/design-system 0.7.39 → 0.7.40-beta.0
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 +1 -1
- package/ui/Blocks/SideMenu/styles.d.ts +1 -1
- package/ui/Elements/Button/styles.d.ts +1 -1
- package/ui/Elements/Icon/Icon.d.ts +5 -4
- package/ui/Elements/Icon/Icon.js +13 -10
- package/ui/Elements/Icon/icons/Valuable.d.ts +2 -3
- package/ui/Elements/Icon/icons/Valuable.js +1 -1
- package/ui/Elements/Icon/stories/BadgeIcon.stories.d.ts +1 -1
- package/ui/Elements/Icon/stories/Icon.stories.d.ts +2 -1
- package/ui/Elements/Icon/stories/Icon.stories.js +21 -12
- package/ui/Elements/Icon/types.d.ts +2 -2
- package/ui/Elements/Pagination/styled.d.ts +2 -2
- package/ui/Forms/Checkbox/styles.d.ts +1 -1
- package/ui/index.es.js +9510 -9513
- package/ui/index.umd.js +415 -415
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ export declare const ItemLabel: import("styled-components").StyledComponent<"div
|
|
|
9
9
|
$isCompact?: boolean | undefined;
|
|
10
10
|
isSubitem?: boolean | undefined;
|
|
11
11
|
}, never>;
|
|
12
|
-
export declare const ItemDropdownArrow: import("styled-components").StyledComponent<(
|
|
12
|
+
export declare const ItemDropdownArrow: import("styled-components").StyledComponent<import("react").FC<import("../..").IconProps>, import("@xstyled/system").Theme, {
|
|
13
13
|
$lightMode?: boolean | undefined;
|
|
14
14
|
}, never>;
|
|
15
15
|
export declare const TooltipItemLabel: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
|
|
@@ -3,7 +3,7 @@ export declare const StyledWrapper: import("styled-components").StyledComponent<
|
|
|
3
3
|
export declare const LoadingIconWrapper: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {
|
|
4
4
|
$addMarginRight: boolean;
|
|
5
5
|
}, never>;
|
|
6
|
-
export declare const StyledIcon: import("styled-components").StyledComponent<(
|
|
6
|
+
export declare const StyledIcon: import("styled-components").StyledComponent<import("react").FC<import("../Icon").IconProps>, import("@xstyled/system").Theme, {
|
|
7
7
|
$addMarginRight?: boolean | undefined;
|
|
8
8
|
$addMarginLeft?: boolean | undefined;
|
|
9
9
|
}, never>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { IconDefinition } from '@fortawesome/fontawesome-common-types';
|
|
3
|
+
import type { FlipProp } from '@fortawesome/fontawesome-svg-core';
|
|
4
|
+
import type { IconProps } from './types';
|
|
4
5
|
export declare const iconDictionary: {
|
|
5
6
|
[name: string]: IconDefinition | [IconDefinition, FlipProp];
|
|
6
7
|
};
|
|
7
|
-
declare const Icon:
|
|
8
|
+
declare const Icon: FC<IconProps>;
|
|
8
9
|
export default Icon;
|
package/ui/Elements/Icon/Icon.js
CHANGED
|
@@ -20,6 +20,7 @@ import { faBell } from '@fortawesome/pro-regular-svg-icons/faBell';
|
|
|
20
20
|
import { faBox as faBoxRegular } from '@fortawesome/pro-regular-svg-icons/faBox';
|
|
21
21
|
import { faCalendar } from '@fortawesome/pro-regular-svg-icons/faCalendar';
|
|
22
22
|
import { faCalendarPlus } from '@fortawesome/pro-regular-svg-icons/faCalendarPlus';
|
|
23
|
+
import { faCartFlatbedBoxes } from '@fortawesome/pro-regular-svg-icons/faCartFlatbedBoxes';
|
|
23
24
|
import { faChevronDown } from '@fortawesome/pro-regular-svg-icons/faChevronDown';
|
|
24
25
|
import { faChevronRight as farChevronRight } from '@fortawesome/pro-regular-svg-icons/faChevronRight';
|
|
25
26
|
import { faChevronUp } from '@fortawesome/pro-regular-svg-icons/faChevronUp';
|
|
@@ -48,7 +49,6 @@ import { faPenToSquare } from '@fortawesome/pro-regular-svg-icons/faPenToSquare'
|
|
|
48
49
|
import { faShareSquare } from '@fortawesome/pro-regular-svg-icons/faShareSquare';
|
|
49
50
|
import { faSquareMinus } from '@fortawesome/pro-regular-svg-icons/faSquareMinus';
|
|
50
51
|
import { faTrashCan } from '@fortawesome/pro-regular-svg-icons/faTrashCan';
|
|
51
|
-
import { faCartFlatbedBoxes } from '@fortawesome/pro-regular-svg-icons/faCartFlatbedBoxes';
|
|
52
52
|
import { faTriangleExclamation as farTriangleExclamation } from '@fortawesome/pro-regular-svg-icons/faTriangleExclamation';
|
|
53
53
|
import { faAngleLeft } from '@fortawesome/pro-solid-svg-icons/faAngleLeft';
|
|
54
54
|
import { faAngleRight } from '@fortawesome/pro-solid-svg-icons/faAngleRight';
|
|
@@ -58,12 +58,12 @@ import { faArrowLeft } from '@fortawesome/pro-solid-svg-icons/faArrowLeft';
|
|
|
58
58
|
import { faArrowsRotate } from '@fortawesome/pro-solid-svg-icons/faArrowsRotate';
|
|
59
59
|
import { faBadgeCheck } from '@fortawesome/pro-solid-svg-icons/faBadgeCheck';
|
|
60
60
|
import { faBan } from '@fortawesome/pro-solid-svg-icons/faBan';
|
|
61
|
+
import { faBatteryBolt } from '@fortawesome/pro-solid-svg-icons/faBatteryBolt';
|
|
61
62
|
import { faBox } from '@fortawesome/pro-solid-svg-icons/faBox';
|
|
62
63
|
import { faBoxArchive } from '@fortawesome/pro-solid-svg-icons/faBoxArchive';
|
|
63
64
|
import { faBoxCircleCheck } from '@fortawesome/pro-solid-svg-icons/faBoxCircleCheck';
|
|
64
65
|
import { faBoxOpen } from '@fortawesome/pro-solid-svg-icons/faBoxOpen';
|
|
65
66
|
import { faBoxesStacked } from '@fortawesome/pro-solid-svg-icons/faBoxesStacked';
|
|
66
|
-
import { faUpDownLeftRight } from '@fortawesome/pro-solid-svg-icons/faUpDownLeftRight';
|
|
67
67
|
import { faCamera } from '@fortawesome/pro-solid-svg-icons/faCamera';
|
|
68
68
|
import { faCartArrowDown } from '@fortawesome/pro-solid-svg-icons/faCartArrowDown';
|
|
69
69
|
import { faChartLine } from '@fortawesome/pro-solid-svg-icons/faChartLine';
|
|
@@ -80,13 +80,10 @@ import { faComputerMouseScrollwheel } from '@fortawesome/pro-solid-svg-icons/faC
|
|
|
80
80
|
import { faCrop } from '@fortawesome/pro-solid-svg-icons/faCrop';
|
|
81
81
|
import { faCube } from '@fortawesome/pro-solid-svg-icons/faCube';
|
|
82
82
|
import { faEquals } from '@fortawesome/pro-solid-svg-icons/faEquals';
|
|
83
|
-
import { faFluxCapacitor } from '@fortawesome/pro-solid-svg-icons/faFluxCapacitor';
|
|
84
|
-
import { faWineGlassCrack } from '@fortawesome/pro-solid-svg-icons/faWineGlassCrack';
|
|
85
|
-
import { faBatteryBolt } from '@fortawesome/pro-solid-svg-icons/faBatteryBolt';
|
|
86
|
-
import { faPaperPlane } from '@fortawesome/pro-solid-svg-icons/faPaperPlane';
|
|
87
|
-
import { faFlaskRoundPotion } from '@fortawesome/pro-solid-svg-icons/faFlaskRoundPotion';
|
|
88
83
|
import { faExchange } from '@fortawesome/pro-solid-svg-icons/faExchange';
|
|
89
84
|
import { faFlag } from '@fortawesome/pro-solid-svg-icons/faFlag';
|
|
85
|
+
import { faFlaskRoundPotion } from '@fortawesome/pro-solid-svg-icons/faFlaskRoundPotion';
|
|
86
|
+
import { faFluxCapacitor } from '@fortawesome/pro-solid-svg-icons/faFluxCapacitor';
|
|
90
87
|
import { faGlobe } from '@fortawesome/pro-solid-svg-icons/faGlobe';
|
|
91
88
|
import { faGreaterThanEqual } from '@fortawesome/pro-solid-svg-icons/faGreaterThanEqual';
|
|
92
89
|
import { faHome } from '@fortawesome/pro-solid-svg-icons/faHome';
|
|
@@ -98,6 +95,7 @@ import { faLuggageCart } from '@fortawesome/pro-solid-svg-icons/faLuggageCart';
|
|
|
98
95
|
import { faMinus } from '@fortawesome/pro-solid-svg-icons/faMinus';
|
|
99
96
|
import { faNotEqual } from '@fortawesome/pro-solid-svg-icons/faNotEqual';
|
|
100
97
|
import { faNoteSticky } from '@fortawesome/pro-solid-svg-icons/faNoteSticky';
|
|
98
|
+
import { faPaperPlane } from '@fortawesome/pro-solid-svg-icons/faPaperPlane';
|
|
101
99
|
import { faPen } from '@fortawesome/pro-solid-svg-icons/faPen';
|
|
102
100
|
import { faPeopleCarry as fasPeopleCarry } from '@fortawesome/pro-solid-svg-icons/faPeopleCarry';
|
|
103
101
|
import { faPlus } from '@fortawesome/pro-solid-svg-icons/faPlus';
|
|
@@ -110,14 +108,15 @@ import { faTags } from '@fortawesome/pro-solid-svg-icons/faTags';
|
|
|
110
108
|
import { faTriangleExclamation } from '@fortawesome/pro-solid-svg-icons/faTriangleExclamation';
|
|
111
109
|
import { faTruck } from '@fortawesome/pro-solid-svg-icons/faTruck';
|
|
112
110
|
import { faTruckRampBox } from '@fortawesome/pro-solid-svg-icons/faTruckRampBox';
|
|
111
|
+
import { faUpDownLeftRight } from '@fortawesome/pro-solid-svg-icons/faUpDownLeftRight';
|
|
113
112
|
import { faUser } from '@fortawesome/pro-solid-svg-icons/faUser';
|
|
114
113
|
import { faUsersGear } from '@fortawesome/pro-solid-svg-icons/faUsersGear';
|
|
115
114
|
import { faWatch } from '@fortawesome/pro-solid-svg-icons/faWatch';
|
|
116
115
|
import { faWebhook } from '@fortawesome/pro-solid-svg-icons/faWebhook';
|
|
116
|
+
import { faWineGlassCrack } from '@fortawesome/pro-solid-svg-icons/faWineGlassCrack';
|
|
117
117
|
import { faXmark as fasXmark } from '@fortawesome/pro-solid-svg-icons/faXmark';
|
|
118
118
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
119
|
-
import styled, { useTheme } from '@xstyled/styled-components';
|
|
120
|
-
import { th } from '@xstyled/styled-components';
|
|
119
|
+
import styled, { useTheme, th } from '@xstyled/styled-components';
|
|
121
120
|
export var iconDictionary = {
|
|
122
121
|
greaterThan: faAngleRight,
|
|
123
122
|
startsWith: faAnglesRight,
|
|
@@ -255,7 +254,7 @@ var Icon = function (_a) {
|
|
|
255
254
|
var theme = useTheme();
|
|
256
255
|
var colorFill = fill && th.color(fill)({ theme: theme }); // React.Text wont return number here
|
|
257
256
|
var colorSecondary = secondaryColor && th.color(secondaryColor)({ theme: theme });
|
|
258
|
-
var namedIcon = (typeof icon
|
|
257
|
+
var namedIcon = (typeof icon === 'string' && (iconDictionary === null || iconDictionary === void 0 ? void 0 : iconDictionary[icon])) || false;
|
|
259
258
|
var iconProp = React.useMemo(function () {
|
|
260
259
|
if (namedIcon) {
|
|
261
260
|
return Array.isArray(namedIcon) ? namedIcon[0] : namedIcon;
|
|
@@ -263,6 +262,10 @@ var Icon = function (_a) {
|
|
|
263
262
|
return [iconPrefixMap[style], icon];
|
|
264
263
|
}, [icon, style, namedIcon]);
|
|
265
264
|
var flipProp = (namedIcon && Array.isArray(namedIcon) && namedIcon[1]) || undefined;
|
|
265
|
+
if (!namedIcon && typeof icon === 'function') {
|
|
266
|
+
var IconComponent = icon;
|
|
267
|
+
return _jsx(IconComponent, { width: size, height: size, fill: colorFill, stroke: colorSecondary });
|
|
268
|
+
}
|
|
266
269
|
return (_jsx(FaIconSizing, { size: size, className: className !== null && className !== void 0 ? className : '', "$colorSecondary": colorSecondary, "$fixedWidth": fixedWidth, children: _jsx(FontAwesomeIcon, { color: colorFill, flip: flipProp, icon: iconProp, className: "faIcon ".concat(fixedWidth ? 'fa-fw' : '', " ").concat(spinning ? 'fa-spin' : '') }) }));
|
|
267
270
|
};
|
|
268
271
|
export default Icon;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { type FC } from 'react';
|
|
2
|
-
|
|
3
|
-
export declare const Valuable: FC<SvgProps>;
|
|
1
|
+
import { type FC, type SVGProps } from 'react';
|
|
2
|
+
export declare const Valuable: FC<SVGProps<SVGSVGElement>>;
|
|
@@ -10,4 +10,4 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
export var Valuable = function (props) { return (_jsxs("svg", __assign({ width: "
|
|
13
|
+
export var Valuable = function (props) { return (_jsxs("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", stroke: "black", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { children: [_jsx("path", { d: "M2 9L6 2H18L22 9L12 22L2 9Z", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M12 22L8 9M12 22L16 9M2 9H22", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M6 2L12 9L18 2", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })] }))); };
|
|
@@ -7,7 +7,7 @@ declare const meta: {
|
|
|
7
7
|
} & import("..").IconProps) => JSX.Element;
|
|
8
8
|
decorators: ((Story: import("@storybook/csf").PartialStoryFn<import("@storybook/react/dist/types-a5624094").R, {
|
|
9
9
|
badge: "warning";
|
|
10
|
-
icon: string
|
|
10
|
+
icon: string | import("react").FC<import("react").SVGProps<SVGSVGElement>>;
|
|
11
11
|
style?: "normal" | "light" | "solid" | undefined;
|
|
12
12
|
fill?: string | undefined;
|
|
13
13
|
size?: string | number | undefined;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { StoryObj } from '@storybook/react';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: (
|
|
5
|
+
component: import("react").FC<import("../types").IconProps>;
|
|
6
6
|
tags: string[];
|
|
7
7
|
argTypes: {};
|
|
8
8
|
};
|
|
@@ -14,3 +14,4 @@ export declare const SmallExpedition: Story;
|
|
|
14
14
|
export declare const BigExpedition: Story;
|
|
15
15
|
export declare const ExpeditionPink: Story;
|
|
16
16
|
export declare const ExpeditionPinkSolid: Story;
|
|
17
|
+
export declare const CustomIcon: Story;
|
|
@@ -1,48 +1,57 @@
|
|
|
1
1
|
import { Icon } from '../';
|
|
2
|
+
import { Valuable } from '../icons/Valuable';
|
|
2
3
|
var meta = {
|
|
3
4
|
title: 'Elements/Icon',
|
|
4
5
|
component: Icon,
|
|
5
6
|
tags: ['autodocs'],
|
|
6
|
-
argTypes: {}
|
|
7
|
+
argTypes: {}
|
|
7
8
|
};
|
|
8
9
|
export default meta;
|
|
9
10
|
export var Expedition = {
|
|
10
11
|
args: {
|
|
11
12
|
icon: 'expedition',
|
|
12
|
-
size: '40px'
|
|
13
|
-
}
|
|
13
|
+
size: '40px'
|
|
14
|
+
}
|
|
14
15
|
};
|
|
15
16
|
export var Spinning = {
|
|
16
17
|
args: {
|
|
17
18
|
icon: 'expedition',
|
|
18
19
|
size: '40px',
|
|
19
20
|
spinning: true
|
|
20
|
-
}
|
|
21
|
+
}
|
|
21
22
|
};
|
|
22
23
|
export var SmallExpedition = {
|
|
23
24
|
args: {
|
|
24
25
|
icon: 'expedition',
|
|
25
|
-
size: '20px'
|
|
26
|
-
}
|
|
26
|
+
size: '20px'
|
|
27
|
+
}
|
|
27
28
|
};
|
|
28
29
|
export var BigExpedition = {
|
|
29
30
|
args: {
|
|
30
31
|
icon: 'expedition',
|
|
31
|
-
size: '80px'
|
|
32
|
-
}
|
|
32
|
+
size: '80px'
|
|
33
|
+
}
|
|
33
34
|
};
|
|
34
35
|
export var ExpeditionPink = {
|
|
35
36
|
args: {
|
|
36
37
|
icon: 'expedition',
|
|
37
38
|
fill: 'pink',
|
|
38
|
-
size: '40px'
|
|
39
|
-
}
|
|
39
|
+
size: '40px'
|
|
40
|
+
}
|
|
40
41
|
};
|
|
41
42
|
export var ExpeditionPinkSolid = {
|
|
42
43
|
args: {
|
|
43
44
|
icon: 'expedition',
|
|
44
45
|
style: 'solid',
|
|
45
46
|
fill: 'pink',
|
|
46
|
-
size: '40px'
|
|
47
|
-
}
|
|
47
|
+
size: '40px'
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
export var CustomIcon = {
|
|
51
|
+
args: {
|
|
52
|
+
icon: Valuable,
|
|
53
|
+
size: '60px',
|
|
54
|
+
fill: 'pink',
|
|
55
|
+
secondaryColor: 'red1'
|
|
56
|
+
}
|
|
48
57
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MouseEventHandler } from 'react';
|
|
1
|
+
import type { MouseEventHandler, SVGProps } from 'react';
|
|
2
2
|
export type IconProps = {
|
|
3
|
-
icon: string
|
|
3
|
+
icon: string | React.FC<SVGProps<SVGSVGElement>>;
|
|
4
4
|
style?: 'normal' | 'light' | 'solid';
|
|
5
5
|
fill?: string;
|
|
6
6
|
size?: number | string;
|
|
@@ -3,10 +3,10 @@ export declare const Wrapper: import("styled-components").StyledComponent<(props
|
|
|
3
3
|
export declare const Btn: import("styled-components").StyledComponent<"button", import("@xstyled/system").Theme, {
|
|
4
4
|
disabled: boolean;
|
|
5
5
|
}, never>;
|
|
6
|
-
export declare const ArrowIcon: import("styled-components").StyledComponent<(
|
|
6
|
+
export declare const ArrowIcon: import("styled-components").StyledComponent<import("react").FC<import("../Icon").IconProps>, import("@xstyled/system").Theme, {
|
|
7
7
|
isActive: boolean;
|
|
8
8
|
}, never>;
|
|
9
|
-
export declare const GoIcon: import("styled-components").StyledComponent<(
|
|
9
|
+
export declare const GoIcon: import("styled-components").StyledComponent<import("react").FC<import("../Icon").IconProps>, import("@xstyled/system").Theme, {
|
|
10
10
|
isActive: boolean;
|
|
11
11
|
}, never>;
|
|
12
12
|
export declare const DotsWrapper: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export declare const FakeInput: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {
|
|
3
3
|
size: string | number;
|
|
4
4
|
}, never>;
|
|
5
|
-
export declare const CheckIcon: import("styled-components").StyledComponent<(
|
|
5
|
+
export declare const CheckIcon: import("styled-components").StyledComponent<import("react").FC<import("../../Elements/Icon").IconProps>, import("@xstyled/system").Theme, {
|
|
6
6
|
size: string | number;
|
|
7
7
|
}, never>;
|
|
8
8
|
export declare const CheckboxWrap: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {
|