@vaadin/radio-group 23.3.2 → 23.3.4

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": "23.3.2",
3
+ "version": "23.3.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -38,11 +38,11 @@
38
38
  ],
39
39
  "dependencies": {
40
40
  "@polymer/polymer": "^3.0.0",
41
- "@vaadin/component-base": "~23.3.2",
42
- "@vaadin/field-base": "~23.3.2",
43
- "@vaadin/vaadin-lumo-styles": "~23.3.2",
44
- "@vaadin/vaadin-material-styles": "~23.3.2",
45
- "@vaadin/vaadin-themable-mixin": "~23.3.2"
41
+ "@vaadin/component-base": "~23.3.4",
42
+ "@vaadin/field-base": "~23.3.4",
43
+ "@vaadin/vaadin-lumo-styles": "~23.3.4",
44
+ "@vaadin/vaadin-material-styles": "~23.3.4",
45
+ "@vaadin/vaadin-themable-mixin": "~23.3.4"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@esm-bundle/chai": "^4.3.4",
@@ -53,5 +53,5 @@
53
53
  "web-types.json",
54
54
  "web-types.lit.json"
55
55
  ],
56
- "gitHead": "f60f640b01fc4f03303a9bfd6ed137503a5ada52"
56
+ "gitHead": "e896534f360fb7b7eed1ed6b3e660ca1fe44e028"
57
57
  }
@@ -86,30 +86,41 @@ class RadioButton extends LabelMixin(
86
86
  align-items: baseline;
87
87
  }
88
88
 
89
- .vaadin-radio-button-wrapper {
90
- position: relative;
91
- height: 100%;
89
+ [part='radio'],
90
+ ::slotted(input),
91
+ ::slotted(label) {
92
+ grid-row: 1;
93
+ }
94
+
95
+ [part='radio'],
96
+ ::slotted(input) {
97
+ grid-column: 1;
98
+ }
99
+
100
+ [part='radio'] {
101
+ width: var(--vaadin-radio-button-size, 1em);
102
+ height: var(--vaadin-radio-button-size, 1em);
103
+ }
104
+
105
+ [part='radio']::before {
106
+ display: block;
107
+ content: '\\202F';
108
+ line-height: var(--vaadin-radio-button-size, 1em);
109
+ contain: paint;
92
110
  }
93
111
 
94
112
  /* visually hidden */
95
113
  ::slotted(input) {
96
- position: absolute;
97
- top: 0;
98
- left: 0;
99
- right: 0;
100
- width: 100%;
101
- height: 100%;
102
114
  opacity: 0;
103
115
  cursor: inherit;
104
116
  margin: 0;
117
+ align-self: stretch;
118
+ -webkit-appearance: none;
105
119
  }
106
120
  </style>
107
121
  <div class="vaadin-radio-button-container">
108
- <div class="vaadin-radio-button-wrapper">
109
- <div part="radio"></div>
110
- <slot name="input"></slot>
111
- </div>
112
-
122
+ <div part="radio"></div>
123
+ <slot name="input"></slot>
113
124
  <slot name="label"></slot>
114
125
 
115
126
  <div style="display: none !important">
@@ -21,34 +21,33 @@ registerStyles(
21
21
  user-select: none;
22
22
  cursor: default;
23
23
  outline: none;
24
+ --_radio-button-size: var(--vaadin-radio-button-size, calc(var(--lumo-size-m) / 2));
24
25
  }
25
26
 
26
27
  :host([has-label]) ::slotted(label) {
27
- padding: var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs) var(--lumo-space-xs);
28
+ padding-block: var(--lumo-space-xs);
29
+ padding-inline: var(--lumo-space-xs) var(--lumo-space-s);
28
30
  }
29
31
 
30
32
  [part='radio'] {
31
- width: calc(var(--lumo-size-m) / 2);
32
- height: calc(var(--lumo-size-m) / 2);
33
+ width: var(--_radio-button-size);
34
+ height: var(--_radio-button-size);
33
35
  margin: var(--lumo-space-xs);
34
36
  position: relative;
35
37
  border-radius: 50%;
36
38
  background-color: var(--lumo-contrast-20pct);
37
39
  transition: transform 0.2s cubic-bezier(0.12, 0.32, 0.54, 2), background-color 0.15s;
38
40
  will-change: transform;
39
- line-height: 1.2;
40
41
  cursor: var(--lumo-clickable-cursor);
41
42
  }
42
43
 
43
44
  /* Used for activation "halo" */
44
45
  [part='radio']::before {
45
- /* Needed to align the radio-button nicely on the baseline */
46
- content: '\\2003';
47
46
  pointer-events: none;
48
47
  color: transparent;
49
- display: inline-block;
50
48
  width: 100%;
51
49
  height: 100%;
50
+ line-height: var(--_radio-button-size);
52
51
  border-radius: inherit;
53
52
  background-color: inherit;
54
53
  transform: scale(1.4);
@@ -11,6 +11,7 @@ registerStyles(
11
11
  user-select: none;
12
12
  outline: none;
13
13
  -webkit-tap-highlight-color: transparent;
14
+ --_radio-button-size: var(--vaadin-radio-button-size, 16px);
14
15
  }
15
16
 
16
17
  :host([has-label]) ::slotted(label) {
@@ -18,9 +19,8 @@ registerStyles(
18
19
  }
19
20
 
20
21
  [part='radio'] {
21
- display: inline-block;
22
- width: 16px;
23
- height: 16px;
22
+ width: var(--_radio-button-size);
23
+ height: var(--_radio-button-size);
24
24
  margin: 4px;
25
25
  position: relative;
26
26
  border: 2px solid;
@@ -28,18 +28,15 @@ registerStyles(
28
28
  background-color: transparent;
29
29
  transition: transform 0.2s cubic-bezier(0.12, 0.32, 0.54, 2), background-color 0.15s;
30
30
  will-change: transform;
31
- line-height: 1.2;
32
31
  }
33
32
 
34
33
  /* Used for activation "halo" */
35
34
  [part='radio']::before {
36
- /* Needed to align the radio-button nicely on the baseline */
37
- content: '\\2003';
38
35
  pointer-events: none;
39
36
  color: transparent;
40
- display: inline-block;
41
37
  width: 100%;
42
38
  height: 100%;
39
+ line-height: var(--_radio-button-size);
43
40
  border-radius: inherit;
44
41
  background-color: var(--material-primary-color);
45
42
  transform: scale(2.5);
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": "23.3.2",
4
+ "version": "23.3.4",
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/radio-group",
4
- "version": "23.3.2",
4
+ "version": "23.3.4",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {