ui-kit-ck-consultant 0.5.272 → 0.5.274

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.
@@ -80,12 +80,6 @@ var Modal = /*#__PURE__*/function (_React$Component) {
80
80
  var _proto = Modal.prototype;
81
81
 
82
82
  _proto.componentDidMount = function componentDidMount() {
83
- if (this.props.show) {
84
- document.body.style.overflow = 'hidden';
85
- } else {
86
- document.body.style.overflow = 'unset';
87
- }
88
-
89
83
  window.addEventListener('mouseup', this.handleMouseUp);
90
84
  };
91
85
 
@@ -116,7 +110,7 @@ var Modal = /*#__PURE__*/function (_React$Component) {
116
110
  }
117
111
 
118
112
  var modalContainerClass = classNames$1((_classNames = {}, _classNames[style.large] = !!this.props.large, _classNames[style.no_background] = !!this.props.noBackground, _classNames), style.modal_container, this.props.className);
119
- return /*#__PURE__*/React.createElement("div", {
113
+ return /*#__PURE__*/React.createElement(Fragment, null, this.props.show ? /*#__PURE__*/React.createElement("style", null, "body {overflow: \"hidden\" }") : null, /*#__PURE__*/React.createElement("div", {
120
114
  className: style.modal,
121
115
  onMouseDown: function onMouseDown(e) {
122
116
  return _this2.handleClickModal(e);
@@ -155,7 +149,7 @@ var Modal = /*#__PURE__*/function (_React$Component) {
155
149
  className: style.modal_header
156
150
  }, /*#__PURE__*/React.createElement("h2", null, this.props.title)), /*#__PURE__*/React.createElement("div", {
157
151
  className: style.modal_body
158
- }, this.props.children)));
152
+ }, this.props.children))));
159
153
  };
160
154
 
161
155
  return Modal;
@@ -170,22 +164,12 @@ var FullModal = /*#__PURE__*/function (_React$Component) {
170
164
 
171
165
  var _proto = FullModal.prototype;
172
166
 
173
- _proto.componentDidUpdate = function componentDidUpdate() {
174
- if (this.props.show) {
175
- document.documentElement.style.overflow = 'hidden';
176
- document.body.style.overflow = 'hidden';
177
- } else {
178
- document.documentElement.style.overflow = 'unset';
179
- document.body.style.overflow = 'unset';
180
- }
181
- };
182
-
183
167
  _proto.render = function render() {
184
168
  if (!this.props.show) {
185
169
  return null;
186
170
  }
187
171
 
188
- return /*#__PURE__*/React.createElement("div", {
172
+ return /*#__PURE__*/React.createElement(Fragment, null, this.props.show ? /*#__PURE__*/React.createElement("style", null, "body {overflow: \"hidden\" }") : null, /*#__PURE__*/React.createElement("div", {
189
173
  className: classNames$1(style.modal, this.props.className)
190
174
  }, /*#__PURE__*/React.createElement("div", {
191
175
  className: style.full_modal_container
@@ -209,7 +193,7 @@ var FullModal = /*#__PURE__*/function (_React$Component) {
209
193
  className: style.full_modal_header
210
194
  }, /*#__PURE__*/React.createElement("h2", null, this.props.title)) : null, /*#__PURE__*/React.createElement("div", {
211
195
  className: classNames$1(this.props.noPadding ? style.full_modal_body_no_padding : style.full_modal_body, this.props.noOverflow ? style.full_modal_body_no_overflow : {})
212
- }, this.props.children)));
196
+ }, this.props.children))));
213
197
  };
214
198
 
215
199
  return FullModal;
@@ -1083,121 +1067,11 @@ var Header = /*#__PURE__*/function (_React$Component) {
1083
1067
  _inheritsLoose(Header, _React$Component);
1084
1068
 
1085
1069
  function Header() {
1086
- var _this;
1087
-
1088
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1089
- args[_key] = arguments[_key];
1090
- }
1091
-
1092
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
1093
-
1094
- _this.snowflake = function () {
1095
- var COUNT = 10;
1096
- var masthead = document.querySelector('.sky');
1097
- var canvas = document.createElement('canvas');
1098
- var ctx = canvas.getContext('2d');
1099
- var width = masthead.clientWidth;
1100
- var height = masthead.clientHeight;
1101
- var i = 0;
1102
- var active = false;
1103
-
1104
- function onResize() {
1105
- width = masthead.clientWidth;
1106
- height = masthead.clientHeight;
1107
- canvas.width = width;
1108
- canvas.height = height;
1109
- ctx.fillStyle = '#FFF';
1110
- var wasActive = active;
1111
- active = width > 600;
1112
- if (!wasActive && active) requestAnimFrame(update);
1113
- }
1114
-
1115
- var Snowflake = function Snowflake() {
1116
- this.x = 0;
1117
- this.y = 0;
1118
- this.vy = 0;
1119
- this.vx = 0;
1120
- this.r = 0;
1121
- this.reset();
1122
- };
1123
-
1124
- Snowflake.prototype.reset = function () {
1125
- this.x = Math.random() * width;
1126
- this.y = Math.random() * -height;
1127
- this.vy = 0.18 + Math.random() * 1.5;
1128
- this.vx = 0.65 - Math.random();
1129
- this.r = 1 + Math.random() * 3;
1130
- this.o = 0.5 + Math.random() * 0.5;
1131
- };
1132
-
1133
- canvas.style.position = 'absolute';
1134
- canvas.style.left = canvas.style.top = '0';
1135
- var snowflakes = [],
1136
- snowflake;
1137
-
1138
- for (i = 0; i < COUNT; i++) {
1139
- snowflake = new Snowflake();
1140
- snowflake.reset();
1141
- snowflakes.push(snowflake);
1142
- }
1143
-
1144
- function update() {
1145
- ctx.clearRect(0, 0, width, height);
1146
- if (!active) return;
1147
-
1148
- for (i = 0; i < COUNT; i++) {
1149
- snowflake = snowflakes[i];
1150
- snowflake.y += snowflake.vy;
1151
- snowflake.x += snowflake.vx;
1152
- ctx.globalAlpha = snowflake.o;
1153
- ctx.beginPath();
1154
- var x = snowflake.x;
1155
- var y = snowflake.y;
1156
-
1157
- var _width = 10 * snowflake.r;
1158
-
1159
- var _height = 10 * snowflake.r;
1160
-
1161
- var topCurveHeight = _height * 0.3;
1162
- ctx.moveTo(x, y + topCurveHeight);
1163
- ctx.bezierCurveTo(x, y, x - _width / 2, y, x - _width / 2, y + topCurveHeight);
1164
- ctx.bezierCurveTo(x - _width / 2, y + (_height + topCurveHeight) / 2, x, y + (_height + topCurveHeight) / 2, x, y + _height);
1165
- ctx.bezierCurveTo(x, y + (_height + topCurveHeight) / 2, x + _width / 2, y + (_height + topCurveHeight) / 2, x + _width / 2, y + topCurveHeight);
1166
- ctx.bezierCurveTo(x + _width / 2, y, x, y, x, y + topCurveHeight);
1167
- ctx.closePath();
1168
- ctx.fillStyle = "rgba(255, 20, 20, 0.5)";
1169
- ctx.fill();
1170
- ctx.closePath();
1171
- ctx.fill();
1172
-
1173
- if (snowflake.y > _height * 4) {
1174
- snowflake.reset();
1175
- }
1176
- }
1177
-
1178
- requestAnimFrame(update);
1179
- }
1180
-
1181
- window.requestAnimFrame = function () {
1182
- return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {
1183
- window.setTimeout(callback, 1000 / 10);
1184
- };
1185
- }();
1186
-
1187
- onResize();
1188
- window.addEventListener('resize', onResize, false);
1189
- masthead.appendChild(canvas);
1190
- };
1191
-
1192
- return _this;
1070
+ return _React$Component.apply(this, arguments) || this;
1193
1071
  }
1194
1072
 
1195
1073
  var _proto = Header.prototype;
1196
1074
 
1197
- _proto.componentDidMount = function componentDidMount() {
1198
- this.snowflake();
1199
- };
1200
-
1201
1075
  _proto.render = function render() {
1202
1076
  return /*#__PURE__*/React.createElement("div", {
1203
1077
  className: classNames$1(style$b.header, this.props.className, 'sky')
@@ -3042,23 +2916,15 @@ var Loader = /*#__PURE__*/function (_React$Component) {
3042
2916
 
3043
2917
  var _proto = Loader.prototype;
3044
2918
 
3045
- _proto.componentDidUpdate = function componentDidUpdate() {
3046
- if (this.props.show) {
3047
- document.body.style.overflow = 'hidden';
3048
- } else {
3049
- document.body.style.overflow = 'unset';
3050
- }
3051
- };
3052
-
3053
2919
  _proto.render = function render() {
3054
2920
  if (!this.props.show) return null;
3055
- return /*#__PURE__*/React.createElement("div", {
2921
+ return /*#__PURE__*/React.createElement(Fragment, null, this.props.show ? /*#__PURE__*/React.createElement("style", null, "body {overflow: \"hidden\" }") : null, /*#__PURE__*/React.createElement("div", {
3056
2922
  className: classNames$1(style$m.loader_container, this.props.className)
3057
2923
  }, /*#__PURE__*/React.createElement("div", {
3058
2924
  className: classNames$1(style$m.loader_element, this.props.classNameChildren)
3059
2925
  }, /*#__PURE__*/React.createElement("div", {
3060
2926
  className: style$m.loader
3061
- }, /*#__PURE__*/React.createElement("span", null), /*#__PURE__*/React.createElement("span", null), /*#__PURE__*/React.createElement("span", null), /*#__PURE__*/React.createElement("span", null)), this.props.message ? /*#__PURE__*/React.createElement("p", null, this.props.message) : null));
2927
+ }, /*#__PURE__*/React.createElement("span", null), /*#__PURE__*/React.createElement("span", null), /*#__PURE__*/React.createElement("span", null), /*#__PURE__*/React.createElement("span", null)), this.props.message ? /*#__PURE__*/React.createElement("p", null, this.props.message) : null)));
3062
2928
  };
3063
2929
 
3064
2930
  return Loader;