ui-kit-ck-consultant 0.5.272 → 0.5.273

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.
package/dist/index.js CHANGED
@@ -1086,121 +1086,11 @@ var Header = /*#__PURE__*/function (_React$Component) {
1086
1086
  _inheritsLoose(Header, _React$Component);
1087
1087
 
1088
1088
  function Header() {
1089
- var _this;
1090
-
1091
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1092
- args[_key] = arguments[_key];
1093
- }
1094
-
1095
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
1096
-
1097
- _this.snowflake = function () {
1098
- var COUNT = 10;
1099
- var masthead = document.querySelector('.sky');
1100
- var canvas = document.createElement('canvas');
1101
- var ctx = canvas.getContext('2d');
1102
- var width = masthead.clientWidth;
1103
- var height = masthead.clientHeight;
1104
- var i = 0;
1105
- var active = false;
1106
-
1107
- function onResize() {
1108
- width = masthead.clientWidth;
1109
- height = masthead.clientHeight;
1110
- canvas.width = width;
1111
- canvas.height = height;
1112
- ctx.fillStyle = '#FFF';
1113
- var wasActive = active;
1114
- active = width > 600;
1115
- if (!wasActive && active) requestAnimFrame(update);
1116
- }
1117
-
1118
- var Snowflake = function Snowflake() {
1119
- this.x = 0;
1120
- this.y = 0;
1121
- this.vy = 0;
1122
- this.vx = 0;
1123
- this.r = 0;
1124
- this.reset();
1125
- };
1126
-
1127
- Snowflake.prototype.reset = function () {
1128
- this.x = Math.random() * width;
1129
- this.y = Math.random() * -height;
1130
- this.vy = 0.18 + Math.random() * 1.5;
1131
- this.vx = 0.65 - Math.random();
1132
- this.r = 1 + Math.random() * 3;
1133
- this.o = 0.5 + Math.random() * 0.5;
1134
- };
1135
-
1136
- canvas.style.position = 'absolute';
1137
- canvas.style.left = canvas.style.top = '0';
1138
- var snowflakes = [],
1139
- snowflake;
1140
-
1141
- for (i = 0; i < COUNT; i++) {
1142
- snowflake = new Snowflake();
1143
- snowflake.reset();
1144
- snowflakes.push(snowflake);
1145
- }
1146
-
1147
- function update() {
1148
- ctx.clearRect(0, 0, width, height);
1149
- if (!active) return;
1150
-
1151
- for (i = 0; i < COUNT; i++) {
1152
- snowflake = snowflakes[i];
1153
- snowflake.y += snowflake.vy;
1154
- snowflake.x += snowflake.vx;
1155
- ctx.globalAlpha = snowflake.o;
1156
- ctx.beginPath();
1157
- var x = snowflake.x;
1158
- var y = snowflake.y;
1159
-
1160
- var _width = 10 * snowflake.r;
1161
-
1162
- var _height = 10 * snowflake.r;
1163
-
1164
- var topCurveHeight = _height * 0.3;
1165
- ctx.moveTo(x, y + topCurveHeight);
1166
- ctx.bezierCurveTo(x, y, x - _width / 2, y, x - _width / 2, y + topCurveHeight);
1167
- ctx.bezierCurveTo(x - _width / 2, y + (_height + topCurveHeight) / 2, x, y + (_height + topCurveHeight) / 2, x, y + _height);
1168
- ctx.bezierCurveTo(x, y + (_height + topCurveHeight) / 2, x + _width / 2, y + (_height + topCurveHeight) / 2, x + _width / 2, y + topCurveHeight);
1169
- ctx.bezierCurveTo(x + _width / 2, y, x, y, x, y + topCurveHeight);
1170
- ctx.closePath();
1171
- ctx.fillStyle = "rgba(255, 20, 20, 0.5)";
1172
- ctx.fill();
1173
- ctx.closePath();
1174
- ctx.fill();
1175
-
1176
- if (snowflake.y > _height * 4) {
1177
- snowflake.reset();
1178
- }
1179
- }
1180
-
1181
- requestAnimFrame(update);
1182
- }
1183
-
1184
- window.requestAnimFrame = function () {
1185
- return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {
1186
- window.setTimeout(callback, 1000 / 10);
1187
- };
1188
- }();
1189
-
1190
- onResize();
1191
- window.addEventListener('resize', onResize, false);
1192
- masthead.appendChild(canvas);
1193
- };
1194
-
1195
- return _this;
1089
+ return _React$Component.apply(this, arguments) || this;
1196
1090
  }
1197
1091
 
1198
1092
  var _proto = Header.prototype;
1199
1093
 
1200
- _proto.componentDidMount = function componentDidMount() {
1201
- this.snowflake();
1202
- };
1203
-
1204
1094
  _proto.render = function render() {
1205
1095
  return /*#__PURE__*/React__default.createElement("div", {
1206
1096
  className: classNames$1(style$b.header, this.props.className, 'sky')