@omniumretail/component-library 1.2.70 → 1.2.72

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 (249) hide show
  1. package/dist/component-library.umd.js +1154 -0
  2. package/dist/{types/components → components}/AnalyticsBar/helpers/codeMutation.d.ts +2 -2
  3. package/dist/{types/components → components}/AnalyticsBar/index.d.ts +2 -1
  4. package/dist/{types/components → components}/Button/index.d.ts +2 -1
  5. package/dist/{types/components → components}/Category/index.d.ts +2 -1
  6. package/dist/{types/components → components}/CategoryReadOnly/index.d.ts +2 -1
  7. package/dist/{types/components → components}/CategoryResponse/index.d.ts +3 -2
  8. package/dist/{types/components → components}/DatePicker/index.d.ts +2 -1
  9. package/dist/{types/components → components}/DatePickerTag/index.d.ts +2 -1
  10. package/dist/{types/components → components}/DropdownButton/index.d.ts +3 -2
  11. package/dist/{types/components → components}/Footer2/index.d.ts +2 -1
  12. package/dist/{types/components → components}/Header/Header.data.d.ts +2 -1
  13. package/dist/{types/components → components}/Header/Header.types.d.ts +2 -1
  14. package/dist/{types/components → components}/Header/index.d.ts +2 -1
  15. package/dist/{types/components → components}/Input/index.d.ts +2 -1
  16. package/dist/{types/components → components}/InputCountryCode/index.d.ts +2 -1
  17. package/dist/{types/components → components}/Link/index.d.ts +2 -1
  18. package/dist/{types/components → components}/Menu/helpers/codeMutation.d.ts +2 -2
  19. package/dist/{types/components → components}/Menu/index.d.ts +2 -1
  20. package/dist/{types/components → components}/MobileTable/index.d.ts +2 -1
  21. package/dist/{types/components → components}/ModalWithTable/index.d.ts +2 -1
  22. package/dist/{types/components → components}/Notification/index.d.ts +2 -1
  23. package/dist/{types/components → components}/Radio/index.d.ts +3 -2
  24. package/dist/{types/components → components}/ResponsiveTable/index.d.ts +2 -1
  25. package/dist/{types/components → components}/Select/index.d.ts +2 -1
  26. package/dist/{types/components → components}/Switch/index.d.ts +2 -1
  27. package/dist/{types/components → components}/Table/index.d.ts +2 -1
  28. package/dist/{types/components → components}/Tag/index.d.ts +3 -2
  29. package/dist/{types/components → components}/Upload/index.d.ts +3 -2
  30. package/dist/{types/components → components}/WebCam/index.d.ts +2 -1
  31. package/{src/locales/en.json → dist/locales/en.json.d.ts} +4 -2
  32. package/{src/locales/es.json → dist/locales/es.json.d.ts} +4 -2
  33. package/{src/locales/pt.json → dist/locales/pt.json.d.ts} +4 -1
  34. package/package.json +98 -183
  35. package/NPMPUBLISH.md +0 -29
  36. package/bitbucket-pipelines.yml +0 -95
  37. package/dist/780.bundle.js +0 -1
  38. package/dist/838.bundle.js +0 -2
  39. package/dist/838.bundle.js.LICENSE.txt +0 -1
  40. package/dist/bundle.js +0 -2
  41. package/dist/bundle.js.LICENSE.txt +0 -451
  42. package/dist/main.css +0 -36
  43. package/dist/types/components/AnalyticsBar/AnalyticsBar.stories.d.ts +0 -4
  44. package/dist/types/components/BellNotifications/BellNotifications.stories.d.ts +0 -4
  45. package/dist/types/components/Button/Button.stories.d.ts +0 -5
  46. package/dist/types/components/Category/Category.stories.d.ts +0 -3
  47. package/dist/types/components/CategoryReadOnly/CategoryReadOnly.stories.d.ts +0 -3
  48. package/dist/types/components/CategoryResponse/CategoryResponse.stories.d.ts +0 -3
  49. package/dist/types/components/DatePicker/DatePicker.stories.d.ts +0 -4
  50. package/dist/types/components/DatePickerTag/DatePickerTag.stories.d.ts +0 -4
  51. package/dist/types/components/DropdownButton/DropdownButton.stories.d.ts +0 -4
  52. package/dist/types/components/ExportTableData/ExportTableData.stories.d.ts +0 -3
  53. package/dist/types/components/Footer/Footer.stories.d.ts +0 -4
  54. package/dist/types/components/Footer2/Footer.stories.d.ts +0 -5
  55. package/dist/types/components/Header/Header.stories.d.ts +0 -4
  56. package/dist/types/components/Input/Input.stories.d.ts +0 -4
  57. package/dist/types/components/InputCountryCode/inputCountryCode.stories.d.ts +0 -4
  58. package/dist/types/components/Label/Label.stories.d.ts +0 -5
  59. package/dist/types/components/Link/Link.stories.d.ts +0 -6
  60. package/dist/types/components/Menu/Menu.stories.d.ts +0 -4
  61. package/dist/types/components/MobileTable/MobileTable.stories.d.ts +0 -4
  62. package/dist/types/components/ModalConfirmation/ModalConfirmation.stories.d.ts +0 -4
  63. package/dist/types/components/ModalWithTable/ModalWithTable.stories.d.ts +0 -4
  64. package/dist/types/components/Navigation/Navigation.stories.d.ts +0 -4
  65. package/dist/types/components/Notification/Notification.stories.d.ts +0 -4
  66. package/dist/types/components/Questions/Questions.stories.d.ts +0 -3
  67. package/dist/types/components/Radio/Radio.stories.d.ts +0 -4
  68. package/dist/types/components/ResponseType/ResponseType.stories.d.ts +0 -3
  69. package/dist/types/components/ResponsiveTable/ResponsiveTable.stories.d.ts +0 -8
  70. package/dist/types/components/Select/Select.stories.d.ts +0 -5
  71. package/dist/types/components/Separator/Separator.stories.d.ts +0 -5
  72. package/dist/types/components/Sidebar/Sidebar.stories.d.ts +0 -5
  73. package/dist/types/components/Switch/Switch.stories.d.ts +0 -4
  74. package/dist/types/components/Table/Table.stories.d.ts +0 -8
  75. package/dist/types/components/Tag/Tag.stories.d.ts +0 -4
  76. package/dist/types/components/Upload/Upload.stories.d.ts +0 -3
  77. package/dist/types/components/UserInfo/UserInfo.stories.d.ts +0 -3
  78. package/dist/types/components/WebCam/WebCam.stories.d.ts +0 -3
  79. package/src/assets/code-brackets.svg +0 -1
  80. package/src/assets/colors.svg +0 -1
  81. package/src/assets/comments.svg +0 -1
  82. package/src/assets/direction.svg +0 -1
  83. package/src/assets/flow.svg +0 -1
  84. package/src/assets/fonts/Silka-Bold.woff2 +0 -0
  85. package/src/assets/fonts/Silka-Regular.woff2 +0 -0
  86. package/src/assets/images/A2AI-logo.png +0 -0
  87. package/src/assets/images/omnium-retail-logo-white.png +0 -0
  88. package/src/assets/images/omnium-retail-logo.png +0 -0
  89. package/src/assets/images/omnium-retail_icon.png +0 -0
  90. package/src/assets/plugin.svg +0 -1
  91. package/src/assets/repo.svg +0 -1
  92. package/src/assets/scss/_combinations.scss +0 -0
  93. package/src/assets/scss/_global.scss +0 -89
  94. package/src/assets/scss/index.scss +0 -2
  95. package/src/assets/stackalt.svg +0 -1
  96. package/src/components/AnalyticsBar/AnalyticsBar.stories.tsx +0 -236
  97. package/src/components/AnalyticsBar/helpers/codeMutation.tsx +0 -19
  98. package/src/components/AnalyticsBar/index.tsx +0 -76
  99. package/src/components/AnalyticsBar/interfaces/analyticsBar.tsx +0 -13
  100. package/src/components/AnalyticsBar/styles.module.scss +0 -137
  101. package/src/components/BellNotifications/BellNotifications.stories.tsx +0 -200
  102. package/src/components/BellNotifications/index.tsx +0 -154
  103. package/src/components/BellNotifications/styles.module.scss +0 -239
  104. package/src/components/Button/Button.stories.tsx +0 -26
  105. package/src/components/Button/index.tsx +0 -24
  106. package/src/components/Button/styles.module.scss +0 -70
  107. package/src/components/Category/Category.stories.tsx +0 -371
  108. package/src/components/Category/CategoryContent/index.tsx +0 -255
  109. package/src/components/Category/CategoryContent/styles.module.scss +0 -69
  110. package/src/components/Category/CategorySidebar/index.tsx +0 -344
  111. package/src/components/Category/CategorySidebar/styles.module.scss +0 -28
  112. package/src/components/Category/index.tsx +0 -58
  113. package/src/components/Category/styles.module.scss +0 -13
  114. package/src/components/CategoryReadOnly/CategoryReadOnly.stories.tsx +0 -274
  115. package/src/components/CategoryReadOnly/evaluationOptions.tsx +0 -81
  116. package/src/components/CategoryReadOnly/index.tsx +0 -328
  117. package/src/components/CategoryReadOnly/styles.module.scss +0 -214
  118. package/src/components/CategoryResponse/CategoryResponse.stories.tsx +0 -312
  119. package/src/components/CategoryResponse/evaluationOptions.tsx +0 -81
  120. package/src/components/CategoryResponse/index.tsx +0 -502
  121. package/src/components/CategoryResponse/styles.module.scss +0 -365
  122. package/src/components/DatePicker/DatePicker.stories.tsx +0 -16
  123. package/src/components/DatePicker/index.tsx +0 -38
  124. package/src/components/DatePicker/styles.module.scss +0 -3
  125. package/src/components/DatePickerTag/DatePickerTag.stories.tsx +0 -19
  126. package/src/components/DatePickerTag/index.tsx +0 -91
  127. package/src/components/DatePickerTag/styles.module.scss +0 -32
  128. package/src/components/DropdownButton/DropdownButton.stories.tsx +0 -24
  129. package/src/components/DropdownButton/index.tsx +0 -36
  130. package/src/components/DropdownButton/styles.module.scss +0 -9
  131. package/src/components/ExportTableData/ExportTableData.stories.tsx +0 -43
  132. package/src/components/ExportTableData/index.tsx +0 -37
  133. package/src/components/ExportTableData/styles.module.scss +0 -4
  134. package/src/components/Footer/Footer.stories.tsx +0 -15
  135. package/src/components/Footer/index.tsx +0 -45
  136. package/src/components/Footer/styles.module.scss +0 -38
  137. package/src/components/Footer2/Footer.stories.tsx +0 -184
  138. package/src/components/Footer2/index.tsx +0 -322
  139. package/src/components/Footer2/styles.module.scss +0 -292
  140. package/src/components/Header/Header.data.ts +0 -26
  141. package/src/components/Header/Header.stories.tsx +0 -236
  142. package/src/components/Header/Header.types.ts +0 -32
  143. package/src/components/Header/README.md +0 -38
  144. package/src/components/Header/index.tsx +0 -200
  145. package/src/components/Header/styles.module.scss +0 -216
  146. package/src/components/Input/Input.stories.tsx +0 -13
  147. package/src/components/Input/index.tsx +0 -31
  148. package/src/components/Input/styles.module.scss +0 -8
  149. package/src/components/InputCountryCode/index.tsx +0 -79
  150. package/src/components/InputCountryCode/inputCountryCode.stories.tsx +0 -55
  151. package/src/components/InputCountryCode/styles.module.scss +0 -3
  152. package/src/components/Label/Label.stories.tsx +0 -21
  153. package/src/components/Label/index.tsx +0 -19
  154. package/src/components/Label/styles.module.scss +0 -17
  155. package/src/components/Link/Link.stories.tsx +0 -30
  156. package/src/components/Link/index.tsx +0 -21
  157. package/src/components/Link/styles.module.scss +0 -24
  158. package/src/components/Menu/Menu.stories.tsx +0 -178
  159. package/src/components/Menu/helpers/codeMutation.tsx +0 -19
  160. package/src/components/Menu/index.tsx +0 -24
  161. package/src/components/Menu/styles.module.scss +0 -0
  162. package/src/components/MobileTable/MobileTable.stories.tsx +0 -27
  163. package/src/components/MobileTable/index.tsx +0 -102
  164. package/src/components/MobileTable/styles.module.scss +0 -75
  165. package/src/components/ModalConfirmation/ModalConfirmation.stories.tsx +0 -40
  166. package/src/components/ModalConfirmation/ModalStatusList.tsx +0 -5
  167. package/src/components/ModalConfirmation/index.tsx +0 -71
  168. package/src/components/ModalConfirmation/styles.module.scss +0 -62
  169. package/src/components/ModalWithTable/ModalWithTable.stories.tsx +0 -99
  170. package/src/components/ModalWithTable/index.tsx +0 -238
  171. package/src/components/ModalWithTable/styles.module.scss +0 -77
  172. package/src/components/Navigation/Navigation.stories.tsx +0 -21
  173. package/src/components/Navigation/index.tsx +0 -91
  174. package/src/components/Navigation/styles.module.scss +0 -91
  175. package/src/components/Notification/Notification.stories.tsx +0 -32
  176. package/src/components/Notification/index.tsx +0 -28
  177. package/src/components/Questions/Questions.stories.tsx +0 -37
  178. package/src/components/Questions/SingleQuestion/index.tsx +0 -337
  179. package/src/components/Questions/SingleQuestion/styles.module.scss +0 -142
  180. package/src/components/Questions/index.tsx +0 -124
  181. package/src/components/Questions/styles.modules.scss +0 -0
  182. package/src/components/Radio/Radio.stories.tsx +0 -43
  183. package/src/components/Radio/index.tsx +0 -26
  184. package/src/components/Radio/styles.module.scss +0 -24
  185. package/src/components/ResponseType/ResponseType.stories.tsx +0 -393
  186. package/src/components/ResponseType/index.tsx +0 -100
  187. package/src/components/ResponseType/styles.module.scss +0 -31
  188. package/src/components/ResponsiveTable/ResponsiveTable.stories.tsx +0 -386
  189. package/src/components/ResponsiveTable/index.tsx +0 -389
  190. package/src/components/ResponsiveTable/styles.module.scss +0 -153
  191. package/src/components/Select/Select.stories.tsx +0 -39
  192. package/src/components/Select/index.tsx +0 -27
  193. package/src/components/Select/styles.module.scss +0 -19
  194. package/src/components/Separator/Separator.stories.tsx +0 -22
  195. package/src/components/Separator/index.tsx +0 -27
  196. package/src/components/Separator/styles.module.scss +0 -25
  197. package/src/components/Sidebar/Sidebar.stories.tsx +0 -85
  198. package/src/components/Sidebar/index.tsx +0 -127
  199. package/src/components/Sidebar/styles.module.scss +0 -141
  200. package/src/components/Switch/Switch.stories.tsx +0 -14
  201. package/src/components/Switch/index.tsx +0 -18
  202. package/src/components/Switch/styles.module.scss +0 -7
  203. package/src/components/Table/Table.stories.tsx +0 -337
  204. package/src/components/Table/index.tsx +0 -313
  205. package/src/components/Table/styles.module.scss +0 -97
  206. package/src/components/Tag/Tag.stories.tsx +0 -32
  207. package/src/components/Tag/index.tsx +0 -295
  208. package/src/components/Tag/styles.module.scss +0 -104
  209. package/src/components/Upload/Upload.stories.tsx +0 -45
  210. package/src/components/Upload/index.tsx +0 -112
  211. package/src/components/Upload/styles.module.scss +0 -29
  212. package/src/components/UserInfo/UserInfo.stories.tsx +0 -38
  213. package/src/components/UserInfo/index.tsx +0 -77
  214. package/src/components/UserInfo/styles.module.scss +0 -35
  215. package/src/components/WebCam/WebCam.stories.tsx +0 -24
  216. package/src/components/WebCam/index.tsx +0 -73
  217. package/src/components/WebCam/styles.module.scss +0 -37
  218. package/src/components/index.tsx +0 -34
  219. package/src/constants/i18n.ts +0 -25
  220. package/src/constants/logoCompanyHelper.ts +0 -52
  221. package/src/constants/translationHelper.ts +0 -7
  222. package/src/index.ts +0 -3
  223. package/src/types/Global.d.ts +0 -4
  224. package/tsconfig.json +0 -29
  225. package/webpack.config.js +0 -51
  226. /package/dist/{types/components → components}/AnalyticsBar/interfaces/analyticsBar.d.ts +0 -0
  227. /package/dist/{types/components → components}/BellNotifications/index.d.ts +0 -0
  228. /package/dist/{types/components → components}/Category/CategoryContent/index.d.ts +0 -0
  229. /package/dist/{types/components → components}/Category/CategorySidebar/index.d.ts +0 -0
  230. /package/dist/{types/components → components}/CategoryReadOnly/evaluationOptions.d.ts +0 -0
  231. /package/dist/{types/components → components}/CategoryResponse/evaluationOptions.d.ts +0 -0
  232. /package/dist/{types/components → components}/ExportTableData/index.d.ts +0 -0
  233. /package/dist/{types/components → components}/Footer/index.d.ts +0 -0
  234. /package/dist/{types/components → components}/Label/index.d.ts +0 -0
  235. /package/dist/{types/components → components}/ModalConfirmation/ModalStatusList.d.ts +0 -0
  236. /package/dist/{types/components → components}/ModalConfirmation/index.d.ts +0 -0
  237. /package/dist/{types/components → components}/Navigation/index.d.ts +0 -0
  238. /package/dist/{types/components → components}/Questions/SingleQuestion/index.d.ts +0 -0
  239. /package/dist/{types/components → components}/Questions/index.d.ts +0 -0
  240. /package/dist/{types/components → components}/ResponseType/index.d.ts +0 -0
  241. /package/dist/{types/components → components}/Separator/index.d.ts +0 -0
  242. /package/dist/{types/components → components}/Sidebar/index.d.ts +0 -0
  243. /package/dist/{types/components → components}/UserInfo/index.d.ts +0 -0
  244. /package/dist/{types/components → components}/index.d.ts +0 -0
  245. /package/dist/{types/constants → constants}/i18n.d.ts +0 -0
  246. /package/dist/{types/constants → constants}/logoCompanyHelper.d.ts +0 -0
  247. /package/dist/{types/constants → constants}/translationHelper.d.ts +0 -0
  248. /package/dist/{types/index.d.ts → index.d.ts} +0 -0
  249. /package/{public → dist}/index.ts +0 -0
@@ -1,154 +0,0 @@
1
- import { useEffect, useState } from 'react';
2
- import { Badge, Dropdown, Menu } from 'antd';
3
- import { BellOutlined, CheckCircleOutlined, ExclamationCircleOutlined, MoreOutlined } from '@ant-design/icons';
4
- import styles from './styles.module.scss';
5
- import { useTranslation } from 'react-i18next';
6
- import { Switch } from '../Switch';
7
-
8
- export interface Criticality {
9
- Id: string;
10
- Name: string;
11
- ColorHex: string;
12
- }
13
-
14
- export interface BellNotification {
15
- Id: string;
16
- Title: string;
17
- Description: string;
18
- RedirectURL: string;
19
- Icon: string;
20
- ExpirationDate: number;
21
- Criticality: Criticality;
22
- IsRead: boolean;
23
- }
24
-
25
- export interface BellNotificationsProps {
26
- notifications: BellNotification[];
27
- onFilterChange: (filter: 'all' | 'unread') => void;
28
- onNotificationClick: (id: string, url: string) => void;
29
- handleMarkAllAsRead: () => void;
30
- }
31
-
32
- export const BellNotifications = ({ notifications, onFilterChange, onNotificationClick, handleMarkAllAsRead }: BellNotificationsProps) => {
33
- const { t } = useTranslation();
34
- const [filter, setFilter] = useState<'all' | 'unread'>('all');
35
- const [isShaking, setIsShaking] = useState(false);
36
- const [isMobile, setIsMobile] = useState(window.innerWidth < 768);
37
-
38
- useEffect(() => {
39
- const handleResize = () => {
40
- setIsMobile(window.innerWidth < 768);
41
- };
42
-
43
- window.addEventListener('resize', handleResize);
44
- return () => {
45
- window.removeEventListener('resize', handleResize);
46
- };
47
- }, []);
48
-
49
- const unreadCount = notifications.filter((notif) => !notif.IsRead).length;
50
-
51
- const handleNotificationClick = (id: string, url: string) => {
52
- onNotificationClick(id, url);
53
- }
54
-
55
- const handleFilterChange = (checked: boolean) => {
56
- const newFilter = checked ? 'unread' : 'all';
57
- setFilter(newFilter);
58
- onFilterChange(newFilter);
59
- };
60
-
61
- useEffect(() => {
62
- if (unreadCount > 0) {
63
- const interval = setInterval(() => {
64
- setIsShaking(true);
65
-
66
- const stopShakeTimeout = setTimeout(() => setIsShaking(false), 2000);
67
-
68
- return () => clearTimeout(stopShakeTimeout);
69
- }, 30000);
70
-
71
- return () => clearInterval(interval);
72
- }
73
- }, [unreadCount]);
74
-
75
- const optionsMenu = (
76
- <Menu>
77
- <Menu.Item key="markAllAsRead" onClick={handleMarkAllAsRead}>
78
- <CheckCircleOutlined className={styles.checkIconStyle} />
79
-
80
- {t('components.bellNotifications.markAllAsRead')}
81
- </Menu.Item>
82
- </Menu>
83
- );
84
-
85
- const menu = (
86
- <Menu className={styles.notificationMenu}>
87
-
88
- {unreadCount > 0 && (
89
- <div className={styles.headerContainer}>
90
- <div className={styles.switchContainer}>
91
- <span>{t('components.bellNotifications.onlyShowNoRead')}</span>
92
-
93
- <Switch
94
- checked={filter === 'unread'}
95
- onChange={handleFilterChange}
96
- size="small"
97
- />
98
- </div>
99
-
100
- <Dropdown overlayClassName={styles.optionsMenuStyle} overlay={optionsMenu} trigger={['click']}>
101
- <MoreOutlined className={styles.moreOutlinedIconStyle} />
102
- </Dropdown>
103
- </div>
104
- )}
105
-
106
- <div className={styles.menuItemContainer}>
107
- {notifications.map((notif) => (
108
- <Menu.Item
109
- key={notif.Id}
110
- className={styles.notificationItem}
111
- onClick={() => handleNotificationClick(notif.Id, notif.RedirectURL)}
112
- >
113
- <div className={styles.notificationContent}>
114
- {notif.Criticality?.Name === 'High' && (
115
- <ExclamationCircleOutlined
116
- className={styles.criticalityIcon}
117
- style={{ color: notif.Criticality?.ColorHex }}
118
- />
119
- )}
120
-
121
- <img src={notif.Icon} alt="Notification Icon" className={styles.notificationIcon} />
122
-
123
- <div className={styles.notificationText}>
124
- <div
125
- className={styles.notificationTitle}
126
- >
127
- {notif.Title}
128
- </div>
129
-
130
- <div className={styles.notificationDescription}>
131
- {notif.Description}
132
- </div>
133
- </div>
134
-
135
- {!notif.IsRead && <div className={styles.unreadIndicator}></div>}
136
- </div>
137
- </Menu.Item>
138
- ))}
139
- </div>
140
-
141
- {notifications.length === 0 && <Menu.Item disabled>{t('components.bellNotifications.noNotifications')}</Menu.Item>}
142
- </Menu>
143
- );
144
-
145
- return (
146
- <Dropdown placement={isMobile ? undefined : 'topRight'} overlayClassName={styles.dropdownContainer} overlay={menu} trigger={['click']}>
147
- <Badge count={unreadCount} className={styles.badgeStyle} overflowCount={99}>
148
- <BellOutlined className={`${styles.bellIcon} ${isShaking ? styles.shake : ''}`} />
149
- </Badge>
150
- </Dropdown>
151
- );
152
- };
153
-
154
- export default BellNotifications;
@@ -1,239 +0,0 @@
1
- .dropdownContainer {
2
- position: fixed;
3
-
4
- @media (max-width: 768px) {
5
- position: absolute;
6
- top: 0 !important;
7
- left: 0 !important;
8
- right: 0 !important;
9
- width: 100% !important;
10
- }
11
- }
12
-
13
- .notificationMenu {
14
- max-height: calc(100vh - 70px);
15
- padding: 0 !important;
16
- border-radius: 8px;
17
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
18
-
19
- @media (max-width: 768px) {
20
- max-width: 100vw;
21
- border-radius: 0;
22
- }
23
-
24
- @media (min-width: 768px) {
25
- max-width: 500px;
26
- max-height: calc(100vh - 100px);
27
- transform: translate(25%);
28
- margin-block-end: 20px;
29
- margin-bottom: 20px !important;
30
- }
31
- }
32
-
33
- .optionsMenuStyle {
34
- @media (max-width: 768px) {
35
- position: absolute;
36
- }
37
- }
38
-
39
- .menuItemContainer {
40
- overflow-y: auto;
41
- max-height: calc(100vh - 200px);
42
-
43
- @media (max-width: 768px) {
44
- max-height: calc(100vh - 120px);
45
- }
46
- }
47
-
48
- .notificationItem {
49
- display: flex;
50
- flex-direction: column;
51
- align-items: unset !important;
52
- padding: 10px;
53
- border-bottom: 1px solid #f0f0f0;
54
- background-color: #fff !important;
55
- cursor: pointer;
56
-
57
- &:hover {
58
- background-color: #f9f9f9;
59
- }
60
-
61
- @media (max-width: 768px) {
62
- padding: 8px;
63
- }
64
- }
65
-
66
- .headerContainer {
67
- display: flex;
68
- justify-content: space-between;
69
- align-items: center;
70
- padding: 10px 16px;
71
- background-color: #f5f5f5;
72
- border-bottom: 1px solid #e8e8e8;
73
- }
74
-
75
- .moreOutlinedIconStyle {
76
- font-size: 20px;
77
- cursor: pointer;
78
- color: #595959;
79
- padding: 4px;
80
- border-radius: 4px;
81
-
82
- &:hover {
83
- background-color: #e8e8e8;
84
- }
85
- }
86
-
87
- .checkIconStyle {
88
- color: #FF674C;
89
- margin-right: 8px;
90
- }
91
-
92
- .switchContainer {
93
- display: flex;
94
- align-items: center;
95
- gap: 10px;
96
-
97
- span {
98
- font-size: 14px;
99
- font-weight: 500;
100
- color: #595959;
101
- }
102
- }
103
-
104
- .notificationContent {
105
- display: flex;
106
- align-items: center;
107
- position: relative;
108
- padding-left: 12px;
109
- width: 100%;
110
-
111
- @media (max-width: 768px) {
112
- padding-left: 8px;
113
- }
114
- }
115
-
116
- .criticalityIcon {
117
- position: absolute;
118
- left: 0;
119
- top: 50%;
120
- transform: translateY(-50%);
121
- font-size: 16px;
122
-
123
- @media (max-width: 768px) {
124
- font-size: 12px;
125
- }
126
- }
127
-
128
- .notificationIcon {
129
- width: 50px;
130
- height: 50px;
131
- margin-left: 10px;
132
- margin-right: 10px;
133
- flex-shrink: 0;
134
-
135
- @media (max-width: 768px) {
136
- width: 40px;
137
- height: 40px;
138
- margin-left: 8px;
139
- margin-right: 8px;
140
- }
141
- }
142
-
143
- .notificationText {
144
- flex: 1;
145
- overflow: hidden;
146
- min-width: 0;
147
- }
148
-
149
- .notificationTitle {
150
- font-weight: bold;
151
- font-size: 14px;
152
- overflow: hidden;
153
- text-overflow: ellipsis;
154
- white-space: nowrap;
155
- display: block;
156
- max-width: 100%;
157
-
158
- @media (max-width: 768px) {
159
- font-size: 12px;
160
- }
161
- }
162
-
163
- .notificationDescription {
164
- overflow: hidden;
165
- text-overflow: ellipsis;
166
- white-space: nowrap;
167
- display: block;
168
- max-width: 100%;
169
- font-size: 12px;
170
- color: #666;
171
- margin-top: 2px;
172
-
173
- @media (max-width: 768px) {
174
- font-size: 10px;
175
- }
176
- }
177
-
178
- .unreadIndicator {
179
- width: 6px;
180
- height: 6px;
181
- background-color: #1890ff;
182
- border-radius: 50%;
183
- margin-left: 10px;
184
- flex-shrink: 0;
185
-
186
- @media (max-width: 768px) {
187
- width: 4px;
188
- height: 4px;
189
- margin-left: 8px;
190
- }
191
- }
192
-
193
- .badgeStyle {
194
- :global {
195
- .ant-badge-count {
196
- font-size: 12px !important;
197
- min-width: 16px !important;
198
- height: 16px !important;
199
- line-height: 16px !important;
200
- transform: translate(40%, -50%) !important;
201
- }
202
- }
203
- }
204
-
205
- .bellIcon {
206
- font-size: 26px;
207
- cursor: pointer;
208
- color: #0033a0;
209
-
210
- @media (min-width: 767px) {
211
- color: var(--color-grey-light);
212
- }
213
- }
214
-
215
- .shake {
216
- animation: shake 1s ease-in-out infinite;
217
- }
218
-
219
- @keyframes shake {
220
- 0% {
221
- transform: rotate(0deg);
222
- }
223
-
224
- 25% {
225
- transform: rotate(10deg);
226
- }
227
-
228
- 50% {
229
- transform: rotate(-10deg);
230
- }
231
-
232
- 75% {
233
- transform: rotate(10deg);
234
- }
235
-
236
- 100% {
237
- transform: rotate(0deg);
238
- }
239
- }
@@ -1,26 +0,0 @@
1
- import { Meta, StoryFn } from "@storybook/react-webpack5";
2
- import { Button, CustomButtonProps } from '.';
3
-
4
- export default {
5
- title: 'Button',
6
- component: Button,
7
- } as Meta;
8
-
9
- const Template: StoryFn<CustomButtonProps> = (args: any) => <Button {...args}>ola</Button>;
10
-
11
- export const Primary = Template.bind({});
12
- Primary.args = {
13
- href: '#',
14
- iconAlignRight: true,
15
- type: 'link',
16
- customClass: 'ola'
17
- };
18
-
19
-
20
- export const Secondary = Template.bind({});
21
- Secondary.args = {
22
- href: '#',
23
- iconAlignRight: true,
24
- type: 'link',
25
- ghost: true
26
- };
@@ -1,24 +0,0 @@
1
- import { Button as AntButton, ButtonProps } from 'antd';
2
- import styles from './styles.module.scss';
3
- import classNames from 'classnames';
4
-
5
- export interface CustomButtonProps extends ButtonProps {
6
- iconAlignRight?: boolean;
7
- buttonStyle?: string;
8
- customClass?: string;
9
- }
10
-
11
- export const Button = ({customClass, ...props}: CustomButtonProps) => {
12
- const { iconAlignRight, buttonStyle } = props;
13
-
14
- const buttonClasses = {
15
- [styles.button]: true,
16
- [styles["button--iconPositionStyle"]]: iconAlignRight === true,
17
- [styles["button--style1"]]: buttonStyle === "style1",
18
- [`${customClass}`]: customClass,
19
- }
20
-
21
- return (
22
- <AntButton { ...props } className={ classNames(buttonClasses) } />
23
- );
24
- };
@@ -1,70 +0,0 @@
1
- .button {
2
- padding: 12px 24px;
3
- border-radius: 4px;
4
- min-width: 170px;
5
- display: inline-flex;
6
- align-items: center;
7
- justify-content: center;
8
- align-self: flex-start;
9
- text-decoration: none;
10
- border: none;
11
- font-size: 14px;
12
- line-height: 16.8px;
13
- font-weight: 700;
14
- font-family: 'Silka', sans-serif;
15
- background-color: var(--button-default-background);
16
- color: var(--button-default-text-color);
17
-
18
- @media(max-width: 767px) {
19
- min-width: 0px;
20
- }
21
-
22
- &:hover {
23
- background-color: var(--button-default-background-hover-color) !important;
24
- color: var(--button-default-text-hover-color) !important;
25
- }
26
-
27
- &:disabled,
28
- &.disabled {
29
- background-color: #C7CAC9 !important;
30
- color: var(--button-disabled-default-text-color) !important;
31
- pointer-events: none;
32
- }
33
-
34
- &--iconPositionStyle {
35
- flex-direction: row-reverse;
36
- gap: 5px;
37
- }
38
-
39
- &--style1 {
40
- background-color: var(--button-style-1-background);
41
- color: var(--button-style-1-text-color);
42
-
43
- &:hover {
44
- background-color: var(--button-style-1-background-hover-color);
45
- color: var(--button-style-1-text-hover-color) !important;
46
- }
47
-
48
- &:disabled,
49
- &.disabled {
50
- background-color: var(--button-disabled-background-color);
51
- color: var(--button-disabled-default-text-color);
52
- pointer-events: none;
53
- }
54
- }
55
- }
56
-
57
- :global {
58
-
59
- :where(.css-dev-only-do-not-override-m4timi).ant-btn-link:disabled,
60
- :where(.css-dev-only-do-not-override-m4timi).ant-btn-link.ant-btn-disabled {
61
- color: var(--button-disabled-default-text-color);
62
- background-color: #C7CAC9;
63
- }
64
-
65
- :where(.css-dev-only-do-not-override-m4timi).ant-btn-link:disabled,
66
- :where(.css-dev-only-do-not-override-m4timi).ant-btn-link.ant-btn-disabled {
67
- color: var(--button-disabled-default-text-color);
68
- background-color: #C7CAC9;
69
- }
70
- }