@proximus/lavender-radio-group 2.0.0-alpha.21 → 2.0.0-alpha.210

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/dist/Radio.d.ts CHANGED
@@ -2,7 +2,27 @@ import { RadioBase } from './RadioBase.ts';
2
2
  export interface IRadio extends HTMLElement {
3
3
  state: string;
4
4
  checked: boolean;
5
+ name: string | null;
5
6
  }
7
+ /**
8
+ * @summary A radio button component for selecting a single option within a group.
9
+ *
10
+ * @attr {'' | 'error'} state - The validation state of the radio button.
11
+ * @attr {'' | 'default' | 'selectable-tag'} variant - The visual variant of the radio button.
12
+ * @attr {boolean} checked - Whether the radio button is checked.
13
+ * @attr {boolean} disabled - Whether the radio button is disabled.
14
+ * @attr {boolean} inverted - Whether to use inverted (dark background) styling.
15
+ * @attr {boolean} hover - Whether to apply hover styling.
16
+ * @attr {string} name - The name of the radio button, used for form submission.
17
+ * @attr {string} value - The value of the radio button, used for form submission.
18
+ *
19
+ * @slot label - The label text for the radio button.
20
+ * @slot before - An icon to be placed before the label (expects a `px-icon` element).
21
+ *
22
+ * @fires {Event} change - Fired when the radio button becomes checked.
23
+ *
24
+ * @tag px-radio
25
+ */
6
26
  export declare class Radio extends RadioBase implements IRadio {
7
27
  protected internals: ElementInternals;
8
28
  constructor();
@@ -11,7 +31,7 @@ export declare class Radio extends RadioBase implements IRadio {
11
31
  attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
12
32
  static get formAssociated(): boolean;
13
33
  formResetCallback(): void;
14
- formStateRestoreCallback(state: any): void;
34
+ formStateRestoreCallback(state: boolean): void;
15
35
  updateAttribute(oldValue: string, newValue: string, attrValue: string[], attrName: string): void;
16
36
  handleCheckedChange(checked: boolean): void;
17
37
  formData(): FormData;
@@ -20,12 +40,14 @@ export declare class Radio extends RadioBase implements IRadio {
20
40
  set state(value: string);
21
41
  get disabled(): boolean;
22
42
  set disabled(value: boolean);
23
- get $label(): HTMLLabelElement;
24
- get inverted(): string;
25
- set inverted(value: string);
43
+ get $label(): HTMLLabelElement | null;
44
+ get inverted(): boolean;
45
+ set inverted(value: boolean);
26
46
  get checked(): boolean;
27
47
  set checked(value: boolean);
28
48
  get $radio(): HTMLDivElement;
29
49
  get $labelSlot(): HTMLElement;
30
50
  get $iconSlot(): HTMLSlotElement;
51
+ get size(): string | null;
52
+ set size(value: string | null);
31
53
  }
@@ -2,15 +2,19 @@ import { PxElement } from '@proximus/lavender-common';
2
2
  export declare const radioVariantValues: string[];
3
3
  export declare const stateValues: string[];
4
4
  export declare class RadioBase extends PxElement<HTMLInputElement> {
5
+ protected static readonly template: HTMLTemplateElement;
5
6
  static nativeName: string;
6
7
  static accessorExclusions: string[];
7
- private template;
8
8
  constructor();
9
9
  static get observedAttributes(): string[];
10
10
  attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
11
11
  get $radio(): HTMLDivElement;
12
12
  get $labelSlot(): HTMLElement;
13
13
  get $iconSlot(): HTMLSlotElement;
14
- get inverted(): string;
15
- set inverted(value: string);
14
+ get inverted(): boolean;
15
+ set inverted(value: boolean);
16
+ get size(): string | null;
17
+ set size(value: string | null);
18
+ get name(): string | null;
19
+ set name(value: string | null);
16
20
  }
@@ -3,13 +3,15 @@ import { type IRadio } from '@proximus/lavender-radio-group';
3
3
  import { Fieldset } from '@proximus/lavender-fieldset';
4
4
  export declare const radioGroupGapValues: string[];
5
5
  export declare class Radiogroup extends WithExtraAttributes {
6
- private template;
6
+ #private;
7
+ protected static readonly template: HTMLTemplateElement;
7
8
  private currentCheckedRadio;
8
9
  constructor();
9
10
  static get observedAttributes(): string[];
10
11
  connectedCallback(): void;
11
12
  disconnectedCallback(): void;
12
13
  attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
14
+ setupSelectableBoxRadios: () => void;
13
15
  handleKeyDown: () => void;
14
16
  handleKeyUp: () => void;
15
17
  private handleRadioChange;
@@ -22,17 +24,19 @@ export declare class Radiogroup extends WithExtraAttributes {
22
24
  get $slotLegend(): HTMLSlotElement;
23
25
  get $slotError(): HTMLSlotElement;
24
26
  get $radioList(): NodeListOf<IRadio>;
25
- get gap(): string;
26
- set gap(value: string);
27
- get variant(): string;
28
- set variant(value: string);
29
- get state(): string;
30
- set state(value: string);
31
- get $label(): HTMLLabelElement;
32
- get inverted(): string;
33
- set inverted(value: string);
27
+ get gap(): string | null;
28
+ set gap(value: string | null);
29
+ get variant(): string | null;
30
+ set variant(value: string | null);
31
+ get state(): string | null;
32
+ set state(value: string | null);
33
+ get $label(): HTMLLabelElement | null;
34
+ get inverted(): boolean;
35
+ set inverted(value: boolean);
34
36
  get disabled(): boolean;
35
37
  set disabled(value: boolean);
36
38
  get required(): boolean;
37
39
  set required(value: boolean);
40
+ get size(): string | null;
41
+ set size(value: string | null);
38
42
  }