ui-kit-ck-consultant 0.5.261 → 0.5.263

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/css/style.css CHANGED
@@ -1588,3 +1588,8 @@ h3 {
1588
1588
  }
1589
1589
 
1590
1590
  /* end color */
1591
+
1592
+ .sky > canvas{
1593
+ pointer-events: none;
1594
+ z-index: 10;
1595
+ }
package/dist/index.js CHANGED
@@ -1088,14 +1088,109 @@ var Header = /*#__PURE__*/function (_React$Component) {
1088
1088
  _inheritsLoose(Header, _React$Component);
1089
1089
 
1090
1090
  function Header() {
1091
- return _React$Component.apply(this, arguments) || this;
1091
+ var _this;
1092
+
1093
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1094
+ args[_key] = arguments[_key];
1095
+ }
1096
+
1097
+ _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
1098
+
1099
+ _this.snowflake = function () {
1100
+ var COUNT = 125;
1101
+ var masthead = document.querySelector('.sky');
1102
+ var canvas = document.createElement('canvas');
1103
+ var ctx = canvas.getContext('2d');
1104
+ var width = masthead.clientWidth;
1105
+ var height = masthead.clientHeight;
1106
+ var i = 0;
1107
+ var active = false;
1108
+
1109
+ function onResize() {
1110
+ width = masthead.clientWidth;
1111
+ height = masthead.clientHeight;
1112
+ canvas.width = width;
1113
+ canvas.height = height;
1114
+ ctx.fillStyle = '#FFF';
1115
+ var wasActive = active;
1116
+ active = width > 600;
1117
+ if (!wasActive && active) requestAnimFrame(update);
1118
+ }
1119
+
1120
+ var Snowflake = function Snowflake() {
1121
+ this.x = 0;
1122
+ this.y = 0;
1123
+ this.vy = 0;
1124
+ this.vx = 0;
1125
+ this.r = 0;
1126
+ this.reset();
1127
+ };
1128
+
1129
+ Snowflake.prototype.reset = function () {
1130
+ this.x = Math.random() * width;
1131
+ this.y = Math.random() * -height;
1132
+ this.vy = 1 + Math.random() * 3;
1133
+ this.vx = 0.5 - Math.random();
1134
+ this.r = 1 + Math.random() * 2;
1135
+ this.o = 0.5 + Math.random() * 0.5;
1136
+ };
1137
+
1138
+ canvas.style.position = 'absolute';
1139
+ canvas.style.left = canvas.style.top = '0';
1140
+ var snowflakes = [],
1141
+ snowflake;
1142
+
1143
+ for (i = 0; i < COUNT; i++) {
1144
+ snowflake = new Snowflake();
1145
+ snowflake.reset();
1146
+ snowflakes.push(snowflake);
1147
+ }
1148
+
1149
+ function update() {
1150
+ ctx.clearRect(0, 0, width, height);
1151
+ if (!active) return;
1152
+
1153
+ for (i = 0; i < COUNT; i++) {
1154
+ snowflake = snowflakes[i];
1155
+ snowflake.y += snowflake.vy;
1156
+ snowflake.x += snowflake.vx;
1157
+ ctx.globalAlpha = snowflake.o;
1158
+ ctx.beginPath();
1159
+ ctx.arc(snowflake.x, snowflake.y, snowflake.r, 0, Math.PI * 2, false);
1160
+ ctx.closePath();
1161
+ ctx.fill();
1162
+
1163
+ if (snowflake.y > height) {
1164
+ snowflake.reset();
1165
+ }
1166
+ }
1167
+
1168
+ requestAnimFrame(update);
1169
+ }
1170
+
1171
+ window.requestAnimFrame = function () {
1172
+ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {
1173
+ window.setTimeout(callback, 1000 / 60);
1174
+ };
1175
+ }();
1176
+
1177
+ onResize();
1178
+ window.addEventListener('resize', onResize, false);
1179
+ masthead.appendChild(canvas);
1180
+ };
1181
+
1182
+ return _this;
1092
1183
  }
1093
1184
 
1094
1185
  var _proto = Header.prototype;
1095
1186
 
1187
+ _proto.componentDidMount = function componentDidMount() {
1188
+ this.snowflake();
1189
+ };
1190
+
1096
1191
  _proto.render = function render() {
1097
1192
  return /*#__PURE__*/React__default.createElement("div", {
1098
- className: classNames$1(style$b.header, this.props.className)
1193
+ className: classNames$1(style$b.header, this.props.className, "sky")
1099
1194
  }, /*#__PURE__*/React__default.createElement("div", {
1100
1195
  className: style$b.header_absolute,
1101
1196
  style: this.props.styleBackground
@@ -4212,7 +4307,7 @@ var Footer = /*#__PURE__*/function (_React$Component) {
4212
4307
  xs: 12,
4213
4308
  md: 6,
4214
4309
  lg: 4,
4215
- className: "mt-5 mb-5"
4310
+ className: "mt-5 mb-5 d-flex"
4216
4311
  }, /*#__PURE__*/React__default.createElement("a", {
4217
4312
  className: "m-auto",
4218
4313
  target: "_blank",
@@ -4220,7 +4315,7 @@ var Footer = /*#__PURE__*/function (_React$Component) {
4220
4315
  onClick: this.props.onRgpdClick
4221
4316
  }, "RGPD & Cookies")), this.props.socialNetwork ? /*#__PURE__*/React__default.createElement(reactFlexboxGrid.Col, {
4222
4317
  xs: 12,
4223
- className: "mt-5 mb-5 d-flex text-center"
4318
+ className: "mt-5 mb-5 text-center"
4224
4319
  }, this.props.socialNetwork) : null));
4225
4320
  };
4226
4321