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