@itcase/ui 1.1.10 → 1.1.11
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/dist/{Accordion-CXvqu97t.js → Accordion-vh2p5Mzs.js} +2 -2
- package/dist/{Avatar-JAaLGdYj.js → Avatar-DhZxzLEY.js} +2 -2
- package/dist/{Badge-DPM6qrjA.js → Badge-D-4zpdfU.js} +1 -1
- package/dist/{Breadcrumbs-BZpYBM5A.js → Breadcrumbs-CciIq1Na.js} +2 -2
- package/dist/{Button-CyO_Wl49.js → Button-BXClqM-t.js} +3 -3
- package/dist/{Card-DKmhFMCS.js → Card-DPGgzPuD.js} +1 -1
- package/dist/{Cell-D3aJx_C0.js → Cell-BfV_aVxs.js} +3 -3
- package/dist/{Checkbox-BqTMHeES.js → Checkbox-C-H_Z4S_.js} +1 -1
- package/dist/{Chips-DhyDHpu7.js → Chips-BR_EPV82.js} +1 -1
- package/dist/{Choice-cgCRlPk0.js → Choice-BJd9Jx4D.js} +4 -4
- package/dist/{ContextMenuItem-DjDhhmjF.js → ContextMenuItem-CpZ3pjky.js} +3 -3
- package/dist/CookiesWarning-jN2hWm12.js +52 -0
- package/dist/{DatePicker-BFLpftbJ.js → DatePicker-Nm4Ut2tD.js} +12 -7
- package/dist/{Divider-D0TEKxHr.js → Divider-Dhj6sMWd.js} +3 -0
- package/dist/{DropdownItem-DOBsvnrL.js → DropdownItem-BaQXZu0w.js} +2 -2
- package/dist/{Icon-C1j6rkeI.js → Icon-Duj1nynQ.js} +1 -1
- package/dist/{InputPassword-Aff74Atr.js → InputPassword-CTbtTP_o.js} +1 -1
- package/dist/{Label-CD6o__-D.js → Label-D9cQMuy3.js} +2 -2
- package/dist/LanguageSelector-TZEgbNsG.js +14 -0
- package/dist/{Loader-BUgSIcId.js → Loader-YZrWGaNy.js} +1 -1
- package/dist/{Menu-89epjC8r.js → Menu-Kpe1GMns.js} +1 -1
- package/dist/{MenuItem-DvpftOnP.js → MenuItem-C5BPgTO7.js} +1 -1
- package/dist/ModalLoader-8l8YtIvz.js +163 -0
- package/dist/{NotificationList-D_NNtwS1.js → NotificationList-CJ-hNA9W.js} +1 -1
- package/dist/{Pagination-0sADvbwj.js → Pagination-LXBlrbZT.js} +3 -3
- package/dist/{Radio-DFeWsO4E.js → Radio-Ca2-2PPF.js} +1 -1
- package/dist/{Response-C5_yetym.js → Response-Nzg8ooT8.js} +2 -2
- package/dist/{SearchResult-C0kjGm-o.js → SearchResult-B6Jd1xZO.js} +3 -3
- package/dist/{Segmented-C56XBzTH.js → Segmented-pa7MGnor.js} +1 -1
- package/dist/{SiteMenuButton-Do8ZNCkl.js → SiteMenuButton-CcCAsJtr.js} +2 -2
- package/dist/{Swiper-BYPes9JY.js → Swiper-JdwU0uca.js} +13 -5
- package/dist/{SwitchField-W4_o97BR.js → SwitchField-B8JbD2Se.js} +4 -4
- package/dist/{TabGroup-DRiFyK3Z.js → TabGroup-DieipbE3.js} +3 -3
- package/dist/{Text-edtauAM6.js → Text-CxrzHFN1.js} +2 -2
- package/dist/{Tile-CQ5L7pja.js → Tile-rSmWn8mR.js} +2 -2
- package/dist/{Tooltip-jT5A43he.js → Tooltip-CcwyN7PD.js} +1 -1
- package/dist/cjs/{Accordion-Dx0BRqhi.js → Accordion-BPSF6By2.js} +2 -2
- package/dist/cjs/{Avatar-C2xK87qB.js → Avatar-qFiPDVgu.js} +2 -2
- package/dist/cjs/{Badge-BvJTwXqB.js → Badge-zYZKun4n.js} +1 -1
- package/dist/cjs/{Breadcrumbs-PHMiEJZH.js → Breadcrumbs-BIhuwcTG.js} +2 -2
- package/dist/cjs/{Button-D7ctQMni.js → Button-C4_FRFZe.js} +3 -3
- package/dist/cjs/{Card-C5uctOQL.js → Card--te6xVsm.js} +1 -1
- package/dist/cjs/{Cell-B2BMVPlV.js → Cell-zxHVzKan.js} +3 -3
- package/dist/cjs/{Checkbox-C1HH9ut8.js → Checkbox-B-1dwjii.js} +1 -1
- package/dist/cjs/{Chips-DkUdk6Zs.js → Chips-BcJttN22.js} +1 -1
- package/dist/cjs/{Choice-CJqMvK5I.js → Choice-CPPQ2o2L.js} +4 -4
- package/dist/cjs/{ContextMenuItem-DocbJZKp.js → ContextMenuItem-BME-EZ-y.js} +3 -3
- package/dist/cjs/CookiesWarning-CfEwpkS8.js +59 -0
- package/dist/cjs/{DatePicker-7Ugf6hQ1.js → DatePicker-BiCqQFyi.js} +12 -7
- package/dist/cjs/{Divider-doetVRw0.js → Divider-D92wY8Fn.js} +3 -0
- package/dist/cjs/{DropdownItem-BVxf7bPs.js → DropdownItem-bjpmcFH1.js} +2 -2
- package/dist/cjs/{Icon-D1v73UhR.js → Icon-DzJtiBBk.js} +1 -1
- package/dist/cjs/{InputPassword-saMz6m0X.js → InputPassword-DHgR_QTK.js} +1 -1
- package/dist/cjs/{Label-C2Whza8M.js → Label-BcwjtIk7.js} +2 -2
- package/dist/cjs/LanguageSelector-C3i2JJCM.js +20 -0
- package/dist/cjs/{Loader-CK9zQAPl.js → Loader-2vQxF_aO.js} +1 -1
- package/dist/cjs/{Menu-BNe1i3Z7.js → Menu-CDlB7QNf.js} +1 -1
- package/dist/cjs/{MenuItem-BRQoOa-K.js → MenuItem-4uVtNhb4.js} +1 -1
- package/dist/cjs/ModalLoader-A2KkSC3x.js +172 -0
- package/dist/cjs/{NotificationList-ydXfdUwy.js → NotificationList-BTvz_kvZ.js} +1 -1
- package/dist/cjs/{Pagination-D8EHefOz.js → Pagination-B0-KGWSv.js} +3 -3
- package/dist/cjs/{Radio-DRXdBBWU.js → Radio-Cvbuwkx3.js} +1 -1
- package/dist/cjs/{Response-De79pGs5.js → Response-XesiDp89.js} +2 -2
- package/dist/cjs/{SearchResult-DFG3pyeM.js → SearchResult-D147g0-n.js} +3 -3
- package/dist/cjs/{Segmented-D0ISlz9H.js → Segmented-BHblcvck.js} +1 -1
- package/dist/cjs/{SiteMenuButton-Ca46xAzk.js → SiteMenuButton-ChUD4CgP.js} +2 -2
- package/dist/cjs/{Swiper-oPcqfskQ.js → Swiper-DHjkfpbP.js} +13 -5
- package/dist/cjs/{SwitchField-xk1JORBl.js → SwitchField-CdpEiqFv.js} +4 -4
- package/dist/cjs/{TabGroup-DEEcVLO0.js → TabGroup-Vn5oELiY.js} +3 -3
- package/dist/cjs/{Text-CgYNdSwY.js → Text-C8vlKWNN.js} +2 -2
- package/dist/cjs/{Tile-gAqZGMv7.js → Tile-j8EfyWDg.js} +2 -2
- package/dist/cjs/{Tooltip-DasmzIDY.js → Tooltip-CnnungCh.js} +1 -1
- package/dist/cjs/components/Accordion.js +4 -4
- package/dist/cjs/components/Avatar.js +4 -4
- package/dist/cjs/components/Badge.js +2 -2
- package/dist/cjs/components/Breadcrumbs.js +4 -4
- package/dist/cjs/components/Button.js +5 -5
- package/dist/cjs/components/Card.js +2 -2
- package/dist/cjs/components/Cell.js +5 -5
- package/dist/cjs/components/Checkbox.js +2 -2
- package/dist/cjs/components/Chips.js +2 -2
- package/dist/cjs/components/Choice/Choice.interface.d.ts +5 -1
- package/dist/cjs/components/Choice.js +4 -4
- package/dist/cjs/components/ContextMenu.js +5 -5
- package/dist/cjs/components/CookiesWarning/CookiesWarning.d.ts +10 -0
- package/dist/cjs/components/CookiesWarning/CookiesWarning.interface.d.ts +16 -0
- package/dist/cjs/components/CookiesWarning/index.d.ts +2 -0
- package/dist/cjs/components/CookiesWarning.js +19 -156
- package/dist/cjs/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/cjs/components/DatePicker/DatePicker.interface.d.ts +55 -7
- package/dist/cjs/components/DatePicker.js +7 -7
- package/dist/cjs/components/Divider/Divider.d.ts +5 -0
- package/dist/cjs/components/Divider.js +1 -1
- package/dist/cjs/components/Dropdown.js +3 -3
- package/dist/cjs/components/FormField.js +7 -7
- package/dist/cjs/components/Icon.js +3 -3
- package/dist/cjs/components/InputPassword.js +4 -4
- package/dist/cjs/components/Label.js +3 -3
- package/dist/cjs/components/LanguageSelector/Label.interface.d.ts +20 -0
- package/dist/cjs/components/LanguageSelector/LanguageSelector.d.ts +3 -0
- package/dist/cjs/components/LanguageSelector/index.d.ts +1 -0
- package/dist/cjs/components/LanguageSelector.js +9 -95
- package/dist/cjs/components/Loader.js +2 -2
- package/dist/cjs/components/Menu.js +3 -3
- package/dist/cjs/components/MenuItem.js +2 -2
- package/dist/cjs/components/Modal/Modal.d.ts +4 -0
- package/dist/cjs/components/Modal/Modal.interface.d.ts +30 -0
- package/dist/cjs/components/Modal/ModalLoader.d.ts +3 -0
- package/dist/cjs/components/Modal/index.d.ts +3 -0
- package/dist/cjs/components/Modal.js +7 -7
- package/dist/cjs/components/Notification.js +2 -2
- package/dist/cjs/components/Pagination.js +6 -6
- package/dist/cjs/components/Panel.js +1 -1
- package/dist/cjs/components/Radio.js +2 -2
- package/dist/cjs/components/Response.js +6 -6
- package/dist/cjs/components/Search/Search.interface.d.ts +2 -2
- package/dist/cjs/components/Search.js +4 -4
- package/dist/cjs/components/Segmented.js +2 -2
- package/dist/cjs/components/Select.js +7 -5
- package/dist/cjs/components/SiteMenu.js +4 -4
- package/dist/cjs/components/Swiper.js +1 -1
- package/dist/cjs/components/Tab.js +4 -4
- package/dist/cjs/components/Text/Text.interface.d.ts +1 -0
- package/dist/cjs/components/Text.js +1 -1
- package/dist/cjs/components/Tile.js +3 -3
- package/dist/cjs/components/Tooltip.js +2 -2
- package/dist/cjs/components.js +57 -57
- package/dist/cjs/constants/componentProps/iconSize.js +1 -1
- package/dist/cjs/constants/componentProps/sizePX.js +1 -1
- package/dist/cjs/context/Notifications.js +103 -53
- package/dist/cjs/types/componentProps/borderColorHover.d.ts +1 -1
- package/dist/cjs/types/componentProps/iconFillSize.d.ts +1 -1
- package/dist/cjs/types/componentProps/iconSize.d.ts +1 -1
- package/dist/cjs/types/componentProps/sizePX.d.ts +1 -1
- package/dist/components/Accordion.js +4 -4
- package/dist/components/Avatar.js +4 -4
- package/dist/components/Badge.js +2 -2
- package/dist/components/Breadcrumbs.js +4 -4
- package/dist/components/Button.js +5 -5
- package/dist/components/Card.js +2 -2
- package/dist/components/Cell.js +5 -5
- package/dist/components/Checkbox.js +2 -2
- package/dist/components/Chips.js +2 -2
- package/dist/components/Choice/Choice.interface.d.ts +5 -1
- package/dist/components/Choice.js +4 -4
- package/dist/components/ContextMenu.js +5 -5
- package/dist/components/CookiesWarning/CookiesWarning.d.ts +10 -0
- package/dist/components/CookiesWarning/CookiesWarning.interface.d.ts +16 -0
- package/dist/components/CookiesWarning/index.d.ts +2 -0
- package/dist/components/CookiesWarning.js +18 -152
- package/dist/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/DatePicker/DatePicker.interface.d.ts +55 -7
- package/dist/components/DatePicker.js +7 -7
- package/dist/components/Divider/Divider.d.ts +5 -0
- package/dist/components/Divider.js +1 -1
- package/dist/components/Dropdown.js +3 -3
- package/dist/components/FormField.js +7 -7
- package/dist/components/Icon.js +3 -3
- package/dist/components/InputPassword.js +4 -4
- package/dist/components/Label.js +3 -3
- package/dist/components/LanguageSelector/Label.interface.d.ts +20 -0
- package/dist/components/LanguageSelector/LanguageSelector.d.ts +3 -0
- package/dist/components/LanguageSelector/index.d.ts +1 -0
- package/dist/components/LanguageSelector.js +8 -92
- package/dist/components/Loader.js +2 -2
- package/dist/components/Menu.js +3 -3
- package/dist/components/MenuItem.js +2 -2
- package/dist/components/Modal/Modal.d.ts +4 -0
- package/dist/components/Modal/Modal.interface.d.ts +30 -0
- package/dist/components/Modal/ModalLoader.d.ts +3 -0
- package/dist/components/Modal/index.d.ts +3 -0
- package/dist/components/Modal.js +7 -7
- package/dist/components/Notification.js +2 -2
- package/dist/components/Pagination.js +6 -6
- package/dist/components/Panel.js +1 -1
- package/dist/components/Radio.js +2 -2
- package/dist/components/Response.js +6 -6
- package/dist/components/Search/Search.interface.d.ts +2 -2
- package/dist/components/Search.js +4 -4
- package/dist/components/Segmented.js +2 -2
- package/dist/components/Select.js +7 -5
- package/dist/components/SiteMenu.js +4 -4
- package/dist/components/Swiper.js +1 -1
- package/dist/components/Tab.js +4 -4
- package/dist/components/Text/Text.interface.d.ts +1 -0
- package/dist/components/Text.js +1 -1
- package/dist/components/Tile.js +3 -3
- package/dist/components/Tooltip.js +2 -2
- package/dist/components.js +36 -36
- package/dist/constants/componentProps/iconSize.js +1 -1
- package/dist/constants/componentProps/sizePX.js +1 -1
- package/dist/context/Notifications.js +104 -54
- package/dist/css/components/Avatar/Avatar.css +3 -3
- package/dist/css/components/DatePicker/DatePicker.css +21 -0
- package/dist/css/components/Divider/Divider.css +3 -3
- package/dist/css/components/Icon/Icon.css +2 -2
- package/dist/css/components/Search/Search.css +1 -1
- package/dist/css/components/Search/css/search-input/search-input_size.css +1 -1
- package/dist/css/components/Select/Select.css +6 -5
- package/dist/css/components/Select/css/__menu/select__menu.css +1 -0
- package/dist/css/components/Swiper/Swiper.css +2 -2
- package/dist/types/componentProps/borderColorHover.d.ts +1 -1
- package/dist/types/componentProps/iconFillSize.d.ts +1 -1
- package/dist/types/componentProps/iconSize.d.ts +1 -1
- package/dist/types/componentProps/sizePX.d.ts +1 -1
- package/package.json +2 -1
- package/dist/ModalLoader-CushfGnC.js +0 -374
- package/dist/cjs/ModalLoader-1f8MYsLV.js +0 -384
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import React__default, { useState, useCallback, useMemo, useContext, createContext } from 'react';
|
|
2
|
+
import React__default, { useState, useCallback, useMemo, useEffect, useContext, createContext } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { v4 } from 'uuid';
|
|
5
5
|
|
|
@@ -16,61 +16,53 @@ const NotificationsAPIContext = /*#__PURE__*/createContext({
|
|
|
16
16
|
notificationStatuses: STATUSES
|
|
17
17
|
});
|
|
18
18
|
function NotificationsProvider(props) {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
const {
|
|
20
|
+
children,
|
|
21
|
+
initialNotificationsList = []
|
|
22
|
+
} = props;
|
|
23
|
+
const [notificationsList, setNotificationsList] = useState(() => {
|
|
24
|
+
// We need to set id to every notification item and original list also be have new id's
|
|
25
|
+
return (initialNotificationsList || []).map(notificationItem => {
|
|
26
|
+
return createNotification(notificationItem, notificationItem.onClose);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
const hideNotifications = useCallback(targetId => {
|
|
30
|
+
// If not target, then nothing to hide
|
|
31
|
+
if (!targetId) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
setNotificationsList(prevState => {
|
|
35
|
+
const newState = prevState.filter(notificationItem => {
|
|
36
|
+
// Check on need to hide, if current notification is target for hide
|
|
37
|
+
const isNeedToHide = String(notificationItem.id) === String(targetId);
|
|
38
|
+
// Callback for close if exists
|
|
39
|
+
if (isNeedToHide && typeof notificationItem.onClose === 'function') {
|
|
40
|
+
notificationItem.onClose();
|
|
26
41
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
42
|
+
// Save in state if no need to hide
|
|
43
|
+
return !isNeedToHide;
|
|
44
|
+
});
|
|
45
|
+
// Set new notifications list without target item to state
|
|
46
|
+
return newState;
|
|
30
47
|
});
|
|
31
48
|
}, []);
|
|
32
49
|
const showNotification = useCallback((notification, onClose) => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
switch (status) {
|
|
49
|
-
case 'success':
|
|
50
|
-
textColor = 'successTextPrimary';
|
|
51
|
-
break;
|
|
52
|
-
case 'info':
|
|
53
|
-
textColor = 'infoTextPrimary';
|
|
54
|
-
break;
|
|
55
|
-
case 'error':
|
|
56
|
-
textColor = 'errorTextPrimary';
|
|
57
|
-
break;
|
|
58
|
-
case 'warning':
|
|
59
|
-
textColor = 'warningTextPrimary';
|
|
60
|
-
break;
|
|
61
|
-
}
|
|
62
|
-
setNotifications(prevState => [...prevState, {
|
|
63
|
-
id: id,
|
|
64
|
-
title: title,
|
|
65
|
-
text: text,
|
|
66
|
-
status: status,
|
|
67
|
-
textColor: textColor,
|
|
68
|
-
onClose: onClose
|
|
69
|
-
}]);
|
|
70
|
-
if (closeByTime) {
|
|
71
|
-
setTimeout(() => hideNotifications(id), closeByTime);
|
|
50
|
+
const newNotificationItem = createNotification(notification, onClose);
|
|
51
|
+
setNotificationsList(prevState => {
|
|
52
|
+
const newState = prevState.slice();
|
|
53
|
+
const existsNotificationIndex = newState.findIndex(notificationItem => String(notificationItem.id) === String(newNotificationItem.id));
|
|
54
|
+
if (existsNotificationIndex === -1) {
|
|
55
|
+
return [...newState, newNotificationItem];
|
|
56
|
+
}
|
|
57
|
+
clearTimeout(newState[existsNotificationIndex]._closeTimeout);
|
|
58
|
+
newState[existsNotificationIndex]._closeTimeout = null;
|
|
59
|
+
newState[existsNotificationIndex] = newNotificationItem;
|
|
60
|
+
return newState;
|
|
61
|
+
});
|
|
62
|
+
if (newNotificationItem.closeByTime) {
|
|
63
|
+
newNotificationItem._closeTimeout = setTimeout(() => hideNotifications(newNotificationItem.id), newNotificationItem.closeByTime);
|
|
72
64
|
}
|
|
73
|
-
return
|
|
65
|
+
return newNotificationItem;
|
|
74
66
|
// eslint-disable-next-line
|
|
75
67
|
}, []);
|
|
76
68
|
const notificationsAPI = useMemo(() => ({
|
|
@@ -81,14 +73,24 @@ function NotificationsProvider(props) {
|
|
|
81
73
|
// Functions is never changes, no sense to set as dependencies
|
|
82
74
|
// eslint-disable-next-line
|
|
83
75
|
[]);
|
|
76
|
+
useEffect(() => {
|
|
77
|
+
// Set timeout for initial notifications list one time on first render
|
|
78
|
+
notificationsList.forEach(notificationItem => {
|
|
79
|
+
if (notificationItem.closeByTime) {
|
|
80
|
+
setTimeout(() => hideNotifications(notificationItem.id), notificationItem.closeByTime);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
// eslint-disable-next-line
|
|
84
|
+
}, []);
|
|
84
85
|
return /*#__PURE__*/React__default.createElement(NotificationsAPIContext.Provider, {
|
|
85
86
|
value: notificationsAPI
|
|
86
87
|
}, /*#__PURE__*/React__default.createElement(NotificationsContext.Provider, {
|
|
87
|
-
value:
|
|
88
|
-
},
|
|
88
|
+
value: notificationsList
|
|
89
|
+
}, children));
|
|
89
90
|
}
|
|
90
91
|
NotificationsProvider.propTypes = {
|
|
91
|
-
children: PropTypes.any
|
|
92
|
+
children: PropTypes.any,
|
|
93
|
+
initialNotificationsList: PropTypes.array
|
|
92
94
|
};
|
|
93
95
|
function useNotifications() {
|
|
94
96
|
return useContext(NotificationsContext);
|
|
@@ -96,6 +98,47 @@ function useNotifications() {
|
|
|
96
98
|
function useNotificationsAPI() {
|
|
97
99
|
return useContext(NotificationsAPIContext);
|
|
98
100
|
}
|
|
101
|
+
function createNotification(notification, onClose) {
|
|
102
|
+
// Default notification item properties
|
|
103
|
+
let id = v4().split('-')[0];
|
|
104
|
+
let title = '';
|
|
105
|
+
let text = '';
|
|
106
|
+
let status = STATUSES.warning;
|
|
107
|
+
let closeByTime = 4500;
|
|
108
|
+
let textColor = '';
|
|
109
|
+
if (typeof notification === 'string') {
|
|
110
|
+
text = notification;
|
|
111
|
+
} else if (typeof notification === 'object') {
|
|
112
|
+
id = notification.id ?? id;
|
|
113
|
+
title = notification.title ?? title;
|
|
114
|
+
text = notification.text ?? text;
|
|
115
|
+
status = notification.status ?? status;
|
|
116
|
+
closeByTime = notification.closeByTime ?? closeByTime;
|
|
117
|
+
}
|
|
118
|
+
switch (status) {
|
|
119
|
+
case 'success':
|
|
120
|
+
textColor = 'successTextPrimary';
|
|
121
|
+
break;
|
|
122
|
+
case 'info':
|
|
123
|
+
textColor = 'infoTextPrimary';
|
|
124
|
+
break;
|
|
125
|
+
case 'error':
|
|
126
|
+
textColor = 'errorTextPrimary';
|
|
127
|
+
break;
|
|
128
|
+
case 'warning':
|
|
129
|
+
textColor = 'warningTextPrimary';
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
return {
|
|
133
|
+
id: id,
|
|
134
|
+
title: title,
|
|
135
|
+
text: text,
|
|
136
|
+
status: status,
|
|
137
|
+
textColor: textColor,
|
|
138
|
+
closeByTime: closeByTime,
|
|
139
|
+
onClose: onClose
|
|
140
|
+
};
|
|
141
|
+
}
|
|
99
142
|
NotificationsProvider.__docgenInfo = {
|
|
100
143
|
"description": "",
|
|
101
144
|
"methods": [],
|
|
@@ -107,6 +150,13 @@ NotificationsProvider.__docgenInfo = {
|
|
|
107
150
|
"name": "any"
|
|
108
151
|
},
|
|
109
152
|
"required": false
|
|
153
|
+
},
|
|
154
|
+
"initialNotificationsList": {
|
|
155
|
+
"description": "",
|
|
156
|
+
"type": {
|
|
157
|
+
"name": "array"
|
|
158
|
+
},
|
|
159
|
+
"required": false
|
|
110
160
|
}
|
|
111
161
|
}
|
|
112
162
|
};
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
}
|
|
11
11
|
^&__icon {
|
|
12
12
|
position: absolute;
|
|
13
|
-
right: 0;
|
|
14
|
-
bottom: 0;
|
|
13
|
+
right: var(--avatar-icon-right, 0);
|
|
14
|
+
bottom: var(--avatar-icon-bottom, 0);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
div&__dropdown {
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
}
|
|
74
74
|
.avatar {
|
|
75
75
|
&_size {
|
|
76
|
-
@each $size in 14, 16, 24, 32, 40, 48, 56, 60, 64, 72, 80, 96, 112, 144, 240 {
|
|
76
|
+
@each $size in 14, 16, 20, 24, 32, 40, 48, 56, 60, 64, 72, 80, 96, 112, 144, 240 {
|
|
77
77
|
&_$(size) {
|
|
78
78
|
^^&__wrapper {
|
|
79
79
|
width: $(size)px;
|
|
@@ -747,6 +747,20 @@
|
|
|
747
747
|
&__tab-loop {
|
|
748
748
|
^&-popper {
|
|
749
749
|
z-index: 1000 !important;
|
|
750
|
+
&-left {
|
|
751
|
+
left: 0 !important;
|
|
752
|
+
top: 44px !important;
|
|
753
|
+
right: auto !important;
|
|
754
|
+
z-index: 1000 !important;
|
|
755
|
+
transform: none !important;
|
|
756
|
+
}
|
|
757
|
+
&-right {
|
|
758
|
+
left: auto !important;
|
|
759
|
+
top: 44px !important;
|
|
760
|
+
right: 0 !important;
|
|
761
|
+
z-index: 1000 !important;
|
|
762
|
+
transform: none !important;
|
|
763
|
+
}
|
|
750
764
|
}
|
|
751
765
|
}
|
|
752
766
|
&__header {
|
|
@@ -1099,6 +1113,13 @@
|
|
|
1099
1113
|
&__clear-label {
|
|
1100
1114
|
width: 100%;
|
|
1101
1115
|
}
|
|
1116
|
+
&__input-icon {
|
|
1117
|
+
background: #fff;
|
|
1118
|
+
position: absolute;
|
|
1119
|
+
top: 50%;
|
|
1120
|
+
right: 12px;
|
|
1121
|
+
transform: translateY(-50%);
|
|
1122
|
+
}
|
|
1102
1123
|
&-wrapper {
|
|
1103
1124
|
width: 100%;
|
|
1104
1125
|
^&__input-container {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.divider {
|
|
2
|
-
margin: 0;
|
|
3
2
|
padding: 0;
|
|
3
|
+
margin: 0;
|
|
4
4
|
border: none;
|
|
5
5
|
}
|
|
6
6
|
.divider {
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
.divider {
|
|
36
36
|
&_direction {
|
|
37
37
|
&_horizontal {
|
|
38
|
-
display: flex;
|
|
39
38
|
min-width: 100%;
|
|
39
|
+
display: flex;
|
|
40
40
|
flex-direction: row;
|
|
41
41
|
}
|
|
42
42
|
&_vertical {
|
|
43
|
-
display: flex;
|
|
44
43
|
min-height: 100%;
|
|
44
|
+
display: flex;
|
|
45
45
|
flex-direction: column;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
@each $type in accent, primary, secondary, tertiary, surface, success, error {
|
|
28
28
|
&_$(type) {
|
|
29
29
|
&-item {
|
|
30
|
-
@each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, disabled, hover {
|
|
30
|
+
@each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, disabled, hover, invert {
|
|
31
31
|
&-$(color) {
|
|
32
32
|
& svg {
|
|
33
33
|
stroke: none;
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
@each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, disabled, hover {
|
|
39
|
+
@each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent, disabled, hover, invert {
|
|
40
40
|
&-$(color) {
|
|
41
41
|
& svg {
|
|
42
42
|
stroke: none;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
.select {
|
|
2
2
|
width: 100%;
|
|
3
|
-
position: relative;
|
|
4
3
|
min-width: 240px;
|
|
4
|
+
position: relative;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
@keyframes selectMenuAnimationOpen {
|
|
8
8
|
0% {
|
|
9
|
-
opacity: 0%;
|
|
10
9
|
visibility: hidden;
|
|
11
10
|
transform: translate3d(0, 8px, 0);
|
|
11
|
+
opacity: 0%;
|
|
12
12
|
}
|
|
13
13
|
100% {
|
|
14
|
-
opacity: 100%;
|
|
15
14
|
visibility: visible;
|
|
16
15
|
transform: translate3d(0, 0, 0);
|
|
16
|
+
opacity: 100%;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
@keyframes selectMenuAnimationClose {
|
|
21
21
|
0% {
|
|
22
|
-
opacity: 100%;
|
|
23
22
|
visibility: visible;
|
|
24
23
|
transform: translate3d(0, 0, 0);
|
|
24
|
+
opacity: 100%;
|
|
25
25
|
}
|
|
26
26
|
100% {
|
|
27
|
-
opacity: 0%;
|
|
28
27
|
visibility: hidden;
|
|
29
28
|
transform: translate3d(0, 8px, 0);
|
|
29
|
+
opacity: 0%;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -251,6 +251,7 @@
|
|
|
251
251
|
right: 8px;
|
|
252
252
|
}
|
|
253
253
|
& .divider {
|
|
254
|
+
height: 1px;
|
|
254
255
|
position: absolute;
|
|
255
256
|
left: 0;
|
|
256
257
|
bottom: 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Swiper 11.1.
|
|
2
|
+
* Swiper 11.1.4
|
|
3
3
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
|
4
4
|
* https://swiperjs.com
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Released under the MIT License
|
|
9
9
|
*
|
|
10
|
-
* Released on: May
|
|
10
|
+
* Released on: May 30, 2024
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
/* FONT_START */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type borderColorHoverPropsType = 'accentBorderPrimary' | 'accentBorderPrimaryHover' | 'primaryBorderPrimary' | 'secondaryBorderPrimary' | 'tertiaryBorderPrimary' | 'surfaceBorderPrimary' | 'surfaceBorderSecondary' | 'surfaceBorderTertiary' | 'errorBorderPrimary' | 'errorBorderPrimaryHover' | 'successBorderPrimary';
|
|
1
|
+
export type borderColorHoverPropsType = 'accentBorderPrimary' | 'accentBorderPrimaryHover' | 'primaryBorderPrimary' | 'secondaryBorderPrimary' | 'tertiaryBorderPrimary' | 'surfaceBorderPrimary' | 'surfaceBorderSecondary' | 'surfaceBorderTertiary' | 'errorBorderPrimary' | 'errorBorderPrimaryHover' | 'successBorderPrimary' | 'surfaceBorderQuaternary';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type iconFillSizePropsType = '14' | '16' | '24' | '32' | '36' | '40' | '60' | '64' | '144';
|
|
1
|
+
export type iconFillSizePropsType = '10' | '14' | '16' | '24' | '32' | '36' | '40' | '60' | '64' | '144';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type iconSizePropsType = '14' | '16' | '20' | '24' | '32' | '40' | '60' | '64' | '144';
|
|
1
|
+
export type iconSizePropsType = '10' | '12' | '14' | '16' | '20' | '24' | '32' | '40' | '60' | '64' | '144';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type sizePXPropsType = '14' | '16' | '24' | '32' | '40' | '48' | '56' | '60' | '64' | '72' | '80' | '96' | '112' | '144' | '240';
|
|
1
|
+
export type sizePXPropsType = '14' | '16' | '20' | '24' | '32' | '40' | '48' | '56' | '60' | '64' | '72' | '80' | '96' | '112' | '144' | '240';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/ui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.11",
|
|
4
4
|
"description": "UI components (Modal, Loader, Popup, etc)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Modal",
|
|
@@ -133,6 +133,7 @@
|
|
|
133
133
|
"@semantic-release/changelog": "^6.0.3",
|
|
134
134
|
"@semantic-release/git": "^10.0.1",
|
|
135
135
|
"@semantic-release/release-notes-generator": "^13.0.0",
|
|
136
|
+
"@types/js-cookie": "^3.0.6",
|
|
136
137
|
"@types/lodash": "^4.17.4",
|
|
137
138
|
"@types/react": "^18",
|
|
138
139
|
"@types/react-datepicker": "^6.2.0",
|