@vaadin/checkbox 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/checkbox",
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
  "web-types.json",
@@ -37,22 +34,22 @@
37
34
  ],
38
35
  "dependencies": {
39
36
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@vaadin/a11y-base": "25.0.0-alpha10",
41
- "@vaadin/component-base": "25.0.0-alpha10",
42
- "@vaadin/field-base": "25.0.0-alpha10",
43
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha10",
44
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha10",
37
+ "@vaadin/a11y-base": "25.0.0-alpha12",
38
+ "@vaadin/component-base": "25.0.0-alpha12",
39
+ "@vaadin/field-base": "25.0.0-alpha12",
40
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha12",
45
41
  "lit": "^3.0.0"
46
42
  },
47
43
  "devDependencies": {
48
- "@vaadin/chai-plugins": "25.0.0-alpha10",
49
- "@vaadin/test-runner-commands": "25.0.0-alpha10",
44
+ "@vaadin/chai-plugins": "25.0.0-alpha12",
45
+ "@vaadin/test-runner-commands": "25.0.0-alpha12",
50
46
  "@vaadin/testing-helpers": "^2.0.0",
47
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha12",
51
48
  "sinon": "^18.0.0"
52
49
  },
53
50
  "web-types": [
54
51
  "web-types.json",
55
52
  "web-types.lit.json"
56
53
  ],
57
- "gitHead": "6cc6c94079e805fa5b2f0af4dbf3b2a7485e57d0"
54
+ "gitHead": "e75527348f9ba7c363d068c868b9f030c15b84a1"
58
55
  }
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) 2017 - 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
  import { checkable } from '@vaadin/field-base/src/styles/checkable-base-styles.js';
9
9
  import { field } from '@vaadin/field-base/src/styles/field-base-styles.js';
@@ -10,7 +10,7 @@ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
10
  import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
11
11
  import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
12
12
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
13
- import { checkboxStyles } from './styles/vaadin-checkbox-core-styles.js';
13
+ import { checkboxStyles } from './styles/vaadin-checkbox-base-styles.js';
14
14
  import { CheckboxMixin } from './vaadin-checkbox-mixin.js';
15
15
 
16
16
  /**
@@ -1,2 +1,2 @@
1
- import './theme/lumo/vaadin-checkbox.js';
1
+ import './src/vaadin-checkbox.js';
2
2
  export * from './src/vaadin-checkbox.js';
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/checkbox",
4
- "version": "25.0.0-alpha10",
4
+ "version": "25.0.0-alpha12",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/checkbox",
4
- "version": "25.0.0-alpha10",
4
+ "version": "25.0.0-alpha12",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -1,8 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2017 - 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 checkboxStyles: CSSResult;
@@ -1,44 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2017 - 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
- import { checkable } from '@vaadin/field-base/src/styles/checkable-core-styles.js';
8
-
9
- const checkbox = css`
10
- [part='helper-text'],
11
- [part='error-message'] {
12
- grid-column: 2;
13
- }
14
-
15
- :host(:not([has-helper])) [part='helper-text'],
16
- :host(:not([has-error-message])) [part='error-message'] {
17
- display: none;
18
- }
19
-
20
- @media (forced-colors: active) {
21
- [part='checkbox'] {
22
- outline: 1px solid;
23
- outline-offset: -1px;
24
- }
25
-
26
- :host([disabled]) [part='checkbox'],
27
- :host([disabled]) [part='checkbox']::after {
28
- outline-color: GrayText;
29
- }
30
-
31
- :host(:is([checked], [indeterminate])) [part='checkbox']::after {
32
- outline: 1px solid;
33
- outline-offset: -1px;
34
- border-radius: inherit;
35
- }
36
-
37
- :host([focused]) [part='checkbox'],
38
- :host([focused]) [part='checkbox']::after {
39
- outline-width: 2px;
40
- }
41
- }
42
- `;
43
-
44
- export const checkboxStyles = [checkable('checkbox'), checkbox];
@@ -1,6 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/color.js';
2
- import '@vaadin/vaadin-lumo-styles/font-icons.js';
3
- import '@vaadin/vaadin-lumo-styles/sizing.js';
4
- import '@vaadin/vaadin-lumo-styles/spacing.js';
5
- import '@vaadin/vaadin-lumo-styles/style.js';
6
- import '@vaadin/vaadin-lumo-styles/typography.js';
@@ -1,317 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/color.js';
2
- import '@vaadin/vaadin-lumo-styles/font-icons.js';
3
- import '@vaadin/vaadin-lumo-styles/sizing.js';
4
- import '@vaadin/vaadin-lumo-styles/spacing.js';
5
- import '@vaadin/vaadin-lumo-styles/style.js';
6
- import '@vaadin/vaadin-lumo-styles/typography.js';
7
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
8
-
9
- registerStyles(
10
- 'vaadin-checkbox',
11
- css`
12
- :host {
13
- color: var(--vaadin-checkbox-label-color, var(--lumo-body-text-color));
14
- font-size: var(--vaadin-checkbox-label-font-size, var(--lumo-font-size-m));
15
- font-family: var(--lumo-font-family);
16
- line-height: var(--lumo-line-height-s);
17
- -webkit-font-smoothing: antialiased;
18
- -moz-osx-font-smoothing: grayscale;
19
- -webkit-tap-highlight-color: transparent;
20
- -webkit-user-select: none;
21
- user-select: none;
22
- cursor: default;
23
- outline: none;
24
- --_checkbox-size: var(--vaadin-checkbox-size, calc(var(--lumo-size-m) / 2));
25
- --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
26
- --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
27
- --_selection-color: var(--vaadin-selection-color, var(--lumo-primary-color));
28
- --_invalid-background: var(--vaadin-input-field-invalid-background, var(--lumo-error-color-10pct));
29
- --_disabled-checkmark-color: var(--vaadin-checkbox-disabled-checkmark-color, var(--lumo-contrast-30pct));
30
- }
31
-
32
- [part='label'] {
33
- display: flex;
34
- position: relative;
35
- max-width: max-content;
36
- }
37
-
38
- :host([has-label]) ::slotted(label) {
39
- padding: var(
40
- --vaadin-checkbox-label-padding,
41
- var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs) var(--lumo-space-xs)
42
- );
43
- }
44
-
45
- :host([dir='rtl'][has-label]) ::slotted(label) {
46
- padding: var(--lumo-space-xs) var(--lumo-space-xs) var(--lumo-space-xs) var(--lumo-space-s);
47
- }
48
-
49
- :host([has-label][required]) ::slotted(label) {
50
- padding-inline-end: var(--lumo-space-m);
51
- }
52
-
53
- [part='checkbox'] {
54
- width: var(--_checkbox-size);
55
- height: var(--_checkbox-size);
56
- margin: var(--lumo-space-xs);
57
- position: relative;
58
- border-radius: var(--vaadin-checkbox-border-radius, var(--lumo-border-radius-s));
59
- background: var(--vaadin-checkbox-background, var(--lumo-contrast-20pct));
60
- transition:
61
- transform 0.2s cubic-bezier(0.12, 0.32, 0.54, 2),
62
- background-color 0.15s;
63
- cursor: var(--lumo-clickable-cursor);
64
- /* Default field border color */
65
- --_input-border-color: var(--vaadin-input-field-border-color, var(--lumo-contrast-50pct));
66
- }
67
-
68
- :host([indeterminate]),
69
- :host([checked]) {
70
- --vaadin-input-field-border-color: transparent;
71
- }
72
-
73
- :host([indeterminate]) [part='checkbox'],
74
- :host([checked]) [part='checkbox'] {
75
- background-color: var(--_selection-color);
76
- }
77
-
78
- /* Checkmark */
79
- [part='checkbox']::after {
80
- pointer-events: none;
81
- font-family: 'lumo-icons';
82
- content: var(--vaadin-checkbox-checkmark-char, var(--lumo-icons-checkmark));
83
- color: var(--vaadin-checkbox-checkmark-color, var(--lumo-primary-contrast-color));
84
- font-size: var(--vaadin-checkbox-checkmark-size, calc(var(--_checkbox-size) + 2px));
85
- line-height: 1;
86
- position: absolute;
87
- top: -1px;
88
- left: -1px;
89
- contain: content;
90
- opacity: 0;
91
- }
92
-
93
- :host([checked]) [part='checkbox']::after {
94
- opacity: 1;
95
- }
96
-
97
- :host([readonly]:not([checked]):not([indeterminate])) {
98
- color: var(--lumo-secondary-text-color);
99
- }
100
-
101
- :host([readonly]:not([checked]):not([indeterminate])) [part='checkbox'] {
102
- background: transparent;
103
- box-shadow: none;
104
- }
105
-
106
- :host([readonly]:not([checked]):not([indeterminate])) [part='checkbox']::after {
107
- content: '';
108
- box-sizing: border-box;
109
- width: 100%;
110
- height: 100%;
111
- border-radius: inherit;
112
- top: 0;
113
- left: 0;
114
- opacity: 1;
115
- border: var(--vaadin-input-field-readonly-border, 1px dashed var(--lumo-contrast-50pct));
116
- }
117
-
118
- /* Indeterminate checkmark */
119
- :host([indeterminate]) [part='checkbox']::after {
120
- content: var(--vaadin-checkbox-checkmark-char-indeterminate, '');
121
- opacity: 1;
122
- top: 45%;
123
- height: 10%;
124
- left: 22%;
125
- right: 22%;
126
- width: auto;
127
- border: 0;
128
- background-color: var(--lumo-primary-contrast-color);
129
- }
130
-
131
- /* Focus ring */
132
- :host([focus-ring]) [part='checkbox'] {
133
- box-shadow:
134
- 0 0 0 1px var(--lumo-base-color),
135
- 0 0 0 calc(var(--_focus-ring-width) + 1px) var(--_focus-ring-color),
136
- inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);
137
- }
138
-
139
- :host([focus-ring][readonly]:not([checked]):not([indeterminate])) [part='checkbox'] {
140
- box-shadow:
141
- 0 0 0 1px var(--lumo-base-color),
142
- 0 0 0 calc(var(--_focus-ring-width) + 1px) var(--_focus-ring-color);
143
- }
144
-
145
- /* Disabled */
146
- :host([disabled]) {
147
- pointer-events: none;
148
- --vaadin-input-field-border-color: var(--lumo-contrast-20pct);
149
- }
150
-
151
- :host([disabled]) ::slotted(label) {
152
- color: inherit;
153
- }
154
-
155
- :host([disabled]) [part='checkbox'] {
156
- background-color: var(--vaadin-checkbox-disabled-background, var(--lumo-contrast-10pct));
157
- }
158
-
159
- :host([disabled]) [part='checkbox']::after {
160
- color: var(--_disabled-checkmark-color);
161
- }
162
-
163
- :host([disabled]) [part='label'],
164
- :host([disabled]) [part='helper-text'] {
165
- color: var(--lumo-disabled-text-color);
166
- -webkit-text-fill-color: var(--lumo-disabled-text-color);
167
- }
168
-
169
- :host([indeterminate][disabled]) [part='checkbox']::after {
170
- background-color: var(--_disabled-checkmark-color);
171
- }
172
-
173
- :host([readonly][checked]:not([disabled])) [part='checkbox'],
174
- :host([readonly][indeterminate]:not([disabled])) [part='checkbox'] {
175
- background-color: var(--vaadin-checkbox-readonly-checked-background, var(--lumo-contrast-70pct));
176
- }
177
-
178
- /* Used for activation "halo" */
179
- [part='checkbox']::before {
180
- pointer-events: none;
181
- color: transparent;
182
- width: 100%;
183
- height: 100%;
184
- line-height: var(--_checkbox-size);
185
- border-radius: inherit;
186
- background-color: inherit;
187
- transform: scale(1.4);
188
- opacity: 0;
189
- transition:
190
- transform 0.1s,
191
- opacity 0.8s;
192
- }
193
-
194
- /* Hover */
195
- :host(:not([checked]):not([indeterminate]):not([disabled]):not([readonly]):not([invalid]):hover) [part='checkbox'] {
196
- background: var(--vaadin-checkbox-background-hover, var(--lumo-contrast-30pct));
197
- }
198
-
199
- /* Disable hover for touch devices */
200
- @media (pointer: coarse) {
201
- /* prettier-ignore */
202
- :host(:not([checked]):not([indeterminate]):not([disabled]):not([readonly]):not([invalid]):hover) [part='checkbox'] {
203
- background: var(--vaadin-checkbox-background, var(--lumo-contrast-20pct));
204
- }
205
- }
206
-
207
- /* Active */
208
- :host([active]) [part='checkbox'] {
209
- transform: scale(0.9);
210
- transition-duration: 0.05s;
211
- }
212
-
213
- :host([active][checked]) [part='checkbox'] {
214
- transform: scale(1.1);
215
- }
216
-
217
- :host([active]:not([checked])) [part='checkbox']::before {
218
- transition-duration: 0.01s, 0.01s;
219
- transform: scale(0);
220
- opacity: 0.4;
221
- }
222
-
223
- /* Required */
224
- :host([required]) [part='required-indicator'] {
225
- position: absolute;
226
- top: var(--lumo-space-xs);
227
- right: var(--lumo-space-xs);
228
- }
229
-
230
- :host([required][dir='rtl']) [part='required-indicator'] {
231
- right: auto;
232
- left: var(--lumo-space-xs);
233
- }
234
-
235
- :host([required]) [part='required-indicator']::after {
236
- content: var(--lumo-required-field-indicator, '\\2022');
237
- transition: opacity 0.2s;
238
- color: var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color));
239
- width: 1em;
240
- text-align: center;
241
- }
242
-
243
- :host(:not([has-label])) [part='required-indicator'] {
244
- display: none;
245
- }
246
-
247
- /* Invalid */
248
- :host([invalid]) {
249
- --vaadin-input-field-border-color: var(--lumo-error-color);
250
- }
251
-
252
- :host([invalid]) [part='checkbox'] {
253
- background-color: var(--_invalid-background);
254
- background-image: linear-gradient(var(--_invalid-background) 0%, var(--_invalid-background) 100%);
255
- }
256
-
257
- :host([invalid]:hover) [part='checkbox'] {
258
- background-image:
259
- linear-gradient(var(--_invalid-background) 0%, var(--_invalid-background) 100%),
260
- linear-gradient(var(--_invalid-background) 0%, var(--_invalid-background) 100%);
261
- }
262
-
263
- :host([invalid][focus-ring]) {
264
- --_focus-ring-color: var(--lumo-error-color-50pct);
265
- }
266
-
267
- :host([invalid]) [part='required-indicator']::after {
268
- color: var(--lumo-required-field-indicator-color, var(--lumo-error-text-color));
269
- }
270
-
271
- /* Error message */
272
- [part='error-message'] {
273
- font-size: var(--vaadin-input-field-error-font-size, var(--lumo-font-size-xs));
274
- line-height: var(--lumo-line-height-xs);
275
- font-weight: var(--vaadin-input-field-error-font-weight, 400);
276
- color: var(--vaadin-input-field-error-color, var(--lumo-error-text-color));
277
- will-change: max-height;
278
- transition: 0.4s max-height;
279
- max-height: 5em;
280
- padding-inline-start: var(--lumo-space-xs);
281
- }
282
-
283
- :host([has-error-message]) [part='error-message']::after,
284
- :host([has-helper]) [part='helper-text']::after {
285
- content: '';
286
- display: block;
287
- height: 0.4em;
288
- }
289
-
290
- :host(:not([invalid])) [part='error-message'] {
291
- max-height: 0;
292
- overflow: hidden;
293
- }
294
-
295
- /* Helper */
296
- [part='helper-text'] {
297
- display: block;
298
- color: var(--vaadin-input-field-helper-color, var(--lumo-secondary-text-color));
299
- font-size: var(--vaadin-input-field-helper-font-size, var(--lumo-font-size-xs));
300
- line-height: var(--lumo-line-height-xs);
301
- font-weight: var(--vaadin-input-field-helper-font-weight, 400);
302
- margin-left: calc(var(--lumo-border-radius-m) / 4);
303
- transition: color 0.2s;
304
- padding-inline-start: var(--lumo-space-xs);
305
- }
306
-
307
- :host(:hover:not([readonly])) [part='helper-text'] {
308
- color: var(--lumo-body-text-color);
309
- }
310
-
311
- :host([has-error-message]) ::slotted(label),
312
- :host([has-helper]) ::slotted(label) {
313
- padding-bottom: 0;
314
- }
315
- `,
316
- { moduleId: 'lumo-checkbox' },
317
- );
@@ -1,2 +0,0 @@
1
- import './vaadin-checkbox-styles.js';
2
- import '../../src/vaadin-checkbox.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-checkbox-styles.js';
2
- import '../../src/vaadin-checkbox.js';