@synergy-design-system/components 1.2.1 → 1.2.2

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 (104) hide show
  1. package/dist/chunks/{chunk.NGM2Y5G5.js → chunk.47O65PF5.js} +2 -2
  2. package/dist/chunks/{chunk.ZUOBN5Q3.js → chunk.4S27S3RY.js} +2 -2
  3. package/dist/chunks/{chunk.GCYPKQBG.js → chunk.5EXH7VQY.js} +2 -2
  4. package/dist/chunks/{chunk.R3CMRBZ7.js → chunk.5T6QTZ6K.js} +3 -3
  5. package/dist/chunks/{chunk.W5TOVAHB.js → chunk.6UMINMJ4.js} +2 -2
  6. package/dist/chunks/{chunk.P2LNG2PZ.js → chunk.AMTCNRDE.js} +38 -9
  7. package/dist/chunks/chunk.AMTCNRDE.js.map +7 -0
  8. package/dist/chunks/{chunk.VG7NKBOV.js → chunk.CQ2JMH2J.js} +4 -4
  9. package/dist/chunks/{chunk.LWB5LXJ5.js → chunk.EEBBPMDI.js} +2 -2
  10. package/dist/chunks/{chunk.ITSSPNRO.js → chunk.EJKKSDGO.js} +2 -2
  11. package/dist/chunks/{chunk.QAPZLSEL.js → chunk.F75WKKCW.js} +3 -3
  12. package/dist/chunks/{chunk.4YSX6HUH.js → chunk.GMXJDCBI.js} +2 -2
  13. package/dist/chunks/{chunk.OUVIH6QL.js → chunk.H6VNYYUH.js} +3 -3
  14. package/dist/chunks/{chunk.Z3RZUTQU.js → chunk.HG5QC5EW.js} +2 -2
  15. package/dist/chunks/{chunk.I4ZBEQUH.js → chunk.JAKBHRC4.js} +3 -3
  16. package/dist/chunks/{chunk.U5AOTLVK.js → chunk.JW6NUJMF.js} +2 -2
  17. package/dist/chunks/{chunk.2D7KJSSX.js → chunk.KZMLTHDT.js} +4 -4
  18. package/dist/chunks/{chunk.MBXGNZ7I.js → chunk.L47LNUE3.js} +2 -2
  19. package/dist/chunks/chunk.LAB4YJYE.js +16 -0
  20. package/dist/chunks/chunk.LAB4YJYE.js.map +7 -0
  21. package/dist/chunks/{chunk.2V5UNOVJ.js → chunk.MWDOOCSU.js} +2 -2
  22. package/dist/chunks/{chunk.MTGT2EG5.js → chunk.N6E3X3S5.js} +2 -2
  23. package/dist/chunks/{chunk.VM64SQGC.js → chunk.NROSOMZ6.js} +2 -2
  24. package/dist/chunks/{chunk.5ILVVLJF.js → chunk.OINL3N23.js} +3 -3
  25. package/dist/chunks/{chunk.R3S3AGUF.js → chunk.PTZNO34T.js} +2 -2
  26. package/dist/chunks/{chunk.MM2HMAE6.js → chunk.RGXSZCKM.js} +9 -17
  27. package/dist/chunks/chunk.RGXSZCKM.js.map +7 -0
  28. package/dist/chunks/{chunk.PTBOOLQE.js → chunk.VIGOUABZ.js} +6 -6
  29. package/dist/chunks/{chunk.UYF5MTOU.js → chunk.VSUPUWP6.js} +2 -2
  30. package/dist/chunks/{chunk.AMHJ56Z3.js → chunk.W2K4VNZU.js} +4 -4
  31. package/dist/chunks/{chunk.AP2QDLP7.js → chunk.WZ7YZYWN.js} +4 -4
  32. package/dist/chunks/{chunk.V52P6M55.js → chunk.XMUT2KKD.js} +2 -2
  33. package/dist/chunks/{chunk.V52P6M55.js.map → chunk.XMUT2KKD.js.map} +1 -1
  34. package/dist/chunks/{chunk.DS3H2UY3.js → chunk.YK3MDRNQ.js} +3 -3
  35. package/dist/chunks/{chunk.S6PKR3AN.js → chunk.ZLE6SGK3.js} +5 -5
  36. package/dist/components/button/button.component.js +8 -8
  37. package/dist/components/button/button.js +9 -9
  38. package/dist/components/button/button.styles.js +2 -2
  39. package/dist/components/button-group/button-group.component.js +2 -2
  40. package/dist/components/button-group/button-group.js +3 -3
  41. package/dist/components/checkbox/checkbox.component.js +4 -4
  42. package/dist/components/checkbox/checkbox.js +5 -5
  43. package/dist/components/icon/icon.component.js +2 -2
  44. package/dist/components/icon/icon.js +3 -3
  45. package/dist/components/icon-button/icon-button.component.js +3 -3
  46. package/dist/components/icon-button/icon-button.js +4 -4
  47. package/dist/components/input/input.component.js +5 -5
  48. package/dist/components/input/input.js +6 -6
  49. package/dist/components/radio/radio.component.js +3 -3
  50. package/dist/components/radio/radio.js +4 -4
  51. package/dist/components/radio-button/radio-button.component.js +5 -5
  52. package/dist/components/radio-button/radio-button.js +6 -6
  53. package/dist/components/radio-button/radio-button.styles.js +3 -3
  54. package/dist/components/radio-group/radio-group.component.js +5 -5
  55. package/dist/components/radio-group/radio-group.js +6 -6
  56. package/dist/components/spinner/spinner.component.js +3 -3
  57. package/dist/components/switch/switch.component.js +3 -3
  58. package/dist/components/switch/switch.js +4 -4
  59. package/dist/components/tag/tag.component.js +5 -5
  60. package/dist/components/tag/tag.js +6 -6
  61. package/dist/components/textarea/textarea.component.js +3 -3
  62. package/dist/components/textarea/textarea.js +4 -4
  63. package/dist/custom-elements.json +142 -142
  64. package/dist/internal/form.d.ts +6 -0
  65. package/dist/internal/test.d.ts +4 -1
  66. package/dist/synergy.js +35 -35
  67. package/dist/translations/de.js +1 -1
  68. package/dist/utilities/form.js +2 -2
  69. package/dist/utilities/localize.d.ts +0 -1
  70. package/dist/utilities/localize.js +1 -1
  71. package/dist/vscode.html-custom-data.json +17 -17
  72. package/dist/web-types.json +30 -30
  73. package/package.json +3 -3
  74. package/dist/chunks/chunk.MM2HMAE6.js.map +0 -7
  75. package/dist/chunks/chunk.P2LNG2PZ.js.map +0 -7
  76. package/dist/chunks/chunk.R6VNLE6N.js +0 -11
  77. package/dist/chunks/chunk.R6VNLE6N.js.map +0 -7
  78. /package/dist/chunks/{chunk.NGM2Y5G5.js.map → chunk.47O65PF5.js.map} +0 -0
  79. /package/dist/chunks/{chunk.ZUOBN5Q3.js.map → chunk.4S27S3RY.js.map} +0 -0
  80. /package/dist/chunks/{chunk.GCYPKQBG.js.map → chunk.5EXH7VQY.js.map} +0 -0
  81. /package/dist/chunks/{chunk.R3CMRBZ7.js.map → chunk.5T6QTZ6K.js.map} +0 -0
  82. /package/dist/chunks/{chunk.W5TOVAHB.js.map → chunk.6UMINMJ4.js.map} +0 -0
  83. /package/dist/chunks/{chunk.VG7NKBOV.js.map → chunk.CQ2JMH2J.js.map} +0 -0
  84. /package/dist/chunks/{chunk.LWB5LXJ5.js.map → chunk.EEBBPMDI.js.map} +0 -0
  85. /package/dist/chunks/{chunk.ITSSPNRO.js.map → chunk.EJKKSDGO.js.map} +0 -0
  86. /package/dist/chunks/{chunk.QAPZLSEL.js.map → chunk.F75WKKCW.js.map} +0 -0
  87. /package/dist/chunks/{chunk.4YSX6HUH.js.map → chunk.GMXJDCBI.js.map} +0 -0
  88. /package/dist/chunks/{chunk.OUVIH6QL.js.map → chunk.H6VNYYUH.js.map} +0 -0
  89. /package/dist/chunks/{chunk.Z3RZUTQU.js.map → chunk.HG5QC5EW.js.map} +0 -0
  90. /package/dist/chunks/{chunk.I4ZBEQUH.js.map → chunk.JAKBHRC4.js.map} +0 -0
  91. /package/dist/chunks/{chunk.U5AOTLVK.js.map → chunk.JW6NUJMF.js.map} +0 -0
  92. /package/dist/chunks/{chunk.2D7KJSSX.js.map → chunk.KZMLTHDT.js.map} +0 -0
  93. /package/dist/chunks/{chunk.MBXGNZ7I.js.map → chunk.L47LNUE3.js.map} +0 -0
  94. /package/dist/chunks/{chunk.2V5UNOVJ.js.map → chunk.MWDOOCSU.js.map} +0 -0
  95. /package/dist/chunks/{chunk.MTGT2EG5.js.map → chunk.N6E3X3S5.js.map} +0 -0
  96. /package/dist/chunks/{chunk.VM64SQGC.js.map → chunk.NROSOMZ6.js.map} +0 -0
  97. /package/dist/chunks/{chunk.5ILVVLJF.js.map → chunk.OINL3N23.js.map} +0 -0
  98. /package/dist/chunks/{chunk.R3S3AGUF.js.map → chunk.PTZNO34T.js.map} +0 -0
  99. /package/dist/chunks/{chunk.PTBOOLQE.js.map → chunk.VIGOUABZ.js.map} +0 -0
  100. /package/dist/chunks/{chunk.UYF5MTOU.js.map → chunk.VSUPUWP6.js.map} +0 -0
  101. /package/dist/chunks/{chunk.AMHJ56Z3.js.map → chunk.W2K4VNZU.js.map} +0 -0
  102. /package/dist/chunks/{chunk.AP2QDLP7.js.map → chunk.WZ7YZYWN.js.map} +0 -0
  103. /package/dist/chunks/{chunk.DS3H2UY3.js.map → chunk.YK3MDRNQ.js.map} +0 -0
  104. /package/dist/chunks/{chunk.S6PKR3AN.js.map → chunk.ZLE6SGK3.js.map} +0 -0
package/dist/synergy.js CHANGED
@@ -1,82 +1,80 @@
1
1
  import {
2
2
  getFormControls,
3
3
  serialize
4
- } from "./chunks/chunk.Z3RZUTQU.js";
4
+ } from "./chunks/chunk.HG5QC5EW.js";
5
5
  import "./chunks/chunk.NKIYFJN2.js";
6
6
  import {
7
7
  tag_default
8
- } from "./chunks/chunk.MTGT2EG5.js";
8
+ } from "./chunks/chunk.N6E3X3S5.js";
9
9
  import {
10
10
  textarea_default
11
- } from "./chunks/chunk.NGM2Y5G5.js";
12
- import "./chunks/chunk.QAPZLSEL.js";
11
+ } from "./chunks/chunk.47O65PF5.js";
12
+ import "./chunks/chunk.F75WKKCW.js";
13
13
  import "./chunks/chunk.23HTU3YE.js";
14
14
  import "./chunks/chunk.YBIBWRKC.js";
15
15
  import {
16
16
  switch_default
17
- } from "./chunks/chunk.ZUOBN5Q3.js";
18
- import "./chunks/chunk.DS3H2UY3.js";
17
+ } from "./chunks/chunk.4S27S3RY.js";
18
+ import "./chunks/chunk.YK3MDRNQ.js";
19
19
  import "./chunks/chunk.MNMITYTH.js";
20
20
  import "./chunks/chunk.AFEABUNX.js";
21
- import "./chunks/chunk.2D7KJSSX.js";
21
+ import "./chunks/chunk.KZMLTHDT.js";
22
22
  import "./chunks/chunk.QHFGD6WW.js";
23
23
  import "./chunks/chunk.7W73A57K.js";
24
24
  import {
25
25
  radio_button_default
26
- } from "./chunks/chunk.U5AOTLVK.js";
27
- import "./chunks/chunk.5ILVVLJF.js";
28
- import "./chunks/chunk.2V5UNOVJ.js";
26
+ } from "./chunks/chunk.JW6NUJMF.js";
27
+ import "./chunks/chunk.OINL3N23.js";
28
+ import "./chunks/chunk.MWDOOCSU.js";
29
29
  import {
30
30
  radio_group_default
31
- } from "./chunks/chunk.MBXGNZ7I.js";
32
- import "./chunks/chunk.PTBOOLQE.js";
31
+ } from "./chunks/chunk.L47LNUE3.js";
32
+ import "./chunks/chunk.VIGOUABZ.js";
33
33
  import "./chunks/chunk.4I6M5V6O.js";
34
34
  import "./chunks/chunk.F4MRQLNL.js";
35
35
  import {
36
36
  input_default
37
- } from "./chunks/chunk.ITSSPNRO.js";
38
- import "./chunks/chunk.S6PKR3AN.js";
37
+ } from "./chunks/chunk.EJKKSDGO.js";
38
+ import "./chunks/chunk.ZLE6SGK3.js";
39
39
  import "./chunks/chunk.OXUFFH57.js";
40
40
  import "./chunks/chunk.JHXCBOUD.js";
41
41
  import "./chunks/chunk.W46CFM2R.js";
42
42
  import {
43
43
  radio_default
44
- } from "./chunks/chunk.UYF5MTOU.js";
45
- import "./chunks/chunk.OUVIH6QL.js";
44
+ } from "./chunks/chunk.VSUPUWP6.js";
45
+ import "./chunks/chunk.H6VNYYUH.js";
46
46
  import "./chunks/chunk.JBYBQ5TQ.js";
47
47
  import "./chunks/chunk.V6VND4OF.js";
48
48
  import {
49
49
  icon_default
50
- } from "./chunks/chunk.R3S3AGUF.js";
50
+ } from "./chunks/chunk.PTZNO34T.js";
51
51
  import {
52
52
  icon_button_default
53
- } from "./chunks/chunk.GCYPKQBG.js";
54
- import "./chunks/chunk.R3CMRBZ7.js";
53
+ } from "./chunks/chunk.5EXH7VQY.js";
54
+ import "./chunks/chunk.5T6QTZ6K.js";
55
55
  import "./chunks/chunk.2FN5DTS6.js";
56
56
  import "./chunks/chunk.OJF7KL44.js";
57
57
  import {
58
- button_default
59
- } from "./chunks/chunk.LWB5LXJ5.js";
58
+ button_group_default
59
+ } from "./chunks/chunk.6UMINMJ4.js";
60
60
  import {
61
61
  checkbox_default
62
- } from "./chunks/chunk.4YSX6HUH.js";
63
- import "./chunks/chunk.AMHJ56Z3.js";
62
+ } from "./chunks/chunk.GMXJDCBI.js";
63
+ import "./chunks/chunk.W2K4VNZU.js";
64
64
  import "./chunks/chunk.WFAJR3FN.js";
65
65
  import "./chunks/chunk.4CBN5LPQ.js";
66
66
  import "./chunks/chunk.2XZKXVMR.js";
67
67
  import {
68
- button_group_default
69
- } from "./chunks/chunk.W5TOVAHB.js";
70
- import "./chunks/chunk.AP2QDLP7.js";
71
- import "./chunks/chunk.4ZURABYO.js";
72
- import "./chunks/chunk.MM2HMAE6.js";
73
- import "./chunks/chunk.I4ZBEQUH.js";
68
+ button_default
69
+ } from "./chunks/chunk.EEBBPMDI.js";
70
+ import "./chunks/chunk.RGXSZCKM.js";
71
+ import "./chunks/chunk.JAKBHRC4.js";
74
72
  import "./chunks/chunk.N2I6HVX3.js";
75
73
  import "./chunks/chunk.XGXFE6IF.js";
76
- import "./chunks/chunk.R6VNLE6N.js";
74
+ import "./chunks/chunk.LAB4YJYE.js";
77
75
  import "./chunks/chunk.A3SKDWCT.js";
78
- import "./chunks/chunk.P2LNG2PZ.js";
79
- import "./chunks/chunk.VM64SQGC.js";
76
+ import "./chunks/chunk.AMTCNRDE.js";
77
+ import "./chunks/chunk.NROSOMZ6.js";
80
78
  import "./chunks/chunk.VZ7S7YYN.js";
81
79
  import {
82
80
  registerIconLibrary,
@@ -90,10 +88,12 @@ import {
90
88
  getBasePath,
91
89
  setBasePath
92
90
  } from "./chunks/chunk.C7624ITA.js";
93
- import "./chunks/chunk.V52P6M55.js";
94
- import "./chunks/chunk.VG7NKBOV.js";
95
- import "./chunks/chunk.O7USYXBT.js";
91
+ import "./chunks/chunk.CQ2JMH2J.js";
96
92
  import "./chunks/chunk.IUC3AWAU.js";
93
+ import "./chunks/chunk.WZ7YZYWN.js";
94
+ import "./chunks/chunk.XMUT2KKD.js";
95
+ import "./chunks/chunk.4ZURABYO.js";
96
+ import "./chunks/chunk.O7USYXBT.js";
97
97
  import "./chunks/chunk.DJOAQ4JU.js";
98
98
  export {
99
99
  button_default as SynButton,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  registerTranslation
3
- } from "../chunks/chunk.R6VNLE6N.js";
3
+ } from "../chunks/chunk.LAB4YJYE.js";
4
4
  import "../chunks/chunk.A3SKDWCT.js";
5
5
  import "../chunks/chunk.DJOAQ4JU.js";
6
6
 
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  getFormControls,
3
3
  serialize
4
- } from "../chunks/chunk.Z3RZUTQU.js";
5
- import "../chunks/chunk.P2LNG2PZ.js";
4
+ } from "../chunks/chunk.HG5QC5EW.js";
5
+ import "../chunks/chunk.AMTCNRDE.js";
6
6
  import "../chunks/chunk.DJOAQ4JU.js";
7
7
  export {
8
8
  getFormControls,
@@ -1,4 +1,3 @@
1
- import '../translations/en.js';
2
1
  import { LocalizeController as DefaultLocalizationController } from '@shoelace-style/localize';
3
2
  import type { Translation as DefaultTranslation } from '@shoelace-style/localize';
4
3
  export declare class LocalizeController extends DefaultLocalizationController<Translation> {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  LocalizeController,
3
3
  registerTranslation
4
- } from "../chunks/chunk.R6VNLE6N.js";
4
+ } from "../chunks/chunk.LAB4YJYE.js";
5
5
  import "../chunks/chunk.A3SKDWCT.js";
6
6
  import "../chunks/chunk.DJOAQ4JU.js";
7
7
  export {
@@ -131,23 +131,6 @@
131
131
  }
132
132
  ]
133
133
  },
134
- {
135
- "name": "syn-button-group",
136
- "description": "Button groups can be used to group related buttons into sections.\n---\n\n\n### **Slots:**\n - _default_ - One or more `<syn-button>` elements to display in the button group.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
137
- "attributes": [
138
- {
139
- "name": "label",
140
- "description": "A label to use for the button group. This won't be displayed on the screen, but it will be announced by assistive\ndevices when interacting with the control and is strongly recommended.",
141
- "values": []
142
- }
143
- ],
144
- "references": [
145
- {
146
- "name": "Documentation",
147
- "url": "https://synergy.style/components/button-group"
148
- }
149
- ]
150
- },
151
134
  {
152
135
  "name": "syn-checkbox",
153
136
  "description": "Checkboxes allow the user to toggle an option on or off.\n---\n\n\n### **Events:**\n - **syn-blur** - Emitted when the checkbox loses focus.\n- **syn-change** - Emitted when the checked state changes.\n- **syn-focus** - Emitted when the checkbox gains focus.\n- **syn-input** - Emitted when the checkbox receives input.\n- **syn-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Methods:**\n - **click()** - Simulates a click on the checkbox.\n- **focus(options: _FocusOptions_)** - Sets focus on the checkbox.\n- **blur()** - Removes focus from the checkbox.\n- **checkValidity()** - Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid.\n- **getForm(): _HTMLFormElement | null_** - Gets the associated form, if one exists.\n- **reportValidity()** - Checks for validity and shows the browser's validation message if the control is invalid.\n- **setCustomValidity(message: _string_)** - Sets a custom validation message. The value provided will be shown to the user when the form is submitted. To clear\nthe custom validation message, call this method with an empty string.\n\n### **Slots:**\n - _default_ - The checkbox's label.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **control** - The square container that wraps the checkbox's checked state.\n- **control--checked** - Matches the control part when the checkbox is checked.\n- **control--indeterminate** - Matches the control part when the checkbox is indeterminate.\n- **checked-icon** - The checked icon, an `<syn-icon>` element.\n- **indeterminate-icon** - The indeterminate icon, an `<syn-icon>` element.\n- **label** - The container that wraps the checkbox's label.",
@@ -205,6 +188,23 @@
205
188
  }
206
189
  ]
207
190
  },
191
+ {
192
+ "name": "syn-button-group",
193
+ "description": "Button groups can be used to group related buttons into sections.\n---\n\n\n### **Slots:**\n - _default_ - One or more `<syn-button>` elements to display in the button group.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
194
+ "attributes": [
195
+ {
196
+ "name": "label",
197
+ "description": "A label to use for the button group. This won't be displayed on the screen, but it will be announced by assistive\ndevices when interacting with the control and is strongly recommended.",
198
+ "values": []
199
+ }
200
+ ],
201
+ "references": [
202
+ {
203
+ "name": "Documentation",
204
+ "url": "https://synergy.style/components/button-group"
205
+ }
206
+ ]
207
+ },
208
208
  {
209
209
  "name": "syn-icon",
210
210
  "description": "Icons are symbols that can be used to represent various options within an application.\n---\n\n\n### **Events:**\n - **syn-load** - Emitted when the icon has loaded. When using `spriteSheet: true` this will not emit.\n- **syn-error** - Emitted when the icon fails to load due to an error. When using `spriteSheet: true` this will not emit.\n\n### **CSS Parts:**\n - **svg** - The internal SVG element.\n- **use** - The <use> element generated when using `spriteSheet: true`",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@synergy-design-system/components",
4
- "version": "1.2.1",
4
+ "version": "1.2.2",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -255,35 +255,6 @@
255
255
  ]
256
256
  }
257
257
  },
258
- {
259
- "name": "syn-button-group",
260
- "description": "Button groups can be used to group related buttons into sections.\n---\n\n\n### **Slots:**\n - _default_ - One or more `<syn-button>` elements to display in the button group.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
261
- "doc-url": "",
262
- "attributes": [
263
- {
264
- "name": "label",
265
- "description": "A label to use for the button group. This won't be displayed on the screen, but it will be announced by assistive\ndevices when interacting with the control and is strongly recommended.",
266
- "value": { "type": "string", "default": "''" }
267
- }
268
- ],
269
- "slots": [
270
- {
271
- "name": "",
272
- "description": "One or more `<syn-button>` elements to display in the button group."
273
- }
274
- ],
275
- "events": [],
276
- "js": {
277
- "properties": [
278
- {
279
- "name": "label",
280
- "description": "A label to use for the button group. This won't be displayed on the screen, but it will be announced by assistive\ndevices when interacting with the control and is strongly recommended.",
281
- "value": { "type": "string" }
282
- }
283
- ],
284
- "events": []
285
- }
286
- },
287
258
  {
288
259
  "name": "syn-checkbox",
289
260
  "description": "Checkboxes allow the user to toggle an option on or off.\n---\n\n\n### **Events:**\n - **syn-blur** - Emitted when the checkbox loses focus.\n- **syn-change** - Emitted when the checked state changes.\n- **syn-focus** - Emitted when the checkbox gains focus.\n- **syn-input** - Emitted when the checkbox receives input.\n- **syn-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Methods:**\n - **click()** - Simulates a click on the checkbox.\n- **focus(options: _FocusOptions_)** - Sets focus on the checkbox.\n- **blur()** - Removes focus from the checkbox.\n- **checkValidity()** - Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid.\n- **getForm(): _HTMLFormElement | null_** - Gets the associated form, if one exists.\n- **reportValidity()** - Checks for validity and shows the browser's validation message if the control is invalid.\n- **setCustomValidity(message: _string_)** - Sets a custom validation message. The value provided will be shown to the user when the form is submitted. To clear\nthe custom validation message, call this method with an empty string.\n\n### **Slots:**\n - _default_ - The checkbox's label.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **control** - The square container that wraps the checkbox's checked state.\n- **control--checked** - Matches the control part when the checkbox is checked.\n- **control--indeterminate** - Matches the control part when the checkbox is indeterminate.\n- **checked-icon** - The checked icon, an `<syn-icon>` element.\n- **indeterminate-icon** - The indeterminate icon, an `<syn-icon>` element.\n- **label** - The container that wraps the checkbox's label.",
@@ -425,6 +396,35 @@
425
396
  ]
426
397
  }
427
398
  },
399
+ {
400
+ "name": "syn-button-group",
401
+ "description": "Button groups can be used to group related buttons into sections.\n---\n\n\n### **Slots:**\n - _default_ - One or more `<syn-button>` elements to display in the button group.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
402
+ "doc-url": "",
403
+ "attributes": [
404
+ {
405
+ "name": "label",
406
+ "description": "A label to use for the button group. This won't be displayed on the screen, but it will be announced by assistive\ndevices when interacting with the control and is strongly recommended.",
407
+ "value": { "type": "string", "default": "''" }
408
+ }
409
+ ],
410
+ "slots": [
411
+ {
412
+ "name": "",
413
+ "description": "One or more `<syn-button>` elements to display in the button group."
414
+ }
415
+ ],
416
+ "events": [],
417
+ "js": {
418
+ "properties": [
419
+ {
420
+ "name": "label",
421
+ "description": "A label to use for the button group. This won't be displayed on the screen, but it will be announced by assistive\ndevices when interacting with the control and is strongly recommended.",
422
+ "value": { "type": "string" }
423
+ }
424
+ ],
425
+ "events": []
426
+ }
427
+ },
428
428
  {
429
429
  "name": "syn-icon",
430
430
  "description": "Icons are symbols that can be used to represent various options within an application.\n---\n\n\n### **Events:**\n - **syn-load** - Emitted when the icon has loaded. When using `spriteSheet: true` this will not emit.\n- **syn-error** - Emitted when the icon fails to load due to an error. When using `spriteSheet: true` this will not emit.\n\n### **CSS Parts:**\n - **svg** - The internal SVG element.\n- **use** - The <use> element generated when using `spriteSheet: true`",
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "url": "https://www.sick.com"
5
5
  },
6
6
  "name": "@synergy-design-system/components",
7
- "version": "1.2.1",
7
+ "version": "1.2.2",
8
8
  "description": "",
9
9
  "repository": {
10
10
  "type": "git",
@@ -88,9 +88,9 @@
88
88
  "user-agent-data-types": "^0.4.2",
89
89
  "vendorism": "github:mariohamann/vendorism",
90
90
  "vue-tsc": "^1.8.24",
91
- "@synergy-design-system/eslint-config-syn": "0.1.0",
92
91
  "@synergy-design-system/stylelint-config-syn": "0.1.0",
93
- "@synergy-design-system/tokens": "1.1.0"
92
+ "@synergy-design-system/tokens": "1.1.0",
93
+ "@synergy-design-system/eslint-config-syn": "0.1.0"
94
94
  },
95
95
  "release": {
96
96
  "branches": [
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/components/button/button.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 { FormControlController, validValidityState } from '../../internal/form.js';\nimport { HasSlotController } from '../../internal/slot.js';\nimport { html, literal } from 'lit/static-html.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { LocalizeController } from '../../utilities/localize.js';\nimport { property, query, 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 SynSpinner from '../spinner/spinner.component.js';\nimport styles from './button.styles.js';\nimport type { CSSResultGroup } from 'lit';\nimport type { SynergyFormControl } from '../../internal/synergy-element.js';\n\n/**\n * @summary Buttons represent actions that are available to the user.\n * @documentation https://synergy.style/components/button\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon\n * @dependency syn-spinner\n *\n * @event syn-blur - Emitted when the button loses focus.\n * @event syn-focus - Emitted when the button gains focus.\n * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @slot - The button's label.\n * @slot prefix - A presentational prefix icon or similar element.\n * @slot suffix - A presentational suffix icon or similar element.\n *\n * @csspart base - The component's base wrapper.\n * @csspart prefix - The container that wraps the prefix.\n * @csspart label - The button's label.\n * @csspart suffix - The container that wraps the suffix.\n * @csspart caret - The button's caret icon, an `<syn-icon>` element.\n * @csspart spinner - The spinner that shows when the button is in the loading state.\n */\nexport default class SynButton extends SynergyElement implements SynergyFormControl {\n static styles: CSSResultGroup = styles;\n static dependencies = {\n 'syn-icon': SynIcon,\n 'syn-spinner': SynSpinner\n };\n\n private readonly formControlController = new FormControlController(this, {\n form: input => {\n // Buttons support a form attribute that points to an arbitrary form, so if this attribute is set we need to query\n // the form from the same root using its id\n if (input.hasAttribute('form')) {\n const doc = input.getRootNode() as Document | ShadowRoot;\n const formId = input.getAttribute('form')!;\n return doc.getElementById(formId) as HTMLFormElement;\n }\n\n // Fall back to the closest containing form\n return input.closest('form');\n },\n assumeInteractionOn: ['click']\n });\n private readonly hasSlotController = new HasSlotController(this, '[default]', 'prefix', 'suffix');\n private readonly localize = new LocalizeController(this);\n\n @query('.button') button: HTMLButtonElement | HTMLLinkElement;\n\n @state() private hasFocus = false;\n @state() invalid = false;\n @property() title = ''; // make reactive to pass through\n\n /** The button's theme variant. */\n @property({ reflect: true }) variant: 'filled' | 'outline' | 'text' = 'outline';\n\n /** The button's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Draws the button with a caret. Used to indicate that the button triggers a dropdown menu or similar behavior. */\n @property({ type: Boolean, reflect: true }) caret = false;\n\n /** Disables the button. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Draws the button in a loading state. */\n @property({ type: Boolean, reflect: true }) loading = false;\n\n /**\n * The type of button. Note that the default value is `button` instead of `submit`, which is opposite of how native\n * `<button>` elements behave. When the type is `submit`, the button will submit the surrounding form.\n */\n @property() type: 'button' | 'submit' | 'reset' = 'button';\n\n /**\n * The name of the button, submitted as a name/value pair with form data, but only when this button is the submitter.\n * This attribute is ignored when `href` is present.\n */\n @property() name = '';\n\n /**\n * The value of the button, submitted as a pair with the button's name as part of the form data, but only when this\n * button is the submitter. This attribute is ignored when `href` is present.\n */\n @property() value = '';\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */\n @property() href = '';\n\n /** Tells the browser where to open the link. Only used when `href` is present. */\n @property() target: '_blank' | '_parent' | '_self' | '_top';\n\n /**\n * When using `href`, this attribute will map to the underlying link's `rel` attribute. Unlike regular links, the\n * default is `noreferrer noopener` to prevent security exploits. However, if you're using `target` to point to a\n * specific tab/window, this will prevent that from working correctly. You can remove or change the default value by\n * setting the attribute to an empty string or a value of your choice, respectively.\n */\n @property() rel = 'noreferrer noopener';\n\n /** Tells the browser to download the linked file as this filename. Only used when `href` is present. */\n @property() download?: string;\n\n /**\n * The \"form owner\" to associate the button with. If omitted, the closest containing form will be used instead. The\n * value of this attribute must be an id of a form in the same document or shadow root as the button.\n */\n @property() form: string;\n\n /** Used to override the form owner's `action` attribute. */\n @property({ attribute: 'formaction' }) formAction: string;\n\n /** Used to override the form owner's `enctype` attribute. */\n @property({ attribute: 'formenctype' })\n formEnctype: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain';\n\n /** Used to override the form owner's `method` attribute. */\n @property({ attribute: 'formmethod' }) formMethod: 'post' | 'get';\n\n /** Used to override the form owner's `novalidate` attribute. */\n @property({ attribute: 'formnovalidate', type: Boolean }) formNoValidate: boolean;\n\n /** Used to override the form owner's `target` attribute. */\n @property({ attribute: 'formtarget' }) formTarget: '_self' | '_blank' | '_parent' | '_top' | string;\n\n /** Gets the validity state object */\n get validity() {\n if (this.isButton()) {\n return (this.button as HTMLButtonElement).validity;\n }\n\n return validValidityState;\n }\n\n /** Gets the validation message */\n get validationMessage() {\n if (this.isButton()) {\n return (this.button as HTMLButtonElement).validationMessage;\n }\n\n return '';\n }\n\n firstUpdated() {\n if (this.isButton()) {\n this.formControlController.updateValidity();\n }\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('syn-blur');\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('syn-focus');\n }\n\n private handleClick() {\n if (this.type === 'submit') {\n this.formControlController.submit(this);\n }\n\n if (this.type === 'reset') {\n this.formControlController.reset(this);\n }\n }\n\n private handleInvalid(event: Event) {\n this.formControlController.setValidity(false);\n this.formControlController.emitInvalidEvent(event);\n }\n\n private isButton() {\n return this.href ? false : true;\n }\n\n private isLink() {\n return this.href ? true : false;\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n if (this.isButton()) {\n // Disabled form controls are always valid\n this.formControlController.setValidity(this.disabled);\n }\n }\n\n /** Simulates a click on the button. */\n click() {\n this.button.click();\n }\n\n /** Sets focus on the button. */\n focus(options?: FocusOptions) {\n this.button.focus(options);\n }\n\n /** Removes focus from the button. */\n blur() {\n this.button.blur();\n }\n\n /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */\n checkValidity() {\n if (this.isButton()) {\n return (this.button as HTMLButtonElement).checkValidity();\n }\n\n return true;\n }\n\n /** Gets the associated form, if one exists. */\n getForm(): HTMLFormElement | null {\n return this.formControlController.getForm();\n }\n\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n reportValidity() {\n if (this.isButton()) {\n return (this.button as HTMLButtonElement).reportValidity();\n }\n\n return true;\n }\n\n /** Sets a custom validation message. Pass an empty string to restore validity. */\n setCustomValidity(message: string) {\n if (this.isButton()) {\n (this.button as HTMLButtonElement).setCustomValidity(message);\n this.formControlController.updateValidity();\n }\n }\n\n render() {\n const isLink = this.isLink();\n const tag = isLink ? literal`a` : literal`button`;\n\n /* eslint-disable lit/no-invalid-html */\n /* eslint-disable lit/binding-positions */\n return html`\n <${tag}\n part=\"base\"\n class=${classMap({\n button: true,\n 'button--primary': true,\n 'button--text': this.variant === 'text',\n 'button--small': this.size === 'small',\n 'button--medium': this.size === 'medium',\n 'button--large': this.size === 'large',\n 'button--caret': this.caret,\n 'button--disabled': this.disabled,\n 'button--focused': this.hasFocus,\n 'button--loading': this.loading,\n 'button--filled': this.variant === 'filled',\n 'button--outline': this.variant === 'outline',\n 'button--rtl': this.localize.dir() === 'rtl',\n 'button--has-label': this.hasSlotController.test('[default]'),\n 'button--has-prefix': this.hasSlotController.test('prefix'),\n 'button--has-suffix': this.hasSlotController.test('suffix')\n })}\n ?disabled=${ifDefined(isLink ? undefined : this.disabled)}\n type=${ifDefined(isLink ? undefined : this.type)}\n title=${this.title /* An empty title prevents browser validation tooltips from appearing on hover */}\n name=${ifDefined(isLink ? undefined : this.name)}\n value=${ifDefined(isLink ? undefined : this.value)}\n href=${ifDefined(isLink ? this.href : undefined)}\n target=${ifDefined(isLink ? this.target : undefined)}\n download=${ifDefined(isLink ? this.download : undefined)}\n rel=${ifDefined(isLink ? this.rel : undefined)}\n role=${ifDefined(isLink ? undefined : 'button')}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n tabindex=${this.disabled ? '-1' : '0'}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n @invalid=${this.isButton() ? this.handleInvalid : null}\n @click=${this.handleClick}\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"button__prefix\"></slot>\n <slot part=\"label\" class=\"button__label\"></slot>\n <slot name=\"suffix\" part=\"suffix\" class=\"button__suffix\"></slot>\n ${\n this.caret ? html` <syn-icon part=\"caret\" class=\"button__caret\" library=\"system\" name=\"caret\"></syn-icon> ` : ''\n }\n ${this.loading ? html`<syn-spinner part=\"spinner\"></syn-spinner>` : ''}\n </${tag}>\n `;\n /* eslint-enable lit/no-invalid-html */\n /* eslint-enable lit/binding-positions */\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,SAAS,gBAAgB;AAGzB,SAAS,MAAM,eAAe;AAC9B,SAAS,iBAAiB;AAE1B,SAAS,UAAU,OAAO,aAAa;AAiCvC,IAAqB,YAArB,cAAuC,eAA6C;AAAA,EAApF;AAAA;AAOE,SAAiB,wBAAwB,IAAI,sBAAsB,MAAM;AAAA,MACvE,MAAM,WAAS;AAGb,YAAI,MAAM,aAAa,MAAM,GAAG;AAC9B,gBAAM,MAAM,MAAM,YAAY;AAC9B,gBAAM,SAAS,MAAM,aAAa,MAAM;AACxC,iBAAO,IAAI,eAAe,MAAM;AAAA,QAClC;AAGA,eAAO,MAAM,QAAQ,MAAM;AAAA,MAC7B;AAAA,MACA,qBAAqB,CAAC,OAAO;AAAA,IAC/B,CAAC;AACD,SAAiB,oBAAoB,IAAI,kBAAkB,MAAM,aAAa,UAAU,QAAQ;AAChG,SAAiB,WAAW,IAAI,mBAAmB,IAAI;AAI9C,SAAQ,WAAW;AACnB,mBAAU;AACP,iBAAQ;AAGS,mBAAyC;AAGzC,gBAAqC;AAGtB,iBAAQ;AAGR,oBAAW;AAGX,mBAAU;AAM1C,gBAAsC;AAMtC,gBAAO;AAMP,iBAAQ;AAGR,gBAAO;AAWP,eAAM;AAAA;AAAA;AAAA,EA4BlB,IAAI,WAAW;AACb,QAAI,KAAK,SAAS,GAAG;AACnB,aAAQ,KAAK,OAA6B;AAAA,IAC5C;AAEA,WAAO;AAAA,EACT;AAAA;AAAA,EAGA,IAAI,oBAAoB;AACtB,QAAI,KAAK,SAAS,GAAG;AACnB,aAAQ,KAAK,OAA6B;AAAA,IAC5C;AAEA,WAA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DP;AAMA;AAAA,EAAX,SAAS;AAAA,GA9DS,UA8DP;AAGA;AAAA,EAAX,SAAS;AAAA,GAjES,UAiEP;AAGA;AAAA,EAAX,SAAS;AAAA,GApES,UAoEP;AAQA;AAAA,EAAX,SAAS;AAAA,GA5ES,UA4EP;AAGA;AAAA,EAAX,SAAS;AAAA,GA/ES,UA+EP;AAMA;AAAA,EAAX,SAAS;AAAA,GArFS,UAqFP;AAG2B;AAAA,EAAtC,SAAS,EAAE,WAAW,aAAa,CAAC;AAAA,GAxFlB,UAwFoB;AAIvC;AAAA,EADC,SAAS,EAAE,WAAW,cAAc,CAAC;AAAA,GA3FnB,UA4FnB;AAGuC;AAAA,EAAtC,SAAS,EAAE,WAAW,aAAa,CAAC;AAAA,GA/FlB,UA+FoB;AAGmB;AAAA,EAAzD,SAAS,EAAE,WAAW,kBAAkB,MAAM,QAAQ,CAAC;AAAA,GAlGrC,UAkGuC;AAGnB;AAAA,EAAtC,SAAS,EAAE,WAAW,aAAa,CAAC;AAAA,GArGlB,UAqGoB;AA4DvC;AAAA,EADC,MAAM,YAAY,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAhK9B,UAiKnB;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/internal/form.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 type { ReactiveController, ReactiveControllerHost } from 'lit';\nimport type { SynergyFormControl } from '../internal/synergy-element.js';\nimport type SynButton from '../components/button/button.js';\n\n//\n// We store a WeakMap of forms + controls so we can keep references to all Synergy controls within a given form. As\n// elements connect and disconnect to/from the DOM, their containing form is used as the key and the form control is\n// added and removed from the form's set, respectively.\n//\nexport const formCollections: WeakMap<HTMLFormElement, Set<SynergyFormControl>> = new WeakMap();\n\n//\n// We store a WeakMap of reportValidity() overloads so we can override it when form controls connect to the DOM and\n// restore the original behavior when they disconnect.\n//\nconst reportValidityOverloads: WeakMap<HTMLFormElement, () => boolean> = new WeakMap();\n\n//\n// We store a Set of controls that users have interacted with. This allows us to determine the interaction state\n// without littering the DOM with additional data attributes.\n//\nconst userInteractedControls: WeakSet<SynergyFormControl> = new WeakSet();\n\n//\n// We store a WeakMap of interactions for each form control so we can track when all conditions are met for validation.\n//\nconst interactions = new WeakMap<SynergyFormControl, string[]>();\n\nexport interface FormControlControllerOptions {\n /** A function that returns the form containing the form control. */\n form: (input: SynergyFormControl) => HTMLFormElement | null;\n /** A function that returns the form control's name, which will be submitted with the form data. */\n name: (input: SynergyFormControl) => string;\n /** A function that returns the form control's current value. */\n value: (input: SynergyFormControl) => unknown | unknown[];\n /** A function that returns the form control's default value. */\n defaultValue: (input: SynergyFormControl) => unknown | unknown[];\n /** A function that returns the form control's current disabled state. If disabled, the value won't be submitted. */\n disabled: (input: SynergyFormControl) => boolean;\n /**\n * A function that maps to the form control's reportValidity() function. When the control is invalid, this will\n * prevent submission and trigger the browser's constraint violation warning.\n */\n reportValidity: (input: SynergyFormControl) => boolean;\n /** A function that sets the form control's value */\n setValue: (input: SynergyFormControl, value: unknown) => void;\n /**\n * An array of event names to listen to. When all events in the list are emitted, the control will receive validity\n * states such as user-valid and user-invalid.user interacted validity states. */\n assumeInteractionOn: string[];\n}\n\n/** A reactive controller to allow form controls to participate in form submission, validation, etc. */\nexport class FormControlController implements ReactiveController {\n host: SynergyFormControl & ReactiveControllerHost;\n form?: HTMLFormElement | null;\n options: FormControlControllerOptions;\n\n constructor(host: ReactiveControllerHost & SynergyFormControl, options?: Partial<FormControlControllerOptions>) {\n (this.host = host).addController(this);\n this.options = {\n form: input => {\n // If there's a form attribute, use it to find the target form by id\n if (input.hasAttribute('form') && input.getAttribute('form') !== '') {\n const root = input.getRootNode() as Document | ShadowRoot;\n const formId = input.getAttribute('form');\n\n if (formId) {\n return root.getElementById(formId) as HTMLFormElement;\n }\n }\n\n return input.closest('form');\n },\n name: input => input.name,\n value: input => input.value,\n defaultValue: input => input.defaultValue,\n disabled: input => input.disabled ?? false,\n reportValidity: input => (typeof input.reportValidity === 'function' ? input.reportValidity() : true),\n setValue: (input, value: string) => (input.value = value),\n assumeInteractionOn: ['syn-input'],\n ...options\n };\n }\n\n hostConnected() {\n const form = this.options.form(this.host);\n\n if (form) {\n this.attachForm(form);\n }\n\n // Listen for interactions\n interactions.set(this.host, []);\n this.options.assumeInteractionOn.forEach(event => {\n this.host.addEventListener(event, this.handleInteraction);\n });\n }\n\n hostDisconnected() {\n this.detachForm();\n\n // Clean up interactions\n interactions.delete(this.host);\n this.options.assumeInteractionOn.forEach(event => {\n this.host.removeEventListener(event, this.handleInteraction);\n });\n }\n\n hostUpdated() {\n const form = this.options.form(this.host);\n\n // Detach if the form no longer exists\n if (!form) {\n this.detachForm();\n }\n\n // If the form has changed, reattach it\n if (form && this.form !== form) {\n this.detachForm();\n this.attachForm(form);\n }\n\n if (this.host.hasUpdated) {\n this.setValidity(this.host.validity.valid);\n }\n }\n\n private attachForm(form?: HTMLFormElement) {\n if (form) {\n this.form = form;\n\n // Add this element to the form's collection\n if (formCollections.has(this.form)) {\n formCollections.get(this.form)!.add(this.host);\n } else {\n formCollections.set(this.form, new Set<SynergyFormControl>([this.host]));\n }\n\n this.form.addEventListener('formdata', this.handleFormData);\n this.form.addEventListener('submit', this.handleFormSubmit);\n this.form.addEventListener('reset', this.handleFormReset);\n\n // Overload the form's reportValidity() method so it looks at Synergy form controls\n if (!reportValidityOverloads.has(this.form)) {\n reportValidityOverloads.set(this.form, this.form.reportValidity);\n this.form.reportValidity = () => this.reportFormValidity();\n }\n } else {\n this.form = undefined;\n }\n }\n\n private detachForm() {\n if (this.form) {\n // Remove this element from the form's collection\n formCollections.get(this.form)?.delete(this.host);\n\n this.form.removeEventListener('formdata', this.handleFormData);\n this.form.removeEventListener('submit', this.handleFormSubmit);\n this.form.removeEventListener('reset', this.handleFormReset);\n\n // Remove the overload and restore the original method\n if (reportValidityOverloads.has(this.form)) {\n this.form.reportValidity = reportValidityOverloads.get(this.form)!;\n reportValidityOverloads.delete(this.form);\n }\n }\n\n this.form = undefined;\n }\n\n private handleFormData = (event: FormDataEvent) => {\n const disabled = this.options.disabled(this.host);\n const name = this.options.name(this.host);\n const value = this.options.value(this.host);\n\n // For buttons, we only submit the value if they were the submitter. This is currently done in doAction() by\n // injecting the name/value on a temporary button, so we can just skip them here.\n const isButton = this.host.tagName.toLowerCase() === 'syn-button';\n\n if (!disabled && !isButton && typeof name === 'string' && name.length > 0 && typeof value !== 'undefined') {\n if (Array.isArray(value)) {\n (value as unknown[]).forEach(val => {\n event.formData.append(name, (val as string | number | boolean).toString());\n });\n } else {\n event.formData.append(name, (value as string | number | boolean).toString());\n }\n }\n };\n\n private handleFormSubmit = (event: Event) => {\n const disabled = this.options.disabled(this.host);\n const reportValidity = this.options.reportValidity;\n\n // Update the interacted state for all controls when the form is submitted\n if (this.form && !this.form.noValidate) {\n formCollections.get(this.form)?.forEach(control => {\n this.setUserInteracted(control, true);\n });\n }\n\n if (this.form && !this.form.noValidate && !disabled && !reportValidity(this.host)) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n };\n\n private handleFormReset = () => {\n this.options.setValue(this.host, this.options.defaultValue(this.host));\n this.setUserInteracted(this.host, false);\n interactions.set(this.host, []);\n };\n\n private handleInteraction = (event: Event) => {\n const emittedEvents = interactions.get(this.host)!;\n\n if (!emittedEvents.includes(event.type)) {\n emittedEvents.push(event.type);\n }\n\n // Mark it as user-interacted as soon as all associated events have been emitted\n if (emittedEvents.length === this.options.assumeInteractionOn.length) {\n this.setUserInteracted(this.host, true);\n }\n };\n\n private reportFormValidity = () => {\n //\n // Synergy form controls work hard to act like regular form controls. They support the Constraint Validation API\n // and its associated methods such as setCustomValidity() and reportValidity(). However, the HTMLFormElement also\n // has a reportValidity() method that will trigger validation on all child controls. Since we're not yet using\n // ElementInternals, we need to overload this method so it looks for any element with the reportValidity() method.\n //\n // We preserve the original method in a WeakMap, but we don't call it from the overload because that would trigger\n // validations in an unexpected order. When the element disconnects, we revert to the original behavior. This won't\n // be necessary once we can use ElementInternals.\n //\n // Note that we're also honoring the form's novalidate attribute.\n //\n if (this.form && !this.form.noValidate) {\n // This seems sloppy, but checking all elements will cover native inputs, Synergy inputs, and other custom\n // elements that support the constraint validation API.\n const elements = this.form.querySelectorAll<HTMLInputElement>('*');\n\n for (const element of elements) {\n if (typeof element.reportValidity === 'function') {\n if (!element.reportValidity()) {\n return false;\n }\n }\n }\n }\n\n return true;\n };\n\n private setUserInteracted(el: SynergyFormControl, hasInteracted: boolean) {\n if (hasInteracted) {\n userInteractedControls.add(el);\n } else {\n userInteractedControls.delete(el);\n }\n\n el.requestUpdate();\n }\n\n private doAction(type: 'submit' | 'reset', submitter?: HTMLInputElement | SynButton) {\n if (this.form) {\n const button = document.createElement('button');\n button.type = type;\n button.style.position = 'absolute';\n button.style.width = '0';\n button.style.height = '0';\n button.style.clipPath = 'inset(50%)';\n button.style.overflow = 'hidden';\n button.style.whiteSpace = 'nowrap';\n\n // Pass name, value, and form attributes through to the temporary button\n if (submitter) {\n button.name = submitter.name;\n button.value = submitter.value;\n\n ['formaction', 'formenctype', 'formmethod', 'formnovalidate', 'formtarget'].forEach(attr => {\n if (submitter.hasAttribute(attr)) {\n button.setAttribute(attr, submitter.getAttribute(attr)!);\n }\n });\n }\n\n this.form.append(button);\n button.click();\n button.remove();\n }\n }\n\n /** Returns the associated `<form>` element, if one exists. */\n getForm() {\n return this.form ?? null;\n }\n\n /** Resets the form, restoring all the control to their default value */\n reset(submitter?: HTMLInputElement | SynButton) {\n this.doAction('reset', submitter);\n }\n\n /** Submits the form, triggering validation and form data injection. */\n submit(submitter?: HTMLInputElement | SynButton) {\n // Calling form.submit() bypasses the submit event and constraint validation. To prevent this, we can inject a\n // native submit button into the form, \"click\" it, then remove it to simulate a standard form submission.\n this.doAction('submit', submitter);\n }\n\n /**\n * Synchronously sets the form control's validity. Call this when you know the future validity but need to update\n * the host element immediately, i.e. before Lit updates the component in the next update.\n */\n setValidity(isValid: boolean) {\n const host = this.host;\n const hasInteracted = Boolean(userInteractedControls.has(host));\n const required = Boolean(host.required);\n\n //\n // We're mapping the following \"states\" to data attributes. In the future, we can use ElementInternals.states to\n // create a similar mapping, but instead of [data-invalid] it will look like :--invalid.\n //\n // See this RFC for more details: https://github.com/synergy-design-system/synergy/issues/1011\n //\n host.toggleAttribute('data-required', required);\n host.toggleAttribute('data-optional', !required);\n host.toggleAttribute('data-invalid', !isValid);\n host.toggleAttribute('data-valid', isValid);\n host.toggleAttribute('data-user-invalid', !isValid && hasInteracted);\n host.toggleAttribute('data-user-valid', isValid && hasInteracted);\n }\n\n /**\n * Updates the form control's validity based on the current value of `host.validity.valid`. Call this when anything\n * that affects constraint validation changes so the component receives the correct validity states.\n */\n updateValidity() {\n const host = this.host;\n this.setValidity(host.validity.valid);\n }\n\n /**\n * Dispatches a non-bubbling, cancelable custom event of type `syn-invalid`.\n * If the `syn-invalid` event will be cancelled then the original `invalid`\n * event (which may have been passed as argument) will also be cancelled.\n * If no original `invalid` event has been passed then the `syn-invalid`\n * event will be cancelled before being dispatched.\n */\n emitInvalidEvent(originalInvalidEvent?: Event) {\n const slInvalidEvent = new CustomEvent<Record<PropertyKey, never>>('syn-invalid', {\n bubbles: false,\n composed: false,\n cancelable: true,\n detail: {}\n });\n\n if (!originalInvalidEvent) {\n slInvalidEvent.preventDefault();\n }\n\n if (!this.host.dispatchEvent(slInvalidEvent)) {\n originalInvalidEvent?.preventDefault();\n }\n }\n}\n\n/*\n * Predefined common validity states.\n * All of them are read-only.\n */\n\n// A validity state object that represents `valid`\nexport const validValidityState: ValidityState = Object.freeze({\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valid: true,\n valueMissing: false\n});\n\n// A validity state object that represents `value missing`\nexport const valueMissingValidityState: ValidityState = Object.freeze({\n ...validValidityState,\n valid: false,\n valueMissing: true\n});\n\n// A validity state object that represents a custom error\nexport const customErrorValidityState: ValidityState = Object.freeze({\n ...validValidityState,\n valid: false,\n customError: true\n});\n"],
5
- "mappings": ";;;;;;AAeO,IAAM,kBAAqE,oBAAI,QAAQ;AAM9F,IAAM,0BAAmE,oBAAI,QAAQ;AAMrF,IAAM,yBAAsD,oBAAI,QAAQ;AAKxE,IAAM,eAAe,oBAAI,QAAsC;AA2BxD,IAAM,wBAAN,MAA0D;AAAA,EAK/D,YAAY,MAAmD,SAAiD;AAkHhH,SAAQ,iBAAiB,CAAC,UAAyB;AACjD,YAAM,WAAW,KAAK,QAAQ,SAAS,KAAK,IAAI;AAChD,YAAM,OAAO,KAAK,QAAQ,KAAK,KAAK,IAAI;AACxC,YAAM,QAAQ,KAAK,QAAQ,MAAM,KAAK,IAAI;AAI1C,YAAM,WAAW,KAAK,KAAK,QAAQ,YAAY,MAAM;AAErD,UAAI,CAAC,YAAY,CAAC,YAAY,OAAO,SAAS,YAAY,KAAK,SAAS,KAAK,OAAO,UAAU,aAAa;AACzG,YAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,UAAC,MAAoB,QAAQ,SAAO;AAClC,kBAAM,SAAS,OAAO,MAAO,IAAkC,SAAS,CAAC;AAAA,UAC3E,CAAC;AAAA,QACH,OAAO;AACL,gBAAM,SAAS,OAAO,MAAO,MAAoC,SAAS,CAAC;AAAA,QAC7E;AAAA,MACF;AAAA,IACF;AAEA,SAAQ,mBAAmB,CAAC,UAAiB;AAtM/C;AAuMI,YAAM,WAAW,KAAK,QAAQ,SAAS,KAAK,IAAI;AAChD,YAAM,iBAAiB,KAAK,QAAQ;AAGpC,UAAI,KAAK,QAAQ,CAAC,KAAK,KAAK,YAAY;AACtC,8BAAgB,IAAI,KAAK,IAAI,MAA7B,mBAAgC,QAAQ,aAAW;AACjD,eAAK,kBAAkB,SAAS,IAAI;AAAA,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A;AAAA;AAAA,EAMA,iBAAiB;AACf,UAAM,OAAO,KAAK;AAClB,SAAK,YAAY,KAAK,SAAS,KAAK;AAAA,EACtC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,iBAAiB,sBAA8B;AAC7C,UAAM,iBAAiB,IAAI,YAAwC,eAAe;AAAA,MAChF,SAAS;AAAA,MACT,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,QAAQ,CAAC;AAAA,IACX,CAAC;AAED,QAAI,CAAC,sBAAsB;AACzB,qBAAe,eAAe;AAAA,IAChC;AAEA,QAAI,CAAC,KAAK,KAAK,cAAc,cAAc,GAAG;AAC5C,mEAAsB;AAAA,IACxB;AAAA,EACF;AACF;AAQO,IAAM,qBAAoC,OAAO,OAAO;AAAA,EAC7D,UAAU;AAAA,EACV,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,SAAS;AAAA,EACT,UAAU;AAAA,EACV,cAAc;AAAA,EACd,OAAO;AAAA,EACP,cAAc;AAChB,CAAC;AAGM,IAAM,4BAA2C,OAAO,OAAO,iCACjE,qBADiE;AAAA,EAEpE,OAAO;AAAA,EACP,cAAc;AAChB,EAAC;AAGM,IAAM,2BAA0C,OAAO,OAAO,iCAChE,qBADgE;AAAA,EAEnE,OAAO;AAAA,EACP,aAAa;AACf,EAAC;",
6
- "names": []
7
- }
@@ -1,11 +0,0 @@
1
- // src/utilities/localize.ts
2
- import { LocalizeController as DefaultLocalizationController } from "@shoelace-style/localize";
3
- import { registerTranslation } from "@shoelace-style/localize";
4
- var LocalizeController = class extends DefaultLocalizationController {
5
- };
6
-
7
- export {
8
- LocalizeController,
9
- registerTranslation
10
- };
11
- //# sourceMappingURL=chunk.R6VNLE6N.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/utilities/localize.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 '../translations/en.js';\nimport { LocalizeController as DefaultLocalizationController } from '@shoelace-style/localize'; // Register English as the default/fallback language\nimport type { Translation as DefaultTranslation } from '@shoelace-style/localize';\n\n// Extend the controller and apply our own translation interface for better typings\nexport class LocalizeController extends DefaultLocalizationController<Translation> {}\n\n// Export functions from the localize lib so we have one central place to import them from\nexport { registerTranslation } from '@shoelace-style/localize';\n\nexport interface Translation extends DefaultTranslation {\n $code: string; // e.g. en, en-GB\n $name: string; // e.g. English, Espa\u00F1ol\n $dir: 'ltr' | 'rtl';\n\n carousel: string;\n clearEntry: string;\n close: string;\n copied: string;\n copy: string;\n currentValue: string;\n error: string;\n goToSlide: (slide: number, count: number) => string;\n hidePassword: string;\n loading: string;\n nextSlide: string;\n numOptionsSelected: (num: number) => string;\n previousSlide: string;\n progress: string;\n remove: string;\n resize: string;\n scrollToEnd: string;\n scrollToStart: string;\n selectAColorFromTheScreen: string;\n showPassword: string;\n slideNum: (slide: number) => string;\n toggleColorFormat: string;\n}\n"],
5
- "mappings": ";AAOA,SAAS,sBAAsB,qCAAqC;AAOpE,SAAS,2BAA2B;AAH7B,IAAM,qBAAN,cAAiC,8BAA2C;AAAC;",
6
- "names": []
7
- }