@semcore/input 17.0.0-prerelease.34 → 17.0.0-prerelease.37
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/CHANGELOG.md +1 -1
- package/lib/esm/Input.mjs +5 -9
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
package/lib/esm/Input.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { sstyled, Component, lastInteraction, assignProps, createComponent } from "@semcore/core";
|
|
3
|
+
import { Box, NeighborLocation, InvalidStateBox } from "@semcore/base-components";
|
|
4
4
|
import React from "react";
|
|
5
|
-
/*!__reshadow-styles__:"./style/input.shadow.css"*/
|
|
6
5
|
const style = (
|
|
7
6
|
/*__reshadow_css_start__*/
|
|
8
7
|
(sstyled.insert(
|
|
@@ -34,16 +33,14 @@ class Input extends Component {
|
|
|
34
33
|
super(...args);
|
|
35
34
|
_defineProperty(this, "inputRef", /* @__PURE__ */ React.createRef());
|
|
36
35
|
_defineProperty(this, "handleMouseDownAddon", (event) => {
|
|
37
|
-
var _a;
|
|
38
36
|
event.preventDefault();
|
|
39
|
-
|
|
37
|
+
this.inputRef.current?.focus();
|
|
40
38
|
});
|
|
41
39
|
_defineProperty(this, "handleClick", () => {
|
|
42
40
|
if (!lastInteraction.isKeyboard) return;
|
|
43
41
|
setTimeout(() => {
|
|
44
|
-
var _a;
|
|
45
42
|
if (document.activeElement === document.body) {
|
|
46
|
-
|
|
43
|
+
this.inputRef.current?.focus();
|
|
47
44
|
}
|
|
48
45
|
}, 0);
|
|
49
46
|
});
|
|
@@ -130,8 +127,7 @@ class Value extends Component {
|
|
|
130
127
|
componentDidMount() {
|
|
131
128
|
if (this.asProps.autoFocus) {
|
|
132
129
|
setTimeout(() => {
|
|
133
|
-
|
|
134
|
-
(_a = this.inputRef.current) == null ? void 0 : _a.focus();
|
|
130
|
+
this.inputRef.current?.focus();
|
|
135
131
|
}, 10);
|
|
136
132
|
}
|
|
137
133
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/input",
|
|
3
3
|
"description": "Semrush Input Component",
|
|
4
|
-
"version": "17.0.0-prerelease.
|
|
4
|
+
"version": "17.0.0-prerelease.37",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"directory": "semcore/input"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@semcore/core": "17.0.0-prerelease.
|
|
26
|
-
"@semcore/base-components": "17.0.0-prerelease.
|
|
27
|
-
"@semcore/
|
|
28
|
-
"@semcore/
|
|
25
|
+
"@semcore/core": "17.0.0-prerelease.37",
|
|
26
|
+
"@semcore/base-components": "17.0.0-prerelease.37",
|
|
27
|
+
"@semcore/testing-utils": "1.0.0",
|
|
28
|
+
"@semcore/icon": "16.7.2-prerelease.37"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "pnpm semcore-builder --source=js && pnpm vite build"
|