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 +1 -111
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1 -111
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
@@ -1083,121 +1083,11 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
1083
1083
|
_inheritsLoose(Header, _React$Component);
|
1084
1084
|
|
1085
1085
|
function Header() {
|
1086
|
-
|
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;
|
1086
|
+
return _React$Component.apply(this, arguments) || this;
|
1193
1087
|
}
|
1194
1088
|
|
1195
1089
|
var _proto = Header.prototype;
|
1196
1090
|
|
1197
|
-
_proto.componentDidMount = function componentDidMount() {
|
1198
|
-
this.snowflake();
|
1199
|
-
};
|
1200
|
-
|
1201
1091
|
_proto.render = function render() {
|
1202
1092
|
return /*#__PURE__*/React.createElement("div", {
|
1203
1093
|
className: classNames$1(style$b.header, this.props.className, 'sky')
|