@fluid-topics/ft-radio 2.2.20 → 2.2.24
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.
|
@@ -11,7 +11,7 @@ export declare class FtRadioGroup extends FtLitElement implements FtRadioGroupPr
|
|
|
11
11
|
assignedElements?: Array<Element>;
|
|
12
12
|
get radioButtons(): Array<FtRadio>;
|
|
13
13
|
currentSelectedIndex: number;
|
|
14
|
-
protected render(): import("lit
|
|
14
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
15
15
|
connectedCallback(): void;
|
|
16
16
|
disconnectedCallback(): void;
|
|
17
17
|
private onSlotChange;
|
package/build/ft-radio.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare class FtRadio extends FtLitElement implements FtRadioProperties {
|
|
|
20
20
|
private ripple?;
|
|
21
21
|
private input?;
|
|
22
22
|
get radioClasses(): ClassInfo;
|
|
23
|
-
protected render(): import("lit
|
|
23
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
24
24
|
protected willUpdate(changedProperties: PropertyValues): void;
|
|
25
25
|
private onChange;
|
|
26
26
|
protected contentAvailableCallback(props: PropertyValues): void;
|
package/build/ft-radio.light.js
CHANGED
|
@@ -367,14 +367,14 @@
|
|
|
367
367
|
`}connectedCallback(){super.connectedCallback(),this.addEventListener("focus",this.onFocus)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focus",this.onFocus)}onSlotChange(){this.radioButtons.forEach(t=>t.name=this.name)}contentAvailableCallback(t){super.contentAvailableCallback(t),this.radioButtons.forEach(e=>e.setInputTabIndex(-1)),this.resolveCurrentSelectedIndex()}onChange(t){t.stopPropagation(),this.radioButtons.forEach(e=>e.checked=t.detail.value===e.value),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.resolveCurrentSelectedIndex()}onKeyDown(t){let e=!1;switch(t.key){case"ArrowUp":case"ArrowLeft":{e=!0;let o=this.currentSelectedIndex-1;this.radioButtons[o<0?this.radioButtons.length-1:o].select(),this.radioButtons[o<0?this.radioButtons.length-1:o].focus();break}case"ArrowDown":case"ArrowRight":{e=!0;let o=this.currentSelectedIndex+1;this.radioButtons[o>this.radioButtons.length-1?0:o].select(),this.radioButtons[o>this.radioButtons.length-1?0:o].focus();break}case"Enter":this.radioButtons[this.currentSelectedIndex].select()}e&&(t.stopPropagation(),t.preventDefault())}resolveCurrentSelectedIndex(){let t=this.radioButtons.findIndex(e=>e.checked);t==-1?(this.currentSelectedIndex=0,this.radioButtons[0].select()):this.currentSelectedIndex=t,this.radioButtons[this.currentSelectedIndex].setInputTabIndex(0)}focusCurrentChecked(){this.radioButtons[this.currentSelectedIndex].focus()}};A.elementDefinitions={};A.styles=Ce;rt([(0,B.property)()],A.prototype,"name",void 0);rt([(0,B.property)({reflect:!0,attribute:"role"})],A.prototype,"role",void 0);rt([(0,B.property)({reflect:!0,attribute:"aria-labelledby"})],A.prototype,"ariaLabelledBy",void 0);rt([(0,B.queryAssignedElements)()],A.prototype,"assignedElements",void 0);rt([(0,B.state)()],A.prototype,"currentSelectedIndex",void 0);var we={"ft-radio":$,"ft-radio-group":A};(0,He.customElements)(we);})();
|
|
368
368
|
/*! Bundled license information:
|
|
369
369
|
|
|
370
|
-
lit-html/lit-html.js:
|
|
370
|
+
.store/lit-html-npm-3.3.3-0f054b825a/package/lit-html.js:
|
|
371
371
|
(**
|
|
372
372
|
* @license
|
|
373
373
|
* Copyright 2017 Google LLC
|
|
374
374
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
375
375
|
*)
|
|
376
376
|
|
|
377
|
-
lit-html/static.js:
|
|
377
|
+
.store/lit-html-npm-3.3.3-0f054b825a/package/static.js:
|
|
378
378
|
(**
|
|
379
379
|
* @license
|
|
380
380
|
* Copyright 2020 Google LLC
|