@prom-ui/core 0.0.17 → 0.0.20
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/Body/package.json +4 -1
- package/Box/package.json +4 -1
- package/Button/package.json +4 -1
- package/ButtonPageUp/package.json +4 -1
- package/Checkbox/package.json +4 -1
- package/Flex/package.json +4 -1
- package/Grid/package.json +4 -1
- package/Icon/package.json +4 -1
- package/Image/package.json +4 -1
- package/ImageEmoji/package.json +4 -1
- package/Input/package.json +4 -1
- package/KeyPress/package.json +4 -1
- package/Line/package.json +4 -1
- package/Link/package.json +4 -1
- package/List/package.json +4 -1
- package/OutsideClick/package.json +4 -1
- package/Picture/package.json +4 -1
- package/PortableOverlay/index.d.ts +12 -0
- package/PortableOverlay/index.js +114 -0
- package/PortableOverlay/package.json +13 -0
- package/PortableOverlay/style.css +44 -0
- package/Portal/index.d.ts +2 -2
- package/Portal/package.json +4 -1
- package/Rating/package.json +4 -1
- package/Scroll/package.json +4 -1
- package/ScrollControls/package.json +4 -1
- package/SideOverlay/blocks.d.ts +14 -0
- package/SideOverlay/index.d.ts +31 -0
- package/SideOverlay/index.js +254 -0
- package/SideOverlay/package.json +15 -0
- package/SideOverlay/style.css +208 -0
- package/SideOverlay/utils.d.ts +8 -0
- package/SimpleSlider/index.d.ts +23 -0
- package/SimpleSlider/index.js +480 -0
- package/SimpleSlider/package.json +15 -0
- package/SimpleSlider/style.css +134 -0
- package/SimpleSlider/useAutoPlay.d.ts +3 -0
- package/SimpleSlider/utils.d.ts +19 -0
- package/Skeleton/package.json +4 -1
- package/Spinner/package.json +4 -1
- package/Text/package.json +4 -1
- package/TextEmoji/package.json +4 -1
- package/Tumbler/package.json +4 -1
- package/package.json +5 -2
package/Body/package.json
CHANGED
package/Box/package.json
CHANGED
package/Button/package.json
CHANGED
package/Checkbox/package.json
CHANGED
package/Flex/package.json
CHANGED
package/Grid/package.json
CHANGED
package/Icon/package.json
CHANGED
package/Image/package.json
CHANGED
package/ImageEmoji/package.json
CHANGED
package/Input/package.json
CHANGED
package/KeyPress/package.json
CHANGED
package/Line/package.json
CHANGED
package/Link/package.json
CHANGED
package/List/package.json
CHANGED
package/Picture/package.json
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { tSideOverlayProps } from '@prom-ui/core/SideOverlay';
|
|
3
|
+
export declare type tPortableOverlayProps = {
|
|
4
|
+
bodyGrey?: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
headerClassname?: string;
|
|
7
|
+
title?: any;
|
|
8
|
+
visible?: boolean;
|
|
9
|
+
fullScreen?: boolean;
|
|
10
|
+
onScroll?: () => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const PortableOverlay: React.FC<tSideOverlayProps & tPortableOverlayProps>;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('./style.css');
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
6
|
+
|
|
7
|
+
var React = require('react');
|
|
8
|
+
var PropTypes = require('prop-types');
|
|
9
|
+
var classSet = require('classnames');
|
|
10
|
+
var Button = require('@prom-ui/core/Button');
|
|
11
|
+
var Icon = require('@prom-ui/core/Icon');
|
|
12
|
+
var SideOverlay = require('@prom-ui/core/SideOverlay');
|
|
13
|
+
var Text = require('@prom-ui/core/Text');
|
|
14
|
+
var Left = require('@prom-ui/icons/Left');
|
|
15
|
+
|
|
16
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
|
+
|
|
18
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
19
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
20
|
+
var classSet__default = /*#__PURE__*/_interopDefaultLegacy(classSet);
|
|
21
|
+
|
|
22
|
+
var css = {"header":"PortableOverlay__header___seSVI","content":"PortableOverlay__content___2dqdx","contentGrey":"PortableOverlay__contentGrey___hNlfq","item":"PortableOverlay__item___hWWcF","itemTitle":"PortableOverlay__itemTitle___Pewzr","popupFullScreen":"PortableOverlay__popupFullScreen___hiqqZ"};
|
|
23
|
+
|
|
24
|
+
var PortableOverlay = function (_a) {
|
|
25
|
+
var _b;
|
|
26
|
+
|
|
27
|
+
var _c = _a.bodyGrey,
|
|
28
|
+
bodyGrey = _c === void 0 ? false : _c,
|
|
29
|
+
children = _a.children,
|
|
30
|
+
className = _a.className,
|
|
31
|
+
headerClassname = _a.headerClassname,
|
|
32
|
+
onClose = _a.onClose,
|
|
33
|
+
onScroll = _a.onScroll,
|
|
34
|
+
title = _a.title,
|
|
35
|
+
_d = _a.visible,
|
|
36
|
+
visible = _d === void 0 ? false : _d,
|
|
37
|
+
_e = _a.fullScreen,
|
|
38
|
+
fullScreen = _e === void 0 ? false : _e,
|
|
39
|
+
_f = _a.useTouchScrollable,
|
|
40
|
+
useTouchScrollable = _f === void 0 ? true : _f,
|
|
41
|
+
_g = _a.useScrollLock,
|
|
42
|
+
useScrollLock = _g === void 0 ? true : _g,
|
|
43
|
+
_h = _a.useOutsideClose,
|
|
44
|
+
useOutsideClose = _h === void 0 ? true : _h,
|
|
45
|
+
dataQaId = _a.dataQaId,
|
|
46
|
+
contentRef = _a.contentRef;
|
|
47
|
+
return React__default["default"].createElement(SideOverlay.SideOverlay, {
|
|
48
|
+
open: visible,
|
|
49
|
+
placement: 'right',
|
|
50
|
+
onClose: onClose,
|
|
51
|
+
padding: 'none',
|
|
52
|
+
useCloseButton: false,
|
|
53
|
+
useTouchScrollable: useTouchScrollable,
|
|
54
|
+
useScrollLock: useScrollLock,
|
|
55
|
+
useOutsideClose: useOutsideClose,
|
|
56
|
+
className: className,
|
|
57
|
+
size: fullScreen ? '100%' : 400,
|
|
58
|
+
classNames: {
|
|
59
|
+
Popup: fullScreen ? css.popupFullScreen : null
|
|
60
|
+
},
|
|
61
|
+
dataQaId: visible ? dataQaId : 'closed_popup',
|
|
62
|
+
contentRef: contentRef
|
|
63
|
+
}, React__default["default"].createElement("div", {
|
|
64
|
+
className: classSet__default["default"](css.header, headerClassname)
|
|
65
|
+
}, React__default["default"].createElement("div", {
|
|
66
|
+
className: css.item
|
|
67
|
+
}, onClose && React__default["default"].createElement(Button.Button, {
|
|
68
|
+
"button-padding": 'xxs',
|
|
69
|
+
"button-theme": 'white-inherit',
|
|
70
|
+
onClick: onClose,
|
|
71
|
+
"data-qaid": 'back'
|
|
72
|
+
}, React__default["default"].createElement(Icon.Icon, {
|
|
73
|
+
"icon-as": Left.Left,
|
|
74
|
+
style: {
|
|
75
|
+
width: 24,
|
|
76
|
+
height: 24
|
|
77
|
+
}
|
|
78
|
+
}))), React__default["default"].createElement("div", {
|
|
79
|
+
className: css.itemTitle,
|
|
80
|
+
"data-qaid": 'popup_title'
|
|
81
|
+
}, React__default["default"].createElement(Text.Text, {
|
|
82
|
+
"text-color": 'white',
|
|
83
|
+
"text-size": 'h5',
|
|
84
|
+
"text-weight": 'bold',
|
|
85
|
+
"text-align": 'center',
|
|
86
|
+
"data-qaid": 'title'
|
|
87
|
+
}, typeof title === 'function' ? title() : title)), React__default["default"].createElement("div", {
|
|
88
|
+
className: css.item
|
|
89
|
+
}, null)), React__default["default"].createElement("div", {
|
|
90
|
+
className: classSet__default["default"](css.content, (_b = {}, _b[css.contentGrey] = bodyGrey, _b)),
|
|
91
|
+
onScroll: onScroll
|
|
92
|
+
}, children));
|
|
93
|
+
};
|
|
94
|
+
PortableOverlay.propTypes = {
|
|
95
|
+
visible: PropTypes__default["default"].bool,
|
|
96
|
+
title: PropTypes__default["default"].any,
|
|
97
|
+
children: PropTypes__default["default"].any,
|
|
98
|
+
onClose: PropTypes__default["default"].func,
|
|
99
|
+
onScroll: PropTypes__default["default"].func,
|
|
100
|
+
className: PropTypes__default["default"].string,
|
|
101
|
+
dataQaId: PropTypes__default["default"].string,
|
|
102
|
+
|
|
103
|
+
/** @ignore */
|
|
104
|
+
fullScreen: PropTypes__default["default"].bool,
|
|
105
|
+
useTouchScrollable: PropTypes__default["default"].bool,
|
|
106
|
+
useScrollLock: PropTypes__default["default"].bool,
|
|
107
|
+
useOutsideClose: PropTypes__default["default"].bool,
|
|
108
|
+
headerClassname: PropTypes__default["default"].string,
|
|
109
|
+
|
|
110
|
+
/** Устанавливает серый цвет фона, по умолчанию белый */
|
|
111
|
+
bodyGrey: PropTypes__default["default"].bool
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
exports.PortableOverlay = PortableOverlay;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
.PortableOverlay__header___seSVI {
|
|
2
|
+
position: -webkit-sticky;
|
|
3
|
+
position: sticky;
|
|
4
|
+
top: 0;
|
|
5
|
+
z-index: 10;
|
|
6
|
+
display: flex;
|
|
7
|
+
height: 50px;
|
|
8
|
+
background: var(--violet-500);
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
align-items: center;
|
|
11
|
+
padding: 0 var(--pds-spacing-s);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.PortableOverlay__content___2dqdx {
|
|
15
|
+
height: calc(100% - 50px);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.PortableOverlay__content___2dqdx::after {
|
|
19
|
+
clear: both;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.PortableOverlay__content___2dqdx::after,
|
|
23
|
+
.PortableOverlay__content___2dqdx::before {
|
|
24
|
+
content: "";
|
|
25
|
+
display: table;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.PortableOverlay__contentGrey___hNlfq {
|
|
29
|
+
background: var(--black-100);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.PortableOverlay__item___hWWcF {
|
|
33
|
+
width: 40px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.PortableOverlay__itemTitle___Pewzr {
|
|
37
|
+
flex: 1;
|
|
38
|
+
min-width: 1px;
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.PortableOverlay__popupFullScreen___hiqqZ {
|
|
43
|
+
max-width: 100%;
|
|
44
|
+
}
|
package/Portal/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare type
|
|
2
|
+
declare type tPortalProps = {
|
|
3
3
|
id?: string;
|
|
4
4
|
isActive?: boolean;
|
|
5
5
|
children?: any;
|
|
6
6
|
};
|
|
7
|
-
export declare const Portal: React.FC<
|
|
7
|
+
export declare const Portal: React.FC<tPortalProps>;
|
|
8
8
|
export {};
|
package/Portal/package.json
CHANGED
package/Rating/package.json
CHANGED
package/Scroll/package.json
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const Root: any;
|
|
3
|
+
export declare const Backdrop: any;
|
|
4
|
+
export declare const Popup: any;
|
|
5
|
+
export declare const Content: any;
|
|
6
|
+
export declare const Close: any;
|
|
7
|
+
declare type tAnimateProps = {
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
open?: boolean;
|
|
10
|
+
onEnter?: () => void;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
};
|
|
13
|
+
export declare const Animate: React.FC<tAnimateProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type tClassNames = {
|
|
3
|
+
Root?: string;
|
|
4
|
+
Backdrop?: string;
|
|
5
|
+
Popup?: string;
|
|
6
|
+
Content?: string;
|
|
7
|
+
Close?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare type tSideOverlayProps = {
|
|
10
|
+
animationEnabled?: boolean;
|
|
11
|
+
open?: boolean;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
classNames?: tClassNames;
|
|
15
|
+
onOpen?: () => void;
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
padding?: string | number;
|
|
18
|
+
placement?: 'top' | 'right' | 'bottom' | 'left';
|
|
19
|
+
size?: string | number;
|
|
20
|
+
useCloseButton?: boolean;
|
|
21
|
+
useEscapeClose?: boolean;
|
|
22
|
+
useOutsideClose?: boolean;
|
|
23
|
+
usePortal?: boolean;
|
|
24
|
+
useScrollLock?: boolean;
|
|
25
|
+
useTouchScrollable?: boolean;
|
|
26
|
+
zIndex?: string | number;
|
|
27
|
+
dataQaId?: string;
|
|
28
|
+
contentRef?: React.RefObject<HTMLElement>;
|
|
29
|
+
};
|
|
30
|
+
export declare const SideOverlay: React.FC<tSideOverlayProps>;
|
|
31
|
+
export {};
|