@synergy-design-system/metadata 3.17.0 → 3.19.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 +20 -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 +5 -5
  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
@@ -1,36 +1,58 @@
1
- /* eslint-disable */
2
1
  import { css } from 'lit';
3
2
 
4
3
  export default css`
5
- /* stylelint-disable */
6
4
  :host {
5
+ cursor: pointer;
7
6
  display: inline-block;
8
7
  position: relative;
9
8
  width: auto;
10
- cursor: pointer;
11
9
  }
12
10
 
13
11
  .button {
14
- display: inline-flex;
12
+ /* Icon size tokens */
13
+ --button-small-icon-size: var(--syn-font-size-medium);
14
+ --button-medium-icon-size: var(--syn-font-size-x-large);
15
+ --button-large-icon-size: var(--syn-font-size-2x-large);
16
+
17
+ /* Icon alignment tokens */
18
+ --button-icon-offset-small: -3px;
19
+ --button-icon-offset-medium: -6px;
20
+ --button-icon-offset-large: -8px;
21
+
22
+ /* Default (medium) spacing tokens */
23
+ --button-icon-only-padding: 0 calc(var(--syn-spacing-small) - var(--syn-spacing-4x-small));
24
+ --button-label-padding-inline-start: var(--syn-spacing-medium);
25
+ --button-label-padding-inline-end: var(--syn-spacing-medium);
26
+ --button-label-padding-inline-start-with-prefix: var(--syn-spacing-x-small);
27
+ --button-label-padding-inline-end-with-suffix: var(--syn-spacing-x-small);
28
+ --button-prefix-spacing: var(--syn-spacing-small);
29
+ --button-suffix-spacing: var(--syn-spacing-small);
30
+ --button-affix-size: var(--button-medium-icon-size);
31
+ --button-labeled-prefix-spacing: var(--syn-spacing-medium);
32
+ --button-labeled-suffix-spacing: var(--syn-spacing-medium);
33
+
15
34
  align-items: stretch;
16
- justify-content: center;
17
- width: 100%;
18
35
  border-style: solid;
19
36
  border-width: var(--syn-input-border-width);
37
+ cursor: inherit;
38
+ display: inline-flex;
20
39
  font-family: var(--syn-input-font-family);
21
- font-weight: var(--syn-font-weight-semibold);
22
- text-decoration: none;
23
- user-select: none;
24
- -webkit-user-select: none;
25
- white-space: nowrap;
26
- vertical-align: middle;
40
+ font-weight: var(--syn-font-weight-bold);
41
+ height: auto;
42
+ justify-content: center;
27
43
  padding: 0;
44
+ text-decoration: none;
28
45
  transition:
29
46
  var(--syn-transition-x-fast) background-color,
30
47
  var(--syn-transition-x-fast) color,
31
48
  var(--syn-transition-x-fast) border,
32
49
  var(--syn-transition-x-fast) box-shadow;
33
- cursor: inherit;
50
+ /* stylelint-disable-next-line property-no-vendor-prefix */
51
+ -webkit-user-select: none;
52
+ user-select: none;
53
+ vertical-align: middle;
54
+ white-space: nowrap;
55
+ width: 100%;
34
56
  }
35
57
 
36
58
  .button::-moz-focus-inner {
@@ -42,13 +64,13 @@ export default css`
42
64
  }
43
65
 
44
66
  .button:focus-visible {
45
- outline: var(--syn-focus-ring);
46
- outline-offset: var(--syn-focus-ring-offset);
67
+ outline: var(--syn-focus-ring-color) solid var(--syn-focus-ring-width);
68
+ outline-offset: var(--syn-focus-ring-width);
47
69
  }
48
70
 
49
71
  .button--disabled {
50
- opacity: 0.5;
51
72
  cursor: not-allowed;
73
+ opacity: var(--syn-input-disabled-opacity); /* #429: Use token for opacity */
52
74
  }
53
75
 
54
76
  /* When disabled, prevent mouse events from bubbling up from children */
@@ -56,11 +78,17 @@ export default css`
56
78
  pointer-events: none;
57
79
  }
58
80
 
81
+ .button__prefix,
82
+ .button__suffix,
83
+ .button__caret {
84
+ font-size: var(--button-affix-size);
85
+ }
86
+
59
87
  .button__prefix,
60
88
  .button__suffix {
61
- flex: 0 0 auto;
62
- display: flex;
63
89
  align-items: center;
90
+ display: flex;
91
+ flex: 0 0 auto;
64
92
  pointer-events: none;
65
93
  }
66
94
 
@@ -68,8 +96,16 @@ export default css`
68
96
  display: inline-block;
69
97
  }
70
98
 
99
+ /**
100
+ * Icon-only buttons
101
+ */
102
+ .button__label.button__icon-only {
103
+ padding: var(--button-icon-only-padding);
104
+ }
105
+
71
106
  .button__label::slotted(syn-icon) {
72
- vertical-align: -2px;
107
+ font-size: var(--button-medium-icon-size);
108
+ vertical-align: var(--button-icon-offset-medium);
73
109
  }
74
110
 
75
111
  /*
@@ -78,76 +114,85 @@ export default css`
78
114
 
79
115
  /* Primary */
80
116
  .button--filled.button--primary {
81
- background-color: var(--syn-color-primary-600);
82
- border-color: var(--syn-color-primary-600);
83
- color: var(--syn-color-neutral-0);
117
+ background: var(--syn-button-color);
118
+ border-color: var(--syn-button-color);
119
+ color: var(--syn-button-filled-color-text);
120
+ }
121
+
122
+ .button--filled.button--primary.button--disabled {
123
+ background: var(--syn-color-neutral-600);
124
+ border-color: var(--syn-color-neutral-600);
125
+ color: var(--syn-typography-color-text-inverted);
84
126
  }
85
127
 
86
128
  .button--filled.button--primary:hover:not(.button--disabled) {
87
- background-color: var(--syn-color-primary-500);
88
- border-color: var(--syn-color-primary-500);
89
- color: var(--syn-color-neutral-0);
129
+ background: var(--syn-button-color-hover);
130
+ border-color: var(--syn-button-color-hover);
131
+ color: var(--syn-button-filled-color-text-hover);
90
132
  }
91
133
 
92
134
  .button--filled.button--primary:active:not(.button--disabled) {
93
- background-color: var(--syn-color-primary-600);
94
- border-color: var(--syn-color-primary-600);
95
- color: var(--syn-color-neutral-0);
135
+ background: var(--syn-button-color-active);
136
+ border-color: var(--syn-button-color-active);
137
+ color: var(--syn-button-filled-color-text-active);
96
138
  }
97
139
 
98
140
  /*
99
141
  * Outline buttons
100
142
  */
101
-
102
143
  .button--outline {
103
144
  background: none;
104
- border: solid 1px;
145
+ border: var(--syn-input-border-width) solid; /* #901: Use token for border width */
105
146
  }
106
147
 
107
148
  /* Primary */
108
149
  .button--outline.button--primary {
109
- border-color: var(--syn-color-primary-600);
110
- color: var(--syn-color-primary-600);
150
+ border-color: var(--syn-button-color);
151
+ color: var(--syn-button-outline-color-text);
152
+ }
153
+
154
+ .button--outline.button--primary.button--disabled {
155
+ background: none;
156
+ border-color: var(--syn-color-neutral-600);
157
+ color: var(--syn-color-neutral-600);
111
158
  }
112
159
 
113
160
  .button--outline.button--primary:hover:not(.button--disabled),
114
161
  .button--outline.button--primary.button--checked:not(.button--disabled) {
115
- background-color: var(--syn-color-primary-600);
116
- color: var(--syn-color-neutral-0);
162
+ background: var(--syn-button-outline-color-hover);
163
+ border-color: var(--syn-button-outline-color-hover);
164
+ color: var(--syn-button-outline-color-text-hover);
117
165
  }
118
166
 
119
167
  .button--outline.button--primary:active:not(.button--disabled) {
120
- border-color: var(--syn-color-primary-700);
121
- background-color: var(--syn-color-primary-700);
122
- color: var(--syn-color-neutral-0);
168
+ background: var(--syn-button-outline-color-active);
169
+ border-color: var(--syn-button-outline-color-active);
170
+ color: var(--syn-button-outline-color-text-active);
123
171
  }
124
172
 
125
173
  /*
126
174
  * Text buttons
127
175
  */
128
-
129
176
  .button--text {
130
- background-color: transparent;
177
+ background: transparent;
131
178
  border-color: transparent;
132
- color: var(--syn-color-primary-600);
179
+ color: var(--syn-button-text-color-text);
133
180
  }
134
181
 
135
182
  .button--text:hover:not(.button--disabled) {
136
- background-color: transparent;
137
- border-color: transparent;
138
- color: var(--syn-color-primary-500);
183
+ color: var(--syn-button-text-color-text-hover);
139
184
  }
140
185
 
141
186
  .button--text:focus-visible:not(.button--disabled) {
142
- background-color: transparent;
143
- border-color: transparent;
144
- color: var(--syn-color-primary-500);
187
+ color: var(--syn-button-color);
145
188
  }
146
189
 
147
- .button--text:active:not(.button--disabled) {
148
- background-color: transparent;
149
- border-color: transparent;
150
- color: var(--syn-color-primary-700);
190
+ .button--text.button--primary:active:not(.button--disabled) {
191
+ color: var(--syn-button-text-color-text-active);
192
+ }
193
+
194
+ .button--text.button--primary.button--disabled {
195
+ color: var(--syn-color-neutral-600);
151
196
  }
152
197
 
153
198
  /*
@@ -155,33 +200,59 @@ export default css`
155
200
  */
156
201
 
157
202
  .button--small {
158
- height: auto;
159
- min-height: var(--syn-input-height-small);
203
+ --button-icon-only-padding: 0 calc(var(--syn-spacing-x-small) + var(--syn-spacing-4x-small));
204
+ --button-label-padding-inline-start: var(--syn-spacing-small);
205
+ --button-label-padding-inline-end: var(--syn-spacing-small);
206
+ --button-label-padding-inline-start-with-prefix: var(--syn-spacing-2x-small);
207
+ --button-label-padding-inline-end-with-suffix: var(--syn-spacing-2x-small);
208
+ --button-prefix-spacing: var(--syn-spacing-x-small);
209
+ --button-suffix-spacing: var(--syn-spacing-x-small);
210
+ --button-affix-size: var(--button-small-icon-size);
211
+ --button-labeled-prefix-spacing: var(--syn-spacing-small);
212
+ --button-labeled-suffix-spacing: var(--syn-spacing-small);
213
+
214
+ border-radius: var(--syn-button-border-radius-small);
160
215
  font-size: var(--syn-button-font-size-small);
161
216
  line-height: calc(var(--syn-input-height-small) - var(--syn-input-border-width) * 2);
162
- border-radius: var(--syn-input-border-radius-small);
217
+ min-height: var(--syn-input-height-small);
218
+ }
219
+
220
+ .button--small .button__label::slotted(syn-icon) {
221
+ font-size: var(--button-small-icon-size);
222
+ vertical-align: var(--button-icon-offset-small);
163
223
  }
164
224
 
165
225
  .button--medium {
166
- height: auto;
167
- min-height: var(--syn-input-height-medium);
226
+ border-radius: var(--syn-button-border-radius-medium);
168
227
  font-size: var(--syn-button-font-size-medium);
169
228
  line-height: calc(var(--syn-input-height-medium) - var(--syn-input-border-width) * 2);
170
- border-radius: var(--syn-input-border-radius-medium);
229
+ min-height: var(--syn-input-height-medium);
171
230
  }
172
231
 
173
232
  .button--large {
174
- height: auto;
175
- min-height: var(--syn-input-height-large);
233
+ --button-icon-only-padding: 0 calc(var(--syn-spacing-medium) - var(--syn-spacing-4x-small));
234
+ --button-label-padding-inline-start: var(--syn-spacing-large);
235
+ --button-label-padding-inline-end: var(--syn-spacing-large);
236
+ --button-label-padding-inline-start-with-prefix: var(--syn-spacing-small);
237
+ --button-label-padding-inline-end-with-suffix: var(--syn-spacing-small);
238
+ --button-affix-size: var(--button-large-icon-size);
239
+ --button-labeled-prefix-spacing: var(--syn-spacing-large);
240
+ --button-labeled-suffix-spacing: var(--syn-spacing-large);
241
+
242
+ border-radius: var(--syn-button-border-radius-large);
176
243
  font-size: var(--syn-button-font-size-large);
177
244
  line-height: calc(var(--syn-input-height-large) - var(--syn-input-border-width) * 2);
178
- border-radius: var(--syn-input-border-radius-large);
245
+ min-height: var(--syn-input-height-large);
246
+ }
247
+
248
+ .button--large .button__label::slotted(syn-icon) {
249
+ font-size: var(--button-large-icon-size);
250
+ vertical-align: var(--button-icon-offset-large);
179
251
  }
180
252
 
181
253
  /*
182
254
  * Caret modifier
183
255
  */
184
-
185
256
  .button--caret .button__suffix {
186
257
  display: none;
187
258
  }
@@ -193,10 +264,9 @@ export default css`
193
264
  /*
194
265
  * Loading modifier
195
266
  */
196
-
197
267
  .button--loading {
198
- position: relative;
199
268
  cursor: wait;
269
+ position: relative;
200
270
  }
201
271
 
202
272
  .button--loading .button__prefix,
@@ -208,154 +278,73 @@ export default css`
208
278
 
209
279
  .button--loading syn-spinner {
210
280
  --indicator-color: currentColor;
211
- position: absolute;
281
+
212
282
  font-size: 1em;
213
283
  height: 1em;
214
- width: 1em;
215
- top: calc(50% - 0.5em);
216
284
  left: calc(50% - 0.5em);
285
+ position: absolute;
286
+ top: calc(50% - 0.5em);
287
+ width: 1em;
217
288
  }
218
289
 
219
290
  /*
220
291
  * Badges
221
292
  */
222
-
223
293
  .button ::slotted(syn-badge) {
294
+ pointer-events: none;
224
295
  position: absolute;
225
- top: 0;
226
296
  right: 0;
297
+ top: 0;
227
298
  translate: 50% -50%;
228
- pointer-events: none;
229
299
  }
230
300
 
231
301
  .button--rtl ::slotted(syn-badge) {
232
- right: auto;
233
302
  left: 0;
303
+ right: auto;
234
304
  translate: -50% -50%;
235
305
  }
236
306
 
237
307
  /*
238
308
  * Button spacing
239
309
  */
240
-
241
- .button--has-label.button--small .button__label {
242
- padding: 0 var(--syn-spacing-small);
243
- }
244
-
245
- .button--has-label.button--medium .button__label {
246
- padding: 0 var(--syn-spacing-medium);
310
+ .button--has-label .button__label {
311
+ padding-block: 0;
312
+ padding-inline: var(--button-label-padding-inline-start) var(--button-label-padding-inline-end);
247
313
  }
248
314
 
249
- .button--has-label.button--large .button__label {
250
- padding: 0 var(--syn-spacing-large);
251
- }
252
-
253
- .button--has-prefix.button--small {
254
- padding-inline-start: var(--syn-spacing-x-small);
255
- }
256
-
257
- .button--has-prefix.button--small .button__label {
258
- padding-inline-start: var(--syn-spacing-x-small);
259
- }
260
-
261
- .button--has-prefix.button--medium {
262
- padding-inline-start: var(--syn-spacing-small);
263
- }
264
-
265
- .button--has-prefix.button--medium .button__label {
266
- padding-inline-start: var(--syn-spacing-small);
267
- }
268
-
269
- .button--has-prefix.button--large {
270
- padding-inline-start: var(--syn-spacing-small);
271
- }
272
-
273
- .button--has-prefix.button--large .button__label {
274
- padding-inline-start: var(--syn-spacing-small);
275
- }
276
-
277
- .button--has-suffix.button--small,
278
- .button--caret.button--small {
279
- padding-inline-end: var(--syn-spacing-x-small);
280
- }
281
-
282
- .button--has-suffix.button--small .button__label,
283
- .button--caret.button--small .button__label {
284
- padding-inline-end: var(--syn-spacing-x-small);
285
- }
286
-
287
- .button--has-suffix.button--medium,
288
- .button--caret.button--medium {
289
- padding-inline-end: var(--syn-spacing-small);
290
- }
291
-
292
- .button--has-suffix.button--medium .button__label,
293
- .button--caret.button--medium .button__label {
294
- padding-inline-end: var(--syn-spacing-small);
295
- }
296
-
297
- .button--has-suffix.button--large,
298
- .button--caret.button--large {
299
- padding-inline-end: var(--syn-spacing-small);
300
- }
301
-
302
- .button--has-suffix.button--large .button__label,
303
- .button--caret.button--large .button__label {
304
- padding-inline-end: var(--syn-spacing-small);
315
+ .button--has-label .button__label.button__icon-only {
316
+ padding: var(--button-icon-only-padding);
305
317
  }
306
318
 
307
319
  /*
308
- * Button groups support a variety of button types (e.g. buttons with tooltips, buttons as dropdown triggers, etc.).
309
- * This means buttons aren't always direct descendants of the button group, thus we can't target them with the
310
- * ::slotted selector. To work around this, the button group component does some magic to add these special classes to
311
- * buttons and we style them here instead.
320
+ * Adjustments for button label paddings
321
+ * @see https://github.com/synergy-design-system/synergy-design-system/issues/243
312
322
  */
313
-
314
- :host([data-syn-button-group__button--first]:not([data-syn-button-group__button--last])) .button {
315
- border-start-end-radius: 0;
316
- border-end-end-radius: 0;
317
- }
318
-
319
- :host([data-syn-button-group__button--inner]) .button {
320
- border-radius: 0;
323
+ .button--has-prefix .button__label {
324
+ padding-inline-start: var(--button-label-padding-inline-start-with-prefix);
321
325
  }
322
326
 
323
- :host([data-syn-button-group__button--last]:not([data-syn-button-group__button--first])) .button {
324
- border-start-start-radius: 0;
325
- border-end-start-radius: 0;
327
+ .button--has-suffix .button__label,
328
+ .button--caret .button__label {
329
+ padding-inline-end: var(--button-label-padding-inline-end-with-suffix);
326
330
  }
327
331
 
328
- /* All except the first */
329
- :host([data-syn-button-group__button]:not([data-syn-button-group__button--first])) {
330
- margin-inline-start: calc(-1 * var(--syn-input-border-width));
332
+ /* Basic prefix/suffix spacing */
333
+ .button--has-prefix {
334
+ padding-inline-start: var(--button-prefix-spacing);
331
335
  }
332
336
 
333
- /* Add a visual separator between solid buttons */
334
- :host(
335
- [data-syn-button-group__button]:not(
336
- [data-syn-button-group__button--first],
337
- [data-syn-button-group__button--radio],
338
- [variant='filled']
339
- ):not(:hover)
340
- )
341
- .button:after {
342
- content: '';
343
- position: absolute;
344
- top: 0;
345
- inset-inline-start: 0;
346
- bottom: 0;
347
- border-left: solid 1px rgb(128 128 128 / 33%);
348
- mix-blend-mode: multiply;
337
+ .button--has-suffix,
338
+ .button--caret {
339
+ padding-inline-end: var(--button-suffix-spacing);
349
340
  }
350
341
 
351
- /* Bump hovered, focused, and checked buttons up so their focus ring isn't clipped */
352
- :host([data-syn-button-group__button--hover]) {
353
- z-index: 1;
342
+ /* Enhanced spacing for labeled buttons with prefix/suffix */
343
+ .button--has-label.button--has-prefix {
344
+ padding-inline-start: var(--button-labeled-prefix-spacing);
354
345
  }
355
346
 
356
- /* Focus and checked are always on top */
357
- :host([data-syn-button-group__button--focus]),
358
- :host([data-syn-button-group__button][checked]) {
359
- z-index: 2;
347
+ .button--has-label.button--has-suffix {
348
+ padding-inline-end: var(--button-labeled-suffix-spacing);
360
349
  }
361
350
  `;
@@ -1,15 +1,20 @@
1
- /* eslint-disable */
1
+ import type { CSSResultGroup } from 'lit';
2
2
  import { html } from 'lit';
3
3
  import { property, query, state } from 'lit/decorators.js';
4
4
  import componentStyles from '../../styles/component.styles.js';
5
5
  import SynergyElement from '../../internal/synergy-element.js';
6
6
  import styles from './button-group.styles.js';
7
- import customStyles from './button-group.custom.styles.js';
8
- import type { CSSResultGroup } from 'lit';
9
7
  import type SynButton from '../button/button.component.js';
10
8
  import type SynRadioButton from '../radio-button/radio-button.component.js';
11
9
  import { enableDefaultSettings } from '../../utilities/defaultSettings/decorator.js';
12
10
 
11
+ function findButton(el: HTMLElement) {
12
+ const selector = 'syn-button, syn-radio-button';
13
+
14
+ // The button could be the target element or a child of it (e.g. a dropdown or tooltip anchor)
15
+ return el.closest(selector) ?? el.querySelector(selector);
16
+ }
17
+
13
18
  /**
14
19
  * @summary Button groups can be used to group related buttons into sections.
15
20
  * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-button-group--docs
@@ -22,7 +27,7 @@ import { enableDefaultSettings } from '../../utilities/defaultSettings/decorator
22
27
  */
23
28
  @enableDefaultSettings('SynButtonGroup')
24
29
  export default class SynButtonGroup extends SynergyElement {
25
- static styles: CSSResultGroup = [componentStyles, styles, customStyles];
30
+ static styles: CSSResultGroup = [componentStyles, styles];
26
31
 
27
32
  @query('slot') defaultSlot: HTMLSlotElement;
28
33
 
@@ -42,21 +47,25 @@ export default class SynButtonGroup extends SynergyElement {
42
47
 
43
48
  private mutationObserver: MutationObserver;
44
49
 
50
+ // eslint-disable-next-line class-methods-use-this
45
51
  private handleFocus(event: Event) {
46
52
  const button = findButton(event.target as HTMLElement);
47
53
  button?.toggleAttribute('data-syn-button-group__button--focus', true);
48
54
  }
49
55
 
56
+ // eslint-disable-next-line class-methods-use-this
50
57
  private handleBlur(event: Event) {
51
58
  const button = findButton(event.target as HTMLElement);
52
59
  button?.toggleAttribute('data-syn-button-group__button--focus', false);
53
60
  }
54
61
 
62
+ // eslint-disable-next-line class-methods-use-this
55
63
  private handleMouseOver(event: Event) {
56
64
  const button = findButton(event.target as HTMLElement);
57
65
  button?.toggleAttribute('data-syn-button-group__button--hover', true);
58
66
  }
59
67
 
68
+ // eslint-disable-next-line class-methods-use-this
60
69
  private handleMouseOut(event: Event) {
61
70
  const button = findButton(event.target as HTMLElement);
62
71
  button?.toggleAttribute('data-syn-button-group__button--hover', false);
@@ -82,7 +91,7 @@ export default class SynButtonGroup extends SynergyElement {
82
91
  button.toggleAttribute('data-syn-button-group__button--last', index === slottedElements.length - 1);
83
92
  button.toggleAttribute(
84
93
  'data-syn-button-group__button--radio',
85
- button.tagName.toLowerCase() === 'syn-radio-button'
94
+ button.tagName.toLowerCase() === 'syn-radio-button',
86
95
  );
87
96
  }
88
97
  });
@@ -91,9 +100,9 @@ export default class SynButtonGroup extends SynergyElement {
91
100
  firstUpdated() {
92
101
  const startObserving = () => {
93
102
  this.mutationObserver.observe(this, {
94
- subtree: true,
95
- attributes: true,
96
103
  attributeFilter: ['size', 'variant'],
104
+ attributes: true,
105
+ subtree: true,
97
106
  });
98
107
  };
99
108
 
@@ -115,11 +124,11 @@ export default class SynButtonGroup extends SynergyElement {
115
124
 
116
125
  if (button) {
117
126
  // Unset the size property to allow button-group to control it
118
- button.size = undefined as any;
127
+ button.size = undefined as never;
119
128
 
120
129
  // Also unset variant for syn-buttons
121
130
  if (button.tagName.toLowerCase() === 'syn-button') {
122
- (button as SynButton).variant = undefined as any;
131
+ (button as SynButton).variant = undefined as never;
123
132
  }
124
133
  }
125
134
  });
@@ -129,8 +138,9 @@ export default class SynButtonGroup extends SynergyElement {
129
138
  if (buttonGroupChanged || childrenChanged) {
130
139
  this.handleSlotChange();
131
140
  }
132
-
141
+
133
142
  // Reconnect observer after changes are done
143
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
134
144
  this.updateComplete.then(() => {
135
145
  startObserving();
136
146
  });
@@ -145,7 +155,7 @@ export default class SynButtonGroup extends SynergyElement {
145
155
  }
146
156
 
147
157
  render() {
148
- // eslint-disable-next-line lit-a11y/mouse-events-have-key-events
158
+ /* eslint-disable @typescript-eslint/unbound-method, lit-a11y/mouse-events-have-key-events */
149
159
  return html`
150
160
  <div
151
161
  part="base"
@@ -160,12 +170,6 @@ export default class SynButtonGroup extends SynergyElement {
160
170
  <slot @slotchange=${this.handleSlotChange}></slot>
161
171
  </div>
162
172
  `;
173
+ /* eslint-enable @typescript-eslint/unbound-method, lit-a11y/mouse-events-have-key-events */
163
174
  }
164
175
  }
165
-
166
- function findButton(el: HTMLElement) {
167
- const selector = 'syn-button, syn-radio-button';
168
-
169
- // The button could be the target element or a child of it (e.g. a dropdown or tooltip anchor)
170
- return el.closest(selector) ?? el.querySelector(selector);
171
- }
@@ -1,8 +1,6 @@
1
- /* eslint-disable */
2
1
  import { css } from 'lit';
3
2
 
4
3
  export default css`
5
- /* stylelint-disable */
6
4
  :host {
7
5
  display: inline-block;
8
6
  }
@@ -21,7 +21,7 @@ import '@synergy-design-system/components/components/radio-button/radio-button.j
21
21
  * @summary Radios buttons allow the user to select a single option from a group using a button-like control.
22
22
  * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-radio-button--docs
23
23
  * @status stable
24
- * @since 1.0.0
24
+ * @since 3.17.0
25
25
  *
26
26
  * @slot - The radio button's label.
27
27
  * @slot prefix - A presentational prefix icon or similar element.
@@ -82,6 +82,19 @@ export class SynRadioButtonComponent {
82
82
  return this.nativeElement.disabled;
83
83
  }
84
84
 
85
+ /**
86
+ * Sets the radio button to a readonly state.
87
+ */
88
+ @Input()
89
+ set readonly(v: '' | SynRadioButton['readonly']) {
90
+ this._ngZone.runOutsideAngular(
91
+ () => (this.nativeElement.readonly = v === '' || v),
92
+ );
93
+ }
94
+ get readonly(): SynRadioButton['readonly'] {
95
+ return this.nativeElement.readonly;
96
+ }
97
+
85
98
  /**
86
99
  * The radio button's size.
87
100
  * When used inside a radio group, the size will be determined by the radio group's size so
@@ -95,19 +108,6 @@ this attribute can typically be omitted.
95
108
  return this.nativeElement.size;
96
109
  }
97
110
 
98
- /**
99
- * Draws a pill-style radio button with rounded edges.
100
- */
101
- @Input()
102
- set pill(v: '' | SynRadioButton['pill']) {
103
- this._ngZone.runOutsideAngular(
104
- () => (this.nativeElement.pill = v === '' || v),
105
- );
106
- }
107
- get pill(): SynRadioButton['pill'] {
108
- return this.nativeElement.pill;
109
- }
110
-
111
111
  /**
112
112
  * Emitted when the button loses focus.
113
113
  */