@itcase/ui 1.2.12 → 1.2.14
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/{Group-Buo_BxGT.js → Group-9Mpk5tQD.js} +8 -4
- package/dist/{Group-BXfLh7AZ.js → Group-C9TsGwJy.js} +8 -4
- package/dist/cjs/components/CookiesWarning.js +1 -1
- package/dist/cjs/components/FormField.js +1 -1
- package/dist/cjs/components/Group.js +1 -1
- package/dist/cjs/components/Notification.js +1 -0
- package/dist/cjs/components/Panel.js +1 -1
- package/dist/cjs/components/Response.js +1 -1
- package/dist/cjs/components/Select.js +1 -1
- package/dist/cjs/context/Notifications.js +128 -144
- package/dist/cjs/context/UIContext.js +22 -31
- package/dist/cjs/hooks/styleAttributes.interface.js +2 -0
- package/dist/cjs/hooks/useDeviceTargetClass.js +1 -0
- package/dist/cjs/hooks/useStyles.js +1 -0
- package/dist/cjs/hooks.js +2 -0
- package/dist/components/CookiesWarning.js +1 -1
- package/dist/components/FormField.js +1 -1
- package/dist/components/Group.js +1 -1
- package/dist/components/Notification.js +1 -0
- package/dist/components/Panel.js +1 -1
- package/dist/components/Response.js +1 -1
- package/dist/components/Select.js +1 -1
- package/dist/context/Notifications.js +129 -145
- package/dist/context/UIContext.js +23 -32
- package/dist/css/components/DatePicker/DatePicker.css +26 -32
- package/dist/css/components/Group/Group.css +24 -0
- package/dist/css/styles/mediaqueries.css +1 -1
- package/dist/hooks/styleAttributes.interface.js +1 -0
- package/dist/hooks/useDeviceTargetClass.js +1 -0
- package/dist/hooks/useStyles.js +1 -0
- package/dist/hooks.js +1 -0
- package/dist/types/components/Page/index.d.ts +42 -0
- package/dist/types/constants/componentProps/align.d.ts +2 -0
- package/dist/types/constants/componentProps/alignDirection.d.ts +2 -0
- package/dist/types/constants/componentProps/fill.d.ts +2 -0
- package/dist/types/constants/componentProps/horizontalResizeMode.d.ts +2 -0
- package/dist/types/constants/componentProps/position.d.ts +2 -0
- package/dist/types/constants/componentProps/verticalResizeMode.d.ts +2 -0
- package/dist/types/context/Notifications.d.ts +14 -11
- package/dist/types/context/Notifications.interface.d.ts +25 -0
- package/dist/types/context/UIContext.d.ts +5 -4
- package/dist/types/context/index.d.ts +2 -0
- package/package.json +19 -18
- package/dist/cjs/components/Page.js +0 -416
- package/dist/components/Page.js +0 -414
|
@@ -1,165 +1,149 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
2
|
+
import { b as __spreadArray } from '../tslib.es6-5FtW-kfi.js';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
import { createContext, useState, useCallback, useMemo, useEffect, useContext } from 'react';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
4
6
|
import { v4 } from 'uuid';
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
var STATUSES = {
|
|
9
|
+
error: 'error',
|
|
10
|
+
info: 'info',
|
|
11
|
+
success: 'success',
|
|
12
|
+
warning: 'warning',
|
|
11
13
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
var NotificationsContext = createContext([]);
|
|
15
|
+
var NotificationsAPIContext = createContext({
|
|
16
|
+
hideNotifications: function (targetId) { },
|
|
17
|
+
notificationStatuses: STATUSES,
|
|
18
|
+
showNotification: function (notification, onClose) { },
|
|
17
19
|
});
|
|
18
20
|
function NotificationsProvider(props) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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) {
|
|
40
|
-
clearTimeout(notificationItem._closeTimeout);
|
|
41
|
-
notificationItem.onClose && notificationItem.onClose();
|
|
21
|
+
var children = props.children, _a = props.initialNotificationsList, initialNotificationsList = _a === void 0 ? [] : _a;
|
|
22
|
+
var _b = useState(function () {
|
|
23
|
+
// We need to set id to every notification item and original list also be have new id's
|
|
24
|
+
return (initialNotificationsList || []).map(function (notificationItem) {
|
|
25
|
+
return createNotification(notificationItem, notificationItem.onClose);
|
|
26
|
+
});
|
|
27
|
+
}), notificationsList = _b[0], setNotificationsList = _b[1];
|
|
28
|
+
var hideNotifications = useCallback(function (targetId) {
|
|
29
|
+
// If not target, then nothing to hide
|
|
30
|
+
if (!targetId) {
|
|
31
|
+
return;
|
|
42
32
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
33
|
+
setNotificationsList(function (prevNotificationsList) {
|
|
34
|
+
var newState = prevNotificationsList.filter(function (notificationItem) {
|
|
35
|
+
// Check on need to hide, if current notification is target for hide
|
|
36
|
+
var isNeedToHide = String(notificationItem.id) === String(targetId);
|
|
37
|
+
// Callback for close if exists
|
|
38
|
+
if (isNeedToHide) {
|
|
39
|
+
clearTimeout(notificationItem._closeTimeout);
|
|
40
|
+
// @typescript-eslint/no-unused-expressions
|
|
41
|
+
notificationItem.onClose && notificationItem.onClose();
|
|
42
|
+
}
|
|
43
|
+
// Save in state if no need to hide
|
|
44
|
+
return !isNeedToHide;
|
|
45
|
+
});
|
|
46
|
+
// Set new notifications list without target item to state
|
|
47
|
+
return newState;
|
|
48
|
+
});
|
|
49
|
+
}, []);
|
|
50
|
+
var showNotification = useCallback(function (notification, onClose) {
|
|
51
|
+
var newNotificationItem = createNotification(notification, onClose);
|
|
52
|
+
setNotificationsList(function (prevNotificationsList) {
|
|
53
|
+
var newState = prevNotificationsList.slice();
|
|
54
|
+
var existsNotificationIndex = newState.findIndex(function (notificationItem) { return String(notificationItem.id) === String(newNotificationItem.id); });
|
|
55
|
+
// Add new notification
|
|
56
|
+
if (existsNotificationIndex === -1) {
|
|
57
|
+
return __spreadArray(__spreadArray([], newState, true), [newNotificationItem], false);
|
|
58
|
+
}
|
|
59
|
+
// Or update exists notification
|
|
60
|
+
var updatedNotificationItem = newState[existsNotificationIndex];
|
|
61
|
+
// Clear timeout to avoid close event for updated notification
|
|
62
|
+
clearTimeout(updatedNotificationItem._closeTimeout);
|
|
63
|
+
updatedNotificationItem._closeTimeout = undefined;
|
|
64
|
+
// Replace exists notification by new one
|
|
65
|
+
newState[existsNotificationIndex] = newNotificationItem;
|
|
66
|
+
return newState;
|
|
67
|
+
});
|
|
68
|
+
if (newNotificationItem.closeByTime) {
|
|
69
|
+
newNotificationItem._closeTimeout = setTimeout(function () { return hideNotifications(newNotificationItem.id); }, newNotificationItem.closeByTime);
|
|
70
|
+
}
|
|
71
|
+
return newNotificationItem;
|
|
72
|
+
},
|
|
73
|
+
// "hideNotifications" is never changed
|
|
74
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75
|
+
[]);
|
|
76
|
+
var notificationsAPI = useMemo(function () { return ({
|
|
77
|
+
hideNotifications: hideNotifications,
|
|
78
|
+
notificationStatuses: STATUSES,
|
|
79
|
+
showNotification: showNotification,
|
|
80
|
+
}); },
|
|
81
|
+
// Functions is never changes, no sense to set as dependencies
|
|
84
82
|
// eslint-disable-next-line
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
83
|
+
[]);
|
|
84
|
+
useEffect(function () {
|
|
85
|
+
// Set timeout for initial notifications list one time on first render
|
|
86
|
+
notificationsList.forEach(function (notificationItem) {
|
|
87
|
+
if (notificationItem.closeByTime) {
|
|
88
|
+
setTimeout(function () { return hideNotifications(notificationItem.id); }, notificationItem.closeByTime);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
// eslint-disable-next-line
|
|
92
|
+
}, []);
|
|
93
|
+
return (jsx(NotificationsAPIContext.Provider, { value: notificationsAPI, children: jsx(NotificationsContext.Provider, { value: notificationsList, children: children }) }));
|
|
91
94
|
}
|
|
92
95
|
NotificationsProvider.propTypes = {
|
|
93
|
-
|
|
94
|
-
|
|
96
|
+
children: PropTypes.any,
|
|
97
|
+
initialNotificationsList: PropTypes.array,
|
|
95
98
|
};
|
|
96
99
|
function useNotifications() {
|
|
97
|
-
|
|
100
|
+
return useContext(NotificationsContext);
|
|
98
101
|
}
|
|
99
102
|
function useNotificationsAPI() {
|
|
100
|
-
|
|
103
|
+
return useContext(NotificationsAPIContext);
|
|
101
104
|
}
|
|
102
105
|
function createNotification(notification, onClose) {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
id = notification.id ?? id;
|
|
114
|
-
title = notification.title ?? title;
|
|
115
|
-
text = notification.text ?? text;
|
|
116
|
-
status = notification.status ?? status;
|
|
117
|
-
closeByTime = notification.closeByTime ?? closeByTime;
|
|
118
|
-
}
|
|
119
|
-
switch (status) {
|
|
120
|
-
case 'success':
|
|
121
|
-
textColor = 'successTextPrimary';
|
|
122
|
-
break;
|
|
123
|
-
case 'info':
|
|
124
|
-
textColor = 'infoTextPrimary';
|
|
125
|
-
break;
|
|
126
|
-
case 'error':
|
|
127
|
-
textColor = 'errorTextPrimary';
|
|
128
|
-
break;
|
|
129
|
-
case 'warning':
|
|
130
|
-
textColor = 'warningTextPrimary';
|
|
131
|
-
break;
|
|
132
|
-
}
|
|
133
|
-
return {
|
|
134
|
-
id: id,
|
|
135
|
-
title: title,
|
|
136
|
-
text: text,
|
|
137
|
-
status: status,
|
|
138
|
-
textColor: textColor,
|
|
139
|
-
closeByTime: closeByTime,
|
|
140
|
-
onClose: onClose
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
NotificationsProvider.__docgenInfo = {
|
|
144
|
-
"description": "",
|
|
145
|
-
"methods": [],
|
|
146
|
-
"displayName": "NotificationsProvider",
|
|
147
|
-
"props": {
|
|
148
|
-
"children": {
|
|
149
|
-
"description": "",
|
|
150
|
-
"type": {
|
|
151
|
-
"name": "any"
|
|
152
|
-
},
|
|
153
|
-
"required": false
|
|
154
|
-
},
|
|
155
|
-
"initialNotificationsList": {
|
|
156
|
-
"description": "",
|
|
157
|
-
"type": {
|
|
158
|
-
"name": "array"
|
|
159
|
-
},
|
|
160
|
-
"required": false
|
|
106
|
+
var _a, _b, _c, _d, _e;
|
|
107
|
+
// Default notification item properties
|
|
108
|
+
var id = v4().split('-')[0];
|
|
109
|
+
var title = '';
|
|
110
|
+
var text = '';
|
|
111
|
+
var status = STATUSES.warning;
|
|
112
|
+
var closeByTime = 4500;
|
|
113
|
+
var textColor = '';
|
|
114
|
+
if (typeof notification === 'string') {
|
|
115
|
+
text = notification;
|
|
161
116
|
}
|
|
162
|
-
|
|
163
|
-
|
|
117
|
+
else if (typeof notification === 'object') {
|
|
118
|
+
id = (_a = notification.id) !== null && _a !== void 0 ? _a : id;
|
|
119
|
+
title = (_b = notification.title) !== null && _b !== void 0 ? _b : title;
|
|
120
|
+
text = (_c = notification.text) !== null && _c !== void 0 ? _c : text;
|
|
121
|
+
status = (_d = notification.status) !== null && _d !== void 0 ? _d : status;
|
|
122
|
+
closeByTime = (_e = notification.closeByTime) !== null && _e !== void 0 ? _e : closeByTime;
|
|
123
|
+
}
|
|
124
|
+
switch (status) {
|
|
125
|
+
case 'success':
|
|
126
|
+
textColor = 'successTextPrimary';
|
|
127
|
+
break;
|
|
128
|
+
case 'info':
|
|
129
|
+
textColor = 'infoTextPrimary';
|
|
130
|
+
break;
|
|
131
|
+
case 'error':
|
|
132
|
+
textColor = 'errorTextPrimary';
|
|
133
|
+
break;
|
|
134
|
+
case 'warning':
|
|
135
|
+
textColor = 'warningTextPrimary';
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
return {
|
|
139
|
+
id: id,
|
|
140
|
+
closeByTime: closeByTime,
|
|
141
|
+
status: status,
|
|
142
|
+
text: text,
|
|
143
|
+
textColor: textColor,
|
|
144
|
+
title: title,
|
|
145
|
+
onClose: onClose,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
164
148
|
|
|
165
149
|
export { NotificationsProvider, useNotifications, useNotificationsAPI };
|
|
@@ -1,48 +1,39 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { createContext, memo, useState, useMemo, useContext } from 'react';
|
|
3
4
|
import PropTypes from 'prop-types';
|
|
4
5
|
import { useMediaQueries } from '../hooks/useMediaQueries.js';
|
|
5
6
|
import 'react-responsive';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
var UserDeviceContext = createContext({
|
|
9
|
+
isMobile: false,
|
|
10
|
+
isTablet: false,
|
|
11
|
+
isDesktop: false,
|
|
11
12
|
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
var SiteMenuContext = createContext({
|
|
14
|
+
isSiteMenuOpen: false,
|
|
15
|
+
setIsSiteMenuOpen: function () { },
|
|
15
16
|
});
|
|
16
17
|
function useUserDeviceContext() {
|
|
17
|
-
|
|
18
|
+
return useContext(UserDeviceContext);
|
|
18
19
|
}
|
|
19
20
|
function useSiteMenuContext() {
|
|
20
|
-
|
|
21
|
+
return useContext(SiteMenuContext);
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const siteMenuContextState = useMemo(() => ({
|
|
29
|
-
isSiteMenuOpen,
|
|
30
|
-
setIsSiteMenuOpen
|
|
31
|
-
}), [isSiteMenuOpen]);
|
|
32
|
-
const mediaQueriesDevices = useMediaQueries(userDeviceState);
|
|
33
|
-
return /*#__PURE__*/React.createElement(UserDeviceContext.Provider, {
|
|
34
|
-
value: mediaQueriesDevices
|
|
35
|
-
}, /*#__PURE__*/React.createElement(SiteMenuContext.Provider, {
|
|
36
|
-
value: siteMenuContextState
|
|
37
|
-
}, children));
|
|
23
|
+
var UIProvider = memo(function UIProvider(props) {
|
|
24
|
+
var children = props.children, _a = props.userDeviceState, userDeviceState = _a === void 0 ? {} : _a;
|
|
25
|
+
var _b = useState(false), isSiteMenuOpen = _b[0], setIsSiteMenuOpen = _b[1];
|
|
26
|
+
var siteMenuContextState = useMemo(function () { return ({ isSiteMenuOpen: isSiteMenuOpen, setIsSiteMenuOpen: setIsSiteMenuOpen }); }, [isSiteMenuOpen]);
|
|
27
|
+
var mediaQueriesDevices = useMediaQueries(userDeviceState);
|
|
28
|
+
return (jsx(UserDeviceContext.Provider, { value: mediaQueriesDevices, children: jsx(SiteMenuContext.Provider, { value: siteMenuContextState, children: children }) }));
|
|
38
29
|
});
|
|
39
30
|
UIProvider.propTypes = {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
31
|
+
children: PropTypes.any,
|
|
32
|
+
userDeviceState: PropTypes.shape({
|
|
33
|
+
isMobile: PropTypes.bool,
|
|
34
|
+
isTablet: PropTypes.bool,
|
|
35
|
+
isDesktop: PropTypes.bool,
|
|
36
|
+
}),
|
|
46
37
|
};
|
|
47
38
|
|
|
48
39
|
export { UIProvider, useSiteMenuContext, useUserDeviceContext };
|
|
@@ -331,10 +331,10 @@ h2.react-datepicker__current-month {
|
|
|
331
331
|
.react-datepicker__year-text {
|
|
332
332
|
cursor: pointer;
|
|
333
333
|
}
|
|
334
|
-
.react-datepicker__day:hover,
|
|
335
|
-
.react-datepicker__month-text:hover,
|
|
336
|
-
.react-datepicker__quarter-text:hover,
|
|
337
|
-
.react-datepicker__year-text:hover {
|
|
334
|
+
.react-datepicker__day:not([aria-disabled=true]):hover,
|
|
335
|
+
.react-datepicker__month-text:not([aria-disabled=true]):hover,
|
|
336
|
+
.react-datepicker__quarter-text:not([aria-disabled=true]):hover,
|
|
337
|
+
.react-datepicker__year-text:not([aria-disabled=true]):hover {
|
|
338
338
|
border-radius: 0.3rem;
|
|
339
339
|
background-color: #f0f0f0;
|
|
340
340
|
}
|
|
@@ -352,10 +352,10 @@ h2.react-datepicker__current-month {
|
|
|
352
352
|
background-color: #3dcc4a;
|
|
353
353
|
color: #fff;
|
|
354
354
|
}
|
|
355
|
-
.react-datepicker__day--highlighted:hover,
|
|
356
|
-
.react-datepicker__month-text--highlighted:hover,
|
|
357
|
-
.react-datepicker__quarter-text--highlighted:hover,
|
|
358
|
-
.react-datepicker__year-text--highlighted:hover {
|
|
355
|
+
.react-datepicker__day--highlighted:not([aria-disabled=true]):hover,
|
|
356
|
+
.react-datepicker__month-text--highlighted:not([aria-disabled=true]):hover,
|
|
357
|
+
.react-datepicker__quarter-text--highlighted:not([aria-disabled=true]):hover,
|
|
358
|
+
.react-datepicker__year-text--highlighted:not([aria-disabled=true]):hover {
|
|
359
359
|
background-color: #32be3f;
|
|
360
360
|
}
|
|
361
361
|
.react-datepicker__day--highlighted-custom-1,
|
|
@@ -396,10 +396,10 @@ h2.react-datepicker__current-month {
|
|
|
396
396
|
opacity: 0;
|
|
397
397
|
transition: visibility 0s, opacity 0.3s ease-in-out;
|
|
398
398
|
}
|
|
399
|
-
.react-datepicker__day--holidays:hover,
|
|
400
|
-
.react-datepicker__month-text--holidays:hover,
|
|
401
|
-
.react-datepicker__quarter-text--holidays:hover,
|
|
402
|
-
.react-datepicker__year-text--holidays:hover {
|
|
399
|
+
.react-datepicker__day--holidays:not([aria-disabled=true]):hover,
|
|
400
|
+
.react-datepicker__month-text--holidays:not([aria-disabled=true]):hover,
|
|
401
|
+
.react-datepicker__quarter-text--holidays:not([aria-disabled=true]):hover,
|
|
402
|
+
.react-datepicker__year-text--holidays:not([aria-disabled=true]):hover {
|
|
403
403
|
background-color: #cf5300;
|
|
404
404
|
}
|
|
405
405
|
.react-datepicker__day--holidays:hover .overlay,
|
|
@@ -423,16 +423,16 @@ h2.react-datepicker__current-month {
|
|
|
423
423
|
background-color: #216ba5;
|
|
424
424
|
color: #fff;
|
|
425
425
|
}
|
|
426
|
-
.react-datepicker__day--selected:hover, .react-datepicker__day--in-selecting-range:hover, .react-datepicker__day--in-range:hover,
|
|
427
|
-
.react-datepicker__month-text--selected:hover,
|
|
428
|
-
.react-datepicker__month-text--in-selecting-range:hover,
|
|
429
|
-
.react-datepicker__month-text--in-range:hover,
|
|
430
|
-
.react-datepicker__quarter-text--selected:hover,
|
|
431
|
-
.react-datepicker__quarter-text--in-selecting-range:hover,
|
|
432
|
-
.react-datepicker__quarter-text--in-range:hover,
|
|
433
|
-
.react-datepicker__year-text--selected:hover,
|
|
434
|
-
.react-datepicker__year-text--in-selecting-range:hover,
|
|
435
|
-
.react-datepicker__year-text--in-range:hover {
|
|
426
|
+
.react-datepicker__day--selected:not([aria-disabled=true]):hover, .react-datepicker__day--in-selecting-range:not([aria-disabled=true]):hover, .react-datepicker__day--in-range:not([aria-disabled=true]):hover,
|
|
427
|
+
.react-datepicker__month-text--selected:not([aria-disabled=true]):hover,
|
|
428
|
+
.react-datepicker__month-text--in-selecting-range:not([aria-disabled=true]):hover,
|
|
429
|
+
.react-datepicker__month-text--in-range:not([aria-disabled=true]):hover,
|
|
430
|
+
.react-datepicker__quarter-text--selected:not([aria-disabled=true]):hover,
|
|
431
|
+
.react-datepicker__quarter-text--in-selecting-range:not([aria-disabled=true]):hover,
|
|
432
|
+
.react-datepicker__quarter-text--in-range:not([aria-disabled=true]):hover,
|
|
433
|
+
.react-datepicker__year-text--selected:not([aria-disabled=true]):hover,
|
|
434
|
+
.react-datepicker__year-text--in-selecting-range:not([aria-disabled=true]):hover,
|
|
435
|
+
.react-datepicker__year-text--in-range:not([aria-disabled=true]):hover {
|
|
436
436
|
background-color: #1d5d90;
|
|
437
437
|
}
|
|
438
438
|
.react-datepicker__day--keyboard-selected,
|
|
@@ -443,10 +443,10 @@ h2.react-datepicker__current-month {
|
|
|
443
443
|
background-color: #bad9f1;
|
|
444
444
|
color: rgb(0, 0, 0);
|
|
445
445
|
}
|
|
446
|
-
.react-datepicker__day--keyboard-selected:hover,
|
|
447
|
-
.react-datepicker__month-text--keyboard-selected:hover,
|
|
448
|
-
.react-datepicker__quarter-text--keyboard-selected:hover,
|
|
449
|
-
.react-datepicker__year-text--keyboard-selected:hover {
|
|
446
|
+
.react-datepicker__day--keyboard-selected:not([aria-disabled=true]):hover,
|
|
447
|
+
.react-datepicker__month-text--keyboard-selected:not([aria-disabled=true]):hover,
|
|
448
|
+
.react-datepicker__quarter-text--keyboard-selected:not([aria-disabled=true]):hover,
|
|
449
|
+
.react-datepicker__year-text--keyboard-selected:not([aria-disabled=true]):hover {
|
|
450
450
|
background-color: #1d5d90;
|
|
451
451
|
}
|
|
452
452
|
.react-datepicker__day--in-selecting-range:not(.react-datepicker__day--in-range,
|
|
@@ -508,12 +508,6 @@ h2.react-datepicker__current-month {
|
|
|
508
508
|
cursor: default;
|
|
509
509
|
color: #ccc;
|
|
510
510
|
}
|
|
511
|
-
.react-datepicker__day--disabled:hover,
|
|
512
|
-
.react-datepicker__month-text--disabled:hover,
|
|
513
|
-
.react-datepicker__quarter-text--disabled:hover,
|
|
514
|
-
.react-datepicker__year-text--disabled:hover {
|
|
515
|
-
background-color: transparent;
|
|
516
|
-
}
|
|
517
511
|
.react-datepicker__day--disabled .overlay,
|
|
518
512
|
.react-datepicker__month-text--disabled .overlay,
|
|
519
513
|
.react-datepicker__quarter-text--disabled .overlay,
|
|
@@ -44,6 +44,30 @@
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
.group {
|
|
48
|
+
&_icon_fill {
|
|
49
|
+
&_hover {
|
|
50
|
+
@each $type in accent, primary, secondary, tertiary, surface, success, error {
|
|
51
|
+
&_$(type) {
|
|
52
|
+
&-item {
|
|
53
|
+
@each $color in primary, secondary, tertiary, quaternary, quinary, senary, accent,
|
|
54
|
+
disabled, hover {
|
|
55
|
+
&-$(color) {
|
|
56
|
+
&:hover {
|
|
57
|
+
& svg {
|
|
58
|
+
stroke: none;
|
|
59
|
+
fill: var(--color-$(type)-item-$(color));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
47
71
|
.group {
|
|
48
72
|
&_shape {
|
|
49
73
|
&_rounded {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
|
|
66
66
|
@custom-media --mouse (hover: hover) and (pointer: fine);
|
|
67
67
|
|
|
68
|
-
@custom-media --tiny-viewport (width
|
|
68
|
+
@custom-media --tiny-viewport (width <= 1366px) and (height <= 720px);
|
|
69
69
|
|
|
70
70
|
@custom-media --small-viewport (width >= 1366px) and (height < 768px);
|
|
71
71
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -2,6 +2,7 @@ import { useMemo } from 'react';
|
|
|
2
2
|
import castArray from 'lodash/castArray';
|
|
3
3
|
import camelCase from 'lodash/camelCase';
|
|
4
4
|
import { useUserDeviceContext } from '../context/UIContext.js';
|
|
5
|
+
import 'react/jsx-runtime';
|
|
5
6
|
import 'prop-types';
|
|
6
7
|
import './useMediaQueries.js';
|
|
7
8
|
import 'react-responsive';
|
package/dist/hooks/useStyles.js
CHANGED
|
@@ -4,6 +4,7 @@ import maxBy from 'lodash/maxBy';
|
|
|
4
4
|
import upperFirst from 'lodash/upperFirst';
|
|
5
5
|
import { useUserDeviceContext } from '../context/UIContext.js';
|
|
6
6
|
import styleAttributes from './styleAttributes.js';
|
|
7
|
+
import 'react/jsx-runtime';
|
|
7
8
|
import 'prop-types';
|
|
8
9
|
import './useMediaQueries.js';
|
|
9
10
|
import 'react-responsive';
|
package/dist/hooks.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
declare function Page(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare namespace Page {
|
|
4
|
+
var propTypes: {
|
|
5
|
+
children: PropTypes.Requireable<any>;
|
|
6
|
+
className: PropTypes.Requireable<string>;
|
|
7
|
+
before: PropTypes.Requireable<string>;
|
|
8
|
+
after: PropTypes.Requireable<string>;
|
|
9
|
+
id: PropTypes.Requireable<string>;
|
|
10
|
+
fill: PropTypes.Requireable<string | null>;
|
|
11
|
+
fillMobile: PropTypes.Requireable<string | null>;
|
|
12
|
+
fillTablet: PropTypes.Requireable<string | null>;
|
|
13
|
+
fillDesktop: PropTypes.Requireable<string | null>;
|
|
14
|
+
type: PropTypes.Requireable<string>;
|
|
15
|
+
tag: PropTypes.Requireable<string>;
|
|
16
|
+
position: PropTypes.Requireable<string | null>;
|
|
17
|
+
positionMobile: PropTypes.Requireable<string | null>;
|
|
18
|
+
positionTablet: PropTypes.Requireable<string | null>;
|
|
19
|
+
positionDesktop: PropTypes.Requireable<string | null>;
|
|
20
|
+
wrapperPosition: PropTypes.Requireable<string | null>;
|
|
21
|
+
wrapperPositionMobile: PropTypes.Requireable<string | null>;
|
|
22
|
+
wrapperPositionTablet: PropTypes.Requireable<string | null>;
|
|
23
|
+
wrapperPositionDesktop: PropTypes.Requireable<string | null>;
|
|
24
|
+
horizontalResizing: PropTypes.Requireable<string | null>;
|
|
25
|
+
horizontalResizingMobile: PropTypes.Requireable<string | null>;
|
|
26
|
+
horizontalResizingTablet: PropTypes.Requireable<string | null>;
|
|
27
|
+
horizontalResizingDesktop: PropTypes.Requireable<string | null>;
|
|
28
|
+
verticalResizing: PropTypes.Requireable<string | null>;
|
|
29
|
+
verticalResizingMobile: PropTypes.Requireable<string | null>;
|
|
30
|
+
verticalResizingTablet: PropTypes.Requireable<string | null>;
|
|
31
|
+
verticalResizingDesktop: PropTypes.Requireable<string | null>;
|
|
32
|
+
align: PropTypes.Requireable<string | null>;
|
|
33
|
+
alignMobile: PropTypes.Requireable<string | null>;
|
|
34
|
+
alignTablet: PropTypes.Requireable<string | null>;
|
|
35
|
+
alignDesktop: PropTypes.Requireable<string | null>;
|
|
36
|
+
alignDirection: PropTypes.Requireable<string | null>;
|
|
37
|
+
alignDirectionMobile: PropTypes.Requireable<string | null>;
|
|
38
|
+
alignDirectionTablet: PropTypes.Requireable<string | null>;
|
|
39
|
+
alignDirectionDesktop: PropTypes.Requireable<string | null>;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export { Page };
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import type { tId } from '@itcase/common';
|
|
3
|
+
import type { iCreatedNotification, iNotificationsProviderProps } from './Notifications.interface';
|
|
4
|
+
declare function NotificationsProvider(props: iNotificationsProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare namespace NotificationsProvider {
|
|
6
|
+
var propTypes: {
|
|
7
|
+
children: PropTypes.Requireable<any>;
|
|
8
|
+
initialNotificationsList: PropTypes.Requireable<any[]>;
|
|
9
|
+
};
|
|
7
10
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
hideNotifications: (targetId:
|
|
11
|
+
declare function useNotifications(): never[];
|
|
12
|
+
declare function useNotificationsAPI(): {
|
|
13
|
+
hideNotifications: (targetId: tId) => void;
|
|
11
14
|
notificationStatuses: {
|
|
12
15
|
error: string;
|
|
13
16
|
info: string;
|
|
14
17
|
success: string;
|
|
15
18
|
warning: string;
|
|
16
19
|
};
|
|
17
|
-
showNotification: (notification:
|
|
20
|
+
showNotification: (notification: string | iCreatedNotification, onClose?: () => void) => void;
|
|
18
21
|
};
|
|
19
|
-
|
|
22
|
+
export { NotificationsProvider, useNotifications, useNotificationsAPI };
|