@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.
Files changed (208) hide show
  1. package/dist/{Accordion-CXvqu97t.js → Accordion-vh2p5Mzs.js} +2 -2
  2. package/dist/{Avatar-JAaLGdYj.js → Avatar-DhZxzLEY.js} +2 -2
  3. package/dist/{Badge-DPM6qrjA.js → Badge-D-4zpdfU.js} +1 -1
  4. package/dist/{Breadcrumbs-BZpYBM5A.js → Breadcrumbs-CciIq1Na.js} +2 -2
  5. package/dist/{Button-CyO_Wl49.js → Button-BXClqM-t.js} +3 -3
  6. package/dist/{Card-DKmhFMCS.js → Card-DPGgzPuD.js} +1 -1
  7. package/dist/{Cell-D3aJx_C0.js → Cell-BfV_aVxs.js} +3 -3
  8. package/dist/{Checkbox-BqTMHeES.js → Checkbox-C-H_Z4S_.js} +1 -1
  9. package/dist/{Chips-DhyDHpu7.js → Chips-BR_EPV82.js} +1 -1
  10. package/dist/{Choice-cgCRlPk0.js → Choice-BJd9Jx4D.js} +4 -4
  11. package/dist/{ContextMenuItem-DjDhhmjF.js → ContextMenuItem-CpZ3pjky.js} +3 -3
  12. package/dist/CookiesWarning-jN2hWm12.js +52 -0
  13. package/dist/{DatePicker-BFLpftbJ.js → DatePicker-Nm4Ut2tD.js} +12 -7
  14. package/dist/{Divider-D0TEKxHr.js → Divider-Dhj6sMWd.js} +3 -0
  15. package/dist/{DropdownItem-DOBsvnrL.js → DropdownItem-BaQXZu0w.js} +2 -2
  16. package/dist/{Icon-C1j6rkeI.js → Icon-Duj1nynQ.js} +1 -1
  17. package/dist/{InputPassword-Aff74Atr.js → InputPassword-CTbtTP_o.js} +1 -1
  18. package/dist/{Label-CD6o__-D.js → Label-D9cQMuy3.js} +2 -2
  19. package/dist/LanguageSelector-TZEgbNsG.js +14 -0
  20. package/dist/{Loader-BUgSIcId.js → Loader-YZrWGaNy.js} +1 -1
  21. package/dist/{Menu-89epjC8r.js → Menu-Kpe1GMns.js} +1 -1
  22. package/dist/{MenuItem-DvpftOnP.js → MenuItem-C5BPgTO7.js} +1 -1
  23. package/dist/ModalLoader-8l8YtIvz.js +163 -0
  24. package/dist/{NotificationList-D_NNtwS1.js → NotificationList-CJ-hNA9W.js} +1 -1
  25. package/dist/{Pagination-0sADvbwj.js → Pagination-LXBlrbZT.js} +3 -3
  26. package/dist/{Radio-DFeWsO4E.js → Radio-Ca2-2PPF.js} +1 -1
  27. package/dist/{Response-C5_yetym.js → Response-Nzg8ooT8.js} +2 -2
  28. package/dist/{SearchResult-C0kjGm-o.js → SearchResult-B6Jd1xZO.js} +3 -3
  29. package/dist/{Segmented-C56XBzTH.js → Segmented-pa7MGnor.js} +1 -1
  30. package/dist/{SiteMenuButton-Do8ZNCkl.js → SiteMenuButton-CcCAsJtr.js} +2 -2
  31. package/dist/{Swiper-BYPes9JY.js → Swiper-JdwU0uca.js} +13 -5
  32. package/dist/{SwitchField-W4_o97BR.js → SwitchField-B8JbD2Se.js} +4 -4
  33. package/dist/{TabGroup-DRiFyK3Z.js → TabGroup-DieipbE3.js} +3 -3
  34. package/dist/{Text-edtauAM6.js → Text-CxrzHFN1.js} +2 -2
  35. package/dist/{Tile-CQ5L7pja.js → Tile-rSmWn8mR.js} +2 -2
  36. package/dist/{Tooltip-jT5A43he.js → Tooltip-CcwyN7PD.js} +1 -1
  37. package/dist/cjs/{Accordion-Dx0BRqhi.js → Accordion-BPSF6By2.js} +2 -2
  38. package/dist/cjs/{Avatar-C2xK87qB.js → Avatar-qFiPDVgu.js} +2 -2
  39. package/dist/cjs/{Badge-BvJTwXqB.js → Badge-zYZKun4n.js} +1 -1
  40. package/dist/cjs/{Breadcrumbs-PHMiEJZH.js → Breadcrumbs-BIhuwcTG.js} +2 -2
  41. package/dist/cjs/{Button-D7ctQMni.js → Button-C4_FRFZe.js} +3 -3
  42. package/dist/cjs/{Card-C5uctOQL.js → Card--te6xVsm.js} +1 -1
  43. package/dist/cjs/{Cell-B2BMVPlV.js → Cell-zxHVzKan.js} +3 -3
  44. package/dist/cjs/{Checkbox-C1HH9ut8.js → Checkbox-B-1dwjii.js} +1 -1
  45. package/dist/cjs/{Chips-DkUdk6Zs.js → Chips-BcJttN22.js} +1 -1
  46. package/dist/cjs/{Choice-CJqMvK5I.js → Choice-CPPQ2o2L.js} +4 -4
  47. package/dist/cjs/{ContextMenuItem-DocbJZKp.js → ContextMenuItem-BME-EZ-y.js} +3 -3
  48. package/dist/cjs/CookiesWarning-CfEwpkS8.js +59 -0
  49. package/dist/cjs/{DatePicker-7Ugf6hQ1.js → DatePicker-BiCqQFyi.js} +12 -7
  50. package/dist/cjs/{Divider-doetVRw0.js → Divider-D92wY8Fn.js} +3 -0
  51. package/dist/cjs/{DropdownItem-BVxf7bPs.js → DropdownItem-bjpmcFH1.js} +2 -2
  52. package/dist/cjs/{Icon-D1v73UhR.js → Icon-DzJtiBBk.js} +1 -1
  53. package/dist/cjs/{InputPassword-saMz6m0X.js → InputPassword-DHgR_QTK.js} +1 -1
  54. package/dist/cjs/{Label-C2Whza8M.js → Label-BcwjtIk7.js} +2 -2
  55. package/dist/cjs/LanguageSelector-C3i2JJCM.js +20 -0
  56. package/dist/cjs/{Loader-CK9zQAPl.js → Loader-2vQxF_aO.js} +1 -1
  57. package/dist/cjs/{Menu-BNe1i3Z7.js → Menu-CDlB7QNf.js} +1 -1
  58. package/dist/cjs/{MenuItem-BRQoOa-K.js → MenuItem-4uVtNhb4.js} +1 -1
  59. package/dist/cjs/ModalLoader-A2KkSC3x.js +172 -0
  60. package/dist/cjs/{NotificationList-ydXfdUwy.js → NotificationList-BTvz_kvZ.js} +1 -1
  61. package/dist/cjs/{Pagination-D8EHefOz.js → Pagination-B0-KGWSv.js} +3 -3
  62. package/dist/cjs/{Radio-DRXdBBWU.js → Radio-Cvbuwkx3.js} +1 -1
  63. package/dist/cjs/{Response-De79pGs5.js → Response-XesiDp89.js} +2 -2
  64. package/dist/cjs/{SearchResult-DFG3pyeM.js → SearchResult-D147g0-n.js} +3 -3
  65. package/dist/cjs/{Segmented-D0ISlz9H.js → Segmented-BHblcvck.js} +1 -1
  66. package/dist/cjs/{SiteMenuButton-Ca46xAzk.js → SiteMenuButton-ChUD4CgP.js} +2 -2
  67. package/dist/cjs/{Swiper-oPcqfskQ.js → Swiper-DHjkfpbP.js} +13 -5
  68. package/dist/cjs/{SwitchField-xk1JORBl.js → SwitchField-CdpEiqFv.js} +4 -4
  69. package/dist/cjs/{TabGroup-DEEcVLO0.js → TabGroup-Vn5oELiY.js} +3 -3
  70. package/dist/cjs/{Text-CgYNdSwY.js → Text-C8vlKWNN.js} +2 -2
  71. package/dist/cjs/{Tile-gAqZGMv7.js → Tile-j8EfyWDg.js} +2 -2
  72. package/dist/cjs/{Tooltip-DasmzIDY.js → Tooltip-CnnungCh.js} +1 -1
  73. package/dist/cjs/components/Accordion.js +4 -4
  74. package/dist/cjs/components/Avatar.js +4 -4
  75. package/dist/cjs/components/Badge.js +2 -2
  76. package/dist/cjs/components/Breadcrumbs.js +4 -4
  77. package/dist/cjs/components/Button.js +5 -5
  78. package/dist/cjs/components/Card.js +2 -2
  79. package/dist/cjs/components/Cell.js +5 -5
  80. package/dist/cjs/components/Checkbox.js +2 -2
  81. package/dist/cjs/components/Chips.js +2 -2
  82. package/dist/cjs/components/Choice/Choice.interface.d.ts +5 -1
  83. package/dist/cjs/components/Choice.js +4 -4
  84. package/dist/cjs/components/ContextMenu.js +5 -5
  85. package/dist/cjs/components/CookiesWarning/CookiesWarning.d.ts +10 -0
  86. package/dist/cjs/components/CookiesWarning/CookiesWarning.interface.d.ts +16 -0
  87. package/dist/cjs/components/CookiesWarning/index.d.ts +2 -0
  88. package/dist/cjs/components/CookiesWarning.js +19 -156
  89. package/dist/cjs/components/DatePicker/DatePicker.d.ts +1 -1
  90. package/dist/cjs/components/DatePicker/DatePicker.interface.d.ts +55 -7
  91. package/dist/cjs/components/DatePicker.js +7 -7
  92. package/dist/cjs/components/Divider/Divider.d.ts +5 -0
  93. package/dist/cjs/components/Divider.js +1 -1
  94. package/dist/cjs/components/Dropdown.js +3 -3
  95. package/dist/cjs/components/FormField.js +7 -7
  96. package/dist/cjs/components/Icon.js +3 -3
  97. package/dist/cjs/components/InputPassword.js +4 -4
  98. package/dist/cjs/components/Label.js +3 -3
  99. package/dist/cjs/components/LanguageSelector/Label.interface.d.ts +20 -0
  100. package/dist/cjs/components/LanguageSelector/LanguageSelector.d.ts +3 -0
  101. package/dist/cjs/components/LanguageSelector/index.d.ts +1 -0
  102. package/dist/cjs/components/LanguageSelector.js +9 -95
  103. package/dist/cjs/components/Loader.js +2 -2
  104. package/dist/cjs/components/Menu.js +3 -3
  105. package/dist/cjs/components/MenuItem.js +2 -2
  106. package/dist/cjs/components/Modal/Modal.d.ts +4 -0
  107. package/dist/cjs/components/Modal/Modal.interface.d.ts +30 -0
  108. package/dist/cjs/components/Modal/ModalLoader.d.ts +3 -0
  109. package/dist/cjs/components/Modal/index.d.ts +3 -0
  110. package/dist/cjs/components/Modal.js +7 -7
  111. package/dist/cjs/components/Notification.js +2 -2
  112. package/dist/cjs/components/Pagination.js +6 -6
  113. package/dist/cjs/components/Panel.js +1 -1
  114. package/dist/cjs/components/Radio.js +2 -2
  115. package/dist/cjs/components/Response.js +6 -6
  116. package/dist/cjs/components/Search/Search.interface.d.ts +2 -2
  117. package/dist/cjs/components/Search.js +4 -4
  118. package/dist/cjs/components/Segmented.js +2 -2
  119. package/dist/cjs/components/Select.js +7 -5
  120. package/dist/cjs/components/SiteMenu.js +4 -4
  121. package/dist/cjs/components/Swiper.js +1 -1
  122. package/dist/cjs/components/Tab.js +4 -4
  123. package/dist/cjs/components/Text/Text.interface.d.ts +1 -0
  124. package/dist/cjs/components/Text.js +1 -1
  125. package/dist/cjs/components/Tile.js +3 -3
  126. package/dist/cjs/components/Tooltip.js +2 -2
  127. package/dist/cjs/components.js +57 -57
  128. package/dist/cjs/constants/componentProps/iconSize.js +1 -1
  129. package/dist/cjs/constants/componentProps/sizePX.js +1 -1
  130. package/dist/cjs/context/Notifications.js +103 -53
  131. package/dist/cjs/types/componentProps/borderColorHover.d.ts +1 -1
  132. package/dist/cjs/types/componentProps/iconFillSize.d.ts +1 -1
  133. package/dist/cjs/types/componentProps/iconSize.d.ts +1 -1
  134. package/dist/cjs/types/componentProps/sizePX.d.ts +1 -1
  135. package/dist/components/Accordion.js +4 -4
  136. package/dist/components/Avatar.js +4 -4
  137. package/dist/components/Badge.js +2 -2
  138. package/dist/components/Breadcrumbs.js +4 -4
  139. package/dist/components/Button.js +5 -5
  140. package/dist/components/Card.js +2 -2
  141. package/dist/components/Cell.js +5 -5
  142. package/dist/components/Checkbox.js +2 -2
  143. package/dist/components/Chips.js +2 -2
  144. package/dist/components/Choice/Choice.interface.d.ts +5 -1
  145. package/dist/components/Choice.js +4 -4
  146. package/dist/components/ContextMenu.js +5 -5
  147. package/dist/components/CookiesWarning/CookiesWarning.d.ts +10 -0
  148. package/dist/components/CookiesWarning/CookiesWarning.interface.d.ts +16 -0
  149. package/dist/components/CookiesWarning/index.d.ts +2 -0
  150. package/dist/components/CookiesWarning.js +18 -152
  151. package/dist/components/DatePicker/DatePicker.d.ts +1 -1
  152. package/dist/components/DatePicker/DatePicker.interface.d.ts +55 -7
  153. package/dist/components/DatePicker.js +7 -7
  154. package/dist/components/Divider/Divider.d.ts +5 -0
  155. package/dist/components/Divider.js +1 -1
  156. package/dist/components/Dropdown.js +3 -3
  157. package/dist/components/FormField.js +7 -7
  158. package/dist/components/Icon.js +3 -3
  159. package/dist/components/InputPassword.js +4 -4
  160. package/dist/components/Label.js +3 -3
  161. package/dist/components/LanguageSelector/Label.interface.d.ts +20 -0
  162. package/dist/components/LanguageSelector/LanguageSelector.d.ts +3 -0
  163. package/dist/components/LanguageSelector/index.d.ts +1 -0
  164. package/dist/components/LanguageSelector.js +8 -92
  165. package/dist/components/Loader.js +2 -2
  166. package/dist/components/Menu.js +3 -3
  167. package/dist/components/MenuItem.js +2 -2
  168. package/dist/components/Modal/Modal.d.ts +4 -0
  169. package/dist/components/Modal/Modal.interface.d.ts +30 -0
  170. package/dist/components/Modal/ModalLoader.d.ts +3 -0
  171. package/dist/components/Modal/index.d.ts +3 -0
  172. package/dist/components/Modal.js +7 -7
  173. package/dist/components/Notification.js +2 -2
  174. package/dist/components/Pagination.js +6 -6
  175. package/dist/components/Panel.js +1 -1
  176. package/dist/components/Radio.js +2 -2
  177. package/dist/components/Response.js +6 -6
  178. package/dist/components/Search/Search.interface.d.ts +2 -2
  179. package/dist/components/Search.js +4 -4
  180. package/dist/components/Segmented.js +2 -2
  181. package/dist/components/Select.js +7 -5
  182. package/dist/components/SiteMenu.js +4 -4
  183. package/dist/components/Swiper.js +1 -1
  184. package/dist/components/Tab.js +4 -4
  185. package/dist/components/Text/Text.interface.d.ts +1 -0
  186. package/dist/components/Text.js +1 -1
  187. package/dist/components/Tile.js +3 -3
  188. package/dist/components/Tooltip.js +2 -2
  189. package/dist/components.js +36 -36
  190. package/dist/constants/componentProps/iconSize.js +1 -1
  191. package/dist/constants/componentProps/sizePX.js +1 -1
  192. package/dist/context/Notifications.js +104 -54
  193. package/dist/css/components/Avatar/Avatar.css +3 -3
  194. package/dist/css/components/DatePicker/DatePicker.css +21 -0
  195. package/dist/css/components/Divider/Divider.css +3 -3
  196. package/dist/css/components/Icon/Icon.css +2 -2
  197. package/dist/css/components/Search/Search.css +1 -1
  198. package/dist/css/components/Search/css/search-input/search-input_size.css +1 -1
  199. package/dist/css/components/Select/Select.css +6 -5
  200. package/dist/css/components/Select/css/__menu/select__menu.css +1 -0
  201. package/dist/css/components/Swiper/Swiper.css +2 -2
  202. package/dist/types/componentProps/borderColorHover.d.ts +1 -1
  203. package/dist/types/componentProps/iconFillSize.d.ts +1 -1
  204. package/dist/types/componentProps/iconSize.d.ts +1 -1
  205. package/dist/types/componentProps/sizePX.d.ts +1 -1
  206. package/package.json +2 -1
  207. package/dist/ModalLoader-CushfGnC.js +0 -374
  208. 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 [notifications, setNotifications] = useState([]);
20
- const hideNotifications = useCallback(id => {
21
- setNotifications(prevState => {
22
- const currentNotification = prevState.find(notification => notification.id === id);
23
- if (currentNotification) {
24
- if (typeof currentNotification.onClose === 'function') {
25
- currentNotification.onClose();
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
- return prevState.filter(notification => notification.id !== id);
28
- }
29
- return prevState;
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
- let id = v4().split('-')[0];
34
- let title = '';
35
- let text = '';
36
- let status = STATUSES.warning;
37
- let closeByTime = 4500;
38
- let textColor = '';
39
- if (typeof notification === 'string') {
40
- text = notification;
41
- } else if (typeof notification === 'object') {
42
- id = notification.id ?? id;
43
- title = notification.title ?? title;
44
- text = notification.text ?? text;
45
- status = notification.status ?? status;
46
- closeByTime = notification.closeByTime ?? closeByTime;
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 id;
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: notifications
88
- }, props.children));
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;
@@ -91,7 +91,7 @@
91
91
  }
92
92
  .search-input {
93
93
  &_size {
94
- @each $size in compact, normal {
94
+ @each $size in compact, normal, s, l {
95
95
  &_$(size) {
96
96
  padding: var(--search-input-$(size)-padding);
97
97
  gap: var(--search-input-$(size)-gap);
@@ -1,6 +1,6 @@
1
1
  .search-input {
2
2
  &_size {
3
- @each $size in compact, normal {
3
+ @each $size in compact, normal, s, l {
4
4
  &_$(size) {
5
5
  padding: var(--search-input-$(size)-padding);
6
6
  gap: var(--search-input-$(size)-gap);
@@ -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;
@@ -34,6 +34,7 @@
34
34
  right: 8px;
35
35
  }
36
36
  & .divider {
37
+ height: 1px;
37
38
  position: absolute;
38
39
  left: 0;
39
40
  bottom: 0;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Swiper 11.1.3
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 13, 2024
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.10",
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",