@synergy-design-system/components 1.0.0-main.9 → 1.0.0

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.
Files changed (209) hide show
  1. package/LICENSE +5 -24
  2. package/README.md +1 -1
  3. package/dist/chunks/chunk.23HTU3YE.js +189 -0
  4. package/dist/chunks/chunk.23HTU3YE.js.map +7 -0
  5. package/dist/chunks/chunk.2XZKXVMR.js +44 -0
  6. package/dist/chunks/chunk.2XZKXVMR.js.map +7 -0
  7. package/dist/chunks/chunk.3AQETYIY.js +12 -0
  8. package/dist/chunks/chunk.3AQETYIY.js.map +7 -0
  9. package/dist/chunks/chunk.45DBFNVM.js +12 -0
  10. package/dist/chunks/chunk.45DBFNVM.js.map +7 -0
  11. package/dist/chunks/chunk.4CBN5LPQ.js +137 -0
  12. package/dist/chunks/chunk.4CBN5LPQ.js.map +7 -0
  13. package/dist/chunks/chunk.4I6M5V6O.js +56 -0
  14. package/dist/chunks/chunk.4I6M5V6O.js.map +7 -0
  15. package/dist/chunks/{chunk.5OIEI73E.js → chunk.4XAK6MOQ.js} +2 -2
  16. package/dist/chunks/chunk.4ZURABYO.js +24 -0
  17. package/dist/chunks/{chunk.BREU4ILT.js.map → chunk.4ZURABYO.js.map} +3 -3
  18. package/dist/chunks/{chunk.DYPYZ53B.js → chunk.5ECUVPQI.js} +13 -31
  19. package/dist/chunks/{chunk.DYPYZ53B.js.map → chunk.5ECUVPQI.js.map} +3 -3
  20. package/dist/chunks/{chunk.YOW3IJVJ.js → chunk.6I3HJMNQ.js} +2 -2
  21. package/dist/chunks/{chunk.YOW3IJVJ.js.map → chunk.6I3HJMNQ.js.map} +1 -1
  22. package/dist/chunks/chunk.7CU3ERWO.js +86 -0
  23. package/dist/chunks/chunk.7CU3ERWO.js.map +7 -0
  24. package/dist/chunks/chunk.AFEABUNX.js +107 -0
  25. package/dist/chunks/chunk.AFEABUNX.js.map +7 -0
  26. package/dist/chunks/chunk.BP34OPXK.js +12 -0
  27. package/dist/chunks/chunk.BP34OPXK.js.map +7 -0
  28. package/dist/chunks/chunk.C6BQ2APJ.js +12 -0
  29. package/dist/chunks/chunk.C6BQ2APJ.js.map +7 -0
  30. package/dist/chunks/{chunk.6CFDQNJT.js → chunk.EMVM7VFZ.js} +14 -12
  31. package/dist/chunks/chunk.EMVM7VFZ.js.map +7 -0
  32. package/dist/chunks/chunk.F4MRQLNL.js +25 -0
  33. package/dist/chunks/chunk.F4MRQLNL.js.map +7 -0
  34. package/dist/chunks/{chunk.MQ3KYTNU.js → chunk.FVSP4LXX.js} +4 -4
  35. package/dist/chunks/chunk.FVSP4LXX.js.map +7 -0
  36. package/dist/chunks/chunk.GNAJOKCJ.js +32 -0
  37. package/dist/chunks/chunk.GNAJOKCJ.js.map +7 -0
  38. package/dist/chunks/{chunk.GRZ3TSGB.js → chunk.HPTHXM7Q.js} +2 -2
  39. package/dist/chunks/chunk.HSZXAY7K.js +12 -0
  40. package/dist/chunks/chunk.HSZXAY7K.js.map +7 -0
  41. package/dist/chunks/{chunk.SGZ5ADPY.js → chunk.IV4DT254.js} +2 -2
  42. package/dist/chunks/{chunk.IZS6SARK.js → chunk.J36DIOVR.js} +11 -38
  43. package/dist/chunks/{chunk.IZS6SARK.js.map → chunk.J36DIOVR.js.map} +4 -4
  44. package/dist/chunks/chunk.JBYBQ5TQ.js +132 -0
  45. package/dist/chunks/chunk.JBYBQ5TQ.js.map +7 -0
  46. package/dist/chunks/chunk.JHXCBOUD.js +123 -0
  47. package/dist/chunks/chunk.JHXCBOUD.js.map +7 -0
  48. package/dist/chunks/{chunk.H6VZTJD6.js → chunk.KZT2HFEV.js} +2 -2
  49. package/dist/chunks/chunk.MNMITYTH.js +184 -0
  50. package/dist/chunks/chunk.MNMITYTH.js.map +7 -0
  51. package/dist/chunks/chunk.NKIYFJN2.js +1 -0
  52. package/dist/chunks/chunk.NKIYFJN2.js.map +7 -0
  53. package/dist/chunks/chunk.OVVMSN4D.js +37 -0
  54. package/dist/chunks/chunk.OVVMSN4D.js.map +7 -0
  55. package/dist/chunks/{chunk.Q77OTWF2.js → chunk.OXUFFH57.js} +6 -66
  56. package/dist/chunks/{chunk.Q77OTWF2.js.map → chunk.OXUFFH57.js.map} +4 -4
  57. package/dist/chunks/{chunk.WDCAHRYG.js → chunk.P2LNG2PZ.js} +4 -2
  58. package/dist/chunks/chunk.PBWBRVMW.js +111 -0
  59. package/dist/chunks/chunk.PBWBRVMW.js.map +7 -0
  60. package/dist/chunks/chunk.PJO6TM3T.js +10 -0
  61. package/dist/chunks/{chunk.ILONRPL4.js.map → chunk.PJO6TM3T.js.map} +2 -2
  62. package/dist/chunks/chunk.Q6AHDRN2.js +12 -0
  63. package/dist/chunks/chunk.Q6AHDRN2.js.map +7 -0
  64. package/dist/chunks/chunk.QBOOYQY4.js +360 -0
  65. package/dist/chunks/chunk.QBOOYQY4.js.map +7 -0
  66. package/dist/chunks/{chunk.BREU4ILT.js → chunk.RSONAU45.js} +6 -1
  67. package/dist/chunks/chunk.RSONAU45.js.map +7 -0
  68. package/dist/chunks/chunk.TPRFDNQ5.js +12 -0
  69. package/dist/chunks/chunk.TPRFDNQ5.js.map +7 -0
  70. package/dist/chunks/chunk.TS36BW77.js +224 -0
  71. package/dist/chunks/chunk.TS36BW77.js.map +7 -0
  72. package/dist/chunks/chunk.V6VND4OF.js +49 -0
  73. package/dist/chunks/chunk.V6VND4OF.js.map +7 -0
  74. package/dist/chunks/chunk.VZ7S7YYN.js +34 -0
  75. package/dist/chunks/chunk.VZ7S7YYN.js.map +7 -0
  76. package/dist/chunks/chunk.W46CFM2R.js +90 -0
  77. package/dist/chunks/chunk.W46CFM2R.js.map +7 -0
  78. package/dist/chunks/chunk.WFAJR3FN.js +25 -0
  79. package/dist/chunks/chunk.WFAJR3FN.js.map +7 -0
  80. package/dist/chunks/chunk.X6ZVJSXL.js +212 -0
  81. package/dist/chunks/chunk.X6ZVJSXL.js.map +7 -0
  82. package/dist/chunks/chunk.YBIBWRKC.js +19 -0
  83. package/dist/chunks/chunk.YBIBWRKC.js.map +7 -0
  84. package/dist/chunks/chunk.YBZOIKAS.js +127 -0
  85. package/dist/chunks/chunk.YBZOIKAS.js.map +7 -0
  86. package/dist/chunks/{chunk.OZSASB66.js → chunk.YTS5TRJZ.js} +2 -2
  87. package/dist/chunks/{chunk.OZSASB66.js.map → chunk.YTS5TRJZ.js.map} +1 -1
  88. package/dist/chunks/{chunk.WTCUSH7V.js → chunk.Z3RZUTQU.js} +2 -2
  89. package/dist/chunks/chunk.ZJHB2ZWN.js +351 -0
  90. package/dist/chunks/chunk.ZJHB2ZWN.js.map +7 -0
  91. package/dist/chunks/chunk.ZSHYGTD6.js +12 -0
  92. package/dist/chunks/chunk.ZSHYGTD6.js.map +7 -0
  93. package/dist/components/button/button.component.js +13 -11
  94. package/dist/components/button/button.custom.styles.js +1 -1
  95. package/dist/components/button/button.js +14 -12
  96. package/dist/components/button/button.styles.js +2 -2
  97. package/dist/components/button-group/button-group.component.d.ts +28 -0
  98. package/dist/components/button-group/button-group.component.js +11 -0
  99. package/dist/components/button-group/button-group.component.js.map +7 -0
  100. package/dist/components/button-group/button-group.d.ts +8 -0
  101. package/dist/components/button-group/button-group.js +12 -0
  102. package/dist/components/button-group/button-group.js.map +7 -0
  103. package/dist/components/button-group/button-group.styles.d.ts +2 -0
  104. package/dist/components/button-group/button-group.styles.js +9 -0
  105. package/dist/components/button-group/button-group.styles.js.map +7 -0
  106. package/dist/components/checkbox/checkbox.component.d.ts +93 -0
  107. package/dist/components/checkbox/checkbox.component.js +22 -0
  108. package/dist/components/checkbox/checkbox.component.js.map +7 -0
  109. package/dist/components/checkbox/checkbox.custom.styles.js +3 -6
  110. package/dist/components/checkbox/checkbox.custom.styles.js.map +3 -3
  111. package/dist/components/checkbox/checkbox.d.ts +8 -0
  112. package/dist/components/checkbox/checkbox.js +23 -0
  113. package/dist/components/checkbox/checkbox.js.map +7 -0
  114. package/dist/components/checkbox/checkbox.styles.d.ts +2 -0
  115. package/dist/components/checkbox/checkbox.styles.js +10 -0
  116. package/dist/components/checkbox/checkbox.styles.js.map +7 -0
  117. package/dist/components/icon/icon.component.js +7 -5
  118. package/dist/components/icon/icon.custom.styles.d.ts +2 -0
  119. package/dist/components/icon/icon.custom.styles.js +8 -0
  120. package/dist/components/icon/icon.custom.styles.js.map +7 -0
  121. package/dist/components/icon/icon.js +9 -10
  122. package/dist/components/icon/icon.js.map +3 -3
  123. package/dist/components/icon/icon.styles.js +2 -1
  124. package/dist/components/icon/library.js +2 -2
  125. package/dist/components/icon/library.system.js +1 -1
  126. package/dist/components/input/input.component.js +14 -10
  127. package/dist/components/input/input.custom.styles.js +1 -1
  128. package/dist/components/input/input.js +15 -11
  129. package/dist/components/input/input.styles.js +3 -2
  130. package/dist/components/radio/radio.component.d.ts +53 -0
  131. package/dist/components/radio/radio.component.js +20 -0
  132. package/dist/components/radio/radio.component.js.map +7 -0
  133. package/dist/components/radio/radio.custom.styles.d.ts +2 -0
  134. package/dist/components/radio/radio.custom.styles.js +8 -0
  135. package/dist/components/radio/radio.custom.styles.js.map +7 -0
  136. package/dist/components/radio/radio.d.ts +8 -0
  137. package/dist/components/radio/radio.js +21 -0
  138. package/dist/components/radio/radio.js.map +7 -0
  139. package/dist/components/radio/radio.styles.d.ts +2 -0
  140. package/dist/components/radio/radio.styles.js +10 -0
  141. package/dist/components/radio/radio.styles.js.map +7 -0
  142. package/dist/components/radio-button/radio-button.component.d.ts +53 -0
  143. package/dist/components/radio-button/radio-button.component.js +15 -0
  144. package/dist/components/radio-button/radio-button.component.js.map +7 -0
  145. package/dist/components/radio-button/radio-button.d.ts +8 -0
  146. package/dist/components/radio-button/radio-button.js +16 -0
  147. package/dist/components/radio-button/radio-button.js.map +7 -0
  148. package/dist/components/radio-button/radio-button.styles.d.ts +2 -0
  149. package/dist/components/radio-button/radio-button.styles.js +11 -0
  150. package/dist/components/radio-button/radio-button.styles.js.map +7 -0
  151. package/dist/components/radio-group/radio-group.component.d.ts +89 -0
  152. package/dist/components/radio-group/radio-group.component.js +18 -0
  153. package/dist/components/radio-group/radio-group.component.js.map +7 -0
  154. package/dist/components/radio-group/radio-group.custom.styles.d.ts +2 -0
  155. package/dist/components/radio-group/radio-group.custom.styles.js +8 -0
  156. package/dist/components/radio-group/radio-group.custom.styles.js.map +7 -0
  157. package/dist/components/radio-group/radio-group.d.ts +8 -0
  158. package/dist/components/radio-group/radio-group.js +19 -0
  159. package/dist/components/radio-group/radio-group.js.map +7 -0
  160. package/dist/components/radio-group/radio-group.styles.d.ts +2 -0
  161. package/dist/components/radio-group/radio-group.styles.js +11 -0
  162. package/dist/components/radio-group/radio-group.styles.js.map +7 -0
  163. package/dist/components/spinner/spinner.component.js +2 -2
  164. package/dist/components/switch/switch.component.d.ts +86 -0
  165. package/dist/components/switch/switch.component.js +15 -0
  166. package/dist/components/switch/switch.component.js.map +7 -0
  167. package/dist/components/switch/switch.custom.styles.d.ts +2 -0
  168. package/dist/components/switch/switch.custom.styles.js +8 -0
  169. package/dist/components/switch/switch.custom.styles.js.map +7 -0
  170. package/dist/components/switch/switch.d.ts +8 -0
  171. package/dist/components/switch/switch.js +16 -0
  172. package/dist/components/switch/switch.js.map +7 -0
  173. package/dist/components/switch/switch.styles.d.ts +2 -0
  174. package/dist/components/switch/switch.styles.js +10 -0
  175. package/dist/components/switch/switch.styles.js.map +7 -0
  176. package/dist/components/textarea/textarea.component.d.ts +131 -0
  177. package/dist/components/textarea/textarea.component.js +17 -0
  178. package/dist/components/textarea/textarea.component.js.map +7 -0
  179. package/dist/components/textarea/textarea.custom.styles.js +3 -6
  180. package/dist/components/textarea/textarea.custom.styles.js.map +3 -3
  181. package/dist/components/textarea/textarea.d.ts +8 -0
  182. package/dist/components/textarea/textarea.js +18 -0
  183. package/dist/components/textarea/textarea.js.map +7 -0
  184. package/dist/components/textarea/textarea.styles.d.ts +2 -0
  185. package/dist/components/textarea/textarea.styles.js +11 -0
  186. package/dist/components/textarea/textarea.styles.js.map +7 -0
  187. package/dist/custom-elements.json +3072 -480
  188. package/dist/internal/test.d.ts +28 -0
  189. package/dist/styles/form-control.custom.styles.d.ts +2 -0
  190. package/dist/synergy.d.ts +11 -1
  191. package/dist/synergy.js +87 -21
  192. package/dist/utilities/form.js +2 -2
  193. package/dist/utilities/icon-library.d.ts +1 -0
  194. package/dist/utilities/icon-library.js +14 -0
  195. package/dist/utilities/icon-library.js.map +7 -0
  196. package/dist/vscode.html-custom-data.json +389 -0
  197. package/dist/web-types.json +866 -8
  198. package/package.json +22 -15
  199. package/dist/chunks/chunk.6CFDQNJT.js.map +0 -7
  200. package/dist/chunks/chunk.ILONRPL4.js +0 -10
  201. package/dist/chunks/chunk.MQ3KYTNU.js.map +0 -7
  202. package/dist/chunks/chunk.U7ZJ22QM.js +0 -128
  203. package/dist/chunks/chunk.U7ZJ22QM.js.map +0 -7
  204. /package/dist/chunks/{chunk.5OIEI73E.js.map → chunk.4XAK6MOQ.js.map} +0 -0
  205. /package/dist/chunks/{chunk.GRZ3TSGB.js.map → chunk.HPTHXM7Q.js.map} +0 -0
  206. /package/dist/chunks/{chunk.SGZ5ADPY.js.map → chunk.IV4DT254.js.map} +0 -0
  207. /package/dist/chunks/{chunk.H6VZTJD6.js.map → chunk.KZT2HFEV.js.map} +0 -0
  208. /package/dist/chunks/{chunk.WDCAHRYG.js.map → chunk.P2LNG2PZ.js.map} +0 -0
  209. /package/dist/chunks/{chunk.WTCUSH7V.js.map → chunk.Z3RZUTQU.js.map} +0 -0
@@ -0,0 +1,53 @@
1
+ import SynergyElement from '../../internal/synergy-element.js';
2
+ import SynIcon from '../icon/icon.component.js';
3
+ import type { CSSResultGroup } from 'lit';
4
+ /**
5
+ * @summary Radios allow the user to select a single option from a group.
6
+ * @documentation https://synergy.style/components/radio
7
+ * @status stable
8
+ * @since 2.0
9
+ *
10
+ * @dependency syn-icon
11
+ *
12
+ * @slot - The radio's label.
13
+ *
14
+ * @event syn-blur - Emitted when the control loses focus.
15
+ * @event syn-focus - Emitted when the control gains focus.
16
+ *
17
+ * @csspart base - The component's base wrapper.
18
+ * @csspart control - The circular container that wraps the radio's checked state.
19
+ * @csspart control--checked - The radio control when the radio is checked.
20
+ * @csspart checked-icon - The checked icon, an `<syn-icon>` element.
21
+ * @csspart label - The container that wraps the radio's label.
22
+ */
23
+ export default class SynRadio extends SynergyElement {
24
+ static styles: CSSResultGroup;
25
+ static dependencies: {
26
+ 'syn-icon': typeof SynIcon;
27
+ };
28
+ checked: boolean;
29
+ protected hasFocus: boolean;
30
+ /** The radio's value. When selected, the radio group will receive this value. */
31
+ value: string;
32
+ /**
33
+ * The radio's size. When used inside a radio group, the size will be determined by the radio group's size so this
34
+ * attribute can typically be omitted.
35
+ */
36
+ size: 'small' | 'medium' | 'large';
37
+ /** Disables the radio. */
38
+ disabled: boolean;
39
+ constructor();
40
+ connectedCallback(): void;
41
+ private handleBlur;
42
+ private handleClick;
43
+ private handleFocus;
44
+ private setInitialAttributes;
45
+ handleCheckedChange(): void;
46
+ handleDisabledChange(): void;
47
+ render(): import("lit").TemplateResult<1>;
48
+ }
49
+ declare global {
50
+ interface HTMLElementTagNameMap {
51
+ 'syn-radio': SynRadio;
52
+ }
53
+ }
@@ -0,0 +1,20 @@
1
+ import {
2
+ SynRadio
3
+ } from "../../chunks/chunk.PBWBRVMW.js";
4
+ import "../../chunks/chunk.JBYBQ5TQ.js";
5
+ import "../../chunks/chunk.V6VND4OF.js";
6
+ import "../../chunks/chunk.J36DIOVR.js";
7
+ import "../../chunks/chunk.VZ7S7YYN.js";
8
+ import "../../chunks/chunk.4XAK6MOQ.js";
9
+ import "../../chunks/chunk.6C4JXZZN.js";
10
+ import "../../chunks/chunk.GNAJOKCJ.js";
11
+ import "../../chunks/chunk.RSONAU45.js";
12
+ import "../../chunks/chunk.PJO6TM3T.js";
13
+ import "../../chunks/chunk.C7624ITA.js";
14
+ import "../../chunks/chunk.6I3HJMNQ.js";
15
+ import "../../chunks/chunk.O7USYXBT.js";
16
+ import "../../chunks/chunk.DJOAQ4JU.js";
17
+ export {
18
+ SynRadio as default
19
+ };
20
+ //# sourceMappingURL=radio.component.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import {
2
+ radio_custom_styles_default
3
+ } from "../../chunks/chunk.V6VND4OF.js";
4
+ import "../../chunks/chunk.DJOAQ4JU.js";
5
+ export {
6
+ radio_custom_styles_default as default
7
+ };
8
+ //# sourceMappingURL=radio.custom.styles.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,8 @@
1
+ import SynRadio from './radio.component.js';
2
+ export * from './radio.component.js';
3
+ export default SynRadio;
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'syn-radio': SynRadio;
7
+ }
8
+ }
@@ -0,0 +1,21 @@
1
+ import {
2
+ radio_default
3
+ } from "../../chunks/chunk.3AQETYIY.js";
4
+ import "../../chunks/chunk.PBWBRVMW.js";
5
+ import "../../chunks/chunk.JBYBQ5TQ.js";
6
+ import "../../chunks/chunk.V6VND4OF.js";
7
+ import "../../chunks/chunk.J36DIOVR.js";
8
+ import "../../chunks/chunk.VZ7S7YYN.js";
9
+ import "../../chunks/chunk.4XAK6MOQ.js";
10
+ import "../../chunks/chunk.6C4JXZZN.js";
11
+ import "../../chunks/chunk.GNAJOKCJ.js";
12
+ import "../../chunks/chunk.RSONAU45.js";
13
+ import "../../chunks/chunk.PJO6TM3T.js";
14
+ import "../../chunks/chunk.C7624ITA.js";
15
+ import "../../chunks/chunk.6I3HJMNQ.js";
16
+ import "../../chunks/chunk.O7USYXBT.js";
17
+ import "../../chunks/chunk.DJOAQ4JU.js";
18
+ export {
19
+ radio_default as default
20
+ };
21
+ //# sourceMappingURL=radio.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import {
2
+ radio_styles_default
3
+ } from "../../chunks/chunk.JBYBQ5TQ.js";
4
+ import "../../chunks/chunk.V6VND4OF.js";
5
+ import "../../chunks/chunk.O7USYXBT.js";
6
+ import "../../chunks/chunk.DJOAQ4JU.js";
7
+ export {
8
+ radio_styles_default as default
9
+ };
10
+ //# sourceMappingURL=radio.styles.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,53 @@
1
+ import SynergyElement from '../../internal/synergy-element.js';
2
+ import type { CSSResultGroup } from 'lit';
3
+ /**
4
+ * @summary Radios buttons allow the user to select a single option from a group using a button-like control.
5
+ * @documentation https://synergy.style/components/radio-button
6
+ * @status stable
7
+ * @since 2.0
8
+ *
9
+ * @slot - The radio button's label.
10
+ * @slot prefix - A presentational prefix icon or similar element.
11
+ * @slot suffix - A presentational suffix icon or similar element.
12
+ *
13
+ * @event syn-blur - Emitted when the button loses focus.
14
+ * @event syn-focus - Emitted when the button gains focus.
15
+ *
16
+ * @csspart base - The component's base wrapper.
17
+ * @csspart button - The internal `<button>` element.
18
+ * @csspart button--checked - The internal button element when the radio button is checked.
19
+ * @csspart prefix - The container that wraps the prefix.
20
+ * @csspart label - The container that wraps the radio button's label.
21
+ * @csspart suffix - The container that wraps the suffix.
22
+ */
23
+ export default class SynRadioButton extends SynergyElement {
24
+ static styles: CSSResultGroup;
25
+ private readonly hasSlotController;
26
+ input: HTMLInputElement;
27
+ hiddenInput: HTMLInputElement;
28
+ protected hasFocus: boolean;
29
+ /**
30
+ * @internal The radio button's checked state. This is exposed as an "internal" attribute so we can reflect it, making
31
+ * it easier to style in button groups.
32
+ */
33
+ checked: boolean;
34
+ /** The radio's value. When selected, the radio group will receive this value. */
35
+ value: string;
36
+ /** Disables the radio button. */
37
+ disabled: boolean;
38
+ /**
39
+ * The radio button's size. When used inside a radio group, the size will be determined by the radio group's size so
40
+ * this attribute can typically be omitted.
41
+ */
42
+ size: 'small' | 'medium' | 'large';
43
+ connectedCallback(): void;
44
+ private handleBlur;
45
+ private handleClick;
46
+ private handleFocus;
47
+ handleDisabledChange(): void;
48
+ /** Sets focus on the radio button. */
49
+ focus(options?: FocusOptions): void;
50
+ /** Removes focus from the radio button. */
51
+ blur(): void;
52
+ render(): import("lit").TemplateResult;
53
+ }
@@ -0,0 +1,15 @@
1
+ import {
2
+ SynRadioButton
3
+ } from "../../chunks/chunk.YBZOIKAS.js";
4
+ import "../../chunks/chunk.OVVMSN4D.js";
5
+ import "../../chunks/chunk.XGXFE6IF.js";
6
+ import "../../chunks/chunk.VZ7S7YYN.js";
7
+ import "../../chunks/chunk.YTS5TRJZ.js";
8
+ import "../../chunks/chunk.FVSP4LXX.js";
9
+ import "../../chunks/chunk.6I3HJMNQ.js";
10
+ import "../../chunks/chunk.O7USYXBT.js";
11
+ import "../../chunks/chunk.DJOAQ4JU.js";
12
+ export {
13
+ SynRadioButton as default
14
+ };
15
+ //# sourceMappingURL=radio-button.component.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,8 @@
1
+ import SynRadioButton from './radio-button.component.js';
2
+ export * from './radio-button.component.js';
3
+ export default SynRadioButton;
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'syn-radio-button': SynRadioButton;
7
+ }
8
+ }
@@ -0,0 +1,16 @@
1
+ import {
2
+ radio_button_default
3
+ } from "../../chunks/chunk.45DBFNVM.js";
4
+ import "../../chunks/chunk.YBZOIKAS.js";
5
+ import "../../chunks/chunk.OVVMSN4D.js";
6
+ import "../../chunks/chunk.XGXFE6IF.js";
7
+ import "../../chunks/chunk.VZ7S7YYN.js";
8
+ import "../../chunks/chunk.YTS5TRJZ.js";
9
+ import "../../chunks/chunk.FVSP4LXX.js";
10
+ import "../../chunks/chunk.6I3HJMNQ.js";
11
+ import "../../chunks/chunk.O7USYXBT.js";
12
+ import "../../chunks/chunk.DJOAQ4JU.js";
13
+ export {
14
+ radio_button_default as default
15
+ };
16
+ //# sourceMappingURL=radio-button.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import {
2
+ radio_button_styles_default
3
+ } from "../../chunks/chunk.OVVMSN4D.js";
4
+ import "../../chunks/chunk.YTS5TRJZ.js";
5
+ import "../../chunks/chunk.FVSP4LXX.js";
6
+ import "../../chunks/chunk.O7USYXBT.js";
7
+ import "../../chunks/chunk.DJOAQ4JU.js";
8
+ export {
9
+ radio_button_styles_default as default
10
+ };
11
+ //# sourceMappingURL=radio-button.styles.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,89 @@
1
+ import { FormControlController } from '../../internal/form.js';
2
+ import SynergyElement from '../../internal/synergy-element.js';
3
+ import SynButtonGroup from '../button-group/button-group.component.js';
4
+ import type { CSSResultGroup } from 'lit';
5
+ import type { SynergyFormControl } from '../../internal/synergy-element.js';
6
+ /**
7
+ * @summary Radio groups are used to group multiple [radios](/components/radio) or [radio buttons](/components/radio-button) so they function as a single form control.
8
+ * @documentation https://synergy.style/components/radio-group
9
+ * @status stable
10
+ * @since 2.0
11
+ *
12
+ * @dependency syn-button-group
13
+ *
14
+ * @slot - The default slot where `<syn-radio>` or `<syn-radio-button>` elements are placed.
15
+ * @slot label - The radio group's label. Required for proper accessibility. Alternatively, you can use the `label`
16
+ * attribute.
17
+ *
18
+ * @event syn-change - Emitted when the radio group's selected value changes.
19
+ * @event syn-input - Emitted when the radio group receives user input.
20
+ * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.
21
+ *
22
+ * @csspart form-control - The form control that wraps the label, input, and help text.
23
+ * @csspart form-control-label - The label's wrapper.
24
+ * @csspart form-control-input - The input's wrapper.
25
+ * @csspart form-control-help-text - The help text's wrapper.
26
+ * @csspart button-group - The button group that wraps radio buttons.
27
+ * @csspart button-group__base - The button group's `base` part.
28
+ */
29
+ export default class SynRadioGroup extends SynergyElement implements SynergyFormControl {
30
+ static styles: CSSResultGroup;
31
+ static dependencies: {
32
+ 'syn-button-group': typeof SynButtonGroup;
33
+ };
34
+ protected readonly formControlController: FormControlController;
35
+ private readonly hasSlotController;
36
+ private customValidityMessage;
37
+ private validationTimeout;
38
+ defaultSlot: HTMLSlotElement;
39
+ validationInput: HTMLInputElement;
40
+ private hasButtonGroup;
41
+ private errorMessage;
42
+ defaultValue: string;
43
+ /**
44
+ * The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot
45
+ * instead.
46
+ */
47
+ label: string;
48
+ /** The radio groups's help text. If you need to display HTML, use the `help-text` slot instead. */
49
+ helpText: string;
50
+ /** The name of the radio group, submitted as a name/value pair with form data. */
51
+ name: string;
52
+ /** The current value of the radio group, submitted as a name/value pair with form data. */
53
+ value: string;
54
+ /** The radio group's size. This size will be applied to all child radios and radio buttons. */
55
+ size: 'small' | 'medium' | 'large';
56
+ /**
57
+ * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you
58
+ * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in
59
+ * the same document or shadow root for this to work.
60
+ */
61
+ form: string;
62
+ /** Ensures a child radio is checked before allowing the containing form to submit. */
63
+ required: boolean;
64
+ /** Gets the validity state object */
65
+ get validity(): ValidityState;
66
+ /** Gets the validation message */
67
+ get validationMessage(): string;
68
+ connectedCallback(): void;
69
+ firstUpdated(): void;
70
+ private getAllRadios;
71
+ private handleRadioClick;
72
+ private handleKeyDown;
73
+ private handleLabelClick;
74
+ private handleInvalid;
75
+ private syncRadioElements;
76
+ private syncRadios;
77
+ private updateCheckedRadio;
78
+ handleSizeChange(): void;
79
+ handleValueChange(): void;
80
+ /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
81
+ checkValidity(): boolean;
82
+ /** Gets the associated form, if one exists. */
83
+ getForm(): HTMLFormElement | null;
84
+ /** Checks for validity and shows the browser's validation message if the control is invalid. */
85
+ reportValidity(): boolean;
86
+ /** Sets a custom validation message. Pass an empty string to restore validity. */
87
+ setCustomValidity(message?: string): void;
88
+ render(): import("lit").TemplateResult<1>;
89
+ }
@@ -0,0 +1,18 @@
1
+ import {
2
+ SynRadioGroup
3
+ } from "../../chunks/chunk.ZJHB2ZWN.js";
4
+ import "../../chunks/chunk.4I6M5V6O.js";
5
+ import "../../chunks/chunk.F4MRQLNL.js";
6
+ import "../../chunks/chunk.JHXCBOUD.js";
7
+ import "../../chunks/chunk.XGXFE6IF.js";
8
+ import "../../chunks/chunk.P2LNG2PZ.js";
9
+ import "../../chunks/chunk.VZ7S7YYN.js";
10
+ import "../../chunks/chunk.7CU3ERWO.js";
11
+ import "../../chunks/chunk.6I3HJMNQ.js";
12
+ import "../../chunks/chunk.4ZURABYO.js";
13
+ import "../../chunks/chunk.O7USYXBT.js";
14
+ import "../../chunks/chunk.DJOAQ4JU.js";
15
+ export {
16
+ SynRadioGroup as default
17
+ };
18
+ //# sourceMappingURL=radio-group.component.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import {
2
+ radio_group_custom_styles_default
3
+ } from "../../chunks/chunk.F4MRQLNL.js";
4
+ import "../../chunks/chunk.DJOAQ4JU.js";
5
+ export {
6
+ radio_group_custom_styles_default as default
7
+ };
8
+ //# sourceMappingURL=radio-group.custom.styles.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,8 @@
1
+ import SynRadioGroup from './radio-group.component.js';
2
+ export * from './radio-group.component.js';
3
+ export default SynRadioGroup;
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ 'syn-radio-group': SynRadioGroup;
7
+ }
8
+ }
@@ -0,0 +1,19 @@
1
+ import {
2
+ radio_group_default
3
+ } from "../../chunks/chunk.ZSHYGTD6.js";
4
+ import "../../chunks/chunk.ZJHB2ZWN.js";
5
+ import "../../chunks/chunk.4I6M5V6O.js";
6
+ import "../../chunks/chunk.F4MRQLNL.js";
7
+ import "../../chunks/chunk.JHXCBOUD.js";
8
+ import "../../chunks/chunk.XGXFE6IF.js";
9
+ import "../../chunks/chunk.P2LNG2PZ.js";
10
+ import "../../chunks/chunk.VZ7S7YYN.js";
11
+ import "../../chunks/chunk.7CU3ERWO.js";
12
+ import "../../chunks/chunk.6I3HJMNQ.js";
13
+ import "../../chunks/chunk.4ZURABYO.js";
14
+ import "../../chunks/chunk.O7USYXBT.js";
15
+ import "../../chunks/chunk.DJOAQ4JU.js";
16
+ export {
17
+ radio_group_default as default
18
+ };
19
+ //# sourceMappingURL=radio-group.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import {
2
+ radio_group_styles_default
3
+ } from "../../chunks/chunk.4I6M5V6O.js";
4
+ import "../../chunks/chunk.F4MRQLNL.js";
5
+ import "../../chunks/chunk.JHXCBOUD.js";
6
+ import "../../chunks/chunk.O7USYXBT.js";
7
+ import "../../chunks/chunk.DJOAQ4JU.js";
8
+ export {
9
+ radio_group_styles_default as default
10
+ };
11
+ //# sourceMappingURL=radio-group.styles.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  SynSpinner
3
- } from "../../chunks/chunk.SGZ5ADPY.js";
3
+ } from "../../chunks/chunk.IV4DT254.js";
4
4
  import "../../chunks/chunk.N2I6HVX3.js";
5
5
  import "../../chunks/chunk.R6VNLE6N.js";
6
6
  import "../../chunks/chunk.A3SKDWCT.js";
7
- import "../../chunks/chunk.YOW3IJVJ.js";
7
+ import "../../chunks/chunk.6I3HJMNQ.js";
8
8
  import "../../chunks/chunk.O7USYXBT.js";
9
9
  import "../../chunks/chunk.DJOAQ4JU.js";
10
10
  export {
@@ -0,0 +1,86 @@
1
+ import SynergyElement from '../../internal/synergy-element.js';
2
+ import type { CSSResultGroup } from 'lit';
3
+ import type { SynergyFormControl } from '../../internal/synergy-element.js';
4
+ /**
5
+ * @summary Switches allow the user to toggle an option on or off.
6
+ * @documentation https://synergy.style/components/switch
7
+ * @status stable
8
+ * @since 2.0
9
+ *
10
+ * @slot - The switch's label.
11
+ *
12
+ * @event syn-blur - Emitted when the control loses focus.
13
+ * @event syn-change - Emitted when the control's checked state changes.
14
+ * @event syn-input - Emitted when the control receives input.
15
+ * @event syn-focus - Emitted when the control gains focus.
16
+ * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.
17
+ *
18
+ * @csspart base - The component's base wrapper.
19
+ * @csspart control - The control that houses the switch's thumb.
20
+ * @csspart thumb - The switch's thumb.
21
+ * @csspart label - The switch's label.
22
+ *
23
+ * @cssproperty --width - The width of the switch.
24
+ * @cssproperty --height - The height of the switch.
25
+ * @cssproperty --thumb-size - The size of the thumb.
26
+ */
27
+ export default class SynSwitch extends SynergyElement implements SynergyFormControl {
28
+ static styles: CSSResultGroup;
29
+ private readonly formControlController;
30
+ input: HTMLInputElement;
31
+ private hasFocus;
32
+ title: string;
33
+ /** The name of the switch, submitted as a name/value pair with form data. */
34
+ name: string;
35
+ /** The current value of the switch, submitted as a name/value pair with form data. */
36
+ value: string;
37
+ /** The switch's size. */
38
+ size: 'small' | 'medium' | 'large';
39
+ /** Disables the switch. */
40
+ disabled: boolean;
41
+ /** Draws the switch in a checked state. */
42
+ checked: boolean;
43
+ /** The default value of the form control. Primarily used for resetting the form control. */
44
+ defaultChecked: boolean;
45
+ /**
46
+ * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you
47
+ * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in
48
+ * the same document or shadow root for this to work.
49
+ */
50
+ form: string;
51
+ /** Makes the switch a required field. */
52
+ required: boolean;
53
+ /** Gets the validity state object */
54
+ get validity(): ValidityState;
55
+ /** Gets the validation message */
56
+ get validationMessage(): string;
57
+ firstUpdated(): void;
58
+ private handleBlur;
59
+ private handleInput;
60
+ private handleInvalid;
61
+ private handleClick;
62
+ private handleFocus;
63
+ private handleKeyDown;
64
+ handleCheckedChange(): void;
65
+ handleDisabledChange(): void;
66
+ /** Simulates a click on the switch. */
67
+ click(): void;
68
+ /** Sets focus on the switch. */
69
+ focus(options?: FocusOptions): void;
70
+ /** Removes focus from the switch. */
71
+ blur(): void;
72
+ /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
73
+ checkValidity(): boolean;
74
+ /** Gets the associated form, if one exists. */
75
+ getForm(): HTMLFormElement | null;
76
+ /** Checks for validity and shows the browser's validation message if the control is invalid. */
77
+ reportValidity(): boolean;
78
+ /** Sets a custom validation message. Pass an empty string to restore validity. */
79
+ setCustomValidity(message: string): void;
80
+ render(): import("lit").TemplateResult<1>;
81
+ }
82
+ declare global {
83
+ interface HTMLElementTagNameMap {
84
+ 'syn-switch': SynSwitch;
85
+ }
86
+ }
@@ -0,0 +1,15 @@
1
+ import {
2
+ SynSwitch
3
+ } from "../../chunks/chunk.X6ZVJSXL.js";
4
+ import "../../chunks/chunk.MNMITYTH.js";
5
+ import "../../chunks/chunk.AFEABUNX.js";
6
+ import "../../chunks/chunk.WFAJR3FN.js";
7
+ import "../../chunks/chunk.P2LNG2PZ.js";
8
+ import "../../chunks/chunk.VZ7S7YYN.js";
9
+ import "../../chunks/chunk.6I3HJMNQ.js";
10
+ import "../../chunks/chunk.O7USYXBT.js";
11
+ import "../../chunks/chunk.DJOAQ4JU.js";
12
+ export {
13
+ SynSwitch as default
14
+ };
15
+ //# sourceMappingURL=switch.component.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult;
2
+ export default _default;