@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.
Files changed (55) hide show
  1. package/Body/package.json +1 -1
  2. package/Body/style.css +1 -741
  3. package/Box/package.json +1 -1
  4. package/Box/style.css +1 -9676
  5. package/Button/index.d.ts +3 -6
  6. package/Button/index.js +5 -8
  7. package/Button/package.json +1 -1
  8. package/Button/style.css +1 -3393
  9. package/ButtonPageUp/index.d.ts +11 -0
  10. package/ButtonPageUp/index.js +174 -0
  11. package/ButtonPageUp/package.json +11 -0
  12. package/Checkbox/package.json +1 -1
  13. package/Checkbox/style.css +1 -133
  14. package/Flex/package.json +1 -1
  15. package/Flex/style.css +1 -786
  16. package/Grid/package.json +1 -1
  17. package/Grid/style.css +1 -7350
  18. package/Icon/package.json +1 -1
  19. package/Icon/style.css +1 -46
  20. package/Image/package.json +1 -1
  21. package/Image/style.css +1 -664
  22. package/ImageEmoji/package.json +1 -1
  23. package/Input/package.json +1 -1
  24. package/Input/style.css +1 -345
  25. package/KeyPress/index.d.ts +11 -0
  26. package/KeyPress/index.js +55 -0
  27. package/KeyPress/package.json +9 -0
  28. package/Line/package.json +1 -1
  29. package/Line/style.css +1 -138
  30. package/Link/package.json +1 -1
  31. package/Link/style.css +1 -259
  32. package/List/package.json +1 -1
  33. package/List/style.css +1 -312
  34. package/OutsideClick/index.d.ts +8 -0
  35. package/OutsideClick/index.js +77 -0
  36. package/OutsideClick/package.json +9 -0
  37. package/Picture/package.json +1 -1
  38. package/Picture/style.css +1 -1426
  39. package/Portal/index.d.ts +8 -0
  40. package/Portal/index.js +54 -0
  41. package/Portal/package.json +9 -0
  42. package/Rating/package.json +1 -1
  43. package/Rating/style.css +1 -26
  44. package/Scroll/package.json +1 -1
  45. package/Scroll/style.css +1 -169
  46. package/Skeleton/package.json +1 -1
  47. package/Skeleton/style.css +1 -145
  48. package/Spinner/package.json +1 -1
  49. package/Spinner/style.css +1 -80
  50. package/Text/package.json +1 -1
  51. package/Text/style.css +1 -840
  52. package/TextEmoji/package.json +1 -1
  53. package/Tumbler/package.json +1 -1
  54. package/Tumbler/style.css +1 -118
  55. 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;
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@prom-ui/core/OutsideClick",
3
+ "version": "0.0.13",
4
+ "main": "index.js",
5
+ "types": "index.d.ts",
6
+ "dependencies": {
7
+ "@prom-ui/hooks": "^0.0.3"
8
+ }
9
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Picture",
3
- "version": "0.0.10",
3
+ "version": "0.0.13",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {