@vaadin/radio-group 23.1.0 → 23.2.0-dev.53560527d

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.1.0",
3
+ "version": "23.2.0-dev.53560527d",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,16 +36,16 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/component-base": "^23.1.0",
40
- "@vaadin/field-base": "^23.1.0",
41
- "@vaadin/vaadin-lumo-styles": "^23.1.0",
42
- "@vaadin/vaadin-material-styles": "^23.1.0",
43
- "@vaadin/vaadin-themable-mixin": "^23.1.0"
39
+ "@vaadin/component-base": "23.2.0-dev.53560527d",
40
+ "@vaadin/field-base": "23.2.0-dev.53560527d",
41
+ "@vaadin/vaadin-lumo-styles": "23.2.0-dev.53560527d",
42
+ "@vaadin/vaadin-material-styles": "23.2.0-dev.53560527d",
43
+ "@vaadin/vaadin-themable-mixin": "23.2.0-dev.53560527d"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@esm-bundle/chai": "^4.3.4",
47
47
  "@vaadin/testing-helpers": "^0.3.2",
48
48
  "sinon": "^13.0.2"
49
49
  },
50
- "gitHead": "322bba42b83f908a78cd972b06acadc5da95a69d"
50
+ "gitHead": "6c5c18369b09e22e76365d8a8a5e4bbb220f969b"
51
51
  }
@@ -149,26 +149,25 @@ class RadioButton extends LabelMixin(
149
149
  }
150
150
 
151
151
  /** @protected */
152
- connectedCallback() {
153
- super.connectedCallback();
152
+ ready() {
153
+ super.ready();
154
154
 
155
- if (!this._inputController) {
156
- this._inputController = new InputController(this, (input) => {
155
+ this.addController(
156
+ new InputController(this, (input) => {
157
157
  this._setInputElement(input);
158
158
  this._setFocusElement(input);
159
159
  this.stateTarget = input;
160
160
  this.ariaTarget = input;
161
- });
162
- this.addController(this._inputController);
163
- this.addController(new LabelledInputController(this.inputElement, this._labelController));
164
- this.addController(
165
- new SlotTargetController(
166
- this.$.noop,
167
- () => this._labelController.node,
168
- () => this.__warnDeprecated(),
169
- ),
170
- );
171
- }
161
+ }),
162
+ );
163
+ this.addController(new LabelledInputController(this.inputElement, this._labelController));
164
+ this.addController(
165
+ new SlotTargetController(
166
+ this.$.noop,
167
+ () => this._labelController.node,
168
+ () => this.__warnDeprecated(),
169
+ ),
170
+ );
172
171
  }
173
172
 
174
173
  /** @private */
@@ -9,6 +9,7 @@ import { DisabledMixin } from '@vaadin/component-base/src/disabled-mixin.js';
9
9
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
10
10
  import { FocusMixin } from '@vaadin/component-base/src/focus-mixin.js';
11
11
  import { KeyboardMixin } from '@vaadin/component-base/src/keyboard-mixin.js';
12
+ import { generateUniqueId } from '@vaadin/component-base/src/unique-id-utils.js';
12
13
  import { FieldMixin } from '@vaadin/field-base/src/field-mixin.js';
13
14
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
14
15
  import { RadioButton } from './vaadin-radio-button.js';
@@ -172,9 +173,7 @@ class RadioGroup extends FieldMixin(
172
173
  // See https://github.com/vaadin/vaadin-web-components/issues/94
173
174
  this.setAttribute('role', 'radiogroup');
174
175
 
175
- // Ensure every instance has unique id
176
- const uniqueId = (RadioGroup._uniqueRadioGroupId = 1 + RadioGroup._uniqueRadioGroupId || 0);
177
- this._fieldName = `${this.localName}-${uniqueId}`;
176
+ this._fieldName = `${this.localName}-${generateUniqueId()}`;
178
177
 
179
178
  this._observer = new FlattenedNodesObserver(this, ({ addedNodes, removedNodes }) => {
180
179
  // Registers the added radio buttons in the reverse order