@justeattakeaway/pie-radio-group 1.2.4 → 1.2.6

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
@@ -122,6 +122,10 @@ For a list-style layout (each option on its own row with primary and secondary t
122
122
 
123
123
  For full usage details and code examples, see the [`pie-list` documentation](https://webc.pie.design/?path=/docs/components-list--overview).
124
124
 
125
+ #### SSR and group-disabled
126
+
127
+ Group-disabled propagation occurs at runtime via Lit context. If you need disabled styles on page load in an SSR environment, set `disabled` directly on each item rather than relying on the group container.
128
+
125
129
  ## Questions and Support
126
130
 
127
131
  If you work at Just Eat Takeaway.com, please contact us on **#help-designsystem**. Otherwise, please raise an issue on [Github](https://github.com/justeattakeaway/pie/issues).
@@ -84,15 +84,6 @@
84
84
  }
85
85
  ],
86
86
  "members": [
87
- {
88
- "kind": "field",
89
- "name": "_hasLabel",
90
- "type": {
91
- "text": "boolean"
92
- },
93
- "privacy": "private",
94
- "default": "false"
95
- },
96
87
  {
97
88
  "kind": "field",
98
89
  "name": "_fieldSetTabIndex",
@@ -248,26 +239,6 @@
248
239
  ],
249
240
  "description": "Handles the radio change event, updates the selected value, and emits a change event for consumers."
250
241
  },
251
- {
252
- "kind": "method",
253
- "name": "_handleLabelSlotChange",
254
- "privacy": "private",
255
- "return": {
256
- "type": {
257
- "text": "void"
258
- }
259
- },
260
- "parameters": [
261
- {
262
- "name": "e",
263
- "type": {
264
- "text": "Event"
265
- },
266
- "description": "The slotchange event."
267
- }
268
- ],
269
- "description": "Updates the `_hasLabel` state when content is added to the label slot."
270
- },
271
242
  {
272
243
  "kind": "method",
273
244
  "name": "_handleRadioSlotChange",
@@ -285,17 +256,6 @@
285
256
  "privacy": "private",
286
257
  "description": "Prevent radio buttons from receiving focus"
287
258
  },
288
- {
289
- "kind": "method",
290
- "name": "_renderWrappedLabel",
291
- "privacy": "private",
292
- "return": {
293
- "type": {
294
- "text": "TemplateResult"
295
- }
296
- },
297
- "description": "Renders the label element inside a legend, wrapping the slot content."
298
- },
299
259
  {
300
260
  "kind": "method",
301
261
  "name": "_applyNameToChildren",
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ import { GenericConstructor } from '@justeattakeaway/pie-webc-core';
5
5
  import { PieElement } from '@justeattakeaway/pie-webc-core/src/internals/PieElement';
6
6
  import { PropertyValues } from 'lit';
7
7
  import { RTLInterface } from '@justeattakeaway/pie-webc-core';
8
- import { TemplateResult } from 'lit';
8
+ import { TemplateResult } from 'lit-html';
9
9
 
10
10
  export declare type DefaultProps = ComponentDefaultProps<RadioGroupProps, keyof Omit<RadioGroupProps, 'assistiveText' | 'name'>>;
11
11
 
@@ -25,7 +25,6 @@ export declare const ON_RADIO_GROUP_DISABLED = "pie-radio-group-disabled";
25
25
  * @event {CustomEvent} change - when one of the radios state is changed.
26
26
  */
27
27
  export declare class PieRadioGroup extends PieRadioGroup_base implements RadioGroupProps {
28
- private _hasLabel;
29
28
  private _fieldSetTabIndex;
30
29
  private _allRadiosDisabled;
31
30
  name: RadioGroupProps['name'];
@@ -68,12 +67,6 @@ export declare class PieRadioGroup extends PieRadioGroup_base implements RadioGr
68
67
  * @private
69
68
  */
70
69
  private _handleRadioChange;
71
- /**
72
- * Updates the `_hasLabel` state when content is added to the label slot.
73
- * @param {Event} e - The slotchange event.
74
- * @private
75
- */
76
- private _handleLabelSlotChange;
77
70
  /**
78
71
  * Ensures all newly added radio buttons are tabbable and inherit the name property
79
72
  */
@@ -82,12 +75,6 @@ export declare class PieRadioGroup extends PieRadioGroup_base implements RadioGr
82
75
  * Prevent radio buttons from receiving focus
83
76
  */
84
77
  private _resetButtonsTabIndex;
85
- /**
86
- * Renders the label element inside a legend, wrapping the slot content.
87
- * @returns {TemplateResult } The template for the label slot.
88
- * @private
89
- */
90
- private _renderWrappedLabel;
91
78
  private _applyNameToChildren;
92
79
  protected updated(_changedProperties: PropertyValues<this>): void;
93
80
  connectedCallback(): void;
package/dist/index.js CHANGED
@@ -1,22 +1,22 @@
1
- import { LitElement as x, isServer as C, html as p, nothing as g, unsafeCSS as y } from "lit";
2
- import { state as _, property as u } from "lit/decorators.js";
3
- import { FormControlMixin as w, RtlMixin as T, parentDisabledContext as R, wrapNativeEvent as S, validPropertyValues as E, safeCustomElement as I } from "@justeattakeaway/pie-webc-core";
4
- import { ifDefined as L } from "lit/directives/if-defined.js";
5
- import { classMap as O } from "lit/directives/class-map.js";
1
+ import { LitElement as x, isServer as C, nothing as v, html as _, unsafeCSS as y } from "lit";
2
+ import { state as m, property as u } from "lit/decorators.js";
3
+ import { FormControlMixin as w, RtlMixin as T, parentDisabledContext as R, wrapNativeEvent as E, validPropertyValues as I, safeCustomElement as S } from "@justeattakeaway/pie-webc-core";
4
+ import { ifDefined as O } from "lit/directives/if-defined.js";
5
+ import { classMap as A } from "lit/directives/class-map.js";
6
6
  import "@justeattakeaway/pie-assistive-text";
7
- const b = class b extends x {
7
+ const p = class p extends x {
8
8
  willUpdate() {
9
- this.getAttribute("v") || this.setAttribute("v", b.v);
9
+ this.getAttribute("v") || this.setAttribute("v", p.v);
10
10
  }
11
11
  };
12
- b.v = "1.2.4";
13
- let f = b;
12
+ p.v = "1.2.6";
13
+ let b = p;
14
14
  /**
15
15
  * @license
16
16
  * Copyright 2021 Google LLC
17
17
  * SPDX-License-Identifier: BSD-3-Clause
18
18
  */
19
- let A = class extends Event {
19
+ let D = class extends Event {
20
20
  constructor(e, s, i, o) {
21
21
  super("context-request", { bubbles: !0, composed: !0 }), this.context = e, this.contextTarget = s, this.callback = i, this.subscribe = o ?? !1;
22
22
  }
@@ -26,7 +26,7 @@ let A = class extends Event {
26
26
  * Copyright 2021 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
28
  */
29
- class D {
29
+ class L {
30
30
  get value() {
31
31
  return this.o;
32
32
  }
@@ -64,7 +64,7 @@ class N extends Event {
64
64
  super("context-provider", { bubbles: !0, composed: !0 }), this.context = e, this.contextTarget = s;
65
65
  }
66
66
  }
67
- class F extends D {
67
+ class G extends L {
68
68
  constructor(e, s, i) {
69
69
  var o, r;
70
70
  super(s.context !== void 0 ? s.initialValue : i), this.onContextRequest = (a) => {
@@ -74,7 +74,7 @@ class F extends D {
74
74
  }, this.onProviderRequest = (a) => {
75
75
  if (a.context !== this.context || (a.contextTarget ?? a.composedPath()[0]) === this.host) return;
76
76
  const n = /* @__PURE__ */ new Set();
77
- for (const [h, { consumerHost: v }] of this.subscriptions) n.has(h) || (n.add(h), v.dispatchEvent(new A(this.context, v, h, !0)));
77
+ for (const [h, { consumerHost: f }] of this.subscriptions) n.has(h) || (n.add(h), f.dispatchEvent(new D(this.context, f, h, !0)));
78
78
  a.stopPropagation();
79
79
  }, this.host = e, s.context !== void 0 ? this.context = s.context : this.context = s, this.attachListeners(), (r = (o = this.host).addController) == null || r.call(o, this);
80
80
  }
@@ -85,21 +85,21 @@ class F extends D {
85
85
  this.host.dispatchEvent(new N(this.context, this.host));
86
86
  }
87
87
  }
88
- const P = "*,*:after,*:before{box-sizing:inherit}:host{display:block}.c-radioGroup{--radio-group-gap: var(--dt-spacing-c);--radio-group-gap--inline: var(--dt-spacing-c) var(--dt-spacing-e);margin:0;padding:0;border:0;min-width:0;display:flex;flex-flow:column wrap}.c-radioGroup>legend{margin-block-end:var(--dt-spacing-b)}.c-radioGroup.c-radioGroup--inline{flex-flow:row wrap;gap:var(--radio-group-gap--inline)}.c-radioGroup.c-radioGroup--hasAssistiveText{margin-block-end:var(--dt-spacing-a)}.c-radioGroup:not(.c-radioGroup--inline) ::slotted(pie-radio:not(:first-of-type)){margin-block-start:var(--radio-group-gap)}", G = ["default", "success", "error"], $ = "pie-radio-group-disabled", c = {
88
+ const F = "*,*:after,*:before{box-sizing:inherit}:host{display:block}.c-radioGroup{--radio-group-gap: var(--dt-spacing-c);--radio-group-gap--inline: var(--dt-spacing-c) var(--dt-spacing-e);margin:0;padding:0;border:0;min-width:0;display:flex;flex-flow:column wrap}.c-radioGroup>legend{margin:0;padding:0}.c-radioGroup>legend ::slotted(pie-form-label),.c-radioGroup>legend ::slotted(label){display:block;margin-block-end:var(--dt-spacing-b)}.c-radioGroup.c-radioGroup--inline{flex-flow:row wrap;gap:var(--radio-group-gap--inline)}.c-radioGroup.c-radioGroup--inline>legend{flex-basis:100%}.c-radioGroup.c-radioGroup--hasAssistiveText{margin-block-end:var(--dt-spacing-a)}.c-radioGroup:not(.c-radioGroup--inline) ::slotted(pie-radio:not(:first-of-type)){margin-block-start:var(--radio-group-gap)}", P = ["default", "success", "error"], k = "pie-radio-group-disabled", c = {
89
89
  status: "default",
90
90
  disabled: !1,
91
91
  isInline: !1,
92
92
  value: ""
93
93
  };
94
- var k = Object.defineProperty, B = Object.getOwnPropertyDescriptor, d = (t, e, s, i) => {
95
- for (var o = i > 1 ? void 0 : i ? B(e, s) : e, r = t.length - 1, a; r >= 0; r--)
94
+ var B = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, l = (t, e, s, i) => {
95
+ for (var o = i > 1 ? void 0 : i ? $(e, s) : e, r = t.length - 1, a; r >= 0; r--)
96
96
  (a = t[r]) && (o = (i ? a(e, s, o) : a(o)) || o);
97
- return i && o && k(e, s, o), o;
97
+ return i && o && B(e, s, o), o;
98
98
  };
99
- const q = "pie-radio-group", m = "assistive-text";
100
- let l = class extends w(T(f)) {
99
+ const q = "pie-radio-group", g = "assistive-text";
100
+ let d = class extends w(T(b)) {
101
101
  constructor() {
102
- super(...arguments), this._hasLabel = !1, this._fieldSetTabIndex = 0, this._allRadiosDisabled = !1, this.value = c.value, this.isInline = c.isInline, this.disabled = c.disabled, this._disabledProvider = C ? void 0 : new F(this, { context: R, initialValue: c.disabled }), this.status = c.status;
102
+ super(...arguments), this._fieldSetTabIndex = 0, this._allRadiosDisabled = !1, this.value = c.value, this.isInline = c.isInline, this.disabled = c.disabled, this._disabledProvider = C ? void 0 : new G(this, { context: R, initialValue: c.disabled }), this.status = c.status;
103
103
  }
104
104
  /**
105
105
  * The radios in the group. This uses a subtree query rather than immediate slotted
@@ -116,7 +116,7 @@ let l = class extends w(T(f)) {
116
116
  * @private
117
117
  */
118
118
  _handleDisabled() {
119
- this._slottedChildren.forEach((t) => t.dispatchEvent(new CustomEvent($, {
119
+ this._slottedChildren.forEach((t) => t.dispatchEvent(new CustomEvent(k, {
120
120
  bubbles: !1,
121
121
  composed: !1,
122
122
  detail: { disabled: this.disabled }
@@ -149,18 +149,9 @@ let l = class extends w(T(f)) {
149
149
  t.stopPropagation();
150
150
  const e = t.target;
151
151
  this._handleRadioSelection(e.value), this._resetButtonsTabIndex();
152
- const s = S(t);
152
+ const s = E(t);
153
153
  this.dispatchEvent(s);
154
154
  }
155
- /**
156
- * Updates the `_hasLabel` state when content is added to the label slot.
157
- * @param {Event} e - The slotchange event.
158
- * @private
159
- */
160
- _handleLabelSlotChange(t) {
161
- const e = t.target.assignedNodes({ flatten: !0 });
162
- this._hasLabel = e.length > 0;
163
- }
164
155
  /**
165
156
  * Ensures all newly added radio buttons are tabbable and inherit the name property
166
157
  */
@@ -175,14 +166,6 @@ let l = class extends w(T(f)) {
175
166
  t.tabIndex = -1;
176
167
  });
177
168
  }
178
- /**
179
- * Renders the label element inside a legend, wrapping the slot content.
180
- * @returns {TemplateResult } The template for the label slot.
181
- * @private
182
- */
183
- _renderWrappedLabel() {
184
- return this._hasLabel ? p`<legend><slot name='label' @slotchange=${this._handleLabelSlotChange}></slot></legend>` : p`<slot name='label' @slotchange=${this._handleLabelSlotChange}></slot>`;
185
- }
186
169
  _applyNameToChildren() {
187
170
  this._slottedChildren.forEach((t) => {
188
171
  this.name && t.setAttribute("name", this.name);
@@ -313,63 +296,60 @@ let l = class extends w(T(f)) {
313
296
  "c-radioGroup--inline": e,
314
297
  "c-radioGroup--hasAssistiveText": n
315
298
  };
316
- return p`
299
+ return _`
317
300
  <fieldset
318
301
  tabindex=${a ? -1 : r}
319
302
  role="radiogroup"
320
- name=${L(t)}
303
+ name=${O(t)}
321
304
  ?disabled=${s}
322
305
  data-test-id="pie-radio-group-fieldset"
323
- aria-describedby=${n ? m : g}
324
- class="${O(h)}">
325
- ${this._renderWrappedLabel()}
306
+ aria-describedby=${n ? g : v}
307
+ class="${A(h)}">
308
+ <legend><slot name='label'></slot></legend>
326
309
  <slot @slotchange=${this._handleRadioSlotChange}></slot>
327
310
  </fieldset>
328
- ${n ? p`
311
+ ${n ? _`
329
312
  <pie-assistive-text
330
- id=${m}
313
+ id=${g}
331
314
  variant=${i}
332
315
  message=${o}
333
316
  data-test-id="pie-radio-group-assistive-text">
334
- </pie-assistive-text>` : g}
317
+ </pie-assistive-text>` : v}
335
318
  `;
336
319
  }
337
320
  };
338
- l.styles = y(P);
339
- d([
340
- _()
341
- ], l.prototype, "_hasLabel", 2);
342
- d([
343
- _()
344
- ], l.prototype, "_fieldSetTabIndex", 2);
345
- d([
346
- _()
347
- ], l.prototype, "_allRadiosDisabled", 2);
348
- d([
321
+ d.styles = y(F);
322
+ l([
323
+ m()
324
+ ], d.prototype, "_fieldSetTabIndex", 2);
325
+ l([
326
+ m()
327
+ ], d.prototype, "_allRadiosDisabled", 2);
328
+ l([
349
329
  u({ type: String, reflect: !0 })
350
- ], l.prototype, "name", 2);
351
- d([
330
+ ], d.prototype, "name", 2);
331
+ l([
352
332
  u({ type: String })
353
- ], l.prototype, "value", 2);
354
- d([
333
+ ], d.prototype, "value", 2);
334
+ l([
355
335
  u({ type: Boolean })
356
- ], l.prototype, "isInline", 2);
357
- d([
336
+ ], d.prototype, "isInline", 2);
337
+ l([
358
338
  u({ type: Boolean, reflect: !0 })
359
- ], l.prototype, "disabled", 2);
360
- d([
339
+ ], d.prototype, "disabled", 2);
340
+ l([
361
341
  u({ type: String })
362
- ], l.prototype, "assistiveText", 2);
363
- d([
342
+ ], d.prototype, "assistiveText", 2);
343
+ l([
364
344
  u({ type: String }),
365
- E(q, G, c.status)
366
- ], l.prototype, "status", 2);
367
- l = d([
368
- I("pie-radio-group")
369
- ], l);
345
+ I(q, P, c.status)
346
+ ], d.prototype, "status", 2);
347
+ d = l([
348
+ S("pie-radio-group")
349
+ ], d);
370
350
  export {
371
- $ as ON_RADIO_GROUP_DISABLED,
372
- l as PieRadioGroup,
351
+ k as ON_RADIO_GROUP_DISABLED,
352
+ d as PieRadioGroup,
373
353
  c as defaultProps,
374
- G as statusTypes
354
+ P as statusTypes
375
355
  };
package/dist/react.d.ts CHANGED
@@ -6,7 +6,7 @@ import { PieElement } from '@justeattakeaway/pie-webc-core/src/internals/PieElem
6
6
  import { PropertyValues } from 'lit';
7
7
  import * as React_2 from 'react';
8
8
  import { RTLInterface } from '@justeattakeaway/pie-webc-core';
9
- import { TemplateResult } from 'lit';
9
+ import { TemplateResult } from 'lit-html';
10
10
 
11
11
  export declare type DefaultProps = ComponentDefaultProps<RadioGroupProps, keyof Omit<RadioGroupProps, 'assistiveText' | 'name'>>;
12
12
 
@@ -28,7 +28,6 @@ export declare const PieRadioGroup: React_2.ForwardRefExoticComponent<React_2.Pr
28
28
  * @event {CustomEvent} change - when one of the radios state is changed.
29
29
  */
30
30
  declare class PieRadioGroup_2 extends PieRadioGroup_base implements RadioGroupProps {
31
- private _hasLabel;
32
31
  private _fieldSetTabIndex;
33
32
  private _allRadiosDisabled;
34
33
  name: RadioGroupProps['name'];
@@ -71,12 +70,6 @@ declare class PieRadioGroup_2 extends PieRadioGroup_base implements RadioGroupPr
71
70
  * @private
72
71
  */
73
72
  private _handleRadioChange;
74
- /**
75
- * Updates the `_hasLabel` state when content is added to the label slot.
76
- * @param {Event} e - The slotchange event.
77
- * @private
78
- */
79
- private _handleLabelSlotChange;
80
73
  /**
81
74
  * Ensures all newly added radio buttons are tabbable and inherit the name property
82
75
  */
@@ -85,12 +78,6 @@ declare class PieRadioGroup_2 extends PieRadioGroup_base implements RadioGroupPr
85
78
  * Prevent radio buttons from receiving focus
86
79
  */
87
80
  private _resetButtonsTabIndex;
88
- /**
89
- * Renders the label element inside a legend, wrapping the slot content.
90
- * @returns {TemplateResult } The template for the label slot.
91
- * @private
92
- */
93
- private _renderWrappedLabel;
94
81
  private _applyNameToChildren;
95
82
  protected updated(_changedProperties: PropertyValues<this>): void;
96
83
  connectedCallback(): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-radio-group",
3
3
  "description": "PIE Design System Radio Group built using Web Components",
4
- "version": "1.2.4",
4
+ "version": "1.2.6",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/justeattakeaway/pie",
@@ -44,13 +44,13 @@
44
44
  "license": "Apache-2.0",
45
45
  "devDependencies": {
46
46
  "@justeattakeaway/pie-components-config": "0.21.3",
47
- "@justeattakeaway/pie-css": "1.4.0",
48
- "@justeattakeaway/pie-monorepo-utils": "0.9.8",
49
- "@justeattakeaway/pie-radio": "1.2.2"
47
+ "@justeattakeaway/pie-css": "1.5.0",
48
+ "@justeattakeaway/pie-monorepo-utils": "0.9.9",
49
+ "@justeattakeaway/pie-radio": "1.2.3"
50
50
  },
51
51
  "dependencies": {
52
- "@justeattakeaway/pie-assistive-text": "1.0.8",
53
- "@justeattakeaway/pie-webc-core": "17.0.0",
52
+ "@justeattakeaway/pie-assistive-text": "1.0.9",
53
+ "@justeattakeaway/pie-webc-core": "18.0.0",
54
54
  "@lit/context": "1.1.6"
55
55
  },
56
56
  "customElements": "custom-elements.json",
package/src/index.ts CHANGED
@@ -4,7 +4,6 @@ import {
4
4
  unsafeCSS,
5
5
  nothing,
6
6
  type PropertyValues,
7
- type TemplateResult,
8
7
  } from 'lit';
9
8
  import { PieElement } from '@justeattakeaway/pie-webc-core/src/internals/PieElement';
10
9
  import {
@@ -44,9 +43,6 @@ const assistiveTextId = 'assistive-text';
44
43
  */
45
44
  @safeCustomElement('pie-radio-group')
46
45
  export class PieRadioGroup extends FormControlMixin(RtlMixin(PieElement)) implements RadioGroupProps {
47
- @state()
48
- private _hasLabel = false;
49
-
50
46
  @state()
51
47
  private _fieldSetTabIndex = 0;
52
48
 
@@ -148,16 +144,6 @@ export class PieRadioGroup extends FormControlMixin(RtlMixin(PieElement)) implem
148
144
  this.dispatchEvent(changedEvent);
149
145
  }
150
146
 
151
- /**
152
- * Updates the `_hasLabel` state when content is added to the label slot.
153
- * @param {Event} e - The slotchange event.
154
- * @private
155
- */
156
- private _handleLabelSlotChange (e: { target: HTMLSlotElement }): void {
157
- const childNodes = e.target.assignedNodes({ flatten: true });
158
- this._hasLabel = childNodes.length > 0;
159
- }
160
-
161
147
  /**
162
148
  * Ensures all newly added radio buttons are tabbable and inherit the name property
163
149
  */
@@ -175,17 +161,6 @@ export class PieRadioGroup extends FormControlMixin(RtlMixin(PieElement)) implem
175
161
  });
176
162
  }
177
163
 
178
- /**
179
- * Renders the label element inside a legend, wrapping the slot content.
180
- * @returns {TemplateResult } The template for the label slot.
181
- * @private
182
- */
183
- private _renderWrappedLabel (): TemplateResult {
184
- return this._hasLabel
185
- ? html`<legend><slot name='label' @slotchange=${this._handleLabelSlotChange}></slot></legend>`
186
- : html`<slot name='label' @slotchange=${this._handleLabelSlotChange}></slot>`;
187
- }
188
-
189
164
  private _applyNameToChildren () : void {
190
165
  this._slottedChildren.forEach((radio) => {
191
166
  if (this.name) {
@@ -462,7 +437,7 @@ export class PieRadioGroup extends FormControlMixin(RtlMixin(PieElement)) implem
462
437
  data-test-id="pie-radio-group-fieldset"
463
438
  aria-describedby=${hasAssistiveText ? assistiveTextId : nothing}
464
439
  class="${classMap(classes)}">
465
- ${this._renderWrappedLabel()}
440
+ <legend><slot name='label'></slot></legend>
466
441
  <slot @slotchange=${this._handleRadioSlotChange}></slot>
467
442
  </fieldset>
468
443
  ${hasAssistiveText ? html`
@@ -16,7 +16,14 @@
16
16
  flex-flow: column wrap;
17
17
 
18
18
  > legend {
19
- margin-block-end: var(--dt-spacing-b);
19
+ margin: 0;
20
+ padding: 0;
21
+
22
+ ::slotted(pie-form-label),
23
+ ::slotted(label) {
24
+ display: block;
25
+ margin-block-end: var(--dt-spacing-b);
26
+ }
20
27
  }
21
28
 
22
29
  &.c-radioGroup--inline {
@@ -24,6 +31,10 @@
24
31
 
25
32
  // inline only supported for pie-radio in slots (rather than list-item) so gap can be used here
26
33
  gap: var(--radio-group-gap--inline);
34
+
35
+ > legend {
36
+ flex-basis: 100%;
37
+ }
27
38
  }
28
39
 
29
40
  &.c-radioGroup--hasAssistiveText {