@synergy-design-system/metadata 3.17.0 → 3.18.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 (90) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/data/core/component/component:syn-button-group.json +0 -5
  3. package/data/core/component/component:syn-button.json +3 -3
  4. package/data/core/component/component:syn-chart.json +145 -0
  5. package/data/core/component/component:syn-radio-button.json +123 -14
  6. package/data/core/component/component:syn-radio-group.json +11 -0
  7. package/data/core/setup/setup:angular-components-module.json +1 -1
  8. package/data/core/setup/setup:angular-forms-module.json +1 -1
  9. package/data/core/setup/setup:angular-package.json +2 -2
  10. package/data/core/setup/setup:angular-validators-module.json +1 -1
  11. package/data/core/setup/setup:components-package.json +2 -2
  12. package/data/core/setup/setup:react-package.json +2 -2
  13. package/data/core/setup/setup:tokens-package.json +2 -2
  14. package/data/core/setup/setup:vue-package.json +2 -2
  15. package/data/core/token/token:tokens-charts-js-index-d-ts.json +1 -1
  16. package/data/core/token/token:tokens-charts-js-index-js.json +1 -1
  17. package/data/core/token/token:tokens-charts-scss-tokens-scss.json +1 -1
  18. package/data/core/token/token:tokens-charts-themes-sick2025-dark-css.json +1 -1
  19. package/data/core/token/token:tokens-charts-themes-sick2025-light-css.json +1 -1
  20. package/data/core/token/token:tokens-figma-variables-sick2018-dark-json.json +1 -1
  21. package/data/core/token/token:tokens-figma-variables-sick2018-light-json.json +1 -1
  22. package/data/core/token/token:tokens-figma-variables-sick2025-dark-json.json +1 -1
  23. package/data/core/token/token:tokens-figma-variables-sick2025-light-json.json +1 -1
  24. package/data/core/token/token:tokens-js-index-d-ts.json +1 -1
  25. package/data/core/token/token:tokens-js-index-js.json +1 -1
  26. package/data/core/token/token:tokens-scss-tokens-scss.json +1 -1
  27. package/data/core/token/token:tokens-themes-sick2018-dark-css.json +1 -1
  28. package/data/core/token/token:tokens-themes-sick2018-light-css.json +1 -1
  29. package/data/core/token/token:tokens-themes-sick2025-dark-css.json +1 -1
  30. package/data/core/token/token:tokens-themes-sick2025-light-css.json +1 -1
  31. package/data/index.json +3 -2
  32. package/data/layers/examples/component/component:syn-checkbox.md +16 -2
  33. package/data/layers/examples/component/component:syn-combobox.md +10 -3
  34. package/data/layers/examples/component/component:syn-file.md +16 -10
  35. package/data/layers/examples/component/component:syn-input.md +10 -3
  36. package/data/layers/examples/component/component:syn-radio-button.md +200 -0
  37. package/data/layers/examples/component/component:syn-radio-group.md +27 -2
  38. package/data/layers/examples/component/component:syn-radio.md +12 -5
  39. package/data/layers/examples/component/component:syn-range.md +16 -14
  40. package/data/layers/examples/component/component:syn-select.md +10 -3
  41. package/data/layers/examples/component/component:syn-switch.md +10 -3
  42. package/data/layers/examples/component/component:syn-textarea.md +10 -3
  43. package/data/layers/full/component/component:syn-button/components/button-group.styles.ts +66 -0
  44. package/data/layers/full/component/component:syn-button/components/button.component.ts +40 -52
  45. package/data/layers/full/component/component:syn-button/components/button.styles.ts +162 -173
  46. package/data/layers/full/component/component:syn-button-group/components/button-group.component.ts +22 -18
  47. package/data/layers/full/component/component:syn-button-group/components/button-group.styles.ts +0 -2
  48. package/data/layers/full/component/component:syn-radio-button/angular/radio-button.component.ts +14 -14
  49. package/data/layers/full/component/component:syn-radio-button/components/radio-button.component.ts +45 -25
  50. package/data/layers/full/component/component:syn-radio-button/components/radio-button.styles.ts +87 -25
  51. package/data/layers/full/component/component:syn-radio-button/react/radio-button.ts +1 -1
  52. package/data/layers/full/component/component:syn-radio-button/vue/SynVueRadioButton.vue +6 -6
  53. package/data/layers/full/component/component:syn-radio-group/components/radio-group.component.ts +23 -11
  54. package/data/layers/full/component/component:syn-radio-group/components/radio-group.styles.ts +51 -6
  55. package/data/layers/full/setup/setup:angular-package/angular/CHANGELOG.md +18 -0
  56. package/data/layers/full/setup/setup:angular-package/angular/package.json +1 -1
  57. package/data/layers/full/setup/setup:components-package/components/CHANGELOG.md +17 -0
  58. package/data/layers/full/setup/setup:components-package/components/package.json +1 -1
  59. package/data/layers/full/setup/setup:react-package/react/CHANGELOG.md +8 -0
  60. package/data/layers/full/setup/setup:react-package/react/package.json +1 -1
  61. package/data/layers/full/setup/setup:react-package/react/syn-jsx-elements.ts +2 -2
  62. package/data/layers/full/setup/setup:tokens-package/tokens/CHANGELOG.md +12 -0
  63. package/data/layers/full/setup/setup:tokens-package/tokens/package.json +1 -1
  64. package/data/layers/full/setup/setup:vue-package/vue/CHANGELOG.md +18 -0
  65. package/data/layers/full/setup/setup:vue-package/vue/package.json +1 -1
  66. package/data/layers/full/tokens/charts/js/index.d.ts +1 -1
  67. package/data/layers/full/tokens/charts/js/index.js +1 -1
  68. package/data/layers/full/tokens/charts/scss/_tokens.scss +1 -1
  69. package/data/layers/full/tokens/charts/themes/sick2025_dark.css +1 -1
  70. package/data/layers/full/tokens/charts/themes/sick2025_light.css +1 -1
  71. package/data/layers/full/tokens/figma-variables/sick2018-dark.json +20 -0
  72. package/data/layers/full/tokens/figma-variables/sick2018-light.json +20 -0
  73. package/data/layers/full/tokens/figma-variables/sick2025-dark.json +20 -0
  74. package/data/layers/full/tokens/figma-variables/sick2025-light.json +20 -0
  75. package/data/layers/full/tokens/js/index.d.ts +21 -1
  76. package/data/layers/full/tokens/js/index.js +21 -1
  77. package/data/layers/full/tokens/scss/_tokens.scss +5 -1
  78. package/data/layers/full/tokens/themes/sick2018_dark.css +5 -1
  79. package/data/layers/full/tokens/themes/sick2018_light.css +5 -1
  80. package/data/layers/full/tokens/themes/sick2025_dark.css +5 -1
  81. package/data/layers/full/tokens/themes/sick2025_light.css +5 -1
  82. package/data/layers/interface/component/component:syn-radio-button.json +14 -12
  83. package/data/layers/interface/component/component:syn-radio-button.md +6 -4
  84. package/data/layers/rules/component/component:syn-radio-button.md +16 -11
  85. package/data/manifest.json +1 -1
  86. package/dist/intentPolicy/domains/input/capabilities.js +4 -0
  87. package/dist/intentPolicy/domains/input/patterns.js +9 -0
  88. package/package.json +3 -3
  89. package/data/layers/full/component/component:syn-button/components/button.custom.styles.ts +0 -245
  90. package/data/layers/full/component/component:syn-button-group/components/button-group.custom.styles.ts +0 -5
@@ -17,7 +17,7 @@
17
17
  "name": "_tokens.scss",
18
18
  "package": "tokens",
19
19
  "relations": [],
20
- "since": "3.16.0",
20
+ "since": "3.17.0",
21
21
  "sources": [
22
22
  "packages/tokens/dist/scss/_tokens.scss"
23
23
  ],
@@ -18,7 +18,7 @@
18
18
  "name": "sick2018_dark.css",
19
19
  "package": "tokens",
20
20
  "relations": [],
21
- "since": "3.16.0",
21
+ "since": "3.17.0",
22
22
  "sources": [
23
23
  "packages/tokens/dist/themes/sick2018_dark.css"
24
24
  ],
@@ -18,7 +18,7 @@
18
18
  "name": "sick2018_light.css",
19
19
  "package": "tokens",
20
20
  "relations": [],
21
- "since": "3.16.0",
21
+ "since": "3.17.0",
22
22
  "sources": [
23
23
  "packages/tokens/dist/themes/sick2018_light.css"
24
24
  ],
@@ -18,7 +18,7 @@
18
18
  "name": "sick2025_dark.css",
19
19
  "package": "tokens",
20
20
  "relations": [],
21
- "since": "3.16.0",
21
+ "since": "3.17.0",
22
22
  "sources": [
23
23
  "packages/tokens/dist/themes/sick2025_dark.css"
24
24
  ],
@@ -18,7 +18,7 @@
18
18
  "name": "sick2025_light.css",
19
19
  "package": "tokens",
20
20
  "relations": [],
21
- "since": "3.16.0",
21
+ "since": "3.17.0",
22
22
  "sources": [
23
23
  "packages/tokens/dist/themes/sick2025_light.css"
24
24
  ],
package/data/index.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "builtAt": "2026-06-24T10:06:47.286Z",
2
+ "builtAt": "2026-06-30T12:09:05.533Z",
3
3
  "entities": [
4
4
  {
5
5
  "corePath": "data/core/asset/asset:sick2018-icons.json",
@@ -245,7 +245,7 @@
245
245
  "kind": "component",
246
246
  "layers": {
247
247
  "examples": 1,
248
- "full": 8,
248
+ "full": 7,
249
249
  "interface": 2,
250
250
  "rules": 1
251
251
  },
@@ -838,6 +838,7 @@
838
838
  "id": "component:syn-radio-button",
839
839
  "kind": "component",
840
840
  "layers": {
841
+ "examples": 1,
841
842
  "full": 7,
842
843
  "interface": 2,
843
844
  "rules": 1
@@ -101,16 +101,30 @@ Use the size attribute to change a checkbox’s size.
101
101
  The invalid status is used to warn the user that the Checkbox is invalid. For example, if the check is mandatory and nothing has been checked.
102
102
 
103
103
  ```html
104
- <form class="custom-validity">
104
+ <form
105
+ onsubmit="
106
+ event.preventDefault();
107
+ event.stopPropagation();
108
+ "
109
+ id="components-syn-checkbox--invalid"
110
+ >
105
111
  <div class="custom-validity">
106
112
  <syn-checkbox required="">Invalid</syn-checkbox>
107
113
  <syn-checkbox required="" indeterminate="">Invalid</syn-checkbox>
108
114
  <syn-checkbox required="" checked="">Invalid</syn-checkbox>
109
115
  </div>
116
+ <style>
117
+ .custom-validity {
118
+ display: flex;
119
+ flex-direction: column;
120
+ gap: var(--syn-spacing-large);
121
+ }
122
+ </style>
123
+
110
124
  <syn-button type="submit" variant="filled">Submit</syn-button>
111
125
  </form>
112
126
  <style>
113
- .custom-validity {
127
+ #components-syn-checkbox--invalid {
114
128
  display: flex;
115
129
  flex-direction: column;
116
130
  gap: var(--syn-spacing-large);
@@ -289,7 +289,13 @@ Use the size attribute to change a combobox size.
289
289
  The invalid status is used to warn the user that the combobox is invalid. For example, if the entry is mandatory.
290
290
 
291
291
  ```html
292
- <form class="custom-validity">
292
+ <form
293
+ onsubmit="
294
+ event.preventDefault();
295
+ event.stopPropagation();
296
+ "
297
+ id="components-syn-combobox--invalid"
298
+ >
293
299
  <syn-combobox
294
300
  required=""
295
301
  placeholder="Type something"
@@ -309,13 +315,14 @@ The invalid status is used to warn the user that the combobox is invalid. For ex
309
315
  <syn-option value="White">White</syn-option>
310
316
  <syn-option value="Yellow">Yellow</syn-option>
311
317
  </syn-combobox>
318
+
312
319
  <syn-button type="submit" variant="filled">Submit</syn-button>
313
320
  </form>
314
321
  <style>
315
- .custom-validity {
322
+ #components-syn-combobox--invalid {
316
323
  display: flex;
317
324
  flex-direction: column;
318
- gap: 1rem;
325
+ gap: var(--syn-spacing-large);
319
326
  }
320
327
  syn-button {
321
328
  align-self: flex-start;
@@ -111,28 +111,34 @@ Use the size attribute to change the component's size.
111
111
  The invalid status is used to warn the user that the syn-file is invalid. For example, if the entry of text is mandatory and nothing has been entered or if a text has been entered that does not have the correct format.
112
112
 
113
113
  ```html
114
- <form class="custom-validity">
114
+ <form
115
+ onsubmit="
116
+ event.preventDefault();
117
+ event.stopPropagation();
118
+ "
119
+ id="components-syn-file--invalid"
120
+ >
115
121
  <syn-file
116
122
  class="syn-file-invalid"
117
123
  droparea=""
118
124
  help-text="This is an error text."
119
125
  label="This is a label"
120
126
  ></syn-file>
127
+ <script type="module">
128
+ const files = document.querySelectorAll(".syn-file-invalid");
129
+ files.forEach((file) => {
130
+ file.setCustomValidity("This is an error text");
131
+ });
132
+ </script>
133
+
121
134
  <syn-button type="submit" variant="filled">Submit</syn-button>
122
135
  </form>
123
- <script type="module">
124
- const files = document.querySelectorAll(".syn-file-invalid");
125
- files.forEach((file) => {
126
- file.setCustomValidity("This is an error text");
127
- });
128
- </script>
129
136
  <style>
130
- .custom-validity {
137
+ #components-syn-file--invalid {
131
138
  display: flex;
132
139
  flex-direction: column;
133
- gap: 1rem;
140
+ gap: var(--syn-spacing-large);
134
141
  }
135
-
136
142
  syn-button {
137
143
  align-self: flex-start;
138
144
  }
@@ -128,20 +128,27 @@ Use the size attribute to change an input's size.
128
128
  The invalid status is used to warn the user that the input is invalid. For example, if the entry of text is mandatory and nothing has been entered or if a text has been entered that does not have the correct format.
129
129
 
130
130
  ```html
131
- <form class="custom-validity">
131
+ <form
132
+ onsubmit="
133
+ event.preventDefault();
134
+ event.stopPropagation();
135
+ "
136
+ id="components-syn-input--invalid"
137
+ >
132
138
  <syn-input
133
139
  help-text="This input is required."
134
140
  label="Label"
135
141
  placeholder="Insert text here..."
136
142
  required=""
137
143
  ></syn-input>
144
+
138
145
  <syn-button type="submit" variant="filled">Submit</syn-button>
139
146
  </form>
140
147
  <style>
141
- .custom-validity {
148
+ #components-syn-input--invalid {
142
149
  display: flex;
143
150
  flex-direction: column;
144
- gap: 1rem;
151
+ gap: var(--syn-spacing-large);
145
152
  }
146
153
  syn-button {
147
154
  align-self: flex-start;
@@ -0,0 +1,200 @@
1
+ ## Default
2
+
3
+ Radio buttons allow the user to select a single option from a group using a button-like control.Radio buttons are designed to be used with radio groups. When a radio button has focus, the arrow keys can be used to change the selected option just like standard radio controls.
4
+
5
+ ```html
6
+ <syn-radio-group label="Select an option" name="a" value="1">
7
+ <syn-radio-button value="1"> Option 1 </syn-radio-button>
8
+
9
+ <syn-radio-button value="2">Option 2</syn-radio-button>
10
+ <syn-radio-button value="3">Option 3</syn-radio-button>
11
+ </syn-radio-group>
12
+ ```
13
+
14
+ ---
15
+
16
+ ## Checked
17
+
18
+ To set the initial value and checked state, use the value attribute on the containing radio group.
19
+
20
+ ```html
21
+ <syn-radio-group label="Select an option" name="b" value="2">
22
+ <syn-radio-button value="1">Option 1</syn-radio-button>
23
+ <syn-radio-button value="2">Option 2</syn-radio-button>
24
+ <syn-radio-button value="3">Option 3</syn-radio-button>
25
+ </syn-radio-group>
26
+ ```
27
+
28
+ ---
29
+
30
+ ## Focus
31
+
32
+ The focus event gives the user feedback that the radio button has been focused by the keyboard interaction.
33
+
34
+ ```html
35
+ <syn-radio-group label="Select an option" name="b" value="1">
36
+ <syn-radio-button value="1">Option 1</syn-radio-button>
37
+ <syn-radio-button value="2">Option 2</syn-radio-button>
38
+ <syn-radio-button value="3">Option 3</syn-radio-button>
39
+ </syn-radio-group>
40
+ ```
41
+
42
+ ---
43
+
44
+ ## Disabled
45
+
46
+ Use the disabled attribute to disable a radio button.
47
+
48
+ ```html
49
+ <syn-radio-group label="Select an option" name="b" value="1">
50
+ <syn-radio-button value="1" disabled="">Option 1</syn-radio-button>
51
+ <syn-radio-button value="2" disabled="">Option 2</syn-radio-button>
52
+ <syn-radio-button value="3">Option 3</syn-radio-button>
53
+ </syn-radio-group>
54
+ ```
55
+
56
+ ---
57
+
58
+ ## Readonly
59
+
60
+ Add the read-only attribute to render a readonly radio button. Please note that you need to enable the readonly state for each individual radio button.
61
+
62
+ ```html
63
+ <div
64
+ style="display: flex; flex-direction: column; gap: var(--syn-spacing-medium)"
65
+ >
66
+ <syn-radio-group label="Select an option" name="b" value="1">
67
+ <syn-radio-button value="1" readonly="">Option 1</syn-radio-button>
68
+ <syn-radio-button value="2" readonly="">Option 2</syn-radio-button>
69
+ <syn-radio-button value="3" readonly="">Option 3</syn-radio-button>
70
+ </syn-radio-group>
71
+ <syn-radio-group label="Select an option" name="b" value="1">
72
+ <syn-radio-button value="1" readonly="">Option 1</syn-radio-button>
73
+ <syn-radio-button value="2" readonly="">Option 2</syn-radio-button>
74
+ <syn-radio-button value="3">Option 3</syn-radio-button>
75
+ </syn-radio-group>
76
+ </div>
77
+ ```
78
+
79
+ ---
80
+
81
+ ## Sizes
82
+
83
+ Use the size attribute to change a radio button’s size.
84
+
85
+ ```html
86
+ <div
87
+ style="display: flex; flex-direction: column; gap: var(--syn-spacing-medium)"
88
+ >
89
+ <syn-radio-group label="Select an option" name="size" value="1" size="small">
90
+ <syn-radio-button value="1">Option 1</syn-radio-button>
91
+ <syn-radio-button value="2">Option 2</syn-radio-button>
92
+ <syn-radio-button value="3">Option 3</syn-radio-button>
93
+ </syn-radio-group>
94
+
95
+ <syn-radio-group label="Select an option" name="size" value="1" size="medium">
96
+ <syn-radio-button value="1">Option 1</syn-radio-button>
97
+ <syn-radio-button value="2">Option 2</syn-radio-button>
98
+ <syn-radio-button value="3">Option 3</syn-radio-button>
99
+ </syn-radio-group>
100
+
101
+ <syn-radio-group label="Select an option" name="size" value="1" size="large">
102
+ <syn-radio-button value="1">Option 1</syn-radio-button>
103
+ <syn-radio-button value="2">Option 2</syn-radio-button>
104
+ <syn-radio-button value="3">Option 3</syn-radio-button>
105
+ </syn-radio-group>
106
+ </div>
107
+ ```
108
+
109
+ ---
110
+
111
+ ## Invalid
112
+
113
+ The invalid status is used to warn the user that the Radio Group is invalid. For example, if the radio-button is mandatory and nothing has been checked.
114
+
115
+ ```html
116
+ <form
117
+ onsubmit="
118
+ event.preventDefault();
119
+ event.stopPropagation();
120
+ "
121
+ id="components-syn-radio-button--invalid"
122
+ >
123
+ <syn-radio-group
124
+ label="Select an option"
125
+ name="a"
126
+ help-text="This is required"
127
+ required=""
128
+ >
129
+ <syn-radio-button value="1">Option 1</syn-radio-button>
130
+ <syn-radio-button value="2">Option 2</syn-radio-button>
131
+ <syn-radio-button value="3">Option 3</syn-radio-button>
132
+ </syn-radio-group>
133
+
134
+ <syn-button type="submit" variant="filled">Submit</syn-button>
135
+ </form>
136
+ <style>
137
+ #components-syn-radio-button--invalid {
138
+ display: flex;
139
+ flex-direction: column;
140
+ gap: var(--syn-spacing-large);
141
+ }
142
+ syn-button {
143
+ align-self: flex-start;
144
+ }
145
+ </style>
146
+ ```
147
+
148
+ ---
149
+
150
+ ## Prefix And Suffix Icons
151
+
152
+ Use the prefix and suffix slots to add icons.
153
+
154
+ ```html
155
+ <syn-radio-group label="Select an option" name="b" value="1">
156
+ <syn-radio-button value="1">
157
+ <syn-icon slot="prefix" name="wallpaper"></syn-icon>
158
+ Option 1
159
+ </syn-radio-button>
160
+ <syn-radio-button value="2">
161
+ Option 2
162
+ <syn-icon slot="suffix" name="wallpaper"></syn-icon>
163
+ </syn-radio-button>
164
+ <syn-radio-button value="3">
165
+ <syn-icon slot="prefix" name="wallpaper"></syn-icon>
166
+ Option 3
167
+ <syn-icon slot="suffix" name="wallpaper"></syn-icon>
168
+ </syn-radio-button>
169
+ </syn-radio-group>
170
+ ```
171
+
172
+ ---
173
+
174
+ ## Buttons With Icons
175
+
176
+ You can omit button labels and use icons instead. Make sure to set a label attribute on each icon so screen readers will announce each option correctly.
177
+
178
+ ```html
179
+ <syn-radio-group label="Select an option" name="a" value="neutral">
180
+ <syn-radio-button value="angry">
181
+ <syn-icon name="face_5" label="Angry"></syn-icon>
182
+ </syn-radio-button>
183
+
184
+ <syn-radio-button value="sad">
185
+ <syn-icon name="face_4" label="Sad"></syn-icon>
186
+ </syn-radio-button>
187
+
188
+ <syn-radio-button value="neutral">
189
+ <syn-icon name="face_3" label="Neutral"></syn-icon>
190
+ </syn-radio-button>
191
+
192
+ <syn-radio-button value="happy">
193
+ <syn-icon name="face_2" label="Happy"></syn-icon>
194
+ </syn-radio-button>
195
+
196
+ <syn-radio-button value="laughing">
197
+ <syn-icon name="face_6" label="Laughing"></syn-icon>
198
+ </syn-radio-button>
199
+ </syn-radio-group>
200
+ ```
@@ -140,7 +140,13 @@ The size of Radios and Radio Buttons will be determined by the Radio Group’s s
140
140
  The invalid status is used to warn the user that the Radio Group is invalid. For example, if the radio is mandatory and nothing has been checked.
141
141
 
142
142
  ```html
143
- <form class="custom-validity">
143
+ <form
144
+ onsubmit="
145
+ event.preventDefault();
146
+ event.stopPropagation();
147
+ "
148
+ id="components-syn-radio-group--invalid"
149
+ >
144
150
  <syn-radio-group
145
151
  label="Select an option"
146
152
  name="a"
@@ -151,10 +157,11 @@ The invalid status is used to warn the user that the Radio Group is invalid. For
151
157
  <syn-radio value="2">Option 2</syn-radio>
152
158
  <syn-radio value="3">Option 3</syn-radio>
153
159
  </syn-radio-group>
160
+
154
161
  <syn-button type="submit" variant="filled">Submit</syn-button>
155
162
  </form>
156
163
  <style>
157
- .custom-validity {
164
+ #components-syn-radio-group--invalid {
158
165
  display: flex;
159
166
  flex-direction: column;
160
167
  gap: var(--syn-spacing-large);
@@ -182,3 +189,21 @@ Use the setCustomValidity() method to set a custom validation message. This will
182
189
  <syn-button type="submit" variant="filled">Submit</syn-button>
183
190
  </form>
184
191
  ```
192
+
193
+ ---
194
+
195
+ ## Radio Buttons
196
+
197
+ Radio buttons offer an alternate way to display radio controls. In this case, an internal button group is used to group the buttons into a single, cohesive control.
198
+
199
+ ```html
200
+ <syn-radio-group
201
+ label="Select an option"
202
+ value="Option 1"
203
+ help-text="Select an option that makes you proud."
204
+ >
205
+ <syn-radio-button value="Option 1">Option 1</syn-radio-button>
206
+ <syn-radio-button value="Option 2">Option 2</syn-radio-button>
207
+ <syn-radio-button value="Option 3">Option 3</syn-radio-button>
208
+ </syn-radio-group>
209
+ ```
@@ -73,18 +73,25 @@ Add the size attribute to the Radio Group to change the radios’ size.
73
73
  The invalid status is used to warn the user that the Radio is invalid. For example, if the radio is mandatory and nothing has been checked.
74
74
 
75
75
  ```html
76
- <form class="custom-validity">
77
- <syn-radio-group required="" value="2">
76
+ <form
77
+ onsubmit="
78
+ event.preventDefault();
79
+ event.stopPropagation();
80
+ "
81
+ id="components-syn-radio--invalid"
82
+ >
83
+ <syn-radio-group required="">
78
84
  <syn-radio value="1">Invalid</syn-radio>
79
- <syn-radio value="2">Invalid</syn-radio>
85
+ <syn-radio value="">Invalid</syn-radio>
80
86
  </syn-radio-group>
87
+
81
88
  <syn-button type="submit" variant="filled">Submit</syn-button>
82
89
  </form>
83
90
  <style>
84
- .custom-validity {
91
+ #components-syn-radio--invalid {
85
92
  display: flex;
86
93
  flex-direction: column;
87
- gap: 1rem;
94
+ gap: var(--syn-spacing-large);
88
95
  }
89
96
  syn-button {
90
97
  align-self: flex-start;
@@ -49,30 +49,32 @@ Use the disabled attribute to disable a range.
49
49
  The invalid status is used to warn the user that the input is invalid. As range validation is not supported by the browser, you will need to implement your own validation logic.
50
50
 
51
51
  ```html
52
- <form class="custom-validity">
52
+ <form
53
+ onsubmit="
54
+ event.preventDefault();
55
+ event.stopPropagation();
56
+ "
57
+ id="components-syn-range--invalid"
58
+ >
53
59
  <syn-range
54
60
  help-text="This is an error text"
55
61
  id="range-invalid"
56
62
  max="100"
57
63
  min="0"
58
64
  value="50"
59
- >
60
- </syn-range>
61
- <syn-button type="submit">Submit</syn-button>
62
- </form>
63
- <script type="module">
64
- document.querySelector("form").addEventListener("submit", (e) => {
65
- e.preventDefault();
66
- });
65
+ ></syn-range>
66
+ <script type="module">
67
+ const range = document.querySelector("#range-invalid");
68
+ range.setCustomValidity("Please enter a valid value");
69
+ </script>
67
70
 
68
- const range = document.querySelector("#range-invalid");
69
- range.setCustomValidity("Please enter a valid value");
70
- </script>
71
+ <syn-button type="submit" variant="filled">Submit</syn-button>
72
+ </form>
71
73
  <style>
72
- .custom-validity {
74
+ #components-syn-range--invalid {
73
75
  display: flex;
74
76
  flex-direction: column;
75
- gap: 1rem;
77
+ gap: var(--syn-spacing-large);
76
78
  }
77
79
  syn-button {
78
80
  align-self: flex-start;
@@ -250,19 +250,26 @@ Use the size attribute to change a select’s size. Note that size does not appl
250
250
  The invalid status is used to warn the user that the Select is invalid. For example, if the entry of text is mandatory and nothing has been entered.
251
251
 
252
252
  ```html
253
- <form class="custom-validity">
253
+ <form
254
+ onsubmit="
255
+ event.preventDefault();
256
+ event.stopPropagation();
257
+ "
258
+ id="components-syn-select--invalid"
259
+ >
254
260
  <syn-select label="Select one" required="">
255
261
  <syn-option value="option-1">Option 1</syn-option>
256
262
  <syn-option value="option-2">Option 2</syn-option>
257
263
  <syn-option value="option-3">Option 3</syn-option>
258
264
  </syn-select>
265
+
259
266
  <syn-button type="submit" variant="filled">Submit</syn-button>
260
267
  </form>
261
268
  <style>
262
- .custom-validity {
269
+ #components-syn-select--invalid {
263
270
  display: flex;
264
271
  flex-direction: column;
265
- gap: 1rem;
272
+ gap: var(--syn-spacing-large);
266
273
  }
267
274
  syn-button {
268
275
  align-self: flex-start;
@@ -96,15 +96,22 @@ Add descriptive help text to a switch with the help-text attribute. For help tex
96
96
  The invalid status is used to warn the user that the Switch is invalid.
97
97
 
98
98
  ```html
99
- <form class="custom-validity">
99
+ <form
100
+ onsubmit="
101
+ event.preventDefault();
102
+ event.stopPropagation();
103
+ "
104
+ id="components-syn-switch--invalid"
105
+ >
100
106
  <syn-switch required="">Option</syn-switch>
107
+
101
108
  <syn-button type="submit" variant="filled">Submit</syn-button>
102
109
  </form>
103
110
  <style>
104
- .custom-validity {
111
+ #components-syn-switch--invalid {
105
112
  display: flex;
106
113
  flex-direction: column;
107
- gap: 1rem;
114
+ gap: var(--syn-spacing-large);
108
115
  }
109
116
  syn-button {
110
117
  align-self: flex-start;
@@ -112,19 +112,26 @@ Use the size attribute to change a textarea’s size.
112
112
  The invalid status is used to warn the user that the input is invalid. For example, if the entry of text is mandatory and nothing has been entered or if a text has been entered that does not have the correct format.
113
113
 
114
114
  ```html
115
- <form class="custom-validity">
115
+ <form
116
+ onsubmit="
117
+ event.preventDefault();
118
+ event.stopPropagation();
119
+ "
120
+ id="components-syn-textarea--invalid"
121
+ >
116
122
  <syn-textarea
117
123
  placeholder="Type something"
118
124
  help-text="This textarea is required."
119
125
  required=""
120
126
  ></syn-textarea>
127
+
121
128
  <syn-button type="submit" variant="filled">Submit</syn-button>
122
129
  </form>
123
130
  <style>
124
- .custom-validity {
131
+ #components-syn-textarea--invalid {
125
132
  display: flex;
126
133
  flex-direction: column;
127
- gap: 1rem;
134
+ gap: var(--syn-spacing-large);
128
135
  }
129
136
  syn-button {
130
137
  align-self: flex-start;