@vaadin/radio-group 24.0.5 → 24.1.0-alpha10

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/README.md CHANGED
@@ -12,7 +12,7 @@ A web component that allows the user to choose one item from a group of choices.
12
12
  </vaadin-radio-group>
13
13
  ```
14
14
 
15
- [<img src="https://raw.githubusercontent.com/vaadin/web-components/master/packages/radio-group/screenshot.png" width="370" alt="Screenshot of vaadin-radio-group">](https://vaadin.com/docs/latest/components/radio-button)
15
+ [<img src="https://raw.githubusercontent.com/vaadin/web-components/main/packages/radio-group/screenshot.png" width="370" alt="Screenshot of vaadin-radio-group">](https://vaadin.com/docs/latest/components/radio-button)
16
16
 
17
17
  ## Installation
18
18
 
@@ -31,7 +31,7 @@ import '@vaadin/radio-group';
31
31
  ## Themes
32
32
 
33
33
  Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/styling), Lumo and Material.
34
- The [main entrypoint](https://github.com/vaadin/web-components/blob/master/packages/radio-group/vaadin-radio-group.js) of the package uses the Lumo theme.
34
+ The [main entrypoint](https://github.com/vaadin/web-components/blob/main/packages/radio-group/vaadin-radio-group.js) of the package uses the Lumo theme.
35
35
 
36
36
  To use the Material theme, import the component from the `theme/material` folder:
37
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/radio-group",
3
- "version": "24.0.5",
3
+ "version": "24.1.0-alpha10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -38,11 +38,12 @@
38
38
  ],
39
39
  "dependencies": {
40
40
  "@polymer/polymer": "^3.0.0",
41
- "@vaadin/component-base": "~24.0.5",
42
- "@vaadin/field-base": "~24.0.5",
43
- "@vaadin/vaadin-lumo-styles": "~24.0.5",
44
- "@vaadin/vaadin-material-styles": "~24.0.5",
45
- "@vaadin/vaadin-themable-mixin": "~24.0.5"
41
+ "@vaadin/a11y-base": "24.1.0-alpha10",
42
+ "@vaadin/component-base": "24.1.0-alpha10",
43
+ "@vaadin/field-base": "24.1.0-alpha10",
44
+ "@vaadin/vaadin-lumo-styles": "24.1.0-alpha10",
45
+ "@vaadin/vaadin-material-styles": "24.1.0-alpha10",
46
+ "@vaadin/vaadin-themable-mixin": "24.1.0-alpha10"
46
47
  },
47
48
  "devDependencies": {
48
49
  "@esm-bundle/chai": "^4.3.4",
@@ -53,5 +54,5 @@
53
54
  "web-types.json",
54
55
  "web-types.lit.json"
55
56
  ],
56
- "gitHead": "e384c1b5c02e01a4382a433f727d075de9a4ee97"
57
+ "gitHead": "12e39be7eb3b49c68708e8ca3de2fb22e91051a1"
57
58
  }
@@ -3,9 +3,9 @@
3
3
  * Copyright (c) 2017 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { ActiveMixin } from '@vaadin/component-base/src/active-mixin.js';
6
+ import { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';
7
+ import { DelegateFocusMixin } from '@vaadin/a11y-base/src/delegate-focus-mixin.js';
7
8
  import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
8
- import { DelegateFocusMixin } from '@vaadin/component-base/src/delegate-focus-mixin.js';
9
9
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
10
10
  import { CheckedMixin } from '@vaadin/field-base/src/checked-mixin.js';
11
11
  import { LabelMixin } from '@vaadin/field-base/src/label-mixin.js';
@@ -4,9 +4,9 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
7
- import { ActiveMixin } from '@vaadin/component-base/src/active-mixin.js';
7
+ import { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';
8
+ import { DelegateFocusMixin } from '@vaadin/a11y-base/src/delegate-focus-mixin.js';
8
9
  import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
9
- import { DelegateFocusMixin } from '@vaadin/component-base/src/delegate-focus-mixin.js';
10
10
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
11
11
  import { CheckedMixin } from '@vaadin/field-base/src/checked-mixin.js';
12
12
  import { InputController } from '@vaadin/field-base/src/input-controller.js';
@@ -99,6 +99,9 @@ class RadioButton extends LabelMixin(
99
99
  [part='radio'] {
100
100
  width: var(--vaadin-radio-button-size, 1em);
101
101
  height: var(--vaadin-radio-button-size, 1em);
102
+ --_input-border-width: var(--vaadin-input-field-border-width, 0);
103
+ --_input-border-color: var(--vaadin-input-field-border-color, transparent);
104
+ box-shadow: inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);
102
105
  }
103
106
 
104
107
  [part='radio']::before {
@@ -116,6 +119,19 @@ class RadioButton extends LabelMixin(
116
119
  align-self: stretch;
117
120
  -webkit-appearance: none;
118
121
  }
122
+
123
+ @media (forced-colors: active) {
124
+ [part='radio'] {
125
+ outline: 1px solid;
126
+ outline-offset: -1px;
127
+ }
128
+ :host([focused]) [part='radio'] {
129
+ outline-width: 2px;
130
+ }
131
+ :host([disabled]) [part='radio'] {
132
+ outline-color: GrayText;
133
+ }
134
+ }
119
135
  </style>
120
136
  <div class="vaadin-radio-button-container">
121
137
  <div part="radio" aria-hidden="true"></div>
@@ -3,10 +3,10 @@
3
3
  * Copyright (c) 2017 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { DisabledMixin } from '@vaadin/component-base/src/disabled-mixin.js';
6
+ import { DisabledMixin } from '@vaadin/a11y-base/src/disabled-mixin.js';
7
+ import { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';
8
+ import { KeyboardMixin } from '@vaadin/a11y-base/src/keyboard-mixin.js';
7
9
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
8
- import { FocusMixin } from '@vaadin/component-base/src/focus-mixin.js';
9
- import { KeyboardMixin } from '@vaadin/component-base/src/keyboard-mixin.js';
10
10
  import { FieldMixin } from '@vaadin/field-base/src/field-mixin.js';
11
11
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
12
 
@@ -5,10 +5,10 @@
5
5
  */
6
6
  import { FlattenedNodesObserver } from '@polymer/polymer/lib/utils/flattened-nodes-observer.js';
7
7
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
8
- import { DisabledMixin } from '@vaadin/component-base/src/disabled-mixin.js';
8
+ import { DisabledMixin } from '@vaadin/a11y-base/src/disabled-mixin.js';
9
+ import { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';
10
+ import { KeyboardMixin } from '@vaadin/a11y-base/src/keyboard-mixin.js';
9
11
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
10
- import { FocusMixin } from '@vaadin/component-base/src/focus-mixin.js';
11
- import { KeyboardMixin } from '@vaadin/component-base/src/keyboard-mixin.js';
12
12
  import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
13
13
  import { generateUniqueId } from '@vaadin/component-base/src/unique-id-utils.js';
14
14
  import { FieldMixin } from '@vaadin/field-base/src/field-mixin.js';
@@ -39,6 +39,8 @@ registerStyles(
39
39
  transition: transform 0.2s cubic-bezier(0.12, 0.32, 0.54, 2), background-color 0.15s;
40
40
  will-change: transform;
41
41
  cursor: var(--lumo-clickable-cursor);
42
+ /* Default field border color */
43
+ --_input-border-color: var(--vaadin-input-field-border-color, var(--lumo-contrast-50pct));
42
44
  }
43
45
 
44
46
  /* Used for activation "halo" */
@@ -73,6 +75,10 @@ registerStyles(
73
75
  background-clip: content-box;
74
76
  }
75
77
 
78
+ :host([checked]) {
79
+ --vaadin-input-field-border-color: transparent;
80
+ }
81
+
76
82
  :host([checked]) [part='radio'] {
77
83
  background-color: var(--lumo-primary-color);
78
84
  }
@@ -101,12 +107,14 @@ registerStyles(
101
107
  }
102
108
 
103
109
  :host([focus-ring]) [part='radio'] {
104
- box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);
110
+ box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct),
111
+ inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);
105
112
  }
106
113
 
107
114
  :host([disabled]) {
108
115
  pointer-events: none;
109
116
  color: var(--lumo-disabled-text-color);
117
+ --vaadin-input-field-border-color: var(--lumo-contrast-20pct);
110
118
  }
111
119
 
112
120
  :host([disabled]) ::slotted(label) {
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/radio-group",
4
- "version": "24.0.5",
4
+ "version": "24.1.0-alpha10",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -209,6 +209,28 @@
209
209
  ]
210
210
  }
211
211
  },
212
+ {
213
+ "name": "accessible-name",
214
+ "description": "String used to label the component to screen reader users.",
215
+ "value": {
216
+ "type": [
217
+ "string",
218
+ "null",
219
+ "undefined"
220
+ ]
221
+ }
222
+ },
223
+ {
224
+ "name": "accessible-name-ref",
225
+ "description": "Id of the element used as label of the component to screen reader users.",
226
+ "value": {
227
+ "type": [
228
+ "string",
229
+ "null",
230
+ "undefined"
231
+ ]
232
+ }
233
+ },
212
234
  {
213
235
  "name": "value",
214
236
  "description": "The value of the radio group.",
@@ -307,6 +329,28 @@
307
329
  ]
308
330
  }
309
331
  },
332
+ {
333
+ "name": "accessibleName",
334
+ "description": "String used to label the component to screen reader users.",
335
+ "value": {
336
+ "type": [
337
+ "string",
338
+ "null",
339
+ "undefined"
340
+ ]
341
+ }
342
+ },
343
+ {
344
+ "name": "accessibleNameRef",
345
+ "description": "Id of the element used as label of the component to screen reader users.",
346
+ "value": {
347
+ "type": [
348
+ "string",
349
+ "null",
350
+ "undefined"
351
+ ]
352
+ }
353
+ },
310
354
  {
311
355
  "name": "value",
312
356
  "description": "The value of the radio group.",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/radio-group",
4
- "version": "24.0.5",
4
+ "version": "24.1.0-alpha10",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -124,6 +124,20 @@
124
124
  "kind": "expression"
125
125
  }
126
126
  },
127
+ {
128
+ "name": ".accessibleName",
129
+ "description": "String used to label the component to screen reader users.",
130
+ "value": {
131
+ "kind": "expression"
132
+ }
133
+ },
134
+ {
135
+ "name": ".accessibleNameRef",
136
+ "description": "Id of the element used as label of the component to screen reader users.",
137
+ "value": {
138
+ "kind": "expression"
139
+ }
140
+ },
127
141
  {
128
142
  "name": ".value",
129
143
  "description": "The value of the radio group.",