hrm_ui_lib 2.4.39 → 2.5.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/{Alert-CnB-WiOO.js → Alert-CtY1YM0z.js} +1 -1
- package/components/Alert/Alert.js +1 -1
- package/components/Checkbox/Checkbox.js +1 -1
- package/components/IconDynamicComponent/IconDynamicComponent.d.ts +8 -0
- package/components/IconDynamicComponent/IconDynamicComponent.js +36 -0
- package/components/SVGIcons/IconUs.d.ts +4 -0
- package/components/SVGIcons/IconUs.js +7 -0
- package/components/SVGIcons/icon-names.d.ts +2 -0
- package/components/SVGIcons/icon-names.js +307 -0
- package/components/SVGIcons/index.d.ts +1 -0
- package/components/SVGIcons/index.js +1 -0
- package/components/Snackbar/Snackbar.js +1 -1
- package/helperComponents/ErrorMessage/ErrorMessage.js +1 -1
- package/helperComponents/index.d.ts +0 -1
- package/helperComponents/index.js +0 -1
- package/package.json +1 -1
- package/helperComponents/IconDynamicComponent/IconDynamicComponent.d.ts +0 -9
- package/helperComponents/IconDynamicComponent/IconDynamicComponent.js +0 -12
- package/helperComponents/IconDynamicComponent/constants.d.ts +0 -3
- package/helperComponents/IconDynamicComponent/constants.js +0 -12
- /package/{helperComponents → components}/IconDynamicComponent/index.d.ts +0 -0
- /package/{helperComponents → components}/IconDynamicComponent/index.js +0 -0
|
@@ -33,7 +33,7 @@ import 'react-syntax-highlighter/dist/esm/styles/prism';
|
|
|
33
33
|
import { Link } from './components/Link/Link.js';
|
|
34
34
|
import { PopoverDesktop } from './components/Popover/PopoverDesktop.js';
|
|
35
35
|
import { IconInfo } from './components/SVGIcons/IconInfo.js';
|
|
36
|
-
import { IconDynamicComponent } from './
|
|
36
|
+
import { IconDynamicComponent } from './components/IconDynamicComponent/IconDynamicComponent.js';
|
|
37
37
|
import 'react-toastify/dist/ReactToastify.css';
|
|
38
38
|
import '@babel/runtime/helpers/typeof';
|
|
39
39
|
import { IconDismissFilled } from './components/SVGIcons/IconDismissFilled.js';
|
|
@@ -4,7 +4,7 @@ import classnames from 'classnames';
|
|
|
4
4
|
import { Text } from '../Text';
|
|
5
5
|
import { Button } from '../Button';
|
|
6
6
|
import IconDismissFilled from '../SVGIcons/IconDismissFilled';
|
|
7
|
-
import { IconDynamicComponent } from '
|
|
7
|
+
import { IconDynamicComponent } from '../IconDynamicComponent';
|
|
8
8
|
export const Alert = (props) => {
|
|
9
9
|
const { buttonProps, type = 'information', position = 'inline', text, subtext, closeIcon, onClose, className = '' } = props;
|
|
10
10
|
return (_jsx("div", { className: classnames('alert', `alert--${type} alert--${position}`, className), children: _jsxs("div", { className: "alert__content", children: [_jsx(IconDynamicComponent, { componentName: ICONS_MAPPING[type], size: "small", type: TYPE_MAPPING[type] }), _jsxs("div", { className: "alert__text pl-8", children: [_jsxs("div", { children: [_jsx(Text, { type: "primary", size: "standard", weight: "regular", lineHeight: "large", children: text }), subtext ? (_jsx(Text, { className: 'mt-4', type: "secondary", size: "small", weight: "regular", lineHeight: "large", children: subtext })) : null] }), buttonProps ? (_jsxs("div", { className: "alert__actions", children: [buttonProps.confirm && (_jsx(Button, Object.assign({ size: "medium", type: "secondary" }, buttonProps.confirm))), buttonProps.cancel && (_jsx(Button, Object.assign({ size: "medium", type: "tertiary", className: "ml-12" }, buttonProps.cancel)))] })) : null] }), closeIcon ? (_jsx(IconDismissFilled, { type: TYPE_MAPPING[type], size: "xsmall", className: "ml-12 pointer", onClick: onClose })) : null] }) }));
|
|
@@ -5,7 +5,7 @@ import { Popover } from '../Popover';
|
|
|
5
5
|
import { Link } from '../Link';
|
|
6
6
|
import { Text } from '../Text';
|
|
7
7
|
import IconInfo from '../SVGIcons/IconInfo';
|
|
8
|
-
import { IconDynamicComponent } from '
|
|
8
|
+
import { IconDynamicComponent } from '../IconDynamicComponent';
|
|
9
9
|
export const Checkbox = forwardRef((props, ref) => {
|
|
10
10
|
const { label, disabled, required = false, link, name, setFieldValue, selectedValue, value, className = '', iconProps = { name: 'checkmark' }, dataId = '', onClick, beforeLink, afterLink, helperText = '', popoverAddons, isInvalid, stopPropagation = false } = props;
|
|
11
11
|
const localRef = useRef(null);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { ISVGIconProps } from '../SVGIcons/types';
|
|
3
|
+
import type { TIconName } from '../SVGIcons/icon-names';
|
|
4
|
+
interface IconDynamicComponentProps extends ISVGIconProps {
|
|
5
|
+
componentName: TIconName;
|
|
6
|
+
}
|
|
7
|
+
export declare const IconDynamicComponent: ({ componentName, ...rest }: IconDynamicComponentProps) => ReactElement | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { lazy, Suspense } from 'react';
|
|
14
|
+
export const IconDynamicComponent = (_a) => {
|
|
15
|
+
var { componentName } = _a, rest = __rest(_a, ["componentName"]);
|
|
16
|
+
if (!componentName) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
const toPascalCase = (value) => value
|
|
20
|
+
.replace(/^[a-z]/, (m) => m.toUpperCase())
|
|
21
|
+
.replace(/[A-Z]/g, (m) => ` ${m}`)
|
|
22
|
+
.trim()
|
|
23
|
+
.split(/\s|_|-/)
|
|
24
|
+
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
|
25
|
+
.join('');
|
|
26
|
+
const resolvedName = toPascalCase(componentName);
|
|
27
|
+
const exportName = `Icon${resolvedName}`;
|
|
28
|
+
// Dynamically load the component based on the componentName prop
|
|
29
|
+
const Component = lazy(() => import('../../components/SVGIcons').then((mod) => {
|
|
30
|
+
var _a;
|
|
31
|
+
return ({
|
|
32
|
+
default: (_a = mod[exportName]) !== null && _a !== void 0 ? _a : (() => null)
|
|
33
|
+
});
|
|
34
|
+
}));
|
|
35
|
+
return (_jsx(Suspense, { fallback: null, children: _jsx(Component, Object.assign({}, rest)) }));
|
|
36
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
export const IconUs = ({ size, className = '', onClick, refHandler, id, dataId }) => (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: classNames('svg-icon', {
|
|
4
|
+
[`svg-icon__size-${size}`]: size,
|
|
5
|
+
[className]: className
|
|
6
|
+
}), viewBox: "0 0 24 24", fill: "none", onClick: onClick, ref: refHandler, id: id, "data-id": dataId ? `${dataId}-svg-icon` : '', children: [_jsx("rect", { y: "3.42999", width: "24", height: "17.1429", rx: "2", fill: "white" }), _jsx("mask", { id: "mask0_1993_2165", style: { maskType: 'luminance' }, maskUnits: "userSpaceOnUse", x: "0", y: "3", width: "24", height: "18", children: _jsx("rect", { y: "3.42999", width: "24", height: "17.1429", rx: "2", fill: "white" }) }), _jsxs("g", { mask: "url(#mask0_1993_2165)", children: [_jsx("rect", { y: "3.42999", width: "24", height: "17.1429", fill: "#0A17A7" }), _jsx("path", { d: "M-1.09929 1.78735L9.14287 8.69577V2.28718H14.8572V8.69573L25.0992 1.78736L26.3774 3.6823L18.2796 9.14432H24V14.8586H18.2796L26.3774 20.3206L25.0992 22.2155L14.8572 15.3072V21.7157H9.14287V15.3071L-1.09928 22.2156L-2.37744 20.3206L5.72032 14.8586H7.62939e-06V9.14432H5.72034L-2.37744 3.6823L-1.09929 1.78735Z", fill: "white" }), _jsx("path", { d: "M27.1356 1.53249C27.2368 1.68629 27.1942 1.89299 27.0404 1.99417L16.1843 9.13605C16.0305 9.23723 15.8238 9.19457 15.7227 9.04078C15.6215 8.88698 15.6641 8.68028 15.8179 8.5791L26.674 1.43722C26.8277 1.33604 27.0344 1.3787 27.1356 1.53249Z", fill: "#DB1F35" }), _jsx("path", { d: "M27.1621 21.9165C27.265 21.7639 27.2247 21.5567 27.072 21.4538L17.3401 14.8943C17.1875 14.7914 16.9803 14.8317 16.8774 14.9844C16.7745 15.137 16.8149 15.3442 16.9675 15.4471L26.6994 22.0066C26.852 22.1095 27.0592 22.0692 27.1621 21.9165Z", fill: "#DB1F35" }), _jsx("path", { d: "M-3.56564 1.81145C-3.46276 1.65878 -3.25559 1.61843 -3.10293 1.72132L7.04823 8.56255C7.20089 8.66544 7.24124 8.8726 7.13836 9.02526C7.03547 9.17792 6.82831 9.21828 6.67565 9.11539L-3.47551 2.27415C-3.62817 2.17127 -3.66853 1.96411 -3.56564 1.81145Z", fill: "#DB1F35" }), _jsx("path", { d: "M-3.56702 22.7375C-3.46528 22.8909 -3.25842 22.9328 -3.105 22.831L8.14717 15.3691C8.30059 15.2674 8.34249 15.0605 8.24074 14.9071C8.139 14.7537 7.93214 14.7118 7.77872 14.8135L-3.47344 22.2754C-3.62687 22.3772 -3.66876 22.584 -3.56702 22.7375Z", fill: "#DB1F35" }), _jsx("path", { d: "M0 13.7157H10.2857V20.5728H13.7143V13.7157H24V10.2871H13.7143V3.42999H10.2857V10.2871H0V13.7157Z", fill: "#E6273E" })] })] }));
|
|
7
|
+
export default IconUs;
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
export const ICON_NAMES = [
|
|
2
|
+
'add',
|
|
3
|
+
'addCircle',
|
|
4
|
+
'addCircleFilled',
|
|
5
|
+
'addFilled',
|
|
6
|
+
'alert',
|
|
7
|
+
'alertBadge',
|
|
8
|
+
'alertBadgeFilled',
|
|
9
|
+
'alertFilled',
|
|
10
|
+
'am',
|
|
11
|
+
'amd',
|
|
12
|
+
'amdFilled',
|
|
13
|
+
'apple',
|
|
14
|
+
'arrowDown',
|
|
15
|
+
'arrowDownFilled',
|
|
16
|
+
'arrowDownLeft',
|
|
17
|
+
'arrowDownLeftFilled',
|
|
18
|
+
'arrowDownload',
|
|
19
|
+
'arrowDownloadFilled',
|
|
20
|
+
'arrowEnter',
|
|
21
|
+
'arrowEnterFilled',
|
|
22
|
+
'arrowExit',
|
|
23
|
+
'arrowExitFilled',
|
|
24
|
+
'arrowExportLeftToRight',
|
|
25
|
+
'arrowExportLeftToRightFilled',
|
|
26
|
+
'arrowExportRightToLeft',
|
|
27
|
+
'arrowExportRightToLeftFilled',
|
|
28
|
+
'arrowExportUp',
|
|
29
|
+
'arrowExportUpFilled',
|
|
30
|
+
'arrowImport',
|
|
31
|
+
'arrowImportFilled',
|
|
32
|
+
'arrowLeft',
|
|
33
|
+
'arrowLeftFilled',
|
|
34
|
+
'arrowRepeatAll',
|
|
35
|
+
'arrowRepeatAllFilled',
|
|
36
|
+
'arrowReset',
|
|
37
|
+
'arrowResetFilled',
|
|
38
|
+
'arrowRight',
|
|
39
|
+
'arrowRightFilled',
|
|
40
|
+
'arrowSort',
|
|
41
|
+
'arrowSortFilled',
|
|
42
|
+
'arrowSync',
|
|
43
|
+
'arrowSyncFilled',
|
|
44
|
+
'arrowUp',
|
|
45
|
+
'arrowUpFilled',
|
|
46
|
+
'arrowUpLeft',
|
|
47
|
+
'arrowUpLeftFilled',
|
|
48
|
+
'arrowUpRight',
|
|
49
|
+
'arrowUpRightFilled',
|
|
50
|
+
'attach',
|
|
51
|
+
'attachFilled',
|
|
52
|
+
'beach',
|
|
53
|
+
'beachFilled',
|
|
54
|
+
'book',
|
|
55
|
+
'bookFilled',
|
|
56
|
+
'bookmark',
|
|
57
|
+
'bookmarkFilled',
|
|
58
|
+
'briefcase',
|
|
59
|
+
'briefcaseFilled',
|
|
60
|
+
'building',
|
|
61
|
+
'buildingBank',
|
|
62
|
+
'buildingBankFilled',
|
|
63
|
+
'buildingFilled',
|
|
64
|
+
'bulletListAdd',
|
|
65
|
+
'bulletListAddFilled',
|
|
66
|
+
'calculator',
|
|
67
|
+
'calculatorFilled',
|
|
68
|
+
'calendarClock',
|
|
69
|
+
'calendarClockFilled',
|
|
70
|
+
'calendarDay',
|
|
71
|
+
'calendarDayFilled',
|
|
72
|
+
'calendarEmpty',
|
|
73
|
+
'calendarLeft',
|
|
74
|
+
'calendarLeftFilled',
|
|
75
|
+
'calendarRight',
|
|
76
|
+
'calendarRightFilled',
|
|
77
|
+
'call',
|
|
78
|
+
'callFilled',
|
|
79
|
+
'card',
|
|
80
|
+
'cardFilled',
|
|
81
|
+
'caretDown',
|
|
82
|
+
'caretDownFilled',
|
|
83
|
+
'caretDownRight',
|
|
84
|
+
'caretDownRightFilled',
|
|
85
|
+
'caretLeft',
|
|
86
|
+
'caretLeftFilled',
|
|
87
|
+
'caretRight',
|
|
88
|
+
'caretRightFilled',
|
|
89
|
+
'caretUp',
|
|
90
|
+
'caretUpFilled',
|
|
91
|
+
'chat',
|
|
92
|
+
'chatFilled',
|
|
93
|
+
'chatMultiple',
|
|
94
|
+
'chatMultipleFilled',
|
|
95
|
+
'checkboxArrowRight',
|
|
96
|
+
'checkboxArrowRightFilled',
|
|
97
|
+
'checkmark',
|
|
98
|
+
'checkmarkCircle',
|
|
99
|
+
'checkmarkCircleFilled',
|
|
100
|
+
'checkmarkFilled',
|
|
101
|
+
'chevronDoubleLeft',
|
|
102
|
+
'chevronDoubleRight',
|
|
103
|
+
'chevronDown',
|
|
104
|
+
'chevronDownFilled',
|
|
105
|
+
'chevronLeft',
|
|
106
|
+
'chevronLeftFilled',
|
|
107
|
+
'chevronRight',
|
|
108
|
+
'chevronRightFilled',
|
|
109
|
+
'chevronUp',
|
|
110
|
+
'chevronUpDown',
|
|
111
|
+
'chevronUpDownFilled',
|
|
112
|
+
'chevronUpFilled',
|
|
113
|
+
'clipboardDay',
|
|
114
|
+
'clock',
|
|
115
|
+
'clockDismiss',
|
|
116
|
+
'clockDismissFilled',
|
|
117
|
+
'clockFilled',
|
|
118
|
+
'comment',
|
|
119
|
+
'commentFilled',
|
|
120
|
+
'contractCard',
|
|
121
|
+
'contractCardFilled',
|
|
122
|
+
'copy',
|
|
123
|
+
'copyFilled',
|
|
124
|
+
'cubeTree',
|
|
125
|
+
'cubeTreeFilled',
|
|
126
|
+
'database',
|
|
127
|
+
'databaseFilled',
|
|
128
|
+
'delete',
|
|
129
|
+
'deleteFilled',
|
|
130
|
+
'deviceMeetingRoom',
|
|
131
|
+
'deviceMeetingRoomFilled',
|
|
132
|
+
'dismiss',
|
|
133
|
+
'dismissCircle',
|
|
134
|
+
'dismissCircleFilled',
|
|
135
|
+
'dismissFilled',
|
|
136
|
+
'document',
|
|
137
|
+
'documentBulletList',
|
|
138
|
+
'documentBulletListFilled',
|
|
139
|
+
'documentEdit',
|
|
140
|
+
'documentEditFilled',
|
|
141
|
+
'documentFilled',
|
|
142
|
+
'documentPerson',
|
|
143
|
+
'edit',
|
|
144
|
+
'editFilled',
|
|
145
|
+
'errorCircle',
|
|
146
|
+
'errorCircleFilled',
|
|
147
|
+
'eur',
|
|
148
|
+
'eurFilled',
|
|
149
|
+
'expandUpLeft',
|
|
150
|
+
'expandUpLeftFilled',
|
|
151
|
+
'expandUpRight',
|
|
152
|
+
'expandUpRightFilled',
|
|
153
|
+
'eyeOff',
|
|
154
|
+
'eyeOffFilled',
|
|
155
|
+
'eyeOn',
|
|
156
|
+
'eyeOnFilled',
|
|
157
|
+
'facebook',
|
|
158
|
+
'filter',
|
|
159
|
+
'filterFilled',
|
|
160
|
+
'flag',
|
|
161
|
+
'flagFilled',
|
|
162
|
+
'folderLink',
|
|
163
|
+
'folderLinkFilled',
|
|
164
|
+
'food',
|
|
165
|
+
'foodFilled',
|
|
166
|
+
'gb',
|
|
167
|
+
'globe',
|
|
168
|
+
'globeFilled',
|
|
169
|
+
'google',
|
|
170
|
+
'handOpenHeart',
|
|
171
|
+
'handOpenHeartFilled',
|
|
172
|
+
'heart',
|
|
173
|
+
'heartFilled',
|
|
174
|
+
'history',
|
|
175
|
+
'historyFilled',
|
|
176
|
+
'home',
|
|
177
|
+
'homeFilled',
|
|
178
|
+
'image',
|
|
179
|
+
'imageFilled',
|
|
180
|
+
'info',
|
|
181
|
+
'infoFilled',
|
|
182
|
+
'instagram',
|
|
183
|
+
'keyReset',
|
|
184
|
+
'keyResetFilled',
|
|
185
|
+
'link',
|
|
186
|
+
'linkFilled',
|
|
187
|
+
'linkedin',
|
|
188
|
+
'list',
|
|
189
|
+
'listFilled',
|
|
190
|
+
'location',
|
|
191
|
+
'locationFilled',
|
|
192
|
+
'lockClosed',
|
|
193
|
+
'lockClosedFilled',
|
|
194
|
+
'lockOpen',
|
|
195
|
+
'lockOpenFilled',
|
|
196
|
+
'mail',
|
|
197
|
+
'mailAdd',
|
|
198
|
+
'mailAddFilled',
|
|
199
|
+
'mailArrowForward',
|
|
200
|
+
'mailArrowForwardFilled',
|
|
201
|
+
'mailFilled',
|
|
202
|
+
'mailLink',
|
|
203
|
+
'mailLinkFilled',
|
|
204
|
+
'medium',
|
|
205
|
+
'more',
|
|
206
|
+
'moreFilled',
|
|
207
|
+
'moreVertical',
|
|
208
|
+
'moreVerticalFilled',
|
|
209
|
+
'navigation',
|
|
210
|
+
'navigationFilled',
|
|
211
|
+
'notebook',
|
|
212
|
+
'notebookAdd',
|
|
213
|
+
'notebookAddFilled',
|
|
214
|
+
'notebookFilled',
|
|
215
|
+
'onlyEmployee',
|
|
216
|
+
'open',
|
|
217
|
+
'openFilled',
|
|
218
|
+
'patient',
|
|
219
|
+
'patientFilled',
|
|
220
|
+
'people',
|
|
221
|
+
'peopleAdd',
|
|
222
|
+
'peopleAddFilled',
|
|
223
|
+
'peopleFilled',
|
|
224
|
+
'peopleList',
|
|
225
|
+
'peopleListFilled',
|
|
226
|
+
'percent',
|
|
227
|
+
'person',
|
|
228
|
+
'personAccount',
|
|
229
|
+
'personAccountFilled',
|
|
230
|
+
'personAdd',
|
|
231
|
+
'personAddFilled',
|
|
232
|
+
'personArrowLeft',
|
|
233
|
+
'personArrowLeftFilled',
|
|
234
|
+
'personArrowRight',
|
|
235
|
+
'personArrowRightFilled',
|
|
236
|
+
'personBoard',
|
|
237
|
+
'personFilled',
|
|
238
|
+
'personMinus',
|
|
239
|
+
'personStar',
|
|
240
|
+
'personStarFilled',
|
|
241
|
+
'personSubtract',
|
|
242
|
+
'personSubtractFilled',
|
|
243
|
+
'phone',
|
|
244
|
+
'phoneFilled',
|
|
245
|
+
'plugConnected',
|
|
246
|
+
'pos',
|
|
247
|
+
'posFilled',
|
|
248
|
+
'prohibited',
|
|
249
|
+
'prohibitedFilled',
|
|
250
|
+
'projectProduct',
|
|
251
|
+
'question',
|
|
252
|
+
'questionFilled',
|
|
253
|
+
'redo',
|
|
254
|
+
'redoFilled',
|
|
255
|
+
'ru',
|
|
256
|
+
'rub',
|
|
257
|
+
'rubFilled',
|
|
258
|
+
'save',
|
|
259
|
+
'saveFilled',
|
|
260
|
+
'savings',
|
|
261
|
+
'savingsFilled',
|
|
262
|
+
'search',
|
|
263
|
+
'searchFilled',
|
|
264
|
+
'selectAllOff',
|
|
265
|
+
'selectAllOffFilled',
|
|
266
|
+
'selectAllOn',
|
|
267
|
+
'selectAllOnFilled',
|
|
268
|
+
'send',
|
|
269
|
+
'sendFilled',
|
|
270
|
+
'settings',
|
|
271
|
+
'settingsFilled',
|
|
272
|
+
'share',
|
|
273
|
+
'shareAndroid',
|
|
274
|
+
'shareAndroidFilled',
|
|
275
|
+
'shareFilled',
|
|
276
|
+
'signOut',
|
|
277
|
+
'signOutFilled',
|
|
278
|
+
'spinner',
|
|
279
|
+
'spinnerFilled',
|
|
280
|
+
'status',
|
|
281
|
+
'statusFilled',
|
|
282
|
+
'subtract',
|
|
283
|
+
'subtractCircle',
|
|
284
|
+
'subtractCircleFilled',
|
|
285
|
+
'subtractFilled',
|
|
286
|
+
'tableCellEdit',
|
|
287
|
+
'tableCellEditFilled',
|
|
288
|
+
'telegram',
|
|
289
|
+
'timer',
|
|
290
|
+
'timerFilled',
|
|
291
|
+
'twitter',
|
|
292
|
+
'undo',
|
|
293
|
+
'undoFilled',
|
|
294
|
+
'unitsEmployee',
|
|
295
|
+
'upload',
|
|
296
|
+
'us',
|
|
297
|
+
'usd',
|
|
298
|
+
'usdFilled',
|
|
299
|
+
'userMinus',
|
|
300
|
+
'video',
|
|
301
|
+
'videoFilled',
|
|
302
|
+
'wallet',
|
|
303
|
+
'walletFilled',
|
|
304
|
+
'warning',
|
|
305
|
+
'warningFilled',
|
|
306
|
+
'youtube'
|
|
307
|
+
];
|
|
@@ -292,6 +292,7 @@ export * from './IconUndo';
|
|
|
292
292
|
export * from './IconUndoFilled';
|
|
293
293
|
export * from './IconUnitsEmployee';
|
|
294
294
|
export * from './IconUpload';
|
|
295
|
+
export * from './IconUs';
|
|
295
296
|
export * from './IconUsd';
|
|
296
297
|
export * from './IconUsdFilled';
|
|
297
298
|
export * from './IconUserMinus';
|
|
@@ -292,6 +292,7 @@ export * from './IconUndo';
|
|
|
292
292
|
export * from './IconUndoFilled';
|
|
293
293
|
export * from './IconUnitsEmployee';
|
|
294
294
|
export * from './IconUpload';
|
|
295
|
+
export * from './IconUs';
|
|
295
296
|
export * from './IconUsd';
|
|
296
297
|
export * from './IconUsdFilled';
|
|
297
298
|
export * from './IconUserMinus';
|
|
@@ -3,7 +3,7 @@ import { ToastContainer, toast, Slide } from 'react-toastify';
|
|
|
3
3
|
import { Text } from '../Text';
|
|
4
4
|
import { Button } from '../Button';
|
|
5
5
|
import { DEFAULT_DURATION, ICONS_MAPPING, TYPE_MAPPING } from './consts';
|
|
6
|
-
import { IconDynamicComponent } from '
|
|
6
|
+
import { IconDynamicComponent } from '../IconDynamicComponent';
|
|
7
7
|
import 'react-toastify/dist/ReactToastify.css';
|
|
8
8
|
const CustomToast = ({ actionProps, toastId, type = 'information', text }) => {
|
|
9
9
|
return (_jsxs("div", { "data-id": `${type}-toast-message`, className: "snackbar", children: [_jsxs("div", { className: "snackbar__content", children: [_jsx(IconDynamicComponent, { componentName: ICONS_MAPPING[type], type: TYPE_MAPPING[type], size: "medium" }), _jsx(Text, { className: "snackbar__text pl-16 pr-8", type: "primary", size: "standard", weight: "regular", lineHeight: "large", children: text })] }), actionProps ? (_jsx(Button, Object.assign({ size: "small", type: "tertiary" }, actionProps, { onClick: (e) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Text } from '../../components/Text';
|
|
3
|
-
import { IconDynamicComponent } from '
|
|
3
|
+
import { IconDynamicComponent } from '../../components/IconDynamicComponent';
|
|
4
4
|
import { generateDataTestId } from '../../utils/helpers';
|
|
5
5
|
import classnames from 'classnames';
|
|
6
6
|
export const ErrorMessage = ({ message, icon, dataId, className }) => {
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
interface IconDynamicComponentProps {
|
|
3
|
-
componentName: string;
|
|
4
|
-
size?: string;
|
|
5
|
-
type?: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const IconDynamicComponent: ({ componentName, size, type, className }: IconDynamicComponentProps) => ReactElement | null;
|
|
9
|
-
export default IconDynamicComponent;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Suspense } from 'react';
|
|
3
|
-
import { IconComponentMapping } from './constants';
|
|
4
|
-
export const IconDynamicComponent = ({ componentName, size = 'small', type = 'inverse', className }) => {
|
|
5
|
-
if (!componentName || !IconComponentMapping[componentName]) {
|
|
6
|
-
return null;
|
|
7
|
-
}
|
|
8
|
-
// Dynamically load the component based on the componentName prop
|
|
9
|
-
const Component = IconComponentMapping[componentName];
|
|
10
|
-
return (_jsx(Suspense, { fallback: null, children: _jsx(Component, { type: type, size: size, className: className }) }));
|
|
11
|
-
};
|
|
12
|
-
export default IconDynamicComponent;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { lazy } from 'react';
|
|
2
|
-
export const IconComponentMapping = {
|
|
3
|
-
warningFilled: lazy(() => import('../../components/SVGIcons/IconWarningFilled')),
|
|
4
|
-
checkmarkCircleFilled: lazy(() => import('../../components/SVGIcons/IconCheckmarkCircleFilled')),
|
|
5
|
-
errorCircleFilled: lazy(() => import('../../components/SVGIcons/IconErrorCircleFilled')),
|
|
6
|
-
infoFilled: lazy(() => import('../../components/SVGIcons/IconInfoFilled')),
|
|
7
|
-
checkmark: lazy(() => import('../../components/SVGIcons/IconCheckmark')),
|
|
8
|
-
subtract: lazy(() => import('../../components/SVGIcons/IconSubtract')),
|
|
9
|
-
am: lazy(() => import('../../components/SVGIcons/IconAm')),
|
|
10
|
-
ru: lazy(() => import('../../components/SVGIcons/IconRu')),
|
|
11
|
-
us: lazy(() => import('../../components/SVGIcons/IconGb'))
|
|
12
|
-
};
|
|
File without changes
|
|
File without changes
|