@vaadin/field-base 25.0.0-alpha1 → 25.0.0-alpha11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/field-base",
3
- "version": "25.0.0-alpha1",
3
+ "version": "25.0.0-alpha11",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -33,15 +33,15 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "@open-wc/dedupe-mixin": "^1.3.0",
36
- "@vaadin/a11y-base": "25.0.0-alpha1",
37
- "@vaadin/component-base": "25.0.0-alpha1",
36
+ "@vaadin/a11y-base": "25.0.0-alpha11",
37
+ "@vaadin/component-base": "25.0.0-alpha11",
38
38
  "lit": "^3.0.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@vaadin/chai-plugins": "25.0.0-alpha1",
42
- "@vaadin/test-runner-commands": "25.0.0-alpha1",
43
- "@vaadin/testing-helpers": "^1.1.0",
41
+ "@vaadin/chai-plugins": "25.0.0-alpha11",
42
+ "@vaadin/test-runner-commands": "25.0.0-alpha11",
43
+ "@vaadin/testing-helpers": "^2.0.0",
44
44
  "sinon": "^18.0.0"
45
45
  },
46
- "gitHead": "b8c22a4a0c64156210d0daac96b43ae4e5526d49"
46
+ "gitHead": "abfd315ba5a7484a613e0768635a4e8fe945a44b"
47
47
  }
@@ -103,13 +103,27 @@ export const InputControlMixin = (superclass) =>
103
103
 
104
104
  /** @protected */
105
105
  get slotStyles() {
106
- // Needed for Safari, where ::slotted(...)::placeholder does not work
106
+ const tag = this.localName;
107
+
107
108
  return [
108
109
  `
109
- :is(input[slot='input'], textarea[slot='textarea'])::placeholder {
110
+ /* Needed for Safari, where ::slotted(...)::placeholder does not work */
111
+ ${tag} > :is(input[slot='input'], textarea[slot='textarea'])::placeholder {
110
112
  font: inherit;
111
113
  color: inherit;
112
114
  }
115
+
116
+ /* Override built-in autofill styles */
117
+ ${tag} > input[slot='input']:autofill {
118
+ -webkit-text-fill-color: var(--vaadin-input-field-autofill-color, black);
119
+ background-clip: text;
120
+ }
121
+
122
+ ${tag}:has(> input[slot='input']:autofill) {
123
+ --vaadin-input-field-background: var(--vaadin-input-field-autofill-background, lightyellow);
124
+ --vaadin-input-field-value-color: var(--vaadin-input-field-autofill-color, black);
125
+ --vaadin-input-field-button-color: var(--vaadin-input-field-autofill-color, black);
126
+ }
113
127
  `,
114
128
  ];
115
129
  }
@@ -47,15 +47,6 @@ export declare class InputFieldMixinClass {
47
47
  */
48
48
  autocomplete: string | undefined;
49
49
 
50
- /**
51
- * This is a property supported by Safari that is used to control whether
52
- * autocorrection should be enabled when the user is entering/editing the text.
53
- * Possible values are:
54
- * on: Enable autocorrection.
55
- * off: Disable autocorrection.
56
- */
57
- autocorrect: 'off' | 'on' | undefined;
58
-
59
50
  /**
60
51
  * This is a property supported by Safari and Chrome that is used to control whether
61
52
  * autocapitalization should be enabled when the user is entering/editing the text.
@@ -3,8 +3,8 @@
3
3
  * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { button } from './button-core-styles.js';
7
- import { container } from './container-core-styles.js';
8
- import { field } from './field-core-styles.js';
6
+ import { button } from './button-base-styles.js';
7
+ import { container } from './container-base-styles.js';
8
+ import { field } from './field-base-styles.js';
9
9
 
10
10
  export const inputFieldShared = [field, container, button];
@@ -1,8 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import type { CSSResult } from 'lit';
7
-
8
- export const button: CSSResult;
@@ -1,21 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import { css } from 'lit';
7
-
8
- export const button = css`
9
- [part='clear-button'] {
10
- display: none;
11
- cursor: default;
12
- }
13
-
14
- [part='clear-button']::before {
15
- content: '\\2715';
16
- }
17
-
18
- :host([clear-button-visible][has-value]:not([disabled]):not([readonly])) [part='clear-button'] {
19
- display: block;
20
- }
21
- `;
@@ -1,8 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import type { CSSResult } from 'lit';
7
-
8
- export const container: CSSResult;
@@ -1,16 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import { css } from 'lit';
7
-
8
- export const container = css`
9
- [class$='container'] {
10
- display: flex;
11
- flex-direction: column;
12
- min-width: 100%;
13
- max-width: 100%;
14
- width: var(--vaadin-field-default-width, 12em);
15
- }
16
- `;
@@ -1,8 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import type { CSSResult } from 'lit';
7
-
8
- export const field: CSSResult;
@@ -1,42 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import { css } from 'lit';
7
-
8
- export const field = css`
9
- :host {
10
- display: inline-flex;
11
- outline: none;
12
- }
13
-
14
- :host::before {
15
- content: '\\2003';
16
- width: 0;
17
- display: inline-block;
18
- /* Size and position this element on the same vertical position as the input-field element
19
- to make vertical align for the host element work as expected */
20
- }
21
-
22
- :host([hidden]) {
23
- display: none !important;
24
- }
25
-
26
- :host(:not([has-label])) [part='label'] {
27
- display: none;
28
- }
29
-
30
- @media (forced-colors: active) {
31
- :host(:not([readonly])) [part='input-field'] {
32
- outline: 1px solid;
33
- outline-offset: -1px;
34
- }
35
- :host([focused]) [part='input-field'] {
36
- outline-width: 2px;
37
- }
38
- :host([disabled]) [part='input-field'] {
39
- outline-color: GrayText;
40
- }
41
- }
42
- `;