ui-kit-ck-consultant 0.5.262 → 0.5.264
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 +5 -0
- package/dist/index.js +99 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +99 -2
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
@@ -445,6 +445,8 @@ var FormTextarea = /*#__PURE__*/function (_React$Component) {
|
|
445
445
|
}, this.props.title ? /*#__PURE__*/React.createElement("span", null, this.props.title, ' ', this.props.required ? /*#__PURE__*/React.createElement("span", {
|
446
446
|
className: "red"
|
447
447
|
}, "*") : '') : '', /*#__PURE__*/React.createElement("textarea", {
|
448
|
+
spellCheck: true,
|
449
|
+
lang: 'fr',
|
448
450
|
onKeyDown: !this.props.noResize ? this.handleKeyDown : null,
|
449
451
|
onBlur: this.props.onBlur,
|
450
452
|
rows: this.props.rows,
|
@@ -1085,14 +1087,109 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
1085
1087
|
_inheritsLoose(Header, _React$Component);
|
1086
1088
|
|
1087
1089
|
function Header() {
|
1088
|
-
|
1090
|
+
var _this;
|
1091
|
+
|
1092
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
1093
|
+
args[_key] = arguments[_key];
|
1094
|
+
}
|
1095
|
+
|
1096
|
+
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
1097
|
+
|
1098
|
+
_this.snowflake = function () {
|
1099
|
+
var COUNT = 125;
|
1100
|
+
var masthead = document.querySelector('.sky');
|
1101
|
+
var canvas = document.createElement('canvas');
|
1102
|
+
var ctx = canvas.getContext('2d');
|
1103
|
+
var width = masthead.clientWidth;
|
1104
|
+
var height = masthead.clientHeight;
|
1105
|
+
var i = 0;
|
1106
|
+
var active = false;
|
1107
|
+
|
1108
|
+
function onResize() {
|
1109
|
+
width = masthead.clientWidth;
|
1110
|
+
height = masthead.clientHeight;
|
1111
|
+
canvas.width = width;
|
1112
|
+
canvas.height = height;
|
1113
|
+
ctx.fillStyle = '#FFF';
|
1114
|
+
var wasActive = active;
|
1115
|
+
active = width > 600;
|
1116
|
+
if (!wasActive && active) requestAnimFrame(update);
|
1117
|
+
}
|
1118
|
+
|
1119
|
+
var Snowflake = function Snowflake() {
|
1120
|
+
this.x = 0;
|
1121
|
+
this.y = 0;
|
1122
|
+
this.vy = 0;
|
1123
|
+
this.vx = 0;
|
1124
|
+
this.r = 0;
|
1125
|
+
this.reset();
|
1126
|
+
};
|
1127
|
+
|
1128
|
+
Snowflake.prototype.reset = function () {
|
1129
|
+
this.x = Math.random() * width;
|
1130
|
+
this.y = Math.random() * -height;
|
1131
|
+
this.vy = 1 + Math.random() * 3;
|
1132
|
+
this.vx = 0.5 - Math.random();
|
1133
|
+
this.r = 1 + Math.random() * 2;
|
1134
|
+
this.o = 0.5 + Math.random() * 0.5;
|
1135
|
+
};
|
1136
|
+
|
1137
|
+
canvas.style.position = 'absolute';
|
1138
|
+
canvas.style.left = canvas.style.top = '0';
|
1139
|
+
var snowflakes = [],
|
1140
|
+
snowflake;
|
1141
|
+
|
1142
|
+
for (i = 0; i < COUNT; i++) {
|
1143
|
+
snowflake = new Snowflake();
|
1144
|
+
snowflake.reset();
|
1145
|
+
snowflakes.push(snowflake);
|
1146
|
+
}
|
1147
|
+
|
1148
|
+
function update() {
|
1149
|
+
ctx.clearRect(0, 0, width, height);
|
1150
|
+
if (!active) return;
|
1151
|
+
|
1152
|
+
for (i = 0; i < COUNT; i++) {
|
1153
|
+
snowflake = snowflakes[i];
|
1154
|
+
snowflake.y += snowflake.vy;
|
1155
|
+
snowflake.x += snowflake.vx;
|
1156
|
+
ctx.globalAlpha = snowflake.o;
|
1157
|
+
ctx.beginPath();
|
1158
|
+
ctx.arc(snowflake.x, snowflake.y, snowflake.r, 0, Math.PI * 2, false);
|
1159
|
+
ctx.closePath();
|
1160
|
+
ctx.fill();
|
1161
|
+
|
1162
|
+
if (snowflake.y > height) {
|
1163
|
+
snowflake.reset();
|
1164
|
+
}
|
1165
|
+
}
|
1166
|
+
|
1167
|
+
requestAnimFrame(update);
|
1168
|
+
}
|
1169
|
+
|
1170
|
+
window.requestAnimFrame = function () {
|
1171
|
+
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (callback) {
|
1172
|
+
window.setTimeout(callback, 1000 / 60);
|
1173
|
+
};
|
1174
|
+
}();
|
1175
|
+
|
1176
|
+
onResize();
|
1177
|
+
window.addEventListener('resize', onResize, false);
|
1178
|
+
masthead.appendChild(canvas);
|
1179
|
+
};
|
1180
|
+
|
1181
|
+
return _this;
|
1089
1182
|
}
|
1090
1183
|
|
1091
1184
|
var _proto = Header.prototype;
|
1092
1185
|
|
1186
|
+
_proto.componentDidMount = function componentDidMount() {
|
1187
|
+
this.snowflake();
|
1188
|
+
};
|
1189
|
+
|
1093
1190
|
_proto.render = function render() {
|
1094
1191
|
return /*#__PURE__*/React.createElement("div", {
|
1095
|
-
className: classNames$1(style$b.header, this.props.className)
|
1192
|
+
className: classNames$1(style$b.header, this.props.className, "sky")
|
1096
1193
|
}, /*#__PURE__*/React.createElement("div", {
|
1097
1194
|
className: style$b.header_absolute,
|
1098
1195
|
style: this.props.styleBackground
|