@steroidsjs/bootstrap 3.0.0-beta.96 → 3.0.0-beta.98
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/content/Chart/ChartView.d.ts +2 -0
- package/content/Chart/ChartView.js +47 -0
- package/content/Chart/ChartView.scss +8 -0
- package/form/CheckboxListField/CheckboxListFieldView.js +7 -7
- package/form/HtmlField/HtmlFieldView.scss +3 -0
- package/form/PasswordField/PasswordFieldView.js +4 -1
- package/form/PasswordField/PasswordFieldView.scss +21 -6
- package/form/RadioField/RadioFieldView.js +1 -1
- package/form/RadioListField/RadioListFieldView.js +6 -8
- package/index.d.ts +3 -0
- package/index.js +3 -0
- package/modal/Modal/ModalView.scss +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
exports.__esModule = true;
|
|
17
|
+
var react_1 = __importDefault(require("react"));
|
|
18
|
+
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
19
|
+
var DEFAULT_AXIS_PARAMS = {
|
|
20
|
+
tickSize: 5,
|
|
21
|
+
tickPadding: 5,
|
|
22
|
+
tickRotation: 0,
|
|
23
|
+
legend: '',
|
|
24
|
+
legendPosition: 'middle'
|
|
25
|
+
};
|
|
26
|
+
var DEFAULT_LINE_CHART_CONFIG = {
|
|
27
|
+
yScale: {
|
|
28
|
+
type: 'linear',
|
|
29
|
+
min: 'auto',
|
|
30
|
+
max: 'auto',
|
|
31
|
+
stacked: true,
|
|
32
|
+
reverse: false
|
|
33
|
+
},
|
|
34
|
+
xScale: { type: 'point' },
|
|
35
|
+
axisBottom: __assign(__assign({}, DEFAULT_AXIS_PARAMS), { legendOffset: 36 }),
|
|
36
|
+
axisLeft: __assign(__assign({}, DEFAULT_AXIS_PARAMS), { legendOffset: -40 }),
|
|
37
|
+
pointSize: 8,
|
|
38
|
+
useMesh: true
|
|
39
|
+
};
|
|
40
|
+
function ChartView(props) {
|
|
41
|
+
var bem = (0, hooks_1.useBem)('ChartView');
|
|
42
|
+
var ChartComponent = props.chartComponent;
|
|
43
|
+
var defaultChartConfig = (props.useDefaultLineChartConfig && DEFAULT_LINE_CHART_CONFIG) || {};
|
|
44
|
+
return (react_1["default"].createElement("div", { className: bem(bem.block(), props.className), style: __assign({ height: "".concat(props.height, "px") }, props.style) },
|
|
45
|
+
react_1["default"].createElement(ChartComponent, __assign({ data: props.data }, defaultChartConfig, props.config))));
|
|
46
|
+
}
|
|
47
|
+
exports["default"] = ChartView;
|
|
@@ -36,19 +36,19 @@ function CheckboxListFieldView(props) {
|
|
|
36
36
|
return (React.createElement("div", { className: bem(bem.block((_a = {},
|
|
37
37
|
_a["".concat(props.orientation)] = !!props.orientation,
|
|
38
38
|
_a))) }, props.items.map(function (checkbox, checkboxIndex) { return props.renderCheckbox({
|
|
39
|
+
key: checkboxIndex,
|
|
40
|
+
id: "".concat(prefix, "_").concat(checkbox.id),
|
|
41
|
+
label: checkbox.label,
|
|
39
42
|
inputProps: {
|
|
40
43
|
name: "".concat(prefix, "_").concat(checkbox.id),
|
|
41
|
-
checked: null,
|
|
42
44
|
type: 'checkbox',
|
|
43
|
-
|
|
45
|
+
checked: props.selectedIds.includes(checkbox.id),
|
|
44
46
|
onChange: function () {
|
|
45
47
|
props.onItemSelect(checkbox.id);
|
|
46
|
-
}
|
|
48
|
+
},
|
|
49
|
+
disabled: props.disabled
|
|
47
50
|
},
|
|
48
|
-
|
|
49
|
-
label: checkbox.label,
|
|
50
|
-
id: "".concat(prefix, "_").concat(checkbox.id),
|
|
51
|
-
key: checkboxIndex
|
|
51
|
+
size: props.size
|
|
52
52
|
}); })));
|
|
53
53
|
}
|
|
54
54
|
exports["default"] = CheckboxListFieldView;
|
|
@@ -38,6 +38,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
};
|
|
39
39
|
exports.__esModule = true;
|
|
40
40
|
var React = __importStar(require("react"));
|
|
41
|
+
var PasswordField_1 = require("@steroidsjs/core/ui/form/PasswordField/PasswordField");
|
|
41
42
|
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/content/Icon"));
|
|
42
43
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
43
44
|
function PasswordFieldView(props) {
|
|
@@ -51,7 +52,9 @@ function PasswordFieldView(props) {
|
|
|
51
52
|
disabled: props.inputProps.disabled
|
|
52
53
|
}) },
|
|
53
54
|
React.createElement("input", __assign({ className: bem.element('input') }, props.inputProps, { id: props.id })),
|
|
54
|
-
props.showSecurityIcon && (React.createElement("span", { className: bem(bem.element('icon-eye'
|
|
55
|
+
props.showSecurityIcon && (React.createElement("span", { className: bem(bem.element('icon-eye', {
|
|
56
|
+
viewHide: props.inputProps.type === PasswordField_1.InputType.PASSWORD
|
|
57
|
+
})), onClick: props.onShowButtonClick },
|
|
55
58
|
React.createElement(Icon_1["default"], { name: props.inputProps.type === 'password' ? 'view_hide' : 'view' })))),
|
|
56
59
|
props.showSecurityBar && (React.createElement("div", { className: bem.element('security-bar', props.securityLevel) }))));
|
|
57
60
|
}
|
|
@@ -183,12 +183,14 @@ $eye-filled-color: var(--eye-filled-color);
|
|
|
183
183
|
|
|
184
184
|
svg {
|
|
185
185
|
path {
|
|
186
|
-
fill: $eye-default-color;
|
|
187
|
-
|
|
188
186
|
&:last-child {
|
|
189
187
|
stroke: $eye-default-color;
|
|
190
188
|
}
|
|
191
189
|
}
|
|
190
|
+
|
|
191
|
+
circle {
|
|
192
|
+
stroke: $eye-default-color;
|
|
193
|
+
}
|
|
192
194
|
}
|
|
193
195
|
|
|
194
196
|
&:active {
|
|
@@ -202,24 +204,31 @@ $eye-filled-color: var(--eye-filled-color);
|
|
|
202
204
|
}
|
|
203
205
|
}
|
|
204
206
|
}
|
|
207
|
+
|
|
208
|
+
&_viewHide {
|
|
209
|
+
svg path {
|
|
210
|
+
fill: $eye-default-color;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
205
213
|
}
|
|
206
214
|
|
|
207
215
|
&_filled {
|
|
208
216
|
#{$root}__icon-eye {
|
|
209
217
|
svg {
|
|
210
218
|
path {
|
|
211
|
-
fill: $eye-filled-color;
|
|
212
|
-
|
|
213
219
|
&:last-child {
|
|
214
220
|
stroke: $eye-filled-color;
|
|
215
221
|
}
|
|
216
222
|
}
|
|
223
|
+
|
|
224
|
+
circle {
|
|
225
|
+
stroke: $eye-filled-color;
|
|
226
|
+
}
|
|
217
227
|
}
|
|
218
228
|
|
|
219
229
|
&:active {
|
|
220
230
|
svg {
|
|
221
231
|
path {
|
|
222
|
-
fill: inherit;
|
|
223
232
|
stroke: $eye-filled-color;
|
|
224
233
|
}
|
|
225
234
|
circle {
|
|
@@ -227,6 +236,12 @@ $eye-filled-color: var(--eye-filled-color);
|
|
|
227
236
|
}
|
|
228
237
|
}
|
|
229
238
|
}
|
|
239
|
+
|
|
240
|
+
&_viewHide {
|
|
241
|
+
svg path {
|
|
242
|
+
fill: $eye-filled-color;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
230
245
|
}
|
|
231
246
|
}
|
|
232
247
|
|
|
@@ -235,7 +250,7 @@ $eye-filled-color: var(--eye-filled-color);
|
|
|
235
250
|
cursor: not-allowed;
|
|
236
251
|
}
|
|
237
252
|
|
|
238
|
-
#{$root}__icon-eye {
|
|
253
|
+
#{$root}__icon-eye {
|
|
239
254
|
pointer-events: none;
|
|
240
255
|
}
|
|
241
256
|
|
|
@@ -49,7 +49,7 @@ function RadioFieldView(props) {
|
|
|
49
49
|
}), props.className), onClick: props.onChange },
|
|
50
50
|
React.createElement("input", __assign({ className: bem(bem.element('input', {
|
|
51
51
|
checked: props.checked
|
|
52
|
-
})), id: props.id || id }, props.inputProps, {
|
|
52
|
+
})), id: props.id || id }, props.inputProps, { disabled: props.disabled, required: props.required })),
|
|
53
53
|
React.createElement("label", { className: bem.element('label'), htmlFor: props.id || id },
|
|
54
54
|
React.createElement("span", { className: bem.element('ellipse') }),
|
|
55
55
|
props.label)));
|
|
@@ -36,20 +36,18 @@ function RadioListFieldView(props) {
|
|
|
36
36
|
return (React.createElement("div", { className: bem(bem.block((_a = {},
|
|
37
37
|
_a["".concat(props.orientation)] = !!props.orientation,
|
|
38
38
|
_a)), props.className) }, props.items.map(function (radio, radioIndex) { return props.renderRadio({
|
|
39
|
+
key: radioIndex,
|
|
40
|
+
id: "".concat(prefix, "_").concat(radio.id),
|
|
41
|
+
label: radio.label,
|
|
39
42
|
inputProps: {
|
|
40
43
|
name: "".concat(prefix, "_").concat(radio.id),
|
|
41
|
-
checked: null,
|
|
42
44
|
type: 'radio',
|
|
43
|
-
|
|
45
|
+
checked: props.selectedIds.includes(radio.id),
|
|
44
46
|
onChange: function () {
|
|
45
47
|
props.onItemSelect(radio.id);
|
|
46
|
-
}
|
|
48
|
+
},
|
|
49
|
+
disabled: props.disabled
|
|
47
50
|
},
|
|
48
|
-
disabled: props.disabled,
|
|
49
|
-
checked: props.selectedIds.includes(radio.id),
|
|
50
|
-
label: radio.label,
|
|
51
|
-
id: "".concat(prefix, "_").concat(radio.id),
|
|
52
|
-
key: radioIndex,
|
|
53
51
|
size: props.size
|
|
54
52
|
}); })));
|
|
55
53
|
}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -38,6 +38,9 @@ exports["default"] = {
|
|
|
38
38
|
'content.CopyToClipboardView': {
|
|
39
39
|
lazy: function () { return require('./content/CopyToClipboard/CopyToClipboardView')["default"]; }
|
|
40
40
|
},
|
|
41
|
+
'content.ChartView': {
|
|
42
|
+
lazy: function () { return require('./content/Chart/ChartView')["default"]; }
|
|
43
|
+
},
|
|
41
44
|
'content.SliderView': {
|
|
42
45
|
lazy: function () { return require('./content/Slider/SliderView')["default"]; }
|
|
43
46
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steroidsjs/bootstrap",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.98",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Vladimir Kozhin <hello@kozhindev.com>",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"react-use": "^17.4.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@steroidsjs/core": "^3.0 || >=3.0.0-beta.
|
|
40
|
+
"@steroidsjs/core": "^3.0 || >=3.0.0-beta.82",
|
|
41
41
|
"@steroidsjs/eslint-config": "^2.1.4",
|
|
42
42
|
"@types/enzyme": "^3.10.8",
|
|
43
43
|
"@types/googlemaps": "^3.43.3",
|