@vaadin/input-container 25.0.0-alpha10 → 25.0.0-alpha12

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/input-container",
3
- "version": "25.0.0-alpha10",
3
+ "version": "25.0.0-alpha12",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -21,9 +21,6 @@
21
21
  "type": "module",
22
22
  "files": [
23
23
  "src",
24
- "!src/styles/*-base-styles.d.ts",
25
- "!src/styles/*-base-styles.js",
26
- "theme",
27
24
  "vaadin-*.d.ts",
28
25
  "vaadin-*.js"
29
26
  ],
@@ -33,18 +30,18 @@
33
30
  "web-component"
34
31
  ],
35
32
  "dependencies": {
36
- "@vaadin/component-base": "25.0.0-alpha10",
37
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha10",
38
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha10",
33
+ "@vaadin/component-base": "25.0.0-alpha12",
34
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha12",
39
35
  "lit": "^3.0.0"
40
36
  },
41
37
  "devDependencies": {
42
- "@vaadin/chai-plugins": "25.0.0-alpha10",
43
- "@vaadin/icon": "25.0.0-alpha10",
44
- "@vaadin/icons": "25.0.0-alpha10",
45
- "@vaadin/test-runner-commands": "25.0.0-alpha10",
38
+ "@vaadin/chai-plugins": "25.0.0-alpha12",
39
+ "@vaadin/icon": "25.0.0-alpha12",
40
+ "@vaadin/icons": "25.0.0-alpha12",
41
+ "@vaadin/test-runner-commands": "25.0.0-alpha12",
46
42
  "@vaadin/testing-helpers": "^2.0.0",
43
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha12",
47
44
  "sinon": "^18.0.0"
48
45
  },
49
- "gitHead": "6cc6c94079e805fa5b2f0af4dbf3b2a7485e57d0"
46
+ "gitHead": "e75527348f9ba7c363d068c868b9f030c15b84a1"
50
47
  }
@@ -3,7 +3,7 @@
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 '@vaadin/component-base/src/style-props.js';
6
+ import '@vaadin/component-base/src/styles/style-props.js';
7
7
  import { css } from 'lit';
8
8
 
9
9
  export const inputContainerStyles = css`
@@ -9,7 +9,7 @@ import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
9
9
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
10
  import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
11
11
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
- import { inputContainerStyles } from './styles/vaadin-input-container-core-styles.js';
12
+ import { inputContainerStyles } from './styles/vaadin-input-container-base-styles.js';
13
13
 
14
14
  /**
15
15
  * @customElement
@@ -1,2 +1,2 @@
1
- import './theme/lumo/vaadin-input-container.js';
1
+ import './src/vaadin-input-container.js';
2
2
  export * from './src/vaadin-input-container.js';
@@ -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 inputContainerStyles: CSSResult;
@@ -1,72 +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 inputContainerStyles = css`
9
- :host {
10
- display: flex;
11
- align-items: center;
12
- flex: 0 1 auto;
13
- border-radius:
14
- /* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius */
15
- var(--vaadin-input-field-top-start-radius, var(--__border-radius))
16
- var(--vaadin-input-field-top-end-radius, var(--__border-radius))
17
- var(--vaadin-input-field-bottom-end-radius, var(--__border-radius))
18
- var(--vaadin-input-field-bottom-start-radius, var(--__border-radius));
19
- --_border-radius: var(--vaadin-input-field-border-radius, 0);
20
- --_input-border-width: var(--vaadin-input-field-border-width, 0px);
21
- --_input-border-color: var(--vaadin-input-field-border-color, transparent);
22
- box-shadow: inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);
23
- }
24
-
25
- :host([dir='rtl']) {
26
- border-radius:
27
- /* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */
28
- var(--vaadin-input-field-top-end-radius, var(--_border-radius))
29
- var(--vaadin-input-field-top-start-radius, var(--_border-radius))
30
- var(--vaadin-input-field-bottom-start-radius, var(--_border-radius))
31
- var(--vaadin-input-field-bottom-end-radius, var(--_border-radius));
32
- }
33
-
34
- :host([hidden]) {
35
- display: none !important;
36
- }
37
-
38
- /* Reset the native input styles */
39
- ::slotted(input) {
40
- appearance: none;
41
- flex: auto;
42
- white-space: nowrap;
43
- overflow: hidden;
44
- width: 100%;
45
- height: 100%;
46
- outline: none;
47
- margin: 0;
48
- padding: 0;
49
- border: 0;
50
- border-radius: 0;
51
- min-width: 0;
52
- font: inherit;
53
- line-height: normal;
54
- color: inherit;
55
- background-color: transparent;
56
- /* Disable default invalid style in Firefox */
57
- box-shadow: none;
58
- }
59
-
60
- ::slotted(*) {
61
- flex: none;
62
- }
63
-
64
- ::slotted(:is(input, textarea))::placeholder {
65
- /* Use ::slotted(input:placeholder-shown) in themes to style the placeholder. */
66
- /* because ::slotted(...)::placeholder does not work in Safari. */
67
- font: inherit;
68
- color: inherit;
69
- /* Override default opacity in Firefox */
70
- opacity: 1;
71
- }
72
- `;
@@ -1,4 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/color.js';
2
- import '@vaadin/vaadin-lumo-styles/sizing.js';
3
- import '@vaadin/vaadin-lumo-styles/style.js';
4
- import '@vaadin/vaadin-lumo-styles/typography.js';
@@ -1,188 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/color.js';
2
- import '@vaadin/vaadin-lumo-styles/sizing.js';
3
- import '@vaadin/vaadin-lumo-styles/style.js';
4
- import '@vaadin/vaadin-lumo-styles/typography.js';
5
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
6
-
7
- registerStyles(
8
- 'vaadin-input-container',
9
- css`
10
- :host {
11
- background: var(--_background);
12
- padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);
13
- font-weight: var(--vaadin-input-field-value-font-weight, 500);
14
- line-height: 1;
15
- position: relative;
16
- cursor: text;
17
- box-sizing: border-box;
18
- border-radius:
19
- /* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#syntax */
20
- var(--vaadin-input-field-top-start-radius, var(--_input-container-radius))
21
- var(--vaadin-input-field-top-end-radius, var(--_input-container-radius))
22
- var(--vaadin-input-field-bottom-end-radius, var(--_input-container-radius))
23
- var(--vaadin-input-field-bottom-start-radius, var(--_input-container-radius));
24
- /* Fallback */
25
- --_input-container-radius: var(--vaadin-input-field-border-radius, var(--lumo-border-radius-m));
26
- --_input-height: var(--lumo-text-field-size, var(--lumo-size-m));
27
- /* Default values */
28
- --_background: var(--vaadin-input-field-background, var(--lumo-contrast-10pct));
29
- --_hover-highlight: var(--vaadin-input-field-hover-highlight, var(--lumo-contrast-50pct));
30
- --_input-border-color: var(--vaadin-input-field-border-color, var(--lumo-contrast-50pct));
31
- --_icon-color: var(--vaadin-input-field-icon-color, var(--lumo-contrast-60pct));
32
- --_icon-size: var(--vaadin-input-field-icon-size, var(--lumo-icon-size-m));
33
- --_invalid-background: var(--vaadin-input-field-invalid-background, var(--lumo-error-color-10pct));
34
- --_invalid-hover-highlight: var(--vaadin-input-field-invalid-hover-highlight, var(--lumo-error-color-50pct));
35
- --_disabled-background: var(--vaadin-input-field-disabled-background, var(--lumo-contrast-5pct));
36
- --_disabled-value-color: var(--vaadin-input-field-disabled-value-color, var(--lumo-disabled-text-color));
37
- }
38
-
39
- :host([dir='rtl']) {
40
- border-radius:
41
- /* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */
42
- var(--vaadin-input-field-top-end-radius, var(--_input-container-radius))
43
- var(--vaadin-input-field-top-start-radius, var(--_input-container-radius))
44
- var(--vaadin-input-field-bottom-start-radius, var(--_input-container-radius))
45
- var(--vaadin-input-field-bottom-end-radius, var(--_input-container-radius));
46
- }
47
-
48
- /* Used for hover and activation effects */
49
- :host::after {
50
- content: '';
51
- position: absolute;
52
- inset: 0;
53
- border-radius: inherit;
54
- pointer-events: none;
55
- background: var(--_hover-highlight);
56
- opacity: 0;
57
- transition:
58
- transform 0.15s,
59
- opacity 0.2s;
60
- transform-origin: 100% 0;
61
- }
62
-
63
- ::slotted(:not([slot$='fix'])) {
64
- cursor: inherit;
65
- min-height: var(--vaadin-input-field-height, var(--_input-height));
66
- padding: 0 0.25em;
67
- --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
68
- mask-image: var(--_lumo-text-field-overflow-mask-image);
69
- }
70
-
71
- /* Read-only */
72
- :host([readonly]) {
73
- color: var(--lumo-secondary-text-color);
74
- background-color: transparent;
75
- cursor: default;
76
- }
77
-
78
- :host([readonly])::after {
79
- background-color: transparent;
80
- opacity: 1;
81
- border: var(--vaadin-input-field-readonly-border, 1px dashed var(--lumo-contrast-30pct));
82
- }
83
-
84
- /* Disabled */
85
- :host([disabled]) {
86
- background: var(--_disabled-background);
87
- }
88
-
89
- :host([disabled]) ::slotted(:not([slot$='fix'])) {
90
- -webkit-text-fill-color: var(--_disabled-value-color);
91
- color: var(--_disabled-value-color);
92
- }
93
-
94
- /* Invalid */
95
- :host([invalid]) {
96
- background: var(--_invalid-background);
97
- }
98
-
99
- :host([invalid]:not([readonly]))::after {
100
- background: var(--_invalid-hover-highlight);
101
- }
102
-
103
- /* Slotted icons */
104
- ::slotted(vaadin-icon) {
105
- color: var(--_icon-color);
106
- width: var(--_icon-size);
107
- height: var(--_icon-size);
108
- }
109
-
110
- /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
111
- ::slotted(vaadin-icon[icon^='vaadin:']) {
112
- padding: 0.25em;
113
- box-sizing: border-box !important;
114
- }
115
-
116
- /* Text align */
117
- :host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
118
- --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent, #000 1.25em);
119
- }
120
-
121
- @-moz-document url-prefix() {
122
- :host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
123
- mask-image: var(--_lumo-text-field-overflow-mask-image);
124
- }
125
- }
126
-
127
- :host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
128
- text-align: start;
129
- --_lumo-text-field-overflow-mask-image: none;
130
- }
131
-
132
- :host([theme~='align-center']) ::slotted(:not([slot$='fix'])) {
133
- text-align: center;
134
- --_lumo-text-field-overflow-mask-image: none;
135
- }
136
-
137
- :host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
138
- text-align: end;
139
- --_lumo-text-field-overflow-mask-image: none;
140
- }
141
-
142
- @-moz-document url-prefix() {
143
- /* Firefox is smart enough to align overflowing text to right */
144
- :host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
145
- --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
146
- }
147
- }
148
-
149
- @-moz-document url-prefix() {
150
- /* Firefox is smart enough to align overflowing text to right */
151
- :host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
152
- --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
153
- }
154
- }
155
-
156
- /* RTL specific styles */
157
- :host([dir='rtl'])::after {
158
- transform-origin: 0% 0;
159
- }
160
-
161
- :host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
162
- --_lumo-text-field-overflow-mask-image: none;
163
- }
164
-
165
- :host([theme~='align-center'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
166
- --_lumo-text-field-overflow-mask-image: none;
167
- }
168
-
169
- :host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
170
- --_lumo-text-field-overflow-mask-image: none;
171
- }
172
-
173
- @-moz-document url-prefix() {
174
- /* Firefox is smart enough to align overflowing text to right */
175
- :host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
176
- --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
177
- }
178
- }
179
-
180
- @-moz-document url-prefix() {
181
- /* Firefox is smart enough to align overflowing text to right */
182
- :host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
183
- --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
184
- }
185
- }
186
- `,
187
- { moduleId: 'lumo-input-container' },
188
- );
@@ -1,2 +0,0 @@
1
- import './vaadin-input-container-styles.js';
2
- import '../../src/vaadin-input-container.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-input-container-styles.js';
2
- import '../../src/vaadin-input-container.js';