@prom-ui/core 0.0.9 → 0.0.12

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