@neovici/cosmoz-input 6.0.0-beta.4 → 6.0.0-beta.6

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.
Files changed (3) hide show
  1. package/README.md +5 -5
  2. package/dist/styles.js +34 -5
  3. package/package.json +10 -23
package/README.md CHANGED
@@ -1,10 +1,9 @@
1
- cosmoz-input
2
- ==================
1
+ # cosmoz-input
3
2
 
4
3
  [![Build Status](https://github.com/Neovici/cosmoz-input/workflows/CI/badge.svg)](https://github.com/Neovici/cosmoz-input/actions?workflow=CI)
5
4
  [![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/Neovici/cosmoz-input)
6
5
  [![Depfu](https://badges.depfu.com/badges/c887733c2e1b6c70285860279a80fa03/overview.svg)](https://depfu.com/github/Neovici/cosmoz-input?project_id=9639)
7
- [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
6
+ [![Changesets](https://img.shields.io/badge/Changesets-🦋%20changesets-268ADA.svg)](https://github.com/changesets/changesets)
8
7
  [![Maintainability](https://api.codeclimate.com/v1/badges/56671dc0a46898d2f539/maintainability)](https://codeclimate.com/github/Neovici/cosmoz-input/maintainability)
9
8
  [![Test Coverage](https://api.codeclimate.com/v1/badges/56671dc0a46898d2f539/test_coverage)](https://codeclimate.com/github/Neovici/cosmoz-input/test_coverage)
10
9
 
@@ -17,12 +16,13 @@ cosmoz-input
17
16
  ### Installing
18
17
 
19
18
  Using npm:
19
+
20
20
  ```bash
21
21
  npm install --save @neovici/cosmoz-input
22
22
  ```
23
23
 
24
24
  ### Usage
25
25
 
26
- ``` javascript
27
- html`<cosmoz-input .value=${"value"} />`;
26
+ ```javascript
27
+ html`<cosmoz-input .value=${'value'} />`;
28
28
  ```
package/dist/styles.js CHANGED
@@ -141,6 +141,10 @@ export const styles = css `
141
141
  }
142
142
 
143
143
  /* === Variant: inline === */
144
+ :host([variant='inline']) {
145
+ margin-bottom: 0;
146
+ }
147
+
144
148
  :host([variant='inline']) .wrap {
145
149
  margin-top: calc(var(--cz-spacing) * 2.5);
146
150
  }
@@ -201,26 +205,51 @@ export const styles = css `
201
205
 
202
206
  /* === Variant: cell === */
203
207
 
204
- :host([variant='cell']) .wrap {
208
+ :host([variant='cell']) {
209
+ margin-bottom: 0;
210
+ font-size: var(--cz-text-sm);
211
+ line-height: var(--cz-text-sm-line-height);
212
+ }
213
+
214
+ :host([variant='cell']) .wrap:has(#input) {
205
215
  border: 0.5px solid var(--cz-color-bg-quaternary);
206
216
  border-radius: 0;
207
217
  box-shadow: none;
208
218
  }
209
- :host([variant='cell'][invalid]) .wrap {
219
+
220
+ :host([variant='cell']) .wrap:has(#input:focus) {
221
+ background: var(--cz-color-bg-quaternary);
222
+ }
223
+
224
+ :host([variant='cell'][invalid]) .wrap:has(#input) {
210
225
  border-color: var(--cz-color-border-error);
226
+ box-shadow: none;
211
227
  }
228
+
212
229
  :host([variant='cell'][invalid]) .wrap:has(#input:focus) {
213
230
  background: var(--cz-color-bg-error);
214
231
  border: 0.5px solid transparent;
215
232
  }
216
- :host([variant='cell']) .wrap:has(#input:focus) {
217
- background: var(--cz-color-bg-quaternary);
218
- }
219
233
 
220
234
  :host([variant='cell']) label {
221
235
  display: none;
222
236
  }
223
237
 
238
+ :host([variant='cell']) .error {
239
+ left: calc(var(--cz-spacing) * 3);
240
+ bottom: 50%;
241
+ transform: translateY(50%);
242
+ text-overflow: ellipsis;
243
+ white-space: nowrap;
244
+ overflow: hidden;
245
+ max-width: calc(100% - calc(var(--cz-spacing) * 6));
246
+ }
247
+
248
+ :host([variant='cell']:focus-within) .error,
249
+ :host([variant='cell'][has-value]) .error {
250
+ visibility: hidden;
251
+ }
252
+
224
253
  /* === No spinner === */
225
254
 
226
255
  :host([no-spinner]) #input::-webkit-inner-spin-button {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-input",
3
- "version": "6.0.0-beta.4",
3
+ "version": "6.0.0-beta.6",
4
4
  "description": "A input web component",
5
5
  "keywords": [
6
6
  "lit-html",
@@ -32,18 +32,8 @@
32
32
  "storybook:start": "storybook dev -p 8000",
33
33
  "storybook:build": "storybook build",
34
34
  "storybook:deploy": "storybook-to-ghpages",
35
- "storybook:preview": "npm run storybook:build && http-server ./storybook-static/ --silent"
36
- },
37
- "release": {
38
- "plugins": [
39
- "@semantic-release/commit-analyzer",
40
- "@semantic-release/release-notes-generator",
41
- "@semantic-release/changelog",
42
- "@semantic-release/github",
43
- "@semantic-release/npm",
44
- "@semantic-release/git"
45
- ],
46
- "preset": "conventionalcommits"
35
+ "storybook:preview": "npm run storybook:build && http-server ./storybook-static/ --silent",
36
+ "changeset": "changeset"
47
37
  },
48
38
  "publishConfig": {
49
39
  "access": "public"
@@ -76,14 +66,13 @@
76
66
  "lit-html": "^2.0.0 || ^3.0.0"
77
67
  },
78
68
  "devDependencies": {
69
+ "@changesets/cli": "^2.28.1",
79
70
  "@commitlint/cli": "^21.0.0",
80
71
  "@commitlint/config-conventional": "^21.0.1",
81
72
  "@neovici/cfg": "^2.8.0",
82
73
  "@neovici/testing": "^2.3.0",
83
- "@playwright/test": "^1.58.1",
84
- "@semantic-release/changelog": "^6.0.0",
85
- "@semantic-release/git": "^10.0.0",
86
- "@storybook/addon-a11y": "^10.3.3",
74
+ "@playwright/test": "1.61.1",
75
+ "@storybook/addon-a11y": "^10.4.6",
87
76
  "@storybook/addon-docs": "^10.0.0",
88
77
  "@storybook/addon-vitest": "^10.2.4",
89
78
  "@storybook/web-components-vite": "^10.2.4",
@@ -93,13 +82,11 @@
93
82
  "http-server": "^14.1.1",
94
83
  "husky": "^9.1.7",
95
84
  "jsdom": "^29.0.0",
96
- "lint-staged": "^16.2.7",
97
- "semantic-release": "^25.0.2",
85
+ "lint-staged": "^17.0.7",
98
86
  "shadow-dom-testing-library": "^1.13.1",
99
87
  "sinon": "^22.0.0",
100
88
  "storybook": "^10.1.9",
101
- "vitest": "^4.0.18",
102
- "@types/mocha": "^10.0.3",
103
- "playwright": "^1.58.2"
104
- }
89
+ "vitest": "^4.0.18"
90
+ },
91
+ "overrides": {}
105
92
  }