@neovici/cosmoz-input 5.6.0 → 5.6.2

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/styles.js CHANGED
@@ -69,6 +69,7 @@ export const styles = css `
69
69
  line-height: var(--line-height);
70
70
  font-family: var(--font-family);
71
71
  caret-color: var(--focused-color);
72
+ cursor: text;
72
73
  }
73
74
 
74
75
  :host([disabled]) {
@@ -128,6 +129,7 @@ export const styles = css `
128
129
  text-transform: var(--cosmoz-input-label-text-transform);
129
130
  font-weight: var(--cosmoz-input-label-font-weight);
130
131
  user-select: none;
132
+ cursor: text;
131
133
  }
132
134
 
133
135
  .wrap:has(#input:not(:placeholder-shown)) {
@@ -229,7 +231,8 @@ export const styles = css `
229
231
  display: none;
230
232
  }
231
233
  :host([no-spinner]) #input {
232
- -moz-appearence: textfield;
234
+ -moz-appearance: textfield;
235
+ appearance: textfield;
233
236
  }
234
237
 
235
238
  :host([autosize]) {
package/dist/use-input.js CHANGED
@@ -12,10 +12,12 @@ export const useInput = (host) => {
12
12
  useImperativeApi({ validate }, [validate]);
13
13
  // delegatesFocus doesn't cover clicks on slotted light-DOM content
14
14
  useEffect(() => {
15
- const onMouseDown = () => {
16
- if (!host.matches(':focus-within')) {
17
- host.focus();
18
- }
15
+ const onMouseDown = (e) => {
16
+ const target = e.composedPath()[0];
17
+ if (target?.closest?.('input, textarea'))
18
+ return;
19
+ e.preventDefault();
20
+ inputRef.current?.focus();
19
21
  };
20
22
  root.addEventListener('mousedown', onMouseDown);
21
23
  return () => root.removeEventListener('mousedown', onMouseDown);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-input",
3
- "version": "5.6.0",
3
+ "version": "5.6.2",
4
4
  "description": "A input web component",
5
5
  "keywords": [
6
6
  "lit-html",
@@ -84,12 +84,12 @@
84
84
  "@storybook/addon-docs": "^10.0.0",
85
85
  "@storybook/addon-vitest": "^10.2.4",
86
86
  "@storybook/web-components-vite": "^10.2.4",
87
- "@types/node": "^24.0.0",
87
+ "@types/node": "^25.2.3",
88
88
  "@vitest/browser": "^4.0.18",
89
89
  "@vitest/browser-playwright": "^4.0.18",
90
90
  "http-server": "^14.1.1",
91
91
  "husky": "^9.1.7",
92
- "jsdom": "^26.1.0",
92
+ "jsdom": "^29.0.0",
93
93
  "lint-staged": "^16.2.7",
94
94
  "semantic-release": "^25.0.2",
95
95
  "shadow-dom-testing-library": "^1.13.1",