@prom-ui/core 1.8.0-alpha.0 → 1.9.0

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 (82) hide show
  1. package/Avatar/cjs/index.development.js +17 -6
  2. package/Avatar/cjs/index.development.v2.js +17 -6
  3. package/Avatar/cjs/index.production.js +1 -1
  4. package/Avatar/cjs/index.production.v2.js +1 -1
  5. package/Avatar/cjs/style.development.css +1 -1
  6. package/Avatar/cjs/style.development.v2.css +1 -1
  7. package/Avatar/cjs/style.production.css +1 -1
  8. package/Avatar/cjs/style.production.v2.css +1 -1
  9. package/Avatar/index.d.ts +2 -0
  10. package/Avatar/package.json +1 -1
  11. package/Backdrop/package.json +1 -1
  12. package/Body/package.json +1 -1
  13. package/BodyContext/package.json +1 -1
  14. package/BodyProvider/package.json +1 -1
  15. package/BodyScrollLock/package.json +1 -1
  16. package/Box/package.json +1 -1
  17. package/Button/package.json +1 -1
  18. package/ButtonPageUp/package.json +1 -1
  19. package/Checkbox/package.json +1 -1
  20. package/Flex/package.json +1 -1
  21. package/Grid/package.json +1 -1
  22. package/Icon/package.json +1 -1
  23. package/Image/package.json +1 -1
  24. package/ImageEmoji/package.json +1 -1
  25. package/Input/package.json +1 -1
  26. package/InputField/package.json +1 -1
  27. package/KeyPress/package.json +1 -1
  28. package/Line/package.json +1 -1
  29. package/Link/package.json +1 -1
  30. package/List/package.json +1 -1
  31. package/Media/package.json +1 -1
  32. package/Modal/cjs/index.development.js +231 -0
  33. package/Modal/cjs/index.development.v2.js +231 -0
  34. package/Modal/cjs/index.production.js +1 -0
  35. package/Modal/cjs/index.production.v2.js +1 -0
  36. package/Modal/cjs/style.development.css +1 -0
  37. package/Modal/cjs/style.development.v2.css +1 -0
  38. package/Modal/cjs/style.production.css +1 -0
  39. package/Modal/cjs/style.production.v2.css +1 -0
  40. package/Modal/index.d.ts +28 -0
  41. package/Modal/index.js +7 -0
  42. package/Modal/index.v2.js +7 -0
  43. package/Modal/package.json +13 -0
  44. package/OutsideClick/package.json +1 -1
  45. package/Overlay/package.json +1 -1
  46. package/PhotoGallery/cjs/index.development.js +89 -18
  47. package/PhotoGallery/cjs/index.development.v2.js +89 -18
  48. package/PhotoGallery/cjs/index.production.js +1 -1
  49. package/PhotoGallery/cjs/index.production.v2.js +1 -1
  50. package/PhotoGallery/components/Header.d.ts +2 -0
  51. package/PhotoGallery/components/MainPhotos.d.ts +2 -1
  52. package/PhotoGallery/components/MainPhotosImage.d.ts +2 -0
  53. package/PhotoGallery/components/PreviewPhotos.d.ts +2 -1
  54. package/PhotoGallery/index.d.ts +3 -0
  55. package/PhotoGallery/package.json +1 -1
  56. package/Picture/package.json +1 -1
  57. package/Portal/package.json +1 -1
  58. package/QRCode/package.json +1 -1
  59. package/Rating/package.json +1 -1
  60. package/RatingSelect/package.json +1 -1
  61. package/SafeQuery/package.json +1 -1
  62. package/Scroll/package.json +1 -1
  63. package/ScrollControls/package.json +1 -1
  64. package/SimpleSlider/package.json +1 -1
  65. package/Skeleton/package.json +1 -1
  66. package/Spinner/package.json +1 -1
  67. package/Text/package.json +1 -1
  68. package/TextEmoji/package.json +1 -1
  69. package/Tooltip/package.json +1 -1
  70. package/Tumbler/package.json +1 -1
  71. package/package.json +2 -2
  72. package/useBodyTTag/package.json +1 -1
  73. package/useBrowserLayoutEffect/package.json +1 -1
  74. package/useDebounce/package.json +1 -1
  75. package/useForwardRef/package.json +1 -1
  76. package/useId/package.json +1 -1
  77. package/useIsMounted/package.json +1 -1
  78. package/useKeyPress/package.json +1 -1
  79. package/useMedia/package.json +1 -1
  80. package/useOutsideClick/package.json +1 -1
  81. package/usePortal/package.json +1 -1
  82. package/useScrollPosition/package.json +1 -1
@@ -120,10 +120,11 @@ function stringAvatar(name) {
120
120
  }).join('');
121
121
  }
122
122
 
123
- var css = {"root":"Avatar__root___ap8QD","image":"Avatar__image___52SeG","text":"Avatar__text___-Fg0p","icon":"Avatar__icon___-JCN2","theme_white":"Avatar__theme_white___VDWp7","theme_black-100":"Avatar__theme_black-100___AQ1tT","theme_violet-300":"Avatar__theme_violet-300___yK-3d","theme_yellow-500":"Avatar__theme_yellow-500___O2My9","theme_multicolor":"Avatar__theme_multicolor___xV5U3"};
123
+ var css = {"root":"Avatar__root___ap8QD","image":"Avatar__image___52SeG","text":"Avatar__text___-Fg0p","icon":"Avatar__icon___-JCN2","theme_white":"Avatar__theme_white___VDWp7","theme_black-100":"Avatar__theme_black-100___AQ1tT","theme_violet-300":"Avatar__theme_violet-300___yK-3d","theme_yellow-500":"Avatar__theme_yellow-500___O2My9","theme_multicolor":"Avatar__theme_multicolor___xV5U3","objectFit_fill":"Avatar__objectFit_fill___MyUzF","objectFit_contain":"Avatar__objectFit_contain___Us7n4","objectFit_cover":"Avatar__objectFit_cover___fwC58","objectFit_scale-down":"Avatar__objectFit_scale-down___s0abY","objectFit_none":"Avatar__objectFit_none___uABHG"};
124
124
 
125
- var _excluded = ["image", "name", "size", "loading", "theme", "className"];
125
+ var _excluded = ["image", "name", "size", "loading", "theme", "objectFit", "className"];
126
126
  var Avatar = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
127
+ var _classNames;
127
128
  var image = _ref.image,
128
129
  name = _ref.name,
129
130
  _ref$size = _ref.size,
@@ -132,6 +133,8 @@ var Avatar = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
132
133
  loading = _ref$loading === void 0 ? 'eager' : _ref$loading,
133
134
  _ref$theme = _ref.theme,
134
135
  theme = _ref$theme === void 0 ? 'violet-300' : _ref$theme,
136
+ _ref$objectFit = _ref.objectFit,
137
+ objectFit = _ref$objectFit === void 0 ? 'cover' : _ref$objectFit,
135
138
  className = _ref.className,
136
139
  props = _objectWithoutProperties(_ref, _excluded);
137
140
  var isImage = !!image;
@@ -145,7 +148,9 @@ var Avatar = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
145
148
  shortName = stringAvatar(trimName);
146
149
  }
147
150
  return /*#__PURE__*/React__namespace.createElement("div", _extends({
148
- className: classNames__default.default(css.root, className, _defineProperty({}, css["theme_".concat(theme)], !isImage))
151
+ className: classNames__default.default(css.root, className, (_classNames = {}, _defineProperty(_classNames, css["theme_".concat(theme)], !isImage), _defineProperty(_classNames, css["objectFit_".concat(objectFit)], true), _classNames)),
152
+ "data-qaid": "avatar",
153
+ "data-testid": "avatar"
149
154
  }, props, {
150
155
  style: {
151
156
  background: bgColor,
@@ -160,12 +165,18 @@ var Avatar = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
160
165
  alt: name,
161
166
  width: size,
162
167
  height: size,
163
- loading: loading
168
+ loading: loading,
169
+ "data-qaid": "avatar_image",
170
+ "data-testid": "avatar_image"
164
171
  }) : /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, !!shortName ? /*#__PURE__*/React__namespace.createElement("span", {
165
- className: css.text
172
+ className: css.text,
173
+ "data-qaid": "avatar_short_name",
174
+ "data-testid": "avatar_short_name"
166
175
  }, shortName) : /*#__PURE__*/React__namespace.createElement(Icon.Icon, {
167
176
  className: css.icon,
168
- "icon-as": User.SvgUser
177
+ "icon-as": User.SvgUser,
178
+ "data-qaid": "avatar_user_icon",
179
+ "data-testid": "avatar_user_icon"
169
180
  })));
170
181
  });
171
182
  Avatar.displayName = 'Avatar';
@@ -120,10 +120,11 @@ function stringAvatar(name) {
120
120
  }).join('');
121
121
  }
122
122
 
123
- var css = {"root":"Avatar__root___G2c2y","image":"Avatar__image___A7F5c","text":"Avatar__text___ZWoLT","icon":"Avatar__icon___sQ5M9","theme_white":"Avatar__theme_white___alKXP","theme_black-100":"Avatar__theme_black-100___mN0Ch","theme_violet-300":"Avatar__theme_violet-300___MEUSj","theme_yellow-500":"Avatar__theme_yellow-500___lfsbh","theme_multicolor":"Avatar__theme_multicolor___zMJTY"};
123
+ var css = {"root":"Avatar__root___G2c2y","image":"Avatar__image___A7F5c","text":"Avatar__text___ZWoLT","icon":"Avatar__icon___sQ5M9","theme_white":"Avatar__theme_white___alKXP","theme_black-100":"Avatar__theme_black-100___mN0Ch","theme_violet-300":"Avatar__theme_violet-300___MEUSj","theme_yellow-500":"Avatar__theme_yellow-500___lfsbh","theme_multicolor":"Avatar__theme_multicolor___zMJTY","objectFit_fill":"Avatar__objectFit_fill___SpfXf","objectFit_contain":"Avatar__objectFit_contain___XuTkK","objectFit_cover":"Avatar__objectFit_cover___aNZ54","objectFit_scale-down":"Avatar__objectFit_scale-down___FacDj","objectFit_none":"Avatar__objectFit_none___maThn"};
124
124
 
125
- var _excluded = ["image", "name", "size", "loading", "theme", "className"];
125
+ var _excluded = ["image", "name", "size", "loading", "theme", "objectFit", "className"];
126
126
  var Avatar = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
127
+ var _classNames;
127
128
  var image = _ref.image,
128
129
  name = _ref.name,
129
130
  _ref$size = _ref.size,
@@ -132,6 +133,8 @@ var Avatar = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
132
133
  loading = _ref$loading === void 0 ? 'eager' : _ref$loading,
133
134
  _ref$theme = _ref.theme,
134
135
  theme = _ref$theme === void 0 ? 'violet-300' : _ref$theme,
136
+ _ref$objectFit = _ref.objectFit,
137
+ objectFit = _ref$objectFit === void 0 ? 'cover' : _ref$objectFit,
135
138
  className = _ref.className,
136
139
  props = _objectWithoutProperties(_ref, _excluded);
137
140
  var isImage = !!image;
@@ -145,7 +148,9 @@ var Avatar = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
145
148
  shortName = stringAvatar(trimName);
146
149
  }
147
150
  return /*#__PURE__*/React__namespace.createElement("div", _extends({
148
- className: classNames__default.default(css.root, className, _defineProperty({}, css["theme_".concat(theme)], !isImage))
151
+ className: classNames__default.default(css.root, className, (_classNames = {}, _defineProperty(_classNames, css["theme_".concat(theme)], !isImage), _defineProperty(_classNames, css["objectFit_".concat(objectFit)], true), _classNames)),
152
+ "data-qaid": "avatar",
153
+ "data-testid": "avatar"
149
154
  }, props, {
150
155
  style: {
151
156
  background: bgColor,
@@ -160,12 +165,18 @@ var Avatar = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
160
165
  alt: name,
161
166
  width: size,
162
167
  height: size,
163
- loading: loading
168
+ loading: loading,
169
+ "data-qaid": "avatar_image",
170
+ "data-testid": "avatar_image"
164
171
  }) : /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, !!shortName ? /*#__PURE__*/React__namespace.createElement("span", {
165
- className: css.text
172
+ className: css.text,
173
+ "data-qaid": "avatar_short_name",
174
+ "data-testid": "avatar_short_name"
166
175
  }, shortName) : /*#__PURE__*/React__namespace.createElement(Icon.Icon, {
167
176
  className: css.icon,
168
- "icon-as": User.SvgUser
177
+ "icon-as": User.SvgUser,
178
+ "data-qaid": "avatar_user_icon",
179
+ "data-testid": "avatar_user_icon"
169
180
  })));
170
181
  });
171
182
  Avatar.displayName = 'Avatar';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("classnames"),r=require("@prom-ui/core/Icon"),n=require("@prom-ui/icons/User");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function o(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 n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var a=o(e),c=i(t);function l(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}function f(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var s={root:"ap8QD",image:"_52SeG",text:"-Fg0p",icon:"-JCN2",theme_white:"VDWp7","theme_black-100":"AQ1tT","theme_violet-300":"yK-3d","theme_yellow-500":"O2My9",theme_multicolor:"xV5U3"},m=["image","name","size","loading","theme","className"],p=a.forwardRef((function(e,t){var i=e.image,o=e.name,p=e.size,v=void 0===p?40:p,g=e.loading,b=void 0===g?"eager":g,d=e.theme,y=void 0===d?"violet-300":d,h=e.className,O=f(e,m),j=!!i,w=void 0,N=null;if(!j){var P=o?o.trim():"";"multicolor"===y&&(w=function(e){var t,r=0;for(t=0;t<e.length;t+=1)r=e.charCodeAt(t)+((r<<5)-r);var n="#";for(t=0;t<3;t+=1)n+="00".concat((r>>8*t&255).toString(16)).slice(-2);return n}(P)),N=function(e){return e.split(" ").slice(0,2).map((function(e){return e[0]})).join("")}(P)}return a.createElement("div",u({className:c.default(s.root,h,l({},s["theme_".concat(y)],!j))},O,{style:{background:w,width:v,height:v,fontSize:v/2.2},ref:t}),j?a.createElement("img",{className:s.image,src:i,alt:o,width:v,height:v,loading:b}):a.createElement(a.Fragment,null,N?a.createElement("span",{className:s.text},N):a.createElement(r.Icon,{className:s.icon,"icon-as":n.SvgUser})))}));p.displayName="Avatar",exports.Avatar=p,require("./style.production.css");
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("classnames"),r=require("@prom-ui/core/Icon"),a=require("@prom-ui/icons/User");function i(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 a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var o=n(e),c=i(t);function l(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},u.apply(this,arguments)}function s(e,t){if(null==e)return{};var r,a,i=function(e,t){if(null==e)return{};var r,a,i={},n=Object.keys(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var f={root:"ap8QD",image:"_52SeG",text:"-Fg0p",icon:"-JCN2",theme_white:"VDWp7","theme_black-100":"AQ1tT","theme_violet-300":"yK-3d","theme_yellow-500":"O2My9",theme_multicolor:"xV5U3",objectFit_fill:"MyUzF",objectFit_contain:"Us7n4",objectFit_cover:"fwC58","objectFit_scale-down":"s0abY",objectFit_none:"uABHG"},m=["image","name","size","loading","theme","objectFit","className"],d=o.forwardRef((function(e,t){var i,n=e.image,d=e.name,v=e.size,b=void 0===v?40:v,p=e.loading,g=void 0===p?"eager":p,y=e.theme,j=void 0===y?"violet-300":y,h=e.objectFit,_=void 0===h?"cover":h,O=e.className,w=s(e,m),F=!!n,q=void 0,N=null;if(!F){var P=d?d.trim():"";"multicolor"===j&&(q=function(e){var t,r=0;for(t=0;t<e.length;t+=1)r=e.charCodeAt(t)+((r<<5)-r);var a="#";for(t=0;t<3;t+=1)a+="00".concat((r>>8*t&255).toString(16)).slice(-2);return a}(P)),N=function(e){return e.split(" ").slice(0,2).map((function(e){return e[0]})).join("")}(P)}return o.createElement("div",u({className:c.default(f.root,O,(i={},l(i,f["theme_".concat(j)],!F),l(i,f["objectFit_".concat(_)],!0),i)),"data-qaid":"avatar","data-testid":"avatar"},w,{style:{background:q,width:b,height:b,fontSize:b/2.2},ref:t}),F?o.createElement("img",{className:f.image,src:n,alt:d,width:b,height:b,loading:g,"data-qaid":"avatar_image","data-testid":"avatar_image"}):o.createElement(o.Fragment,null,N?o.createElement("span",{className:f.text,"data-qaid":"avatar_short_name","data-testid":"avatar_short_name"},N):o.createElement(r.Icon,{className:f.icon,"icon-as":a.SvgUser,"data-qaid":"avatar_user_icon","data-testid":"avatar_user_icon"})))}));d.displayName="Avatar",exports.Avatar=d,require("./style.production.css");
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("classnames"),r=require("@prom-ui/core/Icon"),n=require("@prom-ui/icons/User");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function o(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 n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var a=o(e),c=i(t);function l(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}function f(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var s={root:"G2c2y",image:"A7F5c",text:"ZWoLT",icon:"sQ5M9",theme_white:"alKXP","theme_black-100":"mN0Ch","theme_violet-300":"MEUSj","theme_yellow-500":"lfsbh",theme_multicolor:"zMJTY"},m=["image","name","size","loading","theme","className"],v=a.forwardRef((function(e,t){var i=e.image,o=e.name,v=e.size,b=void 0===v?40:v,p=e.loading,g=void 0===p?"eager":p,d=e.theme,y=void 0===d?"violet-300":d,h=e.className,j=f(e,m),O=!!i,w=void 0,P=null;if(!O){var E=o?o.trim():"";"multicolor"===y&&(w=function(e){var t,r=0;for(t=0;t<e.length;t+=1)r=e.charCodeAt(t)+((r<<5)-r);var n="#";for(t=0;t<3;t+=1)n+="00".concat((r>>8*t&255).toString(16)).slice(-2);return n}(E)),P=function(e){return e.split(" ").slice(0,2).map((function(e){return e[0]})).join("")}(E)}return a.createElement("div",u({className:c.default(s.root,h,l({},s["theme_".concat(y)],!O))},j,{style:{background:w,width:b,height:b,fontSize:b/2.2},ref:t}),O?a.createElement("img",{className:s.image,src:i,alt:o,width:b,height:b,loading:g}):a.createElement(a.Fragment,null,P?a.createElement("span",{className:s.text},P):a.createElement(r.Icon,{className:s.icon,"icon-as":n.SvgUser})))}));v.displayName="Avatar",exports.Avatar=v,require("./style.production.v2.css");
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("classnames"),r=require("@prom-ui/core/Icon"),a=require("@prom-ui/icons/User");function i(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 a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var o=n(e),c=i(t);function l(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},u.apply(this,arguments)}function s(e,t){if(null==e)return{};var r,a,i=function(e,t){if(null==e)return{};var r,a,i={},n=Object.keys(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var f={root:"G2c2y",image:"A7F5c",text:"ZWoLT",icon:"sQ5M9",theme_white:"alKXP","theme_black-100":"mN0Ch","theme_violet-300":"MEUSj","theme_yellow-500":"lfsbh",theme_multicolor:"zMJTY",objectFit_fill:"SpfXf",objectFit_contain:"XuTkK",objectFit_cover:"aNZ54","objectFit_scale-down":"FacDj",objectFit_none:"maThn"},m=["image","name","size","loading","theme","objectFit","className"],d=o.forwardRef((function(e,t){var i,n=e.image,d=e.name,v=e.size,b=void 0===v?40:v,g=e.loading,p=void 0===g?"eager":g,h=e.theme,j=void 0===h?"violet-300":h,y=e.objectFit,_=void 0===y?"cover":y,O=e.className,w=s(e,m),F=!!n,N=void 0,P=null;if(!F){var S=d?d.trim():"";"multicolor"===j&&(N=function(e){var t,r=0;for(t=0;t<e.length;t+=1)r=e.charCodeAt(t)+((r<<5)-r);var a="#";for(t=0;t<3;t+=1)a+="00".concat((r>>8*t&255).toString(16)).slice(-2);return a}(S)),P=function(e){return e.split(" ").slice(0,2).map((function(e){return e[0]})).join("")}(S)}return o.createElement("div",u({className:c.default(f.root,O,(i={},l(i,f["theme_".concat(j)],!F),l(i,f["objectFit_".concat(_)],!0),i)),"data-qaid":"avatar","data-testid":"avatar"},w,{style:{background:N,width:b,height:b,fontSize:b/2.2},ref:t}),F?o.createElement("img",{className:f.image,src:n,alt:d,width:b,height:b,loading:p,"data-qaid":"avatar_image","data-testid":"avatar_image"}):o.createElement(o.Fragment,null,P?o.createElement("span",{className:f.text,"data-qaid":"avatar_short_name","data-testid":"avatar_short_name"},P):o.createElement(r.Icon,{className:f.icon,"icon-as":a.SvgUser,"data-qaid":"avatar_user_icon","data-testid":"avatar_user_icon"})))}));d.displayName="Avatar",exports.Avatar=d,require("./style.production.v2.css");
@@ -1 +1 @@
1
- .Avatar__root___ap8QD{display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:50%;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;font-weight:700;text-transform:uppercase;box-sizing:border-box;font-size:14px}.Avatar__image___52SeG{display:block;font-size:0;-o-object-fit:cover;object-fit:cover;background:var(--black-100)}.Avatar__text___-Fg0p{font-size:max(8px,min(1em,14px))}.Avatar__icon___-JCN2{width:60%;height:60%;max-width:24px;max-height:24px}.Avatar__theme_white___VDWp7{background:var(--white);color:var(--black-800)}.Avatar__theme_black-100___AQ1tT{background:var(--black-100);color:var(--black-800)}.Avatar__theme_violet-300___yK-3d{background:var(--violet-300);color:var(--white)}.Avatar__theme_yellow-500___O2My9{background:var(--yellow-500);color:var(--black-900)}.Avatar__theme_multicolor___xV5U3{color:#fff}
1
+ .Avatar__root___ap8QD{display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:50%;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;font-weight:700;text-transform:uppercase;box-sizing:border-box;font-size:14px}.Avatar__image___52SeG{display:block;font-size:0;background:var(--black-100)}.Avatar__text___-Fg0p{font-size:max(8px,min(1em,14px))}.Avatar__icon___-JCN2{width:60%;height:60%;max-width:24px;max-height:24px}.Avatar__theme_white___VDWp7{background:var(--white);color:var(--black-800)}.Avatar__theme_black-100___AQ1tT{background:var(--black-100);color:var(--black-800)}.Avatar__theme_violet-300___yK-3d{background:var(--violet-300);color:var(--white)}.Avatar__theme_yellow-500___O2My9{background:var(--yellow-500);color:var(--black-900)}.Avatar__theme_multicolor___xV5U3{color:#fff}.Avatar__objectFit_fill___MyUzF .Avatar__image___52SeG{-o-object-fit:fill;object-fit:fill}.Avatar__objectFit_contain___Us7n4 .Avatar__image___52SeG{-o-object-fit:contain;object-fit:contain}.Avatar__objectFit_cover___fwC58 .Avatar__image___52SeG{-o-object-fit:cover;object-fit:cover}.Avatar__objectFit_scale-down___s0abY .Avatar__image___52SeG{-o-object-fit:scale-down;object-fit:scale-down}.Avatar__objectFit_none___uABHG .Avatar__image___52SeG{-o-object-fit:none;object-fit:none}
@@ -1 +1 @@
1
- .Avatar__root___G2c2y{display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:50%;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;font-weight:700;text-transform:uppercase;box-sizing:border-box;font-size:14px}.Avatar__image___A7F5c{display:block;font-size:0;-o-object-fit:cover;object-fit:cover;background:var(--black-100)}.Avatar__text___ZWoLT{font-size:max(8px,min(1em,14px))}.Avatar__icon___sQ5M9{width:60%;height:60%;max-width:24px;max-height:24px}.Avatar__theme_white___alKXP{background:var(--white);color:var(--black-800)}.Avatar__theme_black-100___mN0Ch{background:var(--black-100);color:var(--black-800)}.Avatar__theme_violet-300___MEUSj{background:var(--violet-300);color:var(--white)}.Avatar__theme_yellow-500___lfsbh{background:var(--yellow-500);color:var(--black-900)}.Avatar__theme_multicolor___zMJTY{color:#fff}
1
+ .Avatar__root___G2c2y{display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:50%;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;font-weight:700;text-transform:uppercase;box-sizing:border-box;font-size:14px}.Avatar__image___A7F5c{display:block;font-size:0;background:var(--black-100)}.Avatar__text___ZWoLT{font-size:max(8px,min(1em,14px))}.Avatar__icon___sQ5M9{width:60%;height:60%;max-width:24px;max-height:24px}.Avatar__theme_white___alKXP{background:var(--white);color:var(--black-800)}.Avatar__theme_black-100___mN0Ch{background:var(--black-100);color:var(--black-800)}.Avatar__theme_violet-300___MEUSj{background:var(--violet-300);color:var(--white)}.Avatar__theme_yellow-500___lfsbh{background:var(--yellow-500);color:var(--black-900)}.Avatar__theme_multicolor___zMJTY{color:#fff}.Avatar__objectFit_fill___SpfXf .Avatar__image___A7F5c{-o-object-fit:fill;object-fit:fill}.Avatar__objectFit_contain___XuTkK .Avatar__image___A7F5c{-o-object-fit:contain;object-fit:contain}.Avatar__objectFit_cover___aNZ54 .Avatar__image___A7F5c{-o-object-fit:cover;object-fit:cover}.Avatar__objectFit_scale-down___FacDj .Avatar__image___A7F5c{-o-object-fit:scale-down;object-fit:scale-down}.Avatar__objectFit_none___maThn .Avatar__image___A7F5c{-o-object-fit:none;object-fit:none}
@@ -1 +1 @@
1
- .ap8QD{display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:50%;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;font-weight:700;text-transform:uppercase;box-sizing:border-box;font-size:14px}._52SeG{display:block;font-size:0;-o-object-fit:cover;object-fit:cover;background:var(--black-100)}.-Fg0p{font-size:max(8px,min(1em,14px))}.-JCN2{width:60%;height:60%;max-width:24px;max-height:24px}.VDWp7{background:var(--white);color:var(--black-800)}.AQ1tT{background:var(--black-100);color:var(--black-800)}.yK-3d{background:var(--violet-300);color:var(--white)}.O2My9{background:var(--yellow-500);color:var(--black-900)}.xV5U3{color:#fff}
1
+ .ap8QD{display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:50%;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;font-weight:700;text-transform:uppercase;box-sizing:border-box;font-size:14px}._52SeG{display:block;font-size:0;background:var(--black-100)}.-Fg0p{font-size:max(8px,min(1em,14px))}.-JCN2{width:60%;height:60%;max-width:24px;max-height:24px}.VDWp7{background:var(--white);color:var(--black-800)}.AQ1tT{background:var(--black-100);color:var(--black-800)}.yK-3d{background:var(--violet-300);color:var(--white)}.O2My9{background:var(--yellow-500);color:var(--black-900)}.xV5U3{color:#fff}.MyUzF ._52SeG{-o-object-fit:fill;object-fit:fill}.Us7n4 ._52SeG{-o-object-fit:contain;object-fit:contain}.fwC58 ._52SeG{-o-object-fit:cover;object-fit:cover}.s0abY ._52SeG{-o-object-fit:scale-down;object-fit:scale-down}.uABHG ._52SeG{-o-object-fit:none;object-fit:none}
@@ -1 +1 @@
1
- .G2c2y{display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:50%;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;font-weight:700;text-transform:uppercase;box-sizing:border-box;font-size:14px}.A7F5c{display:block;font-size:0;-o-object-fit:cover;object-fit:cover;background:var(--black-100)}.ZWoLT{font-size:max(8px,min(1em,14px))}.sQ5M9{width:60%;height:60%;max-width:24px;max-height:24px}.alKXP{background:var(--white);color:var(--black-800)}.mN0Ch{background:var(--black-100);color:var(--black-800)}.MEUSj{background:var(--violet-300);color:var(--white)}.lfsbh{background:var(--yellow-500);color:var(--black-900)}.zMJTY{color:#fff}
1
+ .G2c2y{display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:50%;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;font-weight:700;text-transform:uppercase;box-sizing:border-box;font-size:14px}.A7F5c{display:block;font-size:0;background:var(--black-100)}.ZWoLT{font-size:max(8px,min(1em,14px))}.sQ5M9{width:60%;height:60%;max-width:24px;max-height:24px}.alKXP{background:var(--white);color:var(--black-800)}.mN0Ch{background:var(--black-100);color:var(--black-800)}.MEUSj{background:var(--violet-300);color:var(--white)}.lfsbh{background:var(--yellow-500);color:var(--black-900)}.zMJTY{color:#fff}.SpfXf .A7F5c{-o-object-fit:fill;object-fit:fill}.XuTkK .A7F5c{-o-object-fit:contain;object-fit:contain}.aNZ54 .A7F5c{-o-object-fit:cover;object-fit:cover}.FacDj .A7F5c{-o-object-fit:scale-down;object-fit:scale-down}.maThn .A7F5c{-o-object-fit:none;object-fit:none}
package/Avatar/index.d.ts CHANGED
@@ -10,5 +10,7 @@ export type AvatarProps = React.ComponentPropsWithRef<'div'> & {
10
10
  theme?: 'white' | 'black-100' | 'violet-300' | 'yellow-500' | 'multicolor';
11
11
  /** Отложенная загрузка изображения */
12
12
  loading?: 'lazy' | 'eager';
13
+ /** Определяет, как изображение должно заполнять контейнер относительно его высоты и ширины. */
14
+ objectFit?: 'fill' | 'contain' | 'cover' | 'scale-down' | 'none';
13
15
  };
14
16
  export declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Avatar",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
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/Backdrop",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
package/Body/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Body",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
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/BodyContext",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
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/BodyProvider",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
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/BodyScrollLock",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
package/Box/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Box",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
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/Button",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
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/ButtonPageUp",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
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/Checkbox",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
package/Flex/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Flex",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
package/Grid/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Grid",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
package/Icon/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Icon",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
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/Image",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
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/ImageEmoji",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
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/Input",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
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/InputField",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
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/KeyPress",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
package/Line/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Line",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
package/Link/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Link",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
package/List/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/List",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
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/Media",
3
- "version": "1.8.0-alpha.0",
3
+ "version": "1.9.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -0,0 +1,231 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+ var reactTransitionGroup = require('react-transition-group');
7
+ var classNames = require('classnames');
8
+ var Backdrop = require('@prom-ui/core/Backdrop');
9
+ var Button = require('@prom-ui/core/Button');
10
+ var Icon = require('@prom-ui/core/Icon');
11
+ var KeyPress = require('@prom-ui/core/KeyPress');
12
+ var Portal = require('@prom-ui/core/Portal');
13
+ var useBodyTTag = require('@prom-ui/core/useBodyTTag');
14
+ var Close = require('@prom-ui/icons/Close');
15
+
16
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
17
+
18
+ function _interopNamespaceCompat(e) {
19
+ if (e && typeof e === 'object' && 'default' in e) return e;
20
+ var n = Object.create(null);
21
+ if (e) {
22
+ Object.keys(e).forEach(function (k) {
23
+ if (k !== 'default') {
24
+ var d = Object.getOwnPropertyDescriptor(e, k);
25
+ Object.defineProperty(n, k, d.get ? d : {
26
+ enumerable: true,
27
+ get: function () { return e[k]; }
28
+ });
29
+ }
30
+ });
31
+ }
32
+ n.default = e;
33
+ return Object.freeze(n);
34
+ }
35
+
36
+ var React__namespace = /*#__PURE__*/_interopNamespaceCompat(React);
37
+ var classNames__default = /*#__PURE__*/_interopDefaultCompat(classNames);
38
+
39
+ function ownKeys(object, enumerableOnly) {
40
+ var keys = Object.keys(object);
41
+ if (Object.getOwnPropertySymbols) {
42
+ var symbols = Object.getOwnPropertySymbols(object);
43
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
44
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
45
+ })), keys.push.apply(keys, symbols);
46
+ }
47
+ return keys;
48
+ }
49
+ function _objectSpread2(target) {
50
+ for (var i = 1; i < arguments.length; i++) {
51
+ var source = null != arguments[i] ? arguments[i] : {};
52
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
53
+ _defineProperty(target, key, source[key]);
54
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
55
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
56
+ });
57
+ }
58
+ return target;
59
+ }
60
+ function _defineProperty(obj, key, value) {
61
+ key = _toPropertyKey(key);
62
+ if (key in obj) {
63
+ Object.defineProperty(obj, key, {
64
+ value: value,
65
+ enumerable: true,
66
+ configurable: true,
67
+ writable: true
68
+ });
69
+ } else {
70
+ obj[key] = value;
71
+ }
72
+ return obj;
73
+ }
74
+ function _extends() {
75
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
76
+ for (var i = 1; i < arguments.length; i++) {
77
+ var source = arguments[i];
78
+ for (var key in source) {
79
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
80
+ target[key] = source[key];
81
+ }
82
+ }
83
+ }
84
+ return target;
85
+ };
86
+ return _extends.apply(this, arguments);
87
+ }
88
+ function _objectWithoutPropertiesLoose(source, excluded) {
89
+ if (source == null) return {};
90
+ var target = {};
91
+ var sourceKeys = Object.keys(source);
92
+ var key, i;
93
+ for (i = 0; i < sourceKeys.length; i++) {
94
+ key = sourceKeys[i];
95
+ if (excluded.indexOf(key) >= 0) continue;
96
+ target[key] = source[key];
97
+ }
98
+ return target;
99
+ }
100
+ function _objectWithoutProperties(source, excluded) {
101
+ if (source == null) return {};
102
+ var target = _objectWithoutPropertiesLoose(source, excluded);
103
+ var key, i;
104
+ if (Object.getOwnPropertySymbols) {
105
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
106
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
107
+ key = sourceSymbolKeys[i];
108
+ if (excluded.indexOf(key) >= 0) continue;
109
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
110
+ target[key] = source[key];
111
+ }
112
+ }
113
+ return target;
114
+ }
115
+ function _taggedTemplateLiteral(strings, raw) {
116
+ if (!raw) {
117
+ raw = strings.slice(0);
118
+ }
119
+ return Object.freeze(Object.defineProperties(strings, {
120
+ raw: {
121
+ value: Object.freeze(raw)
122
+ }
123
+ }));
124
+ }
125
+ function _toPrimitive(input, hint) {
126
+ if (typeof input !== "object" || input === null) return input;
127
+ var prim = input[Symbol.toPrimitive];
128
+ if (prim !== undefined) {
129
+ var res = prim.call(input, hint || "default");
130
+ if (typeof res !== "object") return res;
131
+ throw new TypeError("@@toPrimitive must return a primitive value.");
132
+ }
133
+ return (hint === "string" ? String : Number)(input);
134
+ }
135
+ function _toPropertyKey(arg) {
136
+ var key = _toPrimitive(arg, "string");
137
+ return typeof key === "symbol" ? key : String(key);
138
+ }
139
+
140
+ var css = {"root":"Modal__root___LXzJW","closeButton":"Modal__closeButton___IfZSD","rootContent":"Modal__rootContent___p62nO","enter":"Modal__enter___CYsVE","exit":"Modal__exit___-sfQK","enterActive":"Modal__enterActive___Q3lip","exitActive":"Modal__exitActive___2XLH4"};
141
+
142
+ var _templateObject;
143
+ var _excluded = ["isOpen", "isRenderPortal", "isBodyScrollLock", "isShowCloseButton", "zIndex", "width", "height", "padding", "onClose", "className", "style", "children"];
144
+ var Modal = function Modal(_ref) {
145
+ var _ref$isOpen = _ref.isOpen,
146
+ isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
147
+ _ref$isRenderPortal = _ref.isRenderPortal,
148
+ isRenderPortal = _ref$isRenderPortal === void 0 ? true : _ref$isRenderPortal,
149
+ _ref$isBodyScrollLock = _ref.isBodyScrollLock,
150
+ isBodyScrollLock = _ref$isBodyScrollLock === void 0 ? true : _ref$isBodyScrollLock,
151
+ _ref$isShowCloseButto = _ref.isShowCloseButton,
152
+ isShowCloseButton = _ref$isShowCloseButto === void 0 ? true : _ref$isShowCloseButto,
153
+ _ref$zIndex = _ref.zIndex,
154
+ zIndex = _ref$zIndex === void 0 ? 5000 : _ref$zIndex,
155
+ _ref$width = _ref.width,
156
+ width = _ref$width === void 0 ? 'auto' : _ref$width,
157
+ _ref$height = _ref.height,
158
+ height = _ref$height === void 0 ? 'auto' : _ref$height,
159
+ _ref$padding = _ref.padding,
160
+ padding = _ref$padding === void 0 ? 36 : _ref$padding,
161
+ onClose = _ref.onClose,
162
+ className = _ref.className,
163
+ style = _ref.style,
164
+ children = _ref.children,
165
+ props = _objectWithoutProperties(_ref, _excluded);
166
+ var _useBodyTTag = useBodyTTag.useBodyTTag(),
167
+ t = _useBodyTTag.t;
168
+ var onClickOutside = function onClickOutside(e) {
169
+ if (e.target === e.currentTarget) {
170
+ onClose(e);
171
+ }
172
+ };
173
+ return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Backdrop.Backdrop, {
174
+ isOpen: isOpen,
175
+ zIndex: zIndex,
176
+ isRenderPortal: isRenderPortal,
177
+ isBodyScrollLock: isBodyScrollLock
178
+ }), /*#__PURE__*/React__namespace.createElement(reactTransitionGroup.CSSTransition, {
179
+ "in": isOpen,
180
+ timeout: 240,
181
+ classNames: css,
182
+ unmountOnExit: true
183
+ }, /*#__PURE__*/React__namespace.createElement(Portal.Portal, {
184
+ isActive: isRenderPortal
185
+ }, /*#__PURE__*/React__namespace.createElement(KeyPress.KeyPress, {
186
+ code: "Escape",
187
+ onKeyDown: onClose
188
+ }), /*#__PURE__*/React__namespace.createElement("div", {
189
+ className: css.root,
190
+ role: "dialog",
191
+ "aria-modal": true,
192
+ "aria-labelledby": undefined,
193
+ style: {
194
+ zIndex: zIndex
195
+ },
196
+ onClick: onClickOutside,
197
+ "data-qaid": 'modal' ,
198
+ "data-testid": 'modal'
199
+ }, /*#__PURE__*/React__namespace.createElement("div", _extends({
200
+ className: classNames__default.default(css.rootContent, className),
201
+ style: _objectSpread2({
202
+ width: width,
203
+ height: height,
204
+ padding: padding
205
+ }, style)
206
+ }, props, {
207
+ "data-qaid": "modal_content",
208
+ "data-testid": "modal_content"
209
+ }), children, isShowCloseButton && /*#__PURE__*/React__namespace.createElement("div", {
210
+ className: css.closeButton
211
+ }, /*#__PURE__*/React__namespace.createElement(Button.Button, {
212
+ "button-theme": "black-inherit",
213
+ "button-padding": "xxs",
214
+ type: "button",
215
+ onClick: onClose,
216
+ "aria-label": t(_templateObject || (_templateObject = _taggedTemplateLiteral(["\u0417\u0430\u043A\u0440\u044B\u0442\u044C"]))),
217
+ "data-qaid": "modal_close_button",
218
+ "data-testid": "modal_close_button"
219
+ }, /*#__PURE__*/React__namespace.createElement(Icon.Icon, {
220
+ "icon-as": Close.SvgClose,
221
+ style: {
222
+ width: 24,
223
+ height: 24
224
+ }
225
+ }))))))));
226
+ };
227
+ Modal.displayName = 'Modal';
228
+
229
+ exports.Modal = Modal;
230
+
231
+ require('./style.development.css');