@fluid-topics/ft-chip-choice 1.2.50 → 1.2.52
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 @@ import { optionStyles } from "./ft-chip-choice-option.styles";
|
|
|
11
11
|
import { FtChip } from "@fluid-topics/ft-chip";
|
|
12
12
|
export class FtChipChoiceOptionChangeEvent extends CustomEvent {
|
|
13
13
|
constructor(value, selected) {
|
|
14
|
-
super("change", { detail: { value: value, selected: selected }, bubbles: true, composed: true });
|
|
14
|
+
super("ft-chip-choice-option-change", { detail: { value: value, selected: selected }, bubbles: true, composed: true });
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
class FtChipChoiceOption extends FtLitElement {
|
|
@@ -28,7 +28,6 @@ class FtChipChoiceOption extends FtLitElement {
|
|
|
28
28
|
render() {
|
|
29
29
|
return html `
|
|
30
30
|
<ft-chip clickable
|
|
31
|
-
role="radio"
|
|
32
31
|
part="chip"
|
|
33
32
|
icon=${this.selected ? "CHECK" : ""}
|
|
34
33
|
label=${this.label}
|
|
@@ -36,8 +35,7 @@ class FtChipChoiceOption extends FtLitElement {
|
|
|
36
35
|
?highlighted=${this.selected}
|
|
37
36
|
?multiLine=${this.multiLine}
|
|
38
37
|
@click=${this.onChange}
|
|
39
|
-
@keydown=${this.onKeyDown}
|
|
40
|
-
>
|
|
38
|
+
@keydown=${this.onKeyDown}>
|
|
41
39
|
<slot></slot>
|
|
42
40
|
</ft-chip>
|
|
43
41
|
`;
|
package/build/ft-chip-choice.js
CHANGED
|
@@ -10,7 +10,7 @@ import { FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
|
10
10
|
import { styles } from "./ft-chip-choice.styles";
|
|
11
11
|
export class FtChipChoiceChangeEvent extends CustomEvent {
|
|
12
12
|
constructor(value) {
|
|
13
|
-
super("change", { detail: { value }
|
|
13
|
+
super("change", { detail: { value } });
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
class FtChipChoice extends FtLitElement {
|
|
@@ -25,7 +25,7 @@ class FtChipChoice extends FtLitElement {
|
|
|
25
25
|
render() {
|
|
26
26
|
return html `
|
|
27
27
|
<slot @slotchange=${this.onSlotChange}
|
|
28
|
-
@change=${this.onChange}>
|
|
28
|
+
@ft-chip-choice-option-change=${this.onChange}>
|
|
29
29
|
</slot>
|
|
30
30
|
`;
|
|
31
31
|
}
|
|
@@ -64,7 +64,7 @@ class FtChipChoice extends FtLitElement {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
this.requestUpdate();
|
|
67
|
-
this.dispatchEvent(new FtChipChoiceChangeEvent(this.selectedOptions));
|
|
67
|
+
this.dispatchEvent(new FtChipChoiceChangeEvent(new Set(this.selectedOptions)));
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
FtChipChoice.styles = styles;
|