@prom-ui/core 0.0.14 → 0.0.15

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 (50) hide show
  1. package/Body/index.js +1 -1
  2. package/Body/package.json +2 -2
  3. package/Box/index.js +1 -1
  4. package/Box/package.json +2 -2
  5. package/Button/index.js +1 -1
  6. package/Button/package.json +2 -2
  7. package/ButtonPageUp/package.json +3 -3
  8. package/Checkbox/index.js +1 -1
  9. package/Checkbox/package.json +3 -3
  10. package/Flex/index.js +1 -1
  11. package/Flex/package.json +2 -2
  12. package/Grid/index.js +1 -1
  13. package/Grid/package.json +2 -2
  14. package/Icon/index.js +1 -1
  15. package/Icon/package.json +2 -2
  16. package/Image/index.js +1 -1
  17. package/Image/package.json +2 -2
  18. package/ImageEmoji/package.json +2 -2
  19. package/Input/index.js +1 -1
  20. package/Input/package.json +2 -2
  21. package/KeyPress/package.json +1 -1
  22. package/Line/index.js +1 -1
  23. package/Line/package.json +2 -2
  24. package/Link/index.js +1 -1
  25. package/Link/package.json +2 -2
  26. package/List/index.js +1 -1
  27. package/List/package.json +2 -2
  28. package/OutsideClick/package.json +1 -1
  29. package/Picture/index.js +1 -1
  30. package/Picture/package.json +2 -2
  31. package/Portal/package.json +1 -1
  32. package/Rating/index.js +1 -1
  33. package/Rating/package.json +2 -2
  34. package/Scroll/index.js +1 -1
  35. package/Scroll/package.json +2 -2
  36. package/ScrollControls/ScrollControlsButton.d.ts +12 -0
  37. package/ScrollControls/index.d.ts +8 -0
  38. package/ScrollControls/index.js +250 -0
  39. package/ScrollControls/package.json +11 -0
  40. package/ScrollControls/style.css +1 -0
  41. package/Skeleton/index.js +1 -1
  42. package/Skeleton/package.json +2 -2
  43. package/Spinner/index.js +1 -1
  44. package/Spinner/package.json +2 -2
  45. package/Text/index.js +1 -1
  46. package/Text/package.json +2 -2
  47. package/TextEmoji/package.json +2 -2
  48. package/Tumbler/index.js +1 -1
  49. package/Tumbler/package.json +3 -3
  50. package/package.json +21 -21
package/Body/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require("./style.css");
3
+ require('./style.css');
4
4
 
5
5
  Object.defineProperty(exports, '__esModule', { value: true });
6
6
 
package/Body/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Body",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "evokit-body": "3.2.0"
7
+ "evokit-body": "^3.2.0"
8
8
  }
9
9
  }
package/Box/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require("./style.css");
3
+ require('./style.css');
4
4
 
5
5
  Object.defineProperty(exports, '__esModule', { value: true });
6
6
 
package/Box/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Box",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "evokit-box": "3.4.0"
7
+ "evokit-box": "^3.4.0"
8
8
  }
9
9
  }
package/Button/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require("./style.css");
3
+ require('./style.css');
4
4
 
5
5
  Object.defineProperty(exports, '__esModule', { value: true });
6
6
 
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Button",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "evokit-button": "3.0.1"
7
+ "evokit-button": "^3.0.1"
8
8
  }
9
9
  }
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@prom-ui/core/ButtonPageUp",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
7
  "@prom-ui/icons": "^0.0.5",
8
- "ts-debounce": "4.0.0",
9
- "ttag": "1.7.24"
8
+ "ts-debounce": "^4.0.0",
9
+ "ttag": "^1.7.24"
10
10
  }
11
11
  }
package/Checkbox/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require("./style.css");
3
+ require('./style.css');
4
4
 
5
5
  Object.defineProperty(exports, '__esModule', { value: true });
6
6
 
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Checkbox",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "classnames": "2.3.1",
8
- "react-transition-group": "4.4.2"
7
+ "classnames": "^2.3.1",
8
+ "react-transition-group": "^4.4.2"
9
9
  }
10
10
  }
package/Flex/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require("./style.css");
3
+ require('./style.css');
4
4
 
5
5
  Object.defineProperty(exports, '__esModule', { value: true });
6
6
 
package/Flex/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Flex",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "evokit-flex": "3.2.1"
7
+ "evokit-flex": "^3.2.1"
8
8
  }
9
9
  }
package/Grid/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require("./style.css");
3
+ require('./style.css');
4
4
 
5
5
  Object.defineProperty(exports, '__esModule', { value: true });
6
6
 
package/Grid/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Grid",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "evokit-grid": "3.3.0"
7
+ "evokit-grid": "^3.3.0"
8
8
  }
9
9
  }
package/Icon/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require("./style.css");
3
+ require('./style.css');
4
4
 
5
5
  Object.defineProperty(exports, '__esModule', { value: true });
6
6
 
package/Icon/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Icon",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "evokit": "3.2.3"
7
+ "evokit": "^3.2.3"
8
8
  }
9
9
  }
package/Image/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require("./style.css");
3
+ require('./style.css');
4
4
 
5
5
  Object.defineProperty(exports, '__esModule', { value: true });
6
6
 
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Image",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "evokit-image": "3.2.0"
7
+ "evokit-image": "^3.2.0"
8
8
  }
9
9
  }
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@prom-ui/core/ImageEmoji",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "@evo/emoji": "0.2.0"
7
+ "@evo/emoji": "^0.2.0"
8
8
  }
9
9
  }
package/Input/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require("./style.css");
3
+ require('./style.css');
4
4
 
5
5
  Object.defineProperty(exports, '__esModule', { value: true });
6
6
 
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Input",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "evokit": "3.2.3"
7
+ "evokit": "^3.2.3"
8
8
  }
9
9
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/KeyPress",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
package/Line/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require("./style.css");
3
+ require('./style.css');
4
4
 
5
5
  Object.defineProperty(exports, '__esModule', { value: true });
6
6
 
package/Line/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Line",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "evokit-line": "3.1.0"
7
+ "evokit-line": "^3.1.0"
8
8
  }
9
9
  }
package/Link/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require("./style.css");
3
+ require('./style.css');
4
4
 
5
5
  Object.defineProperty(exports, '__esModule', { value: true });
6
6
 
package/Link/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Link",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "evokit-link": "3.2.0"
7
+ "evokit-link": "^3.2.0"
8
8
  }
9
9
  }
package/List/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require("./style.css");
3
+ require('./style.css');
4
4
 
5
5
  Object.defineProperty(exports, '__esModule', { value: true });
6
6
 
package/List/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@prom-ui/core/List",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "evokit-list": "3.3.0"
7
+ "evokit-list": "^3.3.0"
8
8
  }
9
9
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/OutsideClick",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
package/Picture/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require("./style.css");
3
+ require('./style.css');
4
4
 
5
5
  Object.defineProperty(exports, '__esModule', { value: true });
6
6
 
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Picture",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "evokit-picture": "3.2.0"
7
+ "evokit-picture": "^3.2.0"
8
8
  }
9
9
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Portal",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
package/Rating/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require("./style.css");
3
+ require('./style.css');
4
4
 
5
5
  Object.defineProperty(exports, '__esModule', { value: true });
6
6
 
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Rating",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "evokit": "3.2.3"
7
+ "evokit": "^3.2.3"
8
8
  }
9
9
  }
package/Scroll/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require("./style.css");
3
+ require('./style.css');
4
4
 
5
5
  Object.defineProperty(exports, '__esModule', { value: true });
6
6
 
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Scroll",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "evokit": "3.2.3"
7
+ "evokit": "^3.2.3"
8
8
  }
9
9
  }
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export declare type tScrollControlsButton = {
3
+ hideOnDisabled?: boolean;
4
+ children?: any;
5
+ isActive?: boolean;
6
+ onClickNext?: () => void;
7
+ onClickPrev?: () => void;
8
+ theme?: 'white' | 'gray';
9
+ zIndex?: number;
10
+ scrollRef: React.RefObject<HTMLElement>;
11
+ };
12
+ export declare const ScrollControlsButton: React.FC<tScrollControlsButton>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { tScrollControlsButton } from './ScrollControlsButton';
3
+ export declare type tScrollControls = tScrollControlsButton & {
4
+ className?: string;
5
+ children: (ref: React.RefObject<HTMLElement>) => void;
6
+ showOnHover?: boolean;
7
+ };
8
+ export declare const ScrollControls: React.FC<tScrollControls>;
@@ -0,0 +1,250 @@
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 classNames = require('classnames');
10
+ var ttag = require('ttag');
11
+ var Button = require('@prom-ui/core/Button');
12
+ var Icon = require('@prom-ui/core/Icon');
13
+ var Left = require('@prom-ui/icons/Left');
14
+ var Right = require('@prom-ui/icons/Right');
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 classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
21
+
22
+ /******************************************************************************
23
+ Copyright (c) Microsoft Corporation.
24
+
25
+ Permission to use, copy, modify, and/or distribute this software for any
26
+ purpose with or without fee is hereby granted.
27
+
28
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
29
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
30
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
31
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
32
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
33
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
34
+ PERFORMANCE OF THIS SOFTWARE.
35
+ ***************************************************************************** */
36
+
37
+ var __assign = function() {
38
+ __assign = Object.assign || function __assign(t) {
39
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
40
+ s = arguments[i];
41
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
42
+ }
43
+ return t;
44
+ };
45
+ return __assign.apply(this, arguments);
46
+ };
47
+
48
+ function __rest(s, e) {
49
+ var t = {};
50
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
51
+ t[p] = s[p];
52
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
53
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
54
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
55
+ t[p[i]] = s[p[i]];
56
+ }
57
+ return t;
58
+ }
59
+
60
+ function __makeTemplateObject(cooked, raw) {
61
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
62
+ return cooked;
63
+ }
64
+
65
+ var css = {"root":"ScrollControls__root___mOlOq","buttonCommon":"ScrollControls__buttonCommon___rZcyK","prev":"ScrollControls__prev___cF2KB ScrollControls__buttonCommon___rZcyK","next":"ScrollControls__next___9B-9g ScrollControls__buttonCommon___rZcyK","icon":"ScrollControls__icon___lzBzL","showOnHover":"ScrollControls__showOnHover___StbVV","hideOnDisabled":"ScrollControls__hideOnDisabled___IONkE"};
66
+
67
+ var DIRECTION_NEXT = 1;
68
+ var DIRECTION_PREV = -1;
69
+ var CONTROLS_UPDATE_DELAY = 100;
70
+ var ScrollControlsButton = function (_a) {
71
+ var _b, _c;
72
+
73
+ var scrollRef = _a.scrollRef,
74
+ _d = _a.hideOnDisabled,
75
+ hideOnDisabled = _d === void 0 ? false : _d,
76
+ _e = _a.isActive,
77
+ isActive = _e === void 0 ? true : _e,
78
+ onClickNext = _a.onClickNext,
79
+ onClickPrev = _a.onClickPrev,
80
+ zIndex = _a.zIndex,
81
+ _f = _a.theme,
82
+ theme = _f === void 0 ? 'white' : _f,
83
+ children = _a.children;
84
+ var updateControlsTimer = React.useRef(null);
85
+
86
+ var _g = React.useState({
87
+ prev: false,
88
+ next: false
89
+ }),
90
+ controlsVisible = _g[0],
91
+ setControlsVisible = _g[1];
92
+
93
+ var updateControlsVisible = function (nextScrollLeft) {
94
+ var _a = scrollRef.current,
95
+ scrollLeft = _a.scrollLeft,
96
+ scrollWidth = _a.scrollWidth,
97
+ clientWidth = _a.clientWidth;
98
+ var currentScrollLeft = (Number.isInteger(nextScrollLeft) ? nextScrollLeft : scrollLeft) || 0;
99
+ setControlsVisible({
100
+ prev: currentScrollLeft > 1,
101
+ next: currentScrollLeft < scrollWidth - clientWidth
102
+ });
103
+ };
104
+
105
+ var updateScrollLeft = function (direction) {
106
+ var _a = scrollRef.current,
107
+ scrollLeft = _a.scrollLeft,
108
+ clientWidth = _a.clientWidth;
109
+ var offset = clientWidth * direction;
110
+ updateControlsVisible(scrollLeft + offset);
111
+ requestAnimationFrame(function () {
112
+ if (scrollRef.current) {
113
+ scrollRef.current.scrollBy({
114
+ left: offset,
115
+ behavior: 'smooth'
116
+ });
117
+ }
118
+ });
119
+ };
120
+
121
+ var handleOnClickPrev = function () {
122
+ if (typeof onClickPrev === 'function') {
123
+ onClickPrev();
124
+ }
125
+
126
+ updateScrollLeft(DIRECTION_PREV);
127
+ };
128
+
129
+ var handleOnClickNext = function () {
130
+ if (typeof onClickNext === 'function') {
131
+ onClickNext();
132
+ }
133
+
134
+ updateScrollLeft(DIRECTION_NEXT);
135
+ };
136
+
137
+ var handleOnScroll = function () {
138
+ if (updateControlsTimer.current) {
139
+ clearTimeout(updateControlsTimer.current);
140
+ }
141
+
142
+ updateControlsTimer.current = setTimeout(updateControlsVisible, CONTROLS_UPDATE_DELAY);
143
+ };
144
+
145
+ React.useEffect(function () {
146
+ if (scrollRef.current && isActive) {
147
+ updateControlsVisible();
148
+ scrollRef.current.addEventListener('scroll', handleOnScroll);
149
+ }
150
+
151
+ return function () {
152
+ if (scrollRef.current && isActive) {
153
+ scrollRef.current.removeEventListener('scroll', handleOnScroll);
154
+ }
155
+ };
156
+ }, [isActive, children]);
157
+
158
+ if (isActive && (controlsVisible.prev || controlsVisible.next)) {
159
+ return React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement(Button.Button, {
160
+ "button-theme": theme,
161
+ "button-round": 'xs',
162
+ "button-weight": 'normal',
163
+ "button-padding": 'none xxs',
164
+ className: classNames__default["default"](css.prev, (_b = {}, _b[css.hideOnDisabled] = hideOnDisabled, _b)),
165
+ onClick: handleOnClickPrev,
166
+ style: {
167
+ zIndex: zIndex
168
+ },
169
+ disabled: !controlsVisible.prev,
170
+ title: ttag.t(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\u041D\u0430\u0437\u0430\u0434"], ["\u041D\u0430\u0437\u0430\u0434"])))
171
+ }, React__default["default"].createElement(Icon.Icon, {
172
+ className: css.icon,
173
+ "icon-as": Left.Left
174
+ })), React__default["default"].createElement(Button.Button, {
175
+ "button-theme": theme,
176
+ "button-round": 'xs',
177
+ "button-weight": 'normal',
178
+ "button-padding": 'none xxs',
179
+ className: classNames__default["default"](css.next, (_c = {}, _c[css.hideOnDisabled] = hideOnDisabled, _c)),
180
+ onClick: handleOnClickNext,
181
+ style: {
182
+ zIndex: zIndex
183
+ },
184
+ disabled: !controlsVisible.next,
185
+ title: ttag.t(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\u0414\u0430\u043B\u0435\u0435"], ["\u0414\u0430\u043B\u0435\u0435"])))
186
+ }, React__default["default"].createElement(Icon.Icon, {
187
+ className: css.icon,
188
+ "icon-as": Right.Right
189
+ })));
190
+ }
191
+
192
+ return null;
193
+ };
194
+ var templateObject_1, templateObject_2;
195
+
196
+ var ScrollControls = React.forwardRef(function (_a, ref) {
197
+ var _b;
198
+
199
+ var children = _a.children,
200
+ className = _a.className,
201
+ _c = _a.hideOnDisabled,
202
+ hideOnDisabled = _c === void 0 ? false : _c,
203
+ _d = _a.isActive,
204
+ isActive = _d === void 0 ? true : _d,
205
+ onClickNext = _a.onClickNext,
206
+ onClickPrev = _a.onClickPrev,
207
+ _e = _a.showOnHover,
208
+ showOnHover = _e === void 0 ? false : _e,
209
+ zIndex = _a.zIndex,
210
+ _f = _a.theme,
211
+ theme = _f === void 0 ? 'white' : _f,
212
+ props = __rest(_a, ["children", "className", "hideOnDisabled", "isActive", "onClickNext", "onClickPrev", "showOnHover", "zIndex", "theme"]);
213
+
214
+ var scrollRef = React.useRef(null);
215
+ return React__default["default"].createElement("div", __assign({
216
+ ref: ref,
217
+ className: classNames__default["default"](css.root, className, (_b = {}, _b[css.showOnHover] = showOnHover, _b))
218
+ }, props), children(scrollRef), React__default["default"].createElement(ScrollControlsButton, {
219
+ scrollRef: scrollRef,
220
+ hideOnDisabled: hideOnDisabled,
221
+ isActive: isActive,
222
+ onClickNext: onClickNext,
223
+ onClickPrev: onClickPrev,
224
+ zIndex: zIndex,
225
+ theme: theme
226
+ }, children));
227
+ });
228
+ ScrollControls.propTypes = {
229
+ /** Принимает children как функцию, `(scrollRef) =>` */
230
+ // children: PropTypes.func.isRequired,
231
+
232
+ /** Если передать `false` компонент перестанет работать */
233
+ isActive: PropTypes__default["default"].bool,
234
+ onClickNext: PropTypes__default["default"].func,
235
+ onClickPrev: PropTypes__default["default"].func,
236
+
237
+ /** Показывать при наведении */
238
+ showOnHover: PropTypes__default["default"].bool,
239
+
240
+ /** Скрыть если не активно */
241
+ hideOnDisabled: PropTypes__default["default"].bool,
242
+
243
+ /** Устанавливает z-index кнопкам */
244
+ zIndex: PropTypes__default["default"].number,
245
+
246
+ /** Устанавливает цвет кнопок */
247
+ theme: PropTypes__default["default"].oneOf(['white', 'gray'])
248
+ };
249
+
250
+ exports.ScrollControls = ScrollControls;
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "@prom-ui/core/ScrollControls",
3
+ "version": "0.0.15",
4
+ "main": "index.js",
5
+ "types": "index.d.ts",
6
+ "dependencies": {
7
+ "@prom-ui/icons": "^0.0.5",
8
+ "classnames": "^2.3.1",
9
+ "ttag": "^1.7.24"
10
+ }
11
+ }
@@ -0,0 +1 @@
1
+ .ScrollControls__root___mOlOq{position:relative;overflow:hidden}.ScrollControls__buttonCommon___rZcyK{position:absolute;top:50%;transform:translateY(-50%);border:0;box-shadow:0 0 10px rgba(0,0,0,.08);height:66px;max-width:30px;max-height:50%;min-height:24px}.ScrollControls__buttonCommon___rZcyK:disabled{opacity:.3;pointer-events:auto}.ScrollControls__buttonCommon___rZcyK:active{background:var(--black-200)}.ScrollControls__prev___cF2KB{left:0;margin-left:var(--pds-spacing-xs)}.ScrollControls__next___9B-9g{right:0;margin-right:var(--pds-spacing-xs)}.ScrollControls__icon___lzBzL{display:block;width:auto;height:24px;fill:currentColor;max-height:80%}.ScrollControls__showOnHover___StbVV .ScrollControls__next___9B-9g{right:-40px}.ScrollControls__showOnHover___StbVV .ScrollControls__prev___cF2KB{left:-40px}.ScrollControls__hideOnDisabled___IONkE:disabled{opacity:0;pointer-events:none;visibility:hidden}@media (hover:hover){.ScrollControls__showOnHover___StbVV:hover .ScrollControls__next___9B-9g{right:0}.ScrollControls__showOnHover___StbVV:hover .ScrollControls__prev___cF2KB{left:0}}
package/Skeleton/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require("./style.css");
3
+ require('./style.css');
4
4
 
5
5
  Object.defineProperty(exports, '__esModule', { value: true });
6
6
 
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Skeleton",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "evokit": "3.2.3"
7
+ "evokit": "^3.2.3"
8
8
  }
9
9
  }
package/Spinner/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require("./style.css");
3
+ require('./style.css');
4
4
 
5
5
  Object.defineProperty(exports, '__esModule', { value: true });
6
6
 
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Spinner",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "evokit": "3.2.3"
7
+ "evokit": "^3.2.3"
8
8
  }
9
9
  }
package/Text/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require("./style.css");
3
+ require('./style.css');
4
4
 
5
5
  Object.defineProperty(exports, '__esModule', { value: true });
6
6
 
package/Text/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Text",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "evokit-text": "3.2.0"
7
+ "evokit-text": "^3.2.0"
8
8
  }
9
9
  }
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@prom-ui/core/TextEmoji",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "@evo/emoji-text": "0.1.1"
7
+ "@evo/emoji-text": "^0.1.1"
8
8
  }
9
9
  }
package/Tumbler/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require("./style.css");
3
+ require('./style.css');
4
4
 
5
5
  Object.defineProperty(exports, '__esModule', { value: true });
6
6
 
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Tumbler",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
7
- "classnames": "2.3.1",
8
- "react-transition-group": "4.4.2"
7
+ "classnames": "^2.3.1",
8
+ "react-transition-group": "^4.4.2"
9
9
  }
10
10
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@prom-ui/core",
3
3
  "author": "e.marchenko",
4
- "version": "0.0.14",
4
+ "version": "0.0.15",
5
5
  "description": "core ui blocks",
6
6
  "scripts": {
7
- "prebuild": "rm -rf dist && mkdir dist && cp -v package.json README.md CHANGELOG.md dist",
7
+ "prebuild": "node ./preBuild.js",
8
8
  "build": "rollup --config ./rollup.config.js",
9
9
  "watch": "rollup --config ./rollup.config.js --watch",
10
10
  "prepublishOnly": "npm run build"
@@ -25,31 +25,31 @@
25
25
  "@prom-ui/icons": "file:../icons/src"
26
26
  },
27
27
  "dependencies": {
28
- "@evo/emoji": "0.2.0",
29
- "@evo/emoji-text": "0.1.1",
28
+ "@evo/emoji": "^0.2.0",
29
+ "@evo/emoji-text": "^0.1.1",
30
30
  "@prom-ui/hooks": "^0.0.3",
31
31
  "@prom-ui/icons": "^0.0.5",
32
- "classnames": "2.3.1",
33
- "evokit": "3.2.3",
34
- "evokit-body": "3.2.0",
35
- "evokit-box": "3.4.0",
36
- "evokit-button": "3.0.1",
37
- "evokit-flex": "3.2.1",
38
- "evokit-grid": "3.3.0",
39
- "evokit-image": "3.2.0",
40
- "evokit-line": "3.1.0",
41
- "evokit-link": "3.2.0",
42
- "evokit-list": "3.3.0",
43
- "evokit-picture": "3.2.0",
44
- "evokit-text": "3.2.0",
45
- "react-transition-group": "4.4.2",
46
- "ts-debounce": "4.0.0",
47
- "ttag": "1.7.24"
32
+ "classnames": "^2.3.1",
33
+ "evokit": "^3.2.3",
34
+ "evokit-body": "^3.2.0",
35
+ "evokit-box": "^3.4.0",
36
+ "evokit-button": "^3.0.1",
37
+ "evokit-flex": "^3.2.1",
38
+ "evokit-grid": "^3.3.0",
39
+ "evokit-image": "^3.2.0",
40
+ "evokit-line": "^3.1.0",
41
+ "evokit-link": "^3.2.0",
42
+ "evokit-list": "^3.3.0",
43
+ "evokit-picture": "^3.2.0",
44
+ "evokit-text": "^3.2.0",
45
+ "react-transition-group": "^4.4.2",
46
+ "ts-debounce": "^4.0.0",
47
+ "ttag": "^1.7.24"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "prop-types": "*",
51
51
  "react": "*",
52
52
  "react-dom": "*"
53
53
  },
54
- "gitHead": "f1658869e37897e412cd4c116e0e91d01471f126"
54
+ "gitHead": "3ed8c99286317e2dc2af76b20a61d27c5fdc3709"
55
55
  }