@neovici/cosmoz-input 5.1.2 → 5.1.4
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/cosmoz-input.js +0 -4
- package/dist/styles.js +1 -1
- package/package.json +9 -6
package/dist/cosmoz-input.js
CHANGED
|
@@ -3,7 +3,6 @@ import { live } from 'lit-html/directives/live.js';
|
|
|
3
3
|
import { ref } from 'lit-html/directives/ref.js';
|
|
4
4
|
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
5
5
|
import { component, sheet } from '@pionjs/pion';
|
|
6
|
-
import { useImperativeApi } from '@neovici/cosmoz-utils/hooks/use-imperative-api';
|
|
7
6
|
import { useInput } from './use-input';
|
|
8
7
|
import { useAllowedPattern } from './use-allowed-pattern';
|
|
9
8
|
import { render, attributes } from './render';
|
|
@@ -24,9 +23,6 @@ const observedAttributes = [
|
|
|
24
23
|
export const Input = (host) => {
|
|
25
24
|
const { type = 'text', pattern, allowedPattern, autocomplete, value, readonly, disabled, min, max, step, maxlength, } = host, { onChange, onFocus, onInput, onRef } = useInput(host);
|
|
26
25
|
const onBeforeInput = useAllowedPattern(allowedPattern);
|
|
27
|
-
useImperativeApi({
|
|
28
|
-
focus: () => host.shadowRoot?.querySelector('#input')?.focus(),
|
|
29
|
-
}, []);
|
|
30
26
|
return render(html `
|
|
31
27
|
<input
|
|
32
28
|
${ref(onRef)}
|
package/dist/styles.js
CHANGED
|
@@ -37,7 +37,7 @@ export const styles = css `
|
|
|
37
37
|
--float-display: var(--cosmoz-input-float-display, block);
|
|
38
38
|
--contour-color: var(--line-color);
|
|
39
39
|
--contour-size: var(--cosmoz-input-contour-size);
|
|
40
|
-
--label-translate-y: var(--cosmoz-input-label-translate-y,
|
|
40
|
+
--label-translate-y: var(--cosmoz-input-label-translate-y, none);
|
|
41
41
|
|
|
42
42
|
display: block;
|
|
43
43
|
padding: var(--cosmoz-input-padding, 8px 0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neovici/cosmoz-input",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.4",
|
|
4
4
|
"description": "A input web component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lit-html",
|
|
@@ -30,8 +30,10 @@
|
|
|
30
30
|
"test": "wtr --coverage",
|
|
31
31
|
"test:watch": "wtr --watch",
|
|
32
32
|
"prepare": "husky install",
|
|
33
|
-
"storybook:
|
|
34
|
-
"storybook:
|
|
33
|
+
"storybook:start": "storybook dev -p 8000",
|
|
34
|
+
"storybook:build": "storybook build",
|
|
35
|
+
"storybook:deploy": "storybook-to-ghpages",
|
|
36
|
+
"storybook:preview": "npm run storybook:build && http-server ./storybook-static/ --silent"
|
|
35
37
|
},
|
|
36
38
|
"release": {
|
|
37
39
|
"plugins": [
|
|
@@ -78,11 +80,12 @@
|
|
|
78
80
|
"@open-wc/testing": "^4.0.0",
|
|
79
81
|
"@semantic-release/changelog": "^6.0.0",
|
|
80
82
|
"@semantic-release/git": "^10.0.0",
|
|
81
|
-
"@storybook/
|
|
83
|
+
"@storybook/web-components-vite": "^9.1.5",
|
|
82
84
|
"@types/mocha": "^10.0.3",
|
|
83
|
-
"
|
|
85
|
+
"http-server": "^14.1.1",
|
|
84
86
|
"husky": "^8.0.0",
|
|
85
87
|
"semantic-release": "^22.0.0",
|
|
86
|
-
"sinon": "^17.0.0"
|
|
88
|
+
"sinon": "^17.0.0",
|
|
89
|
+
"storybook": "^9.1.5"
|
|
87
90
|
}
|
|
88
91
|
}
|