@vaadin/radio-group 25.0.0-alpha8 → 25.0.0-beta1

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/radio-group",
3
- "version": "25.0.0-alpha8",
3
+ "version": "25.0.0-beta1",
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",
@@ -39,22 +36,22 @@
39
36
  ],
40
37
  "dependencies": {
41
38
  "@open-wc/dedupe-mixin": "^1.3.0",
42
- "@vaadin/a11y-base": "25.0.0-alpha8",
43
- "@vaadin/component-base": "25.0.0-alpha8",
44
- "@vaadin/field-base": "25.0.0-alpha8",
45
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha8",
46
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha8",
39
+ "@vaadin/a11y-base": "25.0.0-beta1",
40
+ "@vaadin/component-base": "25.0.0-beta1",
41
+ "@vaadin/field-base": "25.0.0-beta1",
42
+ "@vaadin/vaadin-themable-mixin": "25.0.0-beta1",
47
43
  "lit": "^3.0.0"
48
44
  },
49
45
  "devDependencies": {
50
- "@vaadin/chai-plugins": "25.0.0-alpha8",
51
- "@vaadin/test-runner-commands": "25.0.0-alpha8",
46
+ "@vaadin/chai-plugins": "25.0.0-beta1",
47
+ "@vaadin/test-runner-commands": "25.0.0-beta1",
52
48
  "@vaadin/testing-helpers": "^2.0.0",
53
- "sinon": "^18.0.0"
49
+ "@vaadin/vaadin-lumo-styles": "25.0.0-beta1",
50
+ "sinon": "^21.0.0"
54
51
  },
55
52
  "web-types": [
56
53
  "web-types.json",
57
54
  "web-types.lit.json"
58
55
  ],
59
- "gitHead": "ebf53673d5f639d2b1b6f2b31f640f530643ee2f"
56
+ "gitHead": "1d20cf54e582d1f2e209126d4586f8b4c01c50e0"
60
57
  }
@@ -16,8 +16,8 @@ const radioButton = css`
16
16
  top: 50%;
17
17
  left: 50%;
18
18
  translate: -50% -50%;
19
- width: var(--vaadin-radio-button-dot-size, 50%);
20
- height: var(--vaadin-radio-button-dot-size, 50%);
19
+ width: var(--vaadin-radio-button-marker-size, 50%);
20
+ height: var(--vaadin-radio-button-marker-size, 50%);
21
21
  border-radius: 50%;
22
22
  }
23
23
  `;
@@ -3,7 +3,19 @@
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 { css } from 'lit';
6
7
  import { field } from '@vaadin/field-base/src/styles/field-base-styles.js';
7
8
  import { group } from '@vaadin/field-base/src/styles/group-base-styles.js';
8
9
 
9
- export const radioGroupStyles = [field, group('radio')];
10
+ export const radioGroupStyles = [
11
+ field,
12
+ group('radio'),
13
+ css`
14
+ :host([readonly]) ::slotted(vaadin-radio-button) {
15
+ --vaadin-radio-button-background: transparent;
16
+ --vaadin-radio-button-border-color: var(--vaadin-border-color);
17
+ --vaadin-radio-button-marker-color: var(--vaadin-text-color);
18
+ --_border-style: dashed;
19
+ }
20
+ `,
21
+ ];
@@ -31,14 +31,14 @@ export * from './vaadin-radio-button-mixin.js';
31
31
  *
32
32
  * The following state attributes are available for styling:
33
33
  *
34
- * Attribute | Description | Part name
35
- * -------------|-------------|------------
36
- * `active` | Set when the radio button is pressed down, either with a pointer or the keyboard. | `:host`
37
- * `disabled` | Set when the radio button is disabled. | `:host`
38
- * `focus-ring` | Set when the radio button is focused using the keyboard. | `:host`
39
- * `focused` | Set when the radio button is focused. | `:host`
40
- * `checked` | Set when the radio button is checked. | `:host`
41
- * `has-label` | Set when the radio button has a label. | `:host`
34
+ * Attribute | Description
35
+ * -------------|--------------------------
36
+ * `active` | Set when the radio button is pressed, either with a pointer or the keyboard.
37
+ * `disabled` | Set when the radio button is disabled.
38
+ * `focus-ring` | Set when the radio button is focused using the keyboard.
39
+ * `focused` | Set when the radio button is focused.
40
+ * `checked` | Set when the radio button is checked.
41
+ * `has-label` | Set when the radio button has a label.
42
42
  *
43
43
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
44
44
  *
@@ -9,7 +9,7 @@ import { ElementMixin } from '@vaadin/component-base/src/element-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 { radioButtonStyles } from './styles/vaadin-radio-button-core-styles.js';
12
+ import { radioButtonStyles } from './styles/vaadin-radio-button-base-styles.js';
13
13
  import { RadioButtonMixin } from './vaadin-radio-button-mixin.js';
14
14
 
15
15
  /**
@@ -34,14 +34,14 @@ import { RadioButtonMixin } from './vaadin-radio-button-mixin.js';
34
34
  *
35
35
  * The following state attributes are available for styling:
36
36
  *
37
- * Attribute | Description | Part name
38
- * -------------|-------------|------------
39
- * `active` | Set when the radio button is pressed down, either with a pointer or the keyboard. | `:host`
40
- * `disabled` | Set when the radio button is disabled. | `:host`
41
- * `focus-ring` | Set when the radio button is focused using the keyboard. | `:host`
42
- * `focused` | Set when the radio button is focused. | `:host`
43
- * `checked` | Set when the radio button is checked. | `:host`
44
- * `has-label` | Set when the radio button has a label. | `:host`
37
+ * Attribute | Description
38
+ * -------------|--------------------------
39
+ * `active` | Set when the radio button is pressed, either with a pointer or the keyboard.
40
+ * `disabled` | Set when the radio button is disabled.
41
+ * `focus-ring` | Set when the radio button is focused using the keyboard.
42
+ * `focused` | Set when the radio button is focused.
43
+ * `checked` | Set when the radio button is checked.
44
+ * `has-label` | Set when the radio button has a label.
45
45
  *
46
46
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
47
47
  *
@@ -209,7 +209,7 @@ export const RadioGroupMixin = (superclass) =>
209
209
  }
210
210
 
211
211
  /**
212
- * @param {number} index
212
+ * @param {HTMLElement} radioButton
213
213
  * @private
214
214
  */
215
215
  __selectNextRadioButton(radioButton) {
@@ -219,7 +219,7 @@ export const RadioGroupMixin = (superclass) =>
219
219
  }
220
220
 
221
221
  /**
222
- * @param {number} index
222
+ * @param {HTMLElement} radioButton
223
223
  * @private
224
224
  */
225
225
  __selectPrevRadioButton(radioButton) {
@@ -34,16 +34,17 @@ export * from './vaadin-radio-group-mixin.js';
34
34
  *
35
35
  * The following state attributes are available for styling:
36
36
  *
37
- * Attribute | Description | Part name
38
- * --------------------|-------------------------------------------|------------
39
- * `disabled` | Set when the element is disabled | :host
40
- * `readonly` | Set when the element is readonly | :host
41
- * `invalid` | Set when the element is invalid | :host
42
- * `focused` | Set when the element is focused | :host
43
- * `has-label` | Set when the element has a label | :host
44
- * `has-value` | Set when the element has a value | :host
45
- * `has-helper` | Set when the element has helper text | :host
46
- * `has-error-message` | Set when the element has an error message | :host
37
+ * Attribute | Description
38
+ * --------------------|---------------------------------
39
+ * `disabled` | Set when the element is disabled
40
+ * `readonly` | Set when the element is readonly
41
+ * `invalid` | Set when the element is invalid
42
+ * `focused` | Set when the element is focused
43
+ * `has-label` | Set when the element has a label
44
+ * `has-value` | Set when the element has a value
45
+ * `has-helper` | Set when the element has helper text
46
+ * `has-error-message` | Set when the element has an error message
47
+ * `has-tooltip` | Set when the element has a slotted tooltip
47
48
  *
48
49
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
49
50
  *
@@ -10,7 +10,7 @@ import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
10
10
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.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 { radioGroupStyles } from './styles/vaadin-radio-group-core-styles.js';
13
+ import { radioGroupStyles } from './styles/vaadin-radio-group-base-styles.js';
14
14
  import { RadioGroupMixin } from './vaadin-radio-group-mixin.js';
15
15
 
16
16
  /**
@@ -38,16 +38,17 @@ import { RadioGroupMixin } from './vaadin-radio-group-mixin.js';
38
38
  *
39
39
  * The following state attributes are available for styling:
40
40
  *
41
- * Attribute | Description | Part name
42
- * --------------------|-------------------------------------------|------------
43
- * `disabled` | Set when the element is disabled | :host
44
- * `readonly` | Set when the element is readonly | :host
45
- * `invalid` | Set when the element is invalid | :host
46
- * `focused` | Set when the element is focused | :host
47
- * `has-label` | Set when the element has a label | :host
48
- * `has-value` | Set when the element has a value | :host
49
- * `has-helper` | Set when the element has helper text | :host
50
- * `has-error-message` | Set when the element has an error message | :host
41
+ * Attribute | Description
42
+ * --------------------|---------------------------------
43
+ * `disabled` | Set when the element is disabled
44
+ * `readonly` | Set when the element is readonly
45
+ * `invalid` | Set when the element is invalid
46
+ * `focused` | Set when the element is focused
47
+ * `has-label` | Set when the element has a label
48
+ * `has-value` | Set when the element has a value
49
+ * `has-helper` | Set when the element has helper text
50
+ * `has-error-message` | Set when the element has an error message
51
+ * `has-tooltip` | Set when the element has a slotted tooltip
51
52
  *
52
53
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
53
54
  *
@@ -1,2 +1,2 @@
1
- import './theme/lumo/vaadin-radio-button.js';
1
+ import './src/vaadin-radio-button.js';
2
2
  export * from './src/vaadin-radio-button.js';
@@ -1,2 +1,2 @@
1
- import './theme/lumo/vaadin-radio-group.js';
1
+ import './src/vaadin-radio-group.js';
2
2
  export * from './src/vaadin-radio-group.js';
package/web-types.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/radio-group",
4
- "version": "25.0.0-alpha8",
4
+ "version": "25.0.0-beta1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "vaadin-radio-button",
11
- "description": "`<vaadin-radio-button>` is a web component representing a choice in a radio group.\nOnly one radio button in the group can be selected at the same time.\n\n```html\n<vaadin-radio-group label=\"Travel class\">\n <vaadin-radio-button value=\"economy\" label=\"Economy\"></vaadin-radio-button>\n <vaadin-radio-button value=\"business\" label=\"Business\"></vaadin-radio-button>\n <vaadin-radio-button value=\"firstClass\" label=\"First Class\"></vaadin-radio-button>\n</vaadin-radio-group>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n------------|----------------\n`radio` | The wrapper element that contains slotted `<input type=\"radio\">`.\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-------------|-------------|------------\n`active` | Set when the radio button is pressed down, either with a pointer or the keyboard. | `:host`\n`disabled` | Set when the radio button is disabled. | `:host`\n`focus-ring` | Set when the radio button is focused using the keyboard. | `:host`\n`focused` | Set when the radio button is focused. | `:host`\n`checked` | Set when the radio button is checked. | `:host`\n`has-label` | Set when the radio button has a label. | `:host`\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
11
+ "description": "`<vaadin-radio-button>` is a web component representing a choice in a radio group.\nOnly one radio button in the group can be selected at the same time.\n\n```html\n<vaadin-radio-group label=\"Travel class\">\n <vaadin-radio-button value=\"economy\" label=\"Economy\"></vaadin-radio-button>\n <vaadin-radio-button value=\"business\" label=\"Business\"></vaadin-radio-button>\n <vaadin-radio-button value=\"firstClass\" label=\"First Class\"></vaadin-radio-button>\n</vaadin-radio-group>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n------------|----------------\n`radio` | The wrapper element that contains slotted `<input type=\"radio\">`.\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-------------|--------------------------\n`active` | Set when the radio button is pressed, either with a pointer or the keyboard.\n`disabled` | Set when the radio button is disabled.\n`focus-ring` | Set when the radio button is focused using the keyboard.\n`focused` | Set when the radio button is focused.\n`checked` | Set when the radio button is checked.\n`has-label` | Set when the radio button has a label.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "disabled",
@@ -163,7 +163,7 @@
163
163
  },
164
164
  {
165
165
  "name": "vaadin-radio-group",
166
- "description": "`<vaadin-radio-group>` is a web component that allows the user to choose one item from a group of choices.\n\n```html\n<vaadin-radio-group label=\"Travel class\">\n <vaadin-radio-button value=\"economy\" label=\"Economy\"></vaadin-radio-button>\n <vaadin-radio-button value=\"business\" label=\"Business\"></vaadin-radio-button>\n <vaadin-radio-button value=\"firstClass\" label=\"First Class\"></vaadin-radio-button>\n</vaadin-radio-group>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`group-field` | The radio button elements wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n--------------------|-------------------------------------------|------------\n`disabled` | Set when the element is disabled | :host\n`readonly` | Set when the element is readonly | :host\n`invalid` | Set when the element is invalid | :host\n`focused` | Set when the element is focused | :host\n`has-label` | Set when the element has a label | :host\n`has-value` | Set when the element has a value | :host\n`has-helper` | Set when the element has helper text | :host\n`has-error-message` | Set when the element has an error message | :host\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
166
+ "description": "`<vaadin-radio-group>` is a web component that allows the user to choose one item from a group of choices.\n\n```html\n<vaadin-radio-group label=\"Travel class\">\n <vaadin-radio-button value=\"economy\" label=\"Economy\"></vaadin-radio-button>\n <vaadin-radio-button value=\"business\" label=\"Business\"></vaadin-radio-button>\n <vaadin-radio-button value=\"firstClass\" label=\"First Class\"></vaadin-radio-button>\n</vaadin-radio-group>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`group-field` | The radio button elements wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n--------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`readonly` | Set when the element is readonly\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`has-label` | Set when the element has a label\n`has-value` | Set when the element has a value\n`has-helper` | Set when the element has helper text\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
167
167
  "attributes": [
168
168
  {
169
169
  "name": "disabled",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/radio-group",
4
- "version": "25.0.0-alpha8",
4
+ "version": "25.0.0-beta1",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -16,7 +16,7 @@
16
16
  "elements": [
17
17
  {
18
18
  "name": "vaadin-radio-button",
19
- "description": "`<vaadin-radio-button>` is a web component representing a choice in a radio group.\nOnly one radio button in the group can be selected at the same time.\n\n```html\n<vaadin-radio-group label=\"Travel class\">\n <vaadin-radio-button value=\"economy\" label=\"Economy\"></vaadin-radio-button>\n <vaadin-radio-button value=\"business\" label=\"Business\"></vaadin-radio-button>\n <vaadin-radio-button value=\"firstClass\" label=\"First Class\"></vaadin-radio-button>\n</vaadin-radio-group>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n------------|----------------\n`radio` | The wrapper element that contains slotted `<input type=\"radio\">`.\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-------------|-------------|------------\n`active` | Set when the radio button is pressed down, either with a pointer or the keyboard. | `:host`\n`disabled` | Set when the radio button is disabled. | `:host`\n`focus-ring` | Set when the radio button is focused using the keyboard. | `:host`\n`focused` | Set when the radio button is focused. | `:host`\n`checked` | Set when the radio button is checked. | `:host`\n`has-label` | Set when the radio button has a label. | `:host`\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
19
+ "description": "`<vaadin-radio-button>` is a web component representing a choice in a radio group.\nOnly one radio button in the group can be selected at the same time.\n\n```html\n<vaadin-radio-group label=\"Travel class\">\n <vaadin-radio-button value=\"economy\" label=\"Economy\"></vaadin-radio-button>\n <vaadin-radio-button value=\"business\" label=\"Business\"></vaadin-radio-button>\n <vaadin-radio-button value=\"firstClass\" label=\"First Class\"></vaadin-radio-button>\n</vaadin-radio-group>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n------------|----------------\n`radio` | The wrapper element that contains slotted `<input type=\"radio\">`.\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-------------|--------------------------\n`active` | Set when the radio button is pressed, either with a pointer or the keyboard.\n`disabled` | Set when the radio button is disabled.\n`focus-ring` | Set when the radio button is focused using the keyboard.\n`focused` | Set when the radio button is focused.\n`checked` | Set when the radio button is checked.\n`has-label` | Set when the radio button has a label.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {
@@ -79,7 +79,7 @@
79
79
  },
80
80
  {
81
81
  "name": "vaadin-radio-group",
82
- "description": "`<vaadin-radio-group>` is a web component that allows the user to choose one item from a group of choices.\n\n```html\n<vaadin-radio-group label=\"Travel class\">\n <vaadin-radio-button value=\"economy\" label=\"Economy\"></vaadin-radio-button>\n <vaadin-radio-button value=\"business\" label=\"Business\"></vaadin-radio-button>\n <vaadin-radio-button value=\"firstClass\" label=\"First Class\"></vaadin-radio-button>\n</vaadin-radio-group>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`group-field` | The radio button elements wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n--------------------|-------------------------------------------|------------\n`disabled` | Set when the element is disabled | :host\n`readonly` | Set when the element is readonly | :host\n`invalid` | Set when the element is invalid | :host\n`focused` | Set when the element is focused | :host\n`has-label` | Set when the element has a label | :host\n`has-value` | Set when the element has a value | :host\n`has-helper` | Set when the element has helper text | :host\n`has-error-message` | Set when the element has an error message | :host\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
82
+ "description": "`<vaadin-radio-group>` is a web component that allows the user to choose one item from a group of choices.\n\n```html\n<vaadin-radio-group label=\"Travel class\">\n <vaadin-radio-button value=\"economy\" label=\"Economy\"></vaadin-radio-button>\n <vaadin-radio-button value=\"business\" label=\"Business\"></vaadin-radio-button>\n <vaadin-radio-button value=\"firstClass\" label=\"First Class\"></vaadin-radio-button>\n</vaadin-radio-group>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`group-field` | The radio button elements wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n--------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`readonly` | Set when the element is readonly\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`has-label` | Set when the element has a label\n`has-value` | Set when the element has a value\n`has-helper` | Set when the element has helper text\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
83
83
  "extension": true,
84
84
  "attributes": [
85
85
  {
@@ -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 radioButtonStyles: CSSResult;
@@ -1,26 +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 radioButton = css`
10
- @media (forced-colors: active) {
11
- [part='radio'] {
12
- outline: 1px solid;
13
- outline-offset: -1px;
14
- }
15
-
16
- :host([focused]) [part='radio'] {
17
- outline-width: 2px;
18
- }
19
-
20
- :host([disabled]) [part='radio'] {
21
- outline-color: GrayText;
22
- }
23
- }
24
- `;
25
-
26
- export const radioButtonStyles = [checkable('radio', 'radio-button'), radioButton];
@@ -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 radioGroupStyles: CSSResult;
@@ -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 { group } from '@vaadin/field-base/src/styles/group-core-styles.js';
7
-
8
- export const radioGroupStyles = group('radio');
@@ -1,5 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/color.js';
2
- import '@vaadin/vaadin-lumo-styles/sizing.js';
3
- import '@vaadin/vaadin-lumo-styles/spacing.js';
4
- import '@vaadin/vaadin-lumo-styles/style.js';
5
- import '@vaadin/vaadin-lumo-styles/typography.js';
@@ -1,149 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/color.js';
2
- import '@vaadin/vaadin-lumo-styles/sizing.js';
3
- import '@vaadin/vaadin-lumo-styles/spacing.js';
4
- import '@vaadin/vaadin-lumo-styles/style.js';
5
- import '@vaadin/vaadin-lumo-styles/typography.js';
6
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
7
-
8
- registerStyles(
9
- 'vaadin-radio-button',
10
- css`
11
- :host {
12
- color: var(--vaadin-radio-button-label-color, var(--lumo-body-text-color));
13
- font-size: var(--vaadin-radio-button-label-font-size, var(--lumo-font-size-m));
14
- font-family: var(--lumo-font-family);
15
- line-height: var(--lumo-line-height-s);
16
- -webkit-font-smoothing: antialiased;
17
- -moz-osx-font-smoothing: grayscale;
18
- -webkit-tap-highlight-color: transparent;
19
- -webkit-user-select: none;
20
- user-select: none;
21
- cursor: default;
22
- outline: none;
23
- --_radio-button-size: var(--vaadin-radio-button-size, calc(var(--lumo-size-m) / 2));
24
- --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
25
- --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
26
- --_selection-color: var(--vaadin-selection-color, var(--lumo-primary-color));
27
- }
28
-
29
- :host([has-label]) ::slotted(label) {
30
- padding: var(
31
- --vaadin-radio-button-label-padding,
32
- var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs) var(--lumo-space-xs)
33
- );
34
- }
35
-
36
- [part='radio'] {
37
- width: var(--_radio-button-size);
38
- height: var(--_radio-button-size);
39
- margin: var(--lumo-space-xs);
40
- position: relative;
41
- border-radius: 50%;
42
- background: var(--vaadin-radio-button-background, var(--lumo-contrast-20pct));
43
- transition:
44
- transform 0.2s cubic-bezier(0.12, 0.32, 0.54, 2),
45
- background-color 0.15s;
46
- will-change: transform;
47
- cursor: var(--lumo-clickable-cursor);
48
- /* Default field border color */
49
- --_input-border-color: var(--vaadin-input-field-border-color, var(--lumo-contrast-50pct));
50
- }
51
-
52
- /* Used for activation "halo" */
53
- [part='radio']::before {
54
- pointer-events: none;
55
- color: transparent;
56
- width: 100%;
57
- height: 100%;
58
- line-height: var(--_radio-button-size);
59
- border-radius: inherit;
60
- background-color: inherit;
61
- transform: scale(1.4);
62
- opacity: 0;
63
- transition:
64
- transform 0.1s,
65
- opacity 0.8s;
66
- will-change: transform, opacity;
67
- }
68
-
69
- /* Used for the dot */
70
- [part='radio']::after {
71
- content: '';
72
- pointer-events: none;
73
- width: 0;
74
- height: 0;
75
- border: var(--vaadin-radio-button-dot-size, 3px) solid
76
- var(--vaadin-radio-button-dot-color, var(--lumo-primary-contrast-color));
77
- border-radius: 50%;
78
- position: absolute;
79
- top: 50%;
80
- left: 50%;
81
- transform: translate(-50%, -50%) scale(0);
82
- transition: 0.25s transform;
83
- will-change: transform;
84
- background-clip: content-box;
85
- }
86
-
87
- :host([checked]) {
88
- --vaadin-input-field-border-color: transparent;
89
- }
90
-
91
- :host([checked]) [part='radio'] {
92
- background-color: var(--_selection-color);
93
- }
94
-
95
- :host([checked]) [part='radio']::after {
96
- transform: translate(-50%, -50%) scale(1);
97
- }
98
-
99
- :host(:not([checked]):not([disabled]):hover) [part='radio'] {
100
- background: var(--vaadin-radio-button-background-hover, var(--lumo-contrast-30pct));
101
- }
102
-
103
- :host([active]) [part='radio'] {
104
- transform: scale(0.9);
105
- transition-duration: 0.05s;
106
- }
107
-
108
- :host([active][checked]) [part='radio'] {
109
- transform: scale(1.1);
110
- }
111
-
112
- :host([active]:not([checked])) [part='radio']::before {
113
- transition-duration: 0.01s, 0.01s;
114
- transform: scale(0);
115
- opacity: 0.4;
116
- }
117
-
118
- :host([focus-ring]) [part='radio'] {
119
- box-shadow:
120
- 0 0 0 1px var(--lumo-base-color),
121
- 0 0 0 calc(var(--_focus-ring-width) + 1px) var(--_focus-ring-color),
122
- inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);
123
- }
124
-
125
- :host([disabled]) {
126
- pointer-events: none;
127
- color: var(--lumo-disabled-text-color);
128
- --vaadin-input-field-border-color: var(--lumo-contrast-20pct);
129
- }
130
-
131
- :host([disabled]) ::slotted(label) {
132
- color: inherit;
133
- }
134
-
135
- :host([disabled]) [part='radio'] {
136
- background-color: var(--vaadin-radio-button-disabled-background, var(--lumo-contrast-10pct));
137
- }
138
-
139
- :host([disabled]) [part='radio']::after {
140
- border-color: var(--vaadin-radio-button-disabled-dot-color, var(--lumo-contrast-30pct));
141
- }
142
-
143
- /* RTL specific styles */
144
- :host([dir='rtl'][has-label]) ::slotted(label) {
145
- padding: var(--lumo-space-xs) var(--lumo-space-xs) var(--lumo-space-xs) var(--lumo-space-s);
146
- }
147
- `,
148
- { moduleId: 'lumo-radio-button' },
149
- );
@@ -1,2 +0,0 @@
1
- import './vaadin-radio-button-styles.js';
2
- import '../../src/vaadin-radio-button.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-radio-button-styles.js';
2
- import '../../src/vaadin-radio-button.js';
@@ -1,5 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/color.js';
2
- import '@vaadin/vaadin-lumo-styles/sizing.js';
3
- import '@vaadin/vaadin-lumo-styles/spacing.js';
4
- import '@vaadin/vaadin-lumo-styles/style.js';
5
- import '@vaadin/vaadin-lumo-styles/typography.js';
@@ -1,55 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/color.js';
2
- import '@vaadin/vaadin-lumo-styles/sizing.js';
3
- import '@vaadin/vaadin-lumo-styles/spacing.js';
4
- import '@vaadin/vaadin-lumo-styles/style.js';
5
- import '@vaadin/vaadin-lumo-styles/typography.js';
6
- import { helper } from '@vaadin/vaadin-lumo-styles/mixins/helper.js';
7
- import { requiredField } from '@vaadin/vaadin-lumo-styles/mixins/required-field.js';
8
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
-
10
- const radioGroup = css`
11
- :host {
12
- color: var(--lumo-body-text-color);
13
- font-size: var(--lumo-font-size-m);
14
- font-family: var(--lumo-font-family);
15
- -webkit-font-smoothing: antialiased;
16
- -moz-osx-font-smoothing: grayscale;
17
- -webkit-tap-highlight-color: transparent;
18
- padding: var(--lumo-space-xs) 0;
19
- }
20
-
21
- :host::before {
22
- /* Effective height of vaadin-radio-button */
23
- height: var(--lumo-size-s);
24
- box-sizing: border-box;
25
- display: inline-flex;
26
- align-items: center;
27
- }
28
-
29
- :host([theme~='vertical']) [part='group-field'] {
30
- flex-direction: column;
31
- }
32
-
33
- :host([disabled]) [part='label'] {
34
- color: var(--lumo-disabled-text-color);
35
- -webkit-text-fill-color: var(--lumo-disabled-text-color);
36
- }
37
-
38
- :host([focused]:not([readonly])) [part='label'] {
39
- color: var(--lumo-primary-text-color);
40
- }
41
-
42
- :host(:hover:not([readonly]):not([focused])) [part='label'],
43
- :host(:hover:not([readonly])) [part='helper-text'] {
44
- color: var(--lumo-body-text-color);
45
- }
46
-
47
- /* Touch device adjustment */
48
- @media (pointer: coarse) {
49
- :host(:hover:not([readonly]):not([focused])) [part='label'] {
50
- color: var(--lumo-secondary-text-color);
51
- }
52
- }
53
- `;
54
-
55
- registerStyles('vaadin-radio-group', [requiredField, helper, radioGroup], { moduleId: 'lumo-radio-group' });
@@ -1,3 +0,0 @@
1
- import './vaadin-radio-button.js';
2
- import './vaadin-radio-group-styles.js';
3
- import '../../src/vaadin-radio-group.js';
@@ -1,3 +0,0 @@
1
- import './vaadin-radio-button.js';
2
- import './vaadin-radio-group-styles.js';
3
- import '../../src/vaadin-radio-group.js';