ui-kit-ck-consultant 0.5.272 → 0.5.274
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 +7 -141
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +7 -141
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -83,12 +83,6 @@ var Modal = /*#__PURE__*/function (_React$Component) {
|
|
83
83
|
var _proto = Modal.prototype;
|
84
84
|
|
85
85
|
_proto.componentDidMount = function componentDidMount() {
|
86
|
-
if (this.props.show) {
|
87
|
-
document.body.style.overflow = 'hidden';
|
88
|
-
} else {
|
89
|
-
document.body.style.overflow = 'unset';
|
90
|
-
}
|
91
|
-
|
92
86
|
window.addEventListener('mouseup', this.handleMouseUp);
|
93
87
|
};
|
94
88
|
|
@@ -119,7 +113,7 @@ var Modal = /*#__PURE__*/function (_React$Component) {
|
|
119
113
|
}
|
120
114
|
|
121
115
|
var modalContainerClass = classNames$1((_classNames = {}, _classNames[style.large] = !!this.props.large, _classNames[style.no_background] = !!this.props.noBackground, _classNames), style.modal_container, this.props.className);
|
122
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
116
|
+
return /*#__PURE__*/React__default.createElement(Fragment, null, this.props.show ? /*#__PURE__*/React__default.createElement("style", null, "body {overflow: \"hidden\" }") : null, /*#__PURE__*/React__default.createElement("div", {
|
123
117
|
className: style.modal,
|
124
118
|
onMouseDown: function onMouseDown(e) {
|
125
119
|
return _this2.handleClickModal(e);
|
@@ -158,7 +152,7 @@ var Modal = /*#__PURE__*/function (_React$Component) {
|
|
158
152
|
className: style.modal_header
|
159
153
|
}, /*#__PURE__*/React__default.createElement("h2", null, this.props.title)), /*#__PURE__*/React__default.createElement("div", {
|
160
154
|
className: style.modal_body
|
161
|
-
}, this.props.children)));
|
155
|
+
}, this.props.children))));
|
162
156
|
};
|
163
157
|
|
164
158
|
return Modal;
|
@@ -173,22 +167,12 @@ var FullModal = /*#__PURE__*/function (_React$Component) {
|
|
173
167
|
|
174
168
|
var _proto = FullModal.prototype;
|
175
169
|
|
176
|
-
_proto.componentDidUpdate = function componentDidUpdate() {
|
177
|
-
if (this.props.show) {
|
178
|
-
document.documentElement.style.overflow = 'hidden';
|
179
|
-
document.body.style.overflow = 'hidden';
|
180
|
-
} else {
|
181
|
-
document.documentElement.style.overflow = 'unset';
|
182
|
-
document.body.style.overflow = 'unset';
|
183
|
-
}
|
184
|
-
};
|
185
|
-
|
186
170
|
_proto.render = function render() {
|
187
171
|
if (!this.props.show) {
|
188
172
|
return null;
|
189
173
|
}
|
190
174
|
|
191
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
175
|
+
return /*#__PURE__*/React__default.createElement(Fragment, null, this.props.show ? /*#__PURE__*/React__default.createElement("style", null, "body {overflow: \"hidden\" }") : null, /*#__PURE__*/React__default.createElement("div", {
|
192
176
|
className: classNames$1(style.modal, this.props.className)
|
193
177
|
}, /*#__PURE__*/React__default.createElement("div", {
|
194
178
|
className: style.full_modal_container
|
@@ -212,7 +196,7 @@ var FullModal = /*#__PURE__*/function (_React$Component) {
|
|
212
196
|
className: style.full_modal_header
|
213
197
|
}, /*#__PURE__*/React__default.createElement("h2", null, this.props.title)) : null, /*#__PURE__*/React__default.createElement("div", {
|
214
198
|
className: classNames$1(this.props.noPadding ? style.full_modal_body_no_padding : style.full_modal_body, this.props.noOverflow ? style.full_modal_body_no_overflow : {})
|
215
|
-
}, this.props.children)));
|
199
|
+
}, this.props.children))));
|
216
200
|
};
|
217
201
|
|
218
202
|
return FullModal;
|
@@ -1086,121 +1070,11 @@ var Header = /*#__PURE__*/function (_React$Component) {
|
|
1086
1070
|
_inheritsLoose(Header, _React$Component);
|
1087
1071
|
|
1088
1072
|
function Header() {
|
1089
|
-
|
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;
|
1073
|
+
return _React$Component.apply(this, arguments) || this;
|
1196
1074
|
}
|
1197
1075
|
|
1198
1076
|
var _proto = Header.prototype;
|
1199
1077
|
|
1200
|
-
_proto.componentDidMount = function componentDidMount() {
|
1201
|
-
this.snowflake();
|
1202
|
-
};
|
1203
|
-
|
1204
1078
|
_proto.render = function render() {
|
1205
1079
|
return /*#__PURE__*/React__default.createElement("div", {
|
1206
1080
|
className: classNames$1(style$b.header, this.props.className, 'sky')
|
@@ -3045,23 +2919,15 @@ var Loader = /*#__PURE__*/function (_React$Component) {
|
|
3045
2919
|
|
3046
2920
|
var _proto = Loader.prototype;
|
3047
2921
|
|
3048
|
-
_proto.componentDidUpdate = function componentDidUpdate() {
|
3049
|
-
if (this.props.show) {
|
3050
|
-
document.body.style.overflow = 'hidden';
|
3051
|
-
} else {
|
3052
|
-
document.body.style.overflow = 'unset';
|
3053
|
-
}
|
3054
|
-
};
|
3055
|
-
|
3056
2922
|
_proto.render = function render() {
|
3057
2923
|
if (!this.props.show) return null;
|
3058
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
2924
|
+
return /*#__PURE__*/React__default.createElement(Fragment, null, this.props.show ? /*#__PURE__*/React__default.createElement("style", null, "body {overflow: \"hidden\" }") : null, /*#__PURE__*/React__default.createElement("div", {
|
3059
2925
|
className: classNames$1(style$m.loader_container, this.props.className)
|
3060
2926
|
}, /*#__PURE__*/React__default.createElement("div", {
|
3061
2927
|
className: classNames$1(style$m.loader_element, this.props.classNameChildren)
|
3062
2928
|
}, /*#__PURE__*/React__default.createElement("div", {
|
3063
2929
|
className: style$m.loader
|
3064
|
-
}, /*#__PURE__*/React__default.createElement("span", null), /*#__PURE__*/React__default.createElement("span", null), /*#__PURE__*/React__default.createElement("span", null), /*#__PURE__*/React__default.createElement("span", null)), this.props.message ? /*#__PURE__*/React__default.createElement("p", null, this.props.message) : null));
|
2930
|
+
}, /*#__PURE__*/React__default.createElement("span", null), /*#__PURE__*/React__default.createElement("span", null), /*#__PURE__*/React__default.createElement("span", null), /*#__PURE__*/React__default.createElement("span", null)), this.props.message ? /*#__PURE__*/React__default.createElement("p", null, this.props.message) : null)));
|
3065
2931
|
};
|
3066
2932
|
|
3067
2933
|
return Loader;
|