@mailstep/design-system 0.6.75 → 0.6.76
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 +1 -1
- package/ui/Elements/Icon/Icon.js +72 -62
- package/ui/Elements/Icon/stories/Icon.stories.d.ts +1 -1
- package/ui/Elements/Pagination/styled.d.ts +2 -2
- package/ui/Elements/Toggle/Toggle.js +17 -7
- package/ui/Elements/Toggle/stories/Toggle.stories.d.ts +2 -0
- package/ui/Elements/Toggle/stories/Toggle.stories.js +22 -0
- package/ui/Elements/Toggle/types.d.ts +4 -2
- package/ui/Forms/Checkbox/styles.d.ts +1 -1
- package/ui/index.es.js +8772 -8679
- package/ui/index.umd.js +374 -369
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<({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning
|
|
12
|
+
export declare const ItemDropdownArrow: import("styled-components").StyledComponent<({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning }: import("../..").IconProps) => JSX.Element, 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<({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning
|
|
6
|
+
export declare const StyledIcon: import("styled-components").StyledComponent<({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning }: import("../Icon").IconProps) => JSX.Element, import("@xstyled/system").Theme, {
|
|
7
7
|
$addMarginRight?: boolean | undefined;
|
|
8
8
|
$addMarginLeft?: boolean | undefined;
|
|
9
9
|
}, never>;
|
|
@@ -4,5 +4,5 @@ import { IconProps } from './types';
|
|
|
4
4
|
export declare const iconDictionary: {
|
|
5
5
|
[name: string]: IconDefinition | [IconDefinition, FlipProp];
|
|
6
6
|
};
|
|
7
|
-
declare const Icon: ({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning
|
|
7
|
+
declare const Icon: ({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning }: IconProps) => JSX.Element;
|
|
8
8
|
export default Icon;
|
package/ui/Elements/Icon/Icon.js
CHANGED
|
@@ -4,109 +4,114 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
4
4
|
};
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import styled, { useTheme } from '@xstyled/styled-components';
|
|
8
|
-
import { th } from '@xstyled/styled-components';
|
|
9
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
10
7
|
import { library } from '@fortawesome/fontawesome-svg-core';
|
|
8
|
+
import { faFacebookF } from '@fortawesome/free-brands-svg-icons/faFacebookF';
|
|
9
|
+
import { faInstagram } from '@fortawesome/free-brands-svg-icons/faInstagram';
|
|
10
|
+
import { faLinkedinIn } from '@fortawesome/free-brands-svg-icons/faLinkedinIn';
|
|
11
|
+
import { faTwitter } from '@fortawesome/free-brands-svg-icons/faTwitter';
|
|
12
|
+
import { faYoutube } from '@fortawesome/free-brands-svg-icons/faYoutube';
|
|
13
|
+
import { faTriangleExclamation as fadTriangleExclamation } from '@fortawesome/pro-duotone-svg-icons/faTriangleExclamation';
|
|
11
14
|
import { faCoffee as falCoffee } from '@fortawesome/pro-light-svg-icons/faCoffee';
|
|
15
|
+
import { faHandHoldingBox } from '@fortawesome/pro-light-svg-icons/faHandHoldingBox';
|
|
12
16
|
import { faPaperclip } from '@fortawesome/pro-light-svg-icons/faPaperclip';
|
|
13
17
|
import { faStopwatch } from '@fortawesome/pro-light-svg-icons/faStopwatch';
|
|
14
|
-
import { faHandHoldingBox } from '@fortawesome/pro-light-svg-icons/faHandHoldingBox';
|
|
15
18
|
import { faArrowRightToBracket } from '@fortawesome/pro-regular-svg-icons/faArrowRightToBracket';
|
|
16
19
|
import { faBell } from '@fortawesome/pro-regular-svg-icons/faBell';
|
|
20
|
+
import { faBox as faBoxRegular } from '@fortawesome/pro-regular-svg-icons/faBox';
|
|
21
|
+
import { faCalendar } from '@fortawesome/pro-regular-svg-icons/faCalendar';
|
|
22
|
+
import { faCalendarPlus } from '@fortawesome/pro-regular-svg-icons/faCalendarPlus';
|
|
23
|
+
import { faChevronDown } from '@fortawesome/pro-regular-svg-icons/faChevronDown';
|
|
24
|
+
import { faChevronRight as farChevronRight } from '@fortawesome/pro-regular-svg-icons/faChevronRight';
|
|
25
|
+
import { faChevronUp } from '@fortawesome/pro-regular-svg-icons/faChevronUp';
|
|
26
|
+
import { faCircleArrowDown } from '@fortawesome/pro-regular-svg-icons/faCircleArrowDown';
|
|
27
|
+
import { faCircleArrowRight } from '@fortawesome/pro-regular-svg-icons/faCircleArrowRight';
|
|
28
|
+
import { faCircleQuestion } from '@fortawesome/pro-regular-svg-icons/faCircleQuestion';
|
|
29
|
+
import { faClock } from '@fortawesome/pro-regular-svg-icons/faClock';
|
|
17
30
|
import { faCoffee as farCoffee } from '@fortawesome/pro-regular-svg-icons/faCoffee';
|
|
18
31
|
import { faCommentDots } from '@fortawesome/pro-regular-svg-icons/faCommentDots';
|
|
32
|
+
import { faComments } from '@fortawesome/pro-regular-svg-icons/faComments';
|
|
19
33
|
import { faCopy } from '@fortawesome/pro-regular-svg-icons/faCopy';
|
|
20
|
-
import { faClock } from '@fortawesome/pro-regular-svg-icons/faClock';
|
|
21
|
-
import { faChevronUp } from '@fortawesome/pro-regular-svg-icons/faChevronUp';
|
|
22
|
-
import { faChevronDown } from '@fortawesome/pro-regular-svg-icons/faChevronDown';
|
|
23
|
-
import { faChevronRight as farChevronRight } from '@fortawesome/pro-regular-svg-icons/faChevronRight';
|
|
24
34
|
import { faEllipsisVertical } from '@fortawesome/pro-regular-svg-icons/faEllipsisVertical';
|
|
25
35
|
import { faEnvelope as faEnvelopeLight } from '@fortawesome/pro-regular-svg-icons/faEnvelope';
|
|
26
36
|
import { faEyeSlash } from '@fortawesome/pro-regular-svg-icons/faEyeSlash';
|
|
37
|
+
import { faFaceMeh } from '@fortawesome/pro-regular-svg-icons/faFaceMeh';
|
|
27
38
|
import { faFile } from '@fortawesome/pro-regular-svg-icons/faFile';
|
|
28
39
|
import { faFileAlt } from '@fortawesome/pro-regular-svg-icons/faFileAlt';
|
|
40
|
+
import { faFileLines } from '@fortawesome/pro-regular-svg-icons/faFileLines';
|
|
41
|
+
import { faFileSearch } from '@fortawesome/pro-regular-svg-icons/faFileSearch';
|
|
42
|
+
import { faFilter } from '@fortawesome/pro-regular-svg-icons/faFilter';
|
|
29
43
|
import { faGear } from '@fortawesome/pro-regular-svg-icons/faGear';
|
|
30
|
-
import { faShareSquare } from '@fortawesome/pro-regular-svg-icons/faShareSquare';
|
|
31
|
-
import { faTriangleExclamation as farTriangleExclamation } from '@fortawesome/pro-regular-svg-icons/faTriangleExclamation';
|
|
32
|
-
import { faCircleArrowDown } from '@fortawesome/pro-regular-svg-icons/faCircleArrowDown';
|
|
33
|
-
import { faCircleArrowRight } from '@fortawesome/pro-regular-svg-icons/faCircleArrowRight';
|
|
34
|
-
import { faPenToSquare } from '@fortawesome/pro-regular-svg-icons/faPenToSquare';
|
|
35
|
-
import { faLock } from '@fortawesome/pro-regular-svg-icons/faLock';
|
|
36
|
-
import { faCalendar } from '@fortawesome/pro-regular-svg-icons/faCalendar';
|
|
37
|
-
import { faCalendarPlus } from '@fortawesome/pro-regular-svg-icons/faCalendarPlus';
|
|
38
|
-
import { faSquareMinus } from '@fortawesome/pro-regular-svg-icons/faSquareMinus';
|
|
39
|
-
import { faComments } from '@fortawesome/pro-regular-svg-icons/faComments';
|
|
40
|
-
import { faFaceMeh } from '@fortawesome/pro-regular-svg-icons/faFaceMeh';
|
|
41
44
|
import { faHand } from '@fortawesome/pro-regular-svg-icons/faHand';
|
|
42
45
|
import { faLink } from '@fortawesome/pro-regular-svg-icons/faLink';
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
46
|
+
import { faLock } from '@fortawesome/pro-regular-svg-icons/faLock';
|
|
47
|
+
import { faPenToSquare } from '@fortawesome/pro-regular-svg-icons/faPenToSquare';
|
|
48
|
+
import { faShareSquare } from '@fortawesome/pro-regular-svg-icons/faShareSquare';
|
|
49
|
+
import { faSquareMinus } from '@fortawesome/pro-regular-svg-icons/faSquareMinus';
|
|
45
50
|
import { faTrashCan } from '@fortawesome/pro-regular-svg-icons/faTrashCan';
|
|
46
|
-
import {
|
|
47
|
-
import { faFilter } from '@fortawesome/pro-regular-svg-icons/faFilter';
|
|
48
|
-
import { faAnglesRight } from '@fortawesome/pro-solid-svg-icons/faAnglesRight';
|
|
49
|
-
import { faAngleRight } from '@fortawesome/pro-solid-svg-icons/faAngleRight';
|
|
51
|
+
import { faTriangleExclamation as farTriangleExclamation } from '@fortawesome/pro-regular-svg-icons/faTriangleExclamation';
|
|
50
52
|
import { faAngleLeft } from '@fortawesome/pro-solid-svg-icons/faAngleLeft';
|
|
53
|
+
import { faAngleRight } from '@fortawesome/pro-solid-svg-icons/faAngleRight';
|
|
54
|
+
import { faAnglesRight } from '@fortawesome/pro-solid-svg-icons/faAnglesRight';
|
|
55
|
+
import { faArrowDownToBracket } from '@fortawesome/pro-solid-svg-icons/faArrowDownToBracket';
|
|
51
56
|
import { faArrowLeft } from '@fortawesome/pro-solid-svg-icons/faArrowLeft';
|
|
57
|
+
import { faArrowsRotate } from '@fortawesome/pro-solid-svg-icons/faArrowsRotate';
|
|
58
|
+
import { faBadgeCheck } from '@fortawesome/pro-solid-svg-icons/faBadgeCheck';
|
|
52
59
|
import { faBan } from '@fortawesome/pro-solid-svg-icons/faBan';
|
|
60
|
+
import { faBox } from '@fortawesome/pro-solid-svg-icons/faBox';
|
|
61
|
+
import { faBoxArchive } from '@fortawesome/pro-solid-svg-icons/faBoxArchive';
|
|
62
|
+
import { faBoxCircleCheck } from '@fortawesome/pro-solid-svg-icons/faBoxCircleCheck';
|
|
53
63
|
import { faBoxOpen } from '@fortawesome/pro-solid-svg-icons/faBoxOpen';
|
|
64
|
+
import { faBoxesStacked } from '@fortawesome/pro-solid-svg-icons/faBoxesStacked';
|
|
65
|
+
import { faUpDownLeftRight } from '@fortawesome/pro-solid-svg-icons/faUpDownLeftRight';
|
|
66
|
+
import { faCamera } from '@fortawesome/pro-solid-svg-icons/faCamera';
|
|
54
67
|
import { faCartArrowDown } from '@fortawesome/pro-solid-svg-icons/faCartArrowDown';
|
|
68
|
+
import { faChartLine } from '@fortawesome/pro-solid-svg-icons/faChartLine';
|
|
69
|
+
import { faCheck } from '@fortawesome/pro-solid-svg-icons/faCheck';
|
|
70
|
+
import { faChevronDown as fasChevronDown } from '@fortawesome/pro-solid-svg-icons/faChevronDown';
|
|
71
|
+
import { faChevronLeft } from '@fortawesome/pro-solid-svg-icons/faChevronLeft';
|
|
72
|
+
import { faChevronRight as fasChevronRight } from '@fortawesome/pro-solid-svg-icons/faChevronRight';
|
|
73
|
+
import { faChevronUp as fasChevronUp } from '@fortawesome/pro-solid-svg-icons/faChevronUp';
|
|
74
|
+
import { faCircleCheck } from '@fortawesome/pro-solid-svg-icons/faCircleCheck';
|
|
75
|
+
import { faCircleInfo } from '@fortawesome/pro-solid-svg-icons/faCircleInfo';
|
|
76
|
+
import { faCircleXmark } from '@fortawesome/pro-solid-svg-icons/faCircleXmark';
|
|
55
77
|
import { faCoffee as fasCoffee } from '@fortawesome/pro-solid-svg-icons/faCoffee';
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
78
|
+
import { faComputerMouseScrollwheel } from '@fortawesome/pro-solid-svg-icons/faComputerMouseScrollwheel';
|
|
79
|
+
import { faCrop } from '@fortawesome/pro-solid-svg-icons/faCrop';
|
|
80
|
+
import { faCube } from '@fortawesome/pro-solid-svg-icons/faCube';
|
|
58
81
|
import { faEquals } from '@fortawesome/pro-solid-svg-icons/faEquals';
|
|
82
|
+
import { faExchange } from '@fortawesome/pro-solid-svg-icons/faExchange';
|
|
83
|
+
import { faFlag } from '@fortawesome/pro-solid-svg-icons/faFlag';
|
|
84
|
+
import { faGlobe } from '@fortawesome/pro-solid-svg-icons/faGlobe';
|
|
59
85
|
import { faGreaterThanEqual } from '@fortawesome/pro-solid-svg-icons/faGreaterThanEqual';
|
|
60
86
|
import { faHome } from '@fortawesome/pro-solid-svg-icons/faHome';
|
|
61
87
|
import { faHouseUser } from '@fortawesome/pro-solid-svg-icons/faHouseUser';
|
|
62
88
|
import { faLaptopCode } from '@fortawesome/pro-solid-svg-icons/faLaptopCode';
|
|
63
|
-
import { faLuggageCart } from '@fortawesome/pro-solid-svg-icons/faLuggageCart';
|
|
64
89
|
import { faLessThanEqual } from '@fortawesome/pro-solid-svg-icons/faLessThanEqual';
|
|
90
|
+
import { faLocationCrosshairs } from '@fortawesome/pro-solid-svg-icons/faLocationCrosshairs';
|
|
91
|
+
import { faLuggageCart } from '@fortawesome/pro-solid-svg-icons/faLuggageCart';
|
|
92
|
+
import { faMinus } from '@fortawesome/pro-solid-svg-icons/faMinus';
|
|
65
93
|
import { faNotEqual } from '@fortawesome/pro-solid-svg-icons/faNotEqual';
|
|
94
|
+
import { faNoteSticky } from '@fortawesome/pro-solid-svg-icons/faNoteSticky';
|
|
66
95
|
import { faPen } from '@fortawesome/pro-solid-svg-icons/faPen';
|
|
67
96
|
import { faPeopleCarry as fasPeopleCarry } from '@fortawesome/pro-solid-svg-icons/faPeopleCarry';
|
|
97
|
+
import { faPlus } from '@fortawesome/pro-solid-svg-icons/faPlus';
|
|
68
98
|
import { faSearch } from '@fortawesome/pro-solid-svg-icons/faSearch';
|
|
99
|
+
import { faShelves } from '@fortawesome/pro-solid-svg-icons/faShelves';
|
|
69
100
|
import { faShippingFast } from '@fortawesome/pro-solid-svg-icons/faShippingFast';
|
|
101
|
+
import { faSquareCheck } from '@fortawesome/pro-solid-svg-icons/faSquareCheck';
|
|
70
102
|
import { faStore } from '@fortawesome/pro-solid-svg-icons/faStore';
|
|
71
103
|
import { faTags } from '@fortawesome/pro-solid-svg-icons/faTags';
|
|
104
|
+
import { faTriangleExclamation } from '@fortawesome/pro-solid-svg-icons/faTriangleExclamation';
|
|
72
105
|
import { faTruck } from '@fortawesome/pro-solid-svg-icons/faTruck';
|
|
106
|
+
import { faTruckRampBox } from '@fortawesome/pro-solid-svg-icons/faTruckRampBox';
|
|
73
107
|
import { faUser } from '@fortawesome/pro-solid-svg-icons/faUser';
|
|
74
108
|
import { faUsersGear } from '@fortawesome/pro-solid-svg-icons/faUsersGear';
|
|
75
109
|
import { faWatch } from '@fortawesome/pro-solid-svg-icons/faWatch';
|
|
76
|
-
import { faChartLine } from '@fortawesome/pro-solid-svg-icons/faChartLine';
|
|
77
|
-
import { faCheck } from '@fortawesome/pro-solid-svg-icons/faCheck';
|
|
78
|
-
import { faSquareCheck } from '@fortawesome/pro-solid-svg-icons/faSquareCheck';
|
|
79
|
-
import { faXmark as fasXmark } from '@fortawesome/pro-solid-svg-icons/faXmark';
|
|
80
|
-
import { faChevronLeft } from '@fortawesome/pro-solid-svg-icons/faChevronLeft';
|
|
81
|
-
import { faNoteSticky } from '@fortawesome/pro-solid-svg-icons/faNoteSticky';
|
|
82
|
-
import { faArrowDownToBracket } from '@fortawesome/pro-solid-svg-icons/faArrowDownToBracket';
|
|
83
|
-
import { faPlus } from '@fortawesome/pro-solid-svg-icons/faPlus';
|
|
84
|
-
import { faMinus } from '@fortawesome/pro-solid-svg-icons/faMinus';
|
|
85
|
-
import { faChevronRight as fasChevronRight } from '@fortawesome/pro-solid-svg-icons/faChevronRight';
|
|
86
|
-
import { faChevronDown as fasChevronDown } from '@fortawesome/pro-solid-svg-icons/faChevronDown';
|
|
87
|
-
import { faChevronUp as fasChevronUp } from '@fortawesome/pro-solid-svg-icons/faChevronUp';
|
|
88
|
-
import { faCircleInfo } from '@fortawesome/pro-solid-svg-icons/faCircleInfo';
|
|
89
|
-
import { faCube } from '@fortawesome/pro-solid-svg-icons/faCube';
|
|
90
|
-
import { faBoxArchive } from '@fortawesome/pro-solid-svg-icons/faBoxArchive';
|
|
91
|
-
import { faLocationCrosshairs } from '@fortawesome/pro-solid-svg-icons/faLocationCrosshairs';
|
|
92
|
-
import { faTruckRampBox } from '@fortawesome/pro-solid-svg-icons/faTruckRampBox';
|
|
93
|
-
import { faGlobe } from '@fortawesome/pro-solid-svg-icons/faGlobe';
|
|
94
|
-
import { faCircleCheck } from '@fortawesome/pro-solid-svg-icons/faCircleCheck';
|
|
95
|
-
import { faCircleXmark } from '@fortawesome/pro-solid-svg-icons/faCircleXmark';
|
|
96
|
-
import { faTriangleExclamation } from '@fortawesome/pro-solid-svg-icons/faTriangleExclamation';
|
|
97
|
-
import { faBadgeCheck } from '@fortawesome/pro-solid-svg-icons/faBadgeCheck';
|
|
98
110
|
import { faWebhook } from '@fortawesome/pro-solid-svg-icons/faWebhook';
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import { faLinkedinIn } from '@fortawesome/free-brands-svg-icons/faLinkedinIn';
|
|
104
|
-
import { faInstagram } from '@fortawesome/free-brands-svg-icons/faInstagram';
|
|
105
|
-
import { faBox } from '@fortawesome/pro-solid-svg-icons/faBox';
|
|
106
|
-
import { faBox as faBoxRegular } from '@fortawesome/pro-regular-svg-icons/faBox';
|
|
107
|
-
import { faBoxCircleCheck } from '@fortawesome/pro-solid-svg-icons/faBoxCircleCheck';
|
|
108
|
-
import { faShelves } from '@fortawesome/pro-solid-svg-icons/faShelves';
|
|
109
|
-
import { faBoxesStacked } from '@fortawesome/pro-solid-svg-icons/faBoxesStacked';
|
|
111
|
+
import { faXmark as fasXmark } from '@fortawesome/pro-solid-svg-icons/faXmark';
|
|
112
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
113
|
+
import styled, { useTheme } from '@xstyled/styled-components';
|
|
114
|
+
import { th } from '@xstyled/styled-components';
|
|
110
115
|
export var iconDictionary = {
|
|
111
116
|
greaterThan: faAngleRight,
|
|
112
117
|
startsWith: faAnglesRight,
|
|
@@ -116,6 +121,8 @@ export var iconDictionary = {
|
|
|
116
121
|
edit: faPenToSquare,
|
|
117
122
|
avatar: faUser,
|
|
118
123
|
arrowLeft: faArrowLeft,
|
|
124
|
+
arrowsRotate: faArrowsRotate,
|
|
125
|
+
upDownLeftRight: faUpDownLeftRight,
|
|
119
126
|
attachment: faPaperclip,
|
|
120
127
|
dashboard: faChartLine,
|
|
121
128
|
chevronUp: faChevronUp,
|
|
@@ -123,6 +130,7 @@ export var iconDictionary = {
|
|
|
123
130
|
chevronRight: farChevronRight,
|
|
124
131
|
clock: faClock,
|
|
125
132
|
complaint: faFileAlt,
|
|
133
|
+
computerMouseScrollwheel: faComputerMouseScrollwheel,
|
|
126
134
|
mailLight: faEnvelopeLight,
|
|
127
135
|
eshop: faStore,
|
|
128
136
|
expedition: faShippingFast,
|
|
@@ -163,6 +171,8 @@ export var iconDictionary = {
|
|
|
163
171
|
import: faCircleArrowDown,
|
|
164
172
|
export: faCircleArrowRight,
|
|
165
173
|
check: faCheck,
|
|
174
|
+
camera: faCamera,
|
|
175
|
+
crop: faCrop,
|
|
166
176
|
squareCheck: faSquareCheck,
|
|
167
177
|
squareMinus: faSquareMinus,
|
|
168
178
|
goLeft: faChevronLeft,
|
|
@@ -216,7 +226,7 @@ library.add(farCoffee, fasCoffee, falCoffee, faHandHoldingBox, faLuggageCart, fa
|
|
|
216
226
|
var iconPrefixMap = {
|
|
217
227
|
normal: 'far',
|
|
218
228
|
light: 'fal',
|
|
219
|
-
solid: 'fas'
|
|
229
|
+
solid: 'fas'
|
|
220
230
|
};
|
|
221
231
|
var FaIconSizing = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n --fa-secondary-color: ", ";\n --fa-secondary-opacity: 1;\n display: ", ";\n"], ["\n ", "\n --fa-secondary-color: ", ";\n --fa-secondary-opacity: 1;\n display: ", ";\n"])), function (_a) {
|
|
222
232
|
var size = _a.size;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { StoryObj } from '@storybook/react';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning
|
|
5
|
+
component: ({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning }: import("../types").IconProps) => JSX.Element;
|
|
6
6
|
tags: string[];
|
|
7
7
|
argTypes: {};
|
|
8
8
|
};
|
|
@@ -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<({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning
|
|
6
|
+
export declare const ArrowIcon: import("styled-components").StyledComponent<({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning }: import("../Icon").IconProps) => JSX.Element, import("@xstyled/system").Theme, {
|
|
7
7
|
isActive: boolean;
|
|
8
8
|
}, never>;
|
|
9
|
-
export declare const GoIcon: import("styled-components").StyledComponent<({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning
|
|
9
|
+
export declare const GoIcon: import("styled-components").StyledComponent<({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning }: import("../Icon").IconProps) => JSX.Element, 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>;
|
|
@@ -25,16 +25,26 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
25
25
|
return t;
|
|
26
26
|
};
|
|
27
27
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
|
-
import styled, { css } from '@xstyled/styled-components';
|
|
29
28
|
import { FieldLabel } from '../Label';
|
|
30
29
|
import { SpaceAroundWrap } from '../SpaceAround';
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
import styled, { css } from '@xstyled/styled-components';
|
|
31
|
+
var isHorizontal = function (position) { return position && ['left', 'right'].includes(position); };
|
|
32
|
+
var StyledSpaceAroundWrap = styled(SpaceAroundWrap)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: ", ";\n justify-content: ", ";\n ", "\n"], ["\n display: flex;\n flex-direction: ", ";\n justify-content: ", ";\n ", "\n"])), function (_a) {
|
|
33
|
+
var labelPosition = _a.labelPosition;
|
|
34
|
+
return labelPosition === 'left' ? 'row' : labelPosition === 'right' ? 'row-reverse' : 'column';
|
|
35
|
+
}, function (_a) {
|
|
36
|
+
var labelPosition = _a.labelPosition;
|
|
37
|
+
return (labelPosition === 'right' ? 'flex-end' : 'flex-start');
|
|
38
|
+
}, function (_a) {
|
|
39
|
+
var labelPosition = _a.labelPosition;
|
|
40
|
+
return (isHorizontal(labelPosition) ? 'margin-top: 1rem' : '');
|
|
34
41
|
});
|
|
35
|
-
var StyledFieldLabel = styled(FieldLabel)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
42
|
+
var StyledFieldLabel = styled(FieldLabel)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n cursor: pointer;\n ", "\n ", "\n"], ["\n cursor: pointer;\n ", "\n ", "\n"])), function (_a) {
|
|
43
|
+
var labelPosition = _a.labelPosition;
|
|
44
|
+
return (isHorizontal(labelPosition) ? 'margin-bottom: 0;' : '');
|
|
45
|
+
}, function (_a) {
|
|
36
46
|
var labelPosition = _a.labelPosition;
|
|
37
|
-
return
|
|
47
|
+
return labelPosition === 'left' ? 'margin-right: 1rem;' : labelPosition === 'right' ? 'margin-left: 1rem;' : '';
|
|
38
48
|
});
|
|
39
49
|
var disabledStyles = css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n opacity: 0.4;\n"], ["\n opacity: 0.4;\n"])));
|
|
40
50
|
var StyledToggle = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n aspect-ratio: 1 / 1;\n width: 100%;\n height: 100%;\n border-radius: 7px;\n background-color: lightGray5;\n border: 3px solid;\n border-color: lightGray5;\n position: relative;\n transition: all 100ms ease-out;\n\n ", "\n\n input:checked + & {\n background-color: red1;\n border-color: red1;\n\n & > span {\n transform: translate(75%, -50%);\n background-color: white;\n }\n }\n"], ["\n aspect-ratio: 1 / 1;\n width: 100%;\n height: 100%;\n border-radius: 7px;\n background-color: lightGray5;\n border: 3px solid;\n border-color: lightGray5;\n position: relative;\n transition: all 100ms ease-out;\n\n ", "\n\n input:checked + & {\n background-color: red1;\n border-color: red1;\n\n & > span {\n transform: translate(75%, -50%);\n background-color: white;\n }\n }\n"])), function (props) { return (props.disabled ? disabledStyles : ''); });
|
|
@@ -46,7 +56,7 @@ var HiddenInput = styled.input(templateObject_6 || (templateObject_6 = __makeTem
|
|
|
46
56
|
var Wrapper = styled.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n position: relative;\n border-radius: 8px;\n overflow: hidden;\n flex-shrink: 0;\n &[data-appearance='primary'] {\n width: 24px;\n height: 14px;\n ", " {\n height: 10px;\n }\n }\n &[data-appearance='grid'] {\n width: 28px;\n height: 16px;\n ", " {\n height: 12px;\n }\n }\n"], ["\n position: relative;\n border-radius: 8px;\n overflow: hidden;\n flex-shrink: 0;\n &[data-appearance='primary'] {\n width: 24px;\n height: 14px;\n ", " {\n height: 10px;\n }\n }\n &[data-appearance='grid'] {\n width: 28px;\n height: 16px;\n ", " {\n height: 12px;\n }\n }\n"])), StyledDot, StyledDot);
|
|
47
57
|
var Toggle = function (_a) {
|
|
48
58
|
var onChange = _a.onChange, label = _a.label, name = _a.name, checked = _a.checked, defaultChecked = _a.defaultChecked, _b = _a.spaceAround, spaceAround = _b === void 0 ? false : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.labelPosition, labelPosition = _d === void 0 ? 'default' : _d, _e = _a.variant, variant = _e === void 0 ? 'primary' : _e, _f = _a.spaceBetween, spaceBetween = _f === void 0 ? false : _f, readOnly = _a.readOnly, rest = __rest(_a, ["onChange", "label", "name", "checked", "defaultChecked", "spaceAround", "disabled", "labelPosition", "variant", "spaceBetween", "readOnly"]);
|
|
49
|
-
return (_jsxs(StyledSpaceAroundWrap, { spaceBetween: spaceBetween, spaceAround: spaceAround,
|
|
59
|
+
return (_jsxs(StyledSpaceAroundWrap, { spaceBetween: spaceBetween, spaceAround: spaceAround, labelPosition: labelPosition, children: [label && (_jsx(StyledFieldLabel, { htmlFor: name, labelPosition: labelPosition, children: label })), _jsxs(Wrapper, { "data-appearance": variant, children: [_jsx(HiddenInput, { id: name, name: name, type: "checkbox", checked: checked, "$enabled": !disabled, defaultChecked: defaultChecked, onChange: !disabled ? onChange : undefined, disabled: disabled, "data-cy": "".concat(name, "Switch"), readOnly: readOnly }), _jsx(StyledToggle, __assign({ active: !!checked, disabled: disabled }, rest, { children: _jsx(StyledDot, {}) }))] })] }));
|
|
50
60
|
};
|
|
51
61
|
export default Toggle;
|
|
52
62
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
@@ -11,4 +11,6 @@ type Story = StoryObj<typeof meta>;
|
|
|
11
11
|
export declare const Default: Story;
|
|
12
12
|
export declare const Checked: Story;
|
|
13
13
|
export declare const Disabled: Story;
|
|
14
|
+
export declare const LabelRight: Story;
|
|
15
|
+
export declare const LabelLeft: Story;
|
|
14
16
|
export declare const VariantGrid: Story;
|
|
@@ -8,24 +8,46 @@ var meta = {
|
|
|
8
8
|
export default meta;
|
|
9
9
|
export var Default = {
|
|
10
10
|
args: {
|
|
11
|
+
name: 'name',
|
|
11
12
|
label: 'Label',
|
|
13
|
+
onChange: console.log
|
|
12
14
|
},
|
|
13
15
|
};
|
|
14
16
|
export var Checked = {
|
|
15
17
|
args: {
|
|
18
|
+
name: 'name',
|
|
16
19
|
label: 'Label',
|
|
17
20
|
checked: true,
|
|
21
|
+
onChange: console.log
|
|
18
22
|
},
|
|
19
23
|
};
|
|
20
24
|
export var Disabled = {
|
|
21
25
|
args: {
|
|
26
|
+
name: 'name',
|
|
22
27
|
label: 'Label',
|
|
23
28
|
checked: true,
|
|
24
29
|
disabled: true,
|
|
25
30
|
},
|
|
26
31
|
};
|
|
32
|
+
export var LabelRight = {
|
|
33
|
+
args: {
|
|
34
|
+
name: 'name',
|
|
35
|
+
label: 'Label',
|
|
36
|
+
checked: true,
|
|
37
|
+
labelPosition: 'right'
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
export var LabelLeft = {
|
|
41
|
+
args: {
|
|
42
|
+
name: 'name',
|
|
43
|
+
label: 'Label',
|
|
44
|
+
checked: true,
|
|
45
|
+
labelPosition: 'left'
|
|
46
|
+
},
|
|
47
|
+
};
|
|
27
48
|
export var VariantGrid = {
|
|
28
49
|
args: {
|
|
50
|
+
name: 'name',
|
|
29
51
|
label: 'Label',
|
|
30
52
|
checked: true,
|
|
31
53
|
variant: 'grid',
|
|
@@ -6,6 +6,8 @@ type SpaceAroundProps = {
|
|
|
6
6
|
marginLeft?: number;
|
|
7
7
|
};
|
|
8
8
|
type SpaceAround = boolean | SpaceAroundProps;
|
|
9
|
+
export type LabelPosition = 'default' | 'left' | 'right';
|
|
10
|
+
export type Variant = 'primary' | 'grid';
|
|
9
11
|
export type Props = {
|
|
10
12
|
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
11
13
|
label?: string;
|
|
@@ -15,8 +17,8 @@ export type Props = {
|
|
|
15
17
|
spaceAround?: SpaceAround;
|
|
16
18
|
spaceBetween?: boolean;
|
|
17
19
|
disabled?: boolean;
|
|
18
|
-
labelPosition?:
|
|
19
|
-
variant?:
|
|
20
|
+
labelPosition?: LabelPosition;
|
|
21
|
+
variant?: Variant;
|
|
20
22
|
readOnly?: boolean;
|
|
21
23
|
};
|
|
22
24
|
export {};
|
|
@@ -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<({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning
|
|
5
|
+
export declare const CheckIcon: import("styled-components").StyledComponent<({ icon, fill, style, size, className, secondaryColor, fixedWidth, spinning }: import("../../Elements/Icon").IconProps) => JSX.Element, 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, {
|