@vaadin/field-base 25.0.0-alpha3 → 25.0.0-alpha4

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-alpha3",
3
+ "version": "25.0.0-alpha4",
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-alpha3",
37
- "@vaadin/component-base": "25.0.0-alpha3",
36
+ "@vaadin/a11y-base": "25.0.0-alpha4",
37
+ "@vaadin/component-base": "25.0.0-alpha4",
38
38
  "lit": "^3.0.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@vaadin/chai-plugins": "25.0.0-alpha3",
42
- "@vaadin/test-runner-commands": "25.0.0-alpha3",
41
+ "@vaadin/chai-plugins": "25.0.0-alpha4",
42
+ "@vaadin/test-runner-commands": "25.0.0-alpha4",
43
43
  "@vaadin/testing-helpers": "^2.0.0",
44
44
  "sinon": "^18.0.0"
45
45
  },
46
- "gitHead": "8367dd20a47f53ca5589ad349a8e286ec2673055"
46
+ "gitHead": "ce4421f0daf26027b863b91787a474e4cc264344"
47
47
  }
@@ -0,0 +1,8 @@
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 checkable: (part: string, propName?: string) => CSSResult;
@@ -0,0 +1,64 @@
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, unsafeCSS } from 'lit';
7
+
8
+ export const checkable = (part, propName = part) => css`
9
+ :host {
10
+ display: inline-block;
11
+ }
12
+
13
+ :host([hidden]) {
14
+ display: none !important;
15
+ }
16
+
17
+ :host([disabled]) {
18
+ -webkit-tap-highlight-color: transparent;
19
+ }
20
+
21
+ .vaadin-${unsafeCSS(propName)}-container {
22
+ display: grid;
23
+ grid-template-columns: auto 1fr;
24
+ align-items: baseline;
25
+ }
26
+
27
+ [part='${unsafeCSS(part)}'],
28
+ ::slotted(input),
29
+ [part='label'],
30
+ ::slotted(label) {
31
+ grid-row: 1;
32
+ }
33
+
34
+ [part='${unsafeCSS(part)}'],
35
+ ::slotted(input) {
36
+ grid-column: 1;
37
+ }
38
+
39
+ /* Control container (checkbox, radio button) */
40
+ [part='${unsafeCSS(part)}'] {
41
+ width: var(--vaadin-${unsafeCSS(propName)}-size, 1em);
42
+ height: var(--vaadin-${unsafeCSS(propName)}-size, 1em);
43
+ --_input-border-width: var(--vaadin-input-field-border-width, 0);
44
+ --_input-border-color: var(--vaadin-input-field-border-color, transparent);
45
+ box-shadow: inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);
46
+ }
47
+
48
+ [part='${unsafeCSS(part)}']::before {
49
+ display: block;
50
+ content: '\\202F';
51
+ line-height: var(--vaadin-${unsafeCSS(propName)}-size, 1em);
52
+ contain: paint;
53
+ }
54
+
55
+ /* visually hidden */
56
+ ::slotted(input) {
57
+ cursor: inherit;
58
+ margin: 0;
59
+ align-self: stretch;
60
+ -webkit-appearance: none;
61
+ width: initial;
62
+ height: initial;
63
+ }
64
+ `;
@@ -0,0 +1,8 @@
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 group: (name?: string) => CSSResult;
@@ -0,0 +1,37 @@
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
+
8
+ export const group = () => css`
9
+ :host {
10
+ display: inline-flex;
11
+ }
12
+
13
+ :host::before {
14
+ content: '\\2003';
15
+ width: 0;
16
+ display: inline-block;
17
+ }
18
+
19
+ :host([hidden]) {
20
+ display: none !important;
21
+ }
22
+
23
+ .vaadin-group-field-container {
24
+ display: flex;
25
+ flex-direction: column;
26
+ width: 100%;
27
+ }
28
+
29
+ [part='group-field'] {
30
+ display: flex;
31
+ flex-wrap: wrap;
32
+ }
33
+
34
+ :host(:not([has-label])) [part='label'] {
35
+ display: none;
36
+ }
37
+ `;