@steroidsjs/bootstrap 2.1.15 → 2.1.18
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/form/Form/FormView.js
CHANGED
|
@@ -38,9 +38,23 @@ var isString_1 = __importDefault(require("lodash-es/isString"));
|
|
|
38
38
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
39
39
|
var Field_1 = __importDefault(require("@steroidsjs/core/ui/form/Field"));
|
|
40
40
|
var Button_1 = __importDefault(require("@steroidsjs/core/ui/form/Button"));
|
|
41
|
+
var react_use_1 = require("react-use");
|
|
42
|
+
var react_1 = require("react");
|
|
41
43
|
function FormView(props) {
|
|
42
44
|
var bem = hooks_1.useBem('FormView');
|
|
43
|
-
|
|
45
|
+
var formRef = react_1.useRef(null);
|
|
46
|
+
// Auto focus
|
|
47
|
+
react_use_1.useMount(function () {
|
|
48
|
+
if (props.autoFocus) {
|
|
49
|
+
var inputEl_1 = formRef.current.querySelector('input:not([type=hidden])');
|
|
50
|
+
setTimeout(function () {
|
|
51
|
+
if (inputEl_1 && inputEl_1.focus) {
|
|
52
|
+
inputEl_1.focus();
|
|
53
|
+
}
|
|
54
|
+
}, 10);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
return (React.createElement("form", { ref: formRef, className: bem(bem.block({
|
|
44
58
|
border: props.isBordered,
|
|
45
59
|
inline: props.layout.layout === 'inline'
|
|
46
60
|
}), props.className, props.layout.layout === 'horizontal' && 'form-horizontal'), onSubmit: props.onSubmit, style: props.style },
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
|
|
1
3
|
$tooltip-arrow-color: #000;
|
|
2
4
|
$tooltip-arrow-width: 8px;
|
|
3
5
|
$tooltip-arrow-height: 8px;
|
|
4
|
-
$tooltip-arrow-border: $tooltip-arrow-width
|
|
6
|
+
$tooltip-arrow-border: math.div($tooltip-arrow-width, 2);
|
|
5
7
|
$tooltip-gap: 12px;
|
|
6
8
|
|
|
7
9
|
$tooltip-arrow-offset-horizontal: 20px;
|
|
@@ -41,7 +43,7 @@ $tooltip-arrow-offset-vertical-bottom: 7px;
|
|
|
41
43
|
height: $tooltip-arrow-height;
|
|
42
44
|
|
|
43
45
|
border-style: solid;
|
|
44
|
-
border-width: $tooltip-arrow-height
|
|
46
|
+
border-width: math.div($tooltip-arrow-height, 2);
|
|
45
47
|
box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.07);
|
|
46
48
|
|
|
47
49
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steroidsjs/bootstrap",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.18",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Vladimir Kozhin <hello@kozhindev.com>",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@ckeditor/ckeditor5-react": "^3.0.2",
|
|
21
21
|
"@steroidsjs/ckeditor5": "^27.0.2-rc.2",
|
|
22
|
-
"@steroidsjs/core": "^2.2.
|
|
22
|
+
"@steroidsjs/core": "^2.2.69",
|
|
23
23
|
"bootstrap": "^4.5.2",
|
|
24
24
|
"lodash": "^4.17.20",
|
|
25
25
|
"lodash-es": "^4.17.20",
|