@synergy-design-system/components 1.0.0-main.13 → 1.0.0-main.15
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/chunks/{chunk.J44T4LO6.js → chunk.23HTU3YE.js} +4 -4
- package/dist/chunks/{chunk.MFFJYORB.js → chunk.4CBN5LPQ.js} +4 -4
- package/dist/chunks/chunk.4I6M5V6O.js +56 -0
- package/dist/chunks/chunk.4I6M5V6O.js.map +7 -0
- package/dist/chunks/chunk.4KYZNJSV.js +111 -0
- package/dist/chunks/chunk.4KYZNJSV.js.map +7 -0
- package/dist/chunks/chunk.4ZURABYO.js +24 -0
- package/dist/chunks/chunk.4ZURABYO.js.map +7 -0
- package/dist/chunks/chunk.55M6MOGL.js +12 -0
- package/dist/chunks/chunk.55M6MOGL.js.map +7 -0
- package/dist/chunks/chunk.BELUQJC5.js +351 -0
- package/dist/chunks/chunk.BELUQJC5.js.map +7 -0
- package/dist/chunks/{chunk.SQTGI355.js → chunk.CFW7XRYS.js} +8 -8
- package/dist/chunks/{chunk.KALIQJUH.js → chunk.DWYH7NHV.js} +5 -5
- package/dist/chunks/chunk.F4MRQLNL.js +25 -0
- package/dist/chunks/chunk.F4MRQLNL.js.map +7 -0
- package/dist/chunks/chunk.GXMS33ZL.js +12 -0
- package/dist/chunks/chunk.GXMS33ZL.js.map +7 -0
- package/dist/chunks/chunk.JBYBQ5TQ.js +132 -0
- package/dist/chunks/chunk.JBYBQ5TQ.js.map +7 -0
- package/dist/chunks/{chunk.VNC7HKGP.js → chunk.JHXCBOUD.js} +2 -2
- package/dist/chunks/{chunk.VNC7HKGP.js.map → chunk.JHXCBOUD.js.map} +1 -1
- package/dist/chunks/chunk.JNBQQ4ZA.js +12 -0
- package/dist/chunks/chunk.JNBQQ4ZA.js.map +7 -0
- package/dist/chunks/{chunk.FLF2E2W4.js → chunk.LT2I67ME.js} +7 -7
- package/dist/chunks/{chunk.TKXG7VM3.js → chunk.MV6FVPFD.js} +2 -2
- package/dist/chunks/{chunk.FKB4BI2F.js → chunk.NJIWLPFD.js} +2 -2
- package/dist/chunks/{chunk.7QGGFKPO.js → chunk.NUGPKV6U.js} +8 -8
- package/dist/chunks/{chunk.NXKZDAMQ.js → chunk.OMLJCWB2.js} +2 -2
- package/dist/chunks/chunk.OVVMSN4D.js +37 -0
- package/dist/chunks/chunk.OVVMSN4D.js.map +7 -0
- package/dist/chunks/{chunk.WANL6A7U.js → chunk.OXUFFH57.js} +4 -4
- package/dist/chunks/{chunk.WDCAHRYG.js → chunk.P2LNG2PZ.js} +4 -2
- package/dist/chunks/chunk.QEN5G7O3.js +127 -0
- package/dist/chunks/chunk.QEN5G7O3.js.map +7 -0
- package/dist/chunks/{chunk.UFEBKPYW.js → chunk.QPQDXEPQ.js} +2 -2
- package/dist/chunks/{chunk.UFEBKPYW.js.map → chunk.QPQDXEPQ.js.map} +1 -1
- package/dist/chunks/chunk.R37X75B5.js +86 -0
- package/dist/chunks/chunk.R37X75B5.js.map +7 -0
- package/dist/chunks/chunk.RGQOCGZ7.js +12 -0
- package/dist/chunks/chunk.RGQOCGZ7.js.map +7 -0
- package/dist/chunks/chunk.V6VND4OF.js +49 -0
- package/dist/chunks/chunk.V6VND4OF.js.map +7 -0
- package/dist/chunks/{chunk.LJVC6UEV.js → chunk.WX3MALG4.js} +7 -7
- package/dist/chunks/{chunk.MMNWMRST.js → chunk.XJYSBAVL.js} +2 -2
- package/dist/chunks/{chunk.HOGDOKQS.js → chunk.YIR7LRP3.js} +5 -5
- package/dist/chunks/{chunk.WTCUSH7V.js → chunk.Z3RZUTQU.js} +2 -2
- package/dist/chunks/{chunk.T5JJNDG6.js → chunk.ZDDJUX4C.js} +2 -2
- package/dist/components/button/button.component.js +9 -9
- package/dist/components/button/button.js +10 -10
- package/dist/components/button-group/button-group.component.d.ts +28 -0
- package/dist/components/button-group/button-group.component.js +11 -0
- package/dist/components/button-group/button-group.component.js.map +7 -0
- package/dist/components/button-group/button-group.d.ts +8 -0
- package/dist/components/button-group/button-group.js +12 -0
- package/dist/components/button-group/button-group.js.map +7 -0
- package/dist/components/button-group/button-group.styles.d.ts +2 -0
- package/dist/components/button-group/button-group.styles.js +9 -0
- package/dist/components/button-group/button-group.styles.js.map +7 -0
- package/dist/components/checkbox/checkbox.component.js +7 -7
- package/dist/components/checkbox/checkbox.js +8 -8
- package/dist/components/checkbox/checkbox.styles.js +2 -2
- package/dist/components/icon/icon.component.js +3 -3
- package/dist/components/icon/icon.js +4 -4
- package/dist/components/input/input.component.js +8 -8
- package/dist/components/input/input.js +9 -9
- package/dist/components/input/input.styles.js +2 -2
- package/dist/components/radio/radio.component.d.ts +53 -0
- package/dist/components/radio/radio.component.js +19 -0
- package/dist/components/radio/radio.component.js.map +7 -0
- package/dist/components/radio/radio.custom.styles.d.ts +2 -0
- package/dist/components/radio/radio.custom.styles.js +8 -0
- package/dist/components/radio/radio.custom.styles.js.map +7 -0
- package/dist/components/radio/radio.d.ts +8 -0
- package/dist/components/radio/radio.js +20 -0
- package/dist/components/radio/radio.js.map +7 -0
- package/dist/components/radio/radio.styles.d.ts +2 -0
- package/dist/components/radio/radio.styles.js +10 -0
- package/dist/components/radio/radio.styles.js.map +7 -0
- package/dist/components/radio-button/radio-button.component.d.ts +53 -0
- package/dist/components/radio-button/radio-button.component.js +15 -0
- package/dist/components/radio-button/radio-button.component.js.map +7 -0
- package/dist/components/radio-button/radio-button.d.ts +8 -0
- package/dist/components/radio-button/radio-button.js +16 -0
- package/dist/components/radio-button/radio-button.js.map +7 -0
- package/dist/components/radio-button/radio-button.styles.d.ts +2 -0
- package/dist/components/radio-button/radio-button.styles.js +11 -0
- package/dist/components/radio-button/radio-button.styles.js.map +7 -0
- package/dist/components/radio-group/radio-group.component.d.ts +89 -0
- package/dist/components/radio-group/radio-group.component.js +18 -0
- package/dist/components/radio-group/radio-group.component.js.map +7 -0
- package/dist/components/radio-group/radio-group.custom.styles.d.ts +2 -0
- package/dist/components/radio-group/radio-group.custom.styles.js +8 -0
- package/dist/components/radio-group/radio-group.custom.styles.js.map +7 -0
- package/dist/components/radio-group/radio-group.d.ts +8 -0
- package/dist/components/radio-group/radio-group.js +19 -0
- package/dist/components/radio-group/radio-group.js.map +7 -0
- package/dist/components/radio-group/radio-group.styles.d.ts +2 -0
- package/dist/components/radio-group/radio-group.styles.js +11 -0
- package/dist/components/radio-group/radio-group.styles.js.map +7 -0
- package/dist/components/spinner/spinner.component.js +3 -3
- package/dist/components/textarea/textarea.component.js +6 -6
- package/dist/components/textarea/textarea.js +7 -7
- package/dist/components/textarea/textarea.styles.js +2 -2
- package/dist/custom-elements.json +1138 -148
- package/dist/synergy.d.ts +4 -0
- package/dist/synergy.js +53 -27
- package/dist/utilities/form.js +2 -2
- package/dist/vscode.html-custom-data.json +149 -19
- package/dist/web-types.json +343 -52
- package/package.json +18 -6
- /package/dist/chunks/{chunk.J44T4LO6.js.map → chunk.23HTU3YE.js.map} +0 -0
- /package/dist/chunks/{chunk.MFFJYORB.js.map → chunk.4CBN5LPQ.js.map} +0 -0
- /package/dist/chunks/{chunk.SQTGI355.js.map → chunk.CFW7XRYS.js.map} +0 -0
- /package/dist/chunks/{chunk.KALIQJUH.js.map → chunk.DWYH7NHV.js.map} +0 -0
- /package/dist/chunks/{chunk.FLF2E2W4.js.map → chunk.LT2I67ME.js.map} +0 -0
- /package/dist/chunks/{chunk.TKXG7VM3.js.map → chunk.MV6FVPFD.js.map} +0 -0
- /package/dist/chunks/{chunk.FKB4BI2F.js.map → chunk.NJIWLPFD.js.map} +0 -0
- /package/dist/chunks/{chunk.7QGGFKPO.js.map → chunk.NUGPKV6U.js.map} +0 -0
- /package/dist/chunks/{chunk.NXKZDAMQ.js.map → chunk.OMLJCWB2.js.map} +0 -0
- /package/dist/chunks/{chunk.WANL6A7U.js.map → chunk.OXUFFH57.js.map} +0 -0
- /package/dist/chunks/{chunk.WDCAHRYG.js.map → chunk.P2LNG2PZ.js.map} +0 -0
- /package/dist/chunks/{chunk.LJVC6UEV.js.map → chunk.WX3MALG4.js.map} +0 -0
- /package/dist/chunks/{chunk.MMNWMRST.js.map → chunk.XJYSBAVL.js.map} +0 -0
- /package/dist/chunks/{chunk.HOGDOKQS.js.map → chunk.YIR7LRP3.js.map} +0 -0
- /package/dist/chunks/{chunk.WTCUSH7V.js.map → chunk.Z3RZUTQU.js.map} +0 -0
- /package/dist/chunks/{chunk.T5JJNDG6.js.map → chunk.ZDDJUX4C.js.map} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
form_control_styles_default
|
|
3
|
-
} from "./chunk.VNC7HKGP.js";
|
|
4
1
|
import {
|
|
5
2
|
textarea_custom_styles_default
|
|
6
3
|
} from "./chunk.YBIBWRKC.js";
|
|
4
|
+
import {
|
|
5
|
+
form_control_styles_default
|
|
6
|
+
} from "./chunk.JHXCBOUD.js";
|
|
7
7
|
import {
|
|
8
8
|
component_styles_default
|
|
9
9
|
} from "./chunk.O7USYXBT.js";
|
|
@@ -186,4 +186,4 @@ var textarea_styles_default = css`
|
|
|
186
186
|
export {
|
|
187
187
|
textarea_styles_default
|
|
188
188
|
};
|
|
189
|
-
//# sourceMappingURL=chunk.
|
|
189
|
+
//# sourceMappingURL=chunk.23HTU3YE.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
component_styles_default
|
|
3
|
-
} from "./chunk.O7USYXBT.js";
|
|
4
1
|
import {
|
|
5
2
|
checkbox_custom_styles_default
|
|
6
3
|
} from "./chunk.2XZKXVMR.js";
|
|
4
|
+
import {
|
|
5
|
+
component_styles_default
|
|
6
|
+
} from "./chunk.O7USYXBT.js";
|
|
7
7
|
|
|
8
8
|
// src/components/checkbox/checkbox.styles.ts
|
|
9
9
|
import { css } from "lit";
|
|
@@ -134,4 +134,4 @@ var checkbox_styles_default = css`
|
|
|
134
134
|
export {
|
|
135
135
|
checkbox_styles_default
|
|
136
136
|
};
|
|
137
|
-
//# sourceMappingURL=chunk.
|
|
137
|
+
//# sourceMappingURL=chunk.4CBN5LPQ.js.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {
|
|
2
|
+
radio_group_custom_styles_default
|
|
3
|
+
} from "./chunk.F4MRQLNL.js";
|
|
4
|
+
import {
|
|
5
|
+
form_control_styles_default
|
|
6
|
+
} from "./chunk.JHXCBOUD.js";
|
|
7
|
+
import {
|
|
8
|
+
component_styles_default
|
|
9
|
+
} from "./chunk.O7USYXBT.js";
|
|
10
|
+
|
|
11
|
+
// src/components/radio-group/radio-group.styles.ts
|
|
12
|
+
import { css } from "lit";
|
|
13
|
+
var radio_group_styles_default = css`
|
|
14
|
+
/* stylelint-disable */
|
|
15
|
+
${component_styles_default}
|
|
16
|
+
${form_control_styles_default}
|
|
17
|
+
|
|
18
|
+
:host {
|
|
19
|
+
display: block;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.form-control {
|
|
23
|
+
position: relative;
|
|
24
|
+
border: none;
|
|
25
|
+
padding: 0;
|
|
26
|
+
margin: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.form-control__label {
|
|
30
|
+
padding: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.radio-group--required .radio-group__label::after {
|
|
34
|
+
content: var(--syn-input-required-content);
|
|
35
|
+
margin-inline-start: var(--syn-input-required-content-offset);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.visually-hidden {
|
|
39
|
+
position: absolute;
|
|
40
|
+
width: 1px;
|
|
41
|
+
height: 1px;
|
|
42
|
+
padding: 0;
|
|
43
|
+
margin: -1px;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
clip: rect(0, 0, 0, 0);
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
border: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
${radio_group_custom_styles_default}
|
|
51
|
+
`;
|
|
52
|
+
|
|
53
|
+
export {
|
|
54
|
+
radio_group_styles_default
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=chunk.4I6M5V6O.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/radio-group/radio-group.styles.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { css } from 'lit';\nimport customStyles from './radio-group.custom.styles.js';\nimport componentStyles from '../../styles/component.styles.js';\nimport formControlStyles from '../../styles/form-control.styles.js';\n\nexport default css`\n\t/* stylelint-disable */\n ${componentStyles}\n ${formControlStyles}\n\n :host {\n display: block;\n }\n\n .form-control {\n position: relative;\n border: none;\n padding: 0;\n margin: 0;\n }\n\n .form-control__label {\n padding: 0;\n }\n\n .radio-group--required .radio-group__label::after {\n content: var(--syn-input-required-content);\n margin-inline-start: var(--syn-input-required-content-offset);\n }\n\n .visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n\n ${customStyles}\n`;\n\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAMA,SAAS,WAAW;AAKpB,IAAO,6BAAQ;AAAA;AAAA,IAEX,wBAAe;AAAA,IACf,2BAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAkCjB,iCAAY;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import {
|
|
2
|
+
radio_styles_default
|
|
3
|
+
} from "./chunk.JBYBQ5TQ.js";
|
|
4
|
+
import {
|
|
5
|
+
SynIcon
|
|
6
|
+
} from "./chunk.WX3MALG4.js";
|
|
7
|
+
import {
|
|
8
|
+
watch
|
|
9
|
+
} from "./chunk.VZ7S7YYN.js";
|
|
10
|
+
import {
|
|
11
|
+
SynergyElement
|
|
12
|
+
} from "./chunk.QPQDXEPQ.js";
|
|
13
|
+
import {
|
|
14
|
+
__decorateClass
|
|
15
|
+
} from "./chunk.DJOAQ4JU.js";
|
|
16
|
+
|
|
17
|
+
// src/components/radio/radio.component.ts
|
|
18
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
19
|
+
import { html } from "lit";
|
|
20
|
+
import { property, state } from "lit/decorators.js";
|
|
21
|
+
var SynRadio = class extends SynergyElement {
|
|
22
|
+
constructor() {
|
|
23
|
+
super();
|
|
24
|
+
this.checked = false;
|
|
25
|
+
this.hasFocus = false;
|
|
26
|
+
this.size = "medium";
|
|
27
|
+
this.disabled = false;
|
|
28
|
+
this.handleBlur = () => {
|
|
29
|
+
this.hasFocus = false;
|
|
30
|
+
this.emit("syn-blur");
|
|
31
|
+
};
|
|
32
|
+
this.handleClick = () => {
|
|
33
|
+
if (!this.disabled) {
|
|
34
|
+
this.checked = true;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
this.handleFocus = () => {
|
|
38
|
+
this.hasFocus = true;
|
|
39
|
+
this.emit("syn-focus");
|
|
40
|
+
};
|
|
41
|
+
this.addEventListener("blur", this.handleBlur);
|
|
42
|
+
this.addEventListener("click", this.handleClick);
|
|
43
|
+
this.addEventListener("focus", this.handleFocus);
|
|
44
|
+
}
|
|
45
|
+
connectedCallback() {
|
|
46
|
+
super.connectedCallback();
|
|
47
|
+
this.setInitialAttributes();
|
|
48
|
+
}
|
|
49
|
+
setInitialAttributes() {
|
|
50
|
+
this.setAttribute("role", "radio");
|
|
51
|
+
this.setAttribute("tabindex", "-1");
|
|
52
|
+
this.setAttribute("aria-disabled", this.disabled ? "true" : "false");
|
|
53
|
+
}
|
|
54
|
+
handleCheckedChange() {
|
|
55
|
+
this.setAttribute("aria-checked", this.checked ? "true" : "false");
|
|
56
|
+
this.setAttribute("tabindex", this.checked ? "0" : "-1");
|
|
57
|
+
}
|
|
58
|
+
handleDisabledChange() {
|
|
59
|
+
this.setAttribute("aria-disabled", this.disabled ? "true" : "false");
|
|
60
|
+
}
|
|
61
|
+
render() {
|
|
62
|
+
return html`
|
|
63
|
+
<span
|
|
64
|
+
part="base"
|
|
65
|
+
class=${classMap({
|
|
66
|
+
radio: true,
|
|
67
|
+
"radio--checked": this.checked,
|
|
68
|
+
"radio--disabled": this.disabled,
|
|
69
|
+
"radio--focused": this.hasFocus,
|
|
70
|
+
"radio--small": this.size === "small",
|
|
71
|
+
"radio--medium": this.size === "medium",
|
|
72
|
+
"radio--large": this.size === "large"
|
|
73
|
+
})}
|
|
74
|
+
>
|
|
75
|
+
<span part="${`control${this.checked ? " control--checked" : ""}`}" class="radio__control">
|
|
76
|
+
${this.checked ? html` <syn-icon part="checked-icon" class="radio__checked-icon" library="system" name="radio"></syn-icon> ` : ""}
|
|
77
|
+
</span>
|
|
78
|
+
|
|
79
|
+
<slot part="label" class="radio__label"></slot>
|
|
80
|
+
</span>
|
|
81
|
+
`;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
SynRadio.styles = radio_styles_default;
|
|
85
|
+
SynRadio.dependencies = { "syn-icon": SynIcon };
|
|
86
|
+
__decorateClass([
|
|
87
|
+
state()
|
|
88
|
+
], SynRadio.prototype, "checked", 2);
|
|
89
|
+
__decorateClass([
|
|
90
|
+
state()
|
|
91
|
+
], SynRadio.prototype, "hasFocus", 2);
|
|
92
|
+
__decorateClass([
|
|
93
|
+
property()
|
|
94
|
+
], SynRadio.prototype, "value", 2);
|
|
95
|
+
__decorateClass([
|
|
96
|
+
property({ reflect: true })
|
|
97
|
+
], SynRadio.prototype, "size", 2);
|
|
98
|
+
__decorateClass([
|
|
99
|
+
property({ type: Boolean, reflect: true })
|
|
100
|
+
], SynRadio.prototype, "disabled", 2);
|
|
101
|
+
__decorateClass([
|
|
102
|
+
watch("checked")
|
|
103
|
+
], SynRadio.prototype, "handleCheckedChange", 1);
|
|
104
|
+
__decorateClass([
|
|
105
|
+
watch("disabled", { waitUntilFirstUpdate: true })
|
|
106
|
+
], SynRadio.prototype, "handleDisabledChange", 1);
|
|
107
|
+
|
|
108
|
+
export {
|
|
109
|
+
SynRadio
|
|
110
|
+
};
|
|
111
|
+
//# sourceMappingURL=chunk.4KYZNJSV.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/radio/radio.component.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { classMap } from 'lit/directives/class-map.js';\nimport { html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { watch } from '../../internal/watch.js';\nimport SynergyElement from '../../internal/synergy-element.js';\nimport SynIcon from '../icon/icon.component.js';\nimport styles from './radio.styles.js';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * @summary Radios allow the user to select a single option from a group.\n * @documentation https://synergy.style/components/radio\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon\n *\n * @slot - The radio's label.\n *\n * @event syn-blur - Emitted when the control loses focus.\n * @event syn-focus - Emitted when the control gains focus.\n *\n * @csspart base - The component's base wrapper.\n * @csspart control - The circular container that wraps the radio's checked state.\n * @csspart control--checked - The radio control when the radio is checked.\n * @csspart checked-icon - The checked icon, an `<syn-icon>` element.\n * @csspart label - The container that wraps the radio's label.\n */\nexport default class SynRadio extends SynergyElement {\n static styles: CSSResultGroup = styles;\n static dependencies = { 'syn-icon': SynIcon };\n\n @state() checked = false;\n @state() protected hasFocus = false;\n\n /** The radio's value. When selected, the radio group will receive this value. */\n @property() value: string;\n\n /**\n * The radio's size. When used inside a radio group, the size will be determined by the radio group's size so this\n * attribute can typically be omitted.\n */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Disables the radio. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n constructor() {\n super();\n this.addEventListener('blur', this.handleBlur);\n this.addEventListener('click', this.handleClick);\n this.addEventListener('focus', this.handleFocus);\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.setInitialAttributes();\n }\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.emit('syn-blur');\n };\n\n private handleClick = () => {\n if (!this.disabled) {\n this.checked = true;\n }\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.emit('syn-focus');\n };\n\n private setInitialAttributes() {\n this.setAttribute('role', 'radio');\n this.setAttribute('tabindex', '-1');\n this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');\n }\n\n @watch('checked')\n handleCheckedChange() {\n this.setAttribute('aria-checked', this.checked ? 'true' : 'false');\n this.setAttribute('tabindex', this.checked ? '0' : '-1');\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');\n }\n\n render() {\n return html`\n <span\n part=\"base\"\n class=${classMap({\n radio: true,\n 'radio--checked': this.checked,\n 'radio--disabled': this.disabled,\n 'radio--focused': this.hasFocus,\n 'radio--small': this.size === 'small',\n 'radio--medium': this.size === 'medium',\n 'radio--large': this.size === 'large'\n })}\n >\n <span part=\"${`control${this.checked ? ' control--checked' : ''}`}\" class=\"radio__control\">\n ${this.checked\n ? html` <syn-icon part=\"checked-icon\" class=\"radio__checked-icon\" library=\"system\" name=\"radio\"></syn-icon> `\n : ''}\n </span>\n\n <slot part=\"label\" class=\"radio__label\"></slot>\n </span>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'syn-radio': SynRadio;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAMA,SAAS,gBAAgB;AACzB,SAAS,YAAY;AACrB,SAAS,UAAU,aAAa;AA0BhC,IAAqB,WAArB,cAAsC,eAAe;AAAA,EAmBnD,cAAc;AACZ,UAAM;AAhBC,mBAAU;AACV,SAAU,WAAW;AASD,gBAAqC;AAGtB,oBAAW;AAcvD,SAAQ,aAAa,MAAM;AACzB,WAAK,WAAW;AAChB,WAAK,KAAK,UAAU;AAAA,IACtB;AAEA,SAAQ,cAAc,MAAM;AAC1B,UAAI,CAAC,KAAK,UAAU;AAClB,aAAK,UAAU;AAAA,MACjB;AAAA,IACF;AAEA,SAAQ,cAAc,MAAM;AAC1B,WAAK,WAAW;AAChB,WAAK,KAAK,WAAW;AAAA,IACvB;AAxBE,SAAK,iBAAiB,QAAQ,KAAK,UAAU;AAC7C,SAAK,iBAAiB,SAAS,KAAK,WAAW;AAC/C,SAAK,iBAAiB,SAAS,KAAK,WAAW;AAAA,EACjD;AAAA,EAEA,oBAAoB;AAClB,UAAM,kBAAkB;AACxB,SAAK,qBAAqB;AAAA,EAC5B;AAAA,EAkBQ,uBAAuB;AAC7B,SAAK,aAAa,QAAQ,OAAO;AACjC,SAAK,aAAa,YAAY,IAAI;AAClC,SAAK,aAAa,iBAAiB,KAAK,WAAW,SAAS,OAAO;AAAA,EACrE;AAAA,EAGA,sBAAsB;AACpB,SAAK,aAAa,gBAAgB,KAAK,UAAU,SAAS,OAAO;AACjE,SAAK,aAAa,YAAY,KAAK,UAAU,MAAM,IAAI;AAAA,EACzD;AAAA,EAGA,uBAAuB;AACrB,SAAK,aAAa,iBAAiB,KAAK,WAAW,SAAS,OAAO;AAAA,EACrE;AAAA,EAEA,SAAS;AACP,WAAO;AAAA;AAAA;AAAA,gBAGK,SAAS;AAAA,MACf,OAAO;AAAA,MACP,kBAAkB,KAAK;AAAA,MACvB,mBAAmB,KAAK;AAAA,MACxB,kBAAkB,KAAK;AAAA,MACvB,gBAAgB,KAAK,SAAS;AAAA,MAC9B,iBAAiB,KAAK,SAAS;AAAA,MAC/B,gBAAgB,KAAK,SAAS;AAAA,IAChC,CAAC,CAAC;AAAA;AAAA,sBAEY,UAAU,KAAK,UAAU,sBAAsB,EAAE,EAAE;AAAA,YAC7D,KAAK,UACH,8GACA,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMd;AACF;AAxFqB,SACZ,SAAyB;AADb,SAEZ,eAAe,EAAE,YAAY,QAAQ;AAEnC;AAAA,EAAR,MAAM;AAAA,GAJY,SAIV;AACU;AAAA,EAAlB,MAAM;AAAA,GALY,SAKA;AAGP;AAAA,EAAX,SAAS;AAAA,GARS,SAQP;AAMiB;AAAA,EAA5B,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAdR,SAcU;AAGe;AAAA,EAA3C,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAjBvB,SAiByB;AAqC5C;AAAA,EADC,MAAM,SAAS;AAAA,GArDG,SAsDnB;AAMA;AAAA,EADC,MAAM,YAAY,EAAE,sBAAsB,KAAK,CAAC;AAAA,GA3D9B,SA4DnB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
component_styles_default
|
|
3
|
+
} from "./chunk.O7USYXBT.js";
|
|
4
|
+
|
|
5
|
+
// src/components/button-group/button-group.styles.ts
|
|
6
|
+
import { css } from "lit";
|
|
7
|
+
var button_group_styles_default = css`
|
|
8
|
+
/* stylelint-disable */
|
|
9
|
+
${component_styles_default}
|
|
10
|
+
|
|
11
|
+
:host {
|
|
12
|
+
display: inline-block;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.button-group {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-wrap: nowrap;
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
button_group_styles_default
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=chunk.4ZURABYO.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/button-group/button-group.styles.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport { css } from 'lit';\nimport componentStyles from '../../styles/component.styles.js';\n\nexport default css`\n\t/* stylelint-disable */\n ${componentStyles}\n\n :host {\n display: inline-block;\n }\n\n .button-group {\n display: flex;\n flex-wrap: nowrap;\n }\n`;\n"],
|
|
5
|
+
"mappings": ";;;;;AAMA,SAAS,WAAW;AAGpB,IAAO,8BAAQ;AAAA;AAAA,IAEX,wBAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/radio/radio.ts"],
|
|
4
|
+
"sourcesContent": ["// ---------------------------------------------------------------------\n// \uD83D\uDD12 AUTOGENERATED BY VENDORISM\n// Removing this comment will prevent it from being managed by it.\n// ---------------------------------------------------------------------\n\n/* eslint-disable */\nimport SynRadio from './radio.component.js';\n\nexport * from './radio.component.js';\nexport default SynRadio;\n\nSynRadio.define('syn-radio');\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'syn-radio': SynRadio;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AASA,IAAO,gBAAQ;AAEf,SAAS,OAAO,WAAW;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
import {
|
|
2
|
+
radio_group_styles_default
|
|
3
|
+
} from "./chunk.4I6M5V6O.js";
|
|
4
|
+
import {
|
|
5
|
+
HasSlotController
|
|
6
|
+
} from "./chunk.XGXFE6IF.js";
|
|
7
|
+
import {
|
|
8
|
+
FormControlController,
|
|
9
|
+
customErrorValidityState,
|
|
10
|
+
validValidityState,
|
|
11
|
+
valueMissingValidityState
|
|
12
|
+
} from "./chunk.P2LNG2PZ.js";
|
|
13
|
+
import {
|
|
14
|
+
watch
|
|
15
|
+
} from "./chunk.VZ7S7YYN.js";
|
|
16
|
+
import {
|
|
17
|
+
SynButtonGroup
|
|
18
|
+
} from "./chunk.R37X75B5.js";
|
|
19
|
+
import {
|
|
20
|
+
SynergyElement
|
|
21
|
+
} from "./chunk.QPQDXEPQ.js";
|
|
22
|
+
import {
|
|
23
|
+
__decorateClass
|
|
24
|
+
} from "./chunk.DJOAQ4JU.js";
|
|
25
|
+
|
|
26
|
+
// src/components/radio-group/radio-group.component.ts
|
|
27
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
28
|
+
import { html } from "lit";
|
|
29
|
+
import { property, query, state } from "lit/decorators.js";
|
|
30
|
+
var SynRadioGroup = class extends SynergyElement {
|
|
31
|
+
constructor() {
|
|
32
|
+
super(...arguments);
|
|
33
|
+
this.formControlController = new FormControlController(this);
|
|
34
|
+
this.hasSlotController = new HasSlotController(this, "help-text", "label");
|
|
35
|
+
this.customValidityMessage = "";
|
|
36
|
+
this.hasButtonGroup = false;
|
|
37
|
+
this.errorMessage = "";
|
|
38
|
+
this.defaultValue = "";
|
|
39
|
+
this.label = "";
|
|
40
|
+
this.helpText = "";
|
|
41
|
+
this.name = "option";
|
|
42
|
+
this.value = "";
|
|
43
|
+
this.size = "medium";
|
|
44
|
+
this.form = "";
|
|
45
|
+
this.required = false;
|
|
46
|
+
}
|
|
47
|
+
/** Gets the validity state object */
|
|
48
|
+
get validity() {
|
|
49
|
+
const isRequiredAndEmpty = this.required && !this.value;
|
|
50
|
+
const hasCustomValidityMessage = this.customValidityMessage !== "";
|
|
51
|
+
if (hasCustomValidityMessage) {
|
|
52
|
+
return customErrorValidityState;
|
|
53
|
+
} else if (isRequiredAndEmpty) {
|
|
54
|
+
return valueMissingValidityState;
|
|
55
|
+
}
|
|
56
|
+
return validValidityState;
|
|
57
|
+
}
|
|
58
|
+
/** Gets the validation message */
|
|
59
|
+
get validationMessage() {
|
|
60
|
+
const isRequiredAndEmpty = this.required && !this.value;
|
|
61
|
+
const hasCustomValidityMessage = this.customValidityMessage !== "";
|
|
62
|
+
if (hasCustomValidityMessage) {
|
|
63
|
+
return this.customValidityMessage;
|
|
64
|
+
} else if (isRequiredAndEmpty) {
|
|
65
|
+
return this.validationInput.validationMessage;
|
|
66
|
+
}
|
|
67
|
+
return "";
|
|
68
|
+
}
|
|
69
|
+
connectedCallback() {
|
|
70
|
+
super.connectedCallback();
|
|
71
|
+
this.defaultValue = this.value;
|
|
72
|
+
}
|
|
73
|
+
firstUpdated() {
|
|
74
|
+
this.formControlController.updateValidity();
|
|
75
|
+
}
|
|
76
|
+
getAllRadios() {
|
|
77
|
+
return [...this.querySelectorAll("syn-radio, syn-radio-button")];
|
|
78
|
+
}
|
|
79
|
+
handleRadioClick(event) {
|
|
80
|
+
const target = event.target.closest("syn-radio, syn-radio-button");
|
|
81
|
+
const radios = this.getAllRadios();
|
|
82
|
+
const oldValue = this.value;
|
|
83
|
+
if (target.disabled) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
this.value = target.value;
|
|
87
|
+
radios.forEach((radio) => radio.checked = radio === target);
|
|
88
|
+
if (this.value !== oldValue) {
|
|
89
|
+
this.emit("syn-change");
|
|
90
|
+
this.emit("syn-input");
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
handleKeyDown(event) {
|
|
94
|
+
var _a;
|
|
95
|
+
if (!["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", " "].includes(event.key)) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const radios = this.getAllRadios().filter((radio) => !radio.disabled);
|
|
99
|
+
const checkedRadio = (_a = radios.find((radio) => radio.checked)) != null ? _a : radios[0];
|
|
100
|
+
const incr = event.key === " " ? 0 : ["ArrowUp", "ArrowLeft"].includes(event.key) ? -1 : 1;
|
|
101
|
+
const oldValue = this.value;
|
|
102
|
+
let index = radios.indexOf(checkedRadio) + incr;
|
|
103
|
+
if (index < 0) {
|
|
104
|
+
index = radios.length - 1;
|
|
105
|
+
}
|
|
106
|
+
if (index > radios.length - 1) {
|
|
107
|
+
index = 0;
|
|
108
|
+
}
|
|
109
|
+
this.getAllRadios().forEach((radio) => {
|
|
110
|
+
radio.checked = false;
|
|
111
|
+
if (!this.hasButtonGroup) {
|
|
112
|
+
radio.tabIndex = -1;
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
this.value = radios[index].value;
|
|
116
|
+
radios[index].checked = true;
|
|
117
|
+
if (!this.hasButtonGroup) {
|
|
118
|
+
radios[index].tabIndex = 0;
|
|
119
|
+
radios[index].focus();
|
|
120
|
+
} else {
|
|
121
|
+
radios[index].shadowRoot.querySelector("button").focus();
|
|
122
|
+
}
|
|
123
|
+
if (this.value !== oldValue) {
|
|
124
|
+
this.emit("syn-change");
|
|
125
|
+
this.emit("syn-input");
|
|
126
|
+
}
|
|
127
|
+
event.preventDefault();
|
|
128
|
+
}
|
|
129
|
+
handleLabelClick() {
|
|
130
|
+
const radios = this.getAllRadios();
|
|
131
|
+
const checked = radios.find((radio) => radio.checked);
|
|
132
|
+
const radioToFocus = checked || radios[0];
|
|
133
|
+
if (radioToFocus) {
|
|
134
|
+
radioToFocus.focus();
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
handleInvalid(event) {
|
|
138
|
+
this.formControlController.setValidity(false);
|
|
139
|
+
this.formControlController.emitInvalidEvent(event);
|
|
140
|
+
}
|
|
141
|
+
async syncRadioElements() {
|
|
142
|
+
var _a, _b;
|
|
143
|
+
const radios = this.getAllRadios();
|
|
144
|
+
await Promise.all(
|
|
145
|
+
// Sync the checked state and size
|
|
146
|
+
radios.map(async (radio) => {
|
|
147
|
+
await radio.updateComplete;
|
|
148
|
+
radio.checked = radio.value === this.value;
|
|
149
|
+
radio.size = this.size;
|
|
150
|
+
})
|
|
151
|
+
);
|
|
152
|
+
this.hasButtonGroup = radios.some((radio) => radio.tagName.toLowerCase() === "syn-radio-button");
|
|
153
|
+
if (!radios.some((radio) => radio.checked)) {
|
|
154
|
+
if (this.hasButtonGroup) {
|
|
155
|
+
const buttonRadio = (_a = radios[0].shadowRoot) == null ? void 0 : _a.querySelector("button");
|
|
156
|
+
if (buttonRadio) {
|
|
157
|
+
buttonRadio.tabIndex = 0;
|
|
158
|
+
}
|
|
159
|
+
} else {
|
|
160
|
+
radios[0].tabIndex = 0;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if (this.hasButtonGroup) {
|
|
164
|
+
const buttonGroup = (_b = this.shadowRoot) == null ? void 0 : _b.querySelector("syn-button-group");
|
|
165
|
+
if (buttonGroup) {
|
|
166
|
+
buttonGroup.disableRole = true;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
syncRadios() {
|
|
171
|
+
if (customElements.get("syn-radio") && customElements.get("syn-radio-button")) {
|
|
172
|
+
this.syncRadioElements();
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
if (customElements.get("syn-radio")) {
|
|
176
|
+
this.syncRadioElements();
|
|
177
|
+
} else {
|
|
178
|
+
customElements.whenDefined("syn-radio").then(() => this.syncRadios());
|
|
179
|
+
}
|
|
180
|
+
if (customElements.get("syn-radio-button")) {
|
|
181
|
+
this.syncRadioElements();
|
|
182
|
+
} else {
|
|
183
|
+
customElements.whenDefined("syn-radio-button").then(() => this.syncRadios());
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
updateCheckedRadio() {
|
|
187
|
+
const radios = this.getAllRadios();
|
|
188
|
+
radios.forEach((radio) => radio.checked = radio.value === this.value);
|
|
189
|
+
this.formControlController.setValidity(this.validity.valid);
|
|
190
|
+
}
|
|
191
|
+
handleSizeChange() {
|
|
192
|
+
this.syncRadios();
|
|
193
|
+
}
|
|
194
|
+
handleValueChange() {
|
|
195
|
+
if (this.hasUpdated) {
|
|
196
|
+
this.updateCheckedRadio();
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
/** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
|
|
200
|
+
checkValidity() {
|
|
201
|
+
const isRequiredAndEmpty = this.required && !this.value;
|
|
202
|
+
const hasCustomValidityMessage = this.customValidityMessage !== "";
|
|
203
|
+
if (isRequiredAndEmpty || hasCustomValidityMessage) {
|
|
204
|
+
this.formControlController.emitInvalidEvent();
|
|
205
|
+
return false;
|
|
206
|
+
}
|
|
207
|
+
return true;
|
|
208
|
+
}
|
|
209
|
+
/** Gets the associated form, if one exists. */
|
|
210
|
+
getForm() {
|
|
211
|
+
return this.formControlController.getForm();
|
|
212
|
+
}
|
|
213
|
+
/** Checks for validity and shows the browser's validation message if the control is invalid. */
|
|
214
|
+
reportValidity() {
|
|
215
|
+
const isValid = this.validity.valid;
|
|
216
|
+
this.errorMessage = this.customValidityMessage || isValid ? "" : this.validationInput.validationMessage;
|
|
217
|
+
this.formControlController.setValidity(isValid);
|
|
218
|
+
this.validationInput.hidden = true;
|
|
219
|
+
clearTimeout(this.validationTimeout);
|
|
220
|
+
if (!isValid) {
|
|
221
|
+
this.validationInput.hidden = false;
|
|
222
|
+
this.validationInput.reportValidity();
|
|
223
|
+
this.validationTimeout = setTimeout(() => this.validationInput.hidden = true, 1e4);
|
|
224
|
+
}
|
|
225
|
+
return isValid;
|
|
226
|
+
}
|
|
227
|
+
/** Sets a custom validation message. Pass an empty string to restore validity. */
|
|
228
|
+
setCustomValidity(message = "") {
|
|
229
|
+
this.customValidityMessage = message;
|
|
230
|
+
this.errorMessage = message;
|
|
231
|
+
this.validationInput.setCustomValidity(message);
|
|
232
|
+
this.formControlController.updateValidity();
|
|
233
|
+
}
|
|
234
|
+
render() {
|
|
235
|
+
const hasLabelSlot = this.hasSlotController.test("label");
|
|
236
|
+
const hasHelpTextSlot = this.hasSlotController.test("help-text");
|
|
237
|
+
const hasLabel = this.label ? true : !!hasLabelSlot;
|
|
238
|
+
const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
|
|
239
|
+
const defaultSlot = html`
|
|
240
|
+
<slot @slotchange=${this.syncRadios} @click=${this.handleRadioClick} @keydown=${this.handleKeyDown}></slot>
|
|
241
|
+
`;
|
|
242
|
+
return html`
|
|
243
|
+
<fieldset
|
|
244
|
+
part="form-control"
|
|
245
|
+
class=${classMap({
|
|
246
|
+
"form-control": true,
|
|
247
|
+
"form-control--small": this.size === "small",
|
|
248
|
+
"form-control--medium": this.size === "medium",
|
|
249
|
+
"form-control--large": this.size === "large",
|
|
250
|
+
"form-control--radio-group": true,
|
|
251
|
+
"form-control--has-label": hasLabel,
|
|
252
|
+
"form-control--has-help-text": hasHelpText
|
|
253
|
+
})}
|
|
254
|
+
role="radiogroup"
|
|
255
|
+
aria-labelledby="label"
|
|
256
|
+
aria-describedby="help-text"
|
|
257
|
+
aria-errormessage="error-message"
|
|
258
|
+
>
|
|
259
|
+
<label
|
|
260
|
+
part="form-control-label"
|
|
261
|
+
id="label"
|
|
262
|
+
class="form-control__label"
|
|
263
|
+
aria-hidden=${hasLabel ? "false" : "true"}
|
|
264
|
+
@click=${this.handleLabelClick}
|
|
265
|
+
>
|
|
266
|
+
<slot name="label">${this.label}</slot>
|
|
267
|
+
</label>
|
|
268
|
+
|
|
269
|
+
<div part="form-control-input" class="form-control-input">
|
|
270
|
+
<div class="visually-hidden">
|
|
271
|
+
<div id="error-message" aria-live="assertive">${this.errorMessage}</div>
|
|
272
|
+
<label class="radio-group__validation">
|
|
273
|
+
<input
|
|
274
|
+
type="text"
|
|
275
|
+
class="radio-group__validation-input"
|
|
276
|
+
?required=${this.required}
|
|
277
|
+
tabindex="-1"
|
|
278
|
+
hidden
|
|
279
|
+
@invalid=${this.handleInvalid}
|
|
280
|
+
/>
|
|
281
|
+
</label>
|
|
282
|
+
</div>
|
|
283
|
+
|
|
284
|
+
${this.hasButtonGroup ? html`
|
|
285
|
+
<syn-button-group part="button-group" exportparts="base:button-group__base" role="presentation">
|
|
286
|
+
${defaultSlot}
|
|
287
|
+
</syn-button-group>
|
|
288
|
+
` : defaultSlot}
|
|
289
|
+
</div>
|
|
290
|
+
|
|
291
|
+
<div
|
|
292
|
+
part="form-control-help-text"
|
|
293
|
+
id="help-text"
|
|
294
|
+
class="form-control__help-text"
|
|
295
|
+
aria-hidden=${hasHelpText ? "false" : "true"}
|
|
296
|
+
>
|
|
297
|
+
<slot name="help-text">${this.helpText}</slot>
|
|
298
|
+
</div>
|
|
299
|
+
</fieldset>
|
|
300
|
+
`;
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
SynRadioGroup.styles = radio_group_styles_default;
|
|
304
|
+
SynRadioGroup.dependencies = { "syn-button-group": SynButtonGroup };
|
|
305
|
+
__decorateClass([
|
|
306
|
+
query("slot:not([name])")
|
|
307
|
+
], SynRadioGroup.prototype, "defaultSlot", 2);
|
|
308
|
+
__decorateClass([
|
|
309
|
+
query(".radio-group__validation-input")
|
|
310
|
+
], SynRadioGroup.prototype, "validationInput", 2);
|
|
311
|
+
__decorateClass([
|
|
312
|
+
state()
|
|
313
|
+
], SynRadioGroup.prototype, "hasButtonGroup", 2);
|
|
314
|
+
__decorateClass([
|
|
315
|
+
state()
|
|
316
|
+
], SynRadioGroup.prototype, "errorMessage", 2);
|
|
317
|
+
__decorateClass([
|
|
318
|
+
state()
|
|
319
|
+
], SynRadioGroup.prototype, "defaultValue", 2);
|
|
320
|
+
__decorateClass([
|
|
321
|
+
property()
|
|
322
|
+
], SynRadioGroup.prototype, "label", 2);
|
|
323
|
+
__decorateClass([
|
|
324
|
+
property({ attribute: "help-text" })
|
|
325
|
+
], SynRadioGroup.prototype, "helpText", 2);
|
|
326
|
+
__decorateClass([
|
|
327
|
+
property()
|
|
328
|
+
], SynRadioGroup.prototype, "name", 2);
|
|
329
|
+
__decorateClass([
|
|
330
|
+
property({ reflect: true })
|
|
331
|
+
], SynRadioGroup.prototype, "value", 2);
|
|
332
|
+
__decorateClass([
|
|
333
|
+
property({ reflect: true })
|
|
334
|
+
], SynRadioGroup.prototype, "size", 2);
|
|
335
|
+
__decorateClass([
|
|
336
|
+
property({ reflect: true })
|
|
337
|
+
], SynRadioGroup.prototype, "form", 2);
|
|
338
|
+
__decorateClass([
|
|
339
|
+
property({ type: Boolean, reflect: true })
|
|
340
|
+
], SynRadioGroup.prototype, "required", 2);
|
|
341
|
+
__decorateClass([
|
|
342
|
+
watch("size", { waitUntilFirstUpdate: true })
|
|
343
|
+
], SynRadioGroup.prototype, "handleSizeChange", 1);
|
|
344
|
+
__decorateClass([
|
|
345
|
+
watch("value")
|
|
346
|
+
], SynRadioGroup.prototype, "handleValueChange", 1);
|
|
347
|
+
|
|
348
|
+
export {
|
|
349
|
+
SynRadioGroup
|
|
350
|
+
};
|
|
351
|
+
//# sourceMappingURL=chunk.BELUQJC5.js.map
|