@itcase/ui 1.0.1
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/README.md +2 -0
- package/dist/SelectContainer-e2544642.js +7717 -0
- package/dist/components/Accordion.js +249 -0
- package/dist/components/Avatar.js +94 -0
- package/dist/components/Background.js +90 -0
- package/dist/components/Breadcrumbs.js +239 -0
- package/dist/components/Button.js +215 -0
- package/dist/components/Caption.js +65 -0
- package/dist/components/Card.js +112 -0
- package/dist/components/Cell.js +180 -0
- package/dist/components/Checkbox.js +68 -0
- package/dist/components/Chips.js +135 -0
- package/dist/components/ContextMenu.js +149 -0
- package/dist/components/CookiesWarning.js +133 -0
- package/dist/components/Counter.js +99 -0
- package/dist/components/Divider.js +73 -0
- package/dist/components/Dropdown.js +139 -0
- package/dist/components/Emoji.js +124 -0
- package/dist/components/Fader.js +66 -0
- package/dist/components/Flex.js +264 -0
- package/dist/components/FormField.js +289 -0
- package/dist/components/Grid.js +329 -0
- package/dist/components/Group.js +132 -0
- package/dist/components/Icon.js +184 -0
- package/dist/components/Image.js +143 -0
- package/dist/components/Input.js +94 -0
- package/dist/components/Label.js +125 -0
- package/dist/components/LanguageSelector.js +86 -0
- package/dist/components/Link.js +172 -0
- package/dist/components/List.js +143 -0
- package/dist/components/Loader.js +66 -0
- package/dist/components/Logo.js +55 -0
- package/dist/components/Menu.js +86 -0
- package/dist/components/MenuItem.js +209 -0
- package/dist/components/Modal.js +69 -0
- package/dist/components/Notification.js +131 -0
- package/dist/components/Pagination.js +93 -0
- package/dist/components/Popup.js +254 -0
- package/dist/components/Profile.js +99 -0
- package/dist/components/RadioButton.js +71 -0
- package/dist/components/RangeSlider.js +2086 -0
- package/dist/components/Scrollbar.js +3872 -0
- package/dist/components/Search.js +260 -0
- package/dist/components/Segmented.js +77 -0
- package/dist/components/Select.js +49 -0
- package/dist/components/SiteMenu.js +137 -0
- package/dist/components/Swiper.js +927 -0
- package/dist/components/Switch.js +29 -0
- package/dist/components/Text.js +121 -0
- package/dist/components/Textarea.js +90 -0
- package/dist/components/Tile.js +252 -0
- package/dist/components/Title.js +146 -0
- package/dist/components/Tooltip.js +115 -0
- package/dist/components/Video.js +74 -0
- package/dist/components/Wrapper.js +119 -0
- package/dist/constants/componentProps/align.js +5 -0
- package/dist/constants/componentProps/alignDirection.js +5 -0
- package/dist/constants/componentProps/borderColor.js +5 -0
- package/dist/constants/componentProps/borderType.js +5 -0
- package/dist/constants/componentProps/captionPosition.js +5 -0
- package/dist/constants/componentProps/direction.js +5 -0
- package/dist/constants/componentProps/emojiSize.js +5 -0
- package/dist/constants/componentProps/fill.js +5 -0
- package/dist/constants/componentProps/fillGradient.js +5 -0
- package/dist/constants/componentProps/fillType.js +5 -0
- package/dist/constants/componentProps/flexAlign.js +5 -0
- package/dist/constants/componentProps/flexJustifyContent.js +5 -0
- package/dist/constants/componentProps/flexWrap.js +5 -0
- package/dist/constants/componentProps/gridAlign.js +5 -0
- package/dist/constants/componentProps/gridAlignSelf.js +5 -0
- package/dist/constants/componentProps/gridJustifyItems.js +5 -0
- package/dist/constants/componentProps/gridJustifySelf.js +5 -0
- package/dist/constants/componentProps/horizontalContentAlign.js +5 -0
- package/dist/constants/componentProps/horizontalResizeMode.js +5 -0
- package/dist/constants/componentProps/iconSize.js +5 -0
- package/dist/constants/componentProps/position.js +5 -0
- package/dist/constants/componentProps/resizeMode.js +5 -0
- package/dist/constants/componentProps/shape.js +5 -0
- package/dist/constants/componentProps/size.js +5 -0
- package/dist/constants/componentProps/stacking.js +5 -0
- package/dist/constants/componentProps/strokeColor.js +5 -0
- package/dist/constants/componentProps/textAlign.js +5 -0
- package/dist/constants/componentProps/textColor.js +5 -0
- package/dist/constants/componentProps/textColorActive.js +5 -0
- package/dist/constants/componentProps/textColorHover.js +5 -0
- package/dist/constants/componentProps/textGradient.js +5 -0
- package/dist/constants/componentProps/textStyle.js +5 -0
- package/dist/constants/componentProps/textTag.js +5 -0
- package/dist/constants/componentProps/textWeight.js +5 -0
- package/dist/constants/componentProps/titleSize.js +5 -0
- package/dist/constants/componentProps/type.js +5 -0
- package/dist/constants/componentProps/underline.js +5 -0
- package/dist/constants/componentProps/verticalContentAlign.js +5 -0
- package/dist/constants/componentProps/verticalResizeMode.js +5 -0
- package/dist/constants/componentProps/width.js +5 -0
- package/dist/constants/componentProps/wrap.js +5 -0
- package/dist/constants.js +87 -0
- package/dist/context/Notifications.js +121 -0
- package/dist/context/UIContext.js +59 -0
- package/dist/css/components/Accordion/Accordion.css +65 -0
- package/dist/css/components/Avatar/Avatar.css +28 -0
- package/dist/css/components/Background/Background.css +11 -0
- package/dist/css/components/Button/Button.css +362 -0
- package/dist/css/components/Caption/Caption.css +22 -0
- package/dist/css/components/Card/Card.css +19 -0
- package/dist/css/components/Cell/Cell.css +89 -0
- package/dist/css/components/Cell/css/__wrapper/cell__wrapper.css +7 -0
- package/dist/css/components/Cell/css/__wrapper/cell__wrapper_shape.css +15 -0
- package/dist/css/components/Checkbox/Checkbox.css +97 -0
- package/dist/css/components/Chips/Chips.css +47 -0
- package/dist/css/components/ContextMenu/ContextMenu.css +43 -0
- package/dist/css/components/ContextMenu/css/__item/context-menu__item.css +10 -0
- package/dist/css/components/CookiesWarning/CookiesWarning.css +37 -0
- package/dist/css/components/Counter/Counter.css +55 -0
- package/dist/css/components/Divider/Divider.css +78 -0
- package/dist/css/components/Dropdown/Dropdown.css +58 -0
- package/dist/css/components/Emoji/Emoji.css +104 -0
- package/dist/css/components/Emoji/css/__icon/emoji__icon-shape.css +12 -0
- package/dist/css/components/Emoji/css/__icon/emoji__icon.css +5 -0
- package/dist/css/components/Fader/Fader.css +55 -0
- package/dist/css/components/Flex/Flex.css +179 -0
- package/dist/css/components/Flex/css/__item/flex__item.css +5 -0
- package/dist/css/components/Flex/css/__item/flex__item_align.css +15 -0
- package/dist/css/components/Flex/css/__item/flex__item_direction.css +17 -0
- package/dist/css/components/Flex/css/__item/flex__item_grow.css +9 -0
- package/dist/css/components/Flex/css/__item/flex__item_justify-content.css +9 -0
- package/dist/css/components/Flex/css/__item/flex__item_shape.css +12 -0
- package/dist/css/components/Flex/css/__item/flex__item_wrap.css +9 -0
- package/dist/css/components/Grid/Grid.css +208 -0
- package/dist/css/components/Grid/css/__item/grid__item.css +4 -0
- package/dist/css/components/Grid/css/__item/grid__item_align-self.css +9 -0
- package/dist/css/components/Grid/css/__item/grid__item_column.css +17 -0
- package/dist/css/components/Grid/css/__item/grid__item_justify-self.css +9 -0
- package/dist/css/components/Grid/css/__item/grid__item_row.css +17 -0
- package/dist/css/components/Group/Group.css +106 -0
- package/dist/css/components/Icon/Icon.css +149 -0
- package/dist/css/components/Image/Image.css +106 -0
- package/dist/css/components/Input/Input.css +41 -0
- package/dist/css/components/Label/Label.css +33 -0
- package/dist/css/components/Link/Link.css +10 -0
- package/dist/css/components/List/List.css +112 -0
- package/dist/css/components/Loader/Loader.css +42 -0
- package/dist/css/components/Logo/Logo.css +17 -0
- package/dist/css/components/Menu/Menu.css +56 -0
- package/dist/css/components/MenuItem/MenuItem.css +56 -0
- package/dist/css/components/Notification/Notification.css +18 -0
- package/dist/css/components/Pagination/Pagination.css +80 -0
- package/dist/css/components/Pagination/css/__item/pagination__item.css +31 -0
- package/dist/css/components/Pagination/css/__item/pagination__item_state_active.css +16 -0
- package/dist/css/components/Pagination/css/__item/pagination__item_state_disabled.css +19 -0
- package/dist/css/components/Popup/Popup.css +49 -0
- package/dist/css/components/Profile/Profile.css +19 -0
- package/dist/css/components/RadioButton/RadioButton.css +98 -0
- package/dist/css/components/RangeSlider/RangeSlider.css +396 -0
- package/dist/css/components/Scrollbar/Scrollbar.css +2 -0
- package/dist/css/components/Search/Search.css +113 -0
- package/dist/css/components/Search/css/search-input/search-input.css +81 -0
- package/dist/css/components/Search/css/search-input/search-input_shape.css +8 -0
- package/dist/css/components/Search/css/search-result/search-result.css +6 -0
- package/dist/css/components/Search/css/search-result/search-result_shape.css +8 -0
- package/dist/css/components/Select/Select.css +236 -0
- package/dist/css/components/Select/css/__control/select__control.css +11 -0
- package/dist/css/components/Select/css/__control/select__control_fill.css +15 -0
- package/dist/css/components/Select/css/__control/select__control_shape.css +12 -0
- package/dist/css/components/Select/css/__indicators/select__indicators.css +18 -0
- package/dist/css/components/Select/css/__input-container/select__input-container.css +24 -0
- package/dist/css/components/Select/css/__menu/select__menu-notice.css +7 -0
- package/dist/css/components/Select/css/__menu/select__menu.css +36 -0
- package/dist/css/components/Select/css/__option/select__option.css +56 -0
- package/dist/css/components/Select/css/__single-value/select__single-value.css +5 -0
- package/dist/css/components/Select/css/__value-container/select__value-container.css +12 -0
- package/dist/css/components/SiteMenu/SiteMenu.css +37 -0
- package/dist/css/components/Swiper/Swiper.css +839 -0
- package/dist/css/components/Switch/Switch.css +53 -0
- package/dist/css/components/Text/Text.css +33 -0
- package/dist/css/components/Textarea/Textarea.css +40 -0
- package/dist/css/components/Tile/Tile.css +23 -0
- package/dist/css/components/Title/Title.css +71 -0
- package/dist/css/components/Tooltip/Tooltip.css +4 -0
- package/dist/css/components/Video/Video.css +37 -0
- package/dist/css/components/Wrapper/Wrapper.css +36 -0
- package/dist/css/styles/align/align_horizontal-reverse.css +50 -0
- package/dist/css/styles/align/align_horizontal.css +67 -0
- package/dist/css/styles/align/align_vertical-reverse.css +49 -0
- package/dist/css/styles/align/align_vertical.css +64 -0
- package/dist/css/styles/border/border.css +13 -0
- package/dist/css/styles/border-color/border-color.css +28 -0
- package/dist/css/styles/caret-color/caret-color.css +13 -0
- package/dist/css/styles/constraints/constraints.css +59 -0
- package/dist/css/styles/cursor/cursor.css +9 -0
- package/dist/css/styles/direction/direction.css +10 -0
- package/dist/css/styles/elevation/elevation.css +7 -0
- package/dist/css/styles/elevation/elevation_hover.css +11 -0
- package/dist/css/styles/fill/fill.css +28 -0
- package/dist/css/styles/fill/fill_active.css +22 -0
- package/dist/css/styles/fill/fill_active_hover.css +24 -0
- package/dist/css/styles/fill/fill_disabled.css +22 -0
- package/dist/css/styles/fill/fill_hover.css +34 -0
- package/dist/css/styles/fill-gradient/fill-gradient.css +15 -0
- package/dist/css/styles/height/height.css +9 -0
- package/dist/css/styles/hover/hover-fill-color.css +13 -0
- package/dist/css/styles/hover/hover-item-color.css +15 -0
- package/dist/css/styles/hover/hover-text-color.css +15 -0
- package/dist/css/styles/mediaqueries.css +66 -0
- package/dist/css/styles/mixin_elevation.css +33 -0
- package/dist/css/styles/mixin_fill-gradient.css +23 -0
- package/dist/css/styles/mixin_global.css +54 -0
- package/dist/css/styles/opacity/opacity.css +7 -0
- package/dist/css/styles/placeholder-text-color/placeholder-text-color.css +15 -0
- package/dist/css/styles/position/position.css +14 -0
- package/dist/css/styles/resize-horizontal/resize-horizontal.css +12 -0
- package/dist/css/styles/resize-vertical/resize-vertical.css +10 -0
- package/dist/css/styles/shape/shape.css +8 -0
- package/dist/css/styles/text-align/text-align.css +7 -0
- package/dist/css/styles/text-color/text-color.css +13 -0
- package/dist/css/styles/text-color/text-color_active.css +15 -0
- package/dist/css/styles/text-color/text-color_hover.css +17 -0
- package/dist/css/styles/text-color-hover/text-color-hover.css +15 -0
- package/dist/css/styles/text-decoration/text-decoration.css +9 -0
- package/dist/css/styles/text-gradient/text-gradient.css +24 -0
- package/dist/css/styles/text-style/text-style.css +9 -0
- package/dist/css/styles/text-truncate/text-truncate.css +7 -0
- package/dist/css/styles/text-weight/text-weight.css +40 -0
- package/dist/css/styles/width/width.css +9 -0
- package/dist/css/styles/word-wrap/word-wrap.css +8 -0
- package/dist/hooks/styleAttributes.js +33 -0
- package/dist/hooks/useDeviceTargetClass.js +60 -0
- package/dist/hooks/useMediaQueries.js +134 -0
- package/dist/hooks/useStyles.js +16 -0
- package/dist/index-f1505c84.js +86 -0
- package/dist/objectWithoutProperties-ea190611.js +188 -0
- package/dist/useStyles-77c3b520.js +153 -0
- package/package.json +123 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var align = require('./constants/componentProps/align.js');
|
|
4
|
+
var alignDirection = require('./constants/componentProps/alignDirection.js');
|
|
5
|
+
var borderColor = require('./constants/componentProps/borderColor.js');
|
|
6
|
+
var borderType = require('./constants/componentProps/borderType.js');
|
|
7
|
+
var captionPosition = require('./constants/componentProps/captionPosition.js');
|
|
8
|
+
var direction = require('./constants/componentProps/direction.js');
|
|
9
|
+
var emojiSize = require('./constants/componentProps/emojiSize.js');
|
|
10
|
+
var position = require('./constants/componentProps/position.js');
|
|
11
|
+
var fill = require('./constants/componentProps/fill.js');
|
|
12
|
+
var fillGradient = require('./constants/componentProps/fillGradient.js');
|
|
13
|
+
var fillType = require('./constants/componentProps/fillType.js');
|
|
14
|
+
var flexAlign = require('./constants/componentProps/flexAlign.js');
|
|
15
|
+
var flexJustifyContent = require('./constants/componentProps/flexJustifyContent.js');
|
|
16
|
+
var flexWrap = require('./constants/componentProps/flexWrap.js');
|
|
17
|
+
var gridAlign = require('./constants/componentProps/gridAlign.js');
|
|
18
|
+
var gridAlignSelf = require('./constants/componentProps/gridAlignSelf.js');
|
|
19
|
+
var gridJustifyItems = require('./constants/componentProps/gridJustifyItems.js');
|
|
20
|
+
var gridJustifySelf = require('./constants/componentProps/gridJustifySelf.js');
|
|
21
|
+
var horizontalContentAlign = require('./constants/componentProps/horizontalContentAlign.js');
|
|
22
|
+
var horizontalResizeMode = require('./constants/componentProps/horizontalResizeMode.js');
|
|
23
|
+
var iconSize = require('./constants/componentProps/iconSize.js');
|
|
24
|
+
var resizeMode = require('./constants/componentProps/resizeMode.js');
|
|
25
|
+
var shape = require('./constants/componentProps/shape.js');
|
|
26
|
+
var size = require('./constants/componentProps/size.js');
|
|
27
|
+
var stacking = require('./constants/componentProps/stacking.js');
|
|
28
|
+
var strokeColor = require('./constants/componentProps/strokeColor.js');
|
|
29
|
+
var textAlign = require('./constants/componentProps/textAlign.js');
|
|
30
|
+
var textColor = require('./constants/componentProps/textColor.js');
|
|
31
|
+
var textColorActive = require('./constants/componentProps/textColorActive.js');
|
|
32
|
+
var textColorHover = require('./constants/componentProps/textColorHover.js');
|
|
33
|
+
var textGradient = require('./constants/componentProps/textGradient.js');
|
|
34
|
+
var textStyle = require('./constants/componentProps/textStyle.js');
|
|
35
|
+
var textTag = require('./constants/componentProps/textTag.js');
|
|
36
|
+
var textWeight = require('./constants/componentProps/textWeight.js');
|
|
37
|
+
var titleSize = require('./constants/componentProps/titleSize.js');
|
|
38
|
+
var type = require('./constants/componentProps/type.js');
|
|
39
|
+
var underline = require('./constants/componentProps/underline.js');
|
|
40
|
+
var verticalContentAlign = require('./constants/componentProps/verticalContentAlign.js');
|
|
41
|
+
var verticalResizeMode = require('./constants/componentProps/verticalResizeMode.js');
|
|
42
|
+
var width = require('./constants/componentProps/width.js');
|
|
43
|
+
var wrap = require('./constants/componentProps/wrap.js');
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
exports.alignProps = align.default;
|
|
48
|
+
exports.alignDirectionProps = alignDirection.default;
|
|
49
|
+
exports.borderColorProps = borderColor.default;
|
|
50
|
+
exports.borderTypeProps = borderType.default;
|
|
51
|
+
exports.captionPositionProps = captionPosition.default;
|
|
52
|
+
exports.directionProps = direction.default;
|
|
53
|
+
exports.emojiSizeProps = emojiSize.default;
|
|
54
|
+
exports.positionProps = position.default;
|
|
55
|
+
exports.fillProps = fill.default;
|
|
56
|
+
exports.fillGradientProps = fillGradient.default;
|
|
57
|
+
exports.fillTypeProps = fillType.default;
|
|
58
|
+
exports.flexAlignProps = flexAlign.default;
|
|
59
|
+
exports.flexJustifyContentProps = flexJustifyContent.default;
|
|
60
|
+
exports.flexWrapProps = flexWrap.default;
|
|
61
|
+
exports.gridAlignProps = gridAlign.default;
|
|
62
|
+
exports.gridAlignSelfProps = gridAlignSelf.default;
|
|
63
|
+
exports.gridJustifyItemsProps = gridJustifyItems.default;
|
|
64
|
+
exports.gridJustifySelfProps = gridJustifySelf.default;
|
|
65
|
+
exports.horizontalContentAlignProps = horizontalContentAlign.default;
|
|
66
|
+
exports.horizontalResizeModeProps = horizontalResizeMode.default;
|
|
67
|
+
exports.iconSizeProps = iconSize.default;
|
|
68
|
+
exports.resizeModeProps = resizeMode.default;
|
|
69
|
+
exports.shapeProps = shape.default;
|
|
70
|
+
exports.sizeProps = size.default;
|
|
71
|
+
exports.stackingProps = stacking.default;
|
|
72
|
+
exports.strokeColorProps = strokeColor.default;
|
|
73
|
+
exports.textAlignProps = textAlign.default;
|
|
74
|
+
exports.textColorProps = textColor.default;
|
|
75
|
+
exports.textColorActiveProps = textColorActive.default;
|
|
76
|
+
exports.textColorHoverProps = textColorHover.default;
|
|
77
|
+
exports.textGradientProps = textGradient.default;
|
|
78
|
+
exports.textStyleProps = textStyle.default;
|
|
79
|
+
exports.textTagProps = textTag.default;
|
|
80
|
+
exports.textWeightProps = textWeight.default;
|
|
81
|
+
exports.titleSizeProps = titleSize.default;
|
|
82
|
+
exports.typeProps = type.default;
|
|
83
|
+
exports.underlineProps = underline.default;
|
|
84
|
+
exports.verticalContentAlignProps = verticalContentAlign.default;
|
|
85
|
+
exports.verticalResizeModeProps = verticalResizeMode.default;
|
|
86
|
+
exports.widthProps = width.default;
|
|
87
|
+
exports.wrapProps = wrap.default;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var PropTypes = require('prop-types');
|
|
5
|
+
var uuid = require('uuid');
|
|
6
|
+
|
|
7
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
10
|
+
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
11
|
+
|
|
12
|
+
var STATUSES = {
|
|
13
|
+
success: 'success',
|
|
14
|
+
info: 'info',
|
|
15
|
+
error: 'error',
|
|
16
|
+
warning: 'warning'
|
|
17
|
+
};
|
|
18
|
+
var NotificationsContext = /*#__PURE__*/React.createContext([]);
|
|
19
|
+
var NotificationsAPIContext = /*#__PURE__*/React.createContext({
|
|
20
|
+
showNotification: function showNotification() {},
|
|
21
|
+
hideNotifications: function hideNotifications() {},
|
|
22
|
+
notificationStatuses: STATUSES
|
|
23
|
+
});
|
|
24
|
+
function NotificationsProvider(props) {
|
|
25
|
+
var _useState = React.useState([]),
|
|
26
|
+
notifications = _useState[0],
|
|
27
|
+
setNotifications = _useState[1];
|
|
28
|
+
var showNotification = React.useCallback(function (notification, onClose) {
|
|
29
|
+
var id = uuid.v4().split('-')[0];
|
|
30
|
+
var title = '';
|
|
31
|
+
var text = '';
|
|
32
|
+
var status = STATUSES.warning;
|
|
33
|
+
var closeByTime = 4500;
|
|
34
|
+
var textColor = '';
|
|
35
|
+
if (typeof notification === 'string') {
|
|
36
|
+
text = notification;
|
|
37
|
+
} else if (typeof notification === 'object') {
|
|
38
|
+
var _notification$id, _notification$title, _notification$text, _notification$status, _notification$closeBy;
|
|
39
|
+
id = (_notification$id = notification.id) != null ? _notification$id : id;
|
|
40
|
+
title = (_notification$title = notification.title) != null ? _notification$title : title;
|
|
41
|
+
text = (_notification$text = notification.text) != null ? _notification$text : text;
|
|
42
|
+
status = (_notification$status = notification.status) != null ? _notification$status : status;
|
|
43
|
+
switch (status) {
|
|
44
|
+
case 'success':
|
|
45
|
+
textColor = 'successTextPrimary';
|
|
46
|
+
break;
|
|
47
|
+
case 'info':
|
|
48
|
+
textColor = 'infoTextPrimary';
|
|
49
|
+
break;
|
|
50
|
+
case 'error':
|
|
51
|
+
textColor = 'errorTextPrimary';
|
|
52
|
+
break;
|
|
53
|
+
case 'warning':
|
|
54
|
+
textColor = 'warningTextPrimary';
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
closeByTime = (_notification$closeBy = notification.closeByTime) != null ? _notification$closeBy : closeByTime;
|
|
58
|
+
}
|
|
59
|
+
setNotifications(function (prevState) {
|
|
60
|
+
return [].concat(prevState, [{
|
|
61
|
+
id: id,
|
|
62
|
+
title: title,
|
|
63
|
+
text: text,
|
|
64
|
+
status: status,
|
|
65
|
+
textColor: textColor,
|
|
66
|
+
// closeByTime: closeByTime,
|
|
67
|
+
onClose: onClose
|
|
68
|
+
}]);
|
|
69
|
+
});
|
|
70
|
+
if (closeByTime) {
|
|
71
|
+
setTimeout(function () {
|
|
72
|
+
setNotifications(function (prevState) {
|
|
73
|
+
var currentNotification = prevState.find(function (notification) {
|
|
74
|
+
return notification.id === id;
|
|
75
|
+
});
|
|
76
|
+
if (currentNotification) {
|
|
77
|
+
if (typeof currentNotification.onClose === 'function') {
|
|
78
|
+
currentNotification.onClose();
|
|
79
|
+
}
|
|
80
|
+
return prevState.filter(function (notification) {
|
|
81
|
+
return notification.id !== id;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
return prevState;
|
|
85
|
+
});
|
|
86
|
+
}, closeByTime);
|
|
87
|
+
}
|
|
88
|
+
}, []);
|
|
89
|
+
var hideNotifications = React.useCallback(function (id) {
|
|
90
|
+
setNotifications(function (prevState) {
|
|
91
|
+
return prevState.filter(function (notification) {
|
|
92
|
+
return notification.id !== id;
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
}, []);
|
|
96
|
+
var notificationsAPI = React.useMemo(function () {
|
|
97
|
+
return {
|
|
98
|
+
showNotification: showNotification,
|
|
99
|
+
hideNotifications: hideNotifications,
|
|
100
|
+
notificationStatuses: STATUSES
|
|
101
|
+
};
|
|
102
|
+
}, []);
|
|
103
|
+
return /*#__PURE__*/React__default.default.createElement(NotificationsAPIContext.Provider, {
|
|
104
|
+
value: notificationsAPI
|
|
105
|
+
}, /*#__PURE__*/React__default.default.createElement(NotificationsContext.Provider, {
|
|
106
|
+
value: notifications
|
|
107
|
+
}, props.children));
|
|
108
|
+
}
|
|
109
|
+
NotificationsProvider.propTypes = {
|
|
110
|
+
children: PropTypes__default.default.any
|
|
111
|
+
};
|
|
112
|
+
function useNotifications() {
|
|
113
|
+
return React.useContext(NotificationsContext);
|
|
114
|
+
}
|
|
115
|
+
function useNotificationsAPI() {
|
|
116
|
+
return React.useContext(NotificationsAPIContext);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
exports.NotificationsProvider = NotificationsProvider;
|
|
120
|
+
exports.useNotifications = useNotifications;
|
|
121
|
+
exports.useNotificationsAPI = useNotificationsAPI;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var PropTypes = require('prop-types');
|
|
5
|
+
var useMediaQueries = require('../hooks/useMediaQueries.js');
|
|
6
|
+
require('react-responsive');
|
|
7
|
+
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
11
|
+
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
12
|
+
|
|
13
|
+
var UserDeviceContext = /*#__PURE__*/React.createContext({
|
|
14
|
+
isMobile: false,
|
|
15
|
+
isTablet: false,
|
|
16
|
+
isDesktop: false
|
|
17
|
+
});
|
|
18
|
+
var SiteMenuContext = /*#__PURE__*/React.createContext({
|
|
19
|
+
isSiteMenuOpen: false,
|
|
20
|
+
setIsSiteMenuOpen: function setIsSiteMenuOpen() {}
|
|
21
|
+
});
|
|
22
|
+
function useUserDeviceContext() {
|
|
23
|
+
return React.useContext(UserDeviceContext);
|
|
24
|
+
}
|
|
25
|
+
function useSiteMenuContext() {
|
|
26
|
+
return React.useContext(SiteMenuContext);
|
|
27
|
+
}
|
|
28
|
+
var UIProvider = /*#__PURE__*/React.memo(function UIProvider(props) {
|
|
29
|
+
var children = props.children,
|
|
30
|
+
_props$userDeviceStat = props.userDeviceState,
|
|
31
|
+
userDeviceState = _props$userDeviceStat === void 0 ? {} : _props$userDeviceStat;
|
|
32
|
+
var _useState = React.useState(false),
|
|
33
|
+
isSiteMenuOpen = _useState[0],
|
|
34
|
+
setIsSiteMenuOpen = _useState[1];
|
|
35
|
+
var siteMenuContextState = React.useMemo(function () {
|
|
36
|
+
return {
|
|
37
|
+
isSiteMenuOpen: isSiteMenuOpen,
|
|
38
|
+
setIsSiteMenuOpen: setIsSiteMenuOpen
|
|
39
|
+
};
|
|
40
|
+
}, [isSiteMenuOpen]);
|
|
41
|
+
var mediaQueriesDevices = useMediaQueries.useMediaQueries(userDeviceState);
|
|
42
|
+
return /*#__PURE__*/React__default.default.createElement(UserDeviceContext.Provider, {
|
|
43
|
+
value: mediaQueriesDevices
|
|
44
|
+
}, /*#__PURE__*/React__default.default.createElement(SiteMenuContext.Provider, {
|
|
45
|
+
value: siteMenuContextState
|
|
46
|
+
}, children));
|
|
47
|
+
});
|
|
48
|
+
UIProvider.propTypes = {
|
|
49
|
+
children: PropTypes__default.default.any,
|
|
50
|
+
userDeviceState: PropTypes__default.default.shape({
|
|
51
|
+
isMobile: PropTypes__default.default.bool,
|
|
52
|
+
isTablet: PropTypes__default.default.bool,
|
|
53
|
+
isDesktop: PropTypes__default.default.bool
|
|
54
|
+
})
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
exports.UIProvider = UIProvider;
|
|
58
|
+
exports.useSiteMenuContext = useSiteMenuContext;
|
|
59
|
+
exports.useUserDeviceContext = useUserDeviceContext;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
.accordion {
|
|
2
|
+
&__wrapper {
|
|
3
|
+
width: 100%;
|
|
4
|
+
max-width: var(--max);
|
|
5
|
+
margin: 0 auto;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
.accordion {
|
|
9
|
+
&_direction {
|
|
10
|
+
@each $val in row, row-reverse, column, column-reverse {
|
|
11
|
+
&_$(val) {
|
|
12
|
+
^^&__wrapper {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: $(val);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
&_horizontal {
|
|
19
|
+
^^&__wrapper {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: row;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
&_vertical {
|
|
25
|
+
^^&__wrapper {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
.accordion-item {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-flow: row wrap;
|
|
35
|
+
&__title {
|
|
36
|
+
flex: 1;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
&__icon {
|
|
40
|
+
margin: 0 0 0 40px;
|
|
41
|
+
align-self: center;
|
|
42
|
+
transform-origin: 50% 50%;
|
|
43
|
+
transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
|
|
44
|
+
}
|
|
45
|
+
&__content {
|
|
46
|
+
width: 100%;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
.accordion-item {
|
|
50
|
+
&_shape {
|
|
51
|
+
&_rounded {
|
|
52
|
+
border-radius: 12px;
|
|
53
|
+
}
|
|
54
|
+
&_circular {
|
|
55
|
+
border-radius: 50%;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
.accordion-item {
|
|
60
|
+
&&_state_open {
|
|
61
|
+
^&__icon {
|
|
62
|
+
transform: rotate(90deg);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.avatar {
|
|
2
|
+
&__wrapper {
|
|
3
|
+
display: flex;
|
|
4
|
+
^&__image {
|
|
5
|
+
}
|
|
6
|
+
^&__data {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-flow: column nowrap;
|
|
9
|
+
}
|
|
10
|
+
^&__icon {
|
|
11
|
+
padding: 8px 0 0 0;
|
|
12
|
+
display: flex;
|
|
13
|
+
gap: 16px;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
.avatar{
|
|
18
|
+
&_size {
|
|
19
|
+
@each $size in 16, 32, 40, 60, 72, 96, 144, 240 {
|
|
20
|
+
&_$(size) {
|
|
21
|
+
^^&__image {
|
|
22
|
+
width: $(size)px;
|
|
23
|
+
height: $(size)px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|