@prom-ui/core 1.0.0-alpha.3 → 1.0.0-alpha.4

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 (95) hide show
  1. package/Avatar/package.json +1 -1
  2. package/Backdrop/package.json +1 -1
  3. package/Body/cjs/index.development.js +10 -5
  4. package/Body/cjs/index.development.v2.js +10 -5
  5. package/Body/cjs/index.production.js +1 -1
  6. package/Body/cjs/index.production.v2.js +1 -1
  7. package/Body/index.d.ts +35 -2
  8. package/Body/package.json +1 -1
  9. package/BodyProvider/package.json +1 -1
  10. package/Box/package.json +1 -1
  11. package/Button/package.json +1 -1
  12. package/ButtonPageUp/package.json +1 -1
  13. package/Checkbox/package.json +1 -1
  14. package/Flex/cjs/index.development.js +6 -6
  15. package/Flex/cjs/index.development.v2.js +6 -6
  16. package/Flex/cjs/index.production.js +1 -1
  17. package/Flex/cjs/index.production.v2.js +1 -1
  18. package/Flex/index.d.ts +34 -2
  19. package/Flex/package.json +1 -1
  20. package/Grid/cjs/index.development.js +6 -6
  21. package/Grid/cjs/index.development.v2.js +6 -6
  22. package/Grid/cjs/index.production.js +1 -1
  23. package/Grid/cjs/index.production.v2.js +1 -1
  24. package/Grid/index.d.ts +46 -2
  25. package/Grid/package.json +1 -1
  26. package/Icon/package.json +1 -1
  27. package/Image/package.json +1 -1
  28. package/ImageEmoji/package.json +1 -1
  29. package/Input/package.json +1 -1
  30. package/InputField/package.json +1 -1
  31. package/KeyPress/package.json +1 -1
  32. package/Line/package.json +1 -1
  33. package/Link/package.json +1 -1
  34. package/List/cjs/index.development.js +6 -6
  35. package/List/cjs/index.development.v2.js +6 -6
  36. package/List/cjs/index.production.js +1 -1
  37. package/List/cjs/index.production.v2.js +1 -1
  38. package/List/index.d.ts +23 -2
  39. package/List/package.json +1 -1
  40. package/Media/package.json +1 -1
  41. package/OutsideClick/package.json +1 -1
  42. package/Overlay/package.json +1 -1
  43. package/Picture/cjs/index.development.js +5 -6
  44. package/Picture/cjs/index.development.v2.js +5 -6
  45. package/Picture/cjs/index.production.js +1 -1
  46. package/Picture/cjs/index.production.v2.js +1 -1
  47. package/Picture/index.d.ts +69 -2
  48. package/Picture/package.json +1 -1
  49. package/Portal/package.json +1 -1
  50. package/QRCode/package.json +1 -1
  51. package/Rating/package.json +1 -1
  52. package/SafeQuery/package.json +1 -1
  53. package/Scroll/package.json +1 -1
  54. package/ScrollControls/package.json +1 -1
  55. package/SimpleSlider/package.json +1 -1
  56. package/Skeleton/package.json +1 -1
  57. package/Spinner/package.json +1 -1
  58. package/Text/package.json +1 -1
  59. package/TextEmoji/package.json +1 -1
  60. package/Tooltip/package.json +1 -1
  61. package/Tumbler/package.json +1 -1
  62. package/package.json +3 -4
  63. package/useDebounce/package.json +1 -1
  64. package/useIsMounted/package.json +1 -1
  65. package/useKeyPress/package.json +1 -1
  66. package/useMedia/package.json +1 -1
  67. package/useOutsideClick/package.json +1 -1
  68. package/usePortal/package.json +1 -1
  69. package/useScrollPosition/package.json +1 -1
  70. package/PortableOverlay/cjs/index.development.js +0 -110
  71. package/PortableOverlay/cjs/index.development.v2.js +0 -110
  72. package/PortableOverlay/cjs/index.production.js +0 -1
  73. package/PortableOverlay/cjs/index.production.v2.js +0 -1
  74. package/PortableOverlay/cjs/style.development.css +0 -1
  75. package/PortableOverlay/cjs/style.development.v2.css +0 -1
  76. package/PortableOverlay/cjs/style.production.css +0 -1
  77. package/PortableOverlay/cjs/style.production.v2.css +0 -1
  78. package/PortableOverlay/index.d.ts +0 -14
  79. package/PortableOverlay/index.js +0 -7
  80. package/PortableOverlay/index.v2.js +0 -7
  81. package/PortableOverlay/package.json +0 -12
  82. package/SideOverlay/blocks.d.ts +0 -14
  83. package/SideOverlay/cjs/index.development.js +0 -208
  84. package/SideOverlay/cjs/index.development.v2.js +0 -208
  85. package/SideOverlay/cjs/index.production.js +0 -1
  86. package/SideOverlay/cjs/index.production.v2.js +0 -1
  87. package/SideOverlay/cjs/style.development.css +0 -1
  88. package/SideOverlay/cjs/style.development.v2.css +0 -1
  89. package/SideOverlay/cjs/style.production.css +0 -1
  90. package/SideOverlay/cjs/style.production.v2.css +0 -1
  91. package/SideOverlay/index.d.ts +0 -46
  92. package/SideOverlay/index.js +0 -7
  93. package/SideOverlay/index.v2.js +0 -7
  94. package/SideOverlay/package.json +0 -14
  95. package/SideOverlay/utils.d.ts +0 -8
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/useIsMounted",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.4",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/useKeyPress",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.4",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/useMedia",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.4",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/useOutsideClick",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.4",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/usePortal",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.4",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/useScrollPosition",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.4",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -1,110 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var React = require('react');
6
- var classSet = require('classnames');
7
- var Button = require('@prom-ui/core/Button');
8
- var Icon = require('@prom-ui/core/Icon');
9
- var SideOverlay = require('@prom-ui/core/SideOverlay');
10
- var Text = require('@prom-ui/core/Text');
11
- var Left = require('@prom-ui/icons/Left');
12
-
13
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
14
-
15
- function _interopNamespaceCompat(e) {
16
- if (e && typeof e === 'object' && 'default' in e) return e;
17
- var n = Object.create(null);
18
- if (e) {
19
- Object.keys(e).forEach(function (k) {
20
- if (k !== 'default') {
21
- var d = Object.getOwnPropertyDescriptor(e, k);
22
- Object.defineProperty(n, k, d.get ? d : {
23
- enumerable: true,
24
- get: function () { return e[k]; }
25
- });
26
- }
27
- });
28
- }
29
- n.default = e;
30
- return Object.freeze(n);
31
- }
32
-
33
- var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
34
- var classSet__default = /*#__PURE__*/_interopDefaultCompat(classSet);
35
-
36
- 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"};
37
-
38
- var PortableOverlay = function (_a) {
39
- var _b;
40
- var _c = _a.bodyGrey,
41
- bodyGrey = _c === void 0 ? false : _c,
42
- children = _a.children,
43
- className = _a.className,
44
- headerClassname = _a.headerClassname,
45
- onClose = _a.onClose,
46
- onScroll = _a.onScroll,
47
- title = _a.title,
48
- _d = _a.visible,
49
- visible = _d === void 0 ? false : _d,
50
- _e = _a.fullScreen,
51
- fullScreen = _e === void 0 ? false : _e,
52
- _f = _a.useTouchScrollable,
53
- useTouchScrollable = _f === void 0 ? true : _f,
54
- _g = _a.useScrollLock,
55
- useScrollLock = _g === void 0 ? true : _g,
56
- _h = _a.useOutsideClose,
57
- useOutsideClose = _h === void 0 ? true : _h,
58
- dataQaId = _a.dataQaId,
59
- contentRef = _a.contentRef;
60
- return React__namespace.createElement(SideOverlay.SideOverlay, {
61
- open: visible,
62
- placement: 'right',
63
- onClose: onClose,
64
- padding: 'none',
65
- useCloseButton: false,
66
- useTouchScrollable: useTouchScrollable,
67
- useScrollLock: useScrollLock,
68
- useOutsideClose: useOutsideClose,
69
- className: className,
70
- size: fullScreen ? '100%' : 400,
71
- classNames: {
72
- Popup: fullScreen ? css.popupFullScreen : null
73
- },
74
- dataQaId: visible ? dataQaId : 'closed_popup',
75
- contentRef: contentRef
76
- }, React__namespace.createElement("div", {
77
- className: classSet__default.default(css.header, headerClassname)
78
- }, React__namespace.createElement("div", {
79
- className: css.item
80
- }, onClose && React__namespace.createElement(Button.Button, {
81
- "button-padding": 'xxs',
82
- "button-theme": 'white-inherit',
83
- onClick: onClose,
84
- "data-qaid": 'back'
85
- }, React__namespace.createElement(Icon.Icon, {
86
- "icon-as": Left.Left,
87
- style: {
88
- width: 24,
89
- height: 24
90
- }
91
- }))), React__namespace.createElement("div", {
92
- className: css.itemTitle,
93
- "data-qaid": 'popup_title'
94
- }, React__namespace.createElement(Text.Text, {
95
- "text-color": 'white',
96
- "text-size": 'h5',
97
- "text-weight": 'bold',
98
- "text-align": 'center',
99
- "data-qaid": 'title'
100
- }, typeof title === 'function' ? title() : title)), React__namespace.createElement("div", {
101
- className: css.item
102
- }, null)), React__namespace.createElement("div", {
103
- className: classSet__default.default(css.content, (_b = {}, _b[css.contentGrey] = bodyGrey, _b)),
104
- onScroll: onScroll
105
- }, children));
106
- };
107
-
108
- exports.PortableOverlay = PortableOverlay;
109
-
110
- require('./style.development.css');
@@ -1,110 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var React = require('react');
6
- var classSet = require('classnames');
7
- var Button = require('@prom-ui/core/Button');
8
- var Icon = require('@prom-ui/core/Icon');
9
- var SideOverlay = require('@prom-ui/core/SideOverlay');
10
- var Text = require('@prom-ui/core/Text');
11
- var Left = require('@prom-ui/icons/Left');
12
-
13
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
14
-
15
- function _interopNamespaceCompat(e) {
16
- if (e && typeof e === 'object' && 'default' in e) return e;
17
- var n = Object.create(null);
18
- if (e) {
19
- Object.keys(e).forEach(function (k) {
20
- if (k !== 'default') {
21
- var d = Object.getOwnPropertyDescriptor(e, k);
22
- Object.defineProperty(n, k, d.get ? d : {
23
- enumerable: true,
24
- get: function () { return e[k]; }
25
- });
26
- }
27
- });
28
- }
29
- n.default = e;
30
- return Object.freeze(n);
31
- }
32
-
33
- var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
34
- var classSet__default = /*#__PURE__*/_interopDefaultCompat(classSet);
35
-
36
- var css = {"header":"PortableOverlay__header___cWSUq","content":"PortableOverlay__content___7Dup2","contentGrey":"PortableOverlay__contentGrey___rNiZI","item":"PortableOverlay__item___4gwkr","itemTitle":"PortableOverlay__itemTitle___ueNdA","popupFullScreen":"PortableOverlay__popupFullScreen___CxINU"};
37
-
38
- var PortableOverlay = function (_a) {
39
- var _b;
40
- var _c = _a.bodyGrey,
41
- bodyGrey = _c === void 0 ? false : _c,
42
- children = _a.children,
43
- className = _a.className,
44
- headerClassname = _a.headerClassname,
45
- onClose = _a.onClose,
46
- onScroll = _a.onScroll,
47
- title = _a.title,
48
- _d = _a.visible,
49
- visible = _d === void 0 ? false : _d,
50
- _e = _a.fullScreen,
51
- fullScreen = _e === void 0 ? false : _e,
52
- _f = _a.useTouchScrollable,
53
- useTouchScrollable = _f === void 0 ? true : _f,
54
- _g = _a.useScrollLock,
55
- useScrollLock = _g === void 0 ? true : _g,
56
- _h = _a.useOutsideClose,
57
- useOutsideClose = _h === void 0 ? true : _h,
58
- dataQaId = _a.dataQaId,
59
- contentRef = _a.contentRef;
60
- return React__namespace.createElement(SideOverlay.SideOverlay, {
61
- open: visible,
62
- placement: 'right',
63
- onClose: onClose,
64
- padding: 'none',
65
- useCloseButton: false,
66
- useTouchScrollable: useTouchScrollable,
67
- useScrollLock: useScrollLock,
68
- useOutsideClose: useOutsideClose,
69
- className: className,
70
- size: fullScreen ? '100%' : 400,
71
- classNames: {
72
- Popup: fullScreen ? css.popupFullScreen : null
73
- },
74
- dataQaId: visible ? dataQaId : 'closed_popup',
75
- contentRef: contentRef
76
- }, React__namespace.createElement("div", {
77
- className: classSet__default.default(css.header, headerClassname)
78
- }, React__namespace.createElement("div", {
79
- className: css.item
80
- }, onClose && React__namespace.createElement(Button.Button, {
81
- "button-padding": 'xxs',
82
- "button-theme": 'white-inherit',
83
- onClick: onClose,
84
- "data-qaid": 'back'
85
- }, React__namespace.createElement(Icon.Icon, {
86
- "icon-as": Left.Left,
87
- style: {
88
- width: 24,
89
- height: 24
90
- }
91
- }))), React__namespace.createElement("div", {
92
- className: css.itemTitle,
93
- "data-qaid": 'popup_title'
94
- }, React__namespace.createElement(Text.Text, {
95
- "text-color": 'white',
96
- "text-size": 'h5',
97
- "text-weight": 'bold',
98
- "text-align": 'center',
99
- "data-qaid": 'title'
100
- }, typeof title === 'function' ? title() : title)), React__namespace.createElement("div", {
101
- className: css.item
102
- }, null)), React__namespace.createElement("div", {
103
- className: classSet__default.default(css.content, (_b = {}, _b[css.contentGrey] = bodyGrey, _b)),
104
- onScroll: onScroll
105
- }, children));
106
- };
107
-
108
- exports.PortableOverlay = PortableOverlay;
109
-
110
- require('./style.development.v2.css');
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("classnames"),r=require("@prom-ui/core/Button"),o=require("@prom-ui/core/Icon"),a=require("@prom-ui/core/SideOverlay"),l=require("@prom-ui/core/Text"),i=require("@prom-ui/icons/Left");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function n(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var u=n(e),s=c(t),d="seSVI",f="_2dqdx",m="hNlfq",p="hWWcF",v="Pewzr",b="hiqqZ";exports.PortableOverlay=function(e){var t,c=e.bodyGrey,n=void 0!==c&&c,h=e.children,q=e.className,y=e.headerClassname,O=e.onClose,x=e.onScroll,E=e.title,S=e.visible,g=void 0!==S&&S,N=e.fullScreen,j=void 0!==N&&N,C=e.useTouchScrollable,w=void 0===C||C,P=e.useScrollLock,k=void 0===P||P,I=e.useOutsideClose,_=void 0===I||I,z=e.dataQaId,L=e.contentRef;return u.createElement(a.SideOverlay,{open:g,placement:"right",onClose:O,padding:"none",useCloseButton:!1,useTouchScrollable:w,useScrollLock:k,useOutsideClose:_,className:q,size:j?"100%":400,classNames:{Popup:j?b:null},dataQaId:g?z:"closed_popup",contentRef:L},u.createElement("div",{className:s.default(d,y)},u.createElement("div",{className:p},O&&u.createElement(r.Button,{"button-padding":"xxs","button-theme":"white-inherit",onClick:O,"data-qaid":"back"},u.createElement(o.Icon,{"icon-as":i.Left,style:{width:24,height:24}}))),u.createElement("div",{className:v,"data-qaid":"popup_title"},u.createElement(l.Text,{"text-color":"white","text-size":"h5","text-weight":"bold","text-align":"center","data-qaid":"title"},"function"==typeof E?E():E)),u.createElement("div",{className:p},null)),u.createElement("div",{className:s.default(f,(t={},t[m]=n,t)),onScroll:x},h))},require("./style.production.css");
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("classnames"),r=require("@prom-ui/core/Button"),o=require("@prom-ui/core/Icon"),a=require("@prom-ui/core/SideOverlay"),l=require("@prom-ui/core/Text"),i=require("@prom-ui/icons/Left");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function n(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var u=n(e),s=c(t),d="cWSUq",p="_7Dup2",f="rNiZI",m="_4gwkr",v="ueNdA",b="CxINU";exports.PortableOverlay=function(e){var t,c=e.bodyGrey,n=void 0!==c&&c,h=e.children,y=e.className,q=e.headerClassname,O=e.onClose,x=e.onScroll,N=e.title,g=e.visible,E=void 0!==g&&g,S=e.fullScreen,j=void 0!==S&&S,C=e.useTouchScrollable,k=void 0===C||C,w=e.useScrollLock,I=void 0===w||w,_=e.useOutsideClose,P=void 0===_||_,L=e.dataQaId,T=e.contentRef;return u.createElement(a.SideOverlay,{open:E,placement:"right",onClose:O,padding:"none",useCloseButton:!1,useTouchScrollable:k,useScrollLock:I,useOutsideClose:P,className:y,size:j?"100%":400,classNames:{Popup:j?b:null},dataQaId:E?L:"closed_popup",contentRef:T},u.createElement("div",{className:s.default(d,q)},u.createElement("div",{className:m},O&&u.createElement(r.Button,{"button-padding":"xxs","button-theme":"white-inherit",onClick:O,"data-qaid":"back"},u.createElement(o.Icon,{"icon-as":i.Left,style:{width:24,height:24}}))),u.createElement("div",{className:v,"data-qaid":"popup_title"},u.createElement(l.Text,{"text-color":"white","text-size":"h5","text-weight":"bold","text-align":"center","data-qaid":"title"},"function"==typeof N?N():N)),u.createElement("div",{className:m},null)),u.createElement("div",{className:s.default(p,(t={},t[f]=n,t)),onScroll:x},h))},require("./style.production.v2.css");
@@ -1 +0,0 @@
1
- .PortableOverlay__header___seSVI{position:sticky;top:0;z-index:10;display:flex;height:50px;background:var(--violet-500);justify-content:space-between;align-items:center;padding:0 var(--pds-spacing-s)}.PortableOverlay__content___2dqdx{height:calc(100% - 50px)}.PortableOverlay__content___2dqdx::after{clear:both}.PortableOverlay__content___2dqdx::after,.PortableOverlay__content___2dqdx::before{content:"";display:table}.PortableOverlay__contentGrey___hNlfq{background:var(--black-100)}.PortableOverlay__item___hWWcF{width:40px}.PortableOverlay__itemTitle___Pewzr{flex:1;min-width:1px;overflow:hidden}.PortableOverlay__popupFullScreen___hiqqZ{max-width:100%}
@@ -1 +0,0 @@
1
- .PortableOverlay__header___cWSUq{position:sticky;top:0;z-index:10;display:flex;height:50px;background:var(--violet-500);justify-content:space-between;align-items:center;padding:0 var(--pds-spacing-s)}.PortableOverlay__content___7Dup2{height:calc(100% - 50px)}.PortableOverlay__content___7Dup2::after{clear:both}.PortableOverlay__content___7Dup2::after,.PortableOverlay__content___7Dup2::before{content:"";display:table}.PortableOverlay__contentGrey___rNiZI{background:var(--black-100)}.PortableOverlay__item___4gwkr{width:40px}.PortableOverlay__itemTitle___ueNdA{flex:1;min-width:1px;overflow:hidden}.PortableOverlay__popupFullScreen___CxINU{max-width:100%}
@@ -1 +0,0 @@
1
- .seSVI{position:sticky;top:0;z-index:10;display:flex;height:50px;background:var(--violet-500);justify-content:space-between;align-items:center;padding:0 var(--pds-spacing-s)}._2dqdx{height:calc(100% - 50px)}._2dqdx::after{clear:both}._2dqdx::after,._2dqdx::before{content:"";display:table}.hNlfq{background:var(--black-100)}.hWWcF{width:40px}.Pewzr{flex:1;min-width:1px;overflow:hidden}.hiqqZ{max-width:100%}
@@ -1 +0,0 @@
1
- .cWSUq{position:sticky;top:0;z-index:10;display:flex;height:50px;background:var(--violet-500);justify-content:space-between;align-items:center;padding:0 var(--pds-spacing-s)}._7Dup2{height:calc(100% - 50px)}._7Dup2::after{clear:both}._7Dup2::after,._7Dup2::before{content:"";display:table}.rNiZI{background:var(--black-100)}._4gwkr{width:40px}.ueNdA{flex:1;min-width:1px;overflow:hidden}.CxINU{max-width:100%}
@@ -1,14 +0,0 @@
1
- import * as React from 'react';
2
- import { SideOverlayProps } from '@prom-ui/core/SideOverlay';
3
- export type PortableOverlayProps = Pick<SideOverlayProps, 'children' | 'onClose' | 'useTouchScrollable' | 'useScrollLock' | 'useOutsideClose' | 'dataQaId' | 'contentRef'> & {
4
- /** Устанавливает серый цвет фона, по умолчанию белый */
5
- bodyGrey?: boolean;
6
- className?: string;
7
- headerClassname?: string;
8
- title?: any;
9
- visible?: boolean;
10
- /** @ignore */
11
- fullScreen?: boolean;
12
- onScroll?: () => void;
13
- };
14
- export declare const PortableOverlay: React.FC<PortableOverlayProps>;
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- if (process.env.NODE_ENV === 'production') {
4
- module.exports = require('./cjs/index.production.js');
5
- } else {
6
- module.exports = require('./cjs/index.development.js');
7
- }
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- if (process.env.NODE_ENV === 'production') {
4
- module.exports = require('./cjs/index.production.v2.js');
5
- } else {
6
- module.exports = require('./cjs/index.development.v2.js');
7
- }
@@ -1,12 +0,0 @@
1
- {
2
- "name": "@prom-ui/core/PortableOverlay",
3
- "version": "1.0.0-alpha.3",
4
- "main": "index.js",
5
- "types": "index.d.ts",
6
- "sideEffects": [
7
- "*.css"
8
- ],
9
- "dependencies": {
10
- "classnames": "^2.3.1"
11
- }
12
- }
@@ -1,14 +0,0 @@
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
- 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 {};
@@ -1,208 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var React = require('react');
6
- var ScrollLock = require('react-scrolllock');
7
- var KeyPress = require('@prom-ui/core/KeyPress');
8
- var Portal = require('@prom-ui/core/Portal');
9
- var BodyProvider = require('@prom-ui/core/BodyProvider');
10
- var evokit = require('evokit');
11
- var reactTransitionGroup = require('react-transition-group');
12
-
13
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
14
-
15
- function _interopNamespaceCompat(e) {
16
- if (e && typeof e === 'object' && 'default' in e) return e;
17
- var n = Object.create(null);
18
- if (e) {
19
- Object.keys(e).forEach(function (k) {
20
- if (k !== 'default') {
21
- var d = Object.getOwnPropertyDescriptor(e, k);
22
- Object.defineProperty(n, k, d.get ? d : {
23
- enumerable: true,
24
- get: function () { return e[k]; }
25
- });
26
- }
27
- });
28
- }
29
- n.default = e;
30
- return Object.freeze(n);
31
- }
32
-
33
- var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
34
- var ScrollLock__default = /*#__PURE__*/_interopDefaultCompat(ScrollLock);
35
-
36
- /******************************************************************************
37
- Copyright (c) Microsoft Corporation.
38
-
39
- Permission to use, copy, modify, and/or distribute this software for any
40
- purpose with or without fee is hereby granted.
41
-
42
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
43
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
44
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
45
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
46
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
47
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
48
- PERFORMANCE OF THIS SOFTWARE.
49
- ***************************************************************************** */
50
-
51
- var __assign = function() {
52
- __assign = Object.assign || function __assign(t) {
53
- for (var s, i = 1, n = arguments.length; i < n; i++) {
54
- s = arguments[i];
55
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
56
- }
57
- return t;
58
- };
59
- return __assign.apply(this, arguments);
60
- };
61
-
62
- function __rest(s, e) {
63
- var t = {};
64
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
65
- t[p] = s[p];
66
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
67
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
68
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
69
- t[p[i]] = s[p[i]];
70
- }
71
- return t;
72
- }
73
-
74
- function __makeTemplateObject(cooked, raw) {
75
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
76
- return cooked;
77
- }
78
-
79
- var css = {"root":"SideOverlay__root___zoSc7","backdrop":"SideOverlay__backdrop___v5Neh","popup":"SideOverlay__popup___LsB4w","content":"SideOverlay__content___D9ezA","close":"SideOverlay__close___aiN5k","popup_placement_top":"SideOverlay__popup_placement_top___BSFf7","popup_placement_bottom":"SideOverlay__popup_placement_bottom___k1gGY","popup_placement_right":"SideOverlay__popup_placement_right___w9HUr","popup_placement_left":"SideOverlay__popup_placement_left___DWBxa","enter":"SideOverlay__enter___ukL-B","exit":"SideOverlay__exit___QE5yq","enterActive":"SideOverlay__enterActive___VPRAq","exitActive":"SideOverlay__exitActive___FhiSX"};
80
-
81
- var BLOCKS_PRESET = {
82
- css: css,
83
- b: ''
84
- };
85
- var Root = evokit.createBlock('div', 'root', [], BLOCKS_PRESET);
86
- var Backdrop = evokit.createBlock('div', 'backdrop', [], BLOCKS_PRESET);
87
- var Popup = evokit.createBlock('div', 'popup', ['placement'], BLOCKS_PRESET);
88
- var Content = evokit.createBlock('div', 'content', [], BLOCKS_PRESET);
89
- var Close = evokit.createBlock('button', 'close', [], BLOCKS_PRESET);
90
- var Animate = function (_a) {
91
- var _b = _a.open,
92
- open = _b === void 0 ? false : _b,
93
- children = _a.children,
94
- _c = _a.enabled,
95
- enabled = _c === void 0 ? true : _c,
96
- onEnter = _a.onEnter;
97
- return React__namespace.default.createElement(reactTransitionGroup.CSSTransition, {
98
- in: open,
99
- timeout: enabled ? 225 : 0,
100
- classNames: css,
101
- unmountOnExit: true,
102
- onEnter: onEnter
103
- }, children);
104
- };
105
-
106
- var getPopupStyle = function (placement, size) {
107
- if (['top', 'bottom'].includes(placement)) {
108
- return {
109
- height: size
110
- };
111
- }
112
- return {
113
- width: size
114
- };
115
- };
116
-
117
- var SideOverlay = function (_a) {
118
- var children = _a.children,
119
- _b = _a.classNames,
120
- classNames = _b === void 0 ? {} : _b,
121
- onClose = _a.onClose,
122
- onOpen = _a.onOpen,
123
- _c = _a.open,
124
- open = _c === void 0 ? false : _c,
125
- _d = _a.padding,
126
- padding = _d === void 0 ? '45px 30px 30px 30px' : _d,
127
- _e = _a.placement,
128
- placement = _e === void 0 ? 'left' : _e,
129
- _f = _a.size,
130
- size = _f === void 0 ? 400 : _f,
131
- _g = _a.useCloseButton,
132
- useCloseButton = _g === void 0 ? true : _g,
133
- _h = _a.useEscapeClose,
134
- useEscapeClose = _h === void 0 ? true : _h,
135
- _j = _a.useOutsideClose,
136
- useOutsideClose = _j === void 0 ? true : _j,
137
- _k = _a.usePortal,
138
- usePortal = _k === void 0 ? true : _k,
139
- _l = _a.useScrollLock,
140
- useScrollLock = _l === void 0 ? true : _l,
141
- _m = _a.useTouchScrollable,
142
- useTouchScrollable = _m === void 0 ? true : _m,
143
- _o = _a.zIndex,
144
- zIndex = _o === void 0 ? 5000 : _o,
145
- dataQaId = _a.dataQaId,
146
- contentRef = _a.contentRef,
147
- _p = _a.animationEnabled,
148
- animationEnabled = _p === void 0 ? true : _p,
149
- props = __rest(_a, ["children", "classNames", "onClose", "onOpen", "open", "padding", "placement", "size", "useCloseButton", "useEscapeClose", "useOutsideClose", "usePortal", "useScrollLock", "useTouchScrollable", "zIndex", "dataQaId", "contentRef", "animationEnabled"]);
150
- var t = BodyProvider.useBodyLocale().t;
151
- return React__namespace.createElement(Animate, {
152
- open: open,
153
- onEnter: function () {
154
- onOpen && onOpen();
155
- },
156
- enabled: animationEnabled
157
- }, React__namespace.createElement(Portal.Portal, {
158
- isActive: usePortal
159
- }, React__namespace.createElement(Root, __assign({
160
- role: 'presentation',
161
- style: {
162
- zIndex: zIndex
163
- },
164
- className: classNames.Root
165
- }, props), React__namespace.createElement(ScrollLock__default.default, {
166
- isActive: useScrollLock
167
- }), React__namespace.createElement(KeyPress.KeyPress, {
168
- isActive: useEscapeClose,
169
- code: 'Escape',
170
- onKeyDown: onClose
171
- }), React__namespace.createElement(Backdrop, {
172
- className: classNames.Backdrop,
173
- "aria-hidden": true,
174
- onClick: function (e) {
175
- if (useOutsideClose && onClose) {
176
- onClose(e);
177
- }
178
- }
179
- }), React__namespace.createElement(Popup, {
180
- "popup-placement": placement,
181
- className: classNames.Popup,
182
- style: getPopupStyle(placement, size),
183
- "data-qaid": dataQaId
184
- }, useCloseButton && onClose && React__namespace.createElement(Close, {
185
- className: classNames.Close,
186
- type: 'button',
187
- onClick: onClose,
188
- "aria-label": t(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\u0417\u0430\u043A\u0440\u044B\u0442\u044C"], ["\u0417\u0430\u043A\u0440\u044B\u0442\u044C"]))),
189
- "data-qaid": 'close'
190
- }), useTouchScrollable ? React__namespace.createElement(ScrollLock.TouchScrollable, null, React__namespace.createElement(Content, {
191
- ref: contentRef,
192
- className: classNames.Content,
193
- style: {
194
- padding: padding
195
- }
196
- }, children)) : React__namespace.createElement(Content, {
197
- ref: contentRef,
198
- className: classNames.Content,
199
- style: {
200
- padding: padding
201
- }
202
- }, children)))));
203
- };
204
- var templateObject_1;
205
-
206
- exports.SideOverlay = SideOverlay;
207
-
208
- require('./style.development.css');