@prom-ui/core 0.0.10 → 0.0.13
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 +1 -1
- package/Body/style.css +1 -741
- package/Box/package.json +1 -1
- package/Box/style.css +1 -9676
- package/Button/index.d.ts +3 -6
- package/Button/index.js +5 -8
- package/Button/package.json +1 -1
- package/Button/style.css +1 -3393
- package/ButtonPageUp/index.d.ts +11 -0
- package/ButtonPageUp/index.js +174 -0
- package/ButtonPageUp/package.json +11 -0
- package/Checkbox/package.json +1 -1
- package/Checkbox/style.css +1 -133
- package/Flex/package.json +1 -1
- package/Flex/style.css +1 -786
- package/Grid/package.json +1 -1
- package/Grid/style.css +1 -7350
- package/Icon/package.json +1 -1
- package/Icon/style.css +1 -46
- package/Image/package.json +1 -1
- package/Image/style.css +1 -664
- package/ImageEmoji/package.json +1 -1
- package/Input/package.json +1 -1
- package/Input/style.css +1 -345
- package/KeyPress/index.d.ts +11 -0
- package/KeyPress/index.js +55 -0
- package/KeyPress/package.json +9 -0
- package/Line/package.json +1 -1
- package/Line/style.css +1 -138
- package/Link/package.json +1 -1
- package/Link/style.css +1 -259
- package/List/package.json +1 -1
- package/List/style.css +1 -312
- package/OutsideClick/index.d.ts +8 -0
- package/OutsideClick/index.js +77 -0
- package/OutsideClick/package.json +9 -0
- package/Picture/package.json +1 -1
- package/Picture/style.css +1 -1426
- package/Portal/index.d.ts +8 -0
- package/Portal/index.js +54 -0
- package/Portal/package.json +9 -0
- package/Rating/package.json +1 -1
- package/Rating/style.css +1 -26
- package/Scroll/package.json +1 -1
- package/Scroll/style.css +1 -169
- package/Skeleton/package.json +1 -1
- package/Skeleton/style.css +1 -145
- package/Spinner/package.json +1 -1
- package/Spinner/style.css +1 -80
- package/Text/package.json +1 -1
- package/Text/style.css +1 -840
- package/TextEmoji/package.json +1 -1
- package/Tumbler/package.json +1 -1
- package/Tumbler/style.css +1 -118
- package/package.json +12 -5
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var PropTypes = require('prop-types');
|
|
7
|
+
var useOutsideClick = require('@prom-ui/hooks/useOutsideClick');
|
|
8
|
+
|
|
9
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
+
|
|
11
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
13
|
+
|
|
14
|
+
/******************************************************************************
|
|
15
|
+
Copyright (c) Microsoft Corporation.
|
|
16
|
+
|
|
17
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
18
|
+
purpose with or without fee is hereby granted.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
21
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
22
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
23
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
24
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
25
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
26
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
27
|
+
***************************************************************************** */
|
|
28
|
+
|
|
29
|
+
var __assign = function() {
|
|
30
|
+
__assign = Object.assign || function __assign(t) {
|
|
31
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
32
|
+
s = arguments[i];
|
|
33
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
34
|
+
}
|
|
35
|
+
return t;
|
|
36
|
+
};
|
|
37
|
+
return __assign.apply(this, arguments);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
function __rest(s, e) {
|
|
41
|
+
var t = {};
|
|
42
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
43
|
+
t[p] = s[p];
|
|
44
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
45
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
46
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
47
|
+
t[p[i]] = s[p[i]];
|
|
48
|
+
}
|
|
49
|
+
return t;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
var OutsideClick = function (_a) {
|
|
53
|
+
var children = _a.children,
|
|
54
|
+
_b = _a.isActive,
|
|
55
|
+
isActive = _b === void 0 ? true : _b,
|
|
56
|
+
onClick = _a.onClick,
|
|
57
|
+
props = __rest(_a, ["children", "isActive", "onClick"]);
|
|
58
|
+
|
|
59
|
+
var ref = useOutsideClick.useOutsideClick(onClick)[0];
|
|
60
|
+
|
|
61
|
+
if (!isActive) {
|
|
62
|
+
return React__default["default"].createElement("div", null, children);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return React__default["default"].createElement("div", __assign({}, props, {
|
|
66
|
+
ref: ref
|
|
67
|
+
}), children);
|
|
68
|
+
};
|
|
69
|
+
OutsideClick.propTypes = {
|
|
70
|
+
/** Если передать `false` компонент перестанет работать */
|
|
71
|
+
isActive: PropTypes__default["default"].bool,
|
|
72
|
+
|
|
73
|
+
/** Срабатывает если клик произошел вне компонента */
|
|
74
|
+
onClick: PropTypes__default["default"].func.isRequired
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
exports.OutsideClick = OutsideClick;
|